|
@@ -14,7 +14,9 @@ import com.fjhx.common.utils.Assert;
|
|
|
import com.fjhx.common.utils.ExchangeRateUtil;
|
|
|
import com.fjhx.file.utils.ObsFileUtil;
|
|
|
import com.fjhx.flow.core.FlowDelegate;
|
|
|
+import com.fjhx.flow.entity.flow.po.FlowExample;
|
|
|
import com.fjhx.flow.enums.FlowStatusEnum;
|
|
|
+import com.fjhx.flow.service.flow.FlowExampleService;
|
|
|
import com.fjhx.sale.entity.claim.po.Claim;
|
|
|
import com.fjhx.sale.entity.claim.po.ClaimContract;
|
|
|
import com.fjhx.sale.entity.contract.dto.ContractDto;
|
|
@@ -75,6 +77,8 @@ public class ContractUpdateFlow extends FlowDelegate {
|
|
|
|
|
|
@Autowired
|
|
|
private ContractShipmentService contractShipmentService;
|
|
|
+ @Autowired
|
|
|
+ private FlowExampleService flowExampleService;
|
|
|
|
|
|
@Override
|
|
|
public String getFlowKey() {
|
|
@@ -240,6 +244,17 @@ public class ContractUpdateFlow extends FlowDelegate {
|
|
|
if (oldContract == null) {
|
|
|
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
|
|
|
long temNewId = IdWorker.getId();
|
|
|
Contract temNewUpContract = new Contract();
|