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

[集团版][修改]:集团版预处理

release_toaliyun_real
Stormeye Wu 6 лет назад
Родитель
Сommit
0fedc52ff1
13 измененных файлов: 101 добавлений и 79 удалений
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/car/WxCarController.java
  2. +7
    -5
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  3. +8
    -12
      mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java
  4. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/log/SystemLogAspect.java
  5. +12
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java
  6. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/base/BaseTenantEntity.java
  7. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/base/TenantEntity.java
  8. +10
    -0
      mallinkService/src/main/java/com/iformall/domain/po/msg/BaseMsg.java
  9. +9
    -8
      mallinkService/src/main/java/com/iformall/service/WxFlowService.java
  10. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java
  11. +34
    -33
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  12. +4
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  13. +12
    -12
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/car/WxCarController.java Просмотреть файл

@@ -256,7 +256,7 @@ public class WxCarController extends BaseController {
wc.setId(coupon.getId()); wc.setId(coupon.getId());


coupon.getFlowParams().put("businessId",coupon.getId()); coupon.getFlowParams().put("businessId",coupon.getId());
wxFlowService.start(coupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
wxFlowService.start(coupon.getFlowParams(), getUserId(), getUser().getName(), tenantEntity);
//作废审批 //作废审批
if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(coupon.getStatus())) { if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(coupon.getStatus())) {
wc.setCancleApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); wc.setCancleApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());


+ 7
- 5
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Просмотреть файл

@@ -9,6 +9,7 @@ import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxCoupon; import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.po.WxCouponChannel; import com.iformall.domain.po.WxCouponChannel;
import com.iformall.domain.po.WxCouponPassword; import com.iformall.domain.po.WxCouponPassword;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxCouponStatisVo; import com.iformall.domain.vo.WxCouponStatisVo;
import com.iformall.enums.*; import com.iformall.enums.*;
import com.iformall.mapper.WxCouponChannelMapper; import com.iformall.mapper.WxCouponChannelMapper;
@@ -86,7 +87,8 @@ public class WxCouponController extends BaseController {
@SystemControllerLog(description = "券投放-新增") @SystemControllerLog(description = "券投放-新增")
public ResultData add(@RequestBody WxCoupon wxCoupon) { public ResultData add(@RequestBody WxCoupon wxCoupon) {
logger.debug("[" + getIpAddr() + "] WxCouponController::add"); logger.debug("[" + getIpAddr() + "] WxCouponController::add");
wxCoupon.updateTenantInfo(getTenantInfo());
TenantEntity tenantEntity = getTenantInfo();
wxCoupon.updateTenantInfo(tenantEntity);


ResultData resultData = wxCouponService.saveOrUpdate(wxCoupon); ResultData resultData = wxCouponService.saveOrUpdate(wxCoupon);
if(resultData.code != 200){ if(resultData.code != 200){
@@ -96,7 +98,7 @@ public class WxCouponController extends BaseController {
//启动投放审批 //启动投放审批
if(wxCoupon.getFlowParams() !=null && wxCoupon.getFlowParams().size()>0) { if(wxCoupon.getFlowParams() !=null && wxCoupon.getFlowParams().size()>0) {
wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); wxCoupon.getFlowParams().put("businessId",wxCoupon.getId());
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), tenantEntity);
//修改coupon applyStatus状态为审核中 //修改coupon applyStatus状态为审核中
wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
} }
@@ -111,6 +113,7 @@ public class WxCouponController extends BaseController {
if (wxCoupon.getId() == null) { if (wxCoupon.getId() == null) {
return new ResultData(ResultData.ERROR, "缺少id"); return new ResultData(ResultData.ERROR, "缺少id");
} }
wxCoupon.updateTenantInfo(getTenantInfo());
if(EnumDelFlag.YES.getCode().equals(wxCoupon.getIsDel())){ if(EnumDelFlag.YES.getCode().equals(wxCoupon.getIsDel())){
WxCouponChannel query = new WxCouponChannel(); WxCouponChannel query = new WxCouponChannel();
query.updateTenantInfo(wxCoupon); query.updateTenantInfo(wxCoupon);
@@ -120,13 +123,12 @@ public class WxCouponController extends BaseController {
return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。"); return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。");
} }
} }
wxCoupon.updateTenantInfo(getTenantInfo());


//启动审批流 //启动审批流
if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) { if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) {
logger.info("------coupon.update().businessType:"+wxCoupon.getFlowParams().get("businessType")); logger.info("------coupon.update().businessType:"+wxCoupon.getFlowParams().get("businessType"));
wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); wxCoupon.getFlowParams().put("businessId",wxCoupon.getId());
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantInfo());
//作废审批 //作废审批
if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) { if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) {
wxCoupon.setCancleApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); wxCoupon.setCancleApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
@@ -235,7 +237,7 @@ public class WxCouponController extends BaseController {
map.put("value",wxCoupon.getValidDays()); map.put("value",wxCoupon.getValidDays());
variables.add(map); variables.add(map);
wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); wxCoupon.getFlowParams().put("businessId",wxCoupon.getId());
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), wxCoupon);
//更新状态 //更新状态
WxCoupon updateCoupon = new WxCoupon(); WxCoupon updateCoupon = new WxCoupon();
updateCoupon.updateTenantInfo(wxCoupon); updateCoupon.updateTenantInfo(wxCoupon);


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

