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

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

release_toaliyun_real
luozukai 7 лет назад
committed by Stormeye Wu
Родитель
Сommit
d7a8ec25e5
4 измененных файлов: 16 добавлений и 9 удалений
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxFlowService.java
  3. +10
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  4. +4
    -1
      mallinkService/src/main/resources/mapper/WxFlowRecordMapper.xml

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

@@ -41,6 +41,7 @@ public class WxFlowRecord implements Serializable {
}
public WxFlowRecord(String processInstanceId,Integer currStatus){
this.processInstanceId = processInstanceId;
this.currStatus = currStatus;
}
public WxFlowRecord(Long businessId,String tenantId){
this.businessId = businessId;


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

@@ -16,7 +16,7 @@ public interface WxFlowService {
* @param businessId
* @param flowType
*/
void updateBusinessStatus(Long businessId,Integer flowType,Integer contractType,Integer applyStatus,Boolean supplement,String instId);
void updateBusinessStatus(Long businessId,Integer flowType,Integer contractType,Integer applyStatus,Boolean supplement);

ResultData getTaskStatusList(Long businessId,String tenantId);



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

@@ -89,10 +89,9 @@ public class WxFlowServiceImpl implements WxFlowService {
* @param contractType 1租赁合同 2点位合同wx_rent_contract 3物业wx_property_contract 4点位物业合同
* @param applyStatus 状态
* @param supplement 是否补录
* @param instId 实例id
*/
@Override
public void updateBusinessStatus(Long businessId,Integer flowType,Integer contractType,Integer applyStatus,Boolean supplement,String instId){
public void updateBusinessStatus(Long businessId,Integer flowType,Integer contractType,Integer applyStatus,Boolean supplement){
logger.info("businessId:{},supplement:{}",businessId.toString(),supplement);
if(1 == flowType){
if(contractType.intValue() == 1 || contractType.intValue() == 2){
@@ -144,8 +143,6 @@ public class WxFlowServiceImpl implements WxFlowService {
}
}
}
//修改记录表当前状态
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(instId,applyStatus));
}

@Override
@@ -182,7 +179,7 @@ public class WxFlowServiceImpl implements WxFlowService {
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.APPLYING.getCode(),supplement,processInstance.getId());
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.APPLYING.getCode(),supplement);

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

// 给审批人发送代办通知短信
@@ -382,6 +380,8 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecord.setTaskName(taskName);
wxFlowRecord.setTaskKey(taskKey);
wxFlowRecordService.saveOrUpdate(wxFlowRecord);
//修改记录表当前状态
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumFlowRecordStatus.APPLY.getCode()));

return new ResultData();
}
@@ -442,7 +442,7 @@ public class WxFlowServiceImpl implements WxFlowService {
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.FINISH.getCode(),supplement,processInstanceId);
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.FINISH.getCode(),supplement);

// 给发起人发送审批通过消息
msgReplaceMap = new HashedMap();
@@ -511,7 +511,7 @@ public class WxFlowServiceImpl implements WxFlowService {
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);
}
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.REJECT.getCode(),supplement,processInstanceId);
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.REJECT.getCode(),supplement);

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

// 给发起人发送驳回消息
Map<String,String> msgReplaceMap = new HashedMap();
@@ -605,6 +607,7 @@ public class WxFlowServiceImpl implements WxFlowService {
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);
}


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

@@ -32,9 +32,12 @@
<if test=" null != businessId ">
and `business_id` = #{businessId}
</if>
<if test=" null != user_id ">
<if test=" null != userId ">
and `user_id` = #{userId}
</if>
<if test=" null != status ">
and `status` = #{status}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


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