| | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @RequestMapping(value = "/locDetl/forLocNoAndBarcode/auth") |
| | | @ManagerAuth |
| | | public R forLocNoAndBarcode(@RequestParam String locNo,@RequestParam String barcode) { |
| | | List<LocDetl> detls = locDetlService.list(new LambdaQueryWrapper<LocDetl>().eq(LocDetl::getLocNo, locNo).eq(LocDetl::getZpallet, barcode).eq(LocDetl::getHostId, getHostId())); |
| | | if (Cools.isEmpty(detls)){ |
| | | return R.error("未查询到库存数据"); |
| | | } |
| | | return R.ok(detls); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/forlocNo/auth") |
| | | @ManagerAuth |
| | | public R forlocNo(@RequestParam String orderNo,@RequestParam String locNo,@RequestParam String batch,@RequestParam String matnr) { |
| | | LambdaQueryWrapper<LocDetl> locDetlLambdaQueryWrapper = new LambdaQueryWrapper<LocDetl>() |
| | | .eq(LocDetl::getLocNo, locNo) |
| | | .eq(LocDetl::getHostId, getHostId()) |
| | | .eq(LocDetl::getMatnr, matnr); |
| | | if (!Cools.isEmpty(batch)){ |
| | | locDetlLambdaQueryWrapper.eq(LocDetl::getBatch,batch); |
| | | } |
| | | List<LocDetl> detls = locDetlService.list(locDetlLambdaQueryWrapper); |
| | | if (Cools.isEmpty(detls)){ |
| | | return R.error("未查询到库存数据"); |
| | | } |
| | | return R.ok(detls); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | |
| | | wrapper.ge(LocDetl::getAppeTime, DateUtils.convert(range[0])); |
| | | wrapper.le(LocDetl::getAppeTime, DateUtils.convert(range[1])); |
| | | } |
| | | if (!Cools.isEmpty(param.get("loc_no"))) { |
| | | wrapper.eq(LocDetl::getLocNo, param.get("loc_no")); |
| | | if (!Cools.isEmpty(param.get("locNo"))) { |
| | | wrapper.eq(LocDetl::getLocNo, param.get("locNo")); |
| | | } |
| | | return R.ok(locDetlService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | return R.ok(sum); |
| | | } |
| | | |
| | | @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"); |
| | | } |
| | | } |
| | | param.put("hostId", getHostId()); |
| | | return R.ok(locDetlService.getStockOut(curr, limit, param)); |
| | | } |
| | | |
| | | } |