@@ -4,10 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.iformall.annotation.SystemControllerLog; import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController; import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxFlowConfig;
import com.iformall.domain.po.WxFlowModel;
import com.iformall.domain.po.WxFlowRecord;
import com.iformall.domain.po.*;
import com.iformall.enums.EnumFlowRecordStatus; 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;
@@ -37,7 +34,7 @@ public class WxFlowAbleController extends BaseController {
public ResultData start(@RequestBody Map<String, Object> params) { public ResultData start(@RequestBody Map<String, Object> params) {
logger.debug("[" + getIpAddr() + "] FlowAbleController::start"); logger.debug("[" + getIpAddr() + "] FlowAbleController::start");
MallUserInfo user = getUser(); MallUserInfo user = getUser();
return wxFlowService.start(params, user.getId(),user.getName(),user.getTenantId());
return wxFlowService.start(params, user.getId(),user.getName(),user);
} }


/** /**
@@ -53,7 +50,7 @@ public class WxFlowAbleController extends BaseController {
@SystemControllerLog(description = "工作流-用户代办列表") @SystemControllerLog(description = "工作流-用户代办列表")
public ResultData list(String flowType,Integer pageNum, Integer pageSize) { public ResultData list(String flowType,Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] FlowAbleController::list"); logger.debug("[" + getIpAddr() + "] FlowAbleController::list");
return wxFlowService.list(flowType,pageNum,pageSize,getUserId(),getTenantId());
return wxFlowService.list(flowType,pageNum,pageSize,getUserId(),getTenantInfo());
} }


/** /**
@@ -64,7 +61,7 @@ public class WxFlowAbleController extends BaseController {
@SystemControllerLog(description = "工作流-待办总数") @SystemControllerLog(description = "工作流-待办总数")
public ResultData getTotal() { public ResultData getTotal() {
logger.debug("[" + getIpAddr() + "] FlowAbleController::getTotal"); logger.debug("[" + getIpAddr() + "] FlowAbleController::getTotal");
return wxFlowService.getTotal(getUserId(), getTenantId());
return wxFlowService.getTotal(getUserId(), getTenantInfo());
} }


/** /**
@@ -127,7 +124,7 @@ public class WxFlowAbleController extends BaseController {
@SystemControllerLog(description = "工作流-审批历史") @SystemControllerLog(description = "工作流-审批历史")
public ResultData applyHistory(Long businessId) { public ResultData applyHistory(Long businessId) {
logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistory"); logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistory");
return wxFlowService.applyHistory(businessId,super.getTenantId());
return wxFlowService.applyHistory(businessId,getTenantInfo());
} }


/** /**
@@ -141,7 +138,7 @@ public class WxFlowAbleController extends BaseController {
@SystemControllerLog(description = "工作流-审批历史和代办") @SystemControllerLog(description = "工作流-审批历史和代办")
public ResultData applyHistoryAndAssignee(Long businessId) { public ResultData applyHistoryAndAssignee(Long businessId) {
logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistoryAndAssignee"); logger.debug("[" + getIpAddr() + "] FlowAbleController::applyHistoryAndAssignee");
return wxFlowService.getTaskStatusList(businessId,super.getTenantId());
return wxFlowService.getTaskStatusList(businessId,getTenantInfo());
} }


/** /**
@@ -151,7 +148,7 @@ public class WxFlowAbleController extends BaseController {
@PostMapping(value = "apply") @PostMapping(value = "apply")
public ResultData apply(@RequestBody Map<String, String> params) { public ResultData apply(@RequestBody Map<String, String> params) {
MallUserInfo user = getUser(); MallUserInfo user = getUser();
return wxFlowService.apply(params,user.getId(),user.getName(),user.getTenantId());
return wxFlowService.apply(params,user.getId(),user.getName(),user);
} }


/** /**
@@ -162,7 +159,7 @@ public class WxFlowAbleController extends BaseController {
@SystemControllerLog(description = "工作流-驳回") @SystemControllerLog(description = "工作流-驳回")
public ResultData reject(@RequestBody Map<String, Object> params) { public ResultData reject(@RequestBody Map<String, Object> params) {
MallUserInfo user = getUser(); MallUserInfo user = getUser();
return wxFlowService.reject(params,user.getId(),user.getName(),user.getPhone(),user.getTenantId());
return wxFlowService.reject(params,user.getId(),user.getName(),user.getPhone(),user);
} }




@@ -240,7 +237,6 @@ public class WxFlowAbleController extends BaseController {
return new ResultData(wxFlowService.getModelBybusiness(wxFlowModel)); return new ResultData(wxFlowService.getModelBybusiness(wxFlowModel));
} }



/** /**
* 配置列表 * 配置列表
*/ */


+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/log/SystemLogAspect.java Просмотреть файл

@@ -61,7 +61,7 @@ public class SystemLogAspect {
" ip:" + ipaddress); " ip:" + ipaddress);


