Просмотр исходного кода

[审批流][添加][添加合同提前终止审批]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
c3b8f7dbe0
8 измененных файлов: 164 добавлений и 67 удалений
  1. +18
    -3
      mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java
  2. +26
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumFlowRecordStatus.java
  4. +2
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumRentContractAppStatus.java
  5. +15
    -7
      mallinkService/src/main/java/com/iformall/service/WxFlowService.java
  6. +94
    -51
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  7. +4
    -2
      mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml
  8. +4
    -3
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 18
- 3
mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java Просмотреть файл

@@ -1,6 +1,9 @@
package com.iformall.controller; package com.iformall.controller;


import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCUserTags;
import com.iformall.domain.po.WxFlowRecord;
import com.iformall.enums.EnumFlowRecordStatus;
import com.iformall.service.WxFlowService; import com.iformall.service.WxFlowService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
@@ -53,9 +56,11 @@ public class WxFlowAbleController extends BaseController {
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
}) })
public ResultData myApplyList(Integer pageNum, Integer pageSize) {
public ResultData myApplyList(@ModelAttribute WxFlowRecord record, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] FlowAbleController::myApplyList"); logger.debug("[" + getIpAddr() + "] FlowAbleController::myApplyList");
return wxFlowService.myApplyList(pageNum,pageSize,super.getUser().getId(),super.getTenantId());
record.setUserId(super.getUser().getId());
record.setStatus(EnumFlowRecordStatus.NEW.getCode());
return new ResultData(wxFlowService.listAsPage(record,pageNum,pageSize));
} }




