yzc 1 жил өмнө
parent
commit
1d9d748776

+ 1 - 11
hx-sale/src/main/java/com/fjhx/sale/flow/ContractUpdateFlow.java

@@ -14,7 +14,6 @@ import com.fjhx.common.utils.Assert;
 import com.fjhx.common.utils.ExchangeRateUtil;
 import com.fjhx.common.utils.ExchangeRateUtil;
 import com.fjhx.file.utils.ObsFileUtil;
 import com.fjhx.file.utils.ObsFileUtil;
 import com.fjhx.flow.core.FlowDelegate;
 import com.fjhx.flow.core.FlowDelegate;
-import com.fjhx.flow.entity.flow.po.FlowExample;
 import com.fjhx.flow.enums.FlowStatusEnum;
 import com.fjhx.flow.enums.FlowStatusEnum;
 import com.fjhx.flow.service.flow.FlowExampleService;
 import com.fjhx.flow.service.flow.FlowExampleService;
 import com.fjhx.sale.entity.claim.po.Claim;
 import com.fjhx.sale.entity.claim.po.Claim;
@@ -96,6 +95,7 @@ public class ContractUpdateFlow extends FlowDelegate {
     public Long start(Long flowId, JSONObject submitData) {
     public Long start(Long flowId, JSONObject submitData) {
         ContractDto contract = submitData.toJavaObject(ContractDto.class);
         ContractDto contract = submitData.toJavaObject(ContractDto.class);
 
 
+        contract.setId(null);
         contract.setIssue("1");//默认直接下发到交接单
         contract.setIssue("1");//默认直接下发到交接单
 
 
         contract.setFlowId(flowId);//赋值新合同流程ID
         contract.setFlowId(flowId);//赋值新合同流程ID
@@ -245,16 +245,6 @@ public class ContractUpdateFlow extends FlowDelegate {
             throw new ServiceException("原合同不存在");
             throw new ServiceException("原合同不存在");
         }
         }
 
 
-        //交换流程表中的业务id
-        FlowExample newFlowExample = flowExampleService.getById(flowId);
-        newFlowExample.setBusinessId(oldContractId);
-        flowExampleService.updateById(newFlowExample);
-
-        FlowExample oldFlowExample = flowExampleService.getById(oldContract.getFlowId());
-        oldFlowExample.setBusinessId(businessId);
-        flowExampleService.updateById(oldFlowExample);
-
-
         //替换新数据ID为临时ID
         //替换新数据ID为临时ID
         long temNewId = IdWorker.getId();
         long temNewId = IdWorker.getId();
         Contract temNewUpContract = new Contract();
         Contract temNewUpContract = new Contract();

+ 1 - 1
hx-sale/src/main/java/com/fjhx/sale/service/contract/impl/ContractProductServiceImpl.java

@@ -220,7 +220,7 @@ public class ContractProductServiceImpl extends ServiceImpl<ContractProductMappe
         UserUtil.assignmentNickName(list, ContractProductVo::getSalesmanId, ContractProductVo::setUserName);
         UserUtil.assignmentNickName(list, ContractProductVo::getSalesmanId, ContractProductVo::setUserName);
 
 
         // 赋值流程id
         // 赋值流程id
-        flowExampleService.setFlowId(list, ContractProductVo::getContractId, ContractProductVo::setFlowId);
+//        flowExampleService.setFlowId(list, ContractProductVo::getContractId, ContractProductVo::setFlowId);
 
 
         return page;
         return page;
     }
     }

+ 3 - 1
hx-sale/src/main/resources/mapper/contract/ContractProductMapper.xml

@@ -17,7 +17,8 @@
                     t2.create_user AS salesmanId,
                     t2.create_user AS salesmanId,
                     t2.version AS contractVersion,
                     t2.version AS contractVersion,
                     t1.expend_quantity AS expendQuantity,
                     t1.expend_quantity AS expendQuantity,
-                    ( SELECT create_time FROM claim_contract WHERE contract_id = t2.id ORDER BY create_time DESC LIMIT 1 ) AS claimTime,
+        t2.flow_id,
+        ( SELECT create_time FROM claim_contract WHERE contract_id = t2.id ORDER BY create_time DESC LIMIT 1 ) AS claimTime,
             t2.contract_template_id AS contractTemplateId,
             t2.contract_template_id AS contractTemplateId,
             t1.quantity,
             t1.quantity,
             (
             (
@@ -78,6 +79,7 @@
         t1.expend_quantity AS expendQuantity,
         t1.expend_quantity AS expendQuantity,
         co.create_time AS claimTime,
         co.create_time AS claimTime,
         t2.contract_template_id AS contractTemplateId,
         t2.contract_template_id AS contractTemplateId,
+        t2.flow_id,
         t1.quantity,
         t1.quantity,
         IFNULL(sum( pd.count ),0) AS startPurchaseCount,
         IFNULL(sum( pd.count ),0) AS startPurchaseCount,
         IFNULL( SUM( IFNULL( co.money, 0 ) * IFNULL( arw.rate, 1 )), 0 ) / t2.amount * 100 AS ad,
         IFNULL( SUM( IFNULL( co.money, 0 ) * IFNULL( arw.rate, 1 )), 0 ) / t2.amount * 100 AS ad,