|
|
|
@@ -268,7 +268,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
} |
|
|
|
//保存物业合同信息 |
|
|
|
String message; |
|
|
|
boolean hasFlow = true; |
|
|
|
if (record.getId() == null) { |
|
|
|
hasFlow = false; |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
record.setRentalStartDate(wxRentContract.getRentalStartDate()); |
|
|
|
@@ -330,6 +332,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
record.setPrice(record.getPrice() != null ? record.getPrice() : 0); |
|
|
|
record.setDeposit(record.getDeposit() != null ? record.getDeposit() : 0); |
|
|
|
record.setUpdatetime(new Date()); |
|
|
|
if (CollectionUtils.isEmpty(record.getFlowParams())) { |
|
|
|
hasFlow = false; |
|
|
|
record.setApplyStatus(EnumRentContractAppStatus.DEFAULT.getCode()); |
|
|
|
} |
|
|
|
try { |
|
|
|
wxPropertyContractMapper.updateByPrimaryKeySelective(record); |
|
|
|
} catch (Exception e) { |
|
|
|
@@ -340,8 +346,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
message = "更新物业合同信息成功"; |
|
|
|
} |
|
|
|
|
|
|
|
if (record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { |
|
|
|
if (!CollectionUtils.isEmpty(record.getFlowParams())) { |
|
|
|
if (hasFlow) { |
|
|
|
if (record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { |
|
|
|
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null) { |
|
|
|
updatePropertyContractStatus(record.getId()); |
|
|
|
} else { |
|
|
|
@@ -355,10 +361,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
wxPropertyContractMapper.updateStatus(updateRentContract); |
|
|
|
logger.info("id:{},启动审批流成功", record.getId().toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
//有模板,启动审批流,没有,直接生产账单 |
|
|
|
if (!CollectionUtils.isEmpty(record.getFlowParams())) { |
|
|
|
} else { |
|
|
|
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null |
|
|
|
&& record.getMerchantId() != null) { |
|
|
|
wxRentContractService.updateRentContractStatus(record.getId()); |
|
|
|
|