@@ -99,10 +104,20 @@ public class WxFlowAbleController extends BaseController {
*/ */
@ApiOperation(value = "驳回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}") @ApiOperation(value = "驳回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}")
@PostMapping(value = "reject") @PostMapping(value = "reject")
public ResultData reject(@RequestBody Map<String, String> params) {
public ResultData reject(@RequestBody Map<String, Object> params) {
return wxFlowService.reject(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId()); return wxFlowService.reject(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId());
} }



/**
* 撤回
*/
@ApiOperation(value = "撤回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}")
@PostMapping(value = "setBack")
public ResultData setBack(@RequestBody Map<String, Object> params) {
return wxFlowService.setBack(params,super.getUser().getId(),super.getUser().getName());
}

/** /**
* 生成流程图 * 生成流程图
* *


+ 26
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java Просмотреть файл

@@ -195,6 +195,32 @@ public class WxRentContract implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams") @io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams")
private Map<String, Object> flowParams; private Map<String, Object> flowParams;


@io.swagger.annotations.ApiModelProperty(value = "装修期开始时间", name = "fixStartDate")
private Date fixStartDate;

@io.swagger.annotations.ApiModelProperty(value = "装修期结束时间", name = "fixEndDate")
private Date fixEndDate;





public Date getFixStartDate() {
return fixStartDate;
}

public void setFixStartDate(Date fixStartDate) {
this.fixStartDate = fixStartDate;
}

public Date getFixEndDate() {
return fixEndDate;
}

public void setFixEndDate(Date fixEndDate) {
this.fixEndDate = fixEndDate;
}

public Map<String, Object> getFlowParams() { public Map<String, Object> getFlowParams() {
return flowParams; return flowParams;
} }


+ 1
- 0
mallinkService/src/main/java/com/iformall/enums/EnumFlowRecordStatus.java Просмотреть файл

@@ -10,6 +10,7 @@ public enum EnumFlowRecordStatus {
REJECT(3, "审批驳回"), REJECT(3, "审批驳回"),
ASSIGNEE(4, "待审批"), ASSIGNEE(4, "待审批"),
CANCLE(5, "合同作废"), CANCLE(5, "合同作废"),
SETBACK(6, "撤回"),
//ADVANCE_END(6, "提前终止"), //ADVANCE_END(6, "提前终止"),
//ADVANCE_END(7, "审批完成"), //ADVANCE_END(7, "审批完成"),
; ;


+ 2
- 1
mallinkService/src/main/java/com/iformall/enums/EnumRentContractAppStatus.java Просмотреть файл

@@ -9,7 +9,8 @@ public enum EnumRentContractAppStatus {
APPLYING(1, "审核中"), APPLYING(1, "审核中"),
FINISH(2, "审核完成"), FINISH(2, "审核完成"),
REJECT(3, "驳回"), REJECT(3, "驳回"),
CANCLE(4,"合同作废")
CANCLE(4,"合同作废"),
SETBACK(5,"撤回")
; ;


public static EnumRentContractAppStatus getEnum(Integer code) { public static EnumRentContractAppStatus getEnum(Integer code) {


+ 15
- 7
mallinkService/src/main/java/com/iformall/service/WxFlowService.java Просмотреть файл

@@ -1,6 +1,9 @@
package com.iformall.service; package com.iformall.service;


import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCarCmdLog;
import com.iformall.domain.po.WxFlowRecord;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Map; import java.util.Map;
@@ -13,10 +16,10 @@ public interface WxFlowService {


/** /**
* 更新业务数据状态 * 更新业务数据状态
* @param businessId
* @param flowType
* @param mapInfo
* @param applyStatus
*/ */
void updateBusinessStatus(Long businessId,Integer flowType,Integer contractType,Integer applyStatus,Boolean supplement);
void updateBusinessStatus(Map<String, Object> mapInfo,Integer applyStatus);


ResultData getTaskStatusList(Long businessId,String tenantId); ResultData getTaskStatusList(Long businessId,String tenantId);


@@ -55,7 +58,14 @@ public interface WxFlowService {
* @param params * @param params
* @return * @return
*/ */
ResultData reject(@RequestBody Map<String, String> params,Long userId,String userName,String tenantId);
ResultData reject(@RequestBody Map<String, Object> params,Long userId,String userName,String tenantId);

/**
* 撤回
* @param params
* @return
*/
ResultData setBack(@RequestBody Map<String, Object> params,Long userId,String userName);


/** /**
* 生成流程图 * 生成流程图
@@ -67,10 +77,8 @@ public interface WxFlowService {


/** /**
* 我的申请列表 * 我的申请列表
* @param pageNum
* @param pageSize * @param pageSize
* @param userId
* @return * @return
*/ */
ResultData myApplyList(Integer pageNum, Integer pageSize,Long userId,String tenantId);
PageInfo<WxFlowRecord> listAsPage(WxFlowRecord record, Integer pageIndex, Integer pageSize);
} }

+ 94
- 51
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Просмотреть файл

@@ -84,15 +84,21 @@ public class WxFlowServiceImpl implements WxFlowService {


/** /**
* 更新业务数据状态 * 更新业务数据状态
* @param businessId 业务id
* @param flowType 1合同审批流 2账单审批流 3终止合同
* @param contractType 1租赁合同 2点位合同wx_rent_contract 3物业wx_property_contract 4点位物业合同
* @param applyStatus 状态
* @param supplement 是否补录
* @param mapInfo
* @param applyStatus
*/ */
@Override @Override
public void updateBusinessStatus(Long businessId,Integer flowType,Integer contractType,Integer applyStatus,Boolean supplement){
logger.info("businessId:{},supplement:{}",businessId.toString(),supplement);
public void updateBusinessStatus(Map<String, Object> mapInfo,Integer applyStatus){
Long businessId = (Long)mapInfo.get("businessId");
Integer flowType = (Integer)mapInfo.get("businessType");
List<Map<String,String>> variables = (List)mapInfo.get("variables");
Boolean supplement = (Boolean)mapInfo.get("supplement");
Integer contractType = 0;
String str = getVariableByKey(variables,"contractType");
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}

if(1 == flowType){ if(1 == flowType){
if(contractType.intValue() == 1 || contractType.intValue() == 2){ if(contractType.intValue() == 1 || contractType.intValue() == 2){
WxRentContract rent = new WxRentContract(); WxRentContract rent = new WxRentContract();
@@ -128,6 +134,13 @@ public class WxFlowServiceImpl implements WxFlowService {
updateRentContract.setId(businessId); updateRentContract.setId(businessId);
updateRentContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); updateRentContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode());
wxRentContractMapper.updateStatus(updateRentContract); wxRentContractMapper.updateStatus(updateRentContract);

//终止租赁合同,同时终止物业合同
String endProperty = getVariableByKey(variables,"endProperty");
if("1".equals(endProperty)){

}
// todo 账单失效
} }
}else if(contractType.intValue() == 3 || contractType.intValue() == 4){ }else if(contractType.intValue() == 3 || contractType.intValue() == 4){
WxPropertyContract wxPropertyContract = new WxPropertyContract(); WxPropertyContract wxPropertyContract = new WxPropertyContract();
@@ -140,6 +153,8 @@ public class WxFlowServiceImpl implements WxFlowService {
updateRentContract.setId(businessId); updateRentContract.setId(businessId);
updateRentContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); updateRentContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode());
wxPropertyContractMapper.updateStatus(updateRentContract); wxPropertyContractMapper.updateStatus(updateRentContract);

// todo 账单失效
} }
} }
} }
@@ -173,13 +188,7 @@ public class WxFlowServiceImpl implements WxFlowService {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getFlowKeyByType(flowType), map); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getFlowKeyByType(flowType), map);
logger.debug("流程启动,流程id:{}",processInstance.getId()); logger.debug("流程启动,流程id:{}",processInstance.getId());


