| | |
| | | public R stockOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | if (!Cools.isEmpty(param.get("modi_time"))){ |
| | | String val = String.valueOf(param.get("modi_time")); |
| | | if (!Cools.isEmpty(param.get("appe_time"))){ |
| | | String val = String.valueOf(param.get("appe_time")); |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | param.put("startTime", DateUtils.convert(dates[0])); |
| | | param.put("endTime", DateUtils.convert(dates[1])); |
| | | param.remove("modi_time"); |
| | | param.remove("appe_time"); |
| | | } |
| | | } |
| | | Page<LocDetl> stockOut = locDetlService.getStockOut(toPage(curr, limit, param, LocDetl.class)); |
| | |
| | | @RequestParam Map<String, Object> param) { |
| | | Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class)); |
| | | for (LocDetl locDetl : stockStatis.getRecords()) { |
| | | Double weight = locDetl.getWeight(); |
| | | String standby1 = locDetl.getStandby1(); |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | if (mat != null) { |
| | | locDetl.sync(mat); |
| | | locDetl.setStandby1(standby1); |
| | | locDetl.setWeight(weight); |
| | | } |
| | | } |
| | | return R.ok().add(stockStatis); |
| | |
| | | return R.ok(sum); |
| | | } |
| | | |
| | | /** |
| | | * 获取库存总数 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/locDetl/count2") |
| | | public R getAllCount2(){ |
| | | Integer sum = locDetlService.sum2(); |
| | | return R.ok(sum); |
| | | } |
| | | |
| | | } |