|
|
@ -72,6 +72,15 @@ public class PageController { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private BusinessTypeService businessTypeService; |
|
|
private BusinessTypeService businessTypeService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private UserService userService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private AdministrativeService administrativeService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private PostService postService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 初始化路由跳转 |
|
|
* 初始化路由跳转 |
|
|
* |
|
|
* |
|
|
@ -1084,10 +1093,13 @@ public class PageController { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
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 = PublicConfig.findAllCompany(userKey, token); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
map.put("superior", "313"); |
|
|
|
|
|
map.put("level", 3); |
|
|
|
|
|
List<AdministrationP> administrationPList = administrativeService.findAdministrationPListByCondition(map); |
|
|
|
|
|
// List<AdministrationP> administrationPList = PublicConfig.findAllCompany(userKey, token);
|
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
return mv; |
|
|
return mv; |
|
|
} |
|
|
} |
|
|
@ -1586,7 +1598,7 @@ public class PageController { |
|
|
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 = PublicConfig.FindUserById(userId, userKey, token); |
|
|
UserByPort userByPort = userService.findUserByIdForNoPack(userId); |
|
|
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); |
|
|
@ -1612,7 +1624,7 @@ public class PageController { |
|
|
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 = PublicConfig.FindUserById(userId, userKey, token); |
|
|
UserByPort userByPort = userService.findUserByIdForNoPack(userId); |
|
|
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); |
|
|
@ -1641,7 +1653,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 = PublicConfig.FindUserById(roleAndDepositoryById.getUserId(), userKey, token); |
|
|
UserByPort userByPort = userService.findUserByIdForNoPack(roleAndDepositoryById.getUserId()); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP.setDepositoryName(roleAndDepositoryById.getDepositoryName()); |
|
|
userByPortP.setDepositoryName(roleAndDepositoryById.getDepositoryName()); |
|
|
} |
|
|
} |
|
|
@ -1672,7 +1684,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 = PublicConfig.FindUserById(roleAndMaterialTypeById.getUid(), userKey, token); |
|
|
UserByPort userByPort = userService.findUserByIdForNoPack(roleAndMaterialTypeById.getUid()); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP = new UserByPortP(userByPort); |
|
|
userByPortP.setMaterialTypeName(roleAndMaterialTypeById.getTname()); |
|
|
userByPortP.setMaterialTypeName(roleAndMaterialTypeById.getTname()); |
|
|
} |
|
|
} |
|
|
@ -1704,8 +1716,8 @@ public class PageController { |
|
|
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 = PublicConfig.FindUserByMap(userParam, userKey, token); |
|
|
List<UserByPort> userByPortList = userService.findUserByConditionForNoPack(userParam); |
|
|
Post postById = PublicConfig.findPostById(id, userKey, token); |
|
|
Post postById = postService.findPostById(id); |
|
|
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); |
|
|
@ -1738,9 +1750,7 @@ public class PageController { |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/user/user-edit"); |
|
|
mv.setViewName("pages/user/user-edit"); |
|
|
mv.addObject("depositories", depositoryService.findDepositoryAll()); |
|
|
mv.addObject("depositories", depositoryService.findDepositoryAll()); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
UserByPort userByPort = userService.findUserByNumber(id.toString()); |
|
|
map.put("number", id.toString()); |
|
|
|
|
|
UserByPort userByPort = PublicConfig.FindUserByMap(map, userKey, token).get(0); |
|
|
|
|
|
mv.addObject("user", userByPort); |
|
|
mv.addObject("user", userByPort); |
|
|
return mv; |
|
|
return mv; |
|
|
} |
|
|
} |
|
|
@ -1771,7 +1781,10 @@ public class PageController { |
|
|
mv.addObject("record", depositoryRecordById); |
|
|
mv.addObject("record", depositoryRecordById); |
|
|
Long cid = depositoryRecordById.getCid(); |
|
|
Long cid = depositoryRecordById.getCid(); |
|
|
List<AdministrationP> postList = PublicConfig.findCompanyBySuperior(cid.toString(), userKey, token); |
|
|
List<AdministrationP> postList = PublicConfig.findCompanyBySuperior(cid.toString(), userKey, token); |
|
|
List<AdministrationP> administrationPList = PublicConfig.findAllCompany(userKey, token); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
map.put("superior", "313"); |
|
|
|
|
|
map.put("level", 3); |
|
|
|
|
|
List<AdministrationP> administrationPList = administrativeService.findAdministrationPListByCondition(map); |
|
|
// 部门列表
|
|
|
// 部门列表
|
|
|
mv.addObject("postList", postList); |
|
|
mv.addObject("postList", postList); |
|
|
// 公司列表
|
|
|
// 公司列表
|
|
|
@ -2079,7 +2092,6 @@ public class PageController { |
|
|
ApplicationOutRecordP recordP = depositoryRecordService.findApplicationOutRecordPById(id); |
|
|
ApplicationOutRecordP recordP = depositoryRecordService.findApplicationOutRecordPById(id); |
|
|
|
|
|
|
|
|
// 获取当前出库仓库是否为开放仓库
|
|
|
// 获取当前出库仓库是否为开放仓库
|
|
|
int flagForOpenDepository = recordP.getFlagForOpenDepository(); |
|
|
|
|
|
mv.addObject("depositoryManagerText", "负责人"); |
|
|
mv.addObject("depositoryManagerText", "负责人"); |
|
|
|
|
|
|
|
|
// 获取所有子订单
|
|
|
// 获取所有子订单
|
|
|
@ -2097,6 +2109,7 @@ public class PageController { |
|
|
StringBuilder sumUnit = new StringBuilder(); |
|
|
StringBuilder sumUnit = new StringBuilder(); |
|
|
List<Long> depositoryIdList = new ArrayList<>(); |
|
|
List<Long> depositoryIdList = new ArrayList<>(); |
|
|
List<Long> placeIdList = new ArrayList<>(); |
|
|
List<Long> placeIdList = new ArrayList<>(); |
|
|
|
|
|
Map<Long, UserByPort> userByPortMap = new HashMap<>(); |
|
|
for (ApplicationOutRecordMinP applicationOutRecordMin : applicationOutRecordMinByParent) { |
|
|
for (ApplicationOutRecordMinP applicationOutRecordMin : applicationOutRecordMinByParent) { |
|
|
// 获取子订单信息
|
|
|
// 获取子订单信息
|
|
|
// 获取出库物料信息
|
|
|
// 获取出库物料信息
|
|
|
@ -2139,7 +2152,7 @@ public class PageController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 申请人
|
|
|
// 申请人
|
|
|
UserByPort applicantUser = PublicConfig.FindUserById(recordP.getApplicantId(), userKey, token); |
|
|
UserByPort applicantUser = userService.findUserById(recordP.getApplicantId()); |
|
|
|
|
|
|
|
|
// 部门负责人
|
|
|
// 部门负责人
|
|
|
// 获取部门负责人人员
|
|
|
// 获取部门负责人人员
|
|
|
@ -2150,7 +2163,14 @@ public class PageController { |
|
|
String[] split = departmenthead.split(","); |
|
|
String[] split = departmenthead.split(","); |
|
|
for (String s : split) { |
|
|
for (String s : split) { |
|
|
if (!"".equals(s)) { |
|
|
if (!"".equals(s)) { |
|
|
UserByPort departmentUser = PublicConfig.FindUserById(ObjectFormatUtil.toLong(s), userKey, token); |
|
|
Long departmentId = ObjectFormatUtil.toLong(s); |
|
|
|
|
|
UserByPort departmentUser = null; |
|
|
|
|
|
if (userByPortMap.containsKey(departmentId)) { |
|
|
|
|
|
departmentUser = userByPortMap.get(departmentId); |
|
|
|
|
|
} else { |
|
|
|
|
|
departmentUser = userService.findUserById(departmentId); |
|
|
|
|
|
userByPortMap.put(departmentId, departmentUser); |
|
|
|
|
|
} |
|
|
String name = departmentUser.getMaindeparmentname() + "-" + departmentUser.getName(); |
|
|
String name = departmentUser.getMaindeparmentname() + "-" + departmentUser.getName(); |
|
|
departmentHeadIconPhoto.put(name, departmentUser.getIconphoto()); |
|
|
departmentHeadIconPhoto.put(name, departmentUser.getIconphoto()); |
|
|
departmentHeadName.append("name").append(","); |
|
|
departmentHeadName.append("name").append(","); |
|
|
@ -2235,13 +2255,21 @@ public class PageController { |
|
|
placeCode = placeById.getCode(); |
|
|
placeCode = placeById.getCode(); |
|
|
} |
|
|
} |
|
|
Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); |
|
|
Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); |
|
|
|
|
|
Map<Long, UserByPort> userByPortMap = new HashMap<>(); |
|
|
if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { |
|
|
if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { |
|
|
String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); |
|
|
String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); |
|
|
StringBuilder airapproverName = new StringBuilder(); |
|
|
StringBuilder airapproverName = new StringBuilder(); |
|
|
for (String approverId : airapproverId |
|
|
for (String approverId : airapproverId |
|
|
) { |
|
|
) { |
|
|
if (!"".equals(approverId)) { |
|
|
if (!"".equals(approverId)) { |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(approverId), userKey, token); |
|
|
UserByPort userByPort = null; |
|
|
|
|
|
Long applicantId = applicationInRecordPById.getApplicantId(); |
|
|
|
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
|
|
|
userByPort = userByPortMap.get(applicantId); |
|
|
|
|
|
} else { |
|
|
|
|
|
userByPort = userService.findUserById(applicantId); |
|
|
|
|
|
userByPortMap.put(applicantId, userByPort); |
|
|
|
|
|
} |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -2250,7 +2278,14 @@ public class PageController { |
|
|
|
|
|
|
|
|
if (Integer.compare(flagForGroup, 2) != 0) { |
|
|
if (Integer.compare(flagForGroup, 2) != 0) { |
|
|
// 如果不是组合
|
|
|
// 如果不是组合
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(applicationInRecordPById.getApplicantId(), userKey, token); |
|
|
UserByPort userByPort = null; |
|
|
|
|
|
Long applicantId = applicationInRecordPById.getApplicantId(); |
|
|
|
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
|
|
|
userByPort = userByPortMap.get(applicantId); |
|
|
|
|
|
} else { |
|
|
|
|
|
userByPort = userService.findUserById(applicantId); |
|
|
|
|
|
userByPortMap.put(applicantId, userByPort); |
|
|
|
|
|
} |
|
|
applicationInRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(ObjectFormatUtil.toLong(applicationInRecordPById.getApplicantTime()))); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(ObjectFormatUtil.toLong(applicationInRecordPById.getApplicantTime()))); |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
@ -2294,7 +2329,6 @@ public class PageController { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/application/form-step-look_in_review"); |
|
|
mv.setViewName("pages/application/form-step-look_in_review"); |
|
|
if (id != null) { |
|
|
if (id != null) { |
|
|
@ -2314,13 +2348,23 @@ public class PageController { |
|
|
placeCode = placeById.getCode(); |
|
|
placeCode = placeById.getCode(); |
|
|
} |
|
|
} |
|
|
Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); |
|
|
Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); |
|
|
|
|
|
|
|
|
|
|
|
Map<Long, UserByPort> userByPortMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { |
|
|
if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { |
|
|
String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); |
|
|
String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); |
|
|
StringBuilder airapproverName = new StringBuilder(); |
|
|
StringBuilder airapproverName = new StringBuilder(); |
|
|
for (String approverId : airapproverId |
|
|
for (String approverId : airapproverId |
|
|
) { |
|
|
) { |
|
|
if (!"".equals(approverId)) { |
|
|
if (!"".equals(approverId)) { |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(approverId), userKey, token); |
|
|
UserByPort userByPort = null; |
|
|
|
|
|
Long applicantId = ObjectFormatUtil.toLong(approverId); |
|
|
|
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
|
|
|
userByPort = userByPortMap.get(applicantId); |
|
|
|
|
|
} else { |
|
|
|
|
|
userByPort = userService.findUserById(applicantId); |
|
|
|
|
|
userByPortMap.put(applicantId, userByPort); |
|
|
|
|
|
} |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -2330,7 +2374,14 @@ 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 = PublicConfig.FindUserById(applicationInRecordPById.getApplicantId(), userKey, token); |
|
|
UserByPort userByPort = null; |
|
|
|
|
|
Long applicantId = applicationInRecordPById.getApplicantId(); |
|
|
|
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
|
|
|
userByPort = userByPortMap.get(applicantId); |
|
|
|
|
|
} else { |
|
|
|
|
|
userByPort = userService.findUserById(applicantId); |
|
|
|
|
|
userByPortMap.put(applicantId, userByPort); |
|
|
|
|
|
} |
|
|
applicationInRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(ObjectFormatUtil.toLong(applicationInRecordPById.getApplicantTime()))); |
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(ObjectFormatUtil.toLong(applicationInRecordPById.getApplicantTime()))); |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
@ -2388,8 +2439,7 @@ public class PageController { |
|
|
// 获取处理人
|
|
|
// 获取处理人
|
|
|
Long checkId = recordMinP.getCheckId(); |
|
|
Long checkId = recordMinP.getCheckId(); |
|
|
if (checkId != null) { |
|
|
if (checkId != null) { |
|
|
UserByPort userByPort = PublicConfig.FindUserById(checkId, userKey, token); |
|
|
UserByPort userByPort = userService.findUserByIdForNoPack(checkId); |
|
|
|
|
|
|
|
|
// 设置处理人姓名
|
|
|
// 设置处理人姓名
|
|
|
recordMinP.setCheckerName(userByPort.getName()); |
|
|
recordMinP.setCheckerName(userByPort.getName()); |
|
|
// 获取出库库位
|
|
|
// 获取出库库位
|
|
|
@ -2508,6 +2558,7 @@ public class PageController { |
|
|
double sumPrice = 0.0; |
|
|
double sumPrice = 0.0; |
|
|
// 出库仓库id列表
|
|
|
// 出库仓库id列表
|
|
|
List<Long> depositoryIdList = new ArrayList<>(); |
|
|
List<Long> depositoryIdList = new ArrayList<>(); |
|
|
|
|
|
Map<Long,UserByPort> userByPortMap = new HashMap<>(); |
|
|
for (ApplicationOutRecordMinP recordMinP : applicationOutRecordMinByParent) { |
|
|
for (ApplicationOutRecordMinP recordMinP : applicationOutRecordMinByParent) { |
|
|
// 获取子订单信息
|
|
|
// 获取子订单信息
|
|
|
|
|
|
|
|
|
@ -2577,7 +2628,13 @@ public class PageController { |
|
|
if (outDisPoserIdList.size() > 0) { |
|
|
if (outDisPoserIdList.size() > 0) { |
|
|
for (Long outDispositorId : outDisPoserIdList |
|
|
for (Long outDispositorId : outDisPoserIdList |
|
|
) { |
|
|
) { |
|
|
UserByPort disposer = PublicConfig.FindUserById(outDispositorId, userKey, token); |
|
|
UserByPort disposer = null; |
|
|
|
|
|
if (userByPortMap.containsKey(outDispositorId)) { |
|
|
|
|
|
disposer = userByPortMap.get(outDispositorId); |
|
|
|
|
|
} else { |
|
|
|
|
|
disposer = userService.findUserById(outDispositorId); |
|
|
|
|
|
userByPortMap.put(outDispositorId,disposer); |
|
|
|
|
|
} |
|
|
outDisposer.append(disposer.getName()).append(","); |
|
|
outDisposer.append(disposer.getName()).append(","); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -2595,8 +2652,13 @@ public class PageController { |
|
|
// 申请人Id
|
|
|
// 申请人Id
|
|
|
Long applicantId = applicationOutRecordPById.getApplicantId(); |
|
|
Long applicantId = applicationOutRecordPById.getApplicantId(); |
|
|
// 获取申请人信息
|
|
|
// 获取申请人信息
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(applicantId, userKey, token); |
|
|
UserByPort userByPort = null; |
|
|
|
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
|
|
|
userByPort = userByPortMap.get(applicantId); |
|
|
|
|
|
} else { |
|
|
|
|
|
userByPort = userService.findUserById(applicantId); |
|
|
|
|
|
userByPortMap.put(applicantId,userByPort); |
|
|
|
|
|
} |
|
|
// 部门负责人
|
|
|
// 部门负责人
|
|
|
String departmentHead = applicationOutRecordPById.getDepartmenthead(); |
|
|
String departmentHead = applicationOutRecordPById.getDepartmenthead(); |
|
|
String[] split = departmentHead.split(","); |
|
|
String[] split = departmentHead.split(","); |
|
|
@ -2611,7 +2673,14 @@ public class PageController { |
|
|
if ("".equals(value)) { |
|
|
if ("".equals(value)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort departmenthead = PublicConfig.FindUserById(ObjectFormatUtil.toLong(value), userKey, token); |
|
|
UserByPort departmenthead = null; |
|
|
|
|
|
Long departmentheadId = ObjectFormatUtil.toLong(value); |
|
|
|
|
|
if (userByPortMap.containsKey(departmentheadId)) { |
|
|
|
|
|
departmenthead = userByPortMap.get(departmentheadId); |
|
|
|
|
|
} else { |
|
|
|
|
|
departmenthead = userService.findUserById(departmentheadId); |
|
|
|
|
|
userByPortMap.put(departmentheadId,userByPort); |
|
|
|
|
|
} |
|
|
String name = departmenthead.getMaindeparmentname() + "-" + departmenthead.getName(); |
|
|
String name = departmenthead.getMaindeparmentname() + "-" + departmenthead.getName(); |
|
|
departmentHeadUserIcon.put(name, departmenthead.getIconphoto()); |
|
|
departmentHeadUserIcon.put(name, departmenthead.getIconphoto()); |
|
|
departmentHeadName.append(name).append(","); |
|
|
departmentHeadName.append(name).append(","); |
|
|
@ -2625,7 +2694,7 @@ public class PageController { |
|
|
Long adminorgId = applicationOutRecordPById.getAdminorgId(); |
|
|
Long adminorgId = applicationOutRecordPById.getAdminorgId(); |
|
|
Long constructionUnitId = applicationOutRecordPById.getConstructionUnitId(); |
|
|
Long constructionUnitId = applicationOutRecordPById.getConstructionUnitId(); |
|
|
if (adminorgId != null) { |
|
|
if (adminorgId != null) { |
|
|
Administration company = PublicConfig.getCompany(adminorgId, userKey, token); |
|
|
Administration company = administrativeService.findAdministrationById(adminorgId); |
|
|
applicationOutRecordPById.setAdminorgName(company.getName()); |
|
|
applicationOutRecordPById.setAdminorgName(company.getName()); |
|
|
mv.addObject("adisplay", "table-row"); |
|
|
mv.addObject("adisplay", "table-row"); |
|
|
} else { |
|
|
} else { |
|
|
@ -2757,7 +2826,7 @@ public class PageController { |
|
|
stp.setCreateTime(DateUtil.TimeStampToDateTime(stockTaking.getCreateTime())); |
|
|
stp.setCreateTime(DateUtil.TimeStampToDateTime(stockTaking.getCreateTime())); |
|
|
|
|
|
|
|
|
// 获取申请人
|
|
|
// 获取申请人
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(stockTaking.getOriginator(), userKey, token); |
|
|
UserByPort userByPort = userService.findUserByIdForNoPack(stockTaking.getOriginator()); |
|
|
// 设置盘点发起人姓名
|
|
|
// 设置盘点发起人姓名
|
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
|
|
|
|
|
|
@ -2768,7 +2837,7 @@ public class PageController { |
|
|
if ("".equals(s)) { |
|
|
if ("".equals(s)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort manager = PublicConfig.findUserByPortByNumber(s); |
|
|
UserByPort manager = userService.findUserByNumberForNoPack(s); |
|
|
int emptype = manager.getEmptype(); |
|
|
int emptype = manager.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
continue; |
|
|
continue; |
|
|
@ -2839,7 +2908,7 @@ public class PageController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取申请人
|
|
|
// 获取申请人
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(stockTaking.getOriginator(), userKey, token); |
|
|
UserByPort userByPort = userService.findUserById(stockTaking.getOriginator()); |
|
|
// 设置盘点发起人姓名
|
|
|
// 设置盘点发起人姓名
|
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
stp.setOriginatorName(userByPort.getName()); |
|
|
|
|
|
|
|
|
@ -2850,7 +2919,7 @@ public class PageController { |
|
|
if ("".equals(s)) { |
|
|
if ("".equals(s)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort manager = PublicConfig.findUserByPortByNumber(s); |
|
|
UserByPort manager = userService.findUserByNumberForNoPack(s); |
|
|
int emptype = manager.getEmptype(); |
|
|
int emptype = manager.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
continue; |
|
|
continue; |
|
|
@ -2886,7 +2955,7 @@ public class PageController { |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
Administration company = PublicConfig.getCompany(userToken.getMaindeparment(), userKey, token); |
|
|
Administration company = administrativeService.findAdministrationById(userToken.getMaindeparment()); |
|
|
userToken.setMaindeparmentname(company.getName()); |
|
|
userToken.setMaindeparmentname(company.getName()); |
|
|
mv.addObject("userInfo", userToken); |
|
|
mv.addObject("userInfo", userToken); |
|
|
return mv; |
|
|
return mv; |
|
|
@ -2945,7 +3014,10 @@ public class PageController { |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/company/company-out_back"); |
|
|
mv.setViewName("pages/company/company-out_back"); |
|
|
List<AdministrationP> administrationPList = PublicConfig.findAllCompany(userKey, token); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
map.put("superior", "313"); |
|
|
|
|
|
map.put("level", 3); |
|
|
|
|
|
List<AdministrationP> administrationPList = administrativeService.findAdministrationPListByCondition(map); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("administrationPList", administrationPList); |
|
|
mv.addObject("level", 3); |
|
|
mv.addObject("level", 3); |
|
|
mv.addObject("parentId", "313"); |
|
|
mv.addObject("parentId", "313"); |
|
|
@ -2982,25 +3054,11 @@ public class PageController { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
String url = PublicConfig.external_url + "/org/getgovcont"; |
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.setViewName("pages/company/company_edit"); |
|
|
mv.setViewName("pages/company/company_edit"); |
|
|
if (id != null) { |
|
|
if (id != null) { |
|
|
map.put("id", id); |
|
|
Administration administration = administrativeService.findAdministrationById(id); |
|
|
map.put("idstr", id.toString()); |
|
|
String SuperiorName = administrativeService.findAdministrationById(administration.getSuperior()).getName(); |
|
|
String jsonString = JSONObject.toJSONString(map); |
|
|
|
|
|
JSONObject paramObject = JSONObject.parseObject(jsonString); |
|
|
|
|
|
String post = null; |
|
|
|
|
|
try { |
|
|
|
|
|
post = HttpUtils.send(url, paramObject, HTTP.UTF_8, userKey, token); |
|
|
|
|
|
} catch (IOException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(post); |
|
|
|
|
|
JSONObject data = (JSONObject) jsonObject.get("data"); |
|
|
|
|
|
Administration administration = JSONObject.toJavaObject(data, Administration.class); |
|
|
|
|
|
String SuperiorName = PublicConfig.getCompany(administration.getSuperior(), userKey, token).getName(); |
|
|
|
|
|
mv.addObject("record", administration); |
|
|
mv.addObject("record", administration); |
|
|
mv.addObject("SuperiorName", SuperiorName); |
|
|
mv.addObject("SuperiorName", SuperiorName); |
|
|
} else { |
|
|
} else { |
|
|
@ -3026,7 +3084,6 @@ public class PageController { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
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); |
|
|
@ -3059,7 +3116,6 @@ public class PageController { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
|
|
String url = PublicConfig.external_url + "/org/positionlist"; |
|
|
String url = PublicConfig.external_url + "/org/positionlist"; |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
ModelAndView mv = new ModelAndView(); |
|
|
mv.addObject("parentId", organization); |
|
|
mv.addObject("parentId", organization); |
|
|
@ -3113,7 +3169,7 @@ public class PageController { |
|
|
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 = PublicConfig.findPostById(id, userKey, token); |
|
|
Post object = postService.findPostById(id); |
|
|
mv.addObject("record", object); |
|
|
mv.addObject("record", object); |
|
|
} else { |
|
|
} else { |
|
|
throw new MyException("缺少必要参数!"); |
|
|
throw new MyException("缺少必要参数!"); |
|
|
@ -3182,7 +3238,7 @@ public class PageController { |
|
|
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 = PublicConfig.findPostById(id, userKey, token); |
|
|
Post postById = postService.findPostById(id); |
|
|
mv.addObject("post", postById); |
|
|
mv.addObject("post", postById); |
|
|
mv.addObject("classes", classes); |
|
|
mv.addObject("classes", classes); |
|
|
return mv; |
|
|
return mv; |
|
|
@ -3419,7 +3475,7 @@ public class PageController { |
|
|
StringBuilder departmentHeadName = new StringBuilder(); |
|
|
StringBuilder departmentHeadName = new StringBuilder(); |
|
|
StringBuilder departmentHeadId = new StringBuilder(); |
|
|
StringBuilder departmentHeadId = new StringBuilder(); |
|
|
|
|
|
|
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(userToken.getMaindeparment(), userKey, token); |
|
|
List<UserByPort> departmentHeadByUser = userService.getDepartmentHeaderByIdForNoPack(userToken.getMaindeparment()); |
|
|
for (UserByPort departmentHead : departmentHeadByUser |
|
|
for (UserByPort departmentHead : departmentHeadByUser |
|
|
) { |
|
|
) { |
|
|
departmentHeadName.append(departmentHead.getName()).append(","); |
|
|
departmentHeadName.append(departmentHead.getName()).append(","); |
|
|
@ -3862,7 +3918,7 @@ public class PageController { |
|
|
Long minRecordId = ObjectFormatUtil.toLong(s.split(":")[1].trim()); |
|
|
Long minRecordId = ObjectFormatUtil.toLong(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 = PublicConfig.FindUserById(applicationOutRecordPById.getApplicantId(), userKey, token); |
|
|
UserByPort userByPort = userService.findUserById(applicationOutRecordPById.getApplicantId()); |
|
|
applicationOutRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
applicationOutRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(applicationOutRecordPById, applicationOutMinById); |
|
|
SimpleTaskP simpleTaskP = new SimpleTaskP(applicationOutRecordPById, applicationOutMinById); |
|
|
list.add(simpleTaskP); |
|
|
list.add(simpleTaskP); |
|
|
@ -3937,6 +3993,7 @@ public class PageController { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 用于跳转到折线或柱状图 |
|
|
* 用于跳转到折线或柱状图 |
|
|
|
|
|
* |
|
|
* @param type 要查看的出入库 |
|
|
* @param type 要查看的出入库 |
|
|
* @param echartType 图表类型 |
|
|
* @param echartType 图表类型 |
|
|
* @return |
|
|
* @return |
|
|
@ -3952,6 +4009,7 @@ public class PageController { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 用于跳转到折线或柱状图 |
|
|
* 用于跳转到折线或柱状图 |
|
|
|
|
|
* |
|
|
* @param type 要查看的出入库 |
|
|
* @param type 要查看的出入库 |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
|