| @@ -0,0 +1,20 @@ | |||
| update wx_flow_config set name = '商铺租金合同签约' where name = '商铺合同签约'; | |||
| update wx_flow_config set name = '多经点位租金合同签约' where name = '多径点位合同签约'; | |||
| update wx_flow_config set name = '商铺租金合同终止' where name = '商铺合同终止'; | |||
| update wx_flow_config set name = '多经点位租金合同终止' where name = '多经点位合同终止'; | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1561009249, '456', '商铺物业合同签约', 13, 0, '2019-06-11 14:02:42', '2019-07-11 21:06:31', 5); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1561009249, '456', '商铺物业合同终止', 14, 0, '2019-06-11 14:02:42', '2019-07-11 21:06:31', 6); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1561009249, '456', '多经点位物业合同签约', 15, 0, '2019-06-11 14:02:42', '2019-07-11 21:06:31', 7); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1561009249, '456', '多经点位物业合同终止', 16, 0, '2019-06-11 14:02:42', '2019-07-11 21:06:31', 8); | |||
| @@ -4,21 +4,27 @@ package com.iformall.enums; | |||
| * Created by luozukai | |||
| * 流程key | |||
| */ | |||
| public enum EnumFlowKey{ | |||
| public enum EnumFlowKey { | |||
| CONTRACT(1, "contract_flow"), //合同审批 | |||
| BILL(2, "end_bill_flow"),//账单审批 | |||
| END_CONTRACT(3, "end_contract_flow"),//终止合同审批 | |||
| NEW_RENT_CONTRACT(4, "商铺合同签约"), | |||
| NEW_SHOP_CONTRACT(5, "多径点位合同签约"), | |||
| NEW_RENT_END_CONTRACT(6, "商铺合同终止"), | |||
| NEW_SHOP_END_CONTRACT(7, "多经点位合同终止"), | |||
| NEW_RENT_CONTRACT(4, "商铺租金合同签约"), | |||
| NEW_SHOP_CONTRACT(5, "多经点位租金合同签约"), | |||
| NEW_RENT_END_CONTRACT(6, "商铺租金合同终止"), | |||
| NEW_SHOP_END_CONTRACT(7, "多经点位租金合同终止"), | |||
| NEW_BILL_CHANGE(8, "账单应收金额变更"), | |||
| NEW_COUPON_UPLINE(9, "有价券审批"), | |||
| NEW_CARD_UPLINE(10, "卡审批"), | |||
| NEW_GROUP_UPLINE(11, "拼团"), | |||
| NEW_PRESS_UPLINE(12, "砍价审批"), | |||
| NEW_PRO_CONTRACT(13, "商铺物业合同签约"), | |||
| NEW_PRO_END(14, "商铺物业合同终止"), | |||
| NEW_PRO_POINT_CONTRACT(15, "多经点位物业合同签约"), | |||
| NEW_PRO_POINT_CONTRACT_END(16, "多经点位物业合同终止"), | |||
| ; | |||
| public static EnumFlowKey getEnum(Integer code) { | |||
| @@ -122,7 +122,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| contractType = Integer.parseInt(str); | |||
| } | |||
| if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)){ | |||
| if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || | |||
| EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType) || | |||
| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)|| | |||
| EnumFlowKey.NEW_PRO_CONTRACT.getCode().equals(flowType)|| | |||
| EnumFlowKey.NEW_PRO_POINT_CONTRACT.getCode().equals(flowType) | |||
| ){ | |||
| // 1租赁合同 2点位合同 3物业 4点位物业合同 5 合并合同-店铺 6 合并合同-多经点位 | |||
| if (EnumFlowContractType.RENT.getCode().equals(contractType) || | |||
| EnumFlowContractType.RENT_POINT.getCode().equals(contractType) || | |||
| @@ -150,7 +155,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| wxPropertyContractService.updatePropertyContractStatus(businessId); | |||
| } | |||
| } | |||
| }else if(EnumFlowKey.END_CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)){ | |||
| }else if(EnumFlowKey.END_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_PRO_END.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_PRO_POINT_CONTRACT_END.getCode().equals(flowType) | |||
| ){ | |||
| if(EnumFlowContractType.RENT.getCode().equals(contractType) || EnumFlowContractType.RENT_POINT.getCode().equals(contractType) ){ | |||
| WxRentContract rent = new WxRentContract(); | |||
| rent.setId(businessId); | |||
| @@ -459,6 +469,10 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| || EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_PRO_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_PRO_POINT_CONTRACT.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_PRO_END.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_PRO_POINT_CONTRACT_END.getCode().equals(flowType) | |||
| ){ | |||
| return true; | |||
| } | |||
| @@ -510,7 +510,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| } | |||
| } | |||
| if (StringUtils.isNotEmpty(record.getDepositStr())) { | |||
| record.setDeposit(new BigDecimal(record.getDepositStr()).multiply(new BigDecimal(100)).longValue()); | |||
| } else { | |||
| @@ -747,6 +746,10 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| //结束审批流 by luozukai | |||
| WxFlowModel flowModel = wxFlowService.getModelByType(EnumFlowKey.NEW_RENT_CONTRACT.getCode().intValue(),record.getTenantId()); | |||
| WxFlowModel flowModelPoint = wxFlowService.getModelByType(EnumFlowKey.NEW_SHOP_CONTRACT.getCode().intValue(),record.getTenantId()); | |||
| WxFlowModel flowModel_pro = wxFlowService.getModelByType(EnumFlowKey.NEW_PRO_CONTRACT.getCode().intValue(),record.getTenantId()); | |||
| WxFlowModel flowModelPoint_pro = wxFlowService.getModelByType(EnumFlowKey.NEW_PRO_POINT_CONTRACT.getCode().intValue(),record.getTenantId()); | |||
| List<String> keyList = new ArrayList<>(); | |||
| if(flowModel != null){ | |||
| keyList.add(flowModel.getFlowId()); | |||
| @@ -754,6 +757,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| if(flowModelPoint != null){ | |||
| keyList.add(flowModelPoint.getFlowId()); | |||
| } | |||
| if(flowModel_pro != null){ | |||
| keyList.add(flowModel_pro.getFlowId()); | |||
| } | |||
| if(flowModelPoint_pro != null){ | |||
| keyList.add(flowModelPoint_pro.getFlowId()); | |||
| } | |||
| keyList.add(EnumFlowKey.CONTRACT.getMessage()); | |||
| List<Task> tasks = taskService.createTaskQuery() | |||
| .processDefinitionKeyIn(keyList) | |||