소스 검색

合同线下签署逻辑优化

liuj 2 일 전
부모
커밋
98a2129e6f
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      src/main/java/com/sunxung/factoring/service/financing/contract/impl/ContractMakingServiceImpl.java

+ 6 - 3
src/main/java/com/sunxung/factoring/service/financing/contract/impl/ContractMakingServiceImpl.java

@@ -804,14 +804,17 @@ public class ContractMakingServiceImpl implements ContractMakingService {
             Map<String, Object> procVariables = new HashMap<>();
             String key = ConstantUtil.FINANCING_APPLY;
             CFinancingBasicInfo financingBasicInfo = financingBasicInfoService.getById(quotaDisburse.getFinancingBasicInfoId());
-            Long assigneeId = assigneeService.getIdByBusiness(financingBasicInfo.getId(), key, ConstantUtil.ASSIGNEE_C_SUPPLIER);
+
             if (contractInfo.getConclusion().equals(ConstantConversionUtil.APPROVAL_RESULT_PASS)) {
                 //修改融资申请当前阶段
                 financingBasicInfo.setCurrentStage(FinancingCurrentStageEnum.CONTRACT_SIGNING.getCode());
                 financingBasicInfoService.updateById(financingBasicInfo);
+                if (contractInfo.getContractSignMethod() != null && contractInfo.getContractSignMethod().equals(0)) {
+                    //如果是线下签
+                    procVariables.put(ConstantUtil.PAYMENT_APPLY_ASSIGNEE, assigneeService.getIdByBusiness(financingBasicInfo.getId(), key, ConstantUtil.ASSIGNEE_PROJECT_MANAGER));
+                } else if (contractInfo.getContractSignMethod().equals(1)) {
+                    procVariables.put(ConstantUtil.CONTRACT_SIGNING_ASSIGNEE, assigneeService.getIdByBusiness(financingBasicInfo.getId(), key, ConstantUtil.ASSIGNEE_C_SUPPLIER));
 
-                procVariables.put(ConstantUtil.CONTRACT_SIGNING_ASSIGNEE, assigneeId);
-                if (contractInfo.getContractSignMethod().equals(1)) {
                     List<String> electronicSigns = contractInfo.getElectronicSign();
                     if (electronicSigns != null && !electronicSigns.isEmpty()) {
                         //制作电子签合同