| | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<AsnOrderItem, BaseParam> pageParam = new PageParam<>(baseParam, AsnOrderItem.class); |
| | | QueryWrapper<AsnOrderItem> queryWrapper = pageParam.buildWrapper(true); |
| | | if (!Objects.isNull(map.get("poDetlId"))) { |
| | | queryWrapper.in("po_detl_id", JSONArray.parseArray(JSONArray.toJSONString(map.get("poDetlId")), Long.class)); |
| | | } |
| | | return R.ok().add(outStockItemService.listByAsnId(pageParam, queryWrapper)); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:outStockItem:list')") |
| | | @ApiOperation("分页获取列表") |
| | | @PostMapping("/outStockItem/edit/page") |
| | | public R byPoIdspage(@RequestBody Map<String, Object> map) { |
| | | List<Long> poDetlIds = new ArrayList<>(); |
| | | if (!Objects.isNull(map.get("poDetlId"))) { |
| | | poDetlIds = JSONArray.parseArray(JSONArray.toJSONString(map.get("poDetlId")), Long.class); |
| | | map.remove("poDetlId"); |
| | | } |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<AsnOrderItem, BaseParam> pageParam = new PageParam<>(baseParam, AsnOrderItem.class); |
| | | QueryWrapper<AsnOrderItem> queryWrapper = pageParam.buildWrapper(true); |
| | | if (!poDetlIds.isEmpty()) { |
| | | queryWrapper.in("po_detl_id", poDetlIds); |
| | | } else { |
| | | return R.ok(); |
| | | } |
| | | return R.ok().add(outStockItemService.listByAsnId(pageParam, queryWrapper)); |
| | | } |
| | | |