// 合同审核状态改为审核中
Integer contractType = 0;
String str = getVariableByKey(variables,"contractType");
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.APPLYING.getCode(),supplement);
updateBusinessStatus(params,EnumRentContractAppStatus.APPLYING.getCode());


// 保存wx_flow_record表审批记录 // 保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord(); WxFlowRecord wxFlowRecord = new WxFlowRecord();
@@ -191,7 +200,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecord.setUserName(userName); wxFlowRecord.setUserName(userName);
wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode()); wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode());
wxFlowRecord.setTaskName("发起"); wxFlowRecord.setTaskName("发起");
wxFlowRecord.setCurrStatus(EnumFlowRecordStatus.NEW.getCode());
wxFlowRecord.setCurrStatus(EnumRentContractAppStatus.APPLYING.getCode());
wxFlowRecordService.saveOrUpdate(wxFlowRecord); wxFlowRecordService.saveOrUpdate(wxFlowRecord);


// 给审批人发送代办通知短信 // 给审批人发送代办通知短信
@@ -365,7 +374,7 @@ public class WxFlowServiceImpl implements WxFlowService {
taskService.complete(taskId); taskService.complete(taskId);


// 判断流程是否结束,并发送短信通知 // 判断流程是否结束,并发送短信通知
isEndAndSendMsg(mapInfo,taskKey,processInstanceId,tenantId,userName);
boolean end = isEndAndSendMsg(mapInfo,taskKey,processInstanceId,tenantId,userName);


//保存wx_flow_record表审批记录 //保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord(); WxFlowRecord wxFlowRecord = new WxFlowRecord();
@@ -380,9 +389,13 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecord.setTaskName(taskName); wxFlowRecord.setTaskName(taskName);
wxFlowRecord.setTaskKey(taskKey); wxFlowRecord.setTaskKey(taskKey);
wxFlowRecordService.saveOrUpdate(wxFlowRecord); wxFlowRecordService.saveOrUpdate(wxFlowRecord);
//修改记录表当前状态
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumFlowRecordStatus.APPLY.getCode()));


//修改记录表当前状态
if(end){
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumRentContractAppStatus.FINISH.getCode()));
}else{
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumRentContractAppStatus.APPLYING.getCode()));
}
return new ResultData(); return new ResultData();
} }


