|
|
|
@ -330,7 +330,7 @@ public class PageController { |
|
|
|
|
|
|
|
Map<String, Object> paramForTask = new HashMap<>(); |
|
|
|
paramForTask.put("isDone", 0); |
|
|
|
paramForTask.put("userId", userToken.getId()); |
|
|
|
paramForTask.put("departmentHead", userToken.getNumber()); |
|
|
|
|
|
|
|
// 定义任务列表
|
|
|
|
List<SimpleTaskP> list = new ArrayList<>(); |
|
|
|
@ -378,7 +378,7 @@ public class PageController { |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -444,7 +444,7 @@ public class PageController { |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -465,7 +465,7 @@ public class PageController { |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -667,7 +667,7 @@ public class PageController { |
|
|
|
} |
|
|
|
List<MaterialType> materialTypeAll = materialTypeService.findMaterialTypeByCondition(map); |
|
|
|
mv.addObject("materialTypes", materialTypeAll); |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -781,7 +781,7 @@ public class PageController { |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -798,7 +798,7 @@ public class PageController { |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -903,7 +903,7 @@ public class PageController { |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -936,7 +936,7 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/group_edit") |
|
|
|
public ModelAndView groupEdit(Integer id,HttpServletRequest request) { |
|
|
|
public ModelAndView groupEdit(Integer id, HttpServletRequest request) { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/group/group_edit"); |
|
|
|
Group group = groupService.findGroupOnlyById(id); |
|
|
|
@ -945,7 +945,7 @@ public class PageController { |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1075,7 +1075,7 @@ public class PageController { |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/user_add") |
|
|
|
public ModelAndView user_add(Integer userId,Integer classes, HttpServletRequest request) { |
|
|
|
public ModelAndView user_add(Integer userId, Integer classes, HttpServletRequest request) { |
|
|
|
UserByPort userToken = (UserByPort) request.getAttribute("userToken"); |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/user/user-add"); |
|
|
|
@ -1188,7 +1188,7 @@ public class PageController { |
|
|
|
mv.addObject("id", id); |
|
|
|
Place placeById = placeService.findPlaceById(id); |
|
|
|
mv.addObject("place", placeById); |
|
|
|
if(Integer.compare(placeById.getFlagForType(),2)==0){ |
|
|
|
if (Integer.compare(placeById.getFlagForType(), 2) == 0) { |
|
|
|
// 如果是托盘
|
|
|
|
mv.setViewName("pages/place/place_editForTray"); |
|
|
|
} |
|
|
|
@ -1268,6 +1268,7 @@ public class PageController { |
|
|
|
|
|
|
|
/** |
|
|
|
* 用于跳转到仓库管理员 |
|
|
|
* |
|
|
|
* @param id |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@ -1281,6 +1282,7 @@ public class PageController { |
|
|
|
|
|
|
|
/** |
|
|
|
* 用于跳转到入库申请审核时的赋权 |
|
|
|
* |
|
|
|
* @param id |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@ -1293,7 +1295,7 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/postRoleView") |
|
|
|
public ModelAndView findPostRoleView(Integer id,Integer classes) { |
|
|
|
public ModelAndView findPostRoleView(Integer id, Integer classes) { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.addObject("postId", id); |
|
|
|
mv.addObject("classes", classes); |
|
|
|
@ -1476,7 +1478,7 @@ public class PageController { |
|
|
|
ApplicationInRecordP applicationInRecordPById = depositoryRecordService.findApplicationInRecordPById(id); |
|
|
|
|
|
|
|
String airapproverTime = applicationInRecordPById.getAirapproverTime(); |
|
|
|
if(airapproverTime != null && !"".equals(airapproverTime)){ |
|
|
|
if (airapproverTime != null && !"".equals(airapproverTime)) { |
|
|
|
airapproverTime = DateUtil.TimeStampToDateTime(Long.valueOf(airapproverTime)); |
|
|
|
applicationInRecordPById.setAirapproverTime(airapproverTime); |
|
|
|
} |
|
|
|
@ -1489,12 +1491,12 @@ public class PageController { |
|
|
|
placeCode = placeById.getCode(); |
|
|
|
} |
|
|
|
Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); |
|
|
|
if(Integer.compare(applicationInRecordPById.getAirapproverPass(),4) != 0){ |
|
|
|
if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { |
|
|
|
String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); |
|
|
|
StringBuilder airapproverName = new StringBuilder(); |
|
|
|
for (String approverId:airapproverId |
|
|
|
for (String approverId : airapproverId |
|
|
|
) { |
|
|
|
if(!"".equals(approverId)){ |
|
|
|
if (!"".equals(approverId)) { |
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userToken); |
|
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
|
} |
|
|
|
@ -1541,7 +1543,7 @@ public class PageController { |
|
|
|
ApplicationInRecordP applicationInRecordPById = depositoryRecordService.findApplicationInRecordPById(id); |
|
|
|
|
|
|
|
String airapproverTime = applicationInRecordPById.getAirapproverTime(); |
|
|
|
if(airapproverTime != null && !"".equals(airapproverTime)){ |
|
|
|
if (airapproverTime != null && !"".equals(airapproverTime)) { |
|
|
|
airapproverTime = DateUtil.TimeStampToDateTime(Long.valueOf(airapproverTime)); |
|
|
|
applicationInRecordPById.setAirapproverTime(airapproverTime); |
|
|
|
} |
|
|
|
@ -1554,12 +1556,12 @@ public class PageController { |
|
|
|
placeCode = placeById.getCode(); |
|
|
|
} |
|
|
|
Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); |
|
|
|
if(Integer.compare(applicationInRecordPById.getAirapproverPass(),4) != 0){ |
|
|
|
if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { |
|
|
|
String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); |
|
|
|
StringBuilder airapproverName = new StringBuilder(); |
|
|
|
for (String approverId:airapproverId |
|
|
|
for (String approverId : airapproverId |
|
|
|
) { |
|
|
|
if(!"".equals(approverId)){ |
|
|
|
if (!"".equals(approverId)) { |
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userToken); |
|
|
|
airapproverName.append(userByPort.getName()).append(","); |
|
|
|
} |
|
|
|
@ -1597,8 +1599,6 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/form_step_lookByminRecordOut") |
|
|
|
public ModelAndView form_step_lookByminRecordOut(Integer id, HttpServletRequest request) { |
|
|
|
UserByPort userToken = (UserByPort) request.getAttribute("userToken"); |
|
|
|
@ -1866,28 +1866,20 @@ public class PageController { |
|
|
|
// 负责人姓名
|
|
|
|
StringBuilder managerName = new StringBuilder(); |
|
|
|
String[] split = stp.getDepartmentManager().split(","); |
|
|
|
for (int i = 0; i < split.length; i++) { |
|
|
|
String s = split[i]; |
|
|
|
for (String s : split) { |
|
|
|
if ("".equals(s)) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
UserByPort manager = PortConfig.findUserByPortByNumber(s); |
|
|
|
managerName.append(manager.getName() + ","); |
|
|
|
managerName.append(manager.getName()).append(","); |
|
|
|
} |
|
|
|
stp.setDepartmentManagerName(managerName.toString()); |
|
|
|
|
|
|
|
// 获取盘点位置
|
|
|
|
Integer placeId = stockTaking.getPlaceId(); |
|
|
|
StringBuilder location = new StringBuilder(); |
|
|
|
Depository depository = depositoryService.findDepositoryById(stockTaking.getDepositoryId()); |
|
|
|
location.append(depository.getDname()); |
|
|
|
if (!(Integer.compare(placeId, 0) == 0)) { |
|
|
|
// 如果不是默认库位
|
|
|
|
Place placeById = placeService.findPlaceById(placeId); |
|
|
|
location.append("-" + placeById.getCode()); |
|
|
|
} |
|
|
|
String location = depository.getDname(); |
|
|
|
// 设置盘点位置
|
|
|
|
stp.setDepositoryName(location.toString()); |
|
|
|
stp.setDepositoryName(location); |
|
|
|
mv.addObject("mainRecord", stp); |
|
|
|
mv.addObject("recordChild", stockTakingChildPByMainId); |
|
|
|
Integer departmentManagerState = stp.getDepartmentManagerState(); |
|
|
|
@ -1956,15 +1948,8 @@ public class PageController { |
|
|
|
stp.setDepartmentManagerName(managerName.toString()); |
|
|
|
|
|
|
|
// 获取盘点位置
|
|
|
|
Integer placeId = stockTaking.getPlaceId(); |
|
|
|
StringBuilder location = new StringBuilder(); |
|
|
|
Depository depository = depositoryService.findDepositoryById(stockTaking.getDepositoryId()); |
|
|
|
location.append(depository.getDname()); |
|
|
|
if (!(Integer.compare(placeId, 0) == 0)) { |
|
|
|
// 如果不是默认库位
|
|
|
|
Place placeById = placeService.findPlaceById(placeId); |
|
|
|
location.append("-").append(placeById.getCode()); |
|
|
|
} |
|
|
|
String location = depository.getDname(); |
|
|
|
// 设置盘点位置
|
|
|
|
stp.setDepositoryName(location.toString()); |
|
|
|
mv.addObject("mainRecord", stp); |
|
|
|
@ -1996,7 +1981,6 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<AdministrationP> findAllCompany(UserByPort userByPort) { |
|
|
|
String url = PortConfig.external_url + "/org/govlist"; |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
@ -2195,7 +2179,7 @@ public class PageController { |
|
|
|
|
|
|
|
// 跳转到添加权限界面
|
|
|
|
@GetMapping("/postRoleAdd") |
|
|
|
public ModelAndView PostRoleAdd(Integer id,Integer classes, HttpServletRequest request) { |
|
|
|
public ModelAndView PostRoleAdd(Integer id, Integer classes, HttpServletRequest request) { |
|
|
|
UserByPort userToken = (UserByPort) request.getAttribute("userToken"); |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/post/postRole_add"); |
|
|
|
@ -2508,7 +2492,7 @@ public class PageController { |
|
|
|
// 获取主订单
|
|
|
|
stockTaking = stockTakingService.findStockTakingById(stcp.getMainId()); |
|
|
|
|
|
|
|
Integer placeId = stockTaking.getPlaceId(); |
|
|
|
Integer placeId = stcp.getMid(); |
|
|
|
// 获取库位详情
|
|
|
|
Place placeById = placeService.findPlaceById(placeId); |
|
|
|
|
|
|
|
|