Преглед изворни кода

更新协议费用时不改变原来的创建时间

Qchen пре 1 година
родитељ
комит
af9b8911d4

+ 10 - 10
src/main/java/com/ydtech/modules/inv/service/impl/InvAccountExcelServiceImpl.java

@@ -97,14 +97,14 @@ public class InvAccountExcelServiceImpl extends ServiceImpl<InvAccountExcelMappe
                 }
             }
             record.setPayMethod(a.toString());
-            if (record.getPayoutAmount() == null) {
-                record.setPayoutAmount("0");
-            }
-            double applyAmount = Double.parseDouble(record.getApplyAmount());
-            double payoutAmount = Double.parseDouble(record.getPayoutAmount());
-            if (applyAmount == payoutAmount) {
-                record.setTransferFlag("0");
-            }
+//            if (record.getPayoutAmount() == null) {
+//                record.setPayoutAmount("0");
+//            }
+//            double applyAmount = Double.parseDouble(record.getApplyAmount());
+//            double payoutAmount = Double.parseDouble(record.getPayoutAmount());
+//            if (applyAmount == payoutAmount) {
+//                record.setTransferFlag("0");
+//            }
         }
         invAccountExcelIPage.setRecords(records);
         return HttpResult.ok("", invAccountExcelIPage);
@@ -138,8 +138,8 @@ public class InvAccountExcelServiceImpl extends ServiceImpl<InvAccountExcelMappe
         InvAccountCard enterAccountCard = invAccountCardService.getById(invAccountExcel.getEnterCardNum());
         InvAccount outAccount = insAccountService.getById(outAccountCard.getAccountId());
         InvAccount enterAccount = insAccountService.getById(enterAccountCard.getAccountId());
-        Double applyAmount = Double.parseDouble(invAccountExcel.getApplyAmount());
-        Double payoutAmount1 = Double.parseDouble(invAccountExcel.getPayoutAmount());
+        double applyAmount = Double.parseDouble(invAccountExcel.getApplyAmount());
+        double payoutAmount1 = Double.parseDouble(invAccountExcel.getPayoutAmount());
 
         //判断是转账给内部还是外部
         if (invAccountExcel.getOutFlag().equals("0")) {

+ 3 - 0
src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java

@@ -774,6 +774,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         }
 
         //更新费用主表信息
+        PtlAgreementProductCostsNew ptlAgreementProductCost= ptlAgreementProductCostsNewService.getById(agreementProductCosts.getId());
         PtlAgreementProductCostsNew ptlAgreementProductCostsNew = new PtlAgreementProductCostsNew();
         BeanUtils.copyProperties(agreementProductCosts, ptlAgreementProductCostsNew);
         //修改审核状态为未审核
@@ -781,6 +782,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         String newProjectId = agreementProductCosts.getProductId().get(0);
         String newProjectName = agreementProductCosts.getProductName().get(0);
         ptlAgreementProductCostsNew.setProductId(newProjectId);
+        ptlAgreementProductCostsNew.setCreateTime(ptlAgreementProductCost.getCreateTime());
         ptlAgreementProductCostsNew.setProductName(newProjectName);
         //add by hxl  修改可以更新null值
         //int update = baseMapper.updateById(ptlAgreementProductCostsNew);
@@ -1004,6 +1006,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
             //设置主表信息
             PtlAgreementProductCostsNew ptlAgreementProductCostsNew = baseMapper.selectById(agreementProductCostsCopyVo.getOrgCostsId());
             ptlAgreementProductCostsNew.setAgreementId(agreementProductCostsCopyVo.getNewAgreementId());
+            ptlAgreementProductCostsNew.setCreateTime(new Date().toString());
             BeanUtils.copyProperties(ptlAgreementProductCostsNew, agreementProductCosts);
             agreementProductCosts.getProductId().add(ptlAgreementProductCostsNew.getProductId());
             agreementProductCosts.getProductName().add(ptlAgreementProductCostsNew.getProductName());