|
@@ -1,6 +1,9 @@
|
|
|
package com.ruoyi.project.production.service.impl;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.ServletUtils;
|
|
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
|
@@ -14,6 +17,7 @@ import com.ruoyi.project.system.mapper.SysUserMapper;
|
|
|
import com.ruoyi.project.system.mapper.SysUserRoleMapper;
|
|
|
import com.ruoyi.project.system.service.ISysDictTypeService;
|
|
|
import com.ruoyi.project.system.service.ISysRoleService;
|
|
|
+import com.ruoyi.project.system.service.ISysUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.project.production.mapper.TSaiApplyMapper;
|
|
@@ -47,6 +51,9 @@ public class TSaiApplyServiceImpl implements ITSaiApplyService
|
|
|
@Autowired
|
|
|
private SysUserRoleMapper userRoleMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysUserService userService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询SAI开项管理
|
|
|
*
|
|
@@ -72,6 +79,12 @@ public class TSaiApplyServiceImpl implements ITSaiApplyService
|
|
|
@Override
|
|
|
public List<TSaiApply> selectTSaiApplyList(SaiApplyQueryVO tSaiApply)
|
|
|
{
|
|
|
+ List<SysUser> userList = userService.selectUserList(new SysUser());
|
|
|
+ Map<String, String> nameMap = new HashMap<String, String>();
|
|
|
+ for (SysUser sysUser : userList) {
|
|
|
+ nameMap.put(sysUser.getStaffId(), sysUser.getNickName());
|
|
|
+ }
|
|
|
+
|
|
|
List<TSaiApply> tSaiApplies = tSaiApplyMapper.selectTSaiApplyList(tSaiApply);
|
|
|
List<SysDictData> staffUnitDict = iSysDictTypeService.selectDictDataByType("STAFF_UNIT");
|
|
|
for (TSaiApply saiApply : tSaiApplies) {
|
|
@@ -87,25 +100,29 @@ public class TSaiApplyServiceImpl implements ITSaiApplyService
|
|
|
}
|
|
|
}
|
|
|
if (applicant != null) {
|
|
|
- saiApply.setApplicantName(sysUserMapper.selectUserById(Long.parseLong(applicant)).getNickName());
|
|
|
+// saiApply.setApplicantName(sysUserMapper.selectUserById(Long.parseLong(applicant)).getNickName());
|
|
|
+ saiApply.setApplicantName(nameMap.get(Long.parseLong(applicant)));
|
|
|
}
|
|
|
if (handler != null) {
|
|
|
if (handler.indexOf(",") != -1) {
|
|
|
String[] split = handler.split(",");
|
|
|
String handlerName = "";
|
|
|
for (int i = 0; i < split.length; i++) {
|
|
|
- handlerName += sysUserMapper.selectUserById(Long.parseLong(split[i])).getNickName();
|
|
|
+// handlerName += sysUserMapper.selectUserById(Long.parseLong(split[i])).getNickName();
|
|
|
+ handlerName += nameMap.get(Long.parseLong(split[i]));
|
|
|
if (i < split.length - 1) {
|
|
|
handlerName += ",";
|
|
|
}
|
|
|
}
|
|
|
saiApply.setHandlerName(handlerName);
|
|
|
} else {
|
|
|
- saiApply.setHandlerName(sysUserMapper.selectUserById(Long.parseLong(handler)).getNickName());
|
|
|
+// saiApply.setHandlerName(sysUserMapper.selectUserById(Long.parseLong(handler)).getNickName());
|
|
|
+ saiApply.setHandlerName(nameMap.get(Long.parseLong(handler)));
|
|
|
}
|
|
|
}
|
|
|
if (executor != null) {
|
|
|
- saiApply.setExecutorName(sysUserMapper.selectUserById(Long.parseLong(executor)).getNickName());
|
|
|
+// saiApply.setExecutorName(sysUserMapper.selectUserById(Long.parseLong(executor)).getNickName());
|
|
|
+ saiApply.setExecutorName(nameMap.get(Long.parseLong(executor)));
|
|
|
}
|
|
|
}
|
|
|
boolean specialRole = this.isSpecialRole();
|