|
@@ -242,6 +242,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
if(hasFinancial != null){
|
|
|
return;
|
|
|
}
|
|
|
+ Date endTime = pWorkOrderInfo.getUpdateTime();
|
|
|
String realName = "";
|
|
|
if(pWorkOrderInfo.getCreator() != null){
|
|
|
SimpleUserDto simpleUser = teacherDao.getSimpleUser(pWorkOrderInfo.getCreator());
|
|
@@ -321,6 +322,8 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ financialExpenditure.setAprovalTime(endTime);
|
|
|
+ financialExpenditure.setPaymentTime(endTime);
|
|
|
financialExpenditure.setAmount(totalAmount);
|
|
|
financialExpenditure.setCause(note);
|
|
|
financialExpenditure.setBatchNo(pWorkOrderInfo.getId().toString());
|
|
@@ -338,12 +341,14 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
nullUser:
|
|
|
for (HashMap hashMap : hashMaps) {
|
|
|
FinancialExpenditure financialExpenditure = new FinancialExpenditure();
|
|
|
+ financialExpenditure.setAprovalTime(endTime);
|
|
|
+ financialExpenditure.setPaymentTime(endTime);
|
|
|
financialExpenditure.setBatchNo(pWorkOrderInfo.getId().toString());
|
|
|
financialExpenditure.setFinancialProcessNo(pWorkOrderInfo.getId().toString());
|
|
|
financialExpenditure.setApplyUser(realName);
|
|
|
financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
|
|
|
financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
|
|
|
- financialExpenditure.setEffectiveTime(DateUtil.format(now,DateUtil.ISO_YEAR_MONTH_FORMAT));
|
|
|
+ financialExpenditure.setEffectiveTime(DateUtil.format(endTime,DateUtil.ISO_YEAR_MONTH_FORMAT));
|
|
|
List<OaColumnDto> columns = oaInputDto.getColumns();
|
|
|
if (columns != null && columns.size() > 0) {
|
|
|
for (OaColumnDto column : columns) {
|
|
@@ -397,6 +402,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if (Objects.nonNull(o) && StringUtils.isNotEmpty(o.toString())) {
|
|
|
financialExpenditure.setAmount(financialExpenditure.getAmount().add(new BigDecimal(Double.parseDouble(o.toString()))));
|
|
|
+ financialExpenditure.setCurrentAmount(financialExpenditure.getAmount());
|
|
|
continue;
|
|
|
}
|
|
|
} else if (name.contains("情况说明") || name.contains("事由")) {
|
|
@@ -411,7 +417,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
financialExpenditure.setType(ExpenditureTypeEnum.valueOfDesc(o.toString()));
|
|
|
continue;
|
|
|
}
|
|
|
- } else if (name.contains("费用类型")) {
|
|
|
+ } else if (name.contains("费用类型") || name.contains("费用类别")) {
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if (Objects.nonNull(o) && StringUtils.isNotEmpty(o.toString())) {
|
|
|
financialExpenditure.setFeeProject(FeeProjectEnum.valueOfDesc(o.toString()));
|
|
@@ -495,6 +501,8 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
}
|
|
|
if(CollectionUtils.isNotEmpty(financialExpenditures)){
|
|
|
for (FinancialExpenditure financialExpenditure : financialExpenditures) {
|
|
|
+ financialExpenditure.setAprovalTime(endTime);
|
|
|
+ financialExpenditure.setPaymentTime(endTime);
|
|
|
financialExpenditure.setApplyUser(realName);
|
|
|
financialExpenditure.setType(ExpenditureTypeEnum.REFUND);
|
|
|
financialExpenditure.setFeeProject(FeeProjectEnum.REFUND);
|
|
@@ -510,12 +518,14 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
financialExpenditureDao.batchInsert(financialExpenditureList);
|
|
|
}else {
|
|
|
FinancialExpenditure financialExpenditure = new FinancialExpenditure();
|
|
|
+ financialExpenditure.setAprovalTime(endTime);
|
|
|
+ financialExpenditure.setPaymentTime(endTime);
|
|
|
financialExpenditure.setBatchNo(workOrderId.toString());
|
|
|
financialExpenditure.setFinancialProcessNo(workOrderId.toString());
|
|
|
financialExpenditure.setApplyUser(realName);
|
|
|
financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
|
|
|
financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
|
|
|
- financialExpenditure.setEffectiveTime(DateUtil.format(now,DateUtil.ISO_YEAR_MONTH_FORMAT));
|
|
|
+ financialExpenditure.setEffectiveTime(DateUtil.format(endTime,DateUtil.ISO_YEAR_MONTH_FORMAT));
|
|
|
Integer organId = financialExpenditureDao.getDeptId(pWorkOrderInfo.getDeptId());
|
|
|
Organization organization = organizationDao.get(organId);
|
|
|
if(organization != null){
|
|
@@ -528,6 +538,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
Object o = formData.get(oaInputDto.getModel());
|
|
|
if(Objects.nonNull(o) && StringUtils.isNotEmpty(o.toString())){
|
|
|
financialExpenditure.setAmount(new BigDecimal(Double.parseDouble(o.toString())));
|
|
|
+ financialExpenditure.setCurrentAmount(financialExpenditure.getAmount());
|
|
|
continue;
|
|
|
}
|
|
|
}else if(name.contains("情况说明")){
|
|
@@ -621,6 +632,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if(Objects.nonNull(o) && StringUtils.isNotEmpty(o.toString())){
|
|
|
financialExpenditure.setAmount(new BigDecimal(Double.parseDouble(o.toString())));
|
|
|
+ financialExpenditure.setCurrentAmount(financialExpenditure.getAmount());
|
|
|
continue;
|
|
|
}
|
|
|
}
|