|
|
@ -123,6 +123,8 @@ public class VoucherController {
|
|
|
|
private WarehousingStoragePoundlistService warehousingStoragePoundlistService;
|
|
|
|
private WarehousingStoragePoundlistService warehousingStoragePoundlistService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private WarehousingStorageProductService warehousingStorageProductService;
|
|
|
|
private WarehousingStorageProductService warehousingStorageProductService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ReceiptOrderService receiptOrderService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 列表
|
|
|
|
* 列表
|
|
|
@ -649,6 +651,7 @@ public class VoucherController {
|
|
|
|
queryWrapper.lambda().eq(WarehousingNotificationEntity::getWarehousingType,"1");
|
|
|
|
queryWrapper.lambda().eq(WarehousingNotificationEntity::getWarehousingType,"1");
|
|
|
|
queryWrapper.lambda().and(wrapper ->
|
|
|
|
queryWrapper.lambda().and(wrapper ->
|
|
|
|
wrapper.eq(WarehousingNotificationEntity::getWarehousingStatus,"3").or().eq(WarehousingNotificationEntity::getWarehousingStatus,"4"));
|
|
|
|
wrapper.eq(WarehousingNotificationEntity::getWarehousingStatus,"3").or().eq(WarehousingNotificationEntity::getWarehousingStatus,"4"));
|
|
|
|
|
|
|
|
queryWrapper.inSql("id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
|
|
|
|
//找出入库通知
|
|
|
|
//找出入库通知
|
|
|
|
List<WarehousingNotificationEntity> noticeList = warehousingNotificationService.list(queryWrapper);
|
|
|
|
List<WarehousingNotificationEntity> noticeList = warehousingNotificationService.list(queryWrapper);
|
|
|
|
for (WarehousingNotificationEntity entity : noticeList){
|
|
|
|
for (WarehousingNotificationEntity entity : noticeList){
|
|
|
@ -656,6 +659,7 @@ public class VoucherController {
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingId,entity.getId());
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingId,entity.getId());
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingStorageType,"3");//采购入库
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingStorageType,"3");//采购入库
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingStorageStatus,"3");//状态为已入库
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingStorageStatus,"3");//状态为已入库
|
|
|
|
|
|
|
|
storageQueryWrapper.inSql("id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
|
|
|
|
//找出入库单
|
|
|
|
//找出入库单
|
|
|
|
List<WarehousingStorageEntity> warehousingStorageEntityList = warehousingStorageService.list(storageQueryWrapper);
|
|
|
|
List<WarehousingStorageEntity> warehousingStorageEntityList = warehousingStorageService.list(storageQueryWrapper);
|
|
|
|
for (WarehousingStorageEntity storageEntity : warehousingStorageEntityList){
|
|
|
|
for (WarehousingStorageEntity storageEntity : warehousingStorageEntityList){
|
|
|
@ -666,32 +670,64 @@ public class VoucherController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else if (ObjectUtils.isNotEmpty(businessOrderEntity) && businessOrderEntity.getDeliveryType().equals("2")){
|
|
|
|
}else if (ObjectUtils.isNotEmpty(businessOrderEntity) && businessOrderEntity.getDeliveryType().equals("2")){
|
|
|
|
|
|
|
|
QueryWrapper<ReceiptOrderEntity> receiptOrderQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
|
receiptOrderQueryWrapper.lambda().eq(ReceiptOrderEntity::getBusinessId,voucherPagination.getBusinessOrderId());
|
|
|
|
|
|
|
|
receiptOrderQueryWrapper.lambda().eq(ReceiptOrderEntity::getReceiptType,"1");
|
|
|
|
|
|
|
|
receiptOrderQueryWrapper.lambda().eq(ReceiptOrderEntity::getReceiptStatus,"3");
|
|
|
|
|
|
|
|
receiptOrderQueryWrapper.inSql("id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
|
|
|
|
|
|
|
|
List<ReceiptOrderEntity> receiptOrderEntityList = receiptOrderService.list(receiptOrderQueryWrapper);
|
|
|
|
|
|
|
|
//循环收货单找出所有的入库单
|
|
|
|
|
|
|
|
for (ReceiptOrderEntity receiptOrderEntity : receiptOrderEntityList){
|
|
|
|
|
|
|
|
QueryWrapper<WarehousingStorageEntity> storageQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingId,receiptOrderEntity.getId());
|
|
|
|
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingStorageType,"15");//采购收货单入库
|
|
|
|
|
|
|
|
storageQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingStorageStatus,"3");//状态为已入库
|
|
|
|
|
|
|
|
//找出入库单
|
|
|
|
|
|
|
|
List<WarehousingStorageEntity> warehousingStorageEntityList = warehousingStorageService.list(storageQueryWrapper);
|
|
|
|
|
|
|
|
for (WarehousingStorageEntity warehousingStorageEntity : warehousingStorageEntityList){
|
|
|
|
|
|
|
|
QueryWrapper<WarehousingStoragePoundlistEntity> pountlistQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
|
pountlistQueryWrapper.lambda().eq(WarehousingStoragePoundlistEntity::getWarehousingStorageId,warehousingStorageEntity.getId());
|
|
|
|
|
|
|
|
List<WarehousingStoragePoundlistEntity> warehousingStoragePoundlistEntityList = warehousingStoragePoundlistService.list(pountlistQueryWrapper);
|
|
|
|
|
|
|
|
storagePoundlistEntityList.addAll(warehousingStoragePoundlistEntityList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//将凭证和对应的商品封装
|
|
|
|
//将凭证和对应的商品封装
|
|
|
|
for (WarehousingStoragePoundlistEntity storagePoundlistEntity : storagePoundlistEntityList){
|
|
|
|
for (WarehousingStoragePoundlistEntity storagePoundlistEntity : storagePoundlistEntityList){
|
|
|
|
QueryWrapper<WarehousingStorageProductEntity> productQueryWrapper = new QueryWrapper<>();
|
|
|
|
QueryWrapper<WarehousingStorageProductEntity> productQueryWrapper = new QueryWrapper<>();
|
|
|
|
productQueryWrapper.lambda().eq(WarehousingStorageProductEntity::getId,storagePoundlistEntity.getStorageProductId());
|
|
|
|
productQueryWrapper.lambda().eq(WarehousingStorageProductEntity::getId,storagePoundlistEntity.getStorageProductId());
|
|
|
|
List<WarehousingStorageProductEntity> product = warehousingStorageProductService.list(productQueryWrapper);
|
|
|
|
List<WarehousingStorageProductEntity> productList = warehousingStorageProductService.list(productQueryWrapper);
|
|
|
|
storagePoundlistEntity.setWarehousingStorageProductEntityList(product);
|
|
|
|
for (WarehousingStorageProductEntity product : productList){
|
|
|
|
}
|
|
|
|
product.setGrossWeight(storagePoundlistEntity.getGrossWeight());//毛重
|
|
|
|
List<VoucherEntity> list= voucherService.queryVoucherPopupByReturnInfo(voucherPagination);
|
|
|
|
product.setTareWeight(storagePoundlistEntity.getTareWeight());//皮重
|
|
|
|
for (VoucherEntity entity : list) {
|
|
|
|
product.setBuckleWeight(storagePoundlistEntity.getBuckleWeight());//扣重
|
|
|
|
if (StringUtil.isNotEmpty(entity.getProductId())){
|
|
|
|
product.setNetWeight(storagePoundlistEntity.getNetWeight());//净重
|
|
|
|
List<ProductWarehouseEntity> productWarehouseEntity = productWarehouseService.getProductByVoucherInfo(entity.getProductId());
|
|
|
|
}
|
|
|
|
for (ProductWarehouseEntity productEntity : productWarehouseEntity) {
|
|
|
|
storagePoundlistEntity.setWarehousingStorageProductEntityList(productList);
|
|
|
|
productEntity.setUnit(entity.getUnit());
|
|
|
|
}
|
|
|
|
productEntity.setGrossWeight(entity.getGrossWeight());
|
|
|
|
for(WarehousingStoragePoundlistEntity poundlistEntity : storagePoundlistEntityList){
|
|
|
|
productEntity.setTareWeight(entity.getTareWeight());
|
|
|
|
VoucherEntity voucherEntity = voucherService.queryVoucherInfo(poundlistEntity.getVoucherId());
|
|
|
|
productEntity.setBuckleWeight(entity.getBuckleWeight());
|
|
|
|
poundlistEntity.setDocumentType1(voucherEntity.getDocumentType1());
|
|
|
|
productEntity.setNetWeight(entity.getNetWeight());
|
|
|
|
poundlistEntity.setVoucherType1(voucherEntity.getVoucherType1());
|
|
|
|
}
|
|
|
|
poundlistEntity.setVehicleNumber(voucherEntity.getVehicleNumber());
|
|
|
|
entity.setProductWarehouseEntityList(productWarehouseEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// List<VoucherEntity> list= voucherService.queryVoucherPopupByReturnInfo(voucherPagination);
|
|
|
|
}
|
|
|
|
// for (VoucherEntity entity : list) {
|
|
|
|
|
|
|
|
// if (StringUtil.isNotEmpty(entity.getProductId())){
|
|
|
|
|
|
|
|
// List<ProductWarehouseEntity> productWarehouseEntity = productWarehouseService.getProductByVoucherInfo(entity.getProductId());
|
|
|
|
|
|
|
|
// for (ProductWarehouseEntity productEntity : productWarehouseEntity) {
|
|
|
|
|
|
|
|
// productEntity.setUnit(entity.getUnit());
|
|
|
|
|
|
|
|
// productEntity.setGrossWeight(entity.getGrossWeight());
|
|
|
|
|
|
|
|
// productEntity.setTareWeight(entity.getTareWeight());
|
|
|
|
|
|
|
|
// productEntity.setBuckleWeight(entity.getBuckleWeight());
|
|
|
|
|
|
|
|
// productEntity.setNetWeight(entity.getNetWeight());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// entity.setProductWarehouseEntityList(productWarehouseEntity);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
//返回对象
|
|
|
|
//返回对象
|
|
|
|
PageListVO vo = new PageListVO();
|
|
|
|
PageListVO vo = new PageListVO();
|
|
|
|
vo.setList(list);
|
|
|
|
vo.setList(storagePoundlistEntityList);
|
|
|
|
PaginationVO page = JsonUtil.getJsonToBean(voucherPagination, PaginationVO.class);
|
|
|
|
PaginationVO page = JsonUtil.getJsonToBean(voucherPagination, PaginationVO.class);
|
|
|
|
vo.setPagination(page);
|
|
|
|
vo.setPagination(page);
|
|
|
|
return ActionResult.success(vo);
|
|
|
|
return ActionResult.success(vo);
|
|
|
|