| | |
| | | taskWrkService.updateById(taskWrk); |
| | | return R.ok(); |
| | | } |
| | | @PostMapping(value = "/taskWrk/upIoPri") |
| | | public R upIoPri(@RequestParam String taskNo){ |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskNo); |
| | | if (taskWrk.getIoPri() > 300){ |
| | | return R.error("优先级已最高"); |
| | | } |
| | | Map<Integer,Integer> map = new HashMap<>(); |
| | | map.put(100,200);map.put(200,300);map.put(300,400); |
| | | Integer pri = map.get(taskWrk.getIoPri()); |
| | | taskWrk.setIoPri(pri); |
| | | if (!taskWrkService.updateById(taskWrk)){ |
| | | return R.error("增加优先级失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | @PostMapping(value = "/taskWrk/downIoPri") |
| | | public R downIoPri(@RequestParam String taskNo){ |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskNo); |
| | | if (taskWrk.getIoPri() <200){ |
| | | return R.error("优先级已最低"); |
| | | } |
| | | Map<Integer,Integer> map = new HashMap<>(); |
| | | map.put(200,100);map.put(300,200);map.put(400,300); |
| | | Integer pri = map.get(taskWrk.getIoPri()); |
| | | taskWrk.setIoPri(pri); |
| | | if (!taskWrkService.updateById(taskWrk)){ |
| | | return R.error("降低优先级失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static String getTaskType(Integer paramIoType){ |
| | | switch (paramIoType){ |