| | |
| | | .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 |
| | | ) { |
| | | String new_String = l.getMatnr().replace("\"",""); |
| | | l.setMatnr(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"); |