| | |
| | | |
| | | @RequestMapping(value = "/locDetl/forlocNo/auth/v1") |
| | | @ManagerAuth |
| | | public R forlocNoV1(@RequestParam String locNo) { |
| | | LambdaQueryWrapper<LocDetl> locDetlLambdaQueryWrapper = new LambdaQueryWrapper<LocDetl>() |
| | | .eq(LocDetl::getLocNo, locNo) |
| | | .eq(LocDetl::getHostId, getHostId()); |
| | | public R forlocNoV1(@RequestParam String locNo ,@RequestParam(required = false) String matnr) { |
| | | |
| | | LambdaQueryWrapper<LocDetl> locDetlLambdaQueryWrapper = new LambdaQueryWrapper<LocDetl>(); |
| | | locDetlLambdaQueryWrapper.eq(LocDetl::getLocNo, locNo); |
| | | locDetlLambdaQueryWrapper.eq(LocDetl::getHostId, getHostId()); |
| | | if(!Cools.isEmpty(matnr)){ |
| | | locDetlLambdaQueryWrapper.like(LocDetl::getMatnr, matnr); |
| | | } |
| | | List<LocDetl> detls = locDetlService.list(locDetlLambdaQueryWrapper); |
| | | if (Cools.isEmpty(detls)){ |
| | | return R.error("未查询到库存数据"); |
| | |
| | | .eq(LocDetl::getLocNo, locNo) |
| | | .eq(LocDetl::getHostId, getHostId()) |
| | | .eq(LocDetl::getMatnr, matnr); |
| | | if (!Cools.isEmpty(batch)){ |
| | | locDetlLambdaQueryWrapper.eq(LocDetl::getBatch,batch); |
| | | } |
| | | // if (!Cools.isEmpty(batch)){ |
| | | // locDetlLambdaQueryWrapper.eq(LocDetl::getBatch,batch); |
| | | // } |
| | | List<LocDetl> detls = locDetlService.list(locDetlLambdaQueryWrapper); |
| | | if (Cools.isEmpty(detls)){ |
| | | return R.error("未查询到库存数据"); |
| | |
| | | // .where("loc_no like '" +row +"%'"); |
| | | // } |
| | | List<LocDetl> list = locDetlService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | List<LocDetl> locDetls=new ArrayList<>(); |
| | | for (LocDetl l:list |
| | | ) { |
| | | if(Cools.isEmpty(l.getMaktx())){ |
| | | continue; |
| | | } |
| | | String new_String = l.getMaktx().replace("\"",""); |
| | | l.setMaktx(new_String); |
| | | locDetls.add(l); |
| | | } |
| | | return R.ok(exportSupport(locDetls, fields)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | |
| | | @RequestParam(required = false) String timeRange, |
| | | @RequestParam Map<String, Object> param) { |
| | | QueryWrapper<LocDetl> wrapper = new QueryWrapper<>(); |
| | | Object barcode = null; |
| | | if (!Cools.isEmpty(param.get("barcode"))) { |
| | | barcode = param.get("barcode"); |
| | | } |
| | | param.remove("zpallet"); |
| | | param.remove("barcode"); |
| | | |
| | | if (!Cools.isEmpty(param.get("decrees"))) { |
| | | ArrayList<String> mats = new ArrayList<>(); |
| | |
| | | mats.add(mat.getMatnr()); |
| | | } |
| | | } |
| | | |
| | | wrapper.in("matnr", mats); |
| | | param.remove("decrees"); |
| | | } |
| | |
| | | wrapper.le("appe_time", DateUtils.convert(range[1])); |
| | | } |
| | | if (!Cools.isEmpty(param.get("locNo"))) { |
| | | wrapper.eq("loc_no", param.get("locNo")); |
| | | wrapper.like("loc_no", param.get("locNo")); |
| | | } |
| | | |
| | | if (!Cools.isEmpty(barcode)) { |
| | | wrapper.eq("zpallet", barcode); |
| | | if (!Cools.isEmpty(param.get("zpallet"))) { |
| | | wrapper.like("zpallet", param.get("zpallet")); |
| | | } |
| | | |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField)); |
| | | } |
| | | |
| | | |
| | | |
| | | param.remove("locNo"); |
| | | param.remove("owner"); |