Browse Source

在库订单导出BUG修复

master
汤建军 9 months ago
parent
commit
5106051684
  1. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  3. 48
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  5. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

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

@ -1821,7 +1821,8 @@
<where>
ldrzp.reservation_id = #{param.reservationId} AND ldrzp.zero_package_status in ('1','3')
</where>
GROUP BY
ldrzp.parcel_list_id
</select>
<select id="selectStockupZeroOrderList"
resultType="com.logpm.distribution.vo.DistributionStockupOrderListVO">

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

@ -53,7 +53,7 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
* @param
* @return
*/
List<DistributionStockArticleEntity> exportDistributionStockArticle(@Param("paramMap") Map<String, Object> paramMap, @Param("idArr") List<String> idArr);
List<DistributionStockArticleEntity> exportDistributionStockArticle(@Param("param") Map<String, Object> paramMap);
void addHandQuantity(@Param("id") Long id,@Param("num") int num);

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

@ -838,39 +838,43 @@
ldsa.order_delivery_status,
group_concat(DISTINCT lwt.pallet_name) as trays,
group_concat(DISTINCT lwug.position_code) as allocation
from logpm_platform.logpm_distribution_stock_article ldsa
left join logpm_platform.logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
left join logpm_platform.logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
left join logpm_platform.logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
from logpm_distribution_stock_article ldsa
left join logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.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 logpm_warehouse_tray lwt on lwtg.tray_id= lwt.id
<where>
ldsa.is_deleted = 0 and ldsa.order_status IN ( 10, 20, 30, 40, 50, 60, 70 )
and ldsa.hand_quantity > 0
and ldsa.genre = 1
<if test="paramMap.warehouseId != null and paramMap.warehouseId != ''">
and ldsa.warehouse_id = #{paramMap.warehouseId}
<if test="param.warehouseId != null and param.warehouseId != ''">
and ldsa.warehouse_id = #{param.warehouseId}
</if>
<if test="paramMap.waybillNumber != null and paramMap.waybillNumber != ''"> and ldpl.waybill_number = #{paramMap.waybillNumber} </if>
<if test="paramMap.orderCode != null and paramMap.orderCode != ''"> and ldsa.order_code = #{paramMap.orderCode} </if>
<if test="paramMap.mallName != null and paramMap.mallName != ''"> and ldsa.mall_name = #{paramMap.mallName} </if>
<if test="paramMap.typeService != null and paramMap.typeService != ''"> and ldsa.type_service = #{paramMap.typeService} </if>
<if test="paramMap.consigneeUnit != null and paramMap.consigneeUnit != ''"> and ldsa.consignee_unit = #{paramMap.consigneeUnit} </if>
<if test="paramMap.trainNumber != null and paramMap.trainNumber != ''"> and ldsa.train_number = #{paramMap.trainNumber} </if>
<if test="paramMap.acceptWarehouseName != null and paramMap.acceptWarehouseName != ''"> and ldsa.accept_warehouse_name = #{paramMap.acceptWarehouseName} </if>
<if test="paramMap.serviceNumber != null and paramMap.serviceNumber != ''">
and ldsa.servic_nNumber = #{paramMap.serviceNumber}
<if test="param.warehouseIds != null ">
and ldsa.warehouse_id in
<foreach collection="param.warehouseIds" item="wIitem" index="index" open="(" close=")" separator=",">
#{wIitem}
</foreach>
</if>
<if test="idArr != null and idArr != ''">
<if test="param.waybillNumber != null and param.waybillNumber != ''"> and ldpl.waybill_number = #{param.waybillNumber} </if>
<if test="param.orderCode != null and param.orderCode != ''"> and ldsa.order_code = #{param.orderCode} </if>
<if test="param.mallName != null and param.mallName != ''"> and ldsa.mall_name = #{param.mallName} </if>
<if test="param.typeService != null and param.typeService != ''"> and ldsa.type_service = #{param.typeService} </if>
<if test="param.consigneeUnit != null and param.consigneeUnit != ''"> and ldsa.consignee_unit = #{param.consigneeUnit} </if>
<if test="param.trainNumber != null and param.trainNumber != ''"> and ldsa.train_number = #{param.trainNumber} </if>
<if test="param.acceptWarehouseName != null and param.acceptWarehouseName != ''"> and ldsa.accept_warehouse_name = #{param.acceptWarehouseName} </if>
<if test="param.serviceNumber != null and param.serviceNumber != ''">
and ldsa.service_number = #{param.serviceNumber}
</if>
<if test="param.orderIds != null ">
and ldsa.id in
<foreach collection="idArr" item="item" open="(" close=")" separator=",">
#{item}
<foreach collection="param.orderIds" item="wIitem" index="index" open="(" close=")" separator=",">
#{wIitem}
</foreach>
</if>
</where>
group by ldsa.id;
group by ldsa.id
</select>
<!-- <select id="selectAllDistributionOrder"-->
<!-- resultType="com.logpm.distribution.entity.DistributionStockArticleEntity">-->

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

@ -150,7 +150,7 @@
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3'
where ldpl.stock_article_id = ldbs.stock_article_id) goodsAllocation,
ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName
ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName,
GROUP_CONCAT(DISTINCT ldbls.scan_user) AS scanUser ,MAX(ldbls.create_time) AS signingTime
from
logpm_distrilbution_bill_lading AS ldbl

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

@ -165,20 +165,29 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
// 获取当前登录的仓库信息
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNull(myCurrentWarehouse)) {
throw new ServiceException("没有仓库信息!");
//查询当前用户的仓库列表
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()){
List<Long> warehouseListIds = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
paramMap.put("warehouseIds", warehouseListIds);
}
}else {
paramMap.put("warehouseId", myCurrentWarehouse.getId());
}
// 用户勾选数据的ids
Object ids = paramMap.get("ids");
List<String> idArr = null;
List<Long> idArr = null;
if (null != ids && !"".equals(ids.toString())) {
idArr = Arrays.asList(paramMap.get("ids").toString().split(","));
// idArr = Arrays.asList(paramMap.get("ids").toString().split(","));
idArr = Func.toLongList((String) paramMap.get("ids"));
}
String tenantId = AuthUtil.getTenantId();
paramMap.put("warehouseId", myCurrentWarehouse.getId());
paramMap.put("tenantId", tenantId);
paramMap.put("orderIds", idArr);
List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap, idArr);
List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap);
List<DistributionStockArticleExcel> excelList = new ArrayList<>();
//
list.forEach(li -> {

Loading…
Cancel
Save