|
|
|
@@ -354,11 +354,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
// 启动审批流 |
|
|
|
if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ |
|
|
|
updateRentContractStatus(record.getId()); |
|
|
|
}else{ |
|
|
|
if(record.getFlowParams() != null) { |
|
|
|
//有模板,启动审批流,没有,直接生产账单 |
|
|
|
if (!CollectionUtils.isEmpty(record.getFlowParams())){ |
|
|
|
if(wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ |
|
|
|
updateRentContractStatus(record.getId()); |
|
|
|
}else{ |
|
|
|
record.getFlowParams().put("businessId", record.getId().toString()); |
|
|
|
if (record.getMerchantId() != null) { |
|
|
|
record.getFlowParams().put("supplement", true); //设置补录 |
|
|
|
@@ -410,11 +410,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//启动审批流 |
|
|
|
if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ |
|
|
|
updateRentContractStatus(record.getId()); |
|
|
|
}else{ |
|
|
|
if(record.getFlowParams() != null) { |
|
|
|
//有模板,启动审批流,没有,直接生产账单 |
|
|
|
if (!CollectionUtils.isEmpty(record.getFlowParams())) { |
|
|
|
if(wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ |
|
|
|
updateRentContractStatus(record.getId()); |
|
|
|
}else{ |
|
|
|
record.getFlowParams().put("businessId", record.getId().toString()); |
|
|
|
if (record.getMerchantId() != null) { |
|
|
|
record.getFlowParams().put("supplement", true); //设置补录 |
|
|
|
@@ -430,6 +430,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 保存调整金额(预账单调整) |
|
|
|
if(!CollectionUtils.isEmpty(record.getPreviewBillRentList())){ |
|
|
|
wxBillRentMapper.updateBills(record.getPreviewBillRentList()); |
|
|
|
@@ -1299,12 +1300,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
if (resultData.code != Result.SUCCESS) { |
|
|
|
return resultData; |
|
|
|
} |
|
|
|
//启动审批流 |
|
|
|
//判断是否配置模板 |
|
|
|
if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ |
|
|
|
updateRentContractStatus(record.getId()); |
|
|
|
}else{ |
|
|
|
if(record.getFlowParams() != null) { |
|
|
|
|
|
|
|
//有模板,启动审批流,没有,直接生产账单 |
|
|
|
if (!CollectionUtils.isEmpty(record.getFlowParams())) { |
|
|
|
if(wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ |
|
|
|
updateRentContractStatus(record.getId()); |
|
|
|
}else{ |
|
|
|
record.getFlowParams().put("businessId", record.getId().toString()); |
|
|
|
if (record.getMerchantId() != null) { |
|
|
|
record.getFlowParams().put("supplement", true); //设置补录 |
|
|
|
@@ -1319,6 +1320,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
logger.info("id:{},启动审批流成功,是否补录:{}", record.getId().toString(), record.getMerchantId() != null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return resultData; |
|
|
|
} |
|
|
|
|
|
|
|
|