| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.FrozenParam; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.LocOwner; |
| | | import com.zy.asrs.entity.Mat; |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping(value = "/locDetl/frozenInventory") |
| | | @ManagerAuth(memo = "库存冻结") |
| | | public R frozen(@RequestBody List<FrozenParam> param){ |
| | | if (param.size() == 0) { |
| | | return R.parse("未收到数据"); |
| | | } |
| | | |
| | | return locDetlService.frozenInventory(param); |
| | | } |
| | | |
| | | @PostMapping(value = "/locDetl/unfreezeInventory") |
| | | @ManagerAuth(memo = "库存解冻") |
| | | public R unfreeze(@RequestBody List<FrozenParam> param){ |
| | | if (param.size() == 0) { |
| | | return R.parse("未收到数据"); |
| | | } |
| | | |
| | | return locDetlService.unfreezeInventory(param); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/export/auth") |
| | | @ManagerAuth(memo = "库位明细导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class)); |
| | | for (LocDetl locDetl : stockStatis.getRecords()) { |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | if (mat != null) { |
| | | locDetl.sync(mat); |
| | | } |
| | | } |
| | | // for (LocDetl locDetl : stockStatis.getRecords()) { |
| | | // Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | // if (mat != null) { |
| | | // locDetl.sync(mat); |
| | | // } |
| | | // } |
| | | return R.ok().add(stockStatis); |
| | | } |
| | | |
| | |
| | | @RequestMapping("/locDetl/count") |
| | | public R getAllCount(){ |
| | | Integer sum = locDetlService.sum(); |
| | | return R.ok(sum); |
| | | return R.ok(sum == null ? 0 : sum); |
| | | } |
| | | |
| | | } |