|
|
|
@ -51,7 +51,6 @@ public class PageController { |
|
|
|
private MaterialService materialService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CompanyService companyService; |
|
|
|
|
|
|
|
@ -169,8 +168,6 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/register") |
|
|
|
public String register() { |
|
|
|
return "pages/user/register"; |
|
|
|
@ -213,23 +210,10 @@ public class PageController { |
|
|
|
map.put("userAgent", Md5.crypt(header)); |
|
|
|
mv.addObject("notices", noticeService.findNoticeByCondition(map, userToken)); |
|
|
|
} |
|
|
|
// 查询当前用户所在部门
|
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
// 查询当前用户管理的仓库
|
|
|
|
List<RoleAndDepository> depositoryAndRole = roleService.findDepositoryAndRole(userToken.getId()); |
|
|
|
// 查询当前用户部门拥有的仓库
|
|
|
|
List<Depository> depositoryByAdminorg = depositoryService.findDepositoryByAdminorg(userToken.getMaindeparment().toString()); |
|
|
|
// 定义仓库编号列表
|
|
|
|
List<Integer> depositoryIdList = new ArrayList<>(); |
|
|
|
|
|
|
|
for (Depository depository : depositoryByAdminorg |
|
|
|
) { |
|
|
|
depositoryIdList.add(depository.getId()); |
|
|
|
} |
|
|
|
for (RoleAndDepository rad : depositoryAndRole |
|
|
|
) { |
|
|
|
if (!depositoryIdList.contains(rad.getDepositoryId())) { |
|
|
|
depositoryIdList.add(rad.getDepositoryId()); |
|
|
|
} |
|
|
|
} |
|
|
|
List<Integer> depositoryIdList = roleService.findDepositoryIdForUserHas(userToken); |
|
|
|
mv.addObject("depositoryCount", depositoryIdList.size()); |
|
|
|
Integer inventoryCountByDepository = materialService.findInventoryCountByDepository(depositoryIdList); |
|
|
|
if (inventoryCountByDepository == null) { |
|
|
|
@ -244,11 +228,8 @@ public class PageController { |
|
|
|
Integer applicationIn = depositoryRecordService.findApplicationInRecordPCountByCondition(param); |
|
|
|
warehouseRecord = applicationIn + applicationOut; |
|
|
|
mv.addObject("warehouseRecord", warehouseRecord); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
|
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -258,9 +239,8 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/message") |
|
|
|
public ModelAndView userMessage(HttpServletRequest request){ |
|
|
|
public ModelAndView userMessage(HttpServletRequest request) { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/self/message"); |
|
|
|
String header = request.getHeader("user-agent"); |
|
|
|
@ -359,11 +339,8 @@ public class PageController { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/split/split-out"); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -386,15 +363,12 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
// 获取当天时间戳
|
|
|
|
String currentDate = DateUtil.getCurrentDate(); |
|
|
|
Long aLong = DateUtil.DateTimeByDayToTimeStamp(currentDate); |
|
|
|
mv.addObject("nowDay", aLong); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -603,11 +577,8 @@ public class PageController { |
|
|
|
map.put("mcode", material.getCode()); |
|
|
|
map.put("codeFlag", 1); |
|
|
|
// 获取物料与条形码的对应关系
|
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -642,12 +613,9 @@ public class PageController { |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
List<MaterialType> materialTypeAll = materialTypeService.findMaterialTypeByCondition(map); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
mv.addObject("materialTypes", materialTypeAll); |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -725,19 +693,16 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
// 获取当前用户是否存在可见仓库
|
|
|
|
List<Integer> union = roleService.findDepositoryIdForWareHouseVisiblePermissionByUser(userToken); |
|
|
|
if(union.size() > 0){ |
|
|
|
mv.addObject("display","block"); |
|
|
|
}else{ |
|
|
|
mv.addObject("display","none"); |
|
|
|
if (union.size() > 0) { |
|
|
|
mv.addObject("display", "block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
} |
|
|
|
mv.setViewName("pages/application/application-out"); |
|
|
|
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(4, role) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.setViewName("pages/applicationForStorageCenter/application-out"); |
|
|
|
} |
|
|
|
return mv; |
|
|
|
@ -752,18 +717,15 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
// 获取当前用户是否存在可见仓库
|
|
|
|
List<Integer> union = roleService.findDepositoryIdForWareHouseVisiblePermissionByUser(userToken); |
|
|
|
if(union.size() > 0){ |
|
|
|
mv.addObject("display","block"); |
|
|
|
}else{ |
|
|
|
mv.addObject("display","none"); |
|
|
|
if (union.size() > 0) { |
|
|
|
mv.addObject("display", "block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
} |
|
|
|
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(4, role) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.setViewName("pages/applicationForStorageCenter/application-out_back"); |
|
|
|
} |
|
|
|
InventoryP inventoryP = new InventoryP(); |
|
|
|
@ -803,11 +765,8 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -830,11 +789,8 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -879,11 +835,8 @@ public class PageController { |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/depository/table-stock"); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "table-cell"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -943,11 +896,8 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1000,11 +950,8 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1027,7 +974,7 @@ public class PageController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("/materialForGroup") |
|
|
|
public ModelAndView materialForGroup(Integer mid, Integer gid,HttpServletRequest request) { |
|
|
|
public ModelAndView materialForGroup(Integer mid, Integer gid, HttpServletRequest request) { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
// 根据物料id与组合id查询对应明细
|
|
|
|
GroupInfo groupInfoByMidAndGid = groupService.findGroupInfoByMidAndGid(mid, gid); |
|
|
|
@ -1039,11 +986,8 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1066,11 +1010,8 @@ public class PageController { |
|
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1104,11 +1045,8 @@ public class PageController { |
|
|
|
} |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
|
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1172,11 +1110,8 @@ public class PageController { |
|
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
|
|
|
|
|
|
|
|
|
Integer isadmin = userToken.getIsadmin(); |
|
|
|
if (isadmin == null) { |
|
|
|
isadmin = 1; |
|
|
|
} |
|
|
|
if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1623,10 +1558,10 @@ public class PageController { |
|
|
|
|
|
|
|
// 获取当前出库仓库是否为开放仓库
|
|
|
|
int flagForOpenDepository = recordP.getFlagForOpenDepository(); |
|
|
|
if(flagForOpenDepository == 2){ |
|
|
|
mv.addObject("depositoryManagerText","部门负责人"); |
|
|
|
}else{ |
|
|
|
mv.addObject("depositoryManagerText","仓储负责人"); |
|
|
|
if (flagForOpenDepository == 2) { |
|
|
|
mv.addObject("depositoryManagerText", "部门负责人"); |
|
|
|
} else { |
|
|
|
mv.addObject("depositoryManagerText", "仓储负责人"); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取所有子订单
|
|
|
|
@ -1731,11 +1666,8 @@ public class PageController { |
|
|
|
recordP.setUnit(sumUnit.toString()); |
|
|
|
mv.addObject("record", recordP); |
|
|
|
mv.addObject("recordMinList", applicationOutRecordMinByParent); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0 ) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "table-row"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -1959,17 +1891,14 @@ public class PageController { |
|
|
|
// 获取当前主单
|
|
|
|
ApplicationOutRecordP recordP = depositoryRecordService.findApplicationOutRecordPById(recordMinP.getParentId()); |
|
|
|
boolean b = DateUtil.IsMonthStartAndEnd(recordP.getApplicantTime()); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0 && b) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment) && b) { |
|
|
|
mv.addObject("edisplay", "inline-block"); |
|
|
|
} else { |
|
|
|
mv.addObject("edisplay", "none"); |
|
|
|
|
|
|
|
} |
|
|
|
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0) { |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("pdisplay", "table-row"); |
|
|
|
} else { |
|
|
|
mv.addObject("pdisplay", "none"); |
|
|
|
@ -1977,7 +1906,6 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mv.addObject("recordMinP", recordMinP); |
|
|
|
} else { |
|
|
|
throw new MyException("缺少必要参数!"); |
|
|
|
@ -2001,10 +1929,10 @@ public class PageController { |
|
|
|
ApplicationOutRecordP applicationOutRecordPById = depositoryRecordService.findApplicationOutRecordPById(id); |
|
|
|
// 获取当前仓库是否为开放仓库
|
|
|
|
int flagForOpenDepository = applicationOutRecordPById.getFlagForOpenDepository(); |
|
|
|
if(flagForOpenDepository == 2){ |
|
|
|
mv.addObject("depositoryManagerText","部门负责人"); |
|
|
|
}else{ |
|
|
|
mv.addObject("depositoryManagerText","仓储负责人"); |
|
|
|
if (flagForOpenDepository == 2) { |
|
|
|
mv.addObject("depositoryManagerText", "部门负责人"); |
|
|
|
} else { |
|
|
|
mv.addObject("depositoryManagerText", "仓储负责人"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -2146,12 +2074,8 @@ public class PageController { |
|
|
|
mv.addObject("cdisplay", "none"); |
|
|
|
} |
|
|
|
|
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
|
|
|
|
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.addObject("display", "table-row"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
@ -2194,13 +2118,10 @@ public class PageController { |
|
|
|
gidList.add(gid); |
|
|
|
} else if ("more".equals(type)) { |
|
|
|
} |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
mv.addObject("gidList", gidList); |
|
|
|
mv.setViewName("pages/group/applicationOutForGroup"); |
|
|
|
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0) { |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.setViewName("pages/applicationForStorageCenter/applicationOutForGroup"); |
|
|
|
} |
|
|
|
return mv; |
|
|
|
@ -2799,27 +2720,20 @@ public class PageController { |
|
|
|
List<String> range = redisTemplateForHash.boundListOps("WMS_temporaryValue_Out" + userToken.getNumber()).range(0, -1); |
|
|
|
// 获取当前用户是否存在可见仓库
|
|
|
|
List<Integer> union = roleService.findDepositoryIdForWareHouseVisiblePermissionByUser(userToken); |
|
|
|
if(union.size() > 0){ |
|
|
|
mv.addObject("display","block"); |
|
|
|
}else{ |
|
|
|
mv.addObject("display","none"); |
|
|
|
if (union.size() > 0) { |
|
|
|
mv.addObject("display", "block"); |
|
|
|
} else { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
} |
|
|
|
Integer maindeparment = userToken.getMaindeparment(); |
|
|
|
if (range != null && range.size() > 0) { |
|
|
|
mv.setViewName("pages/application/application-out_temporaryValue"); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.setViewName("pages/applicationForStorageCenter/application-out_temporaryValue"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
mv.setViewName("pages/application/application-out"); |
|
|
|
Integer role = userToken.getIsadmin(); |
|
|
|
if (role == null) { |
|
|
|
role = 1; |
|
|
|
} |
|
|
|
if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { |
|
|
|
if (PortConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
|
mv.setViewName("pages/applicationForStorageCenter/application-out"); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -3167,8 +3081,6 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 用于跳转到库存盘点时编辑页面
|
|
|
|
@GetMapping("/stockTakingInfoForInventory") |
|
|
|
public ModelAndView stockTakingInfoForInventory(@RequestParam Map<String, String> param, HttpServletRequest request) { |
|
|
|
@ -3212,10 +3124,11 @@ public class PageController { |
|
|
|
|
|
|
|
/** |
|
|
|
* 用于获取当前用户的任务列表 |
|
|
|
* |
|
|
|
* @param userToken 当前用户 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public List<SimpleTaskP> getUserSimpleTaskP(UserByPort userToken){ |
|
|
|
public List<SimpleTaskP> getUserSimpleTaskP(UserByPort userToken) { |
|
|
|
Map<String, Object> paramForTask = new HashMap<>(); |
|
|
|
paramForTask.put("isDone", 0); |
|
|
|
paramForTask.put("userId", userToken.getId()); |
|
|
|
@ -3269,10 +3182,11 @@ public class PageController { |
|
|
|
|
|
|
|
/** |
|
|
|
* 用于获取当前用户的部分申请列表 |
|
|
|
* |
|
|
|
* @param userToken 当前用户 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public List<SimpleTaskP> getUserSimpleApplyP(UserByPort userToken){ |
|
|
|
public List<SimpleTaskP> getUserSimpleApplyP(UserByPort userToken) { |
|
|
|
Map<String, Object> paramForApply = new HashMap<>(); |
|
|
|
paramForApply.put("applicantId", userToken.getId()); |
|
|
|
paramForApply.put("size", 4); |
|
|
|
@ -3295,7 +3209,7 @@ public class PageController { |
|
|
|
list.add(simpleTask); |
|
|
|
} |
|
|
|
|
|
|
|
paramForApply.put("originator",userToken.getId()); |
|
|
|
paramForApply.put("originator", userToken.getId()); |
|
|
|
List<StockTaking> stockTakingByCondition = stockTakingService.findStockTakingByCondition(paramForApply); |
|
|
|
for (StockTaking stockTaking : stockTakingByCondition) { |
|
|
|
SimpleTaskP simpleTask = new SimpleTaskP(new SimpleStockTakingP(stockTaking)); |
|
|
|
@ -3305,14 +3219,13 @@ public class PageController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 跳转到移动端功能页面 |
|
|
|
* |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("/userAuthorityMenus") |
|
|
|
public ModelAndView userAuthorityMenus(){ |
|
|
|
public ModelAndView userAuthorityMenus() { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/self/userAuthorityMenus"); |
|
|
|
return mv; |
|
|
|
@ -3323,7 +3236,7 @@ public class PageController { |
|
|
|
* 用来跳转到仓库对外开放页面 |
|
|
|
*/ |
|
|
|
@GetMapping("/depositoryRole") |
|
|
|
public ModelAndView depositoryRole(){ |
|
|
|
public ModelAndView depositoryRole() { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
mv.setViewName("pages/authorization/depositoryOpen"); |
|
|
|
return mv; |
|
|
|
|