|  | @@ -264,7 +264,6 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |                  List<FinancialExpenditure> financialExpenditureList = new ArrayList<>();
 |  |                  List<FinancialExpenditure> financialExpenditureList = new ArrayList<>();
 | 
											
												
													
														|  |                  Integer organId = null;
 |  |                  Integer organId = null;
 | 
											
												
													
														|  |                  String note = "";
 |  |                  String note = "";
 | 
											
												
													
														|  | -                ExpenditureTypeEnum expenditureTypeEnum = ExpenditureTypeEnum.REFUND;
 |  | 
 | 
											
												
													
														|  |                  FeeProjectEnum feeProjectEnum = FeeProjectEnum.REFUND;
 |  |                  FeeProjectEnum feeProjectEnum = FeeProjectEnum.REFUND;
 | 
											
												
													
														|  |                  BigDecimal totalAmount = BigDecimal.ZERO;
 |  |                  BigDecimal totalAmount = BigDecimal.ZERO;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -283,9 +282,6 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |                      if (oaInputDto.getName().contains("金额")) {
 |  |                      if (oaInputDto.getName().contains("金额")) {
 | 
											
												
													
														|  |                          totalAmount = new BigDecimal(submitValue.toString());
 |  |                          totalAmount = new BigDecimal(submitValue.toString());
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  | -                    if (StringUtils.equals("支出类型", oaInputDto.getName())) {
 |  | 
 | 
											
												
													
														|  | -                        expenditureTypeEnum = ExpenditureTypeEnum.valueOfDesc(submitValue.toString());
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  |                      if (StringUtils.equals("费用类别", oaInputDto.getName()) || StringUtils.equals("费用类型", oaInputDto.getName())) {
 |  |                      if (StringUtils.equals("费用类别", oaInputDto.getName()) || StringUtils.equals("费用类型", oaInputDto.getName())) {
 | 
											
												
													
														|  |                          feeProjectEnum = FeeProjectEnum.valueOfDesc(submitValue.toString());
 |  |                          feeProjectEnum = FeeProjectEnum.valueOfDesc(submitValue.toString());
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
										
											
												
													
														|  | @@ -328,7 +324,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |                                      }
 |  |                                      }
 | 
											
												
													
														|  |                                  }
 |  |                                  }
 | 
											
												
													
														|  |                                  financialExpenditure.setFeeProject(feeProjectEnum);
 |  |                                  financialExpenditure.setFeeProject(feeProjectEnum);
 | 
											
												
													
														|  | -                                financialExpenditure.setType(expenditureTypeEnum);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                financialExpenditure.setType(getExpenditureType(feeProjectEnum));
 | 
											
												
													
														|  |                                  financialExpenditure.setAprovalTime(endTime);
 |  |                                  financialExpenditure.setAprovalTime(endTime);
 | 
											
												
													
														|  |                                  financialExpenditure.setPaymentTime(endTime);
 |  |                                  financialExpenditure.setPaymentTime(endTime);
 | 
											
												
													
														|  |                                  financialExpenditure.setAmount(totalAmount);
 |  |                                  financialExpenditure.setAmount(totalAmount);
 | 
											
										
											
												
													
														|  | @@ -356,7 +352,6 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |                              financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
 |  |                              financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
 | 
											
												
													
														|  |                              financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
 |  |                              financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
 | 
											
												
													
														|  |                              financialExpenditure.setEffectiveTime(DateUtil.format(endTime,DateUtil.ISO_YEAR_MONTH_FORMAT));
 |  |                              financialExpenditure.setEffectiveTime(DateUtil.format(endTime,DateUtil.ISO_YEAR_MONTH_FORMAT));
 | 
											
												
													
														|  | -                            financialExpenditure.setType(expenditureTypeEnum);
 |  | 
 | 
											
												
													
														|  |                              List<OaColumnDto> columns = oaInputDto.getColumns();
 |  |                              List<OaColumnDto> columns = oaInputDto.getColumns();
 | 
											
												
													
														|  |                              if (columns != null && columns.size() > 0) {
 |  |                              if (columns != null && columns.size() > 0) {
 | 
											
												
													
														|  |                                  for (OaColumnDto column : columns) {
 |  |                                  for (OaColumnDto column : columns) {
 | 
											
										
											
												
													
														|  | @@ -391,14 +386,13 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |                                                  financialExpenditure.setCurrentAmount(financialExpenditure.getAmount());
 |  |                                                  financialExpenditure.setCurrentAmount(financialExpenditure.getAmount());
 | 
											
												
													
														|  |                                              } else if (StringUtils.equals(name,"情况说明") || StringUtils.equals(name,"事由")) {
 |  |                                              } else if (StringUtils.equals(name,"情况说明") || StringUtils.equals(name,"事由")) {
 | 
											
												
													
														|  |                                                  financialExpenditure.setCause(o.toString());
 |  |                                                  financialExpenditure.setCause(o.toString());
 | 
											
												
													
														|  | -                                            } else if (StringUtils.equals(name,"支出类型")) {
 |  | 
 | 
											
												
													
														|  | -                                                financialExpenditure.setType(ExpenditureTypeEnum.valueOfDesc(o.toString()));
 |  | 
 | 
											
												
													
														|  | -                                            } else if (StringUtils.equals(name,"费用类型") || StringUtils.equals(name,"费用类别")) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                            }else if (StringUtils.equals(name,"费用类型") || StringUtils.equals(name,"费用类别")) {
 | 
											
												
													
														|  |                                                  FeeProjectEnum projectEnum = FeeProjectEnum.valueOfDesc(o.toString());
 |  |                                                  FeeProjectEnum projectEnum = FeeProjectEnum.valueOfDesc(o.toString());
 | 
											
												
													
														|  |                                                  if(projectEnum == null){
 |  |                                                  if(projectEnum == null){
 | 
											
												
													
														|  |                                                      projectEnum = feeProjectEnum;
 |  |                                                      projectEnum = feeProjectEnum;
 | 
											
												
													
														|  |                                                  }
 |  |                                                  }
 | 
											
												
													
														|  |                                                  financialExpenditure.setFeeProject(projectEnum);
 |  |                                                  financialExpenditure.setFeeProject(projectEnum);
 | 
											
												
													
														|  | 
 |  | +                                                financialExpenditure.setType(getExpenditureType(projectEnum));
 | 
											
												
													
														|  |                                              }else if (StringUtils.equals(name,"日期") || StringUtils.equals(name,"费用发生日期")) {
 |  |                                              }else if (StringUtils.equals(name,"日期") || StringUtils.equals(name,"费用发生日期")) {
 | 
											
												
													
														|  |                                                  financialExpenditure.setPaymentTime(DateUtil.stringToDate(o.toString(),DateUtil.DEFAULT_PATTERN));
 |  |                                                  financialExpenditure.setPaymentTime(DateUtil.stringToDate(o.toString(),DateUtil.DEFAULT_PATTERN));
 | 
											
												
													
														|  |                                              } else if (StringUtils.equals(name,"费用分摊月份")) {
 |  |                                              } else if (StringUtils.equals(name,"费用分摊月份")) {
 | 
											
										
											
												
													
														|  | @@ -483,11 +477,10 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |                          for (FinancialExpenditure financialExpenditure : financialExpenditures) {
 |  |                          for (FinancialExpenditure financialExpenditure : financialExpenditures) {
 | 
											
												
													
														|  |                              financialExpenditure.setAprovalTime(endTime);
 |  |                              financialExpenditure.setAprovalTime(endTime);
 | 
											
												
													
														|  |                              financialExpenditure.setPaymentTime(endTime);
 |  |                              financialExpenditure.setPaymentTime(endTime);
 | 
											
												
													
														|  | -                            financialExpenditure.setType(expenditureTypeEnum);
 |  | 
 | 
											
												
													
														|  |                              financialExpenditure.setEffectiveTime(DateUtil.format(endTime,DateUtil.ISO_YEAR_MONTH_FORMAT));
 |  |                              financialExpenditure.setEffectiveTime(DateUtil.format(endTime,DateUtil.ISO_YEAR_MONTH_FORMAT));
 | 
											
												
													
														|  |                              financialExpenditure.setApplyUser(realName);
 |  |                              financialExpenditure.setApplyUser(realName);
 | 
											
												
													
														|  | -                            financialExpenditure.setType(ExpenditureTypeEnum.REFUND);
 |  | 
 | 
											
												
													
														|  |                              financialExpenditure.setFeeProject(FeeProjectEnum.REFUND);
 |  |                              financialExpenditure.setFeeProject(FeeProjectEnum.REFUND);
 | 
											
												
													
														|  | 
 |  | +                            financialExpenditure.setType(getExpenditureType(financialExpenditure.getFeeProject()));
 | 
											
												
													
														|  |                              financialExpenditure.setBatchNo(pWorkOrderInfo.getId().toString());
 |  |                              financialExpenditure.setBatchNo(pWorkOrderInfo.getId().toString());
 | 
											
												
													
														|  |                              financialExpenditure.setFinancialProcessNo(pWorkOrderInfo.getId().toString());
 |  |                              financialExpenditure.setFinancialProcessNo(pWorkOrderInfo.getId().toString());
 | 
											
												
													
														|  |                          }
 |  |                          }
 | 
											
										
											
												
													
														|  | @@ -525,10 +518,9 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |                          financialExpenditure.setCurrentAmount(financialExpenditure.getAmount());
 |  |                          financialExpenditure.setCurrentAmount(financialExpenditure.getAmount());
 | 
											
												
													
														|  |                      }else if(StringUtils.equals(name,"情况说明")){
 |  |                      }else if(StringUtils.equals(name,"情况说明")){
 | 
											
												
													
														|  |                          financialExpenditure.setCause(o.toString());
 |  |                          financialExpenditure.setCause(o.toString());
 | 
											
												
													
														|  | -                    }else if(StringUtils.equals(name,"支出类型")){
 |  | 
 | 
											
												
													
														|  | -                        financialExpenditure.setType(ExpenditureTypeEnum.valueOfDesc(o.toString()));
 |  | 
 | 
											
												
													
														|  |                      }else if(StringUtils.equals(name,"费用类型") || StringUtils.equals(name,"费用类别")){
 |  |                      }else if(StringUtils.equals(name,"费用类型") || StringUtils.equals(name,"费用类别")){
 | 
											
												
													
														|  |                          financialExpenditure.setFeeProject(FeeProjectEnum.valueOfDesc(o.toString()));
 |  |                          financialExpenditure.setFeeProject(FeeProjectEnum.valueOfDesc(o.toString()));
 | 
											
												
													
														|  | 
 |  | +                        financialExpenditure.setType(getExpenditureType(financialExpenditure.getFeeProject()));
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |                  financialExpenditureDao.insert(financialExpenditure);
 |  |                  financialExpenditureDao.insert(financialExpenditure);
 | 
											
										
											
												
													
														|  | @@ -536,6 +528,19 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    public static ExpenditureTypeEnum getExpenditureType(FeeProjectEnum feeProjectEnum) {
 | 
											
												
													
														|  | 
 |  | +        switch (feeProjectEnum) {
 | 
											
												
													
														|  | 
 |  | +            case REFUND:
 | 
											
												
													
														|  | 
 |  | +                return ExpenditureTypeEnum.REFUND;
 | 
											
												
													
														|  | 
 |  | +            case HOUSE:
 | 
											
												
													
														|  | 
 |  | +            case OFFICE:
 | 
											
												
													
														|  | 
 |  | +            case MAINS_PROPERTY:
 | 
											
												
													
														|  | 
 |  | +                return ExpenditureTypeEnum.FIXED;
 | 
											
												
													
														|  | 
 |  | +            default:
 | 
											
												
													
														|  | 
 |  | +                return ExpenditureTypeEnum.VARIABLE;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  |      public void checkCourseReturnFee(Map<String,String> paramMap) {
 |  |      public void checkCourseReturnFee(Map<String,String> paramMap) {
 | 
											
												
													
														|  |          String tplInfoId = paramMap.get("tplInfoId");
 |  |          String tplInfoId = paramMap.get("tplInfoId");
 | 
											
										
											
												
													
														|  | @@ -721,4 +726,5 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          return financialExpenditureList;
 |  |          return financialExpenditureList;
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  }
 |  |  }
 |