@@ -392,7 +405,7 @@ public class WxFlowServiceImpl implements WxFlowService {
* @param processInstanceId * @param processInstanceId
* @param tenantId * @param tenantId
*/ */
public void isEndAndSendMsg(Map<String,Object> mapInfo,String taskKey,String processInstanceId,String tenantId,String userName){
public boolean isEndAndSendMsg(Map<String,Object> mapInfo,String taskKey,String processInstanceId,String tenantId,String userName){
// 发送短信 // 发送短信
Map<String,String> msgReplaceMap = new HashedMap(); Map<String,String> msgReplaceMap = new HashedMap();
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode();
@@ -400,7 +413,6 @@ public class WxFlowServiceImpl implements WxFlowService {
MallUserInfo starter = (MallUserInfo)mapInfo.get("starter"); MallUserInfo starter = (MallUserInfo)mapInfo.get("starter");
List<Map<String,String>> taskAssigneeList = (List)mapInfo.get("taskAssignee"); List<Map<String,String>> taskAssigneeList = (List)mapInfo.get("taskAssignee");
Long businessId = (Long)mapInfo.get("businessId"); Long businessId = (Long)mapInfo.get("businessId");
Boolean supplement = (Boolean)mapInfo.get("supplement");


// 判断下个节点是否有设置审批人,没有,直接通过,有,发短信通知 // 判断下个节点是否有设置审批人,没有,直接通过,有,发短信通知
if(!isEnded(processInstanceId)){ if(!isEnded(processInstanceId)){
@@ -409,7 +421,7 @@ public class WxFlowServiceImpl implements WxFlowService {
String assignee = ""; String assignee = "";
List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId); List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId);
for (MallUserInfo mallUserInfo:mallUserInfoList) { for (MallUserInfo mallUserInfo:mallUserInfoList) {
msgReplaceMap.put("userName",mallUserInfo.getName());
msgReplaceMap.put("userName",userName);
msgReplaceMap.put("page",Constant.adminPage); msgReplaceMap.put("page",Constant.adminPage);


assignee += mallUserInfo.getName()+" "; assignee += mallUserInfo.getName()+" ";
@@ -429,20 +441,13 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgValidationcode.setPhone(starter.getPhone()); wxMsgValidationcode.setPhone(starter.getPhone());
wxMsgValidationcode.setType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode()); wxMsgValidationcode.setType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode());
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap);
return false;
}else{ }else{
//继续递归判断 //继续递归判断
isEndAndSendMsg(mapInfo,taskKey,processInstanceId,tenantId,userName);
return isEndAndSendMsg(mapInfo,taskKey,processInstanceId,tenantId,userName);
} }
}else{ }else{
// 完成,修改业务状态
Integer flowType = (Integer)mapInfo.get("flowType");
List<Map<String,String>> variables = (List)mapInfo.get("variables");
Integer contractType = 0;
String str = getVariableByKey(variables,"contractType");
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.FINISH.getCode(),supplement);
updateBusinessStatus(mapInfo,EnumRentContractAppStatus.FINISH.getCode());


// 给发起人发送审批通过消息 // 给发起人发送审批通过消息
msgReplaceMap = new HashedMap(); msgReplaceMap = new HashedMap();
@@ -452,6 +457,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgValidationcode.setPhone(starter.getPhone()); wxMsgValidationcode.setPhone(starter.getPhone());
wxMsgValidationcode.setType(EnumMsgModel.FLOW_PASS_NODIFY.getCode()); wxMsgValidationcode.setType(EnumMsgModel.FLOW_PASS_NODIFY.getCode());
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap);
return true;
} }
} }


