Browse Source

1.订单查询库存品

training
0.0 1 year ago
parent
commit
3c973cbd72
  1. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/queryOrderVO.java
  3. 28
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAreaMapper.xml
  4. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  5. 264
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  8. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseStockVOWrapper.java

11
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java

@ -97,4 +97,15 @@ public class DistributionStockListVO extends DistributionStockListEntity {
private Integer stockupNum; private Integer stockupNum;
/**
* 托盘id
*/
@ApiModelProperty(value = "托盘id")
private String trayCode;
/**
* 货位信息
*/
@ApiModelProperty(value = "货位信息")
private String positionCode;
} }

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/queryOrderVO.java

@ -27,7 +27,7 @@ public class queryOrderVO extends DistributionStockArticleEntity {
* 库存品列表 * 库存品列表
*/ */
@ApiModelProperty(value = "库存品列表") @ApiModelProperty(value = "库存品列表")
private List<DistributionStockListInfoVO> stockList = new ArrayList<>(); private List<DistributionStockListVO> stockList = new ArrayList<>();
/** /**
* 定制品 * 定制品

28
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAreaMapper.xml

@ -278,27 +278,39 @@
</select> </select>
<select id="exportWarehouseByCKStrip" resultType="com.logpm.basicdata.excel.BasicdatavisualizationKCSheetOne"> <select id="exportWarehouseByCKStrip" resultType="com.logpm.basicdata.excel.BasicdatavisualizationKCSheetOne">
SELECT SELECT
ldsl.id,
ldsl.material_id,
ldsl.warehouse_id,
ldsl.market_id,
ldsl.incoming_batch incomingBatch, ldsl.incoming_batch incomingBatch,
GROUP_CONCAT( ldsli.warehousing_time SEPARATOR '、' ) warehousingTime,
GROUP_CONCAT( DISTINCT ldsli.order_code SEPARATOR '、' ) orderCode,
ldsl.market_name marketName, ldsl.market_name marketName,
ldsl.service_type serviceType, ldsl.service_type serviceType,
ldsl.service_number serviceNumber, ldsl.service_number serviceNumber,
ldsl.description_goods descriptionGoods, ldsl.description_goods descriptionGoods,
ldsl.cargo_number cargoNumber, ldsl.cargo_number cargoNumber,
lwtg.tray_code trayCode, lwtg.tray_code trayCode,
sum( lwug.num ) num,
lwug.position_code positionCode, lwug.position_code positionCode,
SUM(lwug.num) num,
GROUP_CONCAT(lwug.create_time SEPARATOR '、') upTime, GROUP_CONCAT(lwug.create_time SEPARATOR '、') upTime,
GROUP_CONCAT( lwug.create_user SEPARATOR '、' ) upUser GROUP_CONCAT(lwug.create_user SEPARATOR '、') upUser,
(SELECT ldsli.order_code FROM logpm_distribution_stock_list_info ldsli WHERE
ldsli.incoming_batch = ldsl.incoming_batch
AND ldsli.material_id = ldsl.material_id
AND ldsli.warehouse_id = ldsl.warehouse_id
AND ldsli.market_id = ldsl.market_id) orderCode,
(SELECT ldsli.warehousing_time FROM logpm_distribution_stock_list_info ldsli WHERE
ldsli.incoming_batch = ldsl.incoming_batch
AND ldsli.material_id = ldsl.material_id
AND ldsli.warehouse_id = ldsl.warehouse_id
AND ldsli.market_id = ldsl.market_id) warehousingTime
FROM FROM
logpm_distribution_stock_list ldsl logpm_distribution_stock_list ldsl
JOIN logpm_warehouse_updown_goods lwug ON ldsl.material_id = lwug.association_id JOIN logpm_warehouse_updown_goods lwug ON ldsl.material_id = lwug.association_id
JOIN logpm_distribution_stock_list_info ldsli ON ldsli.incoming_batch = ldsl.incoming_batch AND lwug.incoming_batch = ldsl.incoming_batch
AND ldsli.material_id = ldsl.material_id AND ldsl.market_id = lwug.market_id
AND ldsli.warehouse_id = ldsl.warehouse_id
AND ldsli.market_id = ldsl.market_id
LEFT JOIN logpm_warehouse_tray_goods lwtg ON lwtg.association_id = ldsl.material_id LEFT JOIN logpm_warehouse_tray_goods lwtg ON lwtg.association_id = ldsl.material_id
AND lwtg.incoming_batch = ldsl.incoming_batch
AND ldsl.market_id = lwtg.market_id
<where> <where>
ldsl.warehouse_id =#{warehouseId} and lwug.association_type ='4' ldsl.warehouse_id =#{warehouseId} and lwug.association_type ='4'
</where> </where>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java

@ -25,6 +25,7 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.excel.DistributionParcelListExcel; import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.logpm.distribution.vo.DistributionParcelListBaseVO; import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import com.logpm.distribution.vo.DistributionParcelListVO; import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.PackageStockupVO; import com.logpm.distribution.vo.PackageStockupVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -114,4 +115,6 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
ArrayList<String> selectorderPackageCodeByLike(@Param("condition") String condition,@Param("collect") List<Long> collect); ArrayList<String> selectorderPackageCodeByLike(@Param("condition") String condition,@Param("collect") List<Long> collect);
ArrayList<String> selectorderCodeByLike(@Param("condition") String condition,@Param("collect") List<Long> collect); ArrayList<String> selectorderCodeByLike(@Param("condition") String condition,@Param("collect") List<Long> collect);
List<DistributionStockListVO> selectStockListByOderId(@Param("id")Long id,@Param("collect") List<Long> collect);
} }

264
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -35,7 +35,8 @@
</resultMap> </resultMap>
<select id="selectDistributionParcelListPage" resultType="com.logpm.distribution.entity.DistributionParcelListEntity"> <select id="selectDistributionParcelListPage"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT SELECT
ldpl.warehouse_id warehouseId, ldpl.warehouse_id warehouseId,
ldpl.id id, ldpl.id id,
@ -125,19 +126,34 @@
</select> </select>
<select id="getStockDataBase" resultType="com.logpm.distribution.vo.DistributionParcelListBaseVO"> <select id="getStockDataBase" resultType="com.logpm.distribution.vo.DistributionParcelListBaseVO">
select ldsa.waybill_number waybillNumber,ldsa.service_number serviceNumber,ldsa.order_code orderCode,ldsa.mall_name mallName,ldsa.warehouse ,ldsa.brand , select ldsa.waybill_number waybillNumber,
ldsa.type_service typeService,ldsa.dealer_name dealerName,ldsa.dealer_code dealerCode,ldsa.train_number trainNumber, ldsa.service_number serviceNumber,
ldsa.factory_train factoryTrain,ldsa.send_warehouse_name sendWarehouseName,ldsa.hand_quantity handQuantity,ldsa.delivery_quantity deliveryQuantity, ldsa.order_code orderCode,
ldsa.signin_quantity signinQuantity,( ldsa.mall_name mallName,
ldsa.warehouse,
ldsa.brand,
ldsa.type_service typeService,
ldsa.dealer_name dealerName,
ldsa.dealer_code dealerCode,
ldsa.train_number trainNumber,
ldsa.factory_train factoryTrain,
ldsa.send_warehouse_name sendWarehouseName,
ldsa.hand_quantity handQuantity,
ldsa.delivery_quantity deliveryQuantity,
ldsa.signin_quantity signinQuantity,
(
select count(*) select count(*)
from logpm_distribution_parcel_list from logpm_distribution_parcel_list
where stock_article_id = #{param.stockArticleId} and order_package_freeze_status = '20' where stock_article_id = #{param.stockArticleId}
and order_package_freeze_status = '20'
) frozenQuantity ) frozenQuantity
from logpm_distribution_stock_article ldsa from logpm_distribution_stock_article ldsa
where ldsa.is_deleted = '0' and ldsa.order_code in ( where ldsa.is_deleted = '0'
and ldsa.order_code in (
select DISTINCT ldpl.order_code select DISTINCT ldpl.order_code
from logpm_distribution_parcel_list ldpl from logpm_distribution_parcel_list ldpl
where ldpl.stock_article_id = #{param.stockArticleId} and ldpl.is_deleted = '0' where ldpl.stock_article_id = #{param.stockArticleId}
and ldpl.is_deleted = '0'
) )
</select> </select>
<select id="getOrderPackageCode" resultType="String"> <select id="getOrderPackageCode" resultType="String">
@ -146,14 +162,22 @@
where stock_article_id = #{id} where stock_article_id = #{id}
</select> </select>
<select id="selectOrderInfoAllocationList" resultType="com.logpm.distribution.vo.PackageStockupVO"> <select id="selectOrderInfoAllocationList" resultType="com.logpm.distribution.vo.PackageStockupVO">
select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions goodsType,ldpl.material_name materialName, select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions
CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,GROUP_CONCAT(lds.allocation_title) positionCode,lds.allocation_id allocationId goodsType,ldpl.material_name materialName,
CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,GROUP_CONCAT(lds.allocation_title)
positionCode,lds.allocation_id allocationId
from logpm_distribution_parcel_list ldpl from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id
<where> <where>
<if test="param.allocationId != null and param.allocationId != ''"> and lds.allocation_id = #{param.allocationId} </if> <if test="param.allocationId != null and param.allocationId != ''">and lds.allocation_id =
<if test="param.allocation != null and param.allocation != ''"> and lds.allocation_title = #{param.allocation} </if> #{param.allocationId}
<if test="param.stockArticleId != null and param.stockArticleId != ''">and ldpl.stock_article_id = #{param.stockArticleId} </if> </if>
<if test="param.allocation != null and param.allocation != ''">and lds.allocation_title =
#{param.allocation}
</if>
<if test="param.stockArticleId != null and param.stockArticleId != ''">and ldpl.stock_article_id =
#{param.stockArticleId}
</if>
<if test="param.stockArticleIdList != null "> <if test="param.stockArticleIdList != null ">
and ldpl.stock_article_id in and ldpl.stock_article_id in
<foreach collection="param.stockArticleIdList" item="a" open="(" separator="," close=")"> <foreach collection="param.stockArticleIdList" item="a" open="(" separator="," close=")">
@ -164,7 +188,8 @@
GROUP BY ldpl.order_code ,ldpl.order_package_code ,ldpl.conditions ,ldpl.material_name,lds.id,ldpl.id GROUP BY ldpl.order_code ,ldpl.order_package_code ,ldpl.conditions ,ldpl.material_name,lds.id,ldpl.id
</select> </select>
<select id="selectOrderInfoSelfList" resultType="com.logpm.distribution.vo.PackageStockupVO"> <select id="selectOrderInfoSelfList" resultType="com.logpm.distribution.vo.PackageStockupVO">
select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions goodsType,ldpl.material_name materialName, select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions
goodsType,ldpl.material_name materialName,
CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,( CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,(
select GROUP_CONCAT( DISTINCT position_code) select GROUP_CONCAT( DISTINCT position_code)
from logpm_warehouse_updown_goods from logpm_warehouse_updown_goods
@ -175,8 +200,12 @@
<where> <where>
ldpl.conditions = '1' ldpl.conditions = '1'
<if test="param.allocationId != null and param.allocationId != ''"> and lds.allocation_id = #{param.allocationId} </if> <if test="param.allocationId != null and param.allocationId != ''">and lds.allocation_id =
<if test="param.stockArticleId != null and param.stockArticleId != ''"> and ldpl.stock_article_id = #{param.stockArticleId} </if> #{param.allocationId}
</if>
<if test="param.stockArticleId != null and param.stockArticleId != ''">and ldpl.stock_article_id =
#{param.stockArticleId}
</if>
<if test="param.stockArticleIdList != null "> <if test="param.stockArticleIdList != null ">
and ldpl.stock_article_id in and ldpl.stock_article_id in
<foreach collection="param.stockArticleIdList" separator="," open="(" close=")" item="a"> <foreach collection="param.stockArticleIdList" separator="," open="(" close=")" item="a">
@ -186,7 +215,8 @@
</where> </where>
</select> </select>
<select id="selectOrderInfoSelfAllocationList" resultType="com.logpm.distribution.vo.PackageStockupVO"> <select id="selectOrderInfoSelfAllocationList" resultType="com.logpm.distribution.vo.PackageStockupVO">
select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions goodsType,ldpl.material_name materialName, select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions
goodsType,ldpl.material_name materialName,
CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,( CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,(
select GROUP_CONCAT( DISTINCT position_code) select GROUP_CONCAT( DISTINCT position_code)
from logpm_warehouse_updown_goods from logpm_warehouse_updown_goods
@ -197,8 +227,12 @@
<where> <where>
<if test="param.allocationId != null and param.allocationId != ''"> and lds.allocation_id = #{param.allocationId} </if> <if test="param.allocationId != null and param.allocationId != ''">and lds.allocation_id =
<if test="param.stockArticleId != null and param.stockArticleId != ''"> and ldpl.stock_article_id = #{param.stockArticleId} </if> #{param.allocationId}
</if>
<if test="param.stockArticleId != null and param.stockArticleId != ''">and ldpl.stock_article_id =
#{param.stockArticleId}
</if>
<if test="param.stockupId != null and param.stockupId != ''">and lds.stockup_id = #{param.stockupId}</if> <if test="param.stockupId != null and param.stockupId != ''">and lds.stockup_id = #{param.stockupId}</if>
<if test="param.stockArticleIdList != null "> <if test="param.stockArticleIdList != null ">
and ldpl.stock_article_id in and ldpl.stock_article_id in
@ -210,7 +244,8 @@
</select> </select>
<select id="getParcelListOwnSelf" resultType="com.logpm.distribution.vo.DistributionParcelListVO"> <select id="getParcelListOwnSelf" resultType="com.logpm.distribution.vo.DistributionParcelListVO">
select ldpl.id id,ldpl.order_package_code orderPackageCode,ldpl.firsts,ldpl.second,ldpl.third_product thirdProduct,ldpl.material_name materialName, select ldpl.id id,ldpl.order_package_code orderPackageCode,ldpl.firsts,ldpl.second,ldpl.third_product
thirdProduct,ldpl.material_name materialName,
( (
select GROUP_CONCAT(DISTINCT position_code) select GROUP_CONCAT(DISTINCT position_code)
from logpm_warehouse_updown_goods from logpm_warehouse_updown_goods
@ -232,7 +267,8 @@
</select> </select>
<select id="exportDistributionParcelList" resultType="com.logpm.distribution.excel.DistributionParcelListExcel"> <select id="exportDistributionParcelList" resultType="com.logpm.distribution.excel.DistributionParcelListExcel">
SELECT * FROM logpm_distribution_parcel_list ${ew.customSqlSegment} SELECT *
FROM logpm_distribution_parcel_list ${ew.customSqlSegment}
</select> </select>
<update id="submitNumByOrderIdAndName"> <update id="submitNumByOrderIdAndName">
@ -258,18 +294,25 @@
and CONCAT(ldpl.cargo_title,'-',ldpl.shelf_title,'-',ldpl.goods_allocation) = #{allocation} and CONCAT(ldpl.cargo_title,'-',ldpl.shelf_title,'-',ldpl.goods_allocation) = #{allocation}
and ldpl.pallet = #{pallet} and ldpl.pallet = #{pallet}
and ldr.is_deleted = 0 --> and ldr.is_deleted = 0 -->
select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode, 1 goodsType,ldrp.parce_list_id parceListId,ldpl.material_name materialName, select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode, 1 goodsType,ldrp.parce_list_id
lwug.allocation_title allocationTitle,lwtg.tray_code trayCode,lwug.position_code positionCode,lwug.allocation_id allocationId,lds.id stockId,lds.stockup_id stockupId, parceListId,ldpl.material_name materialName,
lwug.allocation_title allocationTitle,lwtg.tray_code trayCode,lwug.position_code positionCode,lwug.allocation_id
allocationId,lds.id stockId,lds.stockup_id stockupId,
lds.allocation_title allocationTitles lds.allocation_title allocationTitles
from logpm_distribution_reservation_package ldrp from logpm_distribution_reservation_package ldrp
LEFT JOIN logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id LEFT JOIN logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id =ldrp.parce_list_id and lwtg.association_type = '3' LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id =ldrp.parce_list_id and lwtg.association_type =
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id =ldrp.parce_list_id and lwug.association_type = '3' '3'
LEFT JOIN logpm_distribution_stock lds on ldpl.id = lds.parcel_list_id and lds.reservation_id = ldrp.reservation_id LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id =ldrp.parce_list_id and lwug.association_type
= '3'
LEFT JOIN logpm_distribution_stock lds on ldpl.id = lds.parcel_list_id and lds.reservation_id =
ldrp.reservation_id
<where> <where>
ldrp.reservation_id = #{param.reservationId} and ldrp.packet_bar_status in (1,3) ldrp.reservation_id = #{param.reservationId} and ldrp.packet_bar_status in (1,3)
<if test="param.trayId != null and param.trayId != ''">and lwtg.tray_id = #{param.trayId}</if> <if test="param.trayId != null and param.trayId != ''">and lwtg.tray_id = #{param.trayId}</if>
<if test="param.stockArticleId != null and param.stockArticleId != ''"> and ldrp.stock_article_id = #{param.stockArticleId}</if> <if test="param.stockArticleId != null and param.stockArticleId != ''">and ldrp.stock_article_id =
#{param.stockArticleId}
</if>
<if test="param.stockArticleIdList != null "> <if test="param.stockArticleIdList != null ">
and ldrp.stock_article_id in and ldrp.stock_article_id in
<foreach collection="param.stockArticleIdList" item="a" open="(" separator="," close=")"> <foreach collection="param.stockArticleIdList" item="a" open="(" separator="," close=")">
@ -282,7 +325,8 @@
<select id="selectWarehouseAreaByReservationId" resultType="String"> <select id="selectWarehouseAreaByReservationId" resultType="String">
select CONCAT(ldpl.cargo_title, '-', ldpl.shelf_title, '-', ldpl.goods_allocation) select CONCAT(ldpl.cargo_title, '-', ldpl.shelf_title, '-', ldpl.goods_allocation)
from logpm_distribution_reservation ldr from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldr.id and ldrp.is_deleted = 0 left join logpm_distribution_reservation_package ldrp
on ldrp.reservation_id = ldr.id and ldrp.is_deleted = 0
left join logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id and ldpl.is_deleted = 0 left join logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id and ldpl.is_deleted = 0
where ldr.id = #{reservationId} where ldr.id = #{reservationId}
and ldr.is_deleted = 0 and ldr.is_deleted = 0
@ -294,7 +338,8 @@
<select id="selectPalletByReservationId" resultType="String"> <select id="selectPalletByReservationId" resultType="String">
select ldpl.pallet select ldpl.pallet
from logpm_distribution_reservation ldr from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldr.id and ldrp.is_deleted = 0 left join logpm_distribution_reservation_package ldrp
on ldrp.reservation_id = ldr.id and ldrp.is_deleted = 0
left join logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id and ldpl.is_deleted = 0 left join logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id and ldpl.is_deleted = 0
where ldr.id = #{reservationId} where ldr.id = #{reservationId}
and ldr.is_deleted = 0 and ldr.is_deleted = 0
@ -311,8 +356,10 @@
<where> <where>
lds.id =#{id} lds.id =#{id}
</where>--> </where>-->
select DISTINCT ldsi.stockup_id , ldpl.id id,ldpl.order_package_code orderPackageCode,lds.type stockupStatus,ldpl.firsts,ldpl.second,ldpl.third_product thirdProduct, select DISTINCT ldsi.stockup_id , ldpl.id id,ldpl.order_package_code orderPackageCode,lds.type
ldpl.material_name materialName,lds.create_time stockupDate,lds.stockup_area stockupArea,ldpl.goods_allocation goodsAllocation,lwtg.tray_code pallet stockupStatus,ldpl.firsts,ldpl.second,ldpl.third_product thirdProduct,
ldpl.material_name materialName,lds.create_time stockupDate,lds.stockup_area stockupArea,ldpl.goods_allocation
goodsAllocation,lwtg.tray_code pallet
from logpm_distribution_stockup_info ldsi from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id
@ -381,7 +428,8 @@
and warehouse_id = #{warehouseId} and warehouse_id = #{warehouseId}
</update> </update>
<select id="findALLNoUpShelfPackageByOrderCode" resultType="com.logpm.distribution.entity.DistributionParcelListEntity"> <select id="findALLNoUpShelfPackageByOrderCode"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
select ldpl.* select ldpl.*
from logpm_distribution_parcel_list ldpl from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_tray_goods lwtg on lwtg.association_value = ldpl.order_package_code left join logpm_warehouse_tray_goods lwtg on lwtg.association_value = ldpl.order_package_code
@ -411,49 +459,94 @@
ldpl.order_package_reservation_status, ldpl.order_package_loading_status, ldpl.order_package_reservation_status, ldpl.order_package_loading_status,
ldpl.waybill_number, ldpl.waybill_id, ldpl.warehouse_entry_time_end, ldpl.waybill_number, ldpl.waybill_id, ldpl.warehouse_entry_time_end,
ldpl.dealer_name, ldpl.dealer_code, ldpl.send_warehouse_id, ldpl.dealer_name, ldpl.dealer_code, ldpl.send_warehouse_id,
ldpl.send_warehouse_name, ldpl.accept_warehouse_id, ldpl.accept_warehouse_name, ldpl.order_package_delivery_status , ldpl.send_warehouse_name, ldpl.accept_warehouse_id, ldpl.accept_warehouse_name,
ldpl.order_package_delivery_status ,
GROUP_CONCAT(DISTINCT lwtg.tray_code) pallet, GROUP_CONCAT(DISTINCT lwtg.tray_code) pallet,
GROUP_CONCAT(DISTINCT lwug.position_code) goodsAllocation GROUP_CONCAT(DISTINCT lwug.position_code) goodsAllocation
From logpm_distribution_parcel_list ldpl From logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.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 logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
<where> <where>
<if test="param.serviceNumber != null and param.serviceNumber != ''" >and ldpl.service_number like concat('%',#{param.serviceNumber},'%') </if> <if test="param.serviceNumber != null and param.serviceNumber != ''">and ldpl.service_number like
<if test="param.waybillNumber != null and param.waybillNumber != ''" >and ldpl.waybill_number like concat('%',#{param.waybillNumber},'%') </if> concat('%',#{param.serviceNumber},'%')
<if test="param.orderCode != null and param.orderCode != ''" >and ldpl.order_code like concat('%',#{param.orderCode},'%') </if> </if>
<if test="param.warehouse != null and param.warehouse != ''" >and ldpl.warehouse like concat('%',#{param.warehouse},'%') </if> <if test="param.waybillNumber != null and param.waybillNumber != ''">and ldpl.waybill_number like
<if test="param.orderPackageReservationStatus != null and param.orderPackageReservationStatus != ''" >and ldpl.order_package_reservation_status = #{param.orderPackageReservationStatus}</if> concat('%',#{param.waybillNumber},'%')
<if test="param.orderPackageFreezeStatus != null and param.orderPackageFreezeStatus != ''" >and ldpl.order_package_freeze_status = #{param.orderPackageFreezeStatus}</if> </if>
<if test="param.orderPackageStatus != null and param.orderPackageStatus != ''" >and ldpl.order_package_status = #{param.orderPackageStatus}</if> <if test="param.orderCode != null and param.orderCode != ''">and ldpl.order_code like
<if test="param.orderPackageGroundingStatus != null and param.orderPackageGroundingStatus != ''" >and ldpl.order_package_grounding_status = #{param.orderPackageGroundingStatus}</if> concat('%',#{param.orderCode},'%')
<if test="param.orderPackageStockupStatus != null and param.orderPackageStockupStatus != ''" >and ldpl.order_package_stockup_status = #{param.orderPackageStockupStatus}</if> </if>
<if test="param.orderPackageReservationStatus != null and param.orderPackageReservationStatus != ''" >and ldpl.order_package_reservation_status = #{param.orderPackageReservationStatus}</if> <if test="param.warehouse != null and param.warehouse != ''">and ldpl.warehouse like
<if test="param.orderPackageCode != null and param.orderPackageCode != ''" >and ldpl.order_package_code like concat('%',#{param.orderPackageCode},'%') </if> concat('%',#{param.warehouse},'%')
<if test="param.pallet != null and param.pallet != ''" >and lwtg.tray_code like concat('%',#{param.pallet},'%') </if> </if>
<if test="param.goodsAllocation != null and param.goodsAllocation != ''" >and lwug.position_code like concat('%',#{param.goodsAllocation},'%') </if> <if test="param.orderPackageReservationStatus != null and param.orderPackageReservationStatus != ''">and
<if test="param.firsts != null and param.firsts != ''" >and ldpl.firsts like concat('%',#{param.firsts},'%') </if> ldpl.order_package_reservation_status = #{param.orderPackageReservationStatus}
<if test="param.second != null and param.second != ''" >and ldpl.second like concat('%',#{param.second},'%') </if> </if>
<if test="param.thirdProduct != null and param.thirdProduct != ''" >and ldpl.third_product like concat('%',#{param.thirdProduct},'%') </if> <if test="param.orderPackageFreezeStatus != null and param.orderPackageFreezeStatus != ''">and
<if test="param.materialName != null and param.materialName != ''" >and ldpl.material_name like concat('%',#{param.materialName},'%') </if> ldpl.order_package_freeze_status = #{param.orderPackageFreezeStatus}
<if test="param.warehouseEntryTimeEnd != null" >and DATE(ldpl.warehouse_entry_time_end) = #{param.warehouseEntryTimeEnd}</if> </if>
<if test="param.trainNumber != null and param.trainNumber != ''" >and ldpl.train_number = #{param.trainNumber}</if> <if test="param.orderPackageStatus != null and param.orderPackageStatus != ''">and ldpl.order_package_status
<if test="param.sendWarehouseName != null and param.sendWarehouseName != ''" >and ldpl.send_warehouse_name like concat('%',#{param.sendWarehouseName},'%') </if> = #{param.orderPackageStatus}
</if>
<if test="param.orderPackageGroundingStatus != null and param.orderPackageGroundingStatus != ''">and
ldpl.order_package_grounding_status = #{param.orderPackageGroundingStatus}
</if>
<if test="param.orderPackageStockupStatus != null and param.orderPackageStockupStatus != ''">and
ldpl.order_package_stockup_status = #{param.orderPackageStockupStatus}
</if>
<if test="param.orderPackageReservationStatus != null and param.orderPackageReservationStatus != ''">and
ldpl.order_package_reservation_status = #{param.orderPackageReservationStatus}
</if>
<if test="param.orderPackageCode != null and param.orderPackageCode != ''">and ldpl.order_package_code like
concat('%',#{param.orderPackageCode},'%')
</if>
<if test="param.pallet != null and param.pallet != ''">and lwtg.tray_code like
concat('%',#{param.pallet},'%')
</if>
<if test="param.goodsAllocation != null and param.goodsAllocation != ''">and lwug.position_code like
concat('%',#{param.goodsAllocation},'%')
</if>
<if test="param.firsts != null and param.firsts != ''">and ldpl.firsts like
concat('%',#{param.firsts},'%')
</if>
<if test="param.second != null and param.second != ''">and ldpl.second like
concat('%',#{param.second},'%')
</if>
<if test="param.thirdProduct != null and param.thirdProduct != ''">and ldpl.third_product like
concat('%',#{param.thirdProduct},'%')
</if>
<if test="param.materialName != null and param.materialName != ''">and ldpl.material_name like
concat('%',#{param.materialName},'%')
</if>
<if test="param.warehouseEntryTimeEnd != null">and DATE(ldpl.warehouse_entry_time_end) =
#{param.warehouseEntryTimeEnd}
</if>
<if test="param.trainNumber != null and param.trainNumber != ''">and ldpl.train_number =
#{param.trainNumber}
</if>
<if test="param.sendWarehouseName != null and param.sendWarehouseName != ''">and ldpl.send_warehouse_name
like concat('%',#{param.sendWarehouseName},'%')
</if>
<if test="param.stockArticleIdsList != null ">and ldpl.stock_article_id in <if test="param.stockArticleIdsList != null ">and ldpl.stock_article_id in
<foreach collection="param.stockArticleIdsList" separator="," close=")" item="a" open="("> <foreach collection="param.stockArticleIdsList" separator="," close=")" item="a" open="(">
#{a} #{a}
</foreach> </foreach>
</if> </if>
<if test="param.stockArticleIdsLike != null and param.stockArticleIdsLike != ''" >and ldpl.stock_article_id = #{param.stockArticleIdsLike} </if> <if test="param.stockArticleIdsLike != null and param.stockArticleIdsLike != ''">and ldpl.stock_article_id =
<if test="param.stockArticleId != null and param.stockArticleId != ''" >and ldpl.stock_article_id = #{param.stockArticleId} </if> #{param.stockArticleIdsLike}
<if test="param.conditions != null and param.conditions != ''" >and ldpl.conditions = #{param.conditions} </if> </if>
<if test="param.stockArticleId != null and param.stockArticleId != ''">and ldpl.stock_article_id =
#{param.stockArticleId}
</if>
<if test="param.conditions != null and param.conditions != ''">and ldpl.conditions = #{param.conditions}
</if>
</where> </where>
GROUP BY ldpl.id GROUP BY ldpl.id
</select> </select>
<select id="getPackageList" resultType="com.logpm.distribution.entity.DistributionParcelListEntity"> <select id="getPackageList" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT SELECT ldpl.id,
ldpl.id,
ldpl.tenant_id, ldpl.tenant_id,
ldpl.create_user, ldpl.create_user,
ldpl.create_time, ldpl.create_time,
@ -508,12 +601,14 @@
ldpl.accept_warehouse_id, ldpl.accept_warehouse_id,
ldpl.accept_warehouse_name, ldpl.accept_warehouse_name,
ldpl.order_package_delivery_status ldpl.order_package_delivery_status
FROM FROM logpm_distribution_parcel_list AS ldpl
logpm_distribution_parcel_list AS ldpl LEFT JOIN logpm_warehouse_tray_goods AS lwtg
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldpl.id = lwtg.association_id AND lwtg.association_type = 3 ON ldpl.id = lwtg.association_id AND lwtg.association_type = 3
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldpl.id = lwtg.association_id AND lwtg.association_type = 3 LEFT JOIN logpm_warehouse_updown_goods AS lwug
WHERE ON ldpl.id = lwtg.association_id AND lwtg.association_type = 3
ldpl.stock_article_id = #{stockArticleId} and ldpl.order_package_reservation_status in ('10','20') and ldpl.order_package_reservation_status = '10' WHERE ldpl.stock_article_id = #{stockArticleId}
and ldpl.order_package_reservation_status in ('10', '20')
and ldpl.order_package_reservation_status = '10'
</select> </select>
<select id="selectListByOderId" resultType="com.logpm.distribution.entity.DistributionParcelListEntity"> <select id="selectListByOderId" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
@ -570,5 +665,46 @@
</if> </if>
</where> </where>
</select> </select>
<select id="selectStockListByOderId" resultType="com.logpm.distribution.vo.DistributionStockListVO">
SELECT
ldsl.id id,
ldsl.incoming_batch incomingBatch,
ldsl.market_name marketName,
ldsl.service_type serviceType,
ldsl.service_number serviceNumber,
ldsl.description_goods descriptionGoods,
ldsl.cargo_number cargoNumber,
ldsl.quantity_stock quantityStock ,
lwtg.tray_code trayCode,
lwug.position_code positionCode
FROM
logpm_distribution_stock_list ldsl
JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = ldsl.parcel_list_id
left JOIN logpm_warehouse_updown_goods lwug ON ldsl.material_id = lwug.association_id
AND lwug.incoming_batch = ldsl.incoming_batch
AND ldsl.market_id = lwug.market_id
LEFT JOIN logpm_warehouse_tray_goods lwtg ON lwtg.association_id = ldsl.material_id
AND lwtg.incoming_batch = ldsl.incoming_batch
AND ldsl.market_id = lwtg.market_id
<where>
ldpl.stock_article_id = #{id} and ldpl.conditions =2
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and ldpl.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
GROUP BY
ldsl.id,
ldsl.incoming_batch,
ldsl.market_name,
ldsl.service_type,
ldsl.service_number,
ldsl.description_goods,
ldsl.cargo_number,
lwtg.tray_code,
lwug.position_code;
</select>
</mapper> </mapper>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -2912,7 +2912,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionReservationPackageEntity> distributionReservationPackageEntities = distributionReservationPackageMapper.selectList(new QueryWrapper<DistributionReservationPackageEntity>().lambda() List<DistributionReservationPackageEntity> distributionReservationPackageEntities = distributionReservationPackageMapper.selectList(new QueryWrapper<DistributionReservationPackageEntity>().lambda()
.eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId()) .eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId())
.eq(DistributionReservationPackageEntity::getStockArticleId, s.getId()) .eq(DistributionReservationPackageEntity::getStockArticleId, s.getId())
.ne(DistributionReservationPackageEntity::getPacketBarCode, "2") .ne(DistributionReservationPackageEntity::getPacketBarStatus, "2")
); );
// //
List<DistributionReservationPackageEntity> byReservationIdAndStockArticleId = distributionReservationPackageMapper.getByReservationIdAndStockArticleId(reservationEntity.getId(), s.getId()); List<DistributionReservationPackageEntity> byReservationIdAndStockArticleId = distributionReservationPackageMapper.getByReservationIdAndStockArticleId(reservationEntity.getId(), s.getId());

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

@ -982,10 +982,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
//查询订单下的所有包条 //查询订单下的所有包条
List<DistributionParcelListEntity> distributionParcelListEntitys = distributionParcelListMapper.selectListByOderId(id,collect); List<DistributionParcelListEntity> distributionParcelListEntitys = distributionParcelListMapper.selectListByOderId(id,collect);
//查询订单下的所有库存品 //查询订单下的所有库存品
//List<DistributionStockListVO> distributionStockListVOS = distributionParcelListMapper.selectStockListByOderId(id,collect); List<DistributionStockListVO> distributionStockListVOS = distributionParcelListMapper.selectStockListByOderId(id,collect);
queryOrderVO.setWrapNum(distributionParcelListEntitys.size()); queryOrderVO.setWrapNum(distributionParcelListEntitys.size());
queryOrderVO.setInventoryNum(0); queryOrderVO.setInventoryNum(distributionStockListVOS.size());
queryOrderVO.setList(distributionParcelListEntitys); queryOrderVO.setList(distributionParcelListEntitys);
queryOrderVO.setStockList(distributionStockListVOS);
return queryOrderVO; return queryOrderVO;
} }

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseStockVOWrapper.java

@ -43,7 +43,10 @@ public class WarehouseStockVOWrapper extends BaseEntityWrapper<WarehouseScanReco
@Override @Override
public WarehouseScanRecordVO entityVO(WarehouseScanRecordVO WarehouseStock) { public WarehouseScanRecordVO entityVO(WarehouseScanRecordVO WarehouseStock) {
if (null != WarehouseStock.getOperatorId() && 0 !=WarehouseStock.getOperatorId()){ if (null != WarehouseStock.getOperatorId() && 0 !=WarehouseStock.getOperatorId()){
WarehouseStock.setOperatorName(userCliient.userInfoById(WarehouseStock.getOperatorId()).getData().getName()); String name = userCliient.userInfoById(WarehouseStock.getOperatorId()).getData().getName();
if (null != name) {
WarehouseStock.setOperatorName(name);
}
} }
WarehouseStock.setOrderPackageStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STATUS, WarehouseStock.getOrderPackageStatus())); WarehouseStock.setOrderPackageStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STATUS, WarehouseStock.getOrderPackageStatus()));
WarehouseStock.setOrderPackageFreezeStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_FREEZE_STATUS, WarehouseStock.getOrderPackageFreezeStatus())); WarehouseStock.setOrderPackageFreezeStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_FREEZE_STATUS, WarehouseStock.getOrderPackageFreezeStatus()));

Loading…
Cancel
Save