Browse Source

备货库位代码恢复、自提清单导出调整

dist.1.3.0
汤建军 11 months ago
parent
commit
0588b23d09
  1. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  2. 32
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java
  3. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  4. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionBillLadingExcelDTO.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupZeroDTO.java
  7. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.java
  8. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml
  9. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.java
  10. 106
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryDetailsService.java
  12. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java
  13. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillStockService.java
  14. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryDetailsServiceImpl.java
  15. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  16. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  17. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  18. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillStockServiceImpl.java

38
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -1461,15 +1461,15 @@ public class DistributionStockupAppController extends BladeController {
String audioValue = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, PdaAudioLingoStatus.saomiaochenggong.getValue());
//进行备货库位上架
// if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("warehouseId", myCurrentWarehouse.getId());
// jsonObject.put("code",packetBarCode);
// jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
// jsonObject.put("type", 2);
// jsonObject.put("num", 1);
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
// }
if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
JSONObject jsonObject = new JSONObject();
jsonObject.put("warehouseId", myCurrentWarehouse.getId());
jsonObject.put("code",packetBarCode);
jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
jsonObject.put("type", 2);
jsonObject.put("num", 1);
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
}
//扫码成功
return Resp.scanSuccess(PdaAudioLingoStatus.saomiaochenggong.getName(), audioValue);
@ -1650,16 +1650,16 @@ public class DistributionStockupAppController extends BladeController {
});
//查询是否货位数据是否该下架
// if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("warehouseId", myCurrentWarehouse.getId());
// jsonObject.put("code",packetBarCode);
// jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
// jsonObject.put("type", 1);
// jsonObject.put("num", 1);
// //进行了备货库位的选择才进行备货库位的上架
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
// }
if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
JSONObject jsonObject = new JSONObject();
jsonObject.put("warehouseId", myCurrentWarehouse.getId());
jsonObject.put("code",packetBarCode);
jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
jsonObject.put("type", 1);
jsonObject.put("num", 1);
//进行了备货库位的选择才进行备货库位的上架
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
}
//修改包件备货状态
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
parcelListEntity.setId(entity.getParcelListId());

32
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java

@ -6,6 +6,7 @@ import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import com.alibaba.excel.write.handler.WriteHandler;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.logpm.distribution.dto.DistributionDeliveryExcelDTO;
import com.logpm.distribution.dto.app.DistributionBillLadingExcelDTO;
import com.logpm.distribution.excel.*;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
@ -124,4 +125,35 @@ public class MyExcelUtil extends ExcelUtil {
throw new RuntimeException("请稍后再试....");
}
}
public static void exBillLadingDetailedList(HttpServletResponse response, DistributionBillLadingExcelDTO map, String fileName) {
ServletOutputStream outputStream = null;
try {
response.setContentType("application/vnd.ms-excel");
fileName = URLEncoder.encode(fileName, Charsets.UTF_8.name());
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
response.setHeader("content-Type", "application/vnd.ms-excel");
response.setCharacterEncoding("UTF-8");
outputStream = response.getOutputStream();
ExcelWriter build = EasyExcel.write(outputStream).build();
WriteSheet orderList = EasyExcel.writerSheet("订单列表").head(DistributionBillOrderExcel.class).build();
WriteSheet inventoryList = EasyExcel.writerSheet("库存品列表").head(DistributionBillOrderPackExcel.class).build();
WriteSheet packageList = EasyExcel.writerSheet("包件列表").head(DistributionBillInventoryExcel.class).build();
if (Func.isNotEmpty(map.getBillOrderExcelList())){
build.write(map.getBillOrderExcelList(),orderList);
}
if (Func.isNotEmpty(map.getBillOrderPackExcelList())){
build.write(map.getBillOrderPackExcelList(),packageList);
}
if (Func.isNotEmpty(map.getBillInventoryExcelList())){
build.write(map.getBillInventoryExcelList(),inventoryList);
}
}catch (Exception e) {
throw new RuntimeException("请稍后再试....");
}
}
}

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java

