|
@@ -267,27 +267,36 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
ExpenditureTypeEnum expenditureTypeEnum = ExpenditureTypeEnum.REFUND;
|
|
|
FeeProjectEnum feeProjectEnum = FeeProjectEnum.REFUND;
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
+
|
|
|
for (OaInputDto oaInputDto : oaInputDtos) {
|
|
|
String submitForm = oaInputDto.getModel();
|
|
|
Object submitValue = formData.get(submitForm);
|
|
|
- if(Objects.isNull(submitValue)){
|
|
|
+ if (Objects.isNull(submitValue) || StringUtils.isEmpty(submitValue.toString())) {
|
|
|
continue;
|
|
|
}
|
|
|
- if (StringUtils.equals("分部",oaInputDto.getName())) {
|
|
|
+ if (StringUtils.equals("分部", oaInputDto.getName())) {
|
|
|
organId = Integer.parseInt(submitValue.toString());
|
|
|
}
|
|
|
- if (StringUtils.equals("情况说明",oaInputDto.getName())) {
|
|
|
+ if (StringUtils.equals("情况说明", oaInputDto.getName())) {
|
|
|
note = submitValue.toString();
|
|
|
}
|
|
|
- if (StringUtils.equals("金额",oaInputDto.getName())) {
|
|
|
+ if (oaInputDto.getName().contains("金额")) {
|
|
|
totalAmount = new BigDecimal(submitValue.toString());
|
|
|
}
|
|
|
- if (StringUtils.equals("支出类型",oaInputDto.getName())) {
|
|
|
+ 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());
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ for (OaInputDto oaInputDto : oaInputDtos) {
|
|
|
+ String submitForm = oaInputDto.getModel();
|
|
|
+ Object submitValue = formData.get(submitForm);
|
|
|
+ if(Objects.isNull(submitValue)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if(!StringUtils.equals("子表单",oaInputDto.getName()) && !StringUtils.equals("分摊明细",oaInputDto.getName())){
|
|
|
continue;
|
|
|
}
|
|
@@ -298,10 +307,10 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
for (HashMap hashMap : hashMaps) {
|
|
|
List<OaColumnDto> columns = oaInputDto.getColumns();
|
|
|
if (columns != null && columns.size() > 0) {
|
|
|
+ FinancialExpenditure financialExpenditure = new FinancialExpenditure();
|
|
|
nullAmount:for (OaColumnDto column : columns) {
|
|
|
List<OaInputDto> columnList = column.getList();
|
|
|
if (columnList != null && columnList.size() > 0) {
|
|
|
- FinancialExpenditure financialExpenditure = new FinancialExpenditure();
|
|
|
for (OaInputDto inputDto : columnList) {
|
|
|
String name = inputDto.getName();
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
@@ -314,21 +323,21 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
financialExpenditure.setEffectiveTime(o.toString());
|
|
|
}
|
|
|
}
|
|
|
- financialExpenditure.setFeeProject(feeProjectEnum);
|
|
|
- financialExpenditure.setType(expenditureTypeEnum);
|
|
|
- financialExpenditure.setAprovalTime(endTime);
|
|
|
- financialExpenditure.setPaymentTime(endTime);
|
|
|
- financialExpenditure.setAmount(totalAmount);
|
|
|
- financialExpenditure.setCause(note);
|
|
|
- financialExpenditure.setBatchNo(pWorkOrderInfo.getId().toString());
|
|
|
- financialExpenditure.setFinancialProcessNo(pWorkOrderInfo.getId().toString());
|
|
|
- financialExpenditure.setApplyUser(realName);
|
|
|
- financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
|
|
|
- financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
|
|
|
- financialExpenditure.setOrganId(organId);
|
|
|
- financialExpenditureList.add(financialExpenditure);
|
|
|
}
|
|
|
}
|
|
|
+ financialExpenditure.setFeeProject(feeProjectEnum);
|
|
|
+ financialExpenditure.setType(expenditureTypeEnum);
|
|
|
+ financialExpenditure.setAprovalTime(endTime);
|
|
|
+ financialExpenditure.setPaymentTime(endTime);
|
|
|
+ financialExpenditure.setAmount(totalAmount);
|
|
|
+ financialExpenditure.setCause(note);
|
|
|
+ financialExpenditure.setBatchNo(pWorkOrderInfo.getId().toString());
|
|
|
+ financialExpenditure.setFinancialProcessNo(pWorkOrderInfo.getId().toString());
|
|
|
+ financialExpenditure.setApplyUser(realName);
|
|
|
+ financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
|
|
|
+ financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
|
|
|
+ financialExpenditure.setOrganId(organId);
|
|
|
+ financialExpenditureList.add(financialExpenditure);
|
|
|
}
|
|
|
}
|
|
|
}else {
|