| | |
| | | @Autowired |
| | | private ManLocDetlService manLocDetlService; |
| | | |
| | | @RequestMapping(value = "/locDetl/selectAllNumWarning/auth") |
| | | @ManagerAuth(memo = "库存数量预警") |
| | | public R selectAllNumWarning(@RequestParam(defaultValue = "1")Integer curr, |
| | | @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); |
| | | // } |
| | | // } |
| | | // return R.ok().add(stockStatis); |
| | | |
| | | Page<LocDetlAll> stockStatis = locDetlService.getWarningNumPage(toPage(curr, limit, param, LocDetlAll.class)); |
| | | for (LocDetlAll locDetlAll : stockStatis.getRecords()) { |
| | | Mat mat = matService.selectByMatnr(locDetlAll.getMatnr()); |
| | | if (mat != null) { |
| | | locDetlAll.sync(mat); |
| | | } |
| | | } |
| | | return R.ok().add(stockStatis); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/selectAllWarning/auth") |
| | | @ManagerAuth(memo = "库龄预警") |
| | | public Map<String,Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | LocDetlWarningDTO locDetlWarningDTO = new LocDetlWarningDTO(); |
| | | locDetlWarningDTO.setPageSize(limit); |
| | | locDetlWarningDTO.setPageNumber(curr); |
| | | String locNo = String.valueOf(param.get("locNo")); |
| | | String matnr = String.valueOf(param.get("matnr")); |
| | | if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { |
| | | locDetlWarningDTO.setLocNo(locNo); |
| | | } |
| | | if (!Cools.isEmpty(matnr) && !matnr.equals("null")) { |
| | | locDetlWarningDTO.setMatnr(matnr); |
| | | } |
| | | List<LocDetlWarningDTO> list = locDetlService.selectAllWarning(locDetlWarningDTO); |
| | | int count = locDetlService.getAllWarningCount(locDetlWarningDTO); |
| | | Page<LocDetlWarningDTO> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/update") |
| | | public R update1() { |
| | | if (!locDetlService.updateLocNo("0402805", "0402804")) { |
| | |
| | | public R statis(@RequestParam(defaultValue = "1")Integer curr, |
| | | @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()); |
| | | // 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); |
| | | // } |
| | | // } |
| | | // return R.ok().add(stockStatis); |
| | | |
| | | Page<LocDetlAll> stockStatis = locDetlService.getStockStatisAll(toPage(curr, limit, param, LocDetlAll.class)); |
| | | for (LocDetlAll locDetlAll : stockStatis.getRecords()) { |
| | | Mat mat = matService.selectByMatnr(locDetlAll.getMatnr()); |
| | | if (mat != null) { |
| | | locDetl.sync(mat); |
| | | locDetlAll.sync(mat); |
| | | } |
| | | } |
| | | return R.ok().add(stockStatis); |
| | |
| | | */ |
| | | @RequestMapping("/locDetl/count") |
| | | public R getAllCount(){ |
| | | Integer sum = locDetlService.sum(); |
| | | Double sum = locDetlService.sumAll(); |
| | | return R.ok(sum); |
| | | } |
| | | |
| | |
| | | String locNo = String.valueOf(param.get("locNo")); |
| | | String owner = String.valueOf(param.get("owner")); |
| | | String matnr = String.valueOf(param.get("matnr")); |
| | | String payment = String.valueOf(param.get("payment")); |
| | | if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { |
| | | locDetlDTO.setLocNo(locNo); |
| | | } |
| | |
| | | } |
| | | if (!Cools.isEmpty(owner) && !owner.equals("null")) { |
| | | locDetlDTO.setOwner(owner); |
| | | } |
| | | if (!Cools.isEmpty(payment) && !payment.equals("null")) { |
| | | locDetlDTO.setPayment(payment); |
| | | } |
| | | List<LocDetlAll> list = locDetlService.selectAllPyment(locDetlDTO); |
| | | int count = locDetlService.selectAllPymentcount(locDetlDTO); |
| | |
| | | Page<LocDetlAll> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | if (list.size()==0){ |
| | | locDetlDTO.setPageNumber(1); |
| | | list = locDetlService.selectAllOwner(locDetlDTO); |
| | | count = locDetlService.selectAllCount(locDetlDTO); |
| | | page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |