Browse Source

1.干线-bug修复

master
zhenghaoyu 12 months ago
parent
commit
34dec0c0b7
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  3. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  4. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java
  5. 14
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/EditOrderMsgVO.java
  6. 65
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java
  7. 7
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java
  8. 14
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  9. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  11. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  12. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  13. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  14. 17
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml
  15. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
  16. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml
  17. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java
  18. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  19. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  20. 34
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  21. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  22. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  23. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  24. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  25. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  26. 209
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  27. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java
  28. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  29. 148
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  30. 72
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -113,6 +113,8 @@ public class DictBizConstant {
public static final String OPEN_ORDER_URGENCY = "open_order_urgency";
public static final String OPEN_ORDER_RECEIPT = "open_order_receipt";
public static final String OPEN_ORDER_TRANSPORT_TYPE = "open_order_transport_type";
public static final String OPEN_ORDER_CHARGE_TYPE = "open_order_charge_type";
public static final String EDIT_WAYBILL_REASON_TYPE = "edit_waybill_reason_type";
/* 异常工单状态 */
public static final String PC_WORK_ORDER = "pc_work_order"; //PC工单异常类型

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -197,7 +197,7 @@ public class DistributionParcelListEntity extends TenantEntity {
* 运单ID
*/
@ApiModelProperty(value = "运单ID")
private String waybillId;
private Long waybillId;
/**
* 客户id
*/

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -16,6 +16,8 @@ public class OpenOrderDTO implements Serializable {
private String brand;//品牌
private String trainNumber;//客户车次号
private String waybillNo;//运单号
private String departure;//发站
private String departureCode;
private Long departureWarehouseId;//发站仓id
private String departureWarehouseName;//发站仓名称
private String destination;//到站
@ -26,6 +28,8 @@ public class OpenOrderDTO implements Serializable {
private List<Long> advanceIds;//暂存单ids
private String orderCode;//订单号
private String openOrderDate;//开单时间
private String dearCode;//商场编码
private String dearName;//商场名称
private Long shipperId;//发货单位id
private String shipper;//发货单位

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java

@ -90,6 +90,9 @@ public class TrunklineAdvanceDetailEntity extends TenantEntity {
/** 服务号 */
@ApiModelProperty(name = "服务号",notes = "")
private String serviceNum ;
/** 运单id */
@ApiModelProperty(name = "运单id",notes = "")
private Long waybillId ;
/** 运单号 */
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo ;

14
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/EditOrderMsgVO.java

@ -0,0 +1,14 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class EditOrderMsgVO implements Serializable {
private String itemName;
private String oldValue;
private String newValue;
}

65
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java

@ -0,0 +1,65 @@
package com.logpm.trunkline.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class LoadingDetailExportVO implements Serializable {
@ExcelProperty(value = "运单号")
private String waybillNo;
@ExcelProperty(value = "配载批次")
private String carsNo;
@ExcelProperty(value = "合同号")
private String orderCode;
@ExcelProperty(value = "包条码-产品名称")
private String scanCode;
@ExcelProperty(value = "装车人")
private String loadingUserName;
@ExcelProperty(value = "装车仓库")
private String warehouseNname;
@ExcelProperty(value = "计划目的仓库")
private String finalNodeName;
@ExcelProperty(value = "装卸状态")
private String scanStatus;
@ExcelProperty(value = "托盘名称")
private String trayName;
@ExcelProperty(value = "托盘码")
private String trayCode;
@ExcelProperty(value = "卸车仓库")
private String unloadNodeName;
@ExcelProperty(value = "卸车人")
private String unloadUserName;
@ExcelProperty(value = "类型")
private String type;
@ExcelProperty(value = "数量")
private String num;
@ExcelProperty(value = "有无数据")
private String isData;
@ExcelProperty(value = "是否装车异常")
private String loadingAbnormal;
@ExcelProperty(value = "是否卸车异常")
private String unloadAbnormal;
@ExcelProperty(value = "是否补录")
private String isSupple;
}

7
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java

@ -10,9 +10,12 @@ import java.util.List;
@Data
public class OpenOrderVO implements Serializable {
private Long brandId;
private String brand;
private String trainNumber;
private String orderCode;
private String dealerCode;
private String dealerName;
private List<Long> advanceIds = new ArrayList<>();
@ -22,6 +25,10 @@ public class OpenOrderVO implements Serializable {
private String destinationWarehouseName;//目的仓名称
private Long destinationWarehouseId;//目的仓Id
private String departure;//发站
private String departureCode;//发站编码
private List<String> departureArray;//发站
private String destination;//到站
private String destinationCode;//到站编码
private List<String> destinationArray;//到站

14
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -445,4 +445,18 @@ public class WarehouseWaybillEntity extends TenantEntity {
@ApiModelProperty(value = "成本件数")
private Integer costNum;
@ApiModelProperty(value = "发站")
private String departure;
@ApiModelProperty(value = "发站编码")
private String departureCode;
@ApiModelProperty(value = "商场编码")
private String dearCode;
@ApiModelProperty(value = "商场名称")
private String dearName;
}

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java

@ -39,4 +39,6 @@ public class WarehouseWaybillVO extends WarehouseWaybillEntity {
private Integer handleNum;
private Long waybillId;
}

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

@ -737,7 +737,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
Set<String> orderCodes = new TreeSet<>();
for (DistributionParcelListEntity parcelListEntity : listEntityList) {
Long packageWarehouseId = parcelListEntity.getWarehouseId();
parcelListEntity.setWaybillId(waybillId + "");
parcelListEntity.setWaybillId(waybillId);
parcelListEntity.setWaybillNumber(waybillNo);
parcelListEntity.setSendWarehouseId(departureWarehouseId);
parcelListEntity.setSendWarehouseName(departureWarehouseName);

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -235,7 +235,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.getListByOrderPackageCode(orderPackageCode);
for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) {
Long warehouseId = parcelListEntity.getWarehouseId();
parcelListEntity.setWaybillId(waybillId+"");
parcelListEntity.setWaybillId(waybillId);
parcelListEntity.setWaybillNumber(waybillNo);
parcelListEntity.setSendWarehouseId(departureWarehouseId);
parcelListEntity.setSendWarehouseName(departureWarehouseName);

18
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -7,6 +7,7 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.trunkline.dto.*;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import com.logpm.trunkline.vo.LoadingDetailExportVO;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import com.logpm.trunkline.vo.ZeroSuppleVO;
import io.swagger.annotations.Api;
@ -14,11 +15,14 @@ import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Enumeration;
import java.util.List;
@ -1189,6 +1193,20 @@ public class CarsLoadController {
}
}
@ResponseBody
@PostMapping("/loadingDetailExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "装车明细导出", notes = "传入loadCarsDTO")
public void loadingDetailExport(@RequestBody LoadCarsDTO loadCarsDTO, HttpServletResponse response) {
String method = "############loadingDetailExport: ";
log.info(method+"请求参数{}",loadCarsDTO);
List<LoadingDetailExportVO> ls = carsLoadService.loadingDetailExport(loadCarsDTO);
//导出ls
ExcelUtil.export(response, "未盘点任务数据" + DateUtil.time(), "未盘点任务数据数据表", ls, LoadingDetailExportVO.class);
}
@ResponseBody
@PostMapping("/carsLoadDetailInfo")
@ApiOperationSupport(order = 1)

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml

@ -170,7 +170,8 @@
<update id="updateWaybillNoByAdvanceId" >
update logpm_trunkline_advance_detail
set waybill_no = #{waybillNo}
set waybill_no = #{waybillNo},
waybill_id = #{waybillId}
where advance_id = #{advanceId}
</update>

17
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml

@ -84,7 +84,9 @@
<select id="selectInfoByIds" resultType="com.logpm.trunkline.vo.OpenOrderVO">
select GROUP_CONCAT(DISTINCT brand) brand,
GROUP_CONCAT(DISTINCT train_number) trainNumber,
GROUP_CONCAT(DISTINCT order_code) orderCode
GROUP_CONCAT(DISTINCT order_code) orderCode,
GROUP_CONCAT(DISTINCT dealer_code) dealerCode,
GROUP_CONCAT(DISTINCT dealer_name) dealerName
from logpm_trunkline_advance
where is_deleted = 0
and id in
@ -138,19 +140,22 @@
</update>
<select id="findIncomingOrderList" resultType="com.logpm.trunkline.vo.TrunklineAdvanceVO">
select lta.*
from logpm_trunkline_advance lta
select lta.*,
max(IF(ltad.package_status = '0',1,0)) isIncoming
from logpm_trunkline_advance_detail ltad
left join logpm_trunkline_advance lta on lta.id = ltad.advance_id
WHERE 1=1
and lta.warehouse_id = #{param.warehouseId}
and ltad.warehouse_id = #{param.warehouseId}
<if test="param.incomingType == 4" >
and lta.train_number = #{param.incomingCode}
and ltad.train_number = #{param.incomingCode}
</if>
<if test="param.incomingType == 5" >
and lta.order_code in
and ltad.order_code in
<foreach collection="param.orderCodes" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
group by lta.id
</select>
<select id="findAllNumByOrderCode" resultType="int">

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml

@ -30,7 +30,7 @@
count(DISTINCT ltbl.id) nodeNub,
count(DISTINCT ltbw.id) waybillCount
from logpm_trunkline_billlading ltb
left join logpm_trunkline_billlading_line ltbl on ltbl.billlading_id = ltb.id
left join logpm_trunkline_billlading_line ltbl on ltbl.billlading_id = ltb.id and ltbl.is_deleted = 0
left join logpm_trunkline_billlading_waybill ltbw on ltbw.billlading_id = ltb.id and ltbw.waybill_no != '————'
where ltb.is_deleted = 0
<if test="param.warehouseId != null ">
@ -85,7 +85,8 @@
<select id="findWaybillListNotBillladingId" resultType="com.logpm.warehouse.vo.WarehouseWaybillVO">
select lww.waybill_no waybillNo,
select lww.id waybillId,
lww.waybill_no waybillNo,
lww.create_time createTime,
lww.goods_name goodsName,
lww.destination destination,

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml

@ -48,6 +48,7 @@
left join logpm_trunkline_billlading ltb on ltb.id = ltbw.billlading_id
left join logpm_warehouse_waybill lww on lww.waybill_no = ltbw.waybill_no
where ltbw.billlading_id = #{billladingId}
and ltbw.is_deleted = 0
</select>
<update id="updateDataByBillladingWaybillId" >

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java

@ -17,6 +17,11 @@ import java.util.List;
@Mapper
public interface TrunklineCarsLoadMapper extends BaseMapper<TrunklineCarsLoadEntity> {
/**
* @param page
* @param loadCarsDTO
* @return
*/
IPage<TrunklineCarsLoadVO> loadCarsPageList(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);
IPage<TrunklineCarsLoadVO> arriveCarsPageList(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -41,6 +41,7 @@
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcl.id
where ltcl.is_deleted = 0
and ltcl.load_type != '4'
and ltcl.load_status != '100'
<if test="param.warehouseId != null" >
and ltcl.start_warehouse_id = #{param.warehouseId}
</if>
@ -375,6 +376,7 @@
</if>
<if test="param.type != null and param.type == 1">
and ltcl.load_status = '0'
and ltcl.load_status != '100'
</if>
<if test="param.type != null and param.type == 2">
and ltcl.load_status != '0'

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java

@ -126,4 +126,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
List<WaybillCarsLoadVO> findWaybillCarsLoadInfo(@Param("waybillId") Long waybillId);
List<WaybillCarsLoadVO> findWaybillTransferInfo(@Param("waybillId") Long waybillId);
List<LoadingDetailExportVO> loadingDetailExport(@Param("param") LoadCarsDTO loadCarsDTO);
}

34
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -583,10 +583,42 @@
ltcl.remark remark
from logpm_trunkline_cars_load_scan ltcls
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltcls.load_id
where ltcls.waybill_no = #{waybillNo}
where ltcls.waybill_id = #{waybillId}
and ltcl.load_type = 4
group by ltcl.cars_no
order By ltcl.start_time asc
</select>
<select id="loadingDetailExport" resultType="com.logpm.trunkline.vo.LoadingDetailExportVO">
select ltcls.tray_code trayCode,
ltcls.unload_node_name unloadNodeName,
ltcls.order_code orderCode,
ltcls.warehouse_name warehouseNname,
ltcls.unload_user_name unloadUserName,
IF(ltcls.unload_abnormal = 1,'是','否') unloadAbnormal,
IF(ltcls.is_supple = 1,'是','否') isSupple,
ltcls.cars_no carsNo,
ltcls.scan_code scanCode,
ltcls.final_node_name finalNodeName,
case ltcls.scan_status
when '1' then '装车'
when '2' then '卸车'
when '3' then '签收'
end scanStatus,
ltcls.tray_name trayName,
ltcls.num num,
IF(ltcls.is_data = 1,'有','无') isData,
ltcls.waybill_no waybillNo,
ltcls.loading_user_name loadingUserName,
case ltcls.type
when 1 then '订制品'
when 2 then '零担'
end type,
IF(ltcls.loading_abnormal = 1,'是','否') loadingAbnormal
from logpm_trunkline_cars_load_scan ltcls
where ltcls.load_id = #{param.loadId}
order by ltcls.create_time asc
</select>
</mapper>

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java

@ -122,4 +122,5 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
List<WaybillCarsLoadVO> findWaybillTransferInfo(Long waybillId);
List<LoadingDetailExportVO> loadingDetailExport(LoadCarsDTO loadCarsDTO);
}

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -5,6 +5,7 @@ import com.logpm.trunkline.dto.BatchUnloadDTO;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.dto.TrunklineCarsLoadDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.vo.LoadingDetailExportVO;
import com.logpm.trunkline.vo.TripartiteTransferVO;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import org.springblade.core.mp.base.BaseService;
@ -205,4 +206,5 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
R findWaybillTransferInfo(Long waybillId);
List<LoadingDetailExportVO> loadingDetailExport(LoadCarsDTO loadCarsDTO);
}

18
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -146,15 +146,15 @@ public class InComingServiceImpl implements IInComingService {
}
List<TrunklineAdvanceVO> ls = advanceService.findIncomingOrderList(inComingDTO);
for (TrunklineAdvanceVO advanceVO : ls) {
Long advanceId = advanceVO.getId();
Integer num = advanceDetailService.findListByAdvanceIdAndPackageStatus(advanceId,"0");
if(num > 0){
advanceVO.setIsIncoming(1);
}else{
advanceVO.setIsIncoming(0);
}
}
// for (TrunklineAdvanceVO advanceVO : ls) {
// Long advanceId = advanceVO.getId();
// Integer num = advanceDetailService.findListByAdvanceIdAndPackageStatus(advanceId,"0");
// if(num > 0){
// advanceVO.setIsIncoming(1);
// }else{
// advanceVO.setIsIncoming(0);
// }
// }
return R.data(ls);
}

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -94,9 +94,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
page.setCurrent(advanceDTO.getPageNum());
page.setSize(advanceDTO.getPageSize());
IPage<TrunklineAdvanceVO> pageList = advanceService.advancePageList(page, advanceDTO);
return pageList;
return advanceService.advancePageList(page, advanceDTO);
}
@Override
@ -139,6 +137,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
OpenOrderVO infoByIds = advanceService.selectInfoByIds(advanceIds);
BeanUtil.copy(infoByIds, openOrderVO);
openOrderVO.setAdvanceIds(advanceIds);
BasicdataBrandEntity basicdataBrandEntity = basicdataBrandClient.findEntityByName(brand);
if(!Objects.isNull(basicdataBrandEntity)){
openOrderVO.setBrandId(basicdataBrandEntity.getId());
}
//发站仓-----目前登录人的仓库
openOrderVO.setDepartureWarehouseName(basicdataWarehouseEntity.getName());
openOrderVO.setDepartureWarehouseId(warehouseId);
@ -303,13 +305,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long destinationWarehouseId = openOrderDTO.getDestinationWarehouseId();
String brand = openOrderDTO.getBrand();
BasicdataBrandEntity basicdataBrandEntity = basicdataBrandClient.findEntityByName(brand);
Long brandId = openOrderDTO.getBrandId();
// BasicdataBrandEntity basicdataBrandEntity = basicdataBrandClient.findEntityByName(brand);
WarehouseWaybillEntity waybillEntity = new WarehouseWaybillEntity();
waybillEntity.setWaybillNo(waybillNo);
if (!Objects.isNull(basicdataBrandEntity)) {
waybillEntity.setBrandId(basicdataBrandEntity.getId());
}
// if (!Objects.isNull(basicdataBrandEntity)) {
// waybillEntity.setBrandId(basicdataBrandEntity.getId());
// }
waybillEntity.setBrandId(brandId);
waybillEntity.setBrand(brand);
waybillEntity.setOrderNo(openOrderDTO.getOrderCode());
waybillEntity.setDepartureWarehouseId(departureWarehouseId);
@ -526,7 +531,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
//判断是否是开单及入库的配置
Boolean aBoolean = basicdataOpenIncomingClient.checkOpenIncoming(warehouseId, basicdataBrandEntity.getId());
Boolean aBoolean = basicdataOpenIncomingClient.checkOpenIncoming(warehouseId, brandId);
if (aBoolean) {
openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode());
}
@ -2823,7 +2828,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
entity.setOrderPackageStockupStatus("10");
entity.setOrderPackageReservationStatus("10");
entity.setOrderPackageLoadingStatus("10");
entity.setWaybillId(warehouseWaybill.getId() + "");
entity.setWaybillId(warehouseWaybill.getId());
entity.setWaybillNumber(warehouseWaybill.getWaybillNo());
entity.setIsZero("1");
entity.setWarehouseEntryTimeEnd(date);

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -227,7 +227,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if(StringUtil.isNotBlank(waybillNo)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(!Objects.isNull(waybillEntity)){
parcelList.setWaybillId(waybillEntity.getId()+"");
parcelList.setWaybillId(waybillEntity.getId());
parcelList.setWaybillNumber(waybillEntity.getWaybillNo());
parcelList.setSendWarehouseId(waybillEntity.getDepartureWarehouseId());
parcelList.setSendWarehouseName(waybillEntity.getDepartureWarehouseName());
@ -551,7 +551,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if(StringUtil.isNotBlank(waybillNo)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(!Objects.isNull(waybillEntity)){
parcelList.setWaybillId(waybillEntity.getId()+"");
parcelList.setWaybillId(waybillEntity.getId());
parcelList.setWaybillNumber(waybillEntity.getWaybillNo());
parcelList.setSendWarehouseId(waybillEntity.getDepartureWarehouseId());
parcelList.setSendWarehouseName(waybillEntity.getDepartureWarehouseName());

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

@ -1,5 +1,6 @@
package com.logpm.trunkline.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -56,9 +57,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
page.setCurrent(billladingDTO.getPageNum());
page.setSize(billladingDTO.getPageSize());
IPage<TrunklineBillladingVO> pageList = baseMapper.pageList(page,billladingDTO);
return pageList;
return baseMapper.pageList(page,billladingDTO);
}
@Override
@ -124,7 +123,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setContent("创建提货单 billladingCode="+billladingCode);
logEntity.setBillladingId(billladingId);
logEntity.setAfterOpreation(JSONObject.toJSONString(trunklineBillladingEntity));
logEntity.setAfterOpreation(JSON.toJSONString(trunklineBillladingEntity));
trunklineBillladingLogService.save(logEntity);
}
@ -138,9 +137,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
billladingDTO.setBillladingStatus("2");
IPage<TrunklineBillladingVO> pageList = baseMapper.pageInfoList(page,billladingDTO);
return pageList;
return baseMapper.pageInfoList(page,billladingDTO);
}
@Override
@ -168,7 +165,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setContent("修改提货单 billladingCode="+billladingCode);
logEntity.setBillladingId(billladingId);
logEntity.setBeforeOpreation(JSONObject.toJSONString(billladingEntity));
logEntity.setBeforeOpreation(JSON.toJSONString(billladingEntity));
BeanUtil.copy(billladingDTO,billladingEntity);
updateById(billladingEntity);
@ -189,10 +186,11 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
}
TrunklineBillladingLineEntity billladingLineEntity = new TrunklineBillladingLineEntity();
BeanUtil.copy(billladingLineVO,billladingLineEntity);
billladingLineEntity.setId(null);
billladingLineEntity.setBillladingId(billladingId);
billladingLineEntity.setWarehouseId(warehouseId);
billladingLineEntity.setWarehouseName(warehouseName);
billladingLineService.saveOrUpdate(billladingLineEntity);
billladingLineService.save(billladingLineEntity);
}
billladingEntity.setLineNameTitle(lineTitle);
updateById(billladingEntity);
@ -221,7 +219,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
}
}
logEntity.setAfterOpreation(JSONObject.toJSONString(billladingEntity));
logEntity.setAfterOpreation(JSON.toJSONString(billladingEntity));
trunklineBillladingLogService.save(logEntity);
}
@ -231,94 +229,101 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
log.info("#############updateBillladingStatus: 更新提货单状态 type={}",type);
TrunklineBillladingEntity billladingEntity = baseMapper.selectById(billladingId);
if(Objects.isNull(billladingEntity)){
log.warn("##################updateBillladingStatus: 提货单不存在 billladingId={}",billladingId);
throw new CustomerException(405,"提货单不存在");
}
String billladingCode = billladingEntity.getBillladingCode();
StringBuilder stringBuffer = new StringBuilder();
TrunklineBillladingLogEntity logEntity = new TrunklineBillladingLogEntity();
logEntity.setWarehouseId(warehouseId);
logEntity.setWarehouseName(warehouseName);
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setBillladingId(billladingId);
logEntity.setBeforeOpreation(JSONObject.toJSONString(billladingEntity));
stringBuffer.append("变更提货单状态 billladingCode=").append(billladingCode);
String billladingStatus = billladingEntity.getBillladingStatus();
//提货单状态 1=未开始,2=提货中,3=已完成,4=已结算 5=已取消
switch (type){
case 1://开始提货
if("1".equals(billladingStatus)){
billladingEntity.setBillladingStatus("2");
billladingEntity.setStartTime(new Date());
stringBuffer.append(",未开始变更为提货中");
}else{
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}",billladingStatus);
throw new CustomerException(405,"提货单不能更新为提货中");
}
break;
case 2://提货完成
if("2".equals(billladingStatus)){
billladingEntity.setBillladingStatus("3");
billladingEntity.setEndTime(new Date());
stringBuffer.append(",提货中变更为提货完成");
}else{
log.warn("##################updateBillladingStatus: 提货单不能更新为已完成 billladingStatus={}",billladingStatus);
throw new CustomerException(405,"提货单不能更新为已完成");
}
break;
case 3://取消完成
if("3".equals(billladingStatus)){
billladingEntity.setBillladingStatus("2");
billladingEntity.setEndTime(null);
stringBuffer.append(",提货完成变更为提货中");
}else{
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}",billladingStatus);
throw new CustomerException(405,"提货单不能更新为提货中");
}
break;
case 4://结算
if("3".equals(billladingStatus)){
Date date = new Date();
billladingEntity.setBillladingStatus("4");
billladingEntity.setSettlementTime(date);
billladingEntity.setSettlementId(AuthUtil.getUserId());
billladingEntity.setSettlementName(AuthUtil.getUserName());
stringBuffer.append(",提货完成变更为已结算,时间"+ CommonUtil.dateToString(date)+",变更人"+AuthUtil.getUserName());
}else{
log.warn("##################updateBillladingStatus: 提货单不能更新为已结算 billladingStatus={}",billladingStatus);
throw new CustomerException(405,"提货单不能更新为提货中");
}
break;
case 5://取消结算
if("4".equals(billladingStatus)){
billladingEntity.setBillladingStatus("3");
billladingEntity.setSettlementTime(null);
billladingEntity.setSettlementId(null);
billladingEntity.setSettlementName(null);
stringBuffer.append(",已结算变更为提货完成,时间"+ CommonUtil.dateToString(new Date())+",变更人"+AuthUtil.getUserName());
}else{
log.warn("##################updateBillladingStatus: 提货单不能更新为提货完成 billladingStatus={}",billladingStatus);
throw new CustomerException(405,"提货单不能更新为提货完成");
}
break;
case 6://取消提货
billladingEntity.setBillladingStatus("5");
stringBuffer.append(",变更为取消提货,时间"+ CommonUtil.dateToString(new Date())+",变更人"+AuthUtil.getUserName());
break;
default:
log.warn("#############updateBillladingStatus: 未知的更新操作");
throw new CustomerException(405,"未知的更新操作");
if (!Objects.isNull(billladingEntity)) {
String billladingCode = billladingEntity.getBillladingCode();
StringBuilder stringBuffer = new StringBuilder();
TrunklineBillladingLogEntity logEntity = new TrunklineBillladingLogEntity();
logEntity.setWarehouseId(warehouseId);
logEntity.setWarehouseName(warehouseName);
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setBillladingId(billladingId);
logEntity.setBeforeOpreation(JSON.toJSONString(billladingEntity));
stringBuffer.append("变更提货单状态 billladingCode=").append(billladingCode);
String billladingStatus = billladingEntity.getBillladingStatus();
//提货单状态 1=未开始,2=提货中,3=已完成,4=已结算 5=已取消
switch (type) {
case 1:
//开始提货
if ("1".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("2");
billladingEntity.setStartTime(new Date());
stringBuffer.append(",未开始变更为提货中");
} else {
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus);
throw new CustomerException(405, "提货单不能更新为提货中");
}
break;
case 2:
//提货完成
if ("2".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("3");
billladingEntity.setEndTime(new Date());
stringBuffer.append(",提货中变更为提货完成");
} else {
log.warn("##################updateBillladingStatus: 提货单不能更新为已完成 billladingStatus={}", billladingStatus);
throw new CustomerException(405, "提货单不能更新为已完成");
}
break;
case 3:
//取消完成
if ("3".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("2");
billladingEntity.setEndTime(null);
stringBuffer.append(",提货完成变更为提货中");
} else {
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus);
throw new CustomerException(405, "提货单不能更新为提货中");
}
break;
case 4:
//结算
if ("3".equals(billladingStatus)) {
Date date = new Date();
billladingEntity.setBillladingStatus("4");
billladingEntity.setSettlementTime(date);
billladingEntity.setSettlementId(AuthUtil.getUserId());
billladingEntity.setSettlementName(AuthUtil.getUserName());
stringBuffer.append(",提货完成变更为已结算,时间").append(CommonUtil.dateToString(date)).append(",变更人").append(AuthUtil.getUserName());
} else {
log.warn("##################updateBillladingStatus: 提货单不能更新为已结算 billladingStatus={}", billladingStatus);
throw new CustomerException(405, "提货单不能更新为提货中");
}
break;
case 5:
//取消结算
if ("4".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("3");
billladingEntity.setSettlementTime(null);
billladingEntity.setSettlementId(null);
billladingEntity.setSettlementName(null);
stringBuffer.append(",已结算变更为提货完成,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getUserName());
} else {
log.warn("##################updateBillladingStatus: 提货单不能更新为提货完成 billladingStatus={}", billladingStatus);
throw new CustomerException(405, "提货单不能更新为提货完成");
}
break;
case 6:
//取消提货
billladingEntity.setBillladingStatus("5");
stringBuffer.append(",变更为取消提货,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getUserName());
break;
default:
log.warn("#############updateBillladingStatus: 未知的更新操作");
throw new CustomerException(405, "未知的更新操作");
}
//更新状态
updateById(billladingEntity);
logEntity.setContent(stringBuffer.toString());
logEntity.setAfterOpreation(JSON.toJSONString(billladingEntity));
trunklineBillladingLogService.save(logEntity);
} else {
log.warn("##################updateBillladingStatus: 提货单不存在 billladingId={}", billladingId);
throw new CustomerException(405, "提货单不存在");
}
//更新状态
updateById(billladingEntity);
logEntity.setContent(stringBuffer.toString());
logEntity.setAfterOpreation(JSONObject.toJSONString(billladingEntity));
trunklineBillladingLogService.save(logEntity);
}
@Override
@ -548,15 +553,9 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
@Override
public List<TrunklineBillladingDetailListVO> findAdvanceDetailList(BillladingDTO billladingDTO) {
// Integer pageNum = billladingDTO.getPageNum();
// Integer pageSize = billladingDTO.getPageSize();
String orderCode = billladingDTO.getOrderCode();
// IPage<Object> page = new Page<>();
// page.setCurrent(pageNum);
// page.setSize(pageSize);
List<TrunklineBillladingDetailListVO> ls = baseMapper.findAdvanceDetailList(orderCode);
String orderCode = billladingDTO.getOrderCode();
return ls;
return baseMapper.findAdvanceDetailList(orderCode);
}
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java