MallUserAction action = new MallUserAction(); MallUserAction action = new MallUserAction();
action.setTenantId(user.getTenantId());
action.updateTenantInfo(user);
action.setType(EnumMallUserAction.CONTROLLER.getCode()); action.setType(EnumMallUserAction.CONTROLLER.getCode());
action.setIp(ipaddress); action.setIp(ipaddress);
action.setUserId(user.getId()); action.setUserId(user.getId());


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

@@ -74,13 +74,25 @@ public class WxFlowRecord extends TenantEntity {
this.processInstanceId = processInstanceId; this.processInstanceId = processInstanceId;
this.currStatus = currStatus; this.currStatus = currStatus;
} }
@Deprecated
public WxFlowRecord(Long businessId,String tenantId){ public WxFlowRecord(Long businessId,String tenantId){
this.businessId = businessId; this.businessId = businessId;
setTenantId(tenantId); setTenantId(tenantId);
} }
public WxFlowRecord(TenantEntity tenantEntity, Long businessId){
updateTenantInfo(tenantEntity);
this.businessId = businessId;
}
@Deprecated
public WxFlowRecord(Long businessId,String tenantId,Integer approvalType){ public WxFlowRecord(Long businessId,String tenantId,Integer approvalType){
this.businessId = businessId; this.businessId = businessId;
setTenantId(tenantId); setTenantId(tenantId);
this.approvalType = approvalType; this.approvalType = approvalType;
} }

public WxFlowRecord(TenantEntity tenantEntity, Long businessId,Integer approvalType){
updateTenantInfo(tenantEntity);
this.businessId = businessId;
this.approvalType = approvalType;
}
} }

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

@@ -4,7 +4,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;


/** /**
* @author luozukai
* @author Stormeye
* @date 2019/4/24 14:32 * @date 2019/4/24 14:32
*/ */
@Data @Data


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

@@ -4,7 +4,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;


/** /**
* @author luozukai
* @author Stormeye
* @date 2019/4/24 14:32 * @date 2019/4/24 14:32
*/ */
@Data @Data


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

@@ -2,6 +2,8 @@ package com.iformall.domain.po.msg;


import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.iformall.domain.po.base.BaseEntity; import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.BaseTenantEntity;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;
@@ -49,4 +51,12 @@ public class BaseMsg extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private Integer delayTimeLevel = 0; private Integer delayTimeLevel = 0;


public void updateTenantInfo(TenantEntity tenantEntity) {
setTenantId(tenantEntity.getTenantId());
}

public void updateTenantInfo(BaseTenantEntity tenantEntity) {
setTenantId(tenantEntity.getTenantId());
}

} }

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

@@ -2,6 +2,7 @@ package com.iformall.service;


import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.WxFlowConfig; import com.iformall.domain.po.WxFlowConfig;
import com.iformall.domain.po.WxFlowModel; import com.iformall.domain.po.WxFlowModel;
import com.iformall.domain.po.WxFlowRecord; import com.iformall.domain.po.WxFlowRecord;
@@ -15,7 +16,7 @@ import java.util.Map;
* 流程审批服务 * 流程审批服务
*/ */
public interface WxFlowService { public interface WxFlowService {
WxFlowModel getModelByType(int flowType,String tenantId);
WxFlowModel getModelByType(int flowType,TenantEntity tenantEntity);


/** /**
* 更新业务数据状态 * 更新业务数据状态
@@ -24,14 +25,14 @@ public interface WxFlowService {
*/ */
void updateBusinessStatus(Map<String, Object> mapInfo,Integer applyStatus); void updateBusinessStatus(Map<String, Object> mapInfo,Integer applyStatus);


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


/** /**
* 启动流程 * 启动流程
* @param params * @param params
* @return * @return
*/ */
ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId);
ResultData start(Map<String, Object> params, Long userId, String userName, TenantEntity tenantEntity);


/** /**
* 分页代办列表 * 分页代办列表
@@ -40,28 +41,28 @@ public interface WxFlowService {
* @param pageSize * @param pageSize
* @return * @return
*/ */
ResultData list(String flowType,Integer pageNum, Integer pageSize,Long userId,String tenantId);
ResultData list(String flowType,Integer pageNum, Integer pageSize,Long userId,TenantEntity tenantEntity);


/** /**
* 审批历史 * 审批历史
* @param businessId * @param businessId
* @return * @return
*/ */
ResultData applyHistory(Long businessId,String tenantId);
ResultData applyHistory(Long businessId,TenantEntity tenantEntity);


/** /**
* 审批 * 审批
* @param params * @param params
* @return * @return
*/ */
ResultData apply(@RequestBody Map<String, String> params,Long userId,String userName,String tenantId);
ResultData apply(@RequestBody Map<String, String> params,Long userId,String userName,TenantEntity tenantEntity);


/** /**
* 驳回 * 驳回
* @param params * @param params
* @return * @return
*/ */
ResultData reject(@RequestBody Map<String, Object> params,Long userId,String userName,String userPhone,String tenantId);
ResultData reject(@RequestBody Map<String, Object> params,Long userId,String userName,String userPhone,TenantEntity tenantEntity);


/** /**
* 撤回 * 撤回
@@ -126,6 +127,6 @@ public interface WxFlowService {
*/ */
List<WxFlowModel> getModelBybusiness(WxFlowModel wxFlowModel); List<WxFlowModel> getModelBybusiness(WxFlowModel wxFlowModel);


ResultData getTotal(Long userId, String tenantId);
ResultData getTotal(Long userId, TenantEntity tenantEntity);


} }

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

