Browse Source

备货清单导出

single_db
汤建军 1 year ago
parent
commit
2e582c5726
  1. 9
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayGoodsClient.java
  2. 10
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java
  3. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionStockupPackageListDetailExcel.java
  4. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  5. 47
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  6. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayGoodsClient.java
  7. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java
  8. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.java
  9. 13
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml
  10. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.java
  11. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.xml
  12. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayGoodsService.java
  13. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownGoodsService.java
  14. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsServiceImpl.java
  15. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java

9
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayGoodsClient.java

@ -86,4 +86,13 @@ public interface IWarehouseTrayGoodsClient {
@GetMapping(GETTRAYLIST+"/getTrayNameByOrderPackageCode")
String getTrayNameByOrderPackageCode(@RequestParam String orderCode,@RequestParam Integer type);
/**
* 查询无数据托盘信息
* @param marketId
* @param cargoNumber
* @return
*/
@GetMapping(GETTRAYLIST+"/getTrayInfoByInventory")
String getTrayInfoByInventory(@RequestParam Long marketId,@RequestParam String cargoNumber);
}

10
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java

@ -93,4 +93,14 @@ public interface IWarehouseUpdownGoodsClient {
*/
@GetMapping(LOCATIONSTOCKLISTINFORMATION+"/getAllocationNameByOrderPackageCode")
String getAllocationNameByOrderPackageCode(@RequestParam String orderPackageCode,@RequestParam Integer type);
/**
* 查询无数据库存品库位信息
* @param marketId
* @param cargoNumber
* @return
*/
@GetMapping(LOCATIONSTOCKLISTINFORMATION+"/getAllocationNameByInventory")
String getAllocationNameByInventory(@RequestParam Long marketId,@RequestParam String cargoNumber);
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionStockupPackageListDetailExcel.java

@ -45,6 +45,10 @@ public class DistributionStockupPackageListDetailExcel {
@ExcelProperty("产品名称")
private String productName;
@ColumnWidth(20)
@ExcelProperty("物料编码")
private String cargoNumber;
@ColumnWidth(20)
@ExcelProperty("备注")
private String remarks;
@ -65,6 +69,9 @@ public class DistributionStockupPackageListDetailExcel {
@ExcelIgnore
private Integer isInventory;
@ExcelIgnore
private Long id;
@ExcelIgnore
private String isZero;
/**

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

@ -1186,7 +1186,29 @@
</select>
<select id="exportStockUptInventoryDetail"
resultType="com.logpm.distribution.excel.DistributionStockupPackageListDetailExcel">
SELECT
lds.stockup_code AS stockupCode,
ldr.consignee AS consignee,
ldsl.order_code AS orderCode,
ldsl.description_goods AS productName,
ldsl.brand_name AS brand,
lds.remarks AS remarks,
ldrs.reservation_num AS reservationNum,
ldsl.id,
ldsl.cargo_number AS cargoNumber,
1 AS isInventory
FROM
logpm_distribution_stockup AS lds
LEFT JOIN logpm_distribution_stockup_info AS ldsi ON lds.id = ldsi.stockup_id
LEFT JOIN logpm_distribution_reservation AS ldr ON ldsi.reservation_id = ldr.id
LEFT JOIN logpm_distribution_reservation_stocklist AS ldrs ON ldr.id=ldrs.reservation_id
LEFT JOIN logpm_distribution_stock_list AS ldsl ON ldsl.id=ldrs.stocklist_id
WHERE
lds.id IN
<foreach collection="ids" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
</mapper>

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

@ -56,6 +56,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.CodeDesEnum;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.pda.PdaAudioLingoStatus;
import org.springblade.common.constant.stocklist.StockLockingStatusConstant;
@ -3137,6 +3138,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override
public List<DistributionStockupPackageListDetailExcel> exportStockUptDetail(List<Long> list) {
List<DistributionStockupPackageListDetailExcel> detail = new ArrayList<>();
List<DistributionStockupPackageListDetailExcel> stockupPackageListDetailExcels = baseMapper.exportStockUptOrderDetail(list);
if (Func.isNotEmpty(stockupPackageListDetailExcels)){
for (DistributionStockupPackageListDetailExcel stockupPackageListDetailExcel : stockupPackageListDetailExcels) {
@ -3162,14 +3166,51 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
}
}
detail.addAll(stockupPackageListDetailExcels);
}
//库存品
// List<DistributionStockupPackageListDetailExcel> stockupInventoryListDetailExcels = baseMapper.exportStockUptInventoryDetail(list);
List<DistributionStockupPackageListDetailExcel> stockupInventoryListDetailExcels = baseMapper.exportStockUptInventoryDetail(list);
if (Func.isNotEmpty(stockupInventoryListDetailExcels)){
for (DistributionStockupPackageListDetailExcel stockupInventoryListDetailExcel : stockupInventoryListDetailExcels) {
//查询库存品托盘信息
DistributionStockListEntity distributionStockLisEntity = distributionStockListMapper.selectById(stockupInventoryListDetailExcel.getId());
if (distributionStockLisEntity.getSourceType().equals("1")){
//转
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getOrderCode, distributionStockLisEntity.getIncomingBatch())
.eq(DistributionParcelListEntity::getOrderPackageStockupStatus, OrderPackageStockupStatusConstant.daibeihuo.getValue())
.eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue())
);
if (Func.isNotEmpty(parcelListEntities)){
String orderpackageCode = parcelListEntities.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(","));
//订制品订单 查询托盘和库位
String trayName = warehouseTrayGoodsClient.getTrayNameByOrderPackageCode(orderpackageCode,3);
if (Func.isNotBlank(trayName)){
stockupInventoryListDetailExcel.setTrayNames(trayName);
}
String allocationName = warehouseUpdownGoodsClient.getAllocationNameByOrderPackageCode(orderpackageCode,3);
if (Func.isNotBlank(allocationName)){
stockupInventoryListDetailExcel.setAllocationNames(allocationName);
}
}
}else {
//导
String trayName = warehouseTrayGoodsClient.getTrayInfoByInventory(distributionStockLisEntity.getMarketId(),distributionStockLisEntity.getCargoNumber());
if (Func.isNotBlank(trayName)){
stockupInventoryListDetailExcel.setTrayNames(trayName);
}
String allocationName = warehouseUpdownGoodsClient.getAllocationNameByInventory(distributionStockLisEntity.getMarketId(),distributionStockLisEntity.getCargoNumber());
if (Func.isNotBlank(allocationName)){
stockupInventoryListDetailExcel.setAllocationNames(allocationName);
}
}
}
return stockupPackageListDetailExcels;
detail.addAll(stockupInventoryListDetailExcels);
}
return detail;
}
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayGoodsClient.java

@ -84,4 +84,9 @@ public class WarehouseTrayGoodsClient implements IWarehouseTrayGoodsClient {
return warehouseTrayGoodsService.getTrayNameByOrderPackageCode(orderCode,type);
}
@Override
public String getTrayInfoByInventory(Long marketId, String cargoNumber) {
return warehouseTrayGoodsService.getTrayInfoByInventory(marketId,cargoNumber);
}
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java

@ -96,4 +96,9 @@ public class WarehouseUpdownGoodsClient implements IWarehouseUpdownGoodsClient {
public String getAllocationNameByOrderPackageCode(String orderPackageCode,Integer type) {
return warehouseUpdownGoodsService.getAllocationNameByOrderPackageCode(orderPackageCode,type);
}
@Override
public String getAllocationNameByInventory(Long marketId, String cargoNumber) {
return warehouseUpdownGoodsService.getAllocationNameByInventory(marketId, cargoNumber);
}
}

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.java

@ -66,4 +66,12 @@ public interface WarehouseTrayGoodsMapper extends BaseMapper<WarehouseTrayGoodsE
* @return
*/
String getTrayNameByOrderPackageCode(@Param("orderCode") String[] split,@Param("type")Integer type);
/**
* 查询无数据库存品信息 拼接方式 托盘名称 + 件数
* @param marketId
* @param cargoNumber
* @return
*/
String getTrayInfoByInventory(@Param("marketId") Long marketId,@Param("cargoNumber") String cargoNumber);
}

13
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml

@ -320,7 +320,7 @@
</select>
<select id="getTrayNameByOrderPackageCode" resultType="java.lang.String">
SELECT
GROUP_CONCAT(lwt.pallet_name)
GROUP_CONCAT(DISTINCT lwt.pallet_name)
FROM
logpm_warehouse_tray_goods AS lwtg
LEFT JOIN logpm_warehouse_tray AS lwt ON lwtg.tray_id = lwt.id
@ -331,6 +331,17 @@
</foreach>
GROUP BY lwt.id
</select>
<select id="getTrayInfoByInventory" resultType="java.lang.String">
SELECT
GROUP_CONCAT(DISTINCT lwt.pallet_name,'-',lwtg.num,'件')
FROM
logpm_warehouse_tray_goods AS lwtg
LEFT JOIN logpm_warehouse_tray AS lwt ON lwtg.tray_id = lwt.id
WHERE
lwtg.association_type = 4 AND lwtg.market_id = #{marketId} AND lwtg.association_value = #{cargoNumber}
GROUP BY
lwt.id
</select>
<update id="updeteWarehouseIdByTrayTypeId">
update logpm_warehouse_tray_goods

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.java

@ -110,6 +110,14 @@ public interface WarehouseUpdownGoodsMapper extends BaseMapper<WarehouseUpdownGo
*/
String getAllocationNameByOrderPackageCode(@Param("orderPackageCode") String[] orderPackageCode,@Param("type") Integer type);
/**
* 查询无数据库存品库位信息 库位名称 + 件数
* @param marketId
* @param cargoNumber
* @return
*/
String getAllocationNameByInventory(@Param("marketId") Long marketId,@Param("cargoNumber") String cargoNumber);
// /**
// * 根据货位查询货物

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.xml

@ -412,6 +412,17 @@
GROUP BY
lwga.id
</select>
<select id="getAllocationNameByInventory" resultType="java.lang.String">
SELECT
GROUP_CONCAT( DISTINCT CONCAT_WS('-',lwgaa.headline,lwgs.goods_shelf_name,lwga.goods_allocation_name) )
FROM
logpm_warehouse_updown_goods AS lwup
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwup.allocation_id = lwga.id
LEFT JOIN logpm_warehouse_goods_shelf AS lwgs ON lwga.goods_shelf_id = lwgs.id
LEFT JOIN logpm_warehouse_goods_area AS lwgaa ON lwga.goods_area_id = lwgaa.id
WHERE
lwup.association_type = 4 and lwup.association_value = #{cargoNumber} AND lwup.market_id = #{marketId}
</select>
</mapper>

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayGoodsService.java

@ -92,4 +92,12 @@ public interface IWarehouseTrayGoodsService extends BaseService<WarehouseTrayGoo
* @return
*/
String getTrayNameByOrderPackageCode(String orderCode,Integer type);
/**
* 查询无数据库存品托盘信息 拼接方式 托盘名称 + 件数
* @param marketId
* @param cargoNumber
* @return
*/
String getTrayInfoByInventory(Long marketId, String cargoNumber);
}

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownGoodsService.java

@ -137,4 +137,12 @@ public interface IWarehouseUpdownGoodsService extends BaseService<WarehouseUpdow
* @return
*/
String getAllocationNameByOrderPackageCode(String orderPackageCode,Integer type);
/**
* 查询无数据库存品库位信息 拼接方式 库位名称 + 件数
* @param marketId
* @param cargoNumber
* @return
*/
String getAllocationNameByInventory(Long marketId, String cargoNumber);
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsServiceImpl.java

@ -287,6 +287,11 @@ public class WarehouseTrayGoodsServiceImpl extends BaseServiceImpl<WarehouseTray
return baseMapper.getTrayNameByOrderPackageCode(split,type);
}
@Override
public String getTrayInfoByInventory(Long marketId, String cargoNumber) {
return baseMapper.getTrayInfoByInventory(marketId,cargoNumber);
}
@Override
public Boolean deleteByMasterId(Long masterId) {
int delete = baseMapper.delete(new QueryWrapper<WarehouseTrayGoodsEntity>().lambda()

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java

@ -236,4 +236,9 @@ public class WarehouseUpdownGoodsServiceImpl extends BaseServiceImpl<WarehouseUp
return baseMapper.getAllocationNameByOrderPackageCode(split,type);
}
@Override
public String getAllocationNameByInventory(Long marketId, String cargoNumber) {
return baseMapper.getAllocationNameByInventory( marketId, cargoNumber);
}
}

Loading…
Cancel
Save