Browse Source

1.增加查询条件

dist.1.3.0
pref_mail@163.com 10 months ago
parent
commit
5fc61bf372
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  2. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  4. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  5. 44
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  6. 122
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java

@ -190,7 +190,7 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
* @param stockArticleEntity
* @return
*/
IPage<DistributionSignforStockArticleVO> pageSignforListOwe(IPage<DistributionSignforStockArticleVO> page,@Param("param") DistributionStockArticleOweDTO stockArticleEntity);
IPage<DistributionSignforStockArticleVO> pageSignforListOwe(IPage<DistributionSignforStockArticleVO> page,@Param("param") DistributionStockArticleOweDTO stockArticleEntity,@Param("collect") List<Long> warehouseIdList);
void updateAllOrderTotalNum(@Param("orderCode") String orderCode, @Param("total") Integer total);

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -1245,6 +1245,17 @@
<where>
ldl.signfor_state = 2
and ldsa.order_status in ('70','80')
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and ldsa.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and ldl.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">
AND ldsa.waybill_number like concat(#{param.waybillNumber},"%")
</if>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java

@ -65,7 +65,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
*/
List<DistrilbutionBillLadingExcel> exportDistrilbutionBillLading(@Param("ew") Wrapper<DistrilbutionBillLadingEntity> queryWrapper);
IPage<DistrilbutionBillLadingVO> pageList(IPage<Object> page, @Param("param") DistrilbutionBillLadingDTO distrilbutionBillLadingDTO);
IPage<DistrilbutionBillLadingVO> pageList(IPage<Object> page, @Param("param") DistrilbutionBillLadingDTO distrilbutionBillLadingDTO,@Param("collect") List<Long> collect);
IPage<DistrilbutionBillLadingAppVO> pageListApp(IPage<Object> page, @Param("param") BillLadingAppDTO billLadingAppDTO);

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -71,6 +71,16 @@
LEFT JOIN logpm_distrilbution_bill_package dbp2 ON dbp2.bill_lading_id = dbl2.id
AND dbp2.packet_bar_status IN ( 1, 3 )
LEFT JOIN logpm_distribution_parcel_list ldpl2 ON dbp2.parce_list_id = ldpl2.id
<where>
1=1
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and dbl2.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
GROUP BY
dbl2.pickup_batch,
ldpl2.SECOND
@ -120,6 +130,12 @@
LEFT JOIN logpm_distribution_stock_article dsa ON lds.stock_article_id = dsa.id
WHERE
lds.order_status != 2
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and aaa.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY
aaa.id
) AS k
@ -141,6 +157,12 @@
LEFT JOIN logpm_basicdata_client lbc ON ldsl.market_id = lbc.id
WHERE
lddd.inventory_status != 2
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and bbb.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY
bbb.id
) AS m ON m.id = k.id
@ -150,9 +172,9 @@
<if test="param.pickupBatch != null and param.pickupBatch != ''">and dbl.pickup_batch like
concat('%',#{param.pickupBatch},'%')
</if>
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and dbl.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>

44
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -2542,18 +2542,15 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
List<BasicdataWarehouseEntity> myWarehouseList = warehouseClient.getMyWarehouseList();
BasicdataWarehouseEntity currentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
List<Long> collect = null;
if (collect.size() > 1) {
stockArticleEntity.setWarehouseIdList(collect);
} else if (collect.size() == 1) {
stockArticleEntity.setWarehouseId(collect.get(0));
}
if (Func.isNotEmpty(currentWarehouse)) {
stockArticleEntity.setWarehouseIdList(null);
stockArticleEntity.setWarehouseId(currentWarehouse.getId());
if(ObjectUtils.isNotNull(myWarehouseList)){
collect = new ArrayList<>();
collect.add(currentWarehouse.getId());
}else{
collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
}
IPage<DistributionSignforStockArticleVO> distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity);
IPage<DistributionSignforStockArticleVO> distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity,collect);
//处理创建人
distributionStockArticleEntityIPage.getRecords().forEach(a -> {
if (Func.isNotEmpty(a.getCreateUser())) {
@ -2617,18 +2614,25 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
}
List<BasicdataWarehouseEntity> myWarehouseList = warehouseClient.getMyWarehouseList();
BasicdataWarehouseEntity currentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
List<Long> warehouseIdList = null;
if (collect.size() > 1) {
stockArticleEntity.setWarehouseIdList(collect);
} else if (collect.size() == 1) {
stockArticleEntity.setWarehouseId(collect.get(0));
}
if (Func.isNotEmpty(currentWarehouse)) {
stockArticleEntity.setWarehouseIdList(null);
stockArticleEntity.setWarehouseId(currentWarehouse.getId());
if (ObjectUtils.isNotNull(currentWarehouse)){
warehouseIdList = new ArrayList<>();
warehouseIdList.add(currentWarehouse.getId());
}else{
warehouseIdList=myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
}
IPage<DistributionSignforStockArticleVO> distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity);
// if (collect.size() > 1) {
// stockArticleEntity.setWarehouseIdList(collect);
// } else if (collect.size() == 1) {
// stockArticleEntity.setWarehouseId(collect.get(0));
// }
// if (Func.isNotEmpty(currentWarehouse)) {
// stockArticleEntity.setWarehouseIdList(null);
// stockArticleEntity.setWarehouseId(currentWarehouse.getId());
// }
IPage<DistributionSignforStockArticleVO> distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity,warehouseIdList);
//处理创建人
List<DistributionSignForStockArticleExcel> signForStockArticleExcels = new ArrayList<>();
distributionStockArticleEntityIPage.getRecords().forEach(a -> {

122
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

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

Loading…
Cancel
Save