@@ -482,17 +488,14 @@ public class WxFlowServiceImpl implements WxFlowService {


@Override @Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
public ResultData reject(Map<String, String> params,Long userId,String userName,String tenantId) {
String taskId = params.get("taskId");
String processInstanceId = params.get("processInstanceId");
String remark = params.get("remark");

public ResultData reject(Map<String, Object> params,Long userId,String userName,String tenantId) {
String taskId = (String)params.get("taskId");
String processInstanceId = (String)params.get("processInstanceId");
String remark = (String)params.get("remark");
Map<String,Object> mapInfo = taskService.getVariables(taskId); Map<String,Object> mapInfo = taskService.getVariables(taskId);
Long businessId = (Long)mapInfo.get("businessId"); Long businessId = (Long)mapInfo.get("businessId");
Integer flowType = (Integer)mapInfo.get("flowType"); Integer flowType = (Integer)mapInfo.get("flowType");
MallUserInfo starter = (MallUserInfo)mapInfo.get("starter"); MallUserInfo starter = (MallUserInfo)mapInfo.get("starter");
List<Map<String,String>> variables = (List)mapInfo.get("variables");
Boolean supplement = (Boolean)mapInfo.get("supplement");


String taskName; String taskName;
String taskKey; String taskKey;
@@ -506,12 +509,9 @@ public class WxFlowServiceImpl implements WxFlowService {
runtimeService.deleteProcessInstance(processInstanceId, "驳回"); runtimeService.deleteProcessInstance(processInstanceId, "驳回");


// 修改合同审核状态为驳回 // 修改合同审核状态为驳回
Integer contractType = 0;
String str = getVariableByKey(variables,"contractType");
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.REJECT.getCode(),supplement);
params.putAll(mapInfo);
params.put("businessType",flowType);
updateBusinessStatus(params,EnumRentContractAppStatus.REJECT.getCode());


//保存wx_flow_record表审批记录 //保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord(); WxFlowRecord wxFlowRecord = new WxFlowRecord();
@@ -543,6 +543,53 @@ public class WxFlowServiceImpl implements WxFlowService {
return new ResultData(); return new ResultData();
} }



@Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
public ResultData setBack(Map<String, Object> params,Long userId,String userName) {
String taskId = (String)params.get("taskId");
String processInstanceId = (String)params.get("processInstanceId");
String remark = (String)params.get("remark");

Map<String,Object> mapInfo = taskService.getVariables(taskId);
Long businessId = (Long)mapInfo.get("businessId");
Integer flowType = (Integer)mapInfo.get("flowType");

String taskName;
String taskKey;
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
if (task == null) {
return new ResultData(ErrorCode.FLOW_INST_NOT_EXIST.getCode(), "任务不存在");
}
taskName = task.getName();
taskKey = task.getTaskDefinitionKey();

runtimeService.deleteProcessInstance(processInstanceId, "撤回");

// 修改合同审核状态为撤回
params.putAll(mapInfo);
params.put("businessType",flowType);
updateBusinessStatus(params,EnumRentContractAppStatus.SETBACK.getCode());

//保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord();
wxFlowRecord.setBusinessId(businessId);
wxFlowRecord.setTaskId(taskId);
wxFlowRecord.setProcessInstanceId(processInstanceId);
wxFlowRecord.setRemark(remark);
wxFlowRecord.setUserId(userId);
wxFlowRecord.setStatus(EnumFlowRecordStatus.SETBACK.getCode());
wxFlowRecord.setBusinessType(flowType);
wxFlowRecord.setUserName(userName);
wxFlowRecord.setTaskKey(taskKey);
wxFlowRecord.setTaskName(taskName);
wxFlowRecordService.saveOrUpdate(wxFlowRecord);
//修改记录表当前状态
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumFlowRecordStatus.SETBACK.getCode()));

return new ResultData();
}

