| | |
| | | return R.ok(locDetlService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/auth") |
| | | @ManagerAuth |
| | | public R stockOutList(@RequestParam(value = "locNos[]") List<String> locNos){ |
| | | if (!locNos.isEmpty()) { |
| | | List<LocDetl> res = new ArrayList<>(); |
| | | for (String locNo : new HashSet<>(locNos)) { |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", locNo)); |
| | | if (!locDetls.isEmpty()) { |
| | | res.addAll(locDetls); |
| | | } |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stock/out/list/auth") |
| | | @ManagerAuth |
| | | 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 (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"); |
| | | } |
| | | } |
| | | return R.ok(locDetlService.getStockOut(toPage(curr, limit, param, LocDetl.class))); |
| | | } |
| | | |