From e76e1ac6d2905aae6f41c9a45264e35a003743f2 Mon Sep 17 00:00:00 2001 From: luozukai Date: Wed, 20 Feb 2019 16:39:36 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=A1=E6=89=B9=E6=B5=81][=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0][=E6=B7=BB=E5=8A=A0=E5=90=88=E5=90=8C=E6=8F=90?= =?UTF-8?q?=E5=89=8D=E7=BB=88=E6=AD=A2=E5=AE=A1=E6=89=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxFlowAbleController.java | 2 +- .../com/iformall/domain/po/WxFlowRecord.java | 37 +++++++++++++++++++ .../service/impl/WxFlowServiceImpl.java | 13 ++++++- .../resources/mapper/WxFlowRecordMapper.xml | 10 ++++- 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java index 051b60789..4822f1791 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java @@ -50,7 +50,7 @@ public class WxFlowAbleController extends BaseController { /** * 我的申请列表 */ - @ApiOperation("用户代办列表") + @ApiOperation("我的申请列表") @GetMapping(value = "/myApplyList") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java b/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java index 63f5d7b10..be494c6ce 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java @@ -27,6 +27,11 @@ public class WxFlowRecord implements Serializable { private String taskKey; // key private String taskName;// 名称 private Integer currStatus;// 当前状态 + private String variables;// 流程附加值 + + private String contractType; + private String contractNumber; + private Integer endProperty; @Transient protected List ids; @@ -48,6 +53,38 @@ public class WxFlowRecord implements Serializable { this.tenantId = tenantId; } + public String getVariables() { + return variables; + } + + public void setVariables(String variables) { + this.variables = variables; + } + + public String getContractType() { + return contractType; + } + + public void setContractType(String contractType) { + this.contractType = contractType; + } + + public String getContractNumber() { + return contractNumber; + } + + public void setContractNumber(String contractNumber) { + this.contractNumber = contractNumber; + } + + public Integer getEndProperty() { + return endProperty; + } + + public void setEndProperty(Integer endProperty) { + this.endProperty = endProperty; + } + public Integer getCurrStatus() { return currStatus; } 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 49c413c70..49c4f3494 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -1,5 +1,6 @@ package com.iformall.service.impl; +import com.alibaba.druid.support.json.JSONUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.iformall.common.ErrorCode; @@ -96,7 +97,7 @@ public class WxFlowServiceImpl implements WxFlowService { Integer flowType = (Integer)mapInfo.get("flowType"); List> variables = (List)mapInfo.get("variables"); Boolean supplement = (Boolean)mapInfo.get("supplement"); - Integer contractType = 0; + Integer contractType = 0;// 1租赁合同2点位合同3物业合同4点位物业合同 String str = (String)getVariableByKey(variables,"contractType"); if(StringUtils.isNotBlank(str)){ contractType = Integer.parseInt(str); @@ -214,6 +215,7 @@ public class WxFlowServiceImpl implements WxFlowService { wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode()); wxFlowRecord.setTaskName("发起"); wxFlowRecord.setCurrStatus(EnumRentContractAppStatus.APPLYING.getCode()); + wxFlowRecord.setVariables(variablesToJson(variables)); wxFlowRecordService.saveOrUpdate(wxFlowRecord); // 给审批人发送代办通知短信 @@ -229,10 +231,17 @@ public class WxFlowServiceImpl implements WxFlowService { wxMsgValidationcode.setType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,content); } - return new ResultData(); } + public String variablesToJson(List> variables){ + HashMap map = new HashMap<>(); + for (Map mapInfo:variables) { + map.put((String)mapInfo.get("key"),mapInfo.get("value")); + } + return JSONUtils.toJSONString(map); + } + @Override public ResultData list(String flowType, Integer pageNum, Integer pageSize,Long userId) { List definitionKeyList = new ArrayList<>(); diff --git a/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml b/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml index adafef712..643cdc5bf 100644 --- a/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml @@ -18,10 +18,18 @@ + + + + + - `id`,`business_id`,`business_type`,`user_id`,`remark`,`status`,`task_id`,`process_instance_id`,`create_date`,`update_date`,`tenant_id`,`user_name`,task_key,task_name,curr_status + `id`,`business_id`,`business_type`,`user_id`,`remark`,`status`,`task_id`,`process_instance_id`,`create_date`,`update_date`,`tenant_id`,`user_name`,task_key,task_name,curr_status, + REPLACE (JSON_EXTRACT(variables,'$.contractType'),'"','') contractType, + REPLACE (JSON_EXTRACT(variables,'$.endProperty'),'"','') endProperty, + REPLACE (JSON_EXTRACT(variables,'$.contractNumber'),'"','') contractNumber