|
|
@ -329,7 +329,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
Boolean las = false; |
|
|
|
Boolean las = false; |
|
|
|
List<JSONObject> logs = new ArrayList<>(); |
|
|
|
List<JSONObject> logs = new ArrayList<>(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)) { |
|
|
|
log.error("自提操作未进行仓库选择"); |
|
|
|
log.error("自提操作未进行仓库选择"); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -344,7 +344,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
if (!distrilbutionBillLading.getBillPackageEntityList().isEmpty() || !distrilbutionBillLading.getUnBillPackageEntityList().isEmpty()) { |
|
|
|
if (!distrilbutionBillLading.getBillPackageEntityList().isEmpty() || !distrilbutionBillLading.getUnBillPackageEntityList().isEmpty()) { |
|
|
|
//修改新增包件
|
|
|
|
//修改新增包件
|
|
|
|
//todo
|
|
|
|
//todo
|
|
|
|
List<JSONObject> jsonObjects = updateBillPackeg(distrilbutionBillLading, myCurrentWarehouse,billLadingEntity.getPickupBatch()); |
|
|
|
List<JSONObject> jsonObjects = updateBillPackeg(distrilbutionBillLading, myCurrentWarehouse, billLadingEntity.getPickupBatch()); |
|
|
|
if (!jsonObjects.isEmpty()) { |
|
|
|
if (!jsonObjects.isEmpty()) { |
|
|
|
logs.addAll(jsonObjects); |
|
|
|
logs.addAll(jsonObjects); |
|
|
|
} |
|
|
|
} |
|
|
@ -375,7 +375,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
); |
|
|
|
); |
|
|
|
//修改订单数据
|
|
|
|
//修改订单数据
|
|
|
|
if (!distrilbutionBillLading.getStockArticleList().isEmpty()) { |
|
|
|
if (!distrilbutionBillLading.getStockArticleList().isEmpty()) { |
|
|
|
List<JSONObject> jsonObjects = handleOrder(distrilbutionBillLading,billLadingEntity.getPickupBatch()); |
|
|
|
List<JSONObject> jsonObjects = handleOrder(distrilbutionBillLading, billLadingEntity.getPickupBatch()); |
|
|
|
if (!jsonObjects.isEmpty()) { |
|
|
|
if (!jsonObjects.isEmpty()) { |
|
|
|
logs.addAll(jsonObjects); |
|
|
|
logs.addAll(jsonObjects); |
|
|
|
} |
|
|
|
} |
|
|
@ -634,7 +634,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
//进行包件的预约状态修改
|
|
|
|
//进行包件的预约状态修改
|
|
|
|
packageEntityList.add(aaa); |
|
|
|
packageEntityList.add(aaa); |
|
|
|
packageIds.add(aaa.getParceListId()); |
|
|
|
packageIds.add(aaa.getParceListId()); |
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"计划自提,操作方式:新增订单勾选包件,自提批次号:"+distrilbutionBillLading.getPickupBatch(); |
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "计划自提,操作方式:新增订单勾选包件,自提批次号:" + distrilbutionBillLading.getPickupBatch(); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), distrilbutionBillPackageEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), distrilbutionBillPackageEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
logs.add(js); |
|
|
|
logs.add(js); |
|
|
|
} |
|
|
|
} |
|
|
@ -654,7 +654,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
DistrilbutionBillPackageEntity billPackageEntity = getDistrilbutionBillPackageEntity(distrilbutionBillLading, parcelListEntity); |
|
|
|
DistrilbutionBillPackageEntity billPackageEntity = getDistrilbutionBillPackageEntity(distrilbutionBillLading, parcelListEntity); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
packageIds.add(parcelListEntity.getId()); |
|
|
|
packageIds.add(parcelListEntity.getId()); |
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"计划自提,操作方式:新增订单系统默认可用包件,自提批次号:"+distrilbutionBillLading.getPickupBatch(); |
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "计划自提,操作方式:新增订单系统默认可用包件,自提批次号:" + distrilbutionBillLading.getPickupBatch(); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
logs.add(js); |
|
|
|
logs.add(js); |
|
|
|
} |
|
|
|
} |
|
|
@ -679,7 +679,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
DistrilbutionBillPackageEntity billPackageEntity = getDistrilbutionBillPackageEntity(distrilbutionBillLading, parcelListEntity); |
|
|
|
DistrilbutionBillPackageEntity billPackageEntity = getDistrilbutionBillPackageEntity(distrilbutionBillLading, parcelListEntity); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
packageIds.add(parcelListEntity.getId()); |
|
|
|
packageIds.add(parcelListEntity.getId()); |
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"计划自提,操作方式:新增订单系统默认可用包件,自提批次号:"+distrilbutionBillLading.getPickupBatch(); |
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "计划自提,操作方式:新增订单系统默认可用包件,自提批次号:" + distrilbutionBillLading.getPickupBatch(); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
logs.add(js); |
|
|
|
logs.add(js); |
|
|
|
} |
|
|
|
} |
|
|
@ -1180,12 +1180,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
public void sendFactory(String string) { |
|
|
|
public void sendFactory(String string) { |
|
|
|
List<Long> list = Func.toLongList(string); |
|
|
|
List<Long> list = Func.toLongList(string); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)) { |
|
|
|
log.error("自提推送工厂为进行仓库选择?>>>>>>>>>>>>>>>>>>>>warehouse:{}",myCurrentWarehouse); |
|
|
|
log.error("自提推送工厂为进行仓库选择?>>>>>>>>>>>>>>>>>>>>warehouse:{}", myCurrentWarehouse); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!list.isEmpty()) { |
|
|
|
if (!list.isEmpty()) { |
|
|
|
for (Long l : list) { |
|
|
|
for (Long l : list) { |
|
|
|
distributionAsyncService.sendFactorySignforInfo(l+"",myCurrentWarehouse,AuthUtil.getUser()); |
|
|
|
distributionAsyncService.sendFactorySignforInfo(l + "", myCurrentWarehouse, AuthUtil.getUser()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1526,7 +1526,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public List<JSONObject> updateBillPackeg(DistrilbutionBillLadingDTO distrilbutionBillLading,BasicdataWarehouseEntity warehouse,String pickupBatch) { |
|
|
|
public List<JSONObject> updateBillPackeg(DistrilbutionBillLadingDTO distrilbutionBillLading, BasicdataWarehouseEntity warehouse, String pickupBatch) { |
|
|
|
List<Long> packageIds = new ArrayList<>(); |
|
|
|
List<Long> packageIds = new ArrayList<>(); |
|
|
|
List<Long> finalPackageIds = packageIds; |
|
|
|
List<Long> finalPackageIds = packageIds; |
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
@ -1567,7 +1567,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
billPackageEntity.setBillType("1"); |
|
|
|
billPackageEntity.setBillType("1"); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
finalPackageIds.add(i.getParceListId()); |
|
|
|
finalPackageIds.add(i.getParceListId()); |
|
|
|
String content = "包件在"+warehouse.getName()+"由"+AuthUtil.getNickName()+"修改自提计划,操作方式:勾选包件,自提批次号:"+pickupBatch; |
|
|
|
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "修改自提计划,操作方式:勾选包件,自提批次号:" + pickupBatch; |
|
|
|
JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
aaa.add(js); |
|
|
|
aaa.add(js); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -1594,7 +1594,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
); |
|
|
|
); |
|
|
|
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(collect); |
|
|
|
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(collect); |
|
|
|
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { |
|
|
|
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { |
|
|
|
String content = "包件在"+warehouse.getName()+"由"+AuthUtil.getNickName()+"取消计划自提,操作方式:订单取消勾选包件,自提批次号:"+pickupBatch; |
|
|
|
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "取消计划自提,操作方式:订单取消勾选包件,自提批次号:" + pickupBatch; |
|
|
|
JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), distributionParcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), distributionParcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
aaa.add(js); |
|
|
|
aaa.add(js); |
|
|
|
} |
|
|
|
} |
|
|
@ -1742,7 +1742,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
private List<JSONObject> handleOrder(DistrilbutionBillLadingDTO distrilbutionBillLading,String pickupBatch) { |
|
|
|
private List<JSONObject> handleOrder(DistrilbutionBillLadingDTO distrilbutionBillLading, String pickupBatch) { |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)) { |
|
|
|
if (Func.isEmpty(myCurrentWarehouse)) { |
|
|
|
throw new RuntimeException("未授权!!!"); |
|
|
|
throw new RuntimeException("未授权!!!"); |
|
|
@ -1807,7 +1807,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
|
|
|
|
|
|
|
|
if (!list.isEmpty()) { |
|
|
|
if (!list.isEmpty()) { |
|
|
|
for (DistrilbutionBillPackageEntity billPackageEntity : list) { |
|
|
|
for (DistrilbutionBillPackageEntity billPackageEntity : list) { |
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"取消计划自提,操作方式:移除订单,自提批次号:"+pickupBatch; |
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "取消计划自提,操作方式:移除订单,自提批次号:" + pickupBatch; |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
aaa.add(js); |
|
|
|
aaa.add(js); |
|
|
|
|
|
|
|
|
|
|
@ -1815,8 +1815,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
distrilbutionBillPackageService.updateById(billPackageEntity); |
|
|
|
distrilbutionBillPackageService.updateById(billPackageEntity); |
|
|
|
List<Long> packageIds = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()); |
|
|
|
List<Long> packageIds = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()); |
|
|
|
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda() |
|
|
|
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda() |
|
|
|
.in(DistributionParcelListEntity::getId,packageIds) |
|
|
|
.in(DistributionParcelListEntity::getId, packageIds) |
|
|
|
.set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.daiyuyue.getValue()) |
|
|
|
.set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1866,7 +1866,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log.info("####################3订单缺失IsZero字段:{}", stockArticleEntity.getId()); |
|
|
|
log.info("####################3订单缺失IsZero字段:{}", stockArticleEntity.getId()); |
|
|
|
throw new RuntimeException(stockArticleEntity.getOrderCode()+"订单数据异常"); |
|
|
|
throw new RuntimeException(stockArticleEntity.getOrderCode() + "订单数据异常"); |
|
|
|
} |
|
|
|
} |
|
|
|
DistrilbutionBillStockEntity distrilbutionBillStock = new DistrilbutionBillStockVO(); |
|
|
|
DistrilbutionBillStockEntity distrilbutionBillStock = new DistrilbutionBillStockVO(); |
|
|
|
distrilbutionBillStock.setBillLadingId(distrilbutionBillLading.getId()); |
|
|
|
distrilbutionBillStock.setBillLadingId(distrilbutionBillLading.getId()); |
|
|
@ -1899,7 +1899,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
billPackageEntity.setPacketNumber(p.getQuantity()); |
|
|
|
billPackageEntity.setPacketNumber(p.getQuantity()); |
|
|
|
billPackageEntity.setPacketBarCode(p.getOrderPackageCode()); |
|
|
|
billPackageEntity.setPacketBarCode(p.getOrderPackageCode()); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
packageEntityList.add(billPackageEntity); |
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"计划自提,操作方式:新增订单系统默认可用包件,自提批次号:"+pickupBatch; |
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "计划自提,操作方式:新增订单系统默认可用包件,自提批次号:" + pickupBatch; |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); |
|
|
|
aaa.add(js); |
|
|
|
aaa.add(js); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -1911,7 +1911,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
); |
|
|
|
); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log.error("#########################无可用包件orderIds:{}", addOrderIds); |
|
|
|
log.error("#########################无可用包件orderIds:{}", addOrderIds); |
|
|
|
throw new RuntimeException(addOrderIds+"无可用包件"); |
|
|
|
throw new RuntimeException(addOrderIds + "无可用包件"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
List<DistributionReservationZeroPackageEntity> zeroPackageEntities = new ArrayList<>(); |
|
|
|
List<DistributionReservationZeroPackageEntity> zeroPackageEntities = new ArrayList<>(); |
|
|
@ -1923,7 +1923,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
); |
|
|
|
); |
|
|
|
if (Func.isEmpty(parcelNumberEntityList)) { |
|
|
|
if (Func.isEmpty(parcelNumberEntityList)) { |
|
|
|
log.error("#########################无可用包件orderIds:{}", zeroOrderIds); |
|
|
|
log.error("#########################无可用包件orderIds:{}", zeroOrderIds); |
|
|
|
throw new RuntimeException(zeroOrderIds+"无可用包件"); |
|
|
|
throw new RuntimeException(zeroOrderIds + "无可用包件"); |
|
|
|
} |
|
|
|
} |
|
|
|
parcelNumberEntityList.forEach(zp -> { |
|
|
|
parcelNumberEntityList.forEach(zp -> { |
|
|
|
//查询包件
|
|
|
|
//查询包件
|
|
|
@ -2140,16 +2140,22 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
distrilbutionBillLadingDTO.setOrderCodes(orderCodes); |
|
|
|
distrilbutionBillLadingDTO.setOrderCodes(orderCodes); |
|
|
|
//获取当前登录人仓库
|
|
|
|
//获取当前登录人仓库
|
|
|
|
List<BasicdataWarehouseEntity> warehouseList = basicdataWarehouseClient.getMyWarehouseList(); |
|
|
|
List<BasicdataWarehouseEntity> warehouseList = basicdataWarehouseClient.getMyWarehouseList(); |
|
|
|
List<Long> collect = warehouseList.stream() |
|
|
|
|
|
|
|
.map(BasicdataWarehouseEntity::getId) |
|
|
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
distrilbutionBillLadingDTO.setWarehouseIdList(collect); |
|
|
|
|
|
|
|
|
|
|
|
List<Long> collect = null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Func.isNotEmpty(myCurrentWarehouse)) { |
|
|
|
if (Func.isNotEmpty(myCurrentWarehouse)) { |
|
|
|
distrilbutionBillLadingDTO.setWarehouseIdList(null); |
|
|
|
collect = new ArrayList<>(); |
|
|
|
distrilbutionBillLadingDTO.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
collect.add(myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
collect = warehouseList.stream() |
|
|
|
|
|
|
|
.map(BasicdataWarehouseEntity::getId) |
|
|
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
} |
|
|
|
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO,collect); |
|
|
|
List<DistrilbutionBillLadingVO> records = distrilbutionBillLadingVOIPage.getRecords(); |
|
|
|
List<DistrilbutionBillLadingVO> records = distrilbutionBillLadingVOIPage.getRecords(); |
|
|
|
|
|
|
|
|
|
|
|
// 获取所有的提货单ID
|
|
|
|
// 获取所有的提货单ID
|
|
|
@ -2197,7 +2203,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
int count = (int) list1.stream().filter(ii -> "1".equals(ii.getGenre().toString())).count(); |
|
|
|
int count = (int) list1.stream().filter(ii -> "1".equals(ii.getGenre().toString())).count(); |
|
|
|
int count1 = (int) list1.stream().filter(ii -> "2".equals(ii.getGenre().toString())).count(); |
|
|
|
int count1 = (int) list1.stream().filter(ii -> "2".equals(ii.getGenre().toString())).count(); |
|
|
|
int count2 = (int) list1.stream().filter(ii -> "3".equals(ii.getGenre().toString())).count(); |
|
|
|
int count2 = (int) list1.stream().filter(ii -> "3".equals(ii.getGenre().toString())).count(); |
|
|
|
i.setPrintState(count1 >= 1 && count >= 1 && count2 >= 1); |
|
|
|
i.setPrintState(count1 >= 1 && count >= 1 && count2 >= 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -2877,7 +2883,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
distributionBillLadingScan.setBillLadingId(Long.parseLong(billLadingId.toString())); |
|
|
|
distributionBillLadingScan.setBillLadingId(Long.parseLong(billLadingId.toString())); |
|
|
|
distributionBillLadingScan.setScanType(1); |
|
|
|
distributionBillLadingScan.setScanType(1); |
|
|
|
distributionBillLadingScan.setScanUser(AuthUtil.getUser().getNickName()); |
|
|
|
distributionBillLadingScan.setScanUser(AuthUtil.getUser().getNickName()); |
|
|
|
return processScan(type, billLadingId, coding, distributionBillLadingScan,myCurrentWarehouse,billLadingEntity1.getPickupBatch()); |
|
|
|
return processScan(type, billLadingId, coding, distributionBillLadingScan, myCurrentWarehouse, billLadingEntity1.getPickupBatch()); |
|
|
|
|
|
|
|
|
|
|
|
// return Resp.scanSuccess("签收成功", "签收成功");
|
|
|
|
// return Resp.scanSuccess("签收成功", "签收成功");
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -2907,17 +2913,17 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
return !list3.isEmpty(); |
|
|
|
return !list3.isEmpty(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Resp processScan(String type, Object billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan,BasicdataWarehouseEntity warehouse,String pickupBatch) { |
|
|
|
private Resp processScan(String type, Object billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan, BasicdataWarehouseEntity warehouse, String pickupBatch) { |
|
|
|
if ("1".equals(type)) { |
|
|
|
if ("1".equals(type)) { |
|
|
|
// 处理库存品包件逻辑
|
|
|
|
// 处理库存品包件逻辑
|
|
|
|
return handleOrderProduct(type, billLadingId, coding, distributionBillLadingScan,warehouse,pickupBatch); |
|
|
|
return handleOrderProduct(type, billLadingId, coding, distributionBillLadingScan, warehouse, pickupBatch); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 处理库定制包件逻辑
|
|
|
|
// 处理库定制包件逻辑
|
|
|
|
return handleInventoryProduct(type, billLadingId, coding, distributionBillLadingScan); |
|
|
|
return handleInventoryProduct(type, billLadingId, coding, distributionBillLadingScan); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Resp handleOrderProduct(String type, Object billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan,BasicdataWarehouseEntity warehouse,String pickupBatch) { |
|
|
|
private Resp handleOrderProduct(String type, Object billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan, BasicdataWarehouseEntity warehouse, String pickupBatch) { |
|
|
|
List<DistrilbutionBillLadingInventoryAppVO> inventoryAppVO = distributionDeliveryDetailsService.listCode(String.valueOf(billLadingId)); |
|
|
|
List<DistrilbutionBillLadingInventoryAppVO> inventoryAppVO = distributionDeliveryDetailsService.listCode(String.valueOf(billLadingId)); |
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
@ -2926,7 +2932,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<Long> stocklistIds = inventoryAppVO.stream().map(DistrilbutionBillLadingInventoryAppVO::getStockListId).collect(Collectors.toList()); |
|
|
|
List<Long> stocklistIds = inventoryAppVO.stream().map(DistrilbutionBillLadingInventoryAppVO::getStockListId).collect(Collectors.toList()); |
|
|
|
if(stocklistIds.isEmpty()){ |
|
|
|
if (stocklistIds.isEmpty()) { |
|
|
|
return Resp.scanFail("库存品暂未备货,请联系库管人员!", "库存品暂未备货,请联系库管人员"); |
|
|
|
return Resp.scanFail("库存品暂未备货,请联系库管人员!", "库存品暂未备货,请联系库管人员"); |
|
|
|
} |
|
|
|
} |
|
|
|
List<DisStockListDetailEntity> inventoryPackage = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query() |
|
|
|
List<DisStockListDetailEntity> inventoryPackage = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query() |
|
|
@ -2958,7 +2964,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
distributionBillLadingScan.setPacketBarCode(coding); |
|
|
|
distributionBillLadingScan.setPacketBarCode(coding); |
|
|
|
distributionBillLadingScan.setStockListId(matchedPackage.getStockListId()); |
|
|
|
distributionBillLadingScan.setStockListId(matchedPackage.getStockListId()); |
|
|
|
distributionBillLadingScan.setQuantity(1); |
|
|
|
distributionBillLadingScan.setQuantity(1); |
|
|
|
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "自提扫描签收,操作方式:扫描签收,自提批次号:" + pickupBatch ; |
|
|
|
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "自提扫描签收,操作方式:扫描签收,自提批次号:" + pickupBatch; |
|
|
|
JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), coding, content, WorkNodeEnums.SIGN_BILLOFLADING.getCode()); |
|
|
|
JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), coding, content, WorkNodeEnums.SIGN_BILLOFLADING.getCode()); |
|
|
|
aaa.add(js); |
|
|
|
aaa.add(js); |
|
|
|
if (!aaa.isEmpty()) { |
|
|
|
if (!aaa.isEmpty()) { |
|
|
@ -3051,10 +3057,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
.collect(Collectors.toList()); // 收集到新的List<String>
|
|
|
|
.collect(Collectors.toList()); // 收集到新的List<String>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionStockArticleEntity> distributionStockArticleEntityList = distributionStockArticleService.list(Wrappers.<DistributionStockArticleEntity>query().lambda() |
|
|
|
List<DistributionStockArticleEntity> distributionStockArticleEntityList = distributionStockArticleService.list(Wrappers.<DistributionStockArticleEntity>query().lambda() |
|
|
|
.in(DistributionStockArticleEntity::getId, ls) |
|
|
|
.in(DistributionStockArticleEntity::getId, ls) |
|
|
|
.ne(DistributionStockArticleEntity::getIsZero, "1") |
|
|
|
.ne(DistributionStockArticleEntity::getIsZero, "1") |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
List<DistributionParcelListEntity> list1 = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda() |
|
|
|
List<DistributionParcelListEntity> list1 = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda() |
|
|
|
.in(DistributionParcelListEntity::getStockArticleId, ls) |
|
|
|
.in(DistributionParcelListEntity::getStockArticleId, ls) |
|
|
@ -3148,9 +3154,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
return Resp.scanFail("当前订单,包件不存在!!", "当前订单,包件不存在!!"); |
|
|
|
return Resp.scanFail("当前订单,包件不存在!!", "当前订单,包件不存在!!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String,Object> mapState = new HashMap<>(); |
|
|
|
Map<String, Object> mapState = new HashMap<>(); |
|
|
|
mapState.put("coding",coding); |
|
|
|
mapState.put("coding", coding); |
|
|
|
mapState.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
mapState.put("warehouseId", myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.SELF_PICKUP_SCAN_EXCHANGE, RabbitConstant.SELF_PICKUP_SCAN_ROUTING, mapState, message -> { |
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.SELF_PICKUP_SCAN_EXCHANGE, RabbitConstant.SELF_PICKUP_SCAN_ROUTING, mapState, message -> { |
|
|
|
message.getMessageProperties() |
|
|
|
message.getMessageProperties() |
|
|
@ -3315,9 +3321,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
distributionAsyncService.sendFactorySignforInfo(s,myCurrentWarehouse,AuthUtil.getUser()); |
|
|
|
distributionAsyncService.sendFactorySignforInfo(s, myCurrentWarehouse, AuthUtil.getUser()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -4070,22 +4074,22 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse,BladeUser user,String orderPackageCode,String content,Integer node) { |
|
|
|
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) { |
|
|
|
JSONObject trunklinePackageTrackLog = new JSONObject(); |
|
|
|
JSONObject trunklinePackageTrackLog = new JSONObject(); |
|
|
|
trunklinePackageTrackLog.put("tenantId",user.getTenantId()); |
|
|
|
trunklinePackageTrackLog.put("tenantId", user.getTenantId()); |
|
|
|
trunklinePackageTrackLog.put("createTime",new Date()); |
|
|
|
trunklinePackageTrackLog.put("createTime", new Date()); |
|
|
|
trunklinePackageTrackLog.put("createUser",user.getUserId()); |
|
|
|
trunklinePackageTrackLog.put("createUser", user.getUserId()); |
|
|
|
trunklinePackageTrackLog.put("updateUser",user.getUserId()); |
|
|
|
trunklinePackageTrackLog.put("updateUser", user.getUserId()); |
|
|
|
trunklinePackageTrackLog.put("updateTime",new Date()); |
|
|
|
trunklinePackageTrackLog.put("updateTime", new Date()); |
|
|
|
trunklinePackageTrackLog.put("isDeleted",0); |
|
|
|
trunklinePackageTrackLog.put("isDeleted", 0); |
|
|
|
trunklinePackageTrackLog.put("status",1); |
|
|
|
trunklinePackageTrackLog.put("status", 1); |
|
|
|
trunklinePackageTrackLog.put("createDept",warehouse.getDepartment()); |
|
|
|
trunklinePackageTrackLog.put("createDept", warehouse.getDepartment()); |
|
|
|
trunklinePackageTrackLog.put("orderPackageCode",orderPackageCode); |
|
|
|
trunklinePackageTrackLog.put("orderPackageCode", orderPackageCode); |
|
|
|
trunklinePackageTrackLog.put("warehouseId",warehouse.getId()); |
|
|
|
trunklinePackageTrackLog.put("warehouseId", warehouse.getId()); |
|
|
|
trunklinePackageTrackLog.put("warehouseName",warehouse.getName()); |
|
|
|
trunklinePackageTrackLog.put("warehouseName", warehouse.getName()); |
|
|
|
trunklinePackageTrackLog.put("workNode",node); |
|
|
|
trunklinePackageTrackLog.put("workNode", node); |
|
|
|
trunklinePackageTrackLog.put("content",content); |
|
|
|
trunklinePackageTrackLog.put("content", content); |
|
|
|
trunklinePackageTrackLog.put("operator",user.getNickName()); |
|
|
|
trunklinePackageTrackLog.put("operator", user.getNickName()); |
|
|
|
return trunklinePackageTrackLog; |
|
|
|
return trunklinePackageTrackLog; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|