|
|
|
@ -97,17 +97,36 @@ public class WarehouseWarehousingEntryController extends BladeController {
|
|
|
|
|
/** |
|
|
|
|
* 仓库入库单 分页 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/list") |
|
|
|
|
@PostMapping("/list") |
|
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
|
@ApiOperation(value = "分页", notes = "传入warehouseWarehousingEntry") |
|
|
|
|
public R<IPage<WarehouseWarehousingEntryEntity>> list(@ApiIgnore @RequestParam Map<String, Object> warehouseWarehousingEntry, Query query) { |
|
|
|
|
public R<IPage<WarehouseWarehousingEntryEntity>> list(@ApiIgnore @RequestBody Map<String, Object> request) { |
|
|
|
|
//获取当前登录人仓库
|
|
|
|
|
List<BasicdataWarehouseEntity> myWarehouseList = basicdataWarehouseClient.getMyWatchWarehouse(); |
|
|
|
|
List<Long> collect = myWarehouseList.stream() |
|
|
|
|
.map(BasicdataWarehouseEntity::getId) |
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> warehouseWarehousingEntry = (Map<String, Object>) request.get("warehouseWarehousingEntry"); |
|
|
|
|
|
|
|
|
|
String receiptDateStart = (String) warehouseWarehousingEntry.get("receiptDateStart"); |
|
|
|
|
String receiptDateStartEnd = (String) warehouseWarehousingEntry.get("receiptDateStartEnd"); |
|
|
|
|
warehouseWarehousingEntry.remove("receiptDateStart"); |
|
|
|
|
warehouseWarehousingEntry.remove("receiptDateStartEnd"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> queryMap = (Map) request.get("query"); |
|
|
|
|
Query query = new Query(); |
|
|
|
|
query.setSize((Integer) queryMap.get("size")); |
|
|
|
|
query.setCurrent((Integer) queryMap.get("current")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<WarehouseWarehousingEntryEntity> queryWrapper = Condition.getQueryWrapper(warehouseWarehousingEntry, WarehouseWarehousingEntryEntity.class); |
|
|
|
|
queryWrapper.lambda().in(collect.size()>0,WarehouseWarehousingEntryEntity::getWarehouseId,collect); |
|
|
|
|
queryWrapper.lambda().in(!collect.isEmpty(),WarehouseWarehousingEntryEntity::getWarehouseId,collect); |
|
|
|
|
if(receiptDateStart != null && receiptDateStartEnd != null){ |
|
|
|
|
queryWrapper.lambda().between(WarehouseWarehousingEntryEntity::getReceiptDate, receiptDateStart+" 00:00:00", receiptDateStartEnd+" 23:59:59"); |
|
|
|
|
} |
|
|
|
|
IPage<WarehouseWarehousingEntryEntity> pages = warehouseWarehousingEntryService.page(Condition.getPage(query), queryWrapper); |
|
|
|
|
return R.data(pages); |
|
|
|
|
} |
|
|
|
|