Browse Source

1.干线bug修复

dist.1.3.0
zhenghaoyu 6 months ago
parent
commit
f2af820056
  1. 82
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageExportVO.java
  2. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java
  3. 27
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java
  4. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  5. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java
  6. 56
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml
  7. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml
  8. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java
  9. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java
  10. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java
  11. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  12. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml

82
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;
}

1
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;

27
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<TrunklineBillladingPackageExportVO> ls = trunklineBillladingService.billladingPackageDetailExport(billladingDTO);
//导出ls
ExcelUtil.export(response, "提货单包件明细数据", "提货单包件明细数据", ls, TrunklineBillladingPackageExportVO.class);
}
@ResponseBody
@PostMapping("/updateBillladingWaybillNum")

12
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);

4
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<TrunklineBi
List<String> findBillladingPackages(@Param("orderPackageCodes") List<String> orderPackageCodes);
List<TrunklineBillladingPackageEntity> findListByBillladingAndWaybillId(@Param("billladingId") Long billladingId, @Param("waybillId") Long waybillId);
List<TrunklineBillladingPackageExportVO> findBillladingPackageDetailExport(@Param("param") BillladingDTO billladingDTO);
}

56
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml

@ -82,4 +82,60 @@
</select>
<select id="findBillladingPackageDetailExport" resultType="com.logpm.trunkline.vo.TrunklineBillladingPackageExportVO">
select ltb.billlading_code billladingCode,
ltb.driver_name driverName,
ltb.driver_phone driverPhone,
ltb.car_number carNumber,
lww.waybill_no waybillNo,
ltbp.order_package_code orderPackageCode,
ldpl.order_code orderCode,
lww.destination destination,
ltbp.incoming_type incomingType,
lwt.pallet_name trayName,
lwt.pallet_code trayCode,
ldpl.firsts firstPickName,
ldpl.`second` secondPickName,
ldpl.third_product thirdPickName,
ldpl.material_name materialName,
ldpl.brand_name brand,
ltbp.warehouse_name warehouseName,
ltbp.create_user_name createUserName,
ltbp.create_time createTime
from logpm_trunkline_billlading_package ltbp
left join logpm_trunkline_billlading ltb on ltb.id = ltbp.billlading_id
left join logpm_distribution_parcel_list ldpl on ldpl.order_package_code = ltbp.order_package_code
left join logpm_warehouse_tray_goods lwtg on lwtg.association_value = ldpl.order_package_code
left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id
left join logpm_warehouse_waybill lww on lww.waybill_no = ldpl.waybill_number
where ltbp.billlading_id = #{param.id}
and ldpl.warehouse_id = #{param.warehouseId}
<if test="param.billladingCode != null and param.billladingCode != '' ">
and ltb.billlading_code = #{param.billladingCode}
</if>
<if test="param.driverName != null and param.driverName != '' ">
and ltb.driver_name = #{param.driverName}
</if>
<if test="param.carNumber != null and param.carNumber != '' ">
and ltb.car_number = #{param.carNumber}
</if>
<if test="param.waybillNo != null and param.waybillNo != '' ">
and lww.waybill_no = #{param.waybillNo}
</if>
<if test="param.orderPackageCode != null and param.orderPackageCode != '' ">
and ltbp.order_package_code = #{param.orderPackageCode}
</if>
<if test="param.orderCode != null and param.orderCode != '' ">
and ldpl.order_code = #{param.orderCode}
</if>
<if test="param.destination != null and param.destination != '' ">
and lww.destination = #{param.destination}
</if>
<if test="param.createUserName != null and param.createUserName != '' ">
and ltbp.create_user_name = #{param.createUserName}
</if>
</select>
</mapper>

1
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,

2
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<Trunkli
List<TrunklineBillladingPackageEntity> findListByBillladingAndWaybillId(Long billladingId, Long waybillId);
List<TrunklineBillladingPackageExportVO> findBillladingPackageDetailExport(BillladingDTO billladingDTO);
}

6
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<TrunklineBillla
List<BillladingWaybillExportVO> billladingDetailExport(Long billladingId);
List<TrunklineBillladingPackageExportVO> billladingPackageDetailExport(BillladingDTO billladingDTO);
}

6
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<Trunk
return baseMapper.findListByBillladingAndWaybillId(billladingId,waybillId);
}
@Override
public List<TrunklineBillladingPackageExportVO> findBillladingPackageDetailExport(BillladingDTO billladingDTO) {
return baseMapper.findBillladingPackageDetailExport(billladingDTO);
}
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -841,4 +841,9 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
public List<BillladingWaybillExportVO> billladingDetailExport(Long billladingId) {
return billladingWaybillService.findWaybillInfoListByBillladingIdExport(billladingId);
}
@Override
public List<TrunklineBillladingPackageExportVO> billladingPackageDetailExport(BillladingDTO billladingDTO) {
return trunklineBillladingPackageServicie.findBillladingPackageDetailExport(billladingDTO);
}
}

2
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

Loading…
Cancel
Save