diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageExportVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageExportVO.java new file mode 100644 index 000000000..c4f2bd6b1 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageExportVO.java @@ -0,0 +1,82 @@ +package com.logpm.trunkline.vo; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springblade.common.constant.IncomingTypeEnum; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class TrunklineBillladingPackageExportVO implements Serializable { + + @ExcelProperty(value = "提货批次号") + private String billladingCode; + + @ExcelProperty(value = "司机名称") + private String driverName; + + @ExcelProperty(value = "司机电话") + private String driverPhone; + + @ExcelProperty(value = "车牌号") + private String carNumber; + + @ExcelProperty(value = "运单号") + private String waybillNo; + + @ExcelProperty(value = "包件码") + private String orderPackageCode; + + @ExcelProperty(value = "订单号") + private String orderCode; + + @ExcelProperty(value = "到站") + private String destination; + + @ExcelIgnore + private Integer incomingType; + + @ExcelProperty(value = "入库类型") + private String incomingTypeStr; + + public String getIncomingTypeStr() { + return IncomingTypeEnum.getValue(incomingType); + } + + @ExcelProperty(value = "托盘名称") + private String trayName; + + @ExcelProperty(value = "托盘码") + private String trayCode; + + @ExcelProperty(value = "一级品类") + private String firstPickName; + + @ExcelProperty(value = "二级品类") + private String secondPickName; + + @ExcelProperty(value = "三级品类") + private String thirdPickName; + + @ExcelProperty(value = "物料名称") + private String materialName; + + @ExcelProperty(value = "品牌") + private String brand; + + @ExcelProperty(value = "操作仓库") + private String warehouseName; + + @ExcelProperty(value = "操作人") + private String createUserName; + + + @ExcelProperty(value = "扫码时间") + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java index c9b401876..a7047d98c 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java @@ -27,6 +27,7 @@ public class TrunklineBillladingWaybillVO extends TrunklineBillladingWaybillEnti private String consigneeAddress;//收货人地址 private String remark;//备注 private BigDecimal collectPay;//运费 + private BigDecimal totalFreight;//运费 private Integer totalCount; private Integer stockCount; diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java index f70826e93..67de349f2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java @@ -7,9 +7,7 @@ import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.trunkline.dto.BillladingDTO; import com.logpm.trunkline.dto.BillladingWaybillDTO; import com.logpm.trunkline.service.ITrunklineBillladingService; -import com.logpm.trunkline.vo.BillladingWaybillExportVO; -import com.logpm.trunkline.vo.TrunklineBillladingExportVO; -import com.logpm.trunkline.vo.TrunklineBillladingVO; +import com.logpm.trunkline.vo.*; import com.logpm.warehouse.feign.IWarehouseWaybillClient; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -397,6 +395,29 @@ public class BillladingController { } } + @ResponseBody + @PostMapping("/billladingPackageDetailExport") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查询提货单包件明细导出", notes = "传入waybillDTO") + public void billladingPackageDetailExport(@RequestBody BillladingDTO billladingDTO,HttpServletResponse response) { + String method = "############billladingPackageDetail: "; + log.info(method + "请求参数{}", billladingDTO); + + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); + throw new CustomerException(403,"多仓权限无法操作,请选择仓库"); + } + billladingDTO.setWarehouseId(myCurrentWarehouse.getId()); + billladingDTO.setWarehouseName(myCurrentWarehouse.getName()); + + List ls = trunklineBillladingService.billladingPackageDetailExport(billladingDTO); + + //导出ls + ExcelUtil.export(response, "提货单包件明细数据", "提货单包件明细数据", ls, TrunklineBillladingPackageExportVO.class); + } + @ResponseBody @PostMapping("/updateBillladingWaybillNum") diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java index fef0f47e4..a7bf6b131 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java @@ -1205,12 +1205,12 @@ public class CarsLoadController { try{ //当前登录人选择的仓库 - BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if(Objects.isNull(myCurrentWarehouse)){ - log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); - return R.fail(400,"多仓权限无法操作,请选择仓库"); - } - loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); +// BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); +// if(Objects.isNull(myCurrentWarehouse)){ +// log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); +// return R.fail(400,"多仓权限无法操作,请选择仓库"); +// } +// loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); if(Objects.isNull(loadId)){ log.warn(method+"三方中转id为空 loadId={}",loadId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java index fe850c8a4..769290311 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.trunkline.dto.BillladingDTO; import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity; +import com.logpm.trunkline.vo.TrunklineBillladingPackageExportVO; import com.logpm.trunkline.vo.TrunklineBillladingPackageVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -20,4 +21,7 @@ public interface TrunklineBillladingPackageMapper extends BaseMapper findBillladingPackages(@Param("orderPackageCodes") List orderPackageCodes); List findListByBillladingAndWaybillId(@Param("billladingId") Long billladingId, @Param("waybillId") Long waybillId); + + List findBillladingPackageDetailExport(@Param("param") BillladingDTO billladingDTO); + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml index 83d9c3fd8..38f889989 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml @@ -82,4 +82,60 @@ + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml index de48599f0..03506a31c 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml @@ -45,6 +45,7 @@ ltbw.real_num realNum, ltbw.billlading_fee billladingFee, lww.collect_pay collectPay, + lww.total_freight totalFreight, t.num scanNum from logpm_trunkline_billlading_waybill ltbw left join (select IFNULL(ltad.waybill_no,'————') waybillNo, diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java index 34c35b9da..1475bb517 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java @@ -3,6 +3,7 @@ package com.logpm.trunkline.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.trunkline.dto.BillladingDTO; import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity; +import com.logpm.trunkline.vo.TrunklineBillladingPackageExportVO; import com.logpm.trunkline.vo.TrunklineBillladingPackageVO; import org.springblade.core.mp.base.BaseService; @@ -22,4 +23,5 @@ public interface ITrunklineBillladingPackageServicie extends BaseService findListByBillladingAndWaybillId(Long billladingId, Long waybillId); + List findBillladingPackageDetailExport(BillladingDTO billladingDTO); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java index 46146b08e..e8a3e987a 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java @@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.trunkline.dto.BillladingDTO; import com.logpm.trunkline.dto.BillladingWaybillDTO; import com.logpm.trunkline.entity.TrunklineBillladingEntity; -import com.logpm.trunkline.vo.BillladingWaybillExportVO; -import com.logpm.trunkline.vo.TrunklineBillladingDetailListVO; -import com.logpm.trunkline.vo.TrunklineBillladingExportVO; -import com.logpm.trunkline.vo.TrunklineBillladingVO; +import com.logpm.trunkline.vo.*; import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; @@ -53,4 +50,5 @@ public interface ITrunklineBillladingService extends BaseService billladingDetailExport(Long billladingId); + List billladingPackageDetailExport(BillladingDTO billladingDTO); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java index 8915d20bb..0ccaa76fe 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java @@ -9,6 +9,7 @@ import com.logpm.trunkline.dto.BillladingDTO; import com.logpm.trunkline.entity.*; import com.logpm.trunkline.mapper.TrunklineBillladingPackageMapper; import com.logpm.trunkline.service.*; +import com.logpm.trunkline.vo.TrunklineBillladingPackageExportVO; import com.logpm.trunkline.vo.TrunklineBillladingPackageVO; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.feign.IWarehouseWaybillClient; @@ -516,4 +517,9 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl findBillladingPackageDetailExport(BillladingDTO billladingDTO) { + return baseMapper.findBillladingPackageDetailExport(billladingDTO); + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java index 53576fdfc..bc61e47bb 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java @@ -841,4 +841,9 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl billladingDetailExport(Long billladingId) { return billladingWaybillService.findWaybillInfoListByBillladingIdExport(billladingId); } + + @Override + public List billladingPackageDetailExport(BillladingDTO billladingDTO) { + return trunklineBillladingPackageServicie.findBillladingPackageDetailExport(billladingDTO); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml index 2e326db81..5bc9d05ad 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml @@ -34,7 +34,7 @@ from logpm_warehouse_tray_goods lwtg left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id and lwt.is_deleted = 0 left join logpm_distribution_parcel_list ldpl on ldpl.id = lwtg.association_id and ldpl.is_deleted = 0 - left join logpm_distribution_stock_article ldsa on ldpl.order_code = ldsa.order_code and ldsa.is_deleted = 0 + left join logpm_distribution_stock_article ldsa on ldpl.order_code = ldsa.order_code and ldpl.warehouse_id = ldsa.warehouse_id and ldsa.is_deleted = 0 where 1=1 and lwtg.association_type = 3 and lwtg.is_deleted = 0