@@ -517,7 +517,7 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
//启动审批流 //启动审批流
record.getFlowParams().put("businessId",record.getId()); record.getFlowParams().put("businessId",record.getId());
if (record.getFlowParams() != null && record.getFlowParams().size() > 0) { if (record.getFlowParams() != null && record.getFlowParams().size() > 0) {
wxFlowService.start(record.getFlowParams(), userInfo.getId(), userInfo.getName(), record.getTenantId());
wxFlowService.start(record.getFlowParams(), userInfo.getId(), userInfo.getName(), record);
} }
} }
return new ResultData(); return new ResultData();


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

@@ -8,6 +8,7 @@ import com.iformall.common.IdWorker;
import com.iformall.common.Result; import com.iformall.common.Result;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.*; import com.iformall.domain.po.*;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.msg.MailMsg; import com.iformall.domain.po.msg.MailMsg;
import com.iformall.domain.po.msg.WxMsgRecord; import com.iformall.domain.po.msg.WxMsgRecord;
import com.iformall.domain.vo.FlowUserVo; import com.iformall.domain.vo.FlowUserVo;
@@ -102,9 +103,9 @@ public class WxFlowServiceImpl implements WxFlowService {
* @param flowType * @param flowType
* @return * @return
*/ */
public WxFlowModel getModelByType(int flowType,String tenantId){
public WxFlowModel getModelByType(int flowType, TenantEntity tenantEntity){
WxFlowModel model = new WxFlowModel(); WxFlowModel model = new WxFlowModel();
model.setTenantId(tenantId);
model.updateTenantInfo(tenantEntity);
model.setFlowType(flowType); model.setFlowType(flowType);
List<WxFlowModel> list = getModelBybusiness(model); List<WxFlowModel> list = getModelBybusiness(model);
if(CollectionUtils.isNotEmpty(list)){ if(CollectionUtils.isNotEmpty(list)){
@@ -389,13 +390,13 @@ public class WxFlowServiceImpl implements WxFlowService {


@Override @Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) {
public ResultData start(Map<String, Object> params,Long userId,String userName,TenantEntity tenantEntity) {
String remark = (String)params.get("remark"); String remark = (String)params.get("remark");
Long businessId = Long.parseLong(params.get("businessId").toString()); Long businessId = Long.parseLong(params.get("businessId").toString());
Integer flowType = getIngeter(params.get("businessType")); Integer flowType = getIngeter(params.get("businessType"));
List<Map<String,Object>> variables = (List)params.get("variables"); List<Map<String,Object>> variables = (List)params.get("variables");


WxFlowModel flowModel = getModelByType(flowType,tenantId);
WxFlowModel flowModel = getModelByType(flowType,tenantEntity);
if(flowModel== null || StringUtils.isBlank(flowModel.getFlowId())){ if(flowModel== null || StringUtils.isBlank(flowModel.getFlowId())){
return new ResultData(ResultData.ERROR, "您尚未设置审批模板,请先设置。"); return new ResultData(ResultData.ERROR, "您尚未设置审批模板,请先设置。");
} }
@@ -413,7 +414,7 @@ public class WxFlowServiceImpl implements WxFlowService {
map.put("variables",variables); map.put("variables",variables);
map.put("taskAssignee",flowModel.getFlow()); map.put("taskAssignee",flowModel.getFlow());
setSignAssignee(map,flowModel.getFlow()); setSignAssignee(map,flowModel.getFlow());
map.put("tenantId",tenantId);
map.put("tenantId",tenantEntity.getTenantId());


ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(flowModel.getFlowId(), map); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(flowModel.getFlowId(), map);
logger.debug("流程启动,流程id:{}",processInstance.getId()); logger.debug("流程启动,流程id:{}",processInstance.getId());
@@ -439,12 +440,12 @@ public class WxFlowServiceImpl implements WxFlowService {
//给审批人发送代办通知短信 //给审批人发送代办通知短信
List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstance.getId()); List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstance.getId());
for (MallUserInfo mallUserInfo:mallUserInfoList) { for (MallUserInfo mallUserInfo:mallUserInfoList) {
sendAssigneeMsgAndEmail(tenantId, mallUserInfo.getPhone(), mallUserInfo.getEmail(), starterInfo.getName(), businessId, flowType, variables);
sendAssigneeMsgAndEmail(tenantEntity, mallUserInfo.getPhone(), mallUserInfo.getEmail(), starterInfo.getName(), businessId, flowType, variables);
} }
return new ResultData(); return new ResultData();
} }


public void sendAssigneeMsgAndEmail(String tenantId, String phone, String email, String userName, Long businessId, Integer flowType, List<Map<String, Object>> variables) {
public void sendAssigneeMsgAndEmail(TenantEntity tenantEntity, String phone, String email, String userName, Long businessId, Integer flowType, List<Map<String, Object>> variables) {
Map<String,String> dynamicContentMap = new HashMap<>(); Map<String,String> dynamicContentMap = new HashMap<>();
dynamicContentMap.put("userName",userName); dynamicContentMap.put("userName",userName);
dynamicContentMap.put("page", Constant.adminPage); dynamicContentMap.put("page", Constant.adminPage);
@@ -452,7 +453,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode());
wxMsgRecord.setModelType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); wxMsgRecord.setModelType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode());
wxMsgRecord.setReceiver(phone); wxMsgRecord.setReceiver(phone);
wxMsgRecord.setTenantId(tenantId);
wxMsgRecord.updateTenantInfo(tenantEntity);
if(isContract(flowType)){ if(isContract(flowType)){
dynamicContentMap.put("bustype","合同"); dynamicContentMap.put("bustype","合同");
}else if(isBill(flowType)){ }else if(isBill(flowType)){
@@ -474,7 +475,7 @@ public class WxFlowServiceImpl implements WxFlowService {
msgReplaceMap.put("name",userName); msgReplaceMap.put("name",userName);
msgReplaceMap.put("linkName",userName); msgReplaceMap.put("linkName",userName);
msgReplaceMap.put("linkPhone",phone); msgReplaceMap.put("linkPhone",phone);
ResultData resultData = getTaskStatusList(businessId, tenantId);
ResultData resultData = getTaskStatusList(businessId, tenantEntity);
List<WxFlowRecord> flowRecordList = (List<WxFlowRecord>) resultData.data; List<WxFlowRecord> flowRecordList = (List<WxFlowRecord>) resultData.data;
String taskListHtml = ""; String taskListHtml = "";
for (int i = flowRecordList.size() -1; i>=0; i--) { for (int i = flowRecordList.size() -1; i>=0; i--) {
@@ -533,7 +534,7 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelType(EnumMailMsgModel.MAIL_ASSIGNEE_NODIFY.getCode()); mailMsg.setModelType(EnumMailMsgModel.MAIL_ASSIGNEE_NODIFY.getCode());
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode()); mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email}); mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
mailMsg.updateTenantInfo(tenantEntity);
if(isContract(flowType)){ if(isContract(flowType)){
msgReplaceMap.put("bustype","合同"); msgReplaceMap.put("bustype","合同");
}else if(isBill(flowType)){ }else if(isBill(flowType)){
@@ -604,13 +605,13 @@ public class WxFlowServiceImpl implements WxFlowService {
} }


@Override @Override
public ResultData list(String flowType, Integer pageNum, Integer pageSize,Long userId,String tenantId) {
public ResultData list(String flowType, Integer pageNum, Integer pageSize,Long userId,TenantEntity tenantEntity) {
TaskQuery taskQuery = taskService.createTaskQuery(); TaskQuery taskQuery = taskService.createTaskQuery();
//流程过滤条件 //流程过滤条件
if(StringUtils.isNotBlank(flowType)) { if(StringUtils.isNotBlank(flowType)) {
List<String> definitionKeyList = new ArrayList<>(); List<String> definitionKeyList = new ArrayList<>();
for (String ft : flowType.split(",")) { for (String ft : flowType.split(",")) {
WxFlowModel flowModel = getModelByType(Integer.parseInt(ft),tenantId);
WxFlowModel flowModel = getModelByType(Integer.parseInt(ft),tenantEntity);
if(flowModel!=null) { if(flowModel!=null) {
definitionKeyList.add(flowModel.getFlowId()); definitionKeyList.add(flowModel.getFlowId());
} }
@@ -665,17 +666,17 @@ public class WxFlowServiceImpl implements WxFlowService {
} }


@Override @Override
public ResultData applyHistory(Long businessId,String tenantId) {
public ResultData applyHistory(Long businessId,TenantEntity tenantEntity) {
List<WxFlowRecord> result; List<WxFlowRecord> result;
WxCoupon query = new WxCoupon(); WxCoupon query = new WxCoupon();
query.setTenantId(tenantId);
query.updateTenantInfo(tenantEntity);
query.setId(businessId); query.setId(businessId);
List<WxCoupon> couponList = wxCouponMapper.findList(query); List<WxCoupon> couponList = wxCouponMapper.findList(query);
if(CollectionUtils.isNotEmpty(couponList)) { if(CollectionUtils.isNotEmpty(couponList)) {
WxCoupon coupon = couponList.get(0); WxCoupon coupon = couponList.get(0);
result = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId,coupon.getApprovalType()));
result = wxFlowRecordService.findList(new WxFlowRecord(tenantEntity, businessId,coupon.getApprovalType()));
}else{ }else{
result = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId));
result = wxFlowRecordService.findList(new WxFlowRecord(tenantEntity, businessId));
} }


if(CollectionUtils.isNotEmpty(result)){ if(CollectionUtils.isNotEmpty(result)){
@@ -699,8 +700,8 @@ public class WxFlowServiceImpl implements WxFlowService {
} }


@Override @Override
public ResultData getTaskStatusList(Long businessId, String tenantId) {
List<WxFlowRecord> resultList = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId));
public ResultData getTaskStatusList(Long businessId, TenantEntity tenantEntity) {
List<WxFlowRecord> resultList = wxFlowRecordService.findList(new WxFlowRecord(tenantEntity, businessId));
if(CollectionUtils.isEmpty(resultList)){ if(CollectionUtils.isEmpty(resultList)){
return new ResultData(); return new ResultData();
} }
@@ -877,7 +878,7 @@ public class WxFlowServiceImpl implements WxFlowService {


@Override @Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
public ResultData apply(Map<String, String> params,Long userId,String userName,String tenantId) {
public ResultData apply(Map<String, String> params,Long userId,String userName,TenantEntity tenantEntity) {
String taskId = params.get("taskId"); String taskId = params.get("taskId");
String processInstanceId = params.get("processInstanceId"); String processInstanceId = params.get("processInstanceId");
String remark = params.get("remark"); String remark = params.get("remark");
@@ -914,7 +915,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecordService.saveOrUpdate(wxFlowRecord); wxFlowRecordService.saveOrUpdate(wxFlowRecord);


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


//修改记录表当前状态 //修改记录表当前状态
if(end){ if(end){
@@ -929,13 +930,13 @@ public class WxFlowServiceImpl implements WxFlowService {
* 判断流程是否结束,并发送短信通知 * 判断流程是否结束,并发送短信通知
* @param taskKey * @param taskKey
* @param processInstanceId * @param processInstanceId
* @param tenantId
* @param tenantEntity
*/ */
public boolean isEndAndSendMsg(Map<String,Object> mapInfo,String taskKey,String processInstanceId,String tenantId,String userName){
public boolean isEndAndSendMsg(Map<String,Object> mapInfo,String taskKey,String processInstanceId,TenantEntity tenantEntity,String userName){
// 发送短信 // 发送短信
Map<String,String> msgReplaceMap; Map<String,String> msgReplaceMap;
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setTenantId(tenantId);
wxMsgValidationcode.setTenantId(tenantEntity.getTenantId());
Map<String,Object> userMap = (Map<String,Object>)mapInfo.get("starter"); Map<String,Object> userMap = (Map<String,Object>)mapInfo.get("starter");
Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); Long businessId = Long.parseLong(mapInfo.get("businessId").toString());
String email = (String)userMap.get("email"); String email = (String)userMap.get("email");
@@ -961,7 +962,7 @@ public class WxFlowServiceImpl implements WxFlowService {
List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId); List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId);
for (int i = 0; i < mallUserInfoList.size(); i++) { for (int i = 0; i < mallUserInfoList.size(); i++) {
MallUserInfo mallUserInfo = mallUserInfoList.get(i); MallUserInfo mallUserInfo = mallUserInfoList.get(i);
sendAssigneeMsgAndEmail(tenantId, mallUserInfo.getPhone(), mallUserInfo.getEmail(), userName, businessId, flowType, variables);
sendAssigneeMsgAndEmail(tenantEntity, mallUserInfo.getPhone(), mallUserInfo.getEmail(), userName, businessId, flowType, variables);
if(i == mallUserInfoList.size()-1){ if(i == mallUserInfoList.size()-1){
assignee += mallUserInfo.getName(); assignee += mallUserInfo.getName();
}else{ }else{
@@ -979,7 +980,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode());
wxMsgRecord.setModelType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode()); wxMsgRecord.setModelType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode());
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):""); wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):"");
wxMsgRecord.setTenantId(tenantId);
wxMsgRecord.setTenantId(tenantEntity.getTenantId());
if(isContract(flowType)){ if(isContract(flowType)){
msgReplaceMap.put("bustype","合同"); msgReplaceMap.put("bustype","合同");
}else if(isBill(flowType)){ }else if(isBill(flowType)){
@@ -1006,7 +1007,7 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelType(EnumMailMsgModel.MAIL_APPLY_NODIFY.getCode()); mailMsg.setModelType(EnumMailMsgModel.MAIL_APPLY_NODIFY.getCode());
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode()); mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email}); mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
mailMsg.setTenantId(tenantEntity.getTenantId());
if(isContract(flowType)){ if(isContract(flowType)){
msgReplaceMap.put("bustype","合同"); msgReplaceMap.put("bustype","合同");
}else if(isBill(flowType)){ }else if(isBill(flowType)){
@@ -1029,7 +1030,7 @@ public class WxFlowServiceImpl implements WxFlowService {
return false; return false;
}else{ }else{
//继续递归判断 //继续递归判断
return isEndAndSendMsg(mapInfo,taskKey,processInstanceId,tenantId,userName);
return isEndAndSendMsg(mapInfo,taskKey,processInstanceId,tenantEntity,userName);
} }
}else{ }else{
updateBusinessStatus(mapInfo,EnumRentContractAppStatus.FINISH.getCode()); updateBusinessStatus(mapInfo,EnumRentContractAppStatus.FINISH.getCode());
@@ -1043,7 +1044,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode());
wxMsgRecord.setModelType(EnumMsgModel.FLOW_PASS_NODIFY.getCode()); wxMsgRecord.setModelType(EnumMsgModel.FLOW_PASS_NODIFY.getCode());
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):""); wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):"");
wxMsgRecord.setTenantId(tenantId);
wxMsgRecord.setTenantId(tenantEntity.getTenantId());
if(isContract(flowType)){ if(isContract(flowType)){
msgReplaceMap.put("bustype","合同"); msgReplaceMap.put("bustype","合同");
}else if(isBill(flowType)){ }else if(isBill(flowType)){
@@ -1070,7 +1071,7 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelType(EnumMailMsgModel.MAIL_PASS_NODIFY.getCode()); mailMsg.setModelType(EnumMailMsgModel.MAIL_PASS_NODIFY.getCode());
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode()); mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email}); mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
mailMsg.setTenantId(tenantEntity.getTenantId());
if(isContract(flowType)){ if(isContract(flowType)){
msgReplaceMap.put("bustype","合同"); msgReplaceMap.put("bustype","合同");
}else if(isBill(flowType)){ }else if(isBill(flowType)){
@@ -1140,7 +1141,7 @@ 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, Object> params,Long userId,String userName,String userPhone,String tenantId) {
public ResultData reject(Map<String, Object> params,Long userId,String userName,String userPhone,TenantEntity tenantEntity) {
String processInstanceId = (String)params.get("processInstanceId"); String processInstanceId = (String)params.get("processInstanceId");
String remark = (String)params.get("remark"); String remark = (String)params.get("remark");


@@ -1196,7 +1197,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode());
wxMsgRecord.setModelType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode()); wxMsgRecord.setModelType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode());
wxMsgRecord.setReceiver(userMap != null ? (String) userMap.get("phone") : ""); wxMsgRecord.setReceiver(userMap != null ? (String) userMap.get("phone") : "");
wxMsgRecord.setTenantId(tenantId);
wxMsgRecord.setTenantId(tenantEntity.getTenantId());
if (isContract(flowType)) { if (isContract(flowType)) {
msgReplaceMap.put("bustype", "合同"); msgReplaceMap.put("bustype", "合同");
} else if (isBill(flowType)) { } else if (isBill(flowType)) {
@@ -1231,7 +1232,7 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelType(EnumMailMsgModel.MAIL_REJECT_NODIFY.getCode()); mailMsg.setModelType(EnumMailMsgModel.MAIL_REJECT_NODIFY.getCode());
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode()); mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email}); mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
mailMsg.setTenantId(tenantEntity.getTenantId());
if(isContract(flowType)){ if(isContract(flowType)){
msgReplaceMap.put("bustype","合同"); msgReplaceMap.put("bustype","合同");
}else if(isBill(flowType)){ }else if(isBill(flowType)){
@@ -1543,7 +1544,7 @@ public class WxFlowServiceImpl implements WxFlowService {
} }


@Override @Override
public ResultData getTotal(Long userId, String tenantId) {
public ResultData getTotal(Long userId, TenantEntity tenantEntity) {
TaskQuery taskQuery = taskService.createTaskQuery(); TaskQuery taskQuery = taskService.createTaskQuery();
int total = taskQuery.taskCandidateOrAssigned(userId.toString()).list().size(); int total = taskQuery.taskCandidateOrAssigned(userId.toString()).list().size();
return new ResultData(total); return new ResultData(total);


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

@@ -403,11 +403,11 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService


if (hasFlow) { if (hasFlow) {
if (record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { if (record.getOperationType().equals(EnumContractOperationType.PART.getCode())) {
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null) {
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record) == null) {
updatePropertyContractStatus(record.getId()); updatePropertyContractStatus(record.getId());
} else { } else {
record.getFlowParams().put("businessId", record.getId().toString()); record.getFlowParams().put("businessId", record.getId().toString());
wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId());
wxFlowService.start(record.getFlowParams(), userId, userName, record);


// 合同状态改成待签约 // 合同状态改成待签约
WxPropertyContract updateRentContract = new WxPropertyContract(); WxPropertyContract updateRentContract = new WxPropertyContract();
@@ -417,7 +417,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
logger.info("id:{},启动审批流成功", record.getId().toString()); logger.info("id:{},启动审批流成功", record.getId().toString());
} }
} else { } else {
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record) == null
&& record.getMerchantId() != null) { && record.getMerchantId() != null) {
wxRentContractService.updateRentContractStatus(record.getId()); wxRentContractService.updateRentContractStatus(record.getId());
} else { } else {
@@ -425,7 +425,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
if (record.getMerchantId() != null) { if (record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录 record.getFlowParams().put("supplement", true); //设置补录
} }
wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId());
wxFlowService.start(record.getFlowParams(), userId, userName, record);


// 合同状态改成待签约 // 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract(); WxRentContract updateRentContract = new WxRentContract();


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

@@ -500,7 +500,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {


//有模板,启动审批流,没有,直接生产账单 //有模板,启动审批流,没有,直接生产账单
if (!CollectionUtils.isEmpty(record.getFlowParams())){ if (!CollectionUtils.isEmpty(record.getFlowParams())){
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record) == null
&& record.getMerchantId() != null) { && record.getMerchantId() != null) {
updateRentContractStatus(record.getId()); updateRentContractStatus(record.getId());
}else{ }else{
@@ -508,7 +508,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if (record.getMerchantId() != null) { if (record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录 record.getFlowParams().put("supplement", true); //设置补录
} }
wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId());
wxFlowService.start(record.getFlowParams(), userId, userName, record);


// 合同状态改成待签约 // 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract(); WxRentContract updateRentContract = new WxRentContract();
@@ -589,7 +589,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {


//有模板,启动审批流,没有,直接生产账单 //有模板,启动审批流,没有,直接生产账单
if (!CollectionUtils.isEmpty(record.getFlowParams())) { if (!CollectionUtils.isEmpty(record.getFlowParams())) {
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record) == null
&& record.getMerchantId() != null) { && record.getMerchantId() != null) {
updateRentContractStatus(record.getId()); updateRentContractStatus(record.getId());
}else{ }else{
@@ -598,7 +598,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if (record.getMerchantId() != null) { if (record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录 record.getFlowParams().put("supplement", true); //设置补录
} }
wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId());
wxFlowService.start(record.getFlowParams(), userId, userName, record);


//合同状态改成补录状态 //合同状态改成补录状态
WxRentContract updateRentContract = new WxRentContract(); WxRentContract updateRentContract = new WxRentContract();
@@ -936,14 +936,14 @@ public class WxRentContractServiceImpl implements WxRentContractService {


logger.info("合同id:{},开始停止...", id); logger.info("合同id:{},开始停止...", id);
//结束审批流 by luozukai //结束审批流 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 = wxFlowService.getModelByType(EnumFlowKey.NEW_RENT_CONTRACT.getCode().intValue(),record);
WxFlowModel flowModelPoint = wxFlowService.getModelByType(EnumFlowKey.NEW_SHOP_CONTRACT.getCode().intValue(),record);


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());
WxFlowModel flowModel_pro = wxFlowService.getModelByType(EnumFlowKey.NEW_PRO_CONTRACT.getCode().intValue(),record);
WxFlowModel flowModelPoint_pro = wxFlowService.getModelByType(EnumFlowKey.NEW_PRO_POINT_CONTRACT.getCode().intValue(),record);


WxFlowModel flowModel_rent = wxFlowService.getModelByType(EnumFlowKey.NNEW_RENT_CONTRACT.getCode().intValue(),record.getTenantId());
WxFlowModel flowModelPoint_rent = wxFlowService.getModelByType(EnumFlowKey.NEW_RENT_POINT_CONTRACT.getCode().intValue(),record.getTenantId());
WxFlowModel flowModel_rent = wxFlowService.getModelByType(EnumFlowKey.NNEW_RENT_CONTRACT.getCode().intValue(),record);
WxFlowModel flowModelPoint_rent = wxFlowService.getModelByType(EnumFlowKey.NEW_RENT_POINT_CONTRACT.getCode().intValue(),record);


List<String> keyList = new ArrayList<>(); List<String> keyList = new ArrayList<>();
if(flowModel != null){ if(flowModel != null){
@@ -1682,7 +1682,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {


//有模板,启动审批流,没有,直接生产账单 //有模板,启动审批流,没有,直接生产账单
if (!CollectionUtils.isEmpty(record.getFlowParams())) { if (!CollectionUtils.isEmpty(record.getFlowParams())) {
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null
if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record) == null
&& record.getMerchantId() != null) { && record.getMerchantId() != null) {
updateRentContractStatus(record.getId()); updateRentContractStatus(record.getId());
}else{ }else{
@@ -1690,7 +1690,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if (record.getMerchantId() != null) { if (record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录 record.getFlowParams().put("supplement", true); //设置补录
} }
wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId());
wxFlowService.start(record.getFlowParams(), userId, userName, record);


// 合同状态改成待签约 // 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract(); WxRentContract updateRentContract = new WxRentContract();


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