[修改] 修改 转办 与审批历史

This commit is contained in:
bupengxiang
2023-05-16 11:46:20 +08:00
parent 24da664d0a
commit fcdcea3afc
18 changed files with 33 additions and 15 deletions
@@ -13,6 +13,7 @@ import com.adc.da.sys.vo.UserImportVO;
import com.adc.da.sys.vo.UserVO;
import com.adc.da.util.http.ResponseMessage;
import com.adc.da.util.http.Result;
import com.adc.da.util.utils.CollectionUtils;
import com.adc.da.util.utils.FileUtil;
import com.adc.da.util.utils.StringUtils;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -36,6 +37,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -224,7 +226,10 @@ public class UserEOController extends BaseController<UserEO> {
public ResponseMessage getOwnLeader(String userId){
UserVO userEoById = userEOService.getUserEoById(userId);
List<OrgEO> orgEOList = userEoById.getOrgEOList();
List<UserEO> leaderList = userEOService.getOwnLeader(orgEOList);
List<UserEO> leaderList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(orgEOList)){
leaderList = userEOService.getOwnLeader(orgEOList);
}
return Result.success(leaderList);
}
}
@@ -44,7 +44,7 @@ public interface UserEODao extends BaseMapper<UserEO> {
UserVO getUserEoById(@Param("usid") String usid);
UserEO selectUserByIdNodel(String userId);
UserVO selectUserByIdNodel(String userId);
List<UserEO> getOwnLeader(@Param("Vo") List<OrgEO> orgEOList);
}
@@ -328,7 +328,7 @@ public class UserEOServiceImpl implements IUserEoService {
}
@Override
public UserEO getUserByIdNodel(String userId) {
public UserVO getUserByIdNodel(String userId) {
return dao.selectUserByIdNodel(userId);
}
@@ -67,7 +67,7 @@ public interface IUserEoService {
* @param userId
* @return
*/
UserEO getUserByIdNodel(String userId);
UserVO getUserByIdNodel(String userId);
List<UserEO> getOwnLeader(List<OrgEO> orgEOList);
}
@@ -207,7 +207,7 @@
where users.del_flag != 1
and users.usid=#{usid}
</select>
<select id="selectUserByIdNodel" resultType="com.adc.da.sys.entity.UserEO">
<select id="selectUserByIdNodel" resultMap="UserDetailMap">
select
users.usid,
users.usname,
@@ -230,7 +230,7 @@
where users.usid=#{usid}
</select>
<select id="getUserByIdListNodel" resultType="com.adc.da.sys.vo.UserVO">
<select id="getUserByIdListNodel" resultMap="UserDetailMap">
select
users.usid,
@@ -207,7 +207,7 @@
where users.del_flag != 1
and users.usid=#{usid}
</select>
<select id="selectUserByIdNodel" resultType="com.adc.da.sys.entity.UserEO">
<select id="selectUserByIdNodel" resultMap="UserDetailMap">
select
users.usid,
users.usname,
@@ -230,7 +230,7 @@
where users.usid=#{usid}
</select>
<select id="getUserByIdListNodel" resultType="com.adc.da.sys.vo.UserVO">
<select id="getUserByIdListNodel" resultMap="UserDetailMap">
select
users.usid,
@@ -87,7 +87,7 @@ public class TaskController {
BusProcessNew processNew = iBusProcessNewService.getOne(processNewQueryWrapper);
if(processNew!=null){
UserEO assignee = userEoService.getUserByIdNodel(processNew.getUserId());
UserVO assignee = userEoService.getUserByIdNodel(processNew.getUserId());
if(assignee != null){
historicTaskInstance.put("assignee", assignee.getUsname());
historicTaskInstance.put("assigneeId", assignee.getUsid());
@@ -101,7 +101,7 @@ public class TaskController {
historicTaskInstance.put("assignee", assignee.getUsname());
historicTaskInstance.put("assigneeId", assignee.getUsid());
if(assignee.getOrgEOList().size()>0){
historicTaskInstance.put("orgName",assignee.getOrgEOList().get(0));
historicTaskInstance.put("orgName",assignee.getOrgEOList().get(0).getOrgName());
}
QueryWrapper queryWrapper2 = new QueryWrapper();
queryWrapper2.eq("TASK_ID",historicTaskInstance.get("id"));
@@ -115,8 +115,11 @@ public class TaskController {
HashMap<String, Object> map = new HashMap<>();
UserEO assigneenActual = userEoService.getUserById(busProcessEntrust.getUserId());
String consigner = assigneenActual.getUsname();
UserEO userById = userEoService.getUserById(busProcessEntrust.getEnUserId());
UserVO userById = userEoService.getUserByIdNodel(busProcessEntrust.getEnUserId());
String enUserName = userById.getUsname();
if(userById.getOrgEOList().size()>0){
map.put("orgName",userById.getOrgEOList().get(0).getOrgName());
}
map.put("assignee", enUserName+"(" + consigner + " 委托)");
map.put("assigneeId", busProcessEntrust.getEnUserId());
map.put("prcType",one.getPrcType());
@@ -283,10 +283,14 @@ public class TodoTaskController {
@ApiImplicitParams({@ApiImplicitParam(name = "taskId", value = "任务id"),
@ApiImplicitParam(name = "assignee", value = "被改派人员"), @ApiImplicitParam(name = "userId", value = "改派人员"),
@ApiImplicitParam(name = "pId", value = "流程实例ID")})
@GetMapping("/changeAssigneeNew")
public Wrapper<String> changeAssigneeNew(String taskId, String assignee, String userId, String pId,
@RequestParam(required = false,value = "replaceMap")String replaceMap,
String approvalOpinion) {
@PostMapping("/changeAssigneeNew")
public Wrapper<String> changeAssigneeNew(@RequestBody BusProcessEntrust busProcessEntrustEO) {
String assignee = busProcessEntrustEO.getAssignee();
String taskId = busProcessEntrustEO.getTaskId();
String pId = busProcessEntrustEO.getPrcId();
String userId = busProcessEntrustEO.getUserId();
String approvalOpinion = busProcessEntrustEO.getApprovalOpinion();
String replaceMap = busProcessEntrustEO.getReplaceMap();
List<String> list = Arrays.asList(taskId.split(","));
for (String str : list) {
@@ -67,4 +67,10 @@ public class BusProcessEntrust implements Serializable {
@TableField("APPROVAL_OPINION")
private String approvalOpinion;
@TableField(exist = false)
private String replaceMap;
@TableField(exist = false)
private String assignee;
}