@ -20,7 +20,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.distribution.bean.MyExcelUtil;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.app.DistributionBillLadingExcelDTO;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.excel.DistributionStockArticleExcel;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
@ -165,6 +167,18 @@ public class DistrilbutionBillLadingController extends BladeController {
ExcelUtil.export(response, "提货数据" + DateUtil.time(), "提货数据表", list, DistrilbutionBillLadingExcel.class);
}
/**
* 导出数据
*/
@GetMapping("/export-distributionBillLadingDetail")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出提货数据", notes = "传入-distributionBillLading")
public void exportDistributionBillLadingDetail(@ApiIgnore @RequestParam Long id,HttpServletResponse response) {
DistributionBillLadingExcelDTO map = distrilbutionBillLadingService.exportDistributionBillLadingDetail(id);
MyExcelUtil.exBillLadingDetailedList(response,map,"自提清单");
}
/**
* 提货单 自定义分页
*/

31
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionBillLadingExcelDTO.java

@ -0,0 +1,31 @@
package com.logpm.distribution.dto.app;
import com.logpm.distribution.excel.DistributionBillInventoryExcel;
import com.logpm.distribution.excel.DistributionBillOrderExcel;
import com.logpm.distribution.excel.DistributionBillOrderPackExcel;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import lombok.Data;
import java.util.List;
@Data
public class DistributionBillLadingExcelDTO {
private List<DistributionBillOrderExcel> billOrderExcelList;
private List<DistributionBillOrderPackExcel> billOrderPackExcelList;
private List<DistributionBillInventoryExcel> billInventoryExcelList;
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java

@ -13,7 +13,7 @@ public class StockupDTO implements Serializable {
private String stockupDateEnd;//备货日期
private Integer status;//0未完成 1已完成
// private Long stockupAllocationId;//0未完成 1已完成
private Long stockupAllocationId;//0未完成 1已完成
private String stockupAllocationName;//0未完成 1已完成
/**

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupZeroDTO.java

@ -22,7 +22,7 @@ public class StockupZeroDTO implements Serializable {
private String typeService;//备货类型 3 自提
private Long reservationId;//预约单id
private Integer num;//预约单id
// private Long stockupAllocationId;//备货库位Id
private Long stockupAllocationId;//备货库位Id
private String stockupAllocationName;//备货库位Id
}

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

@ -81,4 +81,6 @@ public interface DistributionDeliveryDetailsMapper extends BaseMapper<Distributi
DistributionDeliveryDetailsVO selectOrderCount(@Param("pageId") Long pageId);
List<DistributionBillInventoryExcel> getBillOrderInventoryExcel(@Param("param") DistributionDeliveryDetailsEntity deliveryDetails);
List<DistributionBillInventoryExcel> getBillLadingDetailOrderInventoryExcel(@Param("id")Long id);
}

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml

@ -135,8 +135,27 @@
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_stock lds on lds.bill_lading_id = lddd.bill_lading_id and lddd.stock_list_id = lds.stock_list_id
<where>
lddd.bill_lading_id = #{param.billLadingId} and lddd.inventory_status in (1,2)
lddd.bill_lading_id = #{param.billLadingId} and lddd.inventory_status in (1,3)
</where>
</select>
<select id="getBillLadingDetailOrderInventoryExcel"
resultType="com.logpm.distribution.excel.DistributionBillInventoryExcel">
select DISTINCT ldsl.sku, ldsl.description_goods descriptionGoods, lddd.quantity, ldsl.cargo_number cargoNumber, ldsl.cargo_unit cargoUnit,
ldsl.tray_name trayName, lds.allocation_title allocation,
lddd.reality_quantity preparedQuantity,
lddd.stock_status,
(SELECT count(id) FROM logpm_distribution_bill_lading_scan ldbls WHERE ldbls.stock_list_id = lddd.stock_list_id and ldbls.material_type = 1) AS pick_up_quantity,
CASE
WHEN (lddd.quantity - (SELECT count(id) FROM logpm_distribution_bill_lading_scan ldbls WHERE ldbls.stock_list_id = lddd.stock_list_id and ldbls.material_type = 1)) > 0 THEN 20
WHEN (lddd.quantity - (SELECT count(id) FROM logpm_distribution_bill_lading_scan ldbls WHERE ldbls.stock_list_id = lddd.stock_list_id and ldbls.material_type = 1)) = 0 THEN 10
END AS pickup_status
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_stock lds on lds.bill_lading_id = lddd.bill_lading_id and lddd.stock_list_id = lds.stock_list_id
WHERE
lddd.bill_lading_id = #{id} and lddd.inventory_status in (1,3)
</select>
</mapper>

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

@ -72,5 +72,14 @@ public interface DistrilbutionBillStockMapper extends BaseMapper<DistrilbutionBi
List<DistributionBillOrderExcel> getBillStockExcel(@Param("param")DistrilbutionBillStockEntity distrilbutionBillStock);
/**
* 查询自提订单导出详情
* @param id
* @return
*/
List<DistributionBillOrderExcel> getBillLadingDetailStockExcel(@Param("id")Long id);
List<DistributionBillOrderPackExcel> billOrderPackExcel(@Param("param")DistrilbutionBillStockEntity billStock);
List<DistributionBillOrderPackExcel> getBillLadingDetailOrderPackExcel(@Param("id")Long id);
}

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

@ -371,4 +371,110 @@
</where>
</select>
<select id="getBillLadingDetailOrderPackExcel" resultType="com.logpm.distribution.excel.DistributionBillOrderPackExcel">
SELECT
ldpl.order_package_code orderPackageCode,
ldpl.warehouse,
ldpl.firsts,
ldpl.SECOND,
ldpl.third_product thirdProduct,
ldbl.pickup_batch AS trainNumber,
ldpl.material_code materialCode,
ldpl.material_name materialName,
ldpl.waybill_number waybillNumber,
ldpl.send_warehouse_name sendWarehouseName,
ldpl.order_code orderCode,
ldpl.service_number serviceNumber,
lwtg.tray_code pallet,
lwug.allocation_title goodsAllocation,
ldpl.order_package_status orderPackageStatus ,
case
when lds.id is null then '未备货'
else '已备货'
end as stockupStatusName,
lds.create_time stockupCreateTime,
ldbl.consignee stockupConsignee,
ldbl.pick_up_plate stockupPickUpPlate,
ldbl.conditions stockupConditions,
ldbls.create_user stockupCreateUser,
ldbl.pick_up_time stockuppickUpTime,
ldbls.create_time signForCreateTime,
CASE
ldpl.order_package_status
WHEN 10 THEN
'未入库'
WHEN 20 THEN
'已入库'
WHEN 30 THEN
'中转入库'
WHEN 60 THEN
'已出库'
WHEN 70 THEN
'已签收' ELSE '未知'
END orderPackageStatusName,
CASE
WHEN ldbl.conditions = 30 THEN ldbl.update_user
end as clerkCheck,
CASE
WHEN ldbl.conditions = 30 THEN ldbl.update_time
end as clerkUpdateTime,
1 AS num
FROM logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distrilbution_bill_package ldbp on ldbl.id = ldbp.bill_lading_id
LEFT JOIN logpm_distribution_parcel_list ldpl ON ldbp.parce_list_id = ldpl.id
LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id
LEFT JOIN logpm_distribution_bill_lading_scan ldbls on ldbls.packet_bar_code = ldpl.order_package_code
LEFT JOIN logpm_warehouse_tray_goods lwtg ON lwtg.association_id = ldpl.id AND lwtg.association_type = '3'
LEFT JOIN logpm_warehouse_updown_goods lwug ON lwug.association_id = ldpl.id AND lwug.association_type = '3'
WHERE
ldbp.bill_lading_id = #{id} and ldbp.packet_bar_status in (1,3) and ldbp.bill_type = '1'
</select>
<select id="getBillLadingDetailStockExcel"
resultType="com.logpm.distribution.excel.DistributionBillOrderExcel">
select DISTINCT
ldsa.order_code orderCode,
ldsa.total_number,
ldsa.description_goods descriptionGoods,
ldsa.stockup_status stockupStatus,
(SELECT GROUP_CONCAT(material_name) FROM logpm_distribution_parcel_list WHERE is_deleted = 0 AND stock_article_id = ldsa.id GROUP BY stock_article_id) AS materialName,
CASE ldsa.is_zero
WHEN 0 THEN
(select COUNT(id) from logpm_distrilbution_bill_package
where stock_article_id = ldsa.id and packet_bar_status in (1,3) and bill_lading_id = #{param.billLadingId} AND is_deleted = 0 )
ELSE
(select sum(quantity) from logpm_distribution_reservation_zero_package
where stock_article_id = ldsa.id and zero_package_status in (1,3) AND type =3 and reservation_id = #{param.billLadingId} AND is_deleted = 0 )
END handQuantity,
(select IFNULL(sum(quantity) ,0) from logpm_distribution_bill_lading_scan
where stock_article_id = ldsa.id AND bill_lading_id = #{param.billLadingId} AND is_deleted = 0 ) pick_up_quantity,
CASE
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id AND is_deleted = 0) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3) AND is_deleted = 0) = 0 THEN '20'
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id AND is_deleted = 0) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3) AND is_deleted = 0) > 0 THEN '10'
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id AND is_deleted = 0) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3) AND is_deleted = 0) &lt; 0 THEN '30'
END AS conditions,
(select GROUP_CONCAT(DISTINCT ldpl.material_name )
from logpm_distribution_parcel_list ldpl
where ldpl.material_name is not null and ldpl.stock_article_id = ldbs.stock_article_id) materialName,
(select IFNULL(sum(lds.stock_quantity),0)
from logpm_distribution_stock lds
where lds.stock_article = ldbs.stock_article_id ) preparedQuantity ,
(select COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '')
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3'
where ldpl.stock_article_id = ldbs.stock_article_id) pallet ,
(select COALESCE(GROUP_CONCAT(DISTINCT lwug.allocation_title SEPARATOR ','), '')
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
from
logpm_distrilbution_bill_lading AS ldbl
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbs.bill_lading_id = ldbl.id
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
WHERE
ldbs.is_deleted = 0 and ldbs.bill_lading_id = #{id} and ldbs.order_status in (1,3)
</select>
</mapper>

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

@ -85,4 +85,6 @@ public interface IDistributionDeliveryDetailsService extends BaseService<Distrib
DistributionDeliveryDetailsVO selectOrderCount(Long pageId);
List<DistributionBillInventoryExcel> getBillOrderInventoryExcel(Map<String, Object> distributionDeliveryDetails);
List<DistributionBillInventoryExcel> getBillLadingDetailOrderInventoryExcel(Long id);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO;
import com.logpm.distribution.dto.app.DistributionBillLadingExcelDTO;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.vo.*;
@ -262,4 +263,11 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
* @return
*/
Boolean clerkBillCheckPushData(Long id);
/**
* 自提详情导出
* @param id
* @return
*/
DistributionBillLadingExcelDTO exportDistributionBillLadingDetail(Long id);
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillStockService.java

@ -98,8 +98,18 @@ public interface IDistrilbutionBillStockService extends BaseService<Distrilbutio
*/
List<DistributionBillOrderExcel> distrilbutionBillStock(Map<String, Object> distrilbutionBillStock);
/**
* 查询自提单订单导出详情数据
* @param id
* @return
*/
List<DistributionBillOrderExcel> distrilbutionBillDeatilStock(Long id);
List<DistributionBillOrderPackExcel> billOrderPackExcel(Map<String, Object> distrilbutionBillStock);
List<DistributionBillOrderPackExcel> billLadingDetailOrderPackExcel(Long id);
/**
* 维护自提单订单状态
* @param l

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryDetailsServiceImpl.java

@ -120,4 +120,27 @@ public class DistributionDeliveryDetailsServiceImpl extends BaseServiceImpl<Dist
}
return billOrderInventoryExcel;
}
@Override
public List<DistributionBillInventoryExcel> getBillLadingDetailOrderInventoryExcel(Long id) {
List<DistributionBillInventoryExcel> billOrderInventoryExcel = baseMapper.getBillLadingDetailOrderInventoryExcel(id);
for (DistributionBillInventoryExcel distributionBillInventoryExcel : billOrderInventoryExcel) {
if (ObjectUtils.isNotEmpty(distributionBillInventoryExcel.getStockStatus()) && distributionBillInventoryExcel.getStockStatus()==1){
distributionBillInventoryExcel.setStockStatusName(DeliveryStockStatuConstant.daibeihuo.getName());
}else if (ObjectUtils.isNotEmpty(distributionBillInventoryExcel.getStockStatus()) && distributionBillInventoryExcel.getStockStatus()==2){
distributionBillInventoryExcel.setStockStatusName(DeliveryStockStatuConstant.beihuozong.getName());
}else if (ObjectUtils.isNotEmpty(distributionBillInventoryExcel.getStockStatus()) && distributionBillInventoryExcel.getStockStatus()==3){
distributionBillInventoryExcel.setStockStatusName(DeliveryStockStatuConstant.beihuowanceng.getName());
}
//不确定的字段 前端制为空
if (ObjectUtils.isNotEmpty(distributionBillInventoryExcel.getPickupStatus()) && distributionBillInventoryExcel.getPickupStatus()==10){
distributionBillInventoryExcel.setPickupStatusName("已提货");
}else if (ObjectUtils.isNotEmpty(distributionBillInventoryExcel.getPickupStatus()) && distributionBillInventoryExcel.getPickupStatus()==20){
distributionBillInventoryExcel.setPickupStatusName("未提货");
}
}
return billOrderInventoryExcel;
}
}

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

@ -7427,7 +7427,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = distributionDeliveryInfoMapper.selectClientListByDeliveryId(deliveryId);
List<DistributionDeliveryInfoVO> deliveryInfoVOS = handleClient(distributionDeliveryInfoVOS);
distributionDeliveryExcelDTO.setDeliveryInfoVOS(deliveryInfoVOS);
// EXResource.put("client",deliveryInfoVOS);
// EXResource.put("client",deliveryInfoVOS);
List<DistributionStockArticleVO> distributionStockArticleVOS = distributionDeliveryInfoMapper.selectDistributionDeliveryOrderPageByDeliveryId(deliveryId);
distributionDeliveryExcelDTO.setDistributionStockArticleVOS(distributionStockArticleVOS);
// EXResource.put("order",distributionStockArticleVOS);

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

@ -1997,15 +1997,15 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
distributionStockService.saveBatch(list1);
//备货库位上架
// if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("warehouseId", myCurrentWarehouse.getId());
// jsonObject.put("code", stockupDTO.getTrayBarCode());
// jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
// jsonObject.put("type", 4);
// jsonObject.put("num", list1.size());
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
// }
if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
JSONObject jsonObject = new JSONObject();
jsonObject.put("warehouseId", myCurrentWarehouse.getId());
jsonObject.put("code", stockupDTO.getTrayBarCode());
jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
jsonObject.put("type", 4);
jsonObject.put("num", list1.size());
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
}
}
int i = list1.isEmpty() ? 0 : list1.size();
return Resp.scanSuccess("整托拣货" + i + "件", "整托拣货" + i + "件");
@ -2693,16 +2693,16 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
log.info(method + "无库位无托盘备货");
}
distributionStockService.save(stockEntity);
// if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("warehouseId", myCurrentWarehouse.getId());
// jsonObject.put("code", stockArticleEntity.getOrderCode());
// jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
// jsonObject.put("type", 3);
// jsonObject.put("num", stockupDTO.getNum());
// //备货库位上架
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
// }
if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
JSONObject jsonObject = new JSONObject();
jsonObject.put("warehouseId", myCurrentWarehouse.getId());
jsonObject.put("code", stockArticleEntity.getOrderCode());
jsonObject.put("stockUpAllocationId", stockupDTO.getStockupAllocationId());
jsonObject.put("type", 3);
jsonObject.put("num", stockupDTO.getNum());
//备货库位上架
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
}
return Resp.scanSuccess("备货成功", "本次成功备货" + stockupDTO.getNum() + "件");
}

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

@ -38,7 +38,11 @@ import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.OrderStatusDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO;
import com.logpm.distribution.dto.app.DistributionBillLadingExcelDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionBillInventoryExcel;
import com.logpm.distribution.excel.DistributionBillOrderExcel;
import com.logpm.distribution.excel.DistributionBillOrderPackExcel;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.mapper.DistributionStockListMapper;
import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper;
@ -1336,6 +1340,28 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
}
@Override
public DistributionBillLadingExcelDTO exportDistributionBillLadingDetail(Long id) {
String method = "################# 导出配送单明细 #################exportDistributionBillLadingDetail";
if (Objects.isNull(id)){
log.error(method+"ids参数缺失:{}",id);
}
DistributionBillLadingExcelDTO distributionBillLadingExcelDTO = new DistributionBillLadingExcelDTO();
List<DistributionBillOrderExcel> distributionBillOrderExcels = distrilbutionBillStockService.distrilbutionBillDeatilStock(id);
if (!distributionBillOrderExcels.isEmpty()) {
distributionBillLadingExcelDTO.setBillOrderExcelList(distributionBillOrderExcels);
}
List<DistributionBillOrderPackExcel> distributionBillOrderPackExcels = distrilbutionBillStockService.billLadingDetailOrderPackExcel(id);
if (!distributionBillOrderPackExcels.isEmpty()) {
distributionBillLadingExcelDTO.setBillOrderPackExcelList(distributionBillOrderPackExcels);
}
List<DistributionBillInventoryExcel> billInventoryExcelList = distributionDeliveryDetailsService.getBillLadingDetailOrderInventoryExcel(id);
if (billInventoryExcelList.isEmpty()) {
distributionBillLadingExcelDTO.setBillInventoryExcelList(billInventoryExcelList);
}
return distributionBillLadingExcelDTO;
}
/**
* 转换老系统的ID
*
@ -2296,7 +2322,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
List<Long> billIds = records.stream()
.map(DistrilbutionBillLadingVO::getId) // 假设getId()方法返回提货单ID
.collect(Collectors.toList());
if (billIds.isEmpty()) {
return distrilbutionBillLadingVOIPage;
}
List<DistributionDeliveryChargeEntity> distributionDeliveryChargeEntityList = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda()
.in(DistributionDeliveryChargeEntity::getBillLading, billIds)
);

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillStockServiceImpl.java

@ -167,6 +167,25 @@ public class DistrilbutionBillStockServiceImpl extends BaseServiceImpl<Distrilbu
return distributionBillOrderExcels;
}
@Override
public List<DistributionBillOrderExcel> distrilbutionBillDeatilStock(Long id) {
List<DistributionBillOrderExcel> distributionBillOrderExcels = baseMapper.getBillLadingDetailStockExcel(id);
distributionBillOrderExcels.forEach( i ->{
if(StringUtils.isNotBlank(i.getStockupStatus())){
i.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,i.getStockupStatus()));
}
if(ObjectUtils.isNotNull(i.getConditions())){
i.setConditionsName(DictBizCache.getValue(DictBizConstant.BILL_CONDITIONS_STATUS,i.getConditions()));
}
// if (StringUtils.isNotBlank(i.getHandQuantity())){
// i.setStockUpQuantity(i.getHandQuantity());
// }
});
return distributionBillOrderExcels;
}
@Override
public List<DistributionBillOrderPackExcel> billOrderPackExcel(Map<String, Object> distrilbutionBillStock) {
DistrilbutionBillStockEntity billStock = JSON.parseObject(JSON.toJSONString(distrilbutionBillStock), DistrilbutionBillStockEntity.class);
@ -183,6 +202,20 @@ public class DistrilbutionBillStockServiceImpl extends BaseServiceImpl<Distrilbu
return distributionBillOrderPackExcels;
}
@Override
public List<DistributionBillOrderPackExcel> billLadingDetailOrderPackExcel(Long id) {
List<DistributionBillOrderPackExcel> distributionBillOrderPackExcels = baseMapper.getBillLadingDetailOrderPackExcel(id);
distributionBillOrderPackExcels.forEach(i -> {
if(ObjectUtils.isNotNull(i.getStockupCreateUser())){
R<User> userR = userClient.userInfoById(Long.valueOf(i.getStockupCreateUser()));
if(userR.isSuccess() && ObjectUtils.isNotNull(userR.getData())){
i.setStockupCreateUser(userR.getData().getRealName());
}
}
});
return distributionBillOrderPackExcels;
}
/**
* @param l
*/
@ -219,4 +252,5 @@ public class DistrilbutionBillStockServiceImpl extends BaseServiceImpl<Distrilbu
);
}
}
}

Loading…
Cancel
Save