| | |
| | | |
| | | @RequestMapping(value = "/locDetlOut/auth") |
| | | @ManagerAuth |
| | | public R stockOutListAll(@RequestParam(value = "matnrs[]",required = false) List<String> matnrs){ |
| | | if (!matnrs.isEmpty()) { |
| | | public R stockOutListAll(@RequestParam(value = "locNos[]") List<String> locNos,@RequestParam(value = "matnrs[]",required = false) List<String> matnrs){ |
| | | if (!locNos.isEmpty()&&!matnrs.isEmpty()) { |
| | | List<LocDetl> res = new ArrayList<>(); |
| | | for (String locNo : new HashSet<>(locNos)) { |
| | | for (String matnr : new HashSet<>(matnrs)) { |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr",matnr)); |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr",matnr).eq("loc_no",locNo)); |
| | | if (!locDetls.isEmpty()) { |
| | | res.addAll(locDetls); |
| | | } |
| | | } |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | return R.parse(BaseRes.EMPTY); |
| | |
| | | return R.ok(stockOut); |
| | | } |
| | | |
| | | @RequestMapping(value = "/clamp/out/list/auth") |
| | | @ManagerAuth |
| | | public R clampOutList(@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 (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"); |
| | | } |
| | | } |
| | | Page<LocDetl> stockOut = locDetlService.getStockOut(toPage(curr, limit, param, LocDetl.class)); |
| | | if (stockOut.getRecords().size()==0){ |
| | | stockOut = locDetlService.getStockOut(toPage(1, limit, param, LocDetl.class)); |
| | | } |
| | | return R.ok(stockOut); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/list/auth")// /locDetl/list/auth 接口问题 |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |