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

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

release_toaliyun_real
luozukai 7 лет назад
committed by Stormeye Wu
Родитель
Сommit
2a9be15f94
1 измененных файлов: 7 добавлений и 10 удалений
  1. +7
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java

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

@@ -515,17 +515,17 @@ public class WxFlowServiceImpl implements WxFlowService {
@Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
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);

Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult();
Map<String,Object> mapInfo = taskService.getVariables(task.getId());
Long businessId = Long.parseLong((String)mapInfo.get("businessId"));
Integer flowType = (Integer)mapInfo.get("flowType");
MallUserInfo starter = (MallUserInfo)mapInfo.get("starter");

String taskName;
String taskKey;
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
if (task == null) {
return new ResultData(ErrorCode.FLOW_INST_NOT_EXIST.getCode(), "任务不存在");
}
@@ -541,7 +541,7 @@ public class WxFlowServiceImpl implements WxFlowService {
//保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord();
wxFlowRecord.setBusinessId(businessId);
wxFlowRecord.setTaskId(taskId);
wxFlowRecord.setTaskId(task.getId());
wxFlowRecord.setProcessInstanceId(processInstanceId);
wxFlowRecord.setRemark(remark);
wxFlowRecord.setUserId(userId);
@@ -568,21 +568,19 @@ public class WxFlowServiceImpl implements WxFlowService {
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);
Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult();
Map<String,Object> mapInfo = taskService.getVariables(task.getId());
Long businessId = Long.parseLong((String)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(), "任务不存在");
}
@@ -598,7 +596,7 @@ public class WxFlowServiceImpl implements WxFlowService {
//保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord();
wxFlowRecord.setBusinessId(businessId);
wxFlowRecord.setTaskId(taskId);
wxFlowRecord.setTaskId(task.getId());
wxFlowRecord.setProcessInstanceId(processInstanceId);
wxFlowRecord.setRemark(remark);
wxFlowRecord.setUserId(userId);
@@ -610,7 +608,6 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecordService.saveOrUpdate(wxFlowRecord);
//修改记录表当前状态
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumFlowRecordStatus.SETBACK.getCode()));

return new ResultData();
}



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