From 5d689252d7a181026081909599efa7be527729dc Mon Sep 17 00:00:00 2001 From: luozukai Date: Mon, 15 Jul 2019 16:19:59 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=A1=E6=89=B9=E6=B5=81][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E4=BF=AE=E6=94=B9=E6=8B=86=E5=88=86=E7=89=A9?= =?UTF-8?q?=E4=B8=9A=E5=AE=A1=E6=89=B9=E6=B5=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V201907151546__L_FLOW_CONFIG_DATA.sql | 20 +++++++++++++++++++ .../java/com/iformall/enums/EnumFlowKey.java | 16 ++++++++++----- .../service/impl/WxFlowServiceImpl.java | 18 +++++++++++++++-- .../impl/WxRentContractServiceImpl.java | 11 +++++++++- 4 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201907151546__L_FLOW_CONFIG_DATA.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201907151546__L_FLOW_CONFIG_DATA.sql b/mallinkAdmin/src/main/resources/db/migration/V201907151546__L_FLOW_CONFIG_DATA.sql new file mode 100644 index 000000000..11cfd9b4a --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201907151546__L_FLOW_CONFIG_DATA.sql @@ -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); \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumFlowKey.java b/mallinkService/src/main/java/com/iformall/enums/EnumFlowKey.java index a7da5eb57..0cb60cf78 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumFlowKey.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumFlowKey.java @@ -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) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 59d1cd53a..08c85fe0b 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -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; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 206683533..5b81d7aac 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -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 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 tasks = taskService.createTaskQuery() .processDefinitionKeyIn(keyList)