|
|
@ -26,8 +26,6 @@ import java.util.*; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 专门用来展示页面的controller |
|
|
* 专门用来展示页面的controller |
|
|
* |
|
|
|
|
|
* @author Dreamchaser |
|
|
|
|
|
*/ |
|
|
*/ |
|
|
@Controller |
|
|
@Controller |
|
|
public class PageController { |
|
|
public class PageController { |
|
|
@ -192,15 +190,17 @@ public class PageController { |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
String header = request.getHeader("user-agent"); |
|
|
String header = request.getHeader("user-agent"); |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
boolean b = DeviceUtil.checkAgentIsMobile(header); |
|
|
boolean b = DeviceUtil.checkAgentIsMobile(header); |
|
|
List<SimpleTaskP> list = getUserSimpleTaskP(userToken); |
|
|
List<SimpleTaskP> list = getUserSimpleTaskP(userToken,userKey,token); |
|
|
mv.addObject("myTaskList", list); |
|
|
mv.addObject("myTaskList", list); |
|
|
if (b) { |
|
|
if (b) { |
|
|
List<NoticeP> noticeByUnRead = noticeService.findNoticeByUnRead(userToken); |
|
|
List<NoticeP> noticeByUnRead = noticeService.findNoticeByUnRead(userToken,userKey,token); |
|
|
mv.addObject("notices", noticeByUnRead); |
|
|
mv.addObject("notices", noticeByUnRead); |
|
|
mv.setViewName("pages/other/welcome_mobile"); |
|
|
mv.setViewName("pages/other/welcome_mobile"); |
|
|
} else { |
|
|
} else { |
|
|
@ -222,7 +222,7 @@ public class PageController { |
|
|
map.put("startDate", days.get(1)); |
|
|
map.put("startDate", days.get(1)); |
|
|
map.put("endDate", days.get(0)); |
|
|
map.put("endDate", days.get(0)); |
|
|
map.put("userAgent", Md5.crypt(header)); |
|
|
map.put("userAgent", Md5.crypt(header)); |
|
|
mv.addObject("notices", noticeService.findNoticeByCondition(map, userToken)); |
|
|
mv.addObject("notices", noticeService.findNoticeByCondition(map, userToken,userKey,token)); |
|
|
} |
|
|
} |
|
|
// 查询当前用户所在部门
|
|
|
// 查询当前用户所在部门
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
@ -264,12 +264,14 @@ public class PageController { |
|
|
mv.setViewName("pages/self/message"); |
|
|
mv.setViewName("pages/self/message"); |
|
|
String header = request.getHeader("user-agent"); |
|
|
String header = request.getHeader("user-agent"); |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
List<SimpleTaskP> list = getUserSimpleTaskP(userToken); |
|
|
List<SimpleTaskP> list = getUserSimpleTaskP(userToken,userKey,token); |
|
|
List<SimpleTaskP> userSimpleApplyP = getUserSimpleApplyP(userToken); |
|
|
List<SimpleTaskP> userSimpleApplyP = getUserSimpleApplyP(userToken,userKey,token); |
|
|
|
|
|
|
|
|
mv.addObject("myTaskList", list); |
|
|
mv.addObject("myTaskList", list); |
|
|
mv.addObject("myApplyList", userSimpleApplyP); |
|
|
mv.addObject("myApplyList", userSimpleApplyP); |
|
|
@ -289,7 +291,7 @@ public class PageController { |
|
|
map.put("startDate", days.get(1)); |
|
|
map.put("startDate", days.get(1)); |
|
|
map.put("endDate", days.get(0)); |
|
|
map.put("endDate", days.get(0)); |
|
|
map.put("userAgent", Md5.crypt(header)); |
|
|
map.put("userAgent", Md5.crypt(header)); |
|
|
mv.addObject("notices", noticeService.findNoticeByCondition(map, userToken)); |
|
|
mv.addObject("notices", noticeService.findNoticeByCondition(map, userToken,userKey,token)); |
|
|
return mv; |
|
|
return mv; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -301,13 +303,15 @@ public class PageController { |
|
|
@GetMapping("/depository_add") |
|
|
@GetMapping("/depository_add") |
|
|
public ModelAndView depository_add(HttpServletRequest request) { |
|
|
public ModelAndView depository_add(HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userByPort = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userByPort = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/warehouse/depository_add"); |
|
|
mv.setViewName("pages/warehouse/depository_add"); |
|
|
Map<String, Object> administration = LinkInterfaceUtil.findAdministration(userByPort); |
|
|
Map<String, Object> administration = LinkInterfaceUtil.findAdministration(userKey,token); |
|
|
List<AdministrationP> administrationPList = (List<AdministrationP>) administration.get("administrationPList"); |
|
|
List<AdministrationP> administrationPList = (List<AdministrationP>) administration.get("administrationPList"); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
return mv; |
|
|
return mv; |
|
|
@ -321,15 +325,17 @@ public class PageController { |
|
|
@GetMapping("/depository-out") |
|
|
@GetMapping("/depository-out") |
|
|
public ModelAndView depository_out(HttpServletRequest request) { |
|
|
public ModelAndView depository_out(HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/warehouse/depository-out"); |
|
|
mv.setViewName("pages/warehouse/depository-out"); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
map.put("parentId", 0); |
|
|
map.put("parentId", 0); |
|
|
List<Depository> depositoryAll = depositoryService.findDepositoryByCondition(map, userToken); |
|
|
List<Depository> depositoryAll = depositoryService.findDepositoryByCondition(map,userKey,token); |
|
|
Integer role = userToken.getIsadmin(); |
|
|
Integer role = userToken.getIsadmin(); |
|
|
if (role == null) { |
|
|
if (role == null) { |
|
|
role = 1; |
|
|
role = 1; |
|
|
@ -945,13 +951,15 @@ public class PageController { |
|
|
@GetMapping("/table_user") |
|
|
@GetMapping("/table_user") |
|
|
public ModelAndView table_user(HttpServletRequest request) { |
|
|
public ModelAndView table_user(HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/user/table-user"); |
|
|
mv.setViewName("pages/user/table-user"); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findAllCompany(userToken); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findAllCompany(userKey,token); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
return mv; |
|
|
return mv; |
|
|
} |
|
|
} |
|
|
@ -1370,13 +1378,15 @@ public class PageController { |
|
|
@GetMapping("/user_add") |
|
|
@GetMapping("/user_add") |
|
|
public ModelAndView user_add(Integer userId, Integer classes, HttpServletRequest request) { |
|
|
public ModelAndView user_add(Integer userId, Integer classes, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/user/user-add"); |
|
|
mv.setViewName("pages/user/user-add"); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(userId, userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(userId, userKey,token); |
|
|
UserByPortP userByPortP = new UserByPortP(userByPort); |
|
|
UserByPortP userByPortP = new UserByPortP(userByPort); |
|
|
mv.addObject("userByPort", userByPortP); |
|
|
mv.addObject("userByPort", userByPortP); |
|
|
mv.addObject("classes", classes); |
|
|
mv.addObject("classes", classes); |
|
|
@ -1393,13 +1403,15 @@ public class PageController { |
|
|
@GetMapping("/user_addForIn") |
|
|
@GetMapping("/user_addForIn") |
|
|
public ModelAndView user_addForIn(Integer userId, Integer classes, HttpServletRequest request) { |
|
|
public ModelAndView user_addForIn(Integer userId, Integer classes, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/user/user-addForIn"); |
|
|
mv.setViewName("pages/user/user-addForIn"); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(userId, userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(userId, userKey,token); |
|
|
UserByPortP userByPortP = new UserByPortP(userByPort); |
|
|
UserByPortP userByPortP = new UserByPortP(userByPort); |
|
|
mv.addObject("userByPort", userByPortP); |
|
|
mv.addObject("userByPort", userByPortP); |
|
|
mv.addObject("classes", classes); |
|
|
mv.addObject("classes", classes); |
|
|
@ -1416,8 +1428,10 @@ public class PageController { |
|
|
@GetMapping("/user_role_edit") |
|
|
@GetMapping("/user_role_edit") |
|
|
public ModelAndView user_role_edit(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView user_role_edit(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1425,7 +1439,7 @@ public class PageController { |
|
|
RoleAndDepository roleAndDepositoryById = roleService.findRoleAndDepositoryById(id); |
|
|
RoleAndDepository roleAndDepositoryById = roleService.findRoleAndDepositoryById(id); |
|
|
UserByPortP userByPortP = null; |
|
|
UserByPortP userByPortP = null; |
|
|
if (roleAndDepositoryById != null) { |
|
|
if (roleAndDepositoryById != null) { |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(roleAndDepositoryById.getUserId(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(roleAndDepositoryById.getUserId(), userKey,token); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP.setDepositoryName(roleAndDepositoryById.getDepositoryName()); |
|
|
userByPortP.setDepositoryName(roleAndDepositoryById.getDepositoryName()); |
|
|
} |
|
|
} |
|
|
@ -1444,8 +1458,10 @@ public class PageController { |
|
|
@GetMapping("/user_role_editForIn") |
|
|
@GetMapping("/user_role_editForIn") |
|
|
public ModelAndView user_role_editForIn(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView user_role_editForIn(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1453,7 +1469,7 @@ public class PageController { |
|
|
RoleAndMaterialType roleAndMaterialTypeById = roleService.findRoleAndMaterialTypeById(id); |
|
|
RoleAndMaterialType roleAndMaterialTypeById = roleService.findRoleAndMaterialTypeById(id); |
|
|
UserByPortP userByPortP = null; |
|
|
UserByPortP userByPortP = null; |
|
|
if (roleAndMaterialTypeById != null) { |
|
|
if (roleAndMaterialTypeById != null) { |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(roleAndMaterialTypeById.getUid(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(roleAndMaterialTypeById.getUid(), userKey,token); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP.setMaterialTypeName(roleAndMaterialTypeById.getTname()); |
|
|
userByPortP.setMaterialTypeName(roleAndMaterialTypeById.getTname()); |
|
|
} |
|
|
} |
|
|
@ -1474,16 +1490,18 @@ public class PageController { |
|
|
@GetMapping("/post_role_edit") |
|
|
@GetMapping("/post_role_edit") |
|
|
public ModelAndView post_role_edit(Integer id, Integer depositoryId, HttpServletRequest request) { |
|
|
public ModelAndView post_role_edit(Integer id, Integer depositoryId, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/post/postRole_edit"); |
|
|
mv.setViewName("pages/post/postRole_edit"); |
|
|
Map<String, Object> userParam = new HashMap<>(); |
|
|
Map<String, Object> userParam = new HashMap<>(); |
|
|
userParam.put("position", id); |
|
|
userParam.put("position", id); |
|
|
List<UserByPort> userByPortList = LinkInterfaceUtil.FindUserByMap(userParam, userToken); |
|
|
List<UserByPort> userByPortList = LinkInterfaceUtil.FindUserByMap(userParam, userKey,token); |
|
|
Post postById = LinkInterfaceUtil.findPostById(id, userToken); |
|
|
Post postById = LinkInterfaceUtil.findPostById(id, userKey,token); |
|
|
PostP pp = new PostP(postById); |
|
|
PostP pp = new PostP(postById); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
param.put("depositoryId", depositoryId); |
|
|
param.put("depositoryId", depositoryId); |
|
|
@ -1506,8 +1524,10 @@ public class PageController { |
|
|
@GetMapping("/user_detail") |
|
|
@GetMapping("/user_detail") |
|
|
public ModelAndView user_edit(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView user_edit(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1515,7 +1535,7 @@ public class PageController { |
|
|
mv.addObject("depositories", depositoryService.findDepositoryAll()); |
|
|
mv.addObject("depositories", depositoryService.findDepositoryAll()); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
map.put("number", id.toString()); |
|
|
map.put("number", id.toString()); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserByMap(map, userToken).get(0); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserByMap(map, userKey,token).get(0); |
|
|
mv.addObject("user", userByPort); |
|
|
mv.addObject("user", userByPort); |
|
|
return mv; |
|
|
return mv; |
|
|
} |
|
|
} |
|
|
@ -1530,8 +1550,10 @@ public class PageController { |
|
|
@GetMapping("/warehouse_view") |
|
|
@GetMapping("/warehouse_view") |
|
|
public ModelAndView warehouse_view(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView warehouse_view(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1542,8 +1564,8 @@ public class PageController { |
|
|
|
|
|
|
|
|
mv.addObject("record", depositoryRecordById); |
|
|
mv.addObject("record", depositoryRecordById); |
|
|
Integer cid = depositoryRecordById.getCid(); |
|
|
Integer cid = depositoryRecordById.getCid(); |
|
|
List<AdministrationP> postList = LinkInterfaceUtil.findCompanyBySuperior(cid.toString(), userToken); |
|
|
List<AdministrationP> postList = LinkInterfaceUtil.findCompanyBySuperior(cid.toString(), userKey,token); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findAllCompany(userToken); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findAllCompany(userKey,token); |
|
|
// 部门列表
|
|
|
// 部门列表
|
|
|
mv.addObject("postList", postList); |
|
|
mv.addObject("postList", postList); |
|
|
// 公司列表
|
|
|
// 公司列表
|
|
|
@ -1564,8 +1586,10 @@ public class PageController { |
|
|
@GetMapping("/warehouseByParentId") |
|
|
@GetMapping("/warehouseByParentId") |
|
|
public ModelAndView warehouseByParentId(Integer parentId, HttpServletRequest request) { |
|
|
public ModelAndView warehouseByParentId(Integer parentId, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1574,7 +1598,7 @@ public class PageController { |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
param.put("parentId", parentId); |
|
|
param.put("parentId", parentId); |
|
|
mv.addObject("parentId", parentId); |
|
|
mv.addObject("parentId", parentId); |
|
|
mv.addObject("depositories", depositoryService.findDepositoryByCondition(param, userToken)); |
|
|
mv.addObject("depositories", depositoryService.findDepositoryByCondition(param,userKey,token)); |
|
|
} else { |
|
|
} else { |
|
|
throw new MyException("缺少必要参数!"); |
|
|
throw new MyException("缺少必要参数!"); |
|
|
} |
|
|
} |
|
|
@ -1647,8 +1671,10 @@ public class PageController { |
|
|
@GetMapping("/findWareHouseByParentId") |
|
|
@GetMapping("/findWareHouseByParentId") |
|
|
public ModelAndView findWareHouseByParentId(Integer parentId, HttpServletRequest request) { |
|
|
public ModelAndView findWareHouseByParentId(Integer parentId, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userByPort = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userByPort = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1656,9 +1682,9 @@ public class PageController { |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
param.put("parentId", parentId); |
|
|
param.put("parentId", parentId); |
|
|
mv.addObject("parentId", parentId); |
|
|
mv.addObject("parentId", parentId); |
|
|
List<Depository> depositoryRecordPByCondition = depositoryService.findDepositoryByCondition(param, userByPort); |
|
|
List<Depository> depositoryRecordPByCondition = depositoryService.findDepositoryByCondition(param, userKey,token); |
|
|
param.put("state", 2); |
|
|
param.put("state", 2); |
|
|
List<Depository> depositoryRecordPByConditionForState = depositoryService.findDepositoryByCondition(param, userByPort); |
|
|
List<Depository> depositoryRecordPByConditionForState = depositoryService.findDepositoryByCondition(param, userKey,token); |
|
|
Integer role = userByPort.getIsadmin(); |
|
|
Integer role = userByPort.getIsadmin(); |
|
|
if (role == null) { |
|
|
if (role == null) { |
|
|
role = 1; |
|
|
role = 1; |
|
|
@ -1824,8 +1850,10 @@ public class PageController { |
|
|
@GetMapping("/application_review") |
|
|
@GetMapping("/application_review") |
|
|
public ModelAndView application_review(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView application_review(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1901,7 +1929,7 @@ public class PageController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 申请人
|
|
|
// 申请人
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(recordP.getApplicantId(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(recordP.getApplicantId(), userKey,token); |
|
|
// 部门负责人
|
|
|
// 部门负责人
|
|
|
String departmentheads = recordP.getDepartmenthead(); |
|
|
String departmentheads = recordP.getDepartmenthead(); |
|
|
String[] split = departmentheads.split(","); |
|
|
String[] split = departmentheads.split(","); |
|
|
@ -1910,7 +1938,7 @@ public class PageController { |
|
|
if ("".equals(value)) { |
|
|
if ("".equals(value)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort departmenthead = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(value.trim()), userToken); |
|
|
UserByPort departmenthead = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(value.trim()), userKey,token); |
|
|
departmentHeadName.append(departmenthead.getName()).append(","); |
|
|
departmentHeadName.append(departmenthead.getName()).append(","); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -1927,7 +1955,7 @@ public class PageController { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
Integer managerid = ObjectFormatUtil.toInteger(s.trim()); |
|
|
Integer managerid = ObjectFormatUtil.toInteger(s.trim()); |
|
|
UserByPort user = LinkInterfaceUtil.FindUserById(managerid, userToken); |
|
|
UserByPort user = LinkInterfaceUtil.FindUserById(managerid, userKey,token); |
|
|
depositoryManager.add(user); |
|
|
depositoryManager.add(user); |
|
|
depositoryManagerNames.append(user.getName()).append(","); |
|
|
depositoryManagerNames.append(user.getName()).append(","); |
|
|
} |
|
|
} |
|
|
@ -1961,8 +1989,10 @@ public class PageController { |
|
|
@GetMapping("/form_step_look") |
|
|
@GetMapping("/form_step_look") |
|
|
public ModelAndView form_step_look(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView form_step_look(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -1990,7 +2020,7 @@ public class PageController { |
|
|
for (String approverId : airapproverId |
|
|
for (String approverId : airapproverId |
|
|
) { |
|
|
) { |
|
|
if (!"".equals(approverId)) { |
|
|
if (!"".equals(approverId)) { |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userKey,token); |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -2000,7 +2030,7 @@ public class PageController { |
|
|
mv.addObject("placeCode", placeCode); |
|
|
mv.addObject("placeCode", placeCode); |
|
|
if (Integer.compare(flagForGroup, 2) != 0) { |
|
|
if (Integer.compare(flagForGroup, 2) != 0) { |
|
|
// 如果不是组合
|
|
|
// 如果不是组合
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationInRecordPById.getApplicantId(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationInRecordPById.getApplicantId(), userKey,token); |
|
|
applicationInRecordPById.setApplicantName(userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantName(userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordPById.getApplicantTime()))); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordPById.getApplicantTime()))); |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
@ -2036,8 +2066,10 @@ public class PageController { |
|
|
@GetMapping("/application_in_review") |
|
|
@GetMapping("/application_in_review") |
|
|
public ModelAndView application_in_review(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView application_in_review(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -2065,7 +2097,7 @@ public class PageController { |
|
|
for (String approverId : airapproverId |
|
|
for (String approverId : airapproverId |
|
|
) { |
|
|
) { |
|
|
if (!"".equals(approverId)) { |
|
|
if (!"".equals(approverId)) { |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userKey,token); |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -2075,7 +2107,7 @@ public class PageController { |
|
|
mv.addObject("placeCode", placeCode); |
|
|
mv.addObject("placeCode", placeCode); |
|
|
if (Integer.compare(flagForGroup, 2) != 0) { |
|
|
if (Integer.compare(flagForGroup, 2) != 0) { |
|
|
// 如果不是组合
|
|
|
// 如果不是组合
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationInRecordPById.getApplicantId(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationInRecordPById.getApplicantId(), userKey,token); |
|
|
applicationInRecordPById.setApplicantName(userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantName(userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordPById.getApplicantTime()))); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordPById.getApplicantTime()))); |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
@ -2111,8 +2143,10 @@ public class PageController { |
|
|
@GetMapping("/form_step_lookByminRecordOut") |
|
|
@GetMapping("/form_step_lookByminRecordOut") |
|
|
public ModelAndView form_step_lookByminRecordOut(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView form_step_lookByminRecordOut(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -2130,7 +2164,7 @@ public class PageController { |
|
|
// 获取处理人
|
|
|
// 获取处理人
|
|
|
Integer checkId = recordMinP.getCheckId(); |
|
|
Integer checkId = recordMinP.getCheckId(); |
|
|
if (checkId != null) { |
|
|
if (checkId != null) { |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(checkId, userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(checkId, userKey,token); |
|
|
|
|
|
|
|
|
// 设置处理人姓名
|
|
|
// 设置处理人姓名
|
|
|
recordMinP.setCheckerName(userByPort.getName()); |
|
|
recordMinP.setCheckerName(userByPort.getName()); |
|
|
@ -2213,8 +2247,10 @@ public class PageController { |
|
|
@GetMapping("/ApplicationOutView") |
|
|
@GetMapping("/ApplicationOutView") |
|
|
public ModelAndView ApplicationOutView(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView ApplicationOutView(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
@ -2265,7 +2301,7 @@ public class PageController { |
|
|
if (checkId != null) { |
|
|
if (checkId != null) { |
|
|
// 如果当前子订单已经处理
|
|
|
// 如果当前子订单已经处理
|
|
|
// 获取当前处理人
|
|
|
// 获取当前处理人
|
|
|
UserByPort disposer = LinkInterfaceUtil.FindUserById(checkId, userToken); |
|
|
UserByPort disposer = LinkInterfaceUtil.FindUserById(checkId, userKey,token); |
|
|
outDisposer.append(disposer.getName()).append(","); |
|
|
outDisposer.append(disposer.getName()).append(","); |
|
|
recordMinP.setCheckerName(disposer.getName()); |
|
|
recordMinP.setCheckerName(disposer.getName()); |
|
|
// 获取出库库位
|
|
|
// 获取出库库位
|
|
|
@ -2318,7 +2354,7 @@ public class PageController { |
|
|
recordMinPList.add(recordMinP); |
|
|
recordMinPList.add(recordMinP); |
|
|
} |
|
|
} |
|
|
// 申请人
|
|
|
// 申请人
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationOutRecordPById.getApplicantId(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationOutRecordPById.getApplicantId(), userKey,token); |
|
|
// 部门负责人
|
|
|
// 部门负责人
|
|
|
String departmentHead = applicationOutRecordPById.getDepartmenthead(); |
|
|
String departmentHead = applicationOutRecordPById.getDepartmenthead(); |
|
|
String[] split = departmentHead.split(","); |
|
|
String[] split = departmentHead.split(","); |
|
|
@ -2331,7 +2367,7 @@ public class PageController { |
|
|
if ("".equals(value)) { |
|
|
if ("".equals(value)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort departmenthead = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(value), userToken); |
|
|
UserByPort departmenthead = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(value), userKey,token); |
|
|
departmentHeadName.append(departmenthead.getName()).append(","); |
|
|
departmentHeadName.append(departmenthead.getName()).append(","); |
|
|
} |
|
|
} |
|
|
// 仓储中心负责人
|
|
|
// 仓储中心负责人
|
|
|
@ -2347,7 +2383,7 @@ public class PageController { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
Integer managerid = ObjectFormatUtil.toInteger(s); |
|
|
Integer managerid = ObjectFormatUtil.toInteger(s); |
|
|
UserByPort user = LinkInterfaceUtil.FindUserById(managerid, userToken); |
|
|
UserByPort user = LinkInterfaceUtil.FindUserById(managerid, userKey,token); |
|
|
depositoryManager.add(user); |
|
|
depositoryManager.add(user); |
|
|
depositoryManagerNames.append(user.getName()); |
|
|
depositoryManagerNames.append(user.getName()); |
|
|
} |
|
|
} |
|
|
@ -2355,7 +2391,7 @@ public class PageController { |
|
|
Integer adminorgId = applicationOutRecordPById.getAdminorgId(); |
|
|
Integer adminorgId = applicationOutRecordPById.getAdminorgId(); |
|
|
Integer constructionUnitId = applicationOutRecordPById.getConstructionUnitId(); |
|
|
Integer constructionUnitId = applicationOutRecordPById.getConstructionUnitId(); |
|
|
if (adminorgId != null) { |
|
|
if (adminorgId != null) { |
|
|
Administration company = LinkInterfaceUtil.getCompany(adminorgId, userToken); |
|
|
Administration company = LinkInterfaceUtil.getCompany(adminorgId, userKey,token); |
|
|
applicationOutRecordPById.setAdminorgName(company.getName()); |
|
|
applicationOutRecordPById.setAdminorgName(company.getName()); |
|
|
mv.addObject("adisplay", "table-row"); |
|
|
mv.addObject("adisplay", "table-row"); |
|
|
} else { |
|
|
} else { |
|
|
@ -2459,8 +2495,10 @@ public class PageController { |
|
|
public ModelAndView StockTakingReview(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView StockTakingReview(Integer id, HttpServletRequest request) { |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
|
|
|
|
|
@ -2474,7 +2512,7 @@ public class PageController { |
|
|
stp.setCreateTime(DateUtil.TimeStampToDateTime(stockTaking.getCreateTime())); |
|
|
stp.setCreateTime(DateUtil.TimeStampToDateTime(stockTaking.getCreateTime())); |
|
|
|
|
|
|
|
|
// 获取申请人
|
|
|
// 获取申请人
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(stockTaking.getOriginator(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(stockTaking.getOriginator(), userKey,token); |
|
|
// 设置盘点发起人姓名
|
|
|
// 设置盘点发起人姓名
|
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
|
|
|
|
|
|
@ -2516,8 +2554,10 @@ public class PageController { |
|
|
public ModelAndView StockTakingView(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView StockTakingView(Integer id, HttpServletRequest request) { |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
mv.setViewName("pages/stockTaking/stockTakingView"); |
|
|
mv.setViewName("pages/stockTaking/stockTakingView"); |
|
|
@ -2550,7 +2590,7 @@ public class PageController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取申请人
|
|
|
// 获取申请人
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(stockTaking.getOriginator(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(stockTaking.getOriginator(), userKey,token); |
|
|
// 设置盘点发起人姓名
|
|
|
// 设置盘点发起人姓名
|
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
|
|
|
|
|
|
@ -2587,11 +2627,13 @@ public class PageController { |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/user/userInfo"); |
|
|
mv.setViewName("pages/user/userInfo"); |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
Administration company = LinkInterfaceUtil.getCompany(userToken.getMaindeparment(), userToken); |
|
|
Administration company = LinkInterfaceUtil.getCompany(userToken.getMaindeparment(), userKey,token); |
|
|
userToken.setMaindeparmentname(company.getName()); |
|
|
userToken.setMaindeparmentname(company.getName()); |
|
|
mv.addObject("userInfo", userToken); |
|
|
mv.addObject("userInfo", userToken); |
|
|
return mv; |
|
|
return mv; |
|
|
@ -2640,13 +2682,15 @@ public class PageController { |
|
|
@GetMapping("/company_out") |
|
|
@GetMapping("/company_out") |
|
|
public ModelAndView Company_Out(HttpServletRequest request) { |
|
|
public ModelAndView Company_Out(HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/company/company-out"); |
|
|
mv.setViewName("pages/company/company-out"); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findAllCompany(userToken); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findAllCompany(userKey,token); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("level", 3); |
|
|
mv.addObject("level", 3); |
|
|
mv.addObject("parentId", "313"); |
|
|
mv.addObject("parentId", "313"); |
|
|
@ -2676,8 +2720,10 @@ public class PageController { |
|
|
@GetMapping("/company_detail") |
|
|
@GetMapping("/company_detail") |
|
|
public ModelAndView company_detail(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView company_detail(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userByPort = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userByPort = AuthenticationTokenPool.getUserToken(token); |
|
|
String url = PublicConfig.external_url + "/org/getgovcont"; |
|
|
String url = PublicConfig.external_url + "/org/getgovcont"; |
|
|
@ -2691,14 +2737,14 @@ public class PageController { |
|
|
JSONObject paramObject = JSONObject.parseObject(jsonString); |
|
|
JSONObject paramObject = JSONObject.parseObject(jsonString); |
|
|
String post = null; |
|
|
String post = null; |
|
|
try { |
|
|
try { |
|
|
post = HttpUtils.send(url, paramObject, HTTP.UTF_8, userByPort); |
|
|
post = HttpUtils.send(url, paramObject, HTTP.UTF_8, userKey,token); |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
JSONObject jsonObject = JSONObject.parseObject(post); |
|
|
JSONObject jsonObject = JSONObject.parseObject(post); |
|
|
JSONObject data = (JSONObject) jsonObject.get("data"); |
|
|
JSONObject data = (JSONObject) jsonObject.get("data"); |
|
|
Administration administration = JSONObject.toJavaObject(data, Administration.class); |
|
|
Administration administration = JSONObject.toJavaObject(data, Administration.class); |
|
|
String SuperiorName = LinkInterfaceUtil.getCompany(administration.getSuperior(), userByPort).getName(); |
|
|
String SuperiorName = LinkInterfaceUtil.getCompany(administration.getSuperior(), userKey,token).getName(); |
|
|
mv.addObject("record", administration); |
|
|
mv.addObject("record", administration); |
|
|
mv.addObject("SuperiorName", SuperiorName); |
|
|
mv.addObject("SuperiorName", SuperiorName); |
|
|
} else { |
|
|
} else { |
|
|
@ -2718,15 +2764,17 @@ public class PageController { |
|
|
@GetMapping("/findCompanyByParentId") |
|
|
@GetMapping("/findCompanyByParentId") |
|
|
public ModelAndView findCompanyByParentId(Integer parentId, Integer level, HttpServletRequest request) { |
|
|
public ModelAndView findCompanyByParentId(Integer parentId, Integer level, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
if (parentId != null) { |
|
|
if (parentId != null) { |
|
|
mv.addObject("parentId", parentId); |
|
|
mv.addObject("parentId", parentId); |
|
|
mv.addObject("level", level + 1); |
|
|
mv.addObject("level", level + 1); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findCompanyBySuperior(parentId.toString(), userToken); |
|
|
List<AdministrationP> administrationPList = LinkInterfaceUtil.findCompanyBySuperior(parentId.toString(), userKey,token); |
|
|
if (administrationPList.size() > 0) { |
|
|
if (administrationPList.size() > 0) { |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.setViewName("pages/company/company-out"); |
|
|
mv.setViewName("pages/company/company-out"); |
|
|
@ -2748,8 +2796,10 @@ public class PageController { |
|
|
@GetMapping("/findPostByOrganization") |
|
|
@GetMapping("/findPostByOrganization") |
|
|
public ModelAndView findPostByOrganization(Integer organization, HttpServletRequest request) { |
|
|
public ModelAndView findPostByOrganization(Integer organization, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
String url = PublicConfig.external_url + "/org/positionlist"; |
|
|
String url = PublicConfig.external_url + "/org/positionlist"; |
|
|
@ -2762,7 +2812,7 @@ public class PageController { |
|
|
JSONObject paramObject = JSONObject.parseObject(jsonString); |
|
|
JSONObject paramObject = JSONObject.parseObject(jsonString); |
|
|
String post = null; |
|
|
String post = null; |
|
|
try { |
|
|
try { |
|
|
post = HttpUtils.send(url, paramObject, HTTP.UTF_8, userToken); |
|
|
post = HttpUtils.send(url, paramObject, HTTP.UTF_8, userKey,token); |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
@ -2795,14 +2845,16 @@ public class PageController { |
|
|
@GetMapping("/post_detail") |
|
|
@GetMapping("/post_detail") |
|
|
public ModelAndView post_detail(Integer id, HttpServletRequest request) { |
|
|
public ModelAndView post_detail(Integer id, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/post/post-view"); |
|
|
mv.setViewName("pages/post/post-view"); |
|
|
if (id != null) { |
|
|
if (id != null) { |
|
|
Post object = LinkInterfaceUtil.findPostById(id, userToken); |
|
|
Post object = LinkInterfaceUtil.findPostById(id, userKey,token); |
|
|
mv.addObject("record", object); |
|
|
mv.addObject("record", object); |
|
|
} else { |
|
|
} else { |
|
|
throw new MyException("缺少必要参数!"); |
|
|
throw new MyException("缺少必要参数!"); |
|
|
@ -2814,8 +2866,10 @@ public class PageController { |
|
|
@GetMapping("/findPostByParentId") |
|
|
@GetMapping("/findPostByParentId") |
|
|
public ModelAndView findPostByParentId(Integer parentId, HttpServletRequest request) { |
|
|
public ModelAndView findPostByParentId(Integer parentId, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
String url = PublicConfig.external_url + "/org/positionlist"; |
|
|
String url = PublicConfig.external_url + "/org/positionlist"; |
|
|
@ -2828,7 +2882,7 @@ public class PageController { |
|
|
JSONObject paramObject = JSONObject.parseObject(jsonString); |
|
|
JSONObject paramObject = JSONObject.parseObject(jsonString); |
|
|
String post = null; |
|
|
String post = null; |
|
|
try { |
|
|
try { |
|
|
post = HttpUtils.send(url, paramObject, HTTP.UTF_8, userToken); |
|
|
post = HttpUtils.send(url, paramObject, HTTP.UTF_8, userKey,token); |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
@ -2840,8 +2894,8 @@ public class PageController { |
|
|
} |
|
|
} |
|
|
Integer total = ObjectFormatUtil.toInteger(data.get("total")); |
|
|
Integer total = ObjectFormatUtil.toInteger(data.get("total")); |
|
|
List<Post> postList = new ArrayList<>(); |
|
|
List<Post> postList = new ArrayList<>(); |
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
for (Object o : list) { |
|
|
Post object = JSONObject.toJavaObject((JSONObject) list.get(i), Post.class); |
|
|
Post object = JSONObject.toJavaObject((JSONObject) o, Post.class); |
|
|
postList.add(object); |
|
|
postList.add(object); |
|
|
} |
|
|
} |
|
|
if (postList.size() > 0) { |
|
|
if (postList.size() > 0) { |
|
|
@ -2861,13 +2915,15 @@ public class PageController { |
|
|
@GetMapping("/postRoleAdd") |
|
|
@GetMapping("/postRoleAdd") |
|
|
public ModelAndView PostRoleAdd(Integer id, Integer classes, HttpServletRequest request) { |
|
|
public ModelAndView PostRoleAdd(Integer id, Integer classes, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/post/postRole_add"); |
|
|
mv.setViewName("pages/post/postRole_add"); |
|
|
Post postById = LinkInterfaceUtil.findPostById(id, userToken); |
|
|
Post postById = LinkInterfaceUtil.findPostById(id, userKey,token); |
|
|
mv.addObject("post", postById); |
|
|
mv.addObject("post", postById); |
|
|
mv.addObject("classes", classes); |
|
|
mv.addObject("classes", classes); |
|
|
return mv; |
|
|
return mv; |
|
|
@ -3095,15 +3151,17 @@ public class PageController { |
|
|
@GetMapping("/stockTaking") |
|
|
@GetMapping("/stockTaking") |
|
|
public ModelAndView stockTaking(HttpServletRequest request) { |
|
|
public ModelAndView stockTaking(HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
StringBuilder departmentHeadName = new StringBuilder(); |
|
|
StringBuilder departmentHeadName = new StringBuilder(); |
|
|
StringBuilder departmentHeadId = new StringBuilder(); |
|
|
StringBuilder departmentHeadId = new StringBuilder(); |
|
|
|
|
|
|
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(userToken.getMaindeparment(), userToken); |
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(userToken.getMaindeparment(), userKey,token); |
|
|
for (UserByPort departmentHead : departmentHeadByUser |
|
|
for (UserByPort departmentHead : departmentHeadByUser |
|
|
) { |
|
|
) { |
|
|
departmentHeadName.append(departmentHead.getName()).append(","); |
|
|
departmentHeadName.append(departmentHead.getName()).append(","); |
|
|
@ -3280,11 +3338,13 @@ public class PageController { |
|
|
mv.setViewName("pages/notice/notice-view"); |
|
|
mv.setViewName("pages/notice/notice-view"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NoticeP noticeById = noticeService.findNoticeById(id); |
|
|
|
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|
|
|
String userKey = request.getHeader("user-key"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
|
|
|
NoticeP noticeById = noticeService.findNoticeById(id,userKey,token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
if (Integer.compare(noticeById.getUserId(), userToken.getId()) == 0) { |
|
|
if (Integer.compare(noticeById.getUserId(), userToken.getId()) == 0) { |
|
|
String header = request.getHeader("user-agent"); |
|
|
String header = request.getHeader("user-agent"); |
|
|
@ -3454,7 +3514,7 @@ public class PageController { |
|
|
* @param userToken 当前用户 |
|
|
* @param userToken 当前用户 |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public List<SimpleTaskP> getUserSimpleTaskP(UserByPort userToken) { |
|
|
public List<SimpleTaskP> getUserSimpleTaskP(UserByPort userToken,String userKey,String token) { |
|
|
Map<String, Object> paramForTask = new HashMap<>(); |
|
|
Map<String, Object> paramForTask = new HashMap<>(); |
|
|
paramForTask.put("isDone", 0); |
|
|
paramForTask.put("isDone", 0); |
|
|
paramForTask.put("userId", userToken.getId()); |
|
|
paramForTask.put("userId", userToken.getId()); |
|
|
@ -3464,21 +3524,21 @@ public class PageController { |
|
|
List<SimpleTaskP> list = new ArrayList<>(); |
|
|
List<SimpleTaskP> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
// 查询出库任务
|
|
|
// 查询出库任务
|
|
|
List<SimpleApplicationOutOrInRecordP> myTaskOut = depositoryRecordService.findMyTaskOut(paramForTask, userToken); |
|
|
List<SimpleApplicationOutOrInRecordP> myTaskOut = depositoryRecordService.findMyTaskOut(paramForTask, userKey,token); |
|
|
|
|
|
|
|
|
for (SimpleApplicationOutOrInRecordP simpleApplicationOutOrInRecordP : myTaskOut) { |
|
|
for (SimpleApplicationOutOrInRecordP simpleApplicationOutOrInRecordP : myTaskOut) { |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(simpleApplicationOutOrInRecordP); |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(simpleApplicationOutOrInRecordP); |
|
|
list.add(simpleTaskP); |
|
|
list.add(simpleTaskP); |
|
|
} |
|
|
} |
|
|
// 查询盘点任务
|
|
|
// 查询盘点任务
|
|
|
List<SimpleStockTakingP> task = stockTakingService.findMyTask(paramForTask, userToken); |
|
|
List<SimpleStockTakingP> task = stockTakingService.findMyTask(paramForTask, userKey,token); |
|
|
for (SimpleStockTakingP simpleStockTakingP : task) { |
|
|
for (SimpleStockTakingP simpleStockTakingP : task) { |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(simpleStockTakingP); |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(simpleStockTakingP); |
|
|
list.add(simpleTaskP); |
|
|
list.add(simpleTaskP); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查询入库任务
|
|
|
// 查询入库任务
|
|
|
List<SimpleApplicationOutOrInRecordP> myTaskIn = depositoryRecordService.findMyTaskIn(paramForTask, userToken); |
|
|
List<SimpleApplicationOutOrInRecordP> myTaskIn = depositoryRecordService.findMyTaskIn(paramForTask, userKey,token); |
|
|
for (SimpleApplicationOutOrInRecordP simpleApplicationOutOrInRecordP : myTaskIn) { |
|
|
for (SimpleApplicationOutOrInRecordP simpleApplicationOutOrInRecordP : myTaskIn) { |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(simpleApplicationOutOrInRecordP); |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(simpleApplicationOutOrInRecordP); |
|
|
list.add(simpleTaskP); |
|
|
list.add(simpleTaskP); |
|
|
@ -3496,7 +3556,7 @@ public class PageController { |
|
|
Integer minRecordId = ObjectFormatUtil.toInteger(s.split(":")[1].trim()); |
|
|
Integer minRecordId = ObjectFormatUtil.toInteger(s.split(":")[1].trim()); |
|
|
ApplicationOutRecordMinP applicationOutMinById = depositoryRecordService.findApplicationOutMinById(minRecordId); |
|
|
ApplicationOutRecordMinP applicationOutMinById = depositoryRecordService.findApplicationOutMinById(minRecordId); |
|
|
ApplicationOutRecordP applicationOutRecordPById = depositoryRecordService.findApplicationOutRecordPById(applicationOutMinById.getParentId()); |
|
|
ApplicationOutRecordP applicationOutRecordPById = depositoryRecordService.findApplicationOutRecordPById(applicationOutMinById.getParentId()); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationOutRecordPById.getApplicantId(), userToken); |
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationOutRecordPById.getApplicantId(), userKey,token); |
|
|
applicationOutRecordPById.setApplicantName(userByPort.getName()); |
|
|
applicationOutRecordPById.setApplicantName(userByPort.getName()); |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(applicationOutRecordPById, applicationOutMinById); |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(applicationOutRecordPById, applicationOutMinById); |
|
|
list.add(simpleTaskP); |
|
|
list.add(simpleTaskP); |
|
|
@ -3512,7 +3572,7 @@ public class PageController { |
|
|
* @param userToken 当前用户 |
|
|
* @param userToken 当前用户 |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public List<SimpleTaskP> getUserSimpleApplyP(UserByPort userToken) { |
|
|
public List<SimpleTaskP> getUserSimpleApplyP(UserByPort userToken,String userKey,String token) { |
|
|
Map<String, Object> paramForApply = new HashMap<>(); |
|
|
Map<String, Object> paramForApply = new HashMap<>(); |
|
|
paramForApply.put("applicantId", userToken.getId()); |
|
|
paramForApply.put("applicantId", userToken.getId()); |
|
|
paramForApply.put("size", 4); |
|
|
paramForApply.put("size", 4); |
|
|
@ -3522,14 +3582,14 @@ public class PageController { |
|
|
List<SimpleTaskP> list = new ArrayList<>(); |
|
|
List<SimpleTaskP> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
// 查询入库申请
|
|
|
// 查询入库申请
|
|
|
List<ApplicationInRecordP> applicationInRecordPByCondition = depositoryRecordService.findApplicationInRecordPByCondition(paramForApply, userToken); |
|
|
List<ApplicationInRecordP> applicationInRecordPByCondition = depositoryRecordService.findApplicationInRecordPByCondition(paramForApply, userToken,userKey,token); |
|
|
for (ApplicationInRecordP applicationInRecordP : applicationInRecordPByCondition) { |
|
|
for (ApplicationInRecordP applicationInRecordP : applicationInRecordPByCondition) { |
|
|
SimpleTaskP simpleTask = new SimpleTaskP(applicationInRecordP); |
|
|
SimpleTaskP simpleTask = new SimpleTaskP(applicationInRecordP); |
|
|
list.add(simpleTask); |
|
|
list.add(simpleTask); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ApplicationOutRecordP> applicationOutRecordPlist = depositoryRecordService.findApplicationOutRecordPByCondition(paramForApply, userToken); |
|
|
List<ApplicationOutRecordP> applicationOutRecordPlist = depositoryRecordService.findApplicationOutRecordPByCondition(paramForApply,userToken, userKey,token); |
|
|
for (ApplicationOutRecordP applicationOutRecordP : applicationOutRecordPlist) { |
|
|
for (ApplicationOutRecordP applicationOutRecordP : applicationOutRecordPlist) { |
|
|
SimpleTaskP simpleTask = new SimpleTaskP(applicationOutRecordP); |
|
|
SimpleTaskP simpleTask = new SimpleTaskP(applicationOutRecordP); |
|
|
list.add(simpleTask); |
|
|
list.add(simpleTask); |
|
|
|