Commit 28991fe3 by 龙于生

新增审批详情可以添加抄送人接口

parent a2d48c6f
...@@ -10,9 +10,9 @@ import cn.timer.api.dao.spmk.*; ...@@ -10,9 +10,9 @@ import cn.timer.api.dao.spmk.*;
import cn.timer.api.dto.spmk.*; import cn.timer.api.dto.spmk.*;
import cn.timer.api.utils.redis.RedisUtil; import cn.timer.api.utils.redis.RedisUtil;
import cn.timer.api.utils.router.RequestDataUtils; import cn.timer.api.utils.router.RequestDataUtils;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.SerializationUtils; import com.baomidou.mybatisplus.core.toolkit.SerializationUtils;
import com.mysql.cj.util.StringUtils; import com.mysql.cj.util.StringUtils;
import net.sf.json.JSON;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -1156,4 +1156,28 @@ public class SpmkController { ...@@ -1156,4 +1156,28 @@ public class SpmkController {
} }
return false; return false;
} }
/**
* 更新审批流程通过节点
* @param userBean
* @param spmkApproveDetailDto
* @return
*/
@PostMapping(value = "/updateFlowChildren")
@ApiOperation(value = "更新审批流程通过节点", httpMethod = "POST", notes = "")
public Result<Object> updateFlowChildren(@CurrentUser UserBean userBean,@Validated @RequestBody SpmkApproveDetailDto spmkApproveDetailDto) {
try {
// 更新 flowChildren
SpmkApproveDetailSummary.builder().id(spmkApproveDetailDto.getId())
.flowChildren(JSONArray.fromObject(spmkApproveDetailDto.getFlowChildren()).toString()).build().updateById();
} catch (Exception e) {
return ResultUtil.error(e);
}
SpmkApproveDetailSummary detailSummary = SpmkApproveDetailSummary.builder().build().selectOne(new QueryWrapper<SpmkApproveDetailSummary>()
.lambda().eq(SpmkApproveDetailSummary::getId, spmkApproveDetailDto.getId()));
return ResultUtil.data(JSON.toJSONString(detailSummary));
}
} }
...@@ -659,10 +659,12 @@ public class RouterUtils { ...@@ -659,10 +659,12 @@ public class RouterUtils {
//转派 处理 //转派 处理
//在 原审批人 列表中 插入 一个或多个被转派人(审批人) //在 原审批人 列表中 插入 一个或多个被转派人(审批人)
}else if (sts == ExecutorSts.REDEPLOY.ordinal()) { }else if (sts == ExecutorSts.REDEPLOY.ordinal()) {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
//新增转派多个人功能 //新增转派多个人功能
//判断是走派多个人的 否则走旧逻辑 //判断是走派多个人的 否则走旧逻辑
if(!CollectionUtils.isEmpty(redeployUserList)){ if(!CollectionUtils.isEmpty(redeployUserList)){
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1); //List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
redeployUserList.add(users1.get(users1.size() - 1));
for (User ruser:redeployUserList for (User ruser:redeployUserList
) { ) {
ruser.setExecute(UNEXECUTED); ruser.setExecute(UNEXECUTED);
...@@ -674,11 +676,21 @@ public class RouterUtils { ...@@ -674,11 +676,21 @@ public class RouterUtils {
//listR.get(0).setApprovalOrder("1"); //listR.get(0).setApprovalOrder("1");
listFlowChildren.get(i).getRelation().get(0).setApprovalOrder("1"); listFlowChildren.get(i).getRelation().get(0).setApprovalOrder("1");
}else { }else {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1); //List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
redeployUser.setExecute(UNEXECUTED); redeployUser.setExecute(UNEXECUTED);
users1.add(redeployUser); users1.add(redeployUser);
//新加的 把转派人跟在后面说
User user = users1.get(users1.size() - 2);
User us = new User();
us.setExecute(UNEXECUTED);
us.setName(user.getName());
us.setId(user.getId());
users1.add(us);
List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size()); List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size());
listUser = ListUtils.union(users1, users2); redeployUserList = users2;
//listUser = ListUtils.union(users1, users2);
n_user = listUser.size(); n_user = listUser.size();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment