Browse Source

1.修复PDA备货异常

master
pref_mail@163.com 6 months ago
parent
commit
0da3b6f14e
  1. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  2. 78
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  3. 3
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -11,6 +11,8 @@ import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.CodeDesEnum;
import org.springblade.common.constant.CodeNumConstant;
import org.springblade.common.constant.basiccode.BasicCodeShowConstant;
import org.springblade.common.constant.basiccode.BasicCodeTypeConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.utils.AuthUtil;
@ -406,7 +408,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
}
private String generateTraysCode(Integer type, String warehouseCode) {
BasicTenantCodeEntity basicTenantCode = tenantCodeClient.findBasicTenantCodeByCodeAndShowType("1", 6);
BasicTenantCodeEntity basicTenantCode = tenantCodeClient.findBasicTenantCodeByCodeAndShowType(BasicCodeTypeConstant.TRAY_CODE.getValue(), BasicCodeShowConstant.QR_CODE.getValue());
if(Objects.isNull(basicTenantCode)){
log.warn("############generateTraysCode: 租户信息不存在basicTenantCode={}",basicTenantCode);
return null;

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

@ -305,48 +305,12 @@
</select>
<select id="selectStockupStockListNew" resultType="com.logpm.distribution.vo.DistributionStockupStockListVO">
<!-- SELECT DISTINCT-->
<!-- ldslNew.sku AS sku,-->
<!-- ldslNew.cargo_number AS cargoNumber,-->
<!-- ldslNew.description_goods AS materialName,-->
<!-- ldslNew.cargo_norms AS cargoNorms,-->
<!-- t.cargoUnit AS cargoUnit,-->
<!-- ldslNew.tray_name AS trayName,-->
<!-- ldslNew.unpack AS unpack,-->
<!-- (SELECT SUM(aldrs.reality_num) FROM logpm_distribution_reservation_stocklist AS aldrs WHERE aldrs.reservation_id = #{reservationId} AND FIND_IN_SET(aldrs.stocklist_id,t.aaa)) AS realNum,-->
<!-- (SELECT SUM(newldrs.reservation_num) FROM logpm_distribution_reservation_stocklist AS newldrs WHERE newldrs.reservation_id = #{reservationId} AND FIND_IN_SET(newldrs.stocklist_id,t.aaa)) AS planNum,-->
<!-- (-->
<!-- select GROUP_CONCAT( DISTINCT (allocation_id)) from logpm_warehouse_updown_goods where association_value =ldslNew.cargo_number and warehouse_id=#{warehouseId} or association_value in (-->
<!-- SELECT order_package_code from logpm_distribution_parcel_list where conditions=2 and material_code=ldslNew.cargo_number and warehouse_id=#{warehouseId} )-->
<!-- ) as allocations-->
<!-- FROM-->
<!-- (-->
<!-- SELECT-->
<!-- ldsl.cargo_number,-->
<!-- ldsl.description_goods,-->
<!-- ldsl.id,-->
<!-- ldrs.id as deliveryDetailsId,-->
<!-- ldsl.cargo_unit as cargoUnit,-->
<!-- ldrs.reservation_num AS reservationNum,-->
<!-- GROUP_CONCAT(ldsl.id) AS aaa-->
<!-- FROM-->
<!-- logpm_distribution_reservation_stocklist ldrs-->
<!-- LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id-->
<!-- WHERE-->
<!-- ldrs.reservation_id = #{reservationId}-->
<!-- AND ldsl.market_name = #{mallName}-->
<!-- group by ldsl.cargo_number-->
<!-- ) t-->
<!-- LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number-->
<!-- LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = t.id-->
<!-- where ldslNew.is_deleted = 0-->
SELECT DISTINCT
ldslNew.sku AS sku,
ldslNew.cargo_number AS cargoNumber,
ldslNew.description_goods AS materialName,
ldslNew.cargo_norms AS cargoNorms,
t.cargoUnit AS cargoUnit,
ldslNew.tray_name AS trayName,
ldslNew.unpack AS unpack,
(SELECT SUM(aldrs.reality_num) FROM logpm_distribution_reservation_stocklist AS aldrs WHERE aldrs.reservation_id = #{reservationId} AND aldrs.stock_list_status != 2 AND FIND_IN_SET(aldrs.stocklist_id,t.aaa)) AS realNum,
(SELECT SUM(newldrs.reservation_num) FROM logpm_distribution_reservation_stocklist AS newldrs WHERE newldrs.reservation_id = #{reservationId} ANd newldrs.stock_list_status != 2 AND FIND_IN_SET(newldrs.stocklist_id,t.aaa))
@ -394,48 +358,6 @@
LEFT JOIN ( SELECT association_value, GROUP_CONCAT( DISTINCT ( allocation_id )) AS allocation_ids FROM logpm_warehouse_updown_goods WHERE warehouse_id = #{warehouseId} AND association_type = 4 GROUP BY association_value ) AS t2 ON t.cargo_number = t2.association_value
where ldslNew.is_deleted = 0
AND ldslNew.warehouse_id=#{warehouseId}
<!-- SELECT-->
<!-- ldsl.sku AS sku,-->
<!-- ldsl.cargo_number AS cargoNumber,-->
<!-- ldsl.description_goods AS materialName,-->
<!-- ldsl.cargo_norms AS cargoNorms,-->
<!-- ldsl.cargo_unit AS cargoUnit,-->
<!-- ldsl.tray_name AS trayName,-->
<!-- ldsl.unpack AS unpack,-->
<!-- ldsl.source_type AS sourceType,-->
<!-- ldrs.stocklist_id AS stockListId,-->
<!-- ldrs.reservation_num AS planNum,-->
<!-- (SELECT COUNT(ldss.id) FROM logpm_distribution_stock AS ldss WHERE ldss.stock_list_id = ldsl.id ) AS realNum,-->
<!-- CASE-->
<!-- ldsl.source_type-->
<!-- WHEN 1 THEN-->
<!-- (-->
<!-- SELECT-->
<!-- group_concat( DISTINCT lwug.allocation_id ) AS allocations-->
<!-- FROM-->
<!-- logpm_distribution_stock_list ldslnew-->
<!-- LEFT JOIN logpm_distribution_parcel_list ldpl ON ldpl.order_code = ldslnew.incoming_batch-->
<!-- AND ldpl.material_id = ldslnew.material_id-->
<!-- AND ldpl.conditions = '2'-->
<!-- LEFT JOIN logpm_warehouse_updown_goods lwug ON lwug.association_value = ldpl.order_package_code-->
<!-- WHERE-->
<!-- ldslnew.id = ldsl.id AND lwug.association_type = '3'-->
<!-- )-->
<!-- WHEN 2 THEN-->
<!-- ( SELECT group_concat( DISTINCT lwug.allocation_id ) AS allocations FROM logpm_warehouse_updown_goods lwug WHERE lwug.association_id = ldsl.material_id AND lwug.association_type = '4')-->
<!-- END allocations-->
<!-- FROM-->
<!-- logpm_distribution_reservation_stocklist ldrs-->
<!-- LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id-->
<!-- LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = ldsl.id-->
<!-- WHERE-->
<!-- ldrs.reservation_id =#{reservationId}-->
</select>
<select id="selectOrderNumByReservationId" resultType="Integer">

3
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java

@ -79,10 +79,11 @@ public class UnloadCarComHandler {
// 对这个集合内进行分组
Map<String, List<MTOrderPackageRelationVO>> stringListMap = allMtData.stream().collect(Collectors.groupingBy(MTOrderPackageRelationVO::getInvoiceOrderCode));
Set<String> set = stringListMap.keySet();
String carNum = null;
Set<String> r = new HashSet<>();
for (String s : set) {
String carNum = null;
// 得到某个工厂运输批次的集合
List<MTOrderPackageRelationVO> t = stringListMap.get(s);
//得到这个批次下面所有的包件

Loading…
Cancel
Save