| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnError/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机异常码添加") |
| | | public R add(BasCrnError basCrnError) { |
| | | basCrnError.setModiUser(getUserId()); |
| | | basCrnError.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnError/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机异常码修改") |
| | | public R update(BasCrnError basCrnError){ |
| | | if (Cools.isEmpty(basCrnError) || null==basCrnError.getErrorCode()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnError/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机异常码删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasCrnError> list = JSONArray.parseArray(param, BasCrnError.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnError/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机异常码导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasCrnError> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机状态添加") |
| | | public R add(BasCrnStatus basCrnStatus) { |
| | | basCrnStatus.setModiUser(getUserId()); |
| | | basCrnStatus.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机状态修改") |
| | | public R update(BasCrnStatus basCrnStatus){ |
| | | if (Cools.isEmpty(basCrnStatus) || null==basCrnStatus.getStsNo()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机状态删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasCrnStatus> list = JSONArray.parseArray(param, BasCrnStatus.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasCrnStatus> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnp/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机添加") |
| | | public R add(BasCrnp basCrnp) { |
| | | basCrnp.setModiUser(getUserId()); |
| | | basCrnp.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnp/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机修改") |
| | | public R update(BasCrnp basCrnp){ |
| | | if (Cools.isEmpty(basCrnp) || null==basCrnp.getCrnNo()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnp/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasCrnp> list = JSONArray.parseArray(param, BasCrnp.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnp/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasCrnp> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevp/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点添加") |
| | | public R add(BasDevp basDevp) { |
| | | basDevp.setModiUser(getUserId()); |
| | | basDevp.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevp/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点修改") |
| | | public R update(BasDevp basDevp){ |
| | | if (Cools.isEmpty(basDevp) || null==basDevp.getDevNo()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevp/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasDevp> list = JSONArray.parseArray(param, BasDevp.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevp/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasDevp> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basLocType/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位状态添加") |
| | | public R add(BasLocType basLocType) { |
| | | basLocType.setModiUser(getUserId()); |
| | | basLocType.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basLocType/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位状态修改") |
| | | public R update(BasLocType basLocType){ |
| | | if (Cools.isEmpty(basLocType) || null==basLocType.getLocSts()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basLocType/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位状态删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasLocType> list = JSONArray.parseArray(param, BasLocType.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basLocType/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasLocType> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWhs/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位类型添加") |
| | | public R add(BasWhs basWhs) { |
| | | basWhs.setModiUser(getUserId()); |
| | | basWhs.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWhs/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位类型修改") |
| | | public R update(BasWhs basWhs){ |
| | | if (Cools.isEmpty(basWhs) || null==basWhs.getId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWhs/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位类型删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasWhs> list = JSONArray.parseArray(param, BasWhs.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWhs/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位类型导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasWhs> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "入出库类型添加") |
| | | public R add(BasWrkIotype basWrkIotype) { |
| | | basWrkIotype.setModiUser(getUserId()); |
| | | basWrkIotype.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "入出库类型修改") |
| | | public R update(BasWrkIotype basWrkIotype){ |
| | | if (Cools.isEmpty(basWrkIotype) || null==basWrkIotype.getIoType()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "入出库类型删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasWrkIotype> list = JSONArray.parseArray(param, BasWrkIotype.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "入出库类型导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作状态添加") |
| | | public R add(BasWrkStatus basWrkStatus) { |
| | | basWrkStatus.setModiUser(getUserId()); |
| | | basWrkStatus.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作状态修改") |
| | | public R update(BasWrkStatus basWrkStatus){ |
| | | if (Cools.isEmpty(basWrkStatus) || null==basWrkStatus.getWrkSts()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作状态删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<BasWrkStatus> list = JSONArray.parseArray(param, BasWrkStatus.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasWrkStatus> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细添加") |
| | | public R add(LocDetl locDetl) { |
| | | locDetl.setModiUser(getUserId()); |
| | | locDetl.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细修改") |
| | | public R update(LocDetl locDetl){ |
| | | if (Cools.isEmpty(locDetl) || null==locDetl.getMatnr()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<LocDetl> list = JSONArray.parseArray(param, LocDetl.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位添加") |
| | | public R add(LocMast locMast) { |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位修改") |
| | | public R update(LocMast locMast){ |
| | | if (Cools.isEmpty(locMast) || null==locMast.getLocNo()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<LocMast> list = JSONArray.parseArray(param, LocMast.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | |
| | | |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStockUseExport.action") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位使用统计导出") |
| | | public R viewStockUseExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStockUseBean> list = reportQueryMapper.getViewStockUseAll(new ViewStockUseBean()); |
| | |
| | | } |
| | | |
| | | //------------------库存滞留统计-------------------------------------- |
| | | @ResponseBody |
| | | @RequestMapping("/viewStayTimeList.action") |
| | | public Map<String,Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | |
| | | |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStayTimeExport.action") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库存滞留统计导出") |
| | | public R viewStayTimeExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStayTimeBean> list = reportQueryMapper.getViewStayTimeAll(new ViewStayTimeBean()); |
| | |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewInOutExport.action") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点日入出库次数统计导出") |
| | | public R viewInOutExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewInOutBean> list = reportQueryMapper.getViewInOutAll(new ViewInOutBean()); |
| | |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkInExport.action") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "日入库明细统计导出") |
| | | public R viewWorkInExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkInAll(new ViewWorkInBean()); |
| | |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkOutExport.action") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "日出库明细统计导出") |
| | | public R viewWorkOutExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkOutAll(new ViewWorkInBean()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/staDesc/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点路径添加") |
| | | public R add(StaDesc staDesc) { |
| | | staDesc.setModiUser(getUserId()); |
| | | staDesc.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/staDesc/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点路径修改") |
| | | public R update(StaDesc staDesc){ |
| | | if (Cools.isEmpty(staDesc) || null==staDesc.getCrnNo()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/staDesc/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点路径删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<StaDesc> list = JSONArray.parseArray(param, StaDesc.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/staDesc/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "站点路径导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<StaDesc> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/stkPlcm/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机异常日志添加") |
| | | public R add(StkPlcm stkPlcm) { |
| | | stkPlcmService.insert(stkPlcm); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stkPlcm/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机异常日志删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<StkPlcm> list = JSONArray.parseArray(param, StkPlcm.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/stkPlcm/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "堆垛机异常日志导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<StkPlcm> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetl/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档明细添加") |
| | | public R add(WrkDetl wrkDetl) { |
| | | wrkDetlService.insert(wrkDetl); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetl/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档明细删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<WrkDetl> list = JSONArray.parseArray(param, WrkDetl.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetl/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档明细导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkDetl> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkLastno/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作序号添加") |
| | | public R add(WrkLastno wrkLastno) { |
| | | wrkLastno.setModiUser(getUserId()); |
| | | wrkLastno.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkLastno/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作序号修改") |
| | | public R update(WrkLastno wrkLastno){ |
| | | if (Cools.isEmpty(wrkLastno) || null==wrkLastno.getWrkMk()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkLastno/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作序号删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<WrkLastno> list = JSONArray.parseArray(param, WrkLastno.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkLastno/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作序号导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkLastno> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档添加") |
| | | public R add(WrkMast wrkMast) { |
| | | wrkMast.setModiUser(getUserId()); |
| | | wrkMast.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档修改") |
| | | public R update(WrkMast wrkMast){ |
| | | if (Cools.isEmpty(wrkMast) || null==wrkMast.getWrkNo()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<WrkMast> list = JSONArray.parseArray(param, WrkMast.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkMast> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/add/pri/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档增加优先级") |
| | | public R addPri(@RequestBody List<WrkMast> list) { |
| | | for (WrkMast entity : list){ |
| | | entity.setIoPri(entity.getIoPri() + 1); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/red/pri/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作档降低优先级") |
| | | public R redPri(@RequestBody List<WrkMast> list) { |
| | | for (WrkMast entity : list){ |
| | | entity.setIoPri(entity.getIoPri() - 1); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作历史档添加") |
| | | public R add(WrkMastLog wrkMastLog) { |
| | | wrkMastLogService.insert(wrkMastLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作历史档修改") |
| | | public R update(WrkMastLog wrkMastLog){ |
| | | if (Cools.isEmpty(wrkMastLog) || null==wrkMastLog.getId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作历史档删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<WrkMastLog> list = JSONArray.parseArray(param, WrkMastLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "工作历史档导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkMastLog> wrapper = new EntityWrapper<>(); |
| | |
| | | if (method.isAnnotationPresent(ManagerAuth.class)){ |
| | | ManagerAuth annotation = method.getAnnotation(ManagerAuth.class); |
| | | if (annotation.value().equals(ManagerAuth.Auth.CHECK)){ |
| | | return check(request, response); |
| | | return check(request, response, annotation.memo()); |
| | | } |
| | | } |
| | | return true; |
| | |
| | | } |
| | | } |
| | | |
| | | private boolean check(HttpServletRequest request, HttpServletResponse response) { |
| | | private boolean check(HttpServletRequest request, HttpServletResponse response, String memo) { |
| | | try { |
| | | String token = request.getHeader("token"); |
| | | UserLogin userLogin = userLoginService.selectOne(new EntityWrapper<UserLogin>().eq("token", token)); |
| | |
| | | } |
| | | // 操作日志 |
| | | OperateLog operateLog = new OperateLog(); |
| | | operateLog.setAction(request.getRequestURI()); |
| | | operateLog.setAction(Cools.isEmpty(memo)?request.getRequestURI():memo); |
| | | operateLog.setIp(request.getRemoteAddr()); |
| | | operateLog.setUserId(user.getId()); |
| | | operateLog.setRequest(JSON.toJSONString(request.getParameterMap())); |
| | |
| | | private RolePermissionService rolePermissionService; |
| | | |
| | | @RequestMapping("/login.action") |
| | | @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "登录") |
| | | public R loginAction(String mobile, String password){ |
| | | if (mobile.equals("super") && password.equals(Cools.md5(superPwd))) { |
| | | Map<String, Object> res = new HashMap<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping("/menu/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "首页菜单") |
| | | public R menu(){ |
| | | // 获取所有一级菜单 |
| | | List<Resource> oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort")); |
| | |
| | | } |
| | | |
| | | @RequestMapping("/power/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "授权") |
| | | @Transactional |
| | | public R power(Long roleId, String powers){ |
| | | Role role = roleService.selectById(roleId); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/edit/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单编辑") |
| | | public R edit(Resource resource) { |
| | | if (Cools.isEmpty(resource)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单添加") |
| | | public R add(Resource resource) { |
| | | resourceService.insert(resource); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单修改") |
| | | public R update(Resource resource){ |
| | | if (Cools.isEmpty(resource) || null==resource.getId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单删除") |
| | | public R delete(Integer[] ids){ |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/role/edit/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "角色编辑") |
| | | public R edit(Role role) { |
| | | if (Cools.isEmpty(role)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/role/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "角色添加") |
| | | public R add(Role role) { |
| | | roleService.insert(role); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/role/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "角色修改") |
| | | public R update(Role role){ |
| | | if (Cools.isEmpty(role) || null==role.getId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/role/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "角色删除") |
| | | public R delete(Integer[] ids){ |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/role/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "角色导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Role> wrapper = new EntityWrapper<>(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/edit/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "系统用户编辑") |
| | | public R edit(User user) { |
| | | if (Cools.isEmpty(user)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "系统用户添加") |
| | | public R add(User user) { |
| | | userService.insert(user); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "系统用户修改") |
| | | public R update(User user){ |
| | | if (Cools.isEmpty(user) || null==user.getId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "系统用户删除") |
| | | public R delete(Integer[] ids){ |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "系统用户导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |