Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 7 months ago
parent
commit
18e21934cf
  1. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  2. 78
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  3. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  4. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  5. 11
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/PackageTrackLogAsyncServiceImpl.java

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java

@ -57,7 +57,7 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @param distributionStockupEntity
* @return
*/
IPage<DistributionStockupEntity> pageList(IPage<Object> page,@Param("param") DistributionStockupEntity distributionStockupEntity);
IPage<DistributionStockupEntity> pageList(IPage<Object> page,@Param("param") DistributionStockupEntity distributionStockupEntity,@Param("warehouseIdList") List<Long> warehouseIdList);
IPage<DistributionStockupListVO> selectStockupPage(IPage<Object> page, @Param("param") StockupDTO stockupDTO);
@ -168,7 +168,7 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @param distributionStockupEntity
* @return
*/
IPage<DistributionStockupEntity> pageOweList(IPage<Object> page,@Param("param")DistributionStockupEntity distributionStockupEntity);
IPage<DistributionStockupEntity> pageOweList(IPage<Object> page,@Param("param")DistributionStockupEntity distributionStockupEntity ,@Param("warehouseIdList") List<Long> warehouseIdList);
IPage<DistributionStockupVO> getInventoryOwnSelf(IPage<Object> page,@Param("id") Long id);

78
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -248,41 +248,18 @@
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time
fixTime,lds.assign_time assignTime,
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') stockipAllocation,
COALESCE(GROUP_CONCAT(DISTINCT lwt.pallet_name SEPARATOR ','), '') pallet,
COALESCE(GROUP_CONCAT(DISTINCT ldpl.goods_allocation SEPARATOR ','), '') stockipAllocation,
COALESCE(GROUP_CONCAT(DISTINCT ldpl.pallet SEPARATOR ','), '') pallet,
COALESCE ( group_concat( DISTINCT ldr.consignee SEPARATOR ',' ), '' ) AS consignee
from logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id =lds.id
LEFT JOIN logpm_distribution_reservation ldr ON ldsi.reservation_id = ldr.id
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrp.parce_list_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldrp.parce_list_id
LEFT JOIN logpm_warehouse_tray lwt on lwtg.tray_id = lwt.id
LEFT JOIN (
SELECT
IFNULL(COUNT( b.reservation_id ),0 )AS aaa,
b.stockup_id AS stockup_id
FROM
logpm_distribution_stockup AS a
LEFT JOIN logpm_distribution_stockup_info AS b ON a.id = b.stockup_id
<where>
b.stock_status != 4
<if test="param.warehouseId != null and param.warehouseId != '' ">and a.warehouse_id =
#{param.warehouseId}
</if>
<if test="param.warehouseIdList != null">
and a.warehouse_id in
<foreach collection="param.warehouseIdList" item="a" open="(" separator="," close=")">
#{a}
</foreach>
</if>
</where>
GROUP BY b.stockup_id
) AS aa ON aa.stockup_id = lds.id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id
<where>
lds.is_deleted = 0 AND ldsi.stock_status != 4
<!-- AND aa.aaa > 0-->
<!-- lds.tenant_id = #{param.tenantId} -->
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service = #{param.typeService}
</if>
<if test="param.consignee != null and param.consignee != '' "> and
@ -295,9 +272,13 @@
<if test="param.stockupUser != null and param.stockupUser != '' ">and lds.stockup_user like
concat('%',#{param.stockupUser},'%')
</if>
<if test="param.stockipAllocation != null and param.stockipAllocation != '' ">and lds.stockip_allocation
<if test="param.stockipAllocation != null and param.stockipAllocation != '' ">and ldpl.goods_allocation
like concat('%',#{param.stockipAllocation},'%')
</if>
<if test="param.pallet != null and param.pallet != '' ">and ldpl.pallet
like concat('%',#{param.pallet},'%')
</if>
<if test="param.stockupCode != null and param.stockupCode != '' ">and lds.stockup_code like
concat('%',#{param.stockupCode},'%')
</if>
@ -316,14 +297,14 @@
<if test="param.loaderName != null and param.loaderName != '' ">and lds.loader_name like concat('%',
#{param.loaderName},'%')
</if>
<!-- <if test="param.groupName != null and param.groupName != '' "> and btg.group_name like concat('%', #{param.groupName},'%')</if>-->
<!--<if test="param.typeService != null and param.typeService != '' "> and lds.type_service = #{param.typeService}</if>-->
<if test="param.warehouseId != null and param.warehouseId != '' ">and lds.warehouse_id =
#{param.warehouseId}
</if>
<if test="param.warehouseIdList != null">
<if test="warehouseIdList != null">
and lds.warehouse_id in
<foreach collection="param.warehouseIdList" item="a" open="(" separator="," close=")">
<foreach collection="warehouseIdList" item="a" open="(" separator="," close=")">
#{a}
</foreach>
and ldpl.warehouse_id in
<foreach collection="warehouseIdList" item="a" open="(" separator="," close=")">
#{a}
</foreach>
</if>
@ -368,16 +349,15 @@
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time
fixTime,lds.assign_time assignTime,
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '')stockipAllocation,
COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet,
COALESCE(GROUP_CONCAT(DISTINCT ldpl.goods_allocation SEPARATOR ','), '')stockipAllocation,
COALESCE(GROUP_CONCAT(DISTINCT ldpl.pallet SEPARATOR ','), '') pallet,
COALESCE(group_concat(DISTINCT ldsa.mall_name separator ','), '') as consignee
from logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id = lds.id
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldbs.bill_lading_id = ldsi.reservation_id
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldbs.stock_article_id and ldbs.order_status in (1,2)
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
LEFT JOIN (
SELECT
IFNULL(COUNT( b.reservation_id ),0 )AS aaa,
@ -404,9 +384,13 @@
<if test="param.stockupUser != null and param.stockupUser != '' ">and lds.stockup_user like
concat('%',#{param.stockupUser},'%')
</if>
<if test="param.stockipAllocation != null and param.stockipAllocation != '' ">and lds.stockip_allocation
<if test="param.stockipAllocation != null and param.stockipAllocation != '' ">and ldpl.goods_allocation
like concat('%',#{param.stockipAllocation},'%')
</if>
<if test="param.pallet != null and param.pallet != '' ">and ldpl.pallet
like concat('%',#{param.pallet},'%')
</if>
<if test="param.stockupCode != null and param.stockupCode != '' ">and lds.stockup_code like
concat('%',#{param.stockupCode},'%')
</if>
@ -425,19 +409,13 @@
<if test="param.loaderName != null and param.loaderName != '' ">and lds.loader_name like concat('%',
#{param.loaderName},'%')
</if>
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service =
#{param.typeService}
</if>
<if test="param.warehouseId != null and param.warehouseId != '' ">and lds.warehouse_id =
#{param.warehouseId}
</if>
<if test="param.warehouseIdList != null">
<if test="warehouseIdList != null">
and lds.warehouse_id in
<foreach collection="param.warehouseIdList" item="a" open="(" separator="," close=")">
<foreach collection="warehouseIdList" item="a" open="(" separator="," close=")">
#{a}
</foreach>
</if>
<!--<if test="param.groupName != null and param.groupName != '' "> and btg.group_name like concat('%', #{param.groupName},'%')</if> -->
</where>
GROUP BY lds.id
ORDER By lds.create_time Desc

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -291,24 +291,25 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
public IPage<DistributionStockupEntity> pageList(IPage<Object> page, Map<String, Object> distributionStockup) {
DistributionStockupEntity distributionStockupEntity = JSON.parseObject(JSON.toJSONString(distributionStockup), DistributionStockupEntity.class);
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
List<Long> warehouseIdList = new ArrayList<>();
if (ObjectUtils.isNotNull(myCurrentWarehouse)) {
//获取当前登录人仓库
distributionStockupEntity.setWarehouseId(myCurrentWarehouse.getId());
warehouseIdList.add(myCurrentWarehouse.getId());
} else {
//获取当前登录人仓库
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse();
//取出id
List<Long> collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
distributionStockupEntity.setWarehouseIdList(collect);
warehouseIdList.addAll(collect);
}
distributionStockupEntity.setTenantId(AuthUtil.getTenantId());
if ("3".equals(distributionStockupEntity.getTypeService())) {
//自
return baseMapper.pageOweList(page, distributionStockupEntity);
return baseMapper.pageOweList(page, distributionStockupEntity,warehouseIdList);
} else {
//商 市
return baseMapper.pageList(page, distributionStockupEntity);
return baseMapper.pageList(page, distributionStockupEntity,warehouseIdList);
}
}

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

@ -3093,12 +3093,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
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()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
distributionBillLadingScanService.save(distributionBillLadingScan);
distributionBillLadingScanService.save(distributionBillLadingScan);
distributionStockListMapper.deductionQuantityStock(matchedPackage.getStockListId(), matchedPackage.getNum());
Map<Long, List<DistrilbutionBillLadingInventoryAppVO>> stockListMap = inventoryAppVO.stream().collect(Collectors.groupingBy(DistrilbutionBillLadingInventoryAppVO::getStockListId));

11
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/PackageTrackLogAsyncServiceImpl.java

@ -61,11 +61,12 @@ public class PackageTrackLogAsyncServiceImpl implements IPackageTrackLogAsyncSer
@LogpmAsync("asyncExecutor")
@Override
public void addBatchPackageTrackLog(List<WarehousePackageTrackLogEntity> addPackageTrackLogList, List<String> orderPackageCodes, Integer workNode, Map<String, JSONObject> map) {
warehousePackageTrackLogClient.addLogList(addPackageTrackLogList);
WarehousePackageTrackLogEntity warehousePackageTrackLogEntity = addPackageTrackLogList.get(0);
Long warehouseId = warehousePackageTrackLogEntity.getWarehouseId();
waybillPackageService.updatePackageStatus(orderPackageCodes, workNode,warehouseId, map);
if(CollUtil.isNotEmpty(addPackageTrackLogList)){
warehousePackageTrackLogClient.addLogList(addPackageTrackLogList);
WarehousePackageTrackLogEntity warehousePackageTrackLogEntity = addPackageTrackLogList.get(0);
Long warehouseId = warehousePackageTrackLogEntity.getWarehouseId();
waybillPackageService.updatePackageStatus(orderPackageCodes, workNode,warehouseId, map);
}
}
@LogpmAsync("asyncExecutor")

Loading…
Cancel
Save