/** /**
* 判断流程是否结束 * 判断流程是否结束
* @param processInstanceId * @param processInstanceId
@@ -603,13 +650,8 @@ public class WxFlowServiceImpl implements WxFlowService {
} }


@Override @Override
public ResultData myApplyList(Integer pageNum, Integer pageSize, Long userId,String tenantId) {
PageHelper.startPage(pageNum, pageSize);
WxFlowRecord flowRecord = new WxFlowRecord();
flowRecord.setUserId(userId);
flowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode());
List<WxFlowRecord> recordList = wxFlowRecordMapper.findList(flowRecord);
return new ResultData(recordList);
public PageInfo<WxFlowRecord> listAsPage(WxFlowRecord record, Integer pageIndex, Integer pageSize) {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFlowRecordMapper.findList(record));
} }


@Override @Override
@@ -666,6 +708,7 @@ public class WxFlowServiceImpl implements WxFlowService {
} }


public static String getVariableByKey(List<Map<String,String>> variables,String key){ public static String getVariableByKey(List<Map<String,String>> variables,String key){
if(variables == null) return null;
for (Map<String,String> map:variables) { for (Map<String,String> map:variables) {
if(map.get("key").equals(key)){ if(map.get("key").equals(key)){
return map.get("value"); return map.get("value");


+ 4
- 2
mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml Просмотреть файл

@@ -13,7 +13,7 @@
<result column="process_instance_id" property="processInstanceId" /> <result column="process_instance_id" property="processInstanceId" />
<result column="create_date" property="createDate" /> <result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" /> <result column="update_date" property="updateDate" />
<result column="tenant_id" property="tenantId" />
<result column="tenant_id" property="tenantId" />
<result column="user_name" property="userName" /> <result column="user_name" property="userName" />
<result column="task_key" property="taskKey" /> <result column="task_key" property="taskKey" />
<result column="task_name" property="taskName" /> <result column="task_name" property="taskName" />
@@ -38,6 +38,9 @@
<if test=" null != status "> <if test=" null != status ">
and `status` = #{status} and `status` = #{status}
</if> </if>
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != ids "> <if test=" null != ids ">
and id in and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -50,7 +53,6 @@
<select id="findList" parameterType="com.iformall.domain.po.WxFlowRecord" resultMap="BaseResultMap"> <select id="findList" parameterType="com.iformall.domain.po.WxFlowRecord" resultMap="BaseResultMap">
select <include refid="allColumns" /> from wx_flow_record select <include refid="allColumns" /> from wx_flow_record
<include refid="dynamicWhereConditions" /> <include refid="dynamicWhereConditions" />
order by createDate desc
</select> </select>






+ 4
- 3
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Просмотреть файл

@@ -38,7 +38,8 @@
<result column="apply_status" jdbcType="INTEGER" property="applyStatus"/> <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/>
<result column="bank_name" jdbcType="VARCHAR" property="bankName"/> <result column="bank_name" jdbcType="VARCHAR" property="bankName"/>
<result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
<result column="fix_start_date" property="fixStartDate"/>
<result column="fix_end_date" property="fixEndDate"/>
</resultMap> </resultMap>
<sql id="allColumns"> <sql id="allColumns">
@@ -46,7 +47,7 @@
`tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`, `tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`,
`brand`,`business_id`,`shop_type`,`shop_id`,`updatetime`,`createtime`,`link_person`,`link_phone`, `brand`,`business_id`,`shop_type`,`shop_id`,`updatetime`,`createtime`,`link_person`,`link_phone`,
`pay_account`,`filename`,`lease`,`type`,`revenue`,`adjust_ratio`,`adjust_period`,`pay_ratio`, `pay_account`,`filename`,`lease`,`type`,`revenue`,`adjust_ratio`,`adjust_period`,`pay_ratio`,
`start_date`,`end_date`,`apply_status`,`bank_name`,`rent_shop_type`
`start_date`,`end_date`,`apply_status`,`bank_name`,`rent_shop_type`,fix_start_date,fix_end_date
</sql> </sql>
@@ -104,7 +105,7 @@
rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName, rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName,
rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type, rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type,
rc.start_date startDate,rc.end_date endDate,br.`name` brandName,rc.apply_status applyStatus,rc.bank_name rc.start_date startDate,rc.end_date endDate,br.`name` brandName,rc.apply_status applyStatus,rc.bank_name
bankName,rc.merchant_id merchantId,rc.rent_shop_type rentShopType
bankName,rc.merchant_id merchantId,rc.rent_shop_type rentShopType,rc.fix_start_date fixStartDate,rc.fix_end_date fixEndDate
from wx_rent_contract rc from wx_rent_contract rc
left join wx_shop s on rc.shop_id=s.id left join wx_shop s on rc.shop_id=s.id
left join wx_mall_floor f on s.floor=f.id left join wx_mall_floor f on s.floor=f.id


Загрузка…
Отмена
Сохранить