| | |
| | | return R.error(); |
| | | } |
| | | LocMast oldLocMast = locMastService.selectById(locMast.getLocNo()); |
| | | if (locX(locMast.getLocNo())){ |
| | | if (oldLocMast.getLocSts().equals("X")){ |
| | | return R.error("此处没有库位,请根据现场情况操作!!!"); |
| | | }else { |
| | | locMast.setLocSts("X"); |
| | | } |
| | | } |
| | | if (locMast.getLocSts().equals("F") && (oldLocMast.getLocSts().equals("D") || oldLocMast.getLocSts().equals("O"))) { |
| | | return R.error("当前操作已被阻止,请联系管理员"); |
| | | } |
| | |
| | | locMastService.updateById(locMast); |
| | | return R.ok(); |
| | | } |
| | | public boolean locX(String locNo){ |
| | | switch (locNo){ |
| | | case "1300601": case "1300602": case "1300603": case "1300604": case "1300605": case "1300606": |
| | | case "1300701": case "1300702": case "1300703": case "1300704": case "1300705": case "1300706": |
| | | case "1301301": case "1301302": case "1301303": case "1301304": case "1301305": case "1301306": |
| | | case "1301401": case "1301402": case "1301403": case "1301404": case "1301405": case "1301406": |
| | | case "1302001": case "1302002": case "1302003": case "1302004": case "1302005": case "1302006": |
| | | case "1301205": case "1301206": |
| | | case "1302402": |
| | | case "1402402": |
| | | return true; |
| | | default: |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/delete/auth") |
| | | @ManagerAuth(memo = "库位删除") |