|
@@ -6,6 +6,9 @@ import com.google.common.collect.Lists;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.jeecg.common.dto.archives.ExpensePriceReqDTO;
|
|
|
import org.jeecg.common.dto.archives.ExpensePriceRespDTO;
|
|
|
+import org.jeecg.common.dto.payment.FinanceListEditReqDTO;
|
|
|
+import org.jeecg.common.dto.payment.FinanceListReqDTO;
|
|
|
+import org.jeecg.common.dto.payment.FinanceListRespDTO;
|
|
|
import org.jeecg.common.dto.payment.ProjectArchiveReqDTO;
|
|
|
import org.jeecg.common.dto.payment.ProjectArchiveRespDTO;
|
|
|
import org.jeecg.common.dto.payment.SlipAddReqDTO;
|
|
@@ -167,6 +170,62 @@ public class ManagerPaymentAndReceiptSlipServiceImpl extends ServiceImpl<Manager
|
|
|
return managerPaymentAndReceiptSlipMapper.getSlipPrice(reqDTO);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc 财务收款确认列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<FinanceListRespDTO> getFinanceList(FinanceListReqDTO reqDTO) {
|
|
|
+ return managerPaymentAndReceiptSlipMapper.getFinanceList(reqDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc 修改财务收款确认列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void editFinanceList(FinanceListEditReqDTO reqDTO) {
|
|
|
+ //修改总金额
|
|
|
+ ManagerPaymentAndReceiptSlip managerPaymentAndReceiptSlip = managerPaymentAndReceiptSlipMapper.selectById(reqDTO.getId());
|
|
|
+ ManagePaymentAndReceiptContent managePaymentAndReceiptContent = managePaymentAndReceiptContentService.getById(reqDTO.getContentId());
|
|
|
+ BigDecimal totalPrice = managerPaymentAndReceiptSlip.getTotalPrice().subtract(managePaymentAndReceiptContent.getCoPrvice()).add(reqDTO.getCoPrvice());
|
|
|
+ managerPaymentAndReceiptSlip.setTotalPrice(totalPrice);
|
|
|
+ managerPaymentAndReceiptSlipMapper.updateById(managerPaymentAndReceiptSlip);
|
|
|
+
|
|
|
+ // 修改子表
|
|
|
+ ManagePaymentAndReceiptContent content = new ManagePaymentAndReceiptContent(reqDTO);
|
|
|
+ managePaymentAndReceiptContentService.updateById(content);
|
|
|
+
|
|
|
+ //获取项目档案里程碑数据
|
|
|
+ List<ProjectManageArchivesAndBusiness> businesses = projectManageArchivesAndBusinessService.list(new LambdaQueryWrapper<ProjectManageArchivesAndBusiness>()
|
|
|
+ .eq(ProjectManageArchivesAndBusiness::getDelFlag, "0").in(ProjectManageArchivesAndBusiness::getPlanType, new String[]{"2","4"}));
|
|
|
+ Map<String, List<ProjectManageArchivesAndBusiness>> businessMap = businesses.stream().collect(Collectors.groupingBy(t -> t.getId()));
|
|
|
+ List<ProjectManageArchivesAndBusiness> archivesAndBusinesses = businessMap.get(managePaymentAndReceiptContent.getCoArchivesId());
|
|
|
+ if(!CollectionUtils.isEmpty(archivesAndBusinesses)){
|
|
|
+ for(ProjectManageArchivesAndBusiness business : archivesAndBusinesses){
|
|
|
+ if(business.getMilestone1().equals(reqDTO.getProArchivesMilestone())){
|
|
|
+ business.setDesc1(reqDTO.getCoPrvice().toPlainString());
|
|
|
+ projectManageArchivesAndBusinessService.updateById(business);
|
|
|
+ }
|
|
|
+ if(business.getMilestone2().equals(reqDTO.getProArchivesMilestone())){
|
|
|
+ business.setDesc2(reqDTO.getCoPrvice().toPlainString());
|
|
|
+ projectManageArchivesAndBusinessService.updateById(business);
|
|
|
+ }
|
|
|
+ if(business.getMilestone3().equals(reqDTO.getProArchivesMilestone())){
|
|
|
+ business.setDesc3(reqDTO.getCoPrvice().toPlainString());
|
|
|
+ projectManageArchivesAndBusinessService.updateById(business);
|
|
|
+ }
|
|
|
+ if(business.getMilestone4().equals(reqDTO.getProArchivesMilestone())){
|
|
|
+ business.setDesc4(reqDTO.getCoPrvice().toPlainString());
|
|
|
+ projectManageArchivesAndBusinessService.updateById(business);
|
|
|
+ }
|
|
|
+ if(business.getMilestone5().equals(reqDTO.getProArchivesMilestone())){
|
|
|
+ business.setDesc5(reqDTO.getCoPrvice().toPlainString());
|
|
|
+ projectManageArchivesAndBusinessService.updateById(business);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -196,7 +255,7 @@ public class ManagerPaymentAndReceiptSlipServiceImpl extends ServiceImpl<Manager
|
|
|
managePaymentAndReceiptContentService.update(new ManagePaymentAndReceiptContent("1"), queryWrapper);
|
|
|
|
|
|
//删除回写金额(暂不使用)
|
|
|
-// deleteReWriterProArchvicePrice(contents);
|
|
|
+ deleteReWriterProArchvicePrice(contents);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -261,7 +320,7 @@ public class ManagerPaymentAndReceiptSlipServiceImpl extends ServiceImpl<Manager
|
|
|
list.add(content);
|
|
|
|
|
|
//回写项目档案里程碑信息表的金额 (暂不使用)
|
|
|
-// reWriterProArchvicePrice(reqDTO, businessMap);
|
|
|
+ reWriterProArchvicePrice(reqDTO, businessMap);
|
|
|
|
|
|
}
|
|
|
managePaymentAndReceiptContentService.saveBatch(list);
|