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

协议历史记录删除报错

haoyu пре 2 година
родитељ
комит
b93845542c

+ 10 - 7
src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java

@@ -316,6 +316,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         //生成批次ID
         String uuid = UUID.randomUUID().toString();
         ptlAgreementProductCostsNewHistory.setBatch(uuid);
+        ptlAgreementProductCostsNewHistory.setId(null);
         ptlAgreementProductCostsNewHistory.setOperatorType("add");
         ptlAgreementProductCostsNewHistory.setModifier(BaseController.getUser().getId());
         ptlAgreementProductCostsNewHistory.setOperatorTime(LocalDateTime.now());
@@ -342,6 +343,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                 BeanUtils.copyProperties(x, costsAttrLinkHistory);
                 //设置产品费用因子历史记录
                 costsAttrLinkHistory.setBatch(uuid);
+                costsAttrLinkHistory.setId(null);
                 costsAttrLinkHistory.setOperatorType("add");
                 costsAttrLinkHistory.setModifier(BaseController.getUser().getId());
                 costsAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -355,7 +357,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                     BeanUtils.copyProperties(x, costsAttrLinkHistory);
                     //设置产品费用因子历史记录
                     costsAttrLinkHistory.setBatch(uuid);
-
+                    costsAttrLinkHistory.setId(null);
                     costsAttrLinkHistory.setOperatorType("add");
                     costsAttrLinkHistory.setModifier(BaseController.getUser().getId());
                     costsAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -406,7 +408,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         //生成批次ID
         String uuid = UUID.randomUUID().toString();
         ptlAgreementProductCostsNewHistory.setBatch(uuid);
-
+        ptlAgreementProductCostsNewHistory.setId(null);
         ptlAgreementProductCostsNewHistory.setOperatorType("update");
         ptlAgreementProductCostsNewHistory.setModifier(BaseController.getUser().getId());
         ptlAgreementProductCostsNewHistory.setOperatorTime(LocalDateTime.now());
@@ -444,7 +446,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                 PtlAgreementProductCostsAttrLinkHistory costsAttrLinkHistory = new PtlAgreementProductCostsAttrLinkHistory();
                 BeanUtils.copyProperties(x, costsAttrLinkHistory);
                 costsAttrLinkHistory.setBatch(uuid);
-
+                costsAttrLinkHistory.setId(null);
                 costsAttrLinkHistory.setOperatorType("update");
                 costsAttrLinkHistory.setModifier(BaseController.getUser().getId());
                 costsAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -461,7 +463,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                         PtlAgreementProductCostsAttrLinkHistory costsAttrLinkHistory = new PtlAgreementProductCostsAttrLinkHistory();
                         BeanUtils.copyProperties(x, costsAttrLinkHistory);
                         costsAttrLinkHistory.setBatch(uuid);
-
+                        costsAttrLinkHistory.setId(null);
                         costsAttrLinkHistory.setOperatorType("update");
                         costsAttrLinkHistory.setModifier(BaseController.getUser().getId());
                         costsAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -477,7 +479,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                         PtlAgreementProductCostsAttrLinkHistory costsAttrLinkHistory = new PtlAgreementProductCostsAttrLinkHistory();
                         BeanUtils.copyProperties(x, costsAttrLinkHistory);
                         costsAttrLinkHistory.setBatch(uuid);
-
+                        costsAttrLinkHistory.setId(null);
                         costsAttrLinkHistory.setOperatorType("update");
                         costsAttrLinkHistory.setModifier(BaseController.getUser().getId());
                         costsAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -510,7 +512,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         //生成批次ID
         String uuid = UUID.randomUUID().toString();
         ptlAgreementProductCostsNewHistory.setBatch(uuid);
-
+        ptlAgreementProductCostsNewHistory.setId(null);
         ptlAgreementProductCostsNewHistory.setOperatorType("delete");
         ptlAgreementProductCostsNewHistory.setModifier(BaseController.getUser().getId());
         ptlAgreementProductCostsNewHistory.setOperatorTime(LocalDateTime.now());
@@ -527,8 +529,9 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
             PtlAgreementProductCostsAttrLinkHistory costsAttrLinkHistory = new PtlAgreementProductCostsAttrLinkHistory();
             BeanUtils.copyProperties(x, costsAttrLinkHistory);
             //设置产品费用因子历史记录
+            costsAttrLinkHistory.setId(null);
             costsAttrLinkHistory.setBatch(uuid);
-            costsAttrLinkHistory.setOperatorType("add");
+            costsAttrLinkHistory.setOperatorType("delete");
             costsAttrLinkHistory.setModifier(BaseController.getUser().getId());
             costsAttrLinkHistory.setOperatorTime(LocalDateTime.now());
             costsAttrLinkHistories.add(costsAttrLinkHistory);

