| @@ -63,7 +63,7 @@ public class WxFlowAbleController extends BaseController { | |||||
| /** | /** | ||||
| * 我的申请列表 | * 我的申请列表 | ||||
| */ | */ | ||||
| @ApiOperation("用户代办列表") | |||||
| @ApiOperation("我的申请列表") | |||||
| @GetMapping(value = "/myApplyList") | @GetMapping(value = "/myApplyList") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @@ -27,6 +27,11 @@ public class WxFlowRecord implements Serializable { | |||||
| private String taskKey; // key | private String taskKey; // key | ||||
| private String taskName;// 名称 | private String taskName;// 名称 | ||||
| private Integer currStatus;// 当前状态 | private Integer currStatus;// 当前状态 | ||||
| private String variables;// 流程附加值 | |||||
| private String contractType; | |||||
| private String contractNumber; | |||||
| private Integer endProperty; | |||||
| @Transient | @Transient | ||||
| protected List<Long> ids; | protected List<Long> ids; | ||||
| @@ -48,6 +53,38 @@ public class WxFlowRecord implements Serializable { | |||||
| this.tenantId = tenantId; | 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() { | public Integer getCurrStatus() { | ||||
| return currStatus; | return currStatus; | ||||
| } | } | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.service.impl; | package com.iformall.service.impl; | ||||
| import com.alibaba.druid.support.json.JSONUtils; | |||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| @@ -96,7 +97,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| Integer flowType = (Integer)mapInfo.get("flowType"); | Integer flowType = (Integer)mapInfo.get("flowType"); | ||||
| List<Map<String,Object>> variables = (List)mapInfo.get("variables"); | List<Map<String,Object>> variables = (List)mapInfo.get("variables"); | ||||
| Boolean supplement = (Boolean)mapInfo.get("supplement"); | Boolean supplement = (Boolean)mapInfo.get("supplement"); | ||||
| Integer contractType = 0; | |||||
| Integer contractType = 0;// 1租赁合同2点位合同3物业合同4点位物业合同 | |||||
| String str = (String)getVariableByKey(variables,"contractType"); | String str = (String)getVariableByKey(variables,"contractType"); | ||||
| if(StringUtils.isNotBlank(str)){ | if(StringUtils.isNotBlank(str)){ | ||||
| contractType = Integer.parseInt(str); | contractType = Integer.parseInt(str); | ||||
| @@ -214,6 +215,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode()); | wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode()); | ||||
| wxFlowRecord.setTaskName("发起"); | wxFlowRecord.setTaskName("发起"); | ||||
| wxFlowRecord.setCurrStatus(EnumRentContractAppStatus.APPLYING.getCode()); | wxFlowRecord.setCurrStatus(EnumRentContractAppStatus.APPLYING.getCode()); | ||||
| wxFlowRecord.setVariables(variablesToJson(variables)); | |||||
| wxFlowRecordService.saveOrUpdate(wxFlowRecord); | wxFlowRecordService.saveOrUpdate(wxFlowRecord); | ||||
| // 给审批人发送代办通知短信 | // 给审批人发送代办通知短信 | ||||
| @@ -229,10 +231,17 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| wxMsgValidationcode.setType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); | wxMsgValidationcode.setType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); | ||||
| wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,content); | wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,content); | ||||
| } | } | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| public String variablesToJson(List<Map<String,Object>> variables){ | |||||
| HashMap<String,Object> map = new HashMap<>(); | |||||
| for (Map<String,Object> mapInfo:variables) { | |||||
| map.put((String)mapInfo.get("key"),mapInfo.get("value")); | |||||
| } | |||||
| return JSONUtils.toJSONString(map); | |||||
| } | |||||
| @Override | @Override | ||||
| public ResultData list(String flowType, Integer pageNum, Integer pageSize,Long userId) { | public ResultData list(String flowType, Integer pageNum, Integer pageSize,Long userId) { | ||||
| List<String> definitionKeyList = new ArrayList<>(); | List<String> definitionKeyList = new ArrayList<>(); | ||||
| @@ -18,10 +18,18 @@ | |||||
| <result column="task_key" property="taskKey" /> | <result column="task_key" property="taskKey" /> | ||||
| <result column="task_name" property="taskName" /> | <result column="task_name" property="taskName" /> | ||||
| <result column="curr_status" property="currStatus" /> | <result column="curr_status" property="currStatus" /> | ||||
| <result column="variables" property="variables" /> | |||||
| <result column="contractType" property="contractType" /> | |||||
| <result column="contractNumber" property="contractNumber" /> | |||||
| <result column="endProperty" property="endProperty" /> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `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 | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||