@ -31,7 +31,8 @@ public class TrunklineCarsLoadLineServiceImpl extends BaseServiceImpl<TrunklineC
public TrunklineCarsLoadLineEntity findEntityByLoadIdAndNodeId(Long loadId, Long nodeId) {
QueryWrapper<TrunklineCarsLoadLineEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("load_id",loadId)
.eq("node_id",nodeId);
.eq("node_id",nodeId)
.eq("is_deleted",0);
return baseMapper.selectOne(queryWrapper);
}

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

@ -298,4 +298,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
return baseMapper.findWaybillTransferInfo(waybillId);
}
@Override
public List<LoadingDetailExportVO> loadingDetailExport(LoadCarsDTO loadCarsDTO) {
return baseMapper.loadingDetailExport(loadCarsDTO);
}
}

148
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -29,73 +29,11 @@ import com.logpm.factorydata.enums.BrandEnums;
import com.logpm.factorydata.util.FactoryDataMessageSender;
import com.logpm.factorydata.vo.NodePushMsg;
import com.logpm.trunkline.bean.Resp;
import com.logpm.trunkline.dto.BatchUnloadDTO;
import com.logpm.trunkline.dto.InComingDTO;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.dto.LoadScanBrandDTO;
import com.logpm.trunkline.dto.LoadingPackageDTO;
import com.logpm.trunkline.dto.LoadingZeroDTO;
import com.logpm.trunkline.dto.ProductInfoDTO;
import com.logpm.trunkline.dto.TrunklineCarsLoadDTO;
import com.logpm.trunkline.dto.TrunklineCarsLoadLineDTO;
import com.logpm.trunkline.dto.TrunklineCarsOrderDTO;
import com.logpm.trunkline.dto.UnloadPackageDTO;
import com.logpm.trunkline.dto.UnloadZeroDTO;
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadContractEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadFinanceEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadLogEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.entity.TrunklineCostShareRecordEntity;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.entity.TrunklineLoadSignPhotoEntity;
import com.logpm.trunkline.dto.*;
import com.logpm.trunkline.entity.*;
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.ICarsLoadAsyncService;
import com.logpm.trunkline.service.IInComingService;
import com.logpm.trunkline.service.IOpenOrderAsyncService;
import com.logpm.trunkline.service.IPackageTrackLogAsyncService;
import com.logpm.trunkline.service.ITrunklineAdvanceDetailService;
import com.logpm.trunkline.service.ITrunklineCarsLoadContractService;
import com.logpm.trunkline.service.ITrunklineCarsLoadFinanceService;
import com.logpm.trunkline.service.ITrunklineCarsLoadLineService;
import com.logpm.trunkline.service.ITrunklineCarsLoadLogService;
import com.logpm.trunkline.service.ITrunklineCarsLoadScanService;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import com.logpm.trunkline.service.ITrunklineCarsLoadingLogService;
import com.logpm.trunkline.service.ITrunklineCarsOrderService;
import com.logpm.trunkline.service.ITrunklineCarsSignLogService;
import com.logpm.trunkline.service.ITrunklineCarsUnloadLogService;
import com.logpm.trunkline.service.ITrunklineCostShareRecordService;
import com.logpm.trunkline.service.ITrunklineLoadSignOrderService;
import com.logpm.trunkline.service.ITrunklineLoadSignPhotoService;
import com.logpm.trunkline.service.ITrunklineWaybillOrderService;
import com.logpm.trunkline.vo.CarsLoadAllOrderVO;
import com.logpm.trunkline.vo.CarsLoadOrderInfoVO;
import com.logpm.trunkline.vo.CarsLoadWaybillInfoVO;
import com.logpm.trunkline.vo.HasNotFinalNodeIdDataVO;
import com.logpm.trunkline.vo.LoadScanFinalNodeIdVO;
import com.logpm.trunkline.vo.LoadScanOrderVO;
import com.logpm.trunkline.vo.LoadZeroListVO;
import com.logpm.trunkline.vo.LoadingListGoodsVO;
import com.logpm.trunkline.vo.LoadingListMainVO;
import com.logpm.trunkline.vo.NodeNumDataVO;
import com.logpm.trunkline.vo.OrderScanDetailVO;
import com.logpm.trunkline.vo.SignOrderDetailVO;
import com.logpm.trunkline.vo.SignPackageVO;
import com.logpm.trunkline.vo.SignScanOrderVO;
import com.logpm.trunkline.vo.TripartiteTransferVO;
import com.logpm.trunkline.vo.TrunklineCarsLoadLoadingListVO;
import com.logpm.trunkline.vo.TrunklineCarsLoadScanVO;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO;
import com.logpm.trunkline.vo.UnloadPackageVO;
import com.logpm.trunkline.vo.UnloadScanOrderVO;
import com.logpm.trunkline.vo.UnloadZeroVO;
import com.logpm.trunkline.vo.WaybillCarsLoadVO;
import com.logpm.trunkline.vo.ZeroSuppleVO;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*;
import com.logpm.warehouse.entity.WarehouseWayBillDetail;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
@ -105,11 +43,7 @@ import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringEscapeUtils;
import org.springblade.common.constant.CodeNumConstant;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.IncomingTypeEnum;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.constant.WorkNodeEnums;
import org.springblade.common.constant.*;
import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
@ -128,14 +62,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Service
@ -186,15 +114,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
IPage<TrunklineCarsLoadVO> pageList = baseMapper.loadCarsPageList(page, loadCarsDTO);
List<TrunklineCarsLoadVO> records = pageList.getRecords();
for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) {
//把records中的id封装成一个set
Set<Long> idsSet = records.stream()
.map(TrunklineCarsLoadVO::getId) // Assuming getId() method returns the id as an Integer
.collect(Collectors.toSet());
//判空idsSet
if (idsSet.isEmpty()) {
return pageList;
}
//使用trunklineCarsLoadLineService通过idsSet关联loadId批量查询TrunklineCarsLoadLineEntity集合
List<TrunklineCarsLoadLineEntity> loadLineList = trunklineCarsLoadLineService.list(new QueryWrapper<TrunklineCarsLoadLineEntity>().in("load_id", idsSet));
//把loadLineList中对象通过loadId分组
Map<Long, List<TrunklineCarsLoadLineEntity>> loadLineMap = loadLineList.stream()
.collect(Collectors.groupingBy(TrunklineCarsLoadLineEntity::getLoadId));
records.forEach(trunklineCarsLoadVO -> {
Long loadId = trunklineCarsLoadVO.getId();
QueryWrapper<TrunklineCarsLoadLineEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_deleted", 0)
.eq("load_id", loadId)
.orderByAsc("sort");
List<TrunklineCarsLoadLineEntity> list = trunklineCarsLoadLineService.list(queryWrapper);
List<TrunklineCarsLoadLineEntity> list = loadLineMap.get(loadId);
trunklineCarsLoadVO.setCarsLoadLineList(list);
}
});
pageList.setRecords(records);
return pageList;
}
@ -207,15 +144,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
IPage<TrunklineCarsLoadVO> pageList = baseMapper.arriveCarsPageList(page, loadCarsDTO);
List<TrunklineCarsLoadVO> records = pageList.getRecords();
for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) {
//把records中的id封装成一个set
Set<Long> idsSet = records.stream()
.map(TrunklineCarsLoadVO::getId) // Assuming getId() method returns the id as an Integer
.collect(Collectors.toSet());
//判空idsSet
if (idsSet.isEmpty()) {
return pageList;
}
//使用trunklineCarsLoadLineService通过idsSet关联loadId批量查询TrunklineCarsLoadLineEntity集合
List<TrunklineCarsLoadLineEntity> loadLineList = trunklineCarsLoadLineService.list(new QueryWrapper<TrunklineCarsLoadLineEntity>().in("load_id", idsSet));
//把loadLineList中对象通过loadId分组
Map<Long, List<TrunklineCarsLoadLineEntity>> loadLineMap = loadLineList.stream()
.collect(Collectors.groupingBy(TrunklineCarsLoadLineEntity::getLoadId));
records.forEach(trunklineCarsLoadVO -> {
Long loadId = trunklineCarsLoadVO.getId();
QueryWrapper<TrunklineCarsLoadLineEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_deleted", 0)
.eq("load_id", loadId)
.orderByAsc("sort");
List<TrunklineCarsLoadLineEntity> list = trunklineCarsLoadLineService.list(queryWrapper);
List<TrunklineCarsLoadLineEntity> list = loadLineMap.get(loadId);
trunklineCarsLoadVO.setCarsLoadLineList(list);
}
});
pageList.setRecords(records);
return pageList;
}
@ -786,7 +732,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//逻辑删除装车扫描表的数据
List<Long> carsLoadScanIdList = trunklineCarsLoadScanService.findAllIdListByLoadId(loadId);
removeCarsLoadScan(StringUtil.join(carsLoadScanIdList, ","), warehouseId);
//通过loadId更新carsOrder关联表中的所有订单startNum为0
trunklineCarsOrderService.updateStartNumByLoadIdAndWarehouseId(loadId, warehouseId);
if(CollUtil.isNotEmpty(carsLoadScanIdList)){
removeCarsLoadScan(StringUtil.join(carsLoadScanIdList, ","), warehouseId);
}
try {
trunklineCarsLoadLogService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.CANCEL_CARS_LOAD.getValue());
@ -2057,6 +2008,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
IPage<TrunklineCarsLoadScanEntity> pageList = trunklineCarsLoadScanService.loadingDetail(page, loadCarsDTO);
trunklineCarsLoadScanService.
return R.data(pageList);
}
@ -2154,6 +2107,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} else {
carsLoadScanEntity.setOrderCode(trunklineAdvanceDetailEntity.getOrderCode());
carsLoadScanEntity.setWaybillNo(trunklineAdvanceDetailEntity.getWaybillNo());
carsLoadScanEntity.setWaybillId(trunklineAdvanceDetailEntity.getWaybillId());
carsLoadScanEntity.setIsData(1);
String packageStatus = trunklineAdvanceDetailEntity.getPackageStatus();
if ("0".equals(packageStatus)) {
@ -2512,6 +2466,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
IPage<TrunklineCarsLoadVO> pageList = baseMapper.carsLoadPageList(page, loadCarsDTO);
List<TrunklineCarsLoadVO> records = pageList.getRecords();
//循环records,获取字典值
for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) {
String loadStatus = trunklineCarsLoadVO.getLoadStatus();
String value = DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus);
@ -4478,6 +4433,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.data(list);
}
@Override
public List<LoadingDetailExportVO> loadingDetailExport(LoadCarsDTO loadCarsDTO) {
return trunklineCarsLoadScanService.loadingDetailExport(loadCarsDTO);
}
@Override
public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) {
log.info("##############loadingTrayInfo: 查询托盘的货物信息");

72
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java

@ -99,7 +99,7 @@ public class WarehouseTrayTypeApiController {
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
@ -146,11 +146,11 @@ public class WarehouseTrayTypeApiController {
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(orderCode)){
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单编号不能为空 orderCode={}",orderCode);
return R.fail(403,"订单编号不能为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"订单编号不能为空 trayCode={}",trayCode);
return R.fail(403,"订单编号不能为空");
}
@ -181,15 +181,15 @@ public class WarehouseTrayTypeApiController {
String trayCode = trayTypeDTO.getTrayCode();
String orderPackageCode = trayTypeDTO.getOrderPackageCode();//包条码
if(!StringUtil.hasLength(trayType)){
if(StringUtil.isBlank(trayType)){
log.warn(method+"打托方式不能为空 trayType={}",trayType);
return R.fail(403,"打托方式不能为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
if(!StringUtil.hasLength(orderPackageCode)){
if(StringUtil.isBlank(orderPackageCode)){
log.warn(method+"包条码不能为空 orderPackageCode={}",orderPackageCode);
return R.fail(403,"包条码不能为空");
}
@ -223,11 +223,11 @@ public class WarehouseTrayTypeApiController {
List<String> orderPackageCodes = trayTypeDTO.getOrderPackageCodes();
String trayCode = trayTypeDTO.getTrayCode();//托盘码
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
if(Objects.isNull(orderPackageCodes)||orderPackageCodes.size() == 0){
if(Objects.isNull(orderPackageCodes)||orderPackageCodes.isEmpty()){
log.warn(method+"包条码不能为空 orderPackageCodes={}",orderPackageCodes);
return R.fail(403,"包条码不能为空");
}
@ -262,11 +262,11 @@ public class WarehouseTrayTypeApiController {
String orderCode = trayTypeDTO.getOrderCode();
String trayCode = trayTypeDTO.getTrayCode();//托盘码
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
if(!StringUtil.hasLength(orderCode)){
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单号不能为空 orderCode={}",orderCode);
return R.fail(403,"订单号不能为空");
}
@ -345,7 +345,7 @@ public class WarehouseTrayTypeApiController {
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
@ -388,7 +388,7 @@ public class WarehouseTrayTypeApiController {
log.warn(method+"仓库信息不能为空");
return R.fail(403,"仓库信息不能为空");
}
if(!StringUtil.hasLength(waybillCode)){
if(StringUtil.isBlank(waybillCode)){
log.warn(method+"运单号不能为空 waybillCode={}",waybillCode);
return R.fail(403,"运单号不能为空");
}
@ -420,11 +420,11 @@ public class WarehouseTrayTypeApiController {
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘号不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘号不能为空");
}
if(!StringUtil.hasLength(trayType)){
if(StringUtil.isBlank(trayType)){
log.warn(method+"打托方式不能为空 trayCode={}",trayCode);
return R.fail(403,"打托方式不能为空");
}
@ -455,11 +455,11 @@ public class WarehouseTrayTypeApiController {
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘号不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘号不能为空");
}
if(!StringUtil.hasLength(orderCode)){
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单不能为空 trayCode={}",trayCode);
return R.fail(403,"打托方式不能为空");
}
@ -480,9 +480,12 @@ public class WarehouseTrayTypeApiController {
public R updateZeroOrderNumByTrayCode(@RequestBody TrayTypeDTO trayTypeDTO) {
String method = "###########updateZeroOrderNumByTrayCode: ";
log.info(method + "更新零担订单数量 trayTypeDTO={}", trayTypeDTO);
String orderCode = trayTypeDTO.getOrderCode();//订单自编码
String trayCode = trayTypeDTO.getTrayCode();//托盘码
Integer num = trayTypeDTO.getNum();//数量
//订单自编码
String orderCode = trayTypeDTO.getOrderCode();
//托盘码
String trayCode = trayTypeDTO.getTrayCode();
//数量
Integer num = trayTypeDTO.getNum();
try{
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
@ -490,11 +493,11 @@ public class WarehouseTrayTypeApiController {
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘号不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘号不能为空");
}
if(!StringUtil.hasLength(orderCode)){
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单不能为空 orderCode={}",orderCode);
return R.fail(403,"订单不能为空");
}
@ -524,10 +527,11 @@ public class WarehouseTrayTypeApiController {
public R zeroOrderUpdateRemark(@RequestBody TrayTypeDTO trayTypeDTO) {
String method = "###########updateZeroOrderNumByTrayCode: ";
log.info(method + "更新零担订单数量 trayTypeDTO={}", trayTypeDTO);
String trayCode = trayTypeDTO.getTrayCode();//托盘码
//托盘码
String trayCode = trayTypeDTO.getTrayCode();
String remark = trayTypeDTO.getRemark();
try{
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘号不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘号不能为空");
}
@ -597,7 +601,7 @@ public class WarehouseTrayTypeApiController {
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
@ -644,15 +648,15 @@ public class WarehouseTrayTypeApiController {
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
if(!StringUtil.hasLength(trayType)){
if(StringUtil.isBlank(trayType)){
log.warn(method+"打托方式不能为空 trayType={}",trayType);
return R.fail(403,"打托方式不能为空");
}
if(!StringUtil.hasLength(orderPackageCode)){
if(StringUtil.isBlank(orderPackageCode)){
log.warn(method+"包条码不能为空 orderPackageCode={}",orderPackageCode);
return R.fail(403,"包条码不能为空");
}
@ -777,7 +781,7 @@ public class WarehouseTrayTypeApiController {
return R.fail(403,"仓库信息为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
@ -827,7 +831,7 @@ public class WarehouseTrayTypeApiController {
log.warn(method+"商场id不能为空 marketId={}",marketId);
return R.fail(403,"商场id不能为空");
}
if(!StringUtil.hasLength(materialCode)){
if(StringUtil.isBlank(materialCode)){
log.warn(method+"物料编码不能为空 materialCode={}",materialCode);
return R.fail(403,"物料编码不能为空");
}
@ -863,7 +867,7 @@ public class WarehouseTrayTypeApiController {
log.warn(method+"商场id不能为空 marketId={}",marketId);
return R.fail(403,"商场id不能为空");
}
if(!StringUtil.hasLength(materialName)){
if(StringUtil.isBlank(materialName)){
log.warn(method+"物料名称不能为空 materialCode={}",materialName);
return R.fail(403,"物料名称不能为空");
}
@ -898,19 +902,19 @@ public class WarehouseTrayTypeApiController {
return R.fail(403,"仓库信息不能为空");
}
if(!StringUtil.hasLength(trayCode)){
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
if(!StringUtil.hasLength(trayType)){
if(StringUtil.isBlank(trayType)){
log.warn(method+"打托方式不能为空 trayType={}",trayType);
return R.fail(403,"打托方式不能为空");
}
if(!StringUtil.hasLength(materialCode)){
if(StringUtil.isBlank(materialCode)){
log.warn(method+"物料编码不能为空 materialCode={}",materialCode);
return R.fail(403,"物料编码不能为空");
}
if(!StringUtil.hasLength(incomingBatch)){
if(StringUtil.isBlank(incomingBatch)){
log.warn(method+"批次号不能为空 incomingBatch={}",incomingBatch);
return R.fail(403,"批次号不能为空");
}

Loading…
Cancel
Save