wangyf пре 1 недеља
родитељ
комит
2fec028a27

+ 2 - 2
src/main/java/com/sunxung/factoring/service/acceptancesheet/impl/AcceptanceBasicInfoServiceImpl.java

@@ -1279,7 +1279,7 @@ public class AcceptanceBasicInfoServiceImpl extends ServiceImpl<AcceptanceBasicI
                         .eq(PurchContractApproval::getPurchContractBasicInfoId, purchContractBasicInfo.getId())
                         .orderByDesc(PurchContractApproval::getGmtCreate).last("LIMIT 1"));
         List<FileStorage> purchaseContract;
-        if (purchContractApproval.getSignMode() == 1){
+        if (purchContractApproval.getSignMode() != null && purchContractApproval.getSignMode() == 1){
             purchaseContract = sysAttachmentRefService.getFiles(AttachmentDto.builder()
                     .setChildEnum(FileModuleDict.ChildEnum.PURCHASE_CONTRACT_SIGN_FILE)
                     .setEntityId(purchContractBasicInfo.getId()).build());
@@ -1303,7 +1303,7 @@ public class AcceptanceBasicInfoServiceImpl extends ServiceImpl<AcceptanceBasicI
                             .orderByDesc(PurchContractSupplementApproval::getGmtCreate)
                             .last("LIMIT 1")
                             .one();
-                    if (purchContractSupplementApproval.getSignMode() == 1){
+                    if (purchContractSupplementApproval.getSignMode() != null && purchContractSupplementApproval.getSignMode() == 1){
                         //采购合同变更已签署文件
                         AttachmentDto attachmentDto = AttachmentDto.builder()
                                 .setEntityId(contractSupplementInfo.getId())

+ 1 - 1
src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApprovalServiceImpl.java

@@ -249,7 +249,7 @@ public class PaymentApprovalServiceImpl extends ServiceImpl<PaymentApprovalMappe
                         .eq(PurchContractApproval::getPurchContractBasicInfoId, purchContractBasicInfo.getId())
                         .orderByDesc(PurchContractApproval::getGmtCreate).last("LIMIT 1"));
         List<FileStorage> purchaseContract;
-        if (purchContractApproval.getSignMode() == 1){
+        if (purchContractApproval.getSignMode() != null && purchContractApproval.getSignMode() == 1){
             purchaseContract = sysAttachmentRefService.getFiles(AttachmentDto.builder()
                     .setChildEnum(FileModuleDict.ChildEnum.PURCHASE_CONTRACT_SIGN_FILE)
                     .setEntityId(purchContractBasicInfo.getId()).build());

+ 1 - 1
src/main/java/com/sunxung/factoring/service/fundmanagement/impl/FinancialInstitutionServiceImpl.java

@@ -755,7 +755,7 @@ public class FinancialInstitutionServiceImpl extends ServiceImpl<FinancialInstit
                                     .eq(PurchContractApproval::getPurchContractBasicInfoId, purchContractBasicInfo.getId())
                                     .orderByDesc(PurchContractApproval::getGmtCreate).last("LIMIT 1"));
                     List<FileStorage> purchaseContract;
-                    if (purchContractApproval.getSignMode() == 1){
+                    if (purchContractApproval.getSignMode() != null && purchContractApproval.getSignMode() == 1){
                         purchaseContractFileList = sysAttachmentRefService.getFiles(AttachmentDto.builder()
                                 .setChildEnum(FileModuleDict.ChildEnum.PURCHASE_CONTRACT_SIGN_FILE)
                                 .setEntityId(purchContractBasicInfo.getId()).build());

+ 2 - 2
src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceApprovalServiceImpl.java

@@ -448,7 +448,7 @@ public class InvoiceApprovalServiceImpl extends ServiceImpl<InvoiceApprovalMappe
                         .eq(PurchContractApproval::getPurchContractBasicInfoId, purchContractBasicInfo.getId())
                         .orderByDesc(PurchContractApproval::getGmtCreate).last("LIMIT 1"));
         List<FileStorage> purchaseContract;
-        if (purchContractApproval.getSignMode() == 1){
+        if (purchContractApproval.getSignMode() != null && purchContractApproval.getSignMode() == 1){
             purchaseContract = sysAttachmentRefService.getFiles(AttachmentDto.builder()
                     .setChildEnum(FileModuleDict.ChildEnum.PURCHASE_CONTRACT_SIGN_FILE)
                     .setEntityId(purchContractBasicInfo.getId()).build());
@@ -471,7 +471,7 @@ public class InvoiceApprovalServiceImpl extends ServiceImpl<InvoiceApprovalMappe
                             .orderByDesc(PurchContractSupplementApproval::getGmtCreate)
                             .last("LIMIT 1")
                             .one();
-                    if (purchContractSupplementApproval.getSignMode() == 1){
+                    if (purchContractSupplementApproval.getSignMode() != null && purchContractSupplementApproval.getSignMode() == 1){
                         //采购合同变更已签署文件
                         AttachmentDto attachmentDto = AttachmentDto.builder()
                                 .setEntityId(contractSupplementInfo.getId())

+ 4 - 5
src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractApprovalServiceImpl.java

@@ -153,8 +153,7 @@ public class PurchContractApprovalServiceImpl extends ServiceImpl<PurchContractA
             throw new BusinessException(CodeUtil.FAIL, "获取不到对应采购合同审批信息");
         }
         PurchContractApprovalVo purchContractApprovalVo = new PurchContractApprovalVo();
-
-        if (purchContractApproval.getSignMode() == 1){
+        if (purchContractApproval.getSignMode() != null && purchContractApproval.getSignMode() == 1){
             AttachmentDto attachmentDto = AttachmentDto.builder()
                     .setEntityId(purchContractApproval.getId())
                     .setChildEnum(FileModuleDict.ChildEnum.PURCHASE_CONTRACT_FILE_view)
@@ -322,7 +321,7 @@ public class PurchContractApprovalServiceImpl extends ServiceImpl<PurchContractA
 
 
         if (purchContractApproval.getId() != null) {
-            if (purchContractApproval.getSignMode() == 1){
+            if (purchContractApproval.getSignMode() != null && purchContractApproval.getSignMode() == 1){
                 AttachmentDto attachmentDto = AttachmentDto.builder()
                         .setEntityId(purchContractApproval.getId())
                         .setChildEnum(FileModuleDict.ChildEnum.PURCHASE_CONTRACT_FILE_view)
@@ -677,7 +676,7 @@ public class PurchContractApprovalServiceImpl extends ServiceImpl<PurchContractA
 
             String result = "";
             if (purchContractApproval.getApprovalConclusion().equals(ConstantConversionUtil.APPROVAL_RESULT_PASS)) {
-                if (purchContractApproval.getSignMode() == 1) {
+                if (purchContractApproval.getSignMode() != null && purchContractApproval.getSignMode() == 1) {
                     result = "签署";
                 } else {
                     result = "通过";
@@ -763,7 +762,7 @@ public class PurchContractApprovalServiceImpl extends ServiceImpl<PurchContractA
                     || StringUtil.isEmpty(purchContractDeliverClause.getDeliverMethod()) || StringUtil.isEmpty(purchContractDeliverClause.getTransportPremium())) {
                 throw new ValidatorException(CodeUtil.FAIL, "交货规定信息不全,请补全!");
             }
-            if (purchContractApprovalVo.getPurchContractApproval().getSignMode() == 0 && CollectionUtil.isEmpty(purchContractApprovalVo.getPurchContractApproval().getFileIds())) {
+            if (purchContractApprovalVo.getPurchContractApproval().getSignMode() != null && purchContractApprovalVo.getPurchContractApproval().getSignMode() == 0 && CollectionUtil.isEmpty(purchContractApprovalVo.getPurchContractApproval().getFileIds())) {
                 throw new ValidatorException(CodeUtil.FAIL, "请上传线下签署的文件!");
             }
 

+ 1 - 1
src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractServiceImpl.java

@@ -641,7 +641,7 @@ public class PurchContractServiceImpl extends ServiceImpl<PurchContractMapper, P
                         .orderByDesc(PurchContractSupplementApproval::getGmtCreate)
                         .last("LIMIT 1")
                         .one();
-                if (purchContractSupplementApproval.getSignMode() == 1){
+                if (purchContractSupplementApproval.getSignMode() != null && purchContractSupplementApproval.getSignMode() == 1){
                     //采购合同变更已签署文件
                     AttachmentDto attachmentDto = AttachmentDto.builder()
                             .setEntityId(contractSupplementInfo.getId())

+ 1 - 1
src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractSignConclusionServiceImpl.java

@@ -390,7 +390,7 @@ public class PurchContractSignConclusionServiceImpl extends ServiceImpl<PurchCon
                         .orderByDesc(PurchContractSupplementApproval::getGmtCreate)
                         .last("LIMIT 1")
                         .one();
-                if (purchContractSupplementApproval.getSignMode() == 1){
+                if (purchContractSupplementApproval.getSignMode() != null && purchContractSupplementApproval.getSignMode() == 1){
                     //采购合同变更已签署文件
                     AttachmentDto attachmentDto = AttachmentDto.builder()
                             .setEntityId(contractSupplementInfo.getId())

+ 5 - 5
src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractSupplementApprovalServiceImpl.java

@@ -129,7 +129,7 @@ public class PurchContractSupplementApprovalServiceImpl extends ServiceImpl<Purc
             purchContractSupplementApproval.setComments(comments);
         }
 
-        if (purchContractSupplementApproval.getSignMode() == 1){
+        if (purchContractSupplementApproval.getSignMode() != null && purchContractSupplementApproval.getSignMode() == 1){
             //系统制作的文件
             AttachmentDto attachmentDto = AttachmentDto.builder()
                     .setEntityId(id)
@@ -220,7 +220,7 @@ public class PurchContractSupplementApprovalServiceImpl extends ServiceImpl<Purc
         }
 
         if (approval.getApprovalConclusion().equals(ConstantConversionUtil.APPROVAL_RESULT_PASS)) {
-            if (approval.getSignMode() == 1){
+            if (approval.getSignMode() != null && approval.getSignMode() == 1){
                 //制作采购合同补充合同
                 FileStorage supplementContract = supplementInfoService.makeContract(approval);
                 fileStorageService.saveAttachmentRefByFileStorage(supplementContract, FileModuleDict.ChildEnum.PURCHASE_CONTRACT_SUPPLEMENT_MAKE_FILE, approval.getId());
@@ -272,7 +272,7 @@ public class PurchContractSupplementApprovalServiceImpl extends ServiceImpl<Purc
             }
 
         } else if (approval.getApprovalConclusion().equals(ConstantConversionUtil.APPROVAL_RESULT_PASS)) {
-            if (approval.getSignMode() == 1){
+            if (approval.getSignMode() != null && approval.getSignMode() == 1){
                 String assigneeKey = ConstantUtil.PURCH_CONTRACT_CHANGE_SIGN_CONFIRM + ConstantUtil.ASSIGNEE;
                 result = "线上";
                 //供应商签署
@@ -363,7 +363,7 @@ public class PurchContractSupplementApprovalServiceImpl extends ServiceImpl<Purc
                     });
                 }
 
-                if (approval.getSignMode() == 0 && CollectionUtil.isEmpty(approval.getFileIds())){
+                if (approval.getSignMode() != null && approval.getSignMode() == 0 && CollectionUtil.isEmpty(approval.getFileIds())){
                     //签署方式为线下签署时校验是否上传线下签署文件
                     throw new ValidatorException(CodeUtil.FAIL,"线下签署的文件不能为空!");
                 }
@@ -407,7 +407,7 @@ public class PurchContractSupplementApprovalServiceImpl extends ServiceImpl<Purc
                 supplementApproval.setComments(commentStrs);
             }
 
-            if (supplementApproval.getSignMode() == 1){
+            if (supplementApproval.getSignMode() != null && supplementApproval.getSignMode() == 1){
                 //系统制作的文件
                 AttachmentDto attachmentDto = AttachmentDto.builder()
                         .setEntityId(supplementApproval.getId())