+ 9 - 8
src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementUndwrtRulesNewServiceImpl.java

@@ -214,7 +214,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
         //生成批次ID
         String uuid = UUID.randomUUID().toString();
         ptlAgreementUndwrtRulesNewHistory.setBatch(uuid);
-
+        ptlAgreementUndwrtRulesNewHistory.setId(null);
         ptlAgreementUndwrtRulesNewHistory.setOperatorType("add");
         ptlAgreementUndwrtRulesNewHistory.setModifier(BaseController.getUser().getId());
         ptlAgreementUndwrtRulesNewHistory.setOperatorTime(LocalDateTime.now());
@@ -236,7 +236,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
                 BeanUtils.copyProperties(x, undwrtRulesAttrLinkHistory);
                 //设置承包规则费用因子历史记录
                 undwrtRulesAttrLinkHistory.setBatch(uuid);
-
+                undwrtRulesAttrLinkHistory.setId(null);
                 undwrtRulesAttrLinkHistory.setOperatorType("add");
                 undwrtRulesAttrLinkHistory.setModifier(BaseController.getUser().getId());
                 undwrtRulesAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -251,7 +251,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
                     BeanUtils.copyProperties(x, undwrtRulesAttrLinkHistory);
                     //设置承包规则费用因子历史记录
                     undwrtRulesAttrLinkHistory.setBatch(uuid);
-
+                    undwrtRulesAttrLinkHistory.setId(null);
                     undwrtRulesAttrLinkHistory.setOperatorType("add");
                     undwrtRulesAttrLinkHistory.setModifier(BaseController.getUser().getId());
                     undwrtRulesAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -280,7 +280,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
         //生成批次ID
         String uuid = UUID.randomUUID().toString();
         ptlAgreementUndwrtRulesNewHistory.setBatch(uuid);
-
+        ptlAgreementUndwrtRulesNewHistory.setId(null);
         ptlAgreementUndwrtRulesNewHistory.setOperatorType("update");
         ptlAgreementUndwrtRulesNewHistory.setModifier(BaseController.getUser().getId());
         ptlAgreementUndwrtRulesNewHistory.setOperatorTime(LocalDateTime.now());
@@ -307,7 +307,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
                 BeanUtils.copyProperties(x, undwrtRulesAttrLinkHistory);
                 //设置承包规则费用因子历史记录
                 undwrtRulesAttrLinkHistory.setBatch(uuid);
-
+                undwrtRulesAttrLinkHistory.setId(null);
                 undwrtRulesAttrLinkHistory.setOperatorType("update");
                 undwrtRulesAttrLinkHistory.setModifier(BaseController.getUser().getId());
                 undwrtRulesAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -324,7 +324,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
                         BeanUtils.copyProperties(x, undwrtRulesAttrLinkHistory);
                         //设置承包规则费用因子历史记录
                         undwrtRulesAttrLinkHistory.setBatch(uuid);
-
+                        undwrtRulesAttrLinkHistory.setId(null);
                         undwrtRulesAttrLinkHistory.setOperatorType("update");
                         undwrtRulesAttrLinkHistory.setModifier(BaseController.getUser().getId());
                         undwrtRulesAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -339,7 +339,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
                         BeanUtils.copyProperties(x, undwrtRulesAttrLinkHistory);
                         //设置承包规则费用因子历史记录
                         undwrtRulesAttrLinkHistory.setBatch(uuid);
-
+                        undwrtRulesAttrLinkHistory.setId(null);
                         undwrtRulesAttrLinkHistory.setOperatorType("update");
                         undwrtRulesAttrLinkHistory.setModifier(BaseController.getUser().getId());
                         undwrtRulesAttrLinkHistory.setOperatorTime(LocalDateTime.now());
@@ -368,7 +368,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
         //生成批次ID
         String uuid = UUID.randomUUID().toString();
         ptlAgreementUndwrtRulesNewHistory.setBatch(uuid);
-
+        ptlAgreementUndwrtRulesNewHistory.setId(null);
         ptlAgreementUndwrtRulesNewHistory.setOperatorType("delete");
         ptlAgreementUndwrtRulesNewHistory.setModifier(BaseController.getUser().getId());
         ptlAgreementUndwrtRulesNewHistory.setOperatorTime(LocalDateTime.now());
@@ -386,6 +386,7 @@ public class PtlAgreementUndwrtRulesNewServiceImpl extends ServiceImpl<PtlAgreem
             BeanUtils.copyProperties(x, costsAttrLinkHistory);
             //设置承包规则费用因子历史记录
             costsAttrLinkHistory.setBatch(uuid);
+            costsAttrLinkHistory.setId(null);
             costsAttrLinkHistory.setOperatorType("add");
             costsAttrLinkHistory.setModifier(BaseController.getUser().getId());
             costsAttrLinkHistory.setOperatorTime(LocalDateTime.now());