Browse Source

1.干线bug修复

master
zhenghaoyu 11 months ago
parent
commit
72e4f93d37
  1. 10
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java
  2. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/IncomingController.java
  3. 26
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  4. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IInComingService.java
  5. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java
  6. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceService.java
  7. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  8. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java
  9. 274
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  10. 49
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java
  11. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  12. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java
  13. 11
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  14. 93
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

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

@ -1,9 +1,11 @@
package com.logpm.trunkline.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class LoadingDetailExportVO implements Serializable {
@ -62,4 +64,12 @@ public class LoadingDetailExportVO implements Serializable {
@ExcelProperty(value = "是否补录")
private String isSupple;
@ExcelProperty(value = "装车时间")
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date loadingTime;
@ExcelProperty(value = "卸车时间")
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date unloadTime;
}

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

@ -90,7 +90,7 @@ public class IncomingController {
}
return inComingService.incomingBatchOrder(inComingDTO);
return inComingService.incomingBatchOrder(inComingDTO,null);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

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

@ -656,15 +656,12 @@
</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,
select ltcls.waybill_no waybillNo,
ltcls.load_code carsNo,
ltcls.order_code orderCode,
ltcls.scan_code scanCode,
ltcls.loading_user_name loadingUserName,
ltcls.warehouse_name warehouseNname,
ltcls.final_node_name finalNodeName,
case ltcls.scan_status
when '1' then '装车'
@ -672,15 +669,20 @@
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,
ltcls.tray_code trayCode,
ltcls.unload_node_name unloadNodeName,
ltcls.unload_user_name unloadUserName,
case ltcls.type
when 1 then '订制品'
when 2 then '零担'
end type,
IF(ltcls.loading_abnormal = 1,'是','否') loadingAbnormal
ltcls.num num,
IF(ltcls.is_data = 1,'有','无') isData,
IF(ltcls.loading_abnormal = 1,'是','否') loadingAbnormal,
IF(ltcls.unload_abnormal = 1,'是','否') unloadAbnormal,
IF(ltcls.is_supple = 1,'是','否') isSupple,
ltcls.create_time loadingTime,
ltcls.unload_time unloadTime
from logpm_trunkline_cars_load_scan ltcls
where ltcls.load_id = #{param.loadId}
order by ltcls.create_time asc

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

@ -1,6 +1,7 @@
package com.logpm.trunkline.service;
import com.logpm.trunkline.dto.InComingDTO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import org.springblade.core.tool.api.R;
public interface IInComingService {
@ -9,6 +10,6 @@ public interface IInComingService {
R findIncomingOrderList(InComingDTO inComingDTO);
R incomingBatchOrder(InComingDTO inComingDTO);
R incomingBatchOrder(InComingDTO inComingDTO, WarehouseWaybillEntity waybillEntity);
}

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

@ -18,7 +18,7 @@ public interface IOpenOrderAsyncService {
void saveUnloadStartCarLog(TrunklineCarsLoadLineEntity currentCarsLoadLineEntity, String nickName,Long userId);
void incomingPackageBatch(List<Long> advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId,String warehouseName);
void incomingPackageBatch(List<Long> advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId,String warehouseName,WarehouseWaybillEntity waybillEntity);
void saveUpdateLog(Long waybillId, String waybillNo, String trackType, String refer, String operationRemark, String nickName, Long userId, Long warehouseId, String warehouseName, WarehouseWaybillEntity waybillEntity);
}

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

@ -8,6 +8,7 @@ import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.vo.CustomerInfoVO;
import com.logpm.trunkline.vo.OpenOrderVO;
import com.logpm.trunkline.vo.TrunklineAdvanceVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
@ -36,7 +37,7 @@ public interface ITrunklineAdvanceService extends BaseService<TrunklineAdvanceEn
List<TrunklineAdvanceVO> findIncomingOrderList(InComingDTO inComingDTO);
List<String> incomingPackageBatch(Long advanceId, Long warehouseId, List<TrunklineAdvanceDetailEntity> detailList, Long userId, Long deptId, String tenantId);
List<String> incomingPackageBatch(Long advanceId, Long warehouseId, List<TrunklineAdvanceDetailEntity> detailList, Long userId, Long deptId, String tenantId, WarehouseWaybillEntity waybillEntity);
List<TrunklineAdvanceEntity> findListByExistsAndOrderCodeSet(List<String> orderCodeSet);
}

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

@ -12,6 +12,7 @@ import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.TrunklineAdvanceVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -184,7 +185,7 @@ public class InComingServiceImpl implements IInComingService {
}
@Override
public R incomingBatchOrder(InComingDTO inComingDTO) {
public R incomingBatchOrder(InComingDTO inComingDTO, WarehouseWaybillEntity waybillEntity) {
Long warehouseId = inComingDTO.getWarehouseId();
String warehouseName = inComingDTO.getWarehouseName();
Integer incomingType = inComingDTO.getIncomingType();
@ -203,7 +204,7 @@ public class InComingServiceImpl implements IInComingService {
//查询所有包件
List<TrunklineAdvanceDetailEntity> detailList = advanceDetailService.list(queryWrapper);
List<String> orderPackageCodes = advanceService.incomingPackageBatch(advanceId, warehouseId, detailList, userId, deptId, tenantId);
List<String> orderPackageCodes = advanceService.incomingPackageBatch(advanceId, warehouseId, detailList, userId, deptId, tenantId,waybillEntity);
advanceDetailService.updateBatchById(detailList);

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

@ -17,7 +17,6 @@ import org.springblade.system.cache.UserCache;
import org.springblade.system.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.Date;
@ -260,7 +259,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
@LogpmAsync("asyncExecutor")
@Override
public void incomingPackageBatch(List<Long> advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId,String warehouseName) {
public void incomingPackageBatch(List<Long> advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId,String warehouseName,WarehouseWaybillEntity waybillEntity) {
InComingDTO inComingDTO = new InComingDTO();
inComingDTO.setAdvanceIds(advanceIds);
inComingDTO.setWarehouseId(warehouseId);
@ -270,7 +269,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
inComingDTO.setTenantId(tenantId);
inComingDTO.setNickName(nickName);
inComingDTO.setIncomingType(incomingType);
inComingService.incomingBatchOrder(inComingDTO);
inComingService.incomingBatchOrder(inComingDTO,waybillEntity);
}
@Override

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

@ -601,7 +601,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//判断是否是开单及入库的配置
Boolean aBoolean = basicdataOpenIncomingClient.checkOpenIncoming(warehouseId, brandId);
if (Boolean.TRUE.equals(aBoolean)) {
openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode(),warehouseId,warehouseName);
openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode(),warehouseId,warehouseName,waybillEntity);
waybillEntity.setStockCount(waybillEntity.getTotalCount());
waybillEntity.setWaybillStatus("20");
warehouseWaybillClient.updateEntity(waybillEntity);
@ -2100,49 +2100,62 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<ImportOrderNoPackageExcelDTO> importOrderNoPackageExcelDTOS = EasyExcel.read(inputStream).head(ImportOrderNoPackageExcelDTO.class).sheet(0).headRowNumber(2).doReadSync();
Map<String, Long> orderCodeCounts = importOrderNoPackageExcelDTOS.stream()
.collect(Collectors.groupingBy(a->(a.getOrderCode()+"&"+a.getFirsts()), Collectors.counting()));
Set<String> duplicateOrderCodes = orderCodeCounts.entrySet().stream()
.filter(entry -> entry.getValue() > 1)
.map(Map.Entry::getKey)
.collect(Collectors.toSet());
if(!duplicateOrderCodes.isEmpty()){
log.warn("#################importCustomizedOuPai: 订单号品类重复 {}",duplicateOrderCodes);
return R.fail(405, "包条码重复"+duplicateOrderCodes);
}
//把importOrderNoPackageExcelDTOS中的orderCode存入一个set集合
Set<String> orderCodes = importOrderNoPackageExcelDTOS.parallelStream().map(ImportOrderNoPackageExcelDTO::getOrderCode).collect(Collectors.toSet());
// Set<String> orderCodes = importOrderNoPackageExcelDTOS.parallelStream().map(ImportOrderNoPackageExcelDTO::getOrderCode).collect(Collectors.toSet());
//把importOrderNoPackageExcelDTOS的每个元素提取成一个key为orderCode和trainNumber的拼接,value为元素本身的map
Map<String, ImportOrderNoPackageExcelDTO> importOrderNoPackageExcelDTOMap = importOrderNoPackageExcelDTOS.parallelStream().collect(Collectors.toMap(a -> a.getOrderCode() + "&" + a.getTrainNumber(), a -> a));
Map<String, ImportOrderNoPackageExcelDTO> importOrderNoPackageExcelDTOMap = importOrderNoPackageExcelDTOS.parallelStream().collect(Collectors.toMap(a -> a.getOrderCode() + "&" + a.getFirsts(), a -> a));
importOrderNoPackageExcelDTOMap.remove("null&null");
List<TrunklineAdvanceEntity> detailEntities = new ArrayList<>();
//把orderCodes转成List
List<String> orderCodeList = new ArrayList<>(orderCodes);
// List<String> orderCodeList = new ArrayList<>(orderCodes);
//把orderCodeList分成每2000个元素一组
int batchSize = 2000;
List<List<String>> orderedGroups = new ArrayList<>();
for (int i = 0; i < orderCodeList.size(); i += batchSize) {
int endIndex = Math.min(i + batchSize, orderCodeList.size());
orderedGroups.add(orderCodeList.subList(i, endIndex));
}
for (int i = 0; i < orderedGroups.size(); i++) {
List<String> set1 = orderedGroups.get(i);
List<TrunklineAdvanceEntity> entities = advanceService.findListByExistsAndOrderCodeSet(set1);
detailEntities.addAll(entities);
}
// int batchSize = 2000;
// List<List<String>> orderedGroups = new ArrayList<>();
//
// for (int i = 0; i < orderCodeList.size(); i += batchSize) {
// int endIndex = Math.min(i + batchSize, orderCodeList.size());
// orderedGroups.add(orderCodeList.subList(i, endIndex));
// }
// for (int i = 0; i < orderedGroups.size(); i++) {
// List<String> set1 = orderedGroups.get(i);
// List<TrunklineAdvanceEntity> entities = advanceService.findListByExistsAndOrderCodeSet(set1);
// detailEntities.addAll(entities);
// }
Map<String,TrunklineAdvanceEntity> advanceEntityMap = new HashMap<>();
//把detailEntities转化成以orderCode和trainNumber为key的map
detailEntities.forEach(advanceEntity -> {
String orderCode = advanceEntity.getOrderCode();
String trainNumber = advanceEntity.getTrainNumber();
String key = orderCode + "&" + (StringUtil.isBlank(trainNumber)?"null":trainNumber);
advanceEntityMap.put(key,advanceEntity);
});
// detailEntities.forEach(advanceEntity -> {
// String orderCode = advanceEntity.getOrderCode();
// String packName = advanceEntity.getPackName();
// String key = orderCode + "&" + (StringUtil.isBlank(packName)?"null":packName);
// advanceEntityMap.put(key,advanceEntity);
// });
List<TrunklineAdvanceEntity> list = new ArrayList<>();
importOrderNoPackageExcelDTOMap.keySet().forEach(key -> {
ImportOrderNoPackageExcelDTO importOrderNoPackageExcelDTO = importOrderNoPackageExcelDTOMap.get(key);
TrunklineAdvanceEntity advanceEntity = advanceEntityMap.get(key);
if(Objects.isNull(advanceEntity)){
if(Objects.isNull(importOrderNoPackageExcelDTO)){
String orderCode = importOrderNoPackageExcelDTO.getOrderCode();
advanceEntity = new TrunklineAdvanceVO();
TrunklineAdvanceEntity advanceEntity = new TrunklineAdvanceVO();
advanceEntity.setWarehouseId(warehouseId);
advanceEntity.setWarehouseName(warehouseName);
advanceEntity.setServiceNum(importOrderNoPackageExcelDTO.getServiceNum());
@ -2181,8 +2194,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<TrunklineAdvanceDetailEntity> advanceDetailEntities = new ArrayList<>();
for (TrunklineAdvanceEntity advanceEntity : list) {
String orderCode = advanceEntity.getOrderCode();
String trainNumber = advanceEntity.getTrainNumber();
ImportOrderNoPackageExcelDTO importOrderNoPackageExcelDTO = importOrderNoPackageExcelDTOMap.get(orderCode + "&" + (StringUtil.isBlank(trainNumber) ? "null" : trainNumber));
String packName = advanceEntity.getPackName();
ImportOrderNoPackageExcelDTO importOrderNoPackageExcelDTO = importOrderNoPackageExcelDTOMap.get(orderCode + "&" + (StringUtil.isBlank(packName) ? "null" : packName));
if(!Objects.isNull(importOrderNoPackageExcelDTO)){
String firsts = importOrderNoPackageExcelDTO.getFirsts();
Integer totalNum = advanceEntity.getTotalNum();
@ -2292,99 +2305,136 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<ImportOrderNoPackageExcelDTO> importOrderNoPackageExcelDTOS = EasyExcel.read(inputStream).head(ImportOrderNoPackageExcelDTO.class).sheet(0).headRowNumber(2).doReadSync();
//把importOrderNoPackageExcelDTOS中的orderCode存入一个set集合
Set<String> orderCodes = importOrderNoPackageExcelDTOS.parallelStream().map(ImportOrderNoPackageExcelDTO::getOrderCode).collect(Collectors.toSet());
Map<String, Long> orderCodeCounts = importOrderNoPackageExcelDTOS.stream()
.collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber(), Collectors.counting()));
Set<String> duplicateOrderCodes = orderCodeCounts.entrySet().stream()
.filter(entry -> entry.getValue() > 1)
.map(Map.Entry::getKey)
.collect(Collectors.toSet());
if(!duplicateOrderCodes.isEmpty()){
log.warn("#####################openLabelHasPacakage: 订单重复 {}",duplicateOrderCodes);
return R.fail(405, "包条码重复"+duplicateOrderCodes);
}
//把importOrderNoPackageExcelDTOS的每个元素提取成一个key为orderCode和trainNumber的拼接,value为元素本身的map
Map<String, ImportOrderNoPackageExcelDTO> importOrderNoPackageExcelDTOMap = importOrderNoPackageExcelDTOS.parallelStream().collect(Collectors.toMap(a -> a.getOrderCode() + "&" + a.getTrainNumber(), a -> a));
importOrderNoPackageExcelDTOMap.remove("null&null");
List<TrunklineAdvanceEntity> detailEntities = new ArrayList<>();
//把orderCodes转成List
List<String> orderCodeList = new ArrayList<>(orderCodes);
//把orderCodeList分成每2000个元素一组
int batchSize = 1000;
List<List<String>> orderedGroups = new ArrayList<>();
for (int i = 0; i < orderCodeList.size(); i += batchSize) {
int endIndex = Math.min(i + batchSize, orderCodeList.size());
orderedGroups.add(orderCodeList.subList(i, endIndex));
}
for (int i = 0; i < orderedGroups.size(); i++) {
List<String> set1 = orderedGroups.get(i);
List<TrunklineAdvanceEntity> entities = advanceService.findListByExistsAndOrderCodeSet(set1);
detailEntities.addAll(entities);
}
Map<String,TrunklineAdvanceEntity> advanceEntityMap = new HashMap<>();
//把detailEntities转化成以orderCode和trainNumber为key的map
detailEntities.forEach(advanceEntity -> {
String orderCode = advanceEntity.getOrderCode();
String trainNumber = advanceEntity.getTrainNumber();
String key = orderCode + "&" + (StringUtil.isBlank(trainNumber)?"null":trainNumber);
advanceEntityMap.put(key,advanceEntity);
});
// Set<String> orderCodes = importOrderNoPackageExcelDTOS.parallelStream().map(ImportOrderNoPackageExcelDTO::getOrderCode).collect(Collectors.toSet());
//
// Map<String, Long> orderCodeCounts = importOrderNoPackageExcelDTOS.stream()
// .collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber(), Collectors.counting()));
//
// Set<String> duplicateOrderCodes = orderCodeCounts.entrySet().stream()
// .filter(entry -> entry.getValue() > 1)
// .map(Map.Entry::getKey)
// .collect(Collectors.toSet());
//
// if(!duplicateOrderCodes.isEmpty()){
// log.warn("#####################openLabelHasPacakage: 订单重复 {}",duplicateOrderCodes);
// return R.fail(405, "包条码重复"+duplicateOrderCodes);
// }
//
// //把importOrderNoPackageExcelDTOS的每个元素提取成一个key为orderCode和trainNumber的拼接,value为元素本身的map
// Map<String, ImportOrderNoPackageExcelDTO> importOrderNoPackageExcelDTOMap = importOrderNoPackageExcelDTOS.parallelStream().collect(Collectors.toMap(a -> a.getOrderCode() + "&" + a.getTrainNumber(), a -> a));
//
// importOrderNoPackageExcelDTOMap.remove("null&null");
//
// List<TrunklineAdvanceEntity> detailEntities = new ArrayList<>();
//
// //把orderCodes转成List
// List<String> orderCodeList = new ArrayList<>(orderCodes);
// //把orderCodeList分成每2000个元素一组
// int batchSize = 1000;
// List<List<String>> orderedGroups = new ArrayList<>();
//
// for (int i = 0; i < orderCodeList.size(); i += batchSize) {
// int endIndex = Math.min(i + batchSize, orderCodeList.size());
// orderedGroups.add(orderCodeList.subList(i, endIndex));
// }
// for (int i = 0; i < orderedGroups.size(); i++) {
// List<String> set1 = orderedGroups.get(i);
// List<TrunklineAdvanceEntity> entities = advanceService.findListByExistsAndOrderCodeSet(set1);
// detailEntities.addAll(entities);
// }
//
// Map<String,TrunklineAdvanceEntity> advanceEntityMap = new HashMap<>();
//
// //把detailEntities转化成以orderCode和trainNumber为key的map
// detailEntities.forEach(advanceEntity -> {
// String orderCode = advanceEntity.getOrderCode();
// String trainNumber = advanceEntity.getTrainNumber();
// String key = orderCode + "&" + (StringUtil.isBlank(trainNumber)?"null":trainNumber);
// advanceEntityMap.put(key,advanceEntity);
// });
List<TrunklineAdvanceEntity> list = new ArrayList<>();
importOrderNoPackageExcelDTOMap.keySet().forEach(key -> {
ImportOrderNoPackageExcelDTO importOrderNoPackageExcelDTO = importOrderNoPackageExcelDTOMap.get(key);
TrunklineAdvanceEntity advanceEntity = advanceEntityMap.get(key);
if(Objects.isNull(advanceEntity)){
String orderCode = importOrderNoPackageExcelDTO.getOrderCode();
advanceEntity = new TrunklineAdvanceVO();
advanceEntity.setWarehouseId(warehouseId);
advanceEntity.setWarehouseName(warehouseName);
advanceEntity.setServiceNum(importOrderNoPackageExcelDTO.getServiceNum());
advanceEntity.setOrderCode(orderCode);
advanceEntity.setArea(importOrderNoPackageExcelDTO.getArea());
advanceEntity.setBrand(importOrderNoPackageExcelDTO.getBrand());
advanceEntity.setTotalNum(Integer.parseInt(importOrderNoPackageExcelDTO.getCount()));
advanceEntity.setPackName(importOrderNoPackageExcelDTO.getFirsts());
advanceEntity.setDealerCode(importOrderNoPackageExcelDTO.getDealerCode());
advanceEntity.setDealerName(importOrderNoPackageExcelDTO.getDealerName());
advanceEntity.setCustomerName(importOrderNoPackageExcelDTO.getCustomerName());
advanceEntity.setCustomerPhone(importOrderNoPackageExcelDTO.getCustomerPhone());
advanceEntity.setCustomerAddress(importOrderNoPackageExcelDTO.getCustomerAddress());
advanceEntity.setConsigneePerson(importOrderNoPackageExcelDTO.getConsigneePerson());
advanceEntity.setConsigneeMobile(importOrderNoPackageExcelDTO.getConsigneeMobile());
advanceEntity.setConsigneeAddress(importOrderNoPackageExcelDTO.getConsigneeAddress());
advanceEntity.setSenderName(importOrderNoPackageExcelDTO.getShipperPerson());
advanceEntity.setSenderPhone(importOrderNoPackageExcelDTO.getShipperMobile());
advanceEntity.setSenderAddress(importOrderNoPackageExcelDTO.getShipperAddress());
advanceEntity.setTrainNumber(importOrderNoPackageExcelDTO.getTrainNumber());
advanceEntity.setSystemType("线上");
advanceEntity.setMatingType("1");
advanceEntity.setWaybillStatus("0");
advanceEntity.setFreezeStatus("0");
advanceEntity.setLegacyStatus("0");
if (orderCode.contains("遗")) {
advanceEntity.setLegacyStatus("1");
}
advanceEntity.setHasPackage(0);
advanceEntity.setCreateUserName(AuthUtil.getNickName());
list.add(advanceEntity);
// importOrderNoPackageExcelDTOMap.keySet().forEach(key -> {
// ImportOrderNoPackageExcelDTO importOrderNoPackageExcelDTO = importOrderNoPackageExcelDTOMap.get(key);
// TrunklineAdvanceEntity advanceEntity = advanceEntityMap.get(key);
// if(Objects.isNull(advanceEntity)){
// String orderCode = importOrderNoPackageExcelDTO.getOrderCode();
// advanceEntity = new TrunklineAdvanceVO();
// advanceEntity.setWarehouseId(warehouseId);
// advanceEntity.setWarehouseName(warehouseName);
// advanceEntity.setServiceNum(importOrderNoPackageExcelDTO.getServiceNum());
// advanceEntity.setOrderCode(orderCode);
// advanceEntity.setArea(importOrderNoPackageExcelDTO.getArea());
// advanceEntity.setBrand(importOrderNoPackageExcelDTO.getBrand());
// advanceEntity.setTotalNum(Integer.parseInt(importOrderNoPackageExcelDTO.getCount()));
// advanceEntity.setPackName(importOrderNoPackageExcelDTO.getFirsts());
// advanceEntity.setDealerCode(importOrderNoPackageExcelDTO.getDealerCode());
// advanceEntity.setDealerName(importOrderNoPackageExcelDTO.getDealerName());
// advanceEntity.setCustomerName(importOrderNoPackageExcelDTO.getCustomerName());
// advanceEntity.setCustomerPhone(importOrderNoPackageExcelDTO.getCustomerPhone());
// advanceEntity.setCustomerAddress(importOrderNoPackageExcelDTO.getCustomerAddress());
// advanceEntity.setConsigneePerson(importOrderNoPackageExcelDTO.getConsigneePerson());
// advanceEntity.setConsigneeMobile(importOrderNoPackageExcelDTO.getConsigneeMobile());
// advanceEntity.setConsigneeAddress(importOrderNoPackageExcelDTO.getConsigneeAddress());
// advanceEntity.setSenderName(importOrderNoPackageExcelDTO.getShipperPerson());
// advanceEntity.setSenderPhone(importOrderNoPackageExcelDTO.getShipperMobile());
// advanceEntity.setSenderAddress(importOrderNoPackageExcelDTO.getShipperAddress());
// advanceEntity.setTrainNumber(importOrderNoPackageExcelDTO.getTrainNumber());
// advanceEntity.setSystemType("线上");
// advanceEntity.setMatingType("1");
// advanceEntity.setWaybillStatus("0");
// advanceEntity.setFreezeStatus("0");
// advanceEntity.setLegacyStatus("0");
// if (orderCode.contains("遗")) {
// advanceEntity.setLegacyStatus("1");
// }
// advanceEntity.setHasPackage(0);
// advanceEntity.setCreateUserName(AuthUtil.getNickName());
// list.add(advanceEntity);
// }
// });
importOrderNoPackageExcelDTOS.forEach(importOrderNoPackageExcelDTO -> {
String orderCode = importOrderNoPackageExcelDTO.getOrderCode();
TrunklineAdvanceEntity advanceEntity = new TrunklineAdvanceEntity();
advanceEntity.setWarehouseId(warehouseId);
advanceEntity.setWarehouseName(warehouseName);
advanceEntity.setServiceNum(importOrderNoPackageExcelDTO.getServiceNum());
advanceEntity.setOrderCode(orderCode);
advanceEntity.setArea(importOrderNoPackageExcelDTO.getArea());
advanceEntity.setBrand(importOrderNoPackageExcelDTO.getBrand());
advanceEntity.setTotalNum(Integer.parseInt(importOrderNoPackageExcelDTO.getCount()));
advanceEntity.setPackName(importOrderNoPackageExcelDTO.getFirsts());
advanceEntity.setDealerCode(importOrderNoPackageExcelDTO.getDealerCode());
advanceEntity.setDealerName(importOrderNoPackageExcelDTO.getDealerName());
advanceEntity.setCustomerName(importOrderNoPackageExcelDTO.getCustomerName());
advanceEntity.setCustomerPhone(importOrderNoPackageExcelDTO.getCustomerPhone());
advanceEntity.setCustomerAddress(importOrderNoPackageExcelDTO.getCustomerAddress());
advanceEntity.setConsigneePerson(importOrderNoPackageExcelDTO.getConsigneePerson());
advanceEntity.setConsigneeMobile(importOrderNoPackageExcelDTO.getConsigneeMobile());
advanceEntity.setConsigneeAddress(importOrderNoPackageExcelDTO.getConsigneeAddress());
advanceEntity.setSenderName(importOrderNoPackageExcelDTO.getShipperPerson());
advanceEntity.setSenderPhone(importOrderNoPackageExcelDTO.getShipperMobile());
advanceEntity.setSenderAddress(importOrderNoPackageExcelDTO.getShipperAddress());
advanceEntity.setTrainNumber(importOrderNoPackageExcelDTO.getTrainNumber());
advanceEntity.setSystemType("线上");
advanceEntity.setMatingType("1");
advanceEntity.setWaybillStatus("0");
advanceEntity.setFreezeStatus("0");
advanceEntity.setLegacyStatus("0");
if (orderCode.contains("遗")) {
advanceEntity.setLegacyStatus("1");
}
advanceEntity.setHasPackage(0);
advanceEntity.setCreateUserName(AuthUtil.getNickName());
list.add(advanceEntity);
});
advanceService.saveBatch(list);
int successNum = list.size();
return R.success("成功导入"+successNum+"件");
return R.success("成功导入"+successNum+"");
}
@Override

49
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

@ -1,6 +1,6 @@
package com.logpm.trunkline.service.impl;
import com.alibaba.fastjson.JSONObject;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -17,9 +17,12 @@ import com.logpm.trunkline.mapper.TrunklineAdvanceDetailMapper;
import com.logpm.trunkline.mapper.TrunklineAdvanceMapper;
import com.logpm.trunkline.service.ITrunklineAdvanceDetailService;
import com.logpm.trunkline.vo.*;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
@ -40,6 +43,8 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
private final TrunklineAdvanceMapper advanceMapper;
private final IWarehouseWaybillClient warehouseWaybillClient;
@Override
public void updatePackageStatusById(String packageStatus, Long advanceDetailId,Long warehouseId,String warehouseName) {
baseMapper.updatePackageStatusById(packageStatus,advanceDetailId,warehouseId,warehouseName);
@ -138,27 +143,45 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
if(!Objects.isNull(advanceDetailEntity)){
Long advanceId = advanceDetailEntity.getAdvanceId();
TrunklineAdvanceEntity advanceEntity = advanceMapper.selectById(advanceId);
if(ObjectUtil.isEmpty(advanceEntity.getSenderName()) || ("/").equals(advanceEntity.getSenderName())){
vo.setShipperName("无");
}
if(ObjectUtil.isEmpty(advanceEntity.getSenderAddress())){
vo.setShipperAddress(" ");
Long waybillId = advanceDetailEntity.getWaybillId();
String orderCode = advanceDetailEntity.getOrderCode();
String firstPackName = advanceDetailEntity.getFirstPackName();
String secondPackName = advanceDetailEntity.getSecondPackName();
String thirdPackName = advanceDetailEntity.getThirdPackName();
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
if(Objects.isNull(waybillEntity)){
log.warn("运单信息不存在 waybillId={}",waybillId);
throw new CustomerException(405,"运单信息不存在");
}
vo.setOrderCode(advanceDetailEntity.getOrderCode());
vo.setMallName(advanceEntity.getDealerName());
String shipper = waybillEntity.getShipper();
String shipperAddress = waybillEntity.getShipperAddress();
String consignee = waybillEntity.getConsignee();
vo.setOrderCode(orderCode);
vo.setShipperName(shipper);
vo.setShipperAddress(shipperAddress);
vo.setMallName(consignee);
vo.setCustomerName(advanceEntity.getCustomerName());
vo.setCustomerTelephone(advanceEntity.getCustomerPhone());
vo.setCustomerAddress(advanceEntity.getCustomerAddress());
vo.setMaterialName(advanceDetailEntity.getMaterialName());
vo.setCategory(advanceDetailEntity.getFirstPackName());
vo.setWaybillNumber(StringUtil.isBlank(advanceDetailEntity.getWaybillNo())?"":advanceDetailEntity.getWaybillNo());
vo.setObjective(advanceEntity.getWarehouseName());
vo.setCategory(firstPackName+"/"+secondPackName+"/"+thirdPackName);
vo.setWaybillsNum(waybillEntity.getTotalCount()+"");
vo.setObjective(waybillEntity.getDestinationWarehouseName());
vo.setDepartureStation(waybillEntity.getDepartureWarehouseName());
vo.setDealerCode(advanceEntity.getDealerCode());
vo.setQrCode(orderPackageCode);
vo.setDealerName(advanceEntity.getDealerName());
vo.setQrCode(orderPackageCode);
vo.setWaybillNumber(waybillEntity.getWaybillNo());
vo.setTotalNumber(advanceEntity.getTotalNum()+"");
}
Map<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(vo), Map.class);
//把vo转成Map<String, Object>
Map<String, Object> map = BeanUtil.beanToMap(vo);
if(!Objects.isNull(advanceDetailEntity)){
map.put("id",advanceDetailEntity.getId());
}

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

@ -403,7 +403,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
}
@Override
public List<String> incomingPackageBatch(Long advanceId, Long warehouseId, List<TrunklineAdvanceDetailEntity> detailList, Long userId, Long deptId, String tenantId) {
public List<String> incomingPackageBatch(Long advanceId, Long warehouseId, List<TrunklineAdvanceDetailEntity> detailList, Long userId, Long deptId, String tenantId, WarehouseWaybillEntity waybillEntity) {
Date date = new Date();
@ -457,7 +457,6 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
stockArticleEntity.setTypeService("1");//默认商配
if(!StringUtil.isBlank(waybillNo)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(!Objects.isNull(waybillEntity)){
Long consigneeId = waybillEntity.getConsigneeId();
@ -566,7 +565,6 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
parcelList.setWarehouseId(warehouseId);
String waybillNo = advanceEntity.getWaybillNo();
if(StringUtil.isNotBlank(waybillNo)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(!Objects.isNull(waybillEntity)){
Long departureWarehouseId = waybillEntity.getDepartureWarehouseId();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();

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

@ -83,7 +83,7 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
billladingPackageEntity.setWarehouseName(warehouseEntity.getName());
billladingPackageEntity.setOrderPackageCode(orderPackageCode);
billladingPackageEntity.setBillladingId(billladingId);
billladingPackageEntity.setCreateUserName(AuthUtil.getUserName());
billladingPackageEntity.setCreateUserName(AuthUtil.getNickName());
billladingPackageEntity.setIncomingType(incomingType);
save(billladingPackageEntity);

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

@ -1296,6 +1296,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BigDecimal settlementValue = carsLoadDTO.getSettlementValue();
String driverType = carsLoadDTO.getDriverType();
String outDriverPerson = carsLoadDTO.getOutDriverPerson();
String loadingType = carsLoadDTO.getLoadingType();
List<TrunklineCarsLoadLineDTO> addCarsLoadLineList = carsLoadDTO.getAddCarsLoadLineList();
List<TrunklineCarsLoadLineDTO> removeCarsLoadLineList = carsLoadDTO.getRemoveCarsLoadLineList();
@ -1337,6 +1338,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadEntity.setSettlementValue(settlementValue);
carsLoadEntity.setDriverType(driverType);
carsLoadEntity.setOutDriverPerson(outDriverPerson);
carsLoadEntity.setLoadingType(loadingType);
updateById(carsLoadEntity);
for (TrunklineCarsLoadLineDTO carsLoadLineDTO : removeCarsLoadLineList) {
@ -3076,10 +3078,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
map.put("trayCode", trayCode);
map.put("warehouseId", warehouseId);
map.put("orderPackageCode", orderPackageCode);
boolean b = trayTypeClient.orderScanOrderPackageCode(map);
if (!b) {
log.warn("##########findNextNodeList: 打托失败 trayCode={} orderPackageCode={}", trayCode, orderPackageCode);
return R.fail(405, "打托失败");
R r = trayTypeClient.orderScanOrderPackageCodeReturnR(map);
int code = r.getCode();
if(code != 200){
log.warn("##########findNextNodeList: 打托失败 trayCode={} orderPackageCode={} msg={}", trayCode, orderPackageCode,r.getMsg());
return R.fail(405, r.getMsg());
}
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId);
orders = parcelListEntity.getOrderCode();

93
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -143,140 +143,141 @@
<select id="pageList" resultType="com.logpm.warehouse.vo.WarehouseWaybillVO">
select *
from logpm_warehouse_waybill
where is_deleted = 0
select lww.*
from logpm_warehouse_waybill lww
left join (select ltwt.waybill_id,GROUP_CONCAT(DISTINCT ltwt.warehouse_id) warehouse_ids from logpm_trunkline_waybill_track ltwt group by ltwt.waybill_id) t on t.waybill_id = lww.id
where lww.is_deleted = 0
<if test="param.waybillNoList != null">
and waybill_no not in
and lww.waybill_no not in
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.warehouseId != null">
and (departure_warehouse_id = #{param.warehouseId} or destination_warehouse_id = #{param.warehouseId})
and Locate(#{param.warehouseId},t.warehouse_ids) > 0
</if>
<if test="param.waybillNo != null and param.waybillNo != ''">
and Locate(#{param.waybillNo},waybill_no) > 0
and Locate(#{param.waybillNo},lww.waybill_no) > 0
</if>
<if test="param.orderNo != null and param.orderNo != ''">
and Locate(#{param.orderNo},order_no) > 0
and Locate(#{param.orderNo},lww.order_no) > 0
</if>
<if test="param.destinationWarehouseName != null and param.destinationWarehouseName != ''">
and Locate(#{param.destinationWarehouseName},destination_warehouse_name) > 0
and Locate(#{param.destinationWarehouseName},lww.destination_warehouse_name) > 0
</if>
<if test="param.departureWarehouseName != null and param.departureWarehouseName != ''">
and Locate(#{param.departureWarehouseName},departure_warehouse_name) > 0
and Locate(#{param.departureWarehouseName},lww.departure_warehouse_name) > 0
</if>
<if test="param.customerTrain != null and param.customerTrain != ''">
and Locate(#{param.customerTrain},customer_train) > 0
and Locate(#{param.customerTrain},lww.customer_train) > 0
</if>
<if test="param.brand != null and param.brand != ''">
and Locate(#{param.brand},brand) > 0
and Locate(#{param.brand},lww.brand) > 0
</if>
<if test="param.shipper != null and param.shipper != ''">
and Locate(#{param.shipper},shipper) > 0
and Locate(#{param.shipper},lww.shipper) > 0
</if>
<if test="param.shipperName != null and param.shipperName != ''">
and Locate(#{param.shipperName},shipper_name) > 0
and Locate(#{param.shipperName},lww.shipper_name) > 0
</if>
<if test="param.shipperMobile != null and param.shipperMobile != ''">
and Locate(#{param.shipperMobile},shipper_mobile) > 0
and Locate(#{param.shipperMobile},lww.shipper_mobile) > 0
</if>
<if test="param.consignee != null and param.consignee != ''">
and Locate(#{param.consignee},consignee) > 0
and Locate(#{param.consignee},lww.consignee) > 0
</if>
<if test="param.consigneeName != null and param.consigneeName != ''">
and Locate(#{param.consigneeName},consignee_name) > 0
and Locate(#{param.consigneeName},lww.consignee_name) > 0
</if>
<if test="param.consigneeMobile != null and param.consigneeMobile != ''">
and Locate(#{param.consigneeMobile},consignee_mobile) > 0
and Locate(#{param.consigneeMobile},lww.consignee_mobile) > 0
</if>
<if test="param.destination != null and param.destination != ''">
and Locate(#{param.destination},destination) > 0
and Locate(#{param.destination},lww.destination) > 0
</if>
<if test="param.departure != null and param.departure != ''">
and Locate(#{param.departure},departure) > 0
and Locate(#{param.departure},lww.departure) > 0
</if>
<if test="param.payType != null">
and pay_type = #{param.payType}
and lww.pay_type = #{param.payType}
</if>
<if test="param.payWay != null">
and pay_way = #{param.payWay}
and lww.pay_way = #{param.payWay}
</if>
<if test="param.deliveryWay != null">
and delivery_way = #{param.deliveryWay}
and lww.delivery_way = #{param.deliveryWay}
</if>
<if test="param.urgency != null">
and urgency = #{param.urgency}
and lww.urgency = #{param.urgency}
</if>
<if test="param.transportType != null">
and transport_type = #{param.transportType}
and lww.transport_type = #{param.transportType}
</if>
<if test="param.transportType != null">
and transport_type = #{param.transportType}
and lww.transport_type = #{param.transportType}
</if>
<if test="param.waybillStatus != null">
and waybill_status = #{param.waybillStatus}
and lww.waybill_status = #{param.waybillStatus}
</if>
<if test="param.pickupCompleteOrNot != null">
and pickup_complete_or_not = #{param.pickupCompleteOrNot}
and lww.pickup_complete_or_not = #{param.pickupCompleteOrNot}
</if>
<if test="param.trunklineCompleteOrNot != null">
and trunkline_complete_or_not = #{param.trunklineCompleteOrNot}
and lww.trunkline_complete_or_not = #{param.trunklineCompleteOrNot}
</if>
<if test="param.documentMakingTimeStartDate != null">
and document_making_time &gt;= #{param.documentMakingTimeStartDate}
and lww.document_making_time &gt;= #{param.documentMakingTimeStartDate}
</if>
<if test="param.documentMakingTimeEndDate != null">
and document_making_time &lt;= #{param.documentMakingTimeEndDate}
and lww.document_making_time &lt;= #{param.documentMakingTimeEndDate}
</if>
<if test="param.createTimeStartDate != null">
and create_time &gt;= #{param.createTimeStartDate}
and lww.create_time &gt;= #{param.createTimeStartDate}
</if>
<if test="param.createTimeEndDate != null">
and create_time &lt;= #{param.createTimeEndDate}
and lww.create_time &lt;= #{param.createTimeEndDate}
</if>
<if test="param.agent != null and param.agent != ''">
and Locate(#{param.agent},agent) > 0
and lww.Locate(#{param.agent},agent) > 0
</if>
<if test="param.goodsName != null and param.goodsName != ''">
and Locate(#{param.goodsName},goods_name) > 0
and lww.Locate(#{param.goodsName},goods_name) > 0
</if>
<if test="param.freezeStatus != null">
and freeze_status = #{param.freezeStatus}
and lww.freeze_status = #{param.freezeStatus}
</if>
<if test="param.abolishStatus != null">
and abolish_status = #{param.abolishStatus}
and lww.abolish_status = #{param.abolishStatus}
</if>
<if test="param.remark != null and param.reamrk != ''">
and Locate(#{param.remark},remark) > 0
and Locate(#{param.remark},lww.remark) > 0
</if>
<if test="param.consigneeAddress != null and param.consigneeAddress != ''">
and Locate(#{param.consigneeAddress},consignee_address) > 0
and Locate(#{param.consigneeAddress},lww.consignee_address) > 0
</if>
<if test="param.totalCount != null">
and total_count = #{param.totalCount}
and lww.total_count = #{param.totalCount}
</if>
<if test="param.totalWeight != null">
and total_weight = #{param.totalWeight}
and lww.total_weight = #{param.totalWeight}
</if>
<if test="param.totalVolume != null">
and total_volume = #{param.totalVolume}
and lww.total_volume = #{param.totalVolume}
</if>
<if test="param.abolishTimeStartDate != null">
and abolish_time &gt;= #{param.abolishTimeStartDate}
and lww.abolish_time &gt;= #{param.abolishTimeStartDate}
</if>
<if test="param.abolishTimeEndDate != null">
and abolish_time &lt;= #{param.abolishTimeEndDate}
and lww.abolish_time &lt;= #{param.abolishTimeEndDate}
</if>
<if test="param.freezeTimeStartDate != null">
and freeze_time &gt;= #{param.freezeTimeStartDate}
and lww.freeze_time &gt;= #{param.freezeTimeStartDate}
</if>
<if test="param.freezeTimeEndDate != null">
and freeze_time &lt;= #{param.freezeTimeEndDate}
and lww.freeze_time &lt;= #{param.freezeTimeEndDate}
</if>
order by create_time desc
order by lww.create_time desc
</select>
<select id="findMoreWaybillNo" resultType="String">

Loading…
Cancel
Save