Browse Source

Merge branch 'pre-production'

master
pref_mail@163.com 2 weeks ago
parent
commit
f61f1807bd
  1. 55
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  2. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

55
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml

@ -1391,6 +1391,18 @@
where ltad.waybill_id is not null
and ltad.create_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != lww.destination_warehouse_id
<if test="param.startTime != null ">
and ltad.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and ltad.create_time &lt;= #{param.endTime}
</if>
<if test="param.openTimeStart != null ">
and lww.create_time &gt;= #{param.openTimeStart}
</if>
<if test="param.openTimeEnd != null ">
and lww.create_time &lt;= #{param.openTimeEnd}
</if>
<if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in
<foreach collection="param.brandList" item="item" open="(" separator="," close=")">
@ -1445,18 +1457,6 @@
<if test="param.loadCode != null and param.loadCode !='' ">
and GROUP_CONCAT(DISTINCT IFNULL(ltcls.load_code,ltclsm.load_code)) like concat('%',#{param.loadCode},'%')
</if>
<if test="param.startTime != null ">
and min(ltad.create_time) &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and min(ltad.create_time) &lt;= #{param.endTime}
</if>
<if test="param.openTimeStart != null ">
and min(lww.create_time) &gt;= #{param.openTimeStart}
</if>
<if test="param.openTimeEnd != null ">
and min(lww.create_time) &lt;= #{param.openTimeEnd}
</if>
</trim>
</select>
@ -1505,6 +1505,18 @@
where ltad.waybill_id is not null
and ltad.create_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != lww.destination_warehouse_id
<if test="param.startTime != null ">
and ltad.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and ltad.create_time &lt;= #{param.endTime}
</if>
<if test="param.openTimeStart != null ">
and lww.create_time &gt;= #{param.openTimeStart}
</if>
<if test="param.openTimeEnd != null ">
and lww.create_time &lt;= #{param.openTimeEnd}
</if>
<if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in
<foreach collection="param.brandList" item="item" open="(" separator="," close=")">
@ -1544,12 +1556,6 @@
<if test="param.destinationWarehouseName != null and param.destinationWarehouseName !='' ">
and lww.destination_warehouse_name like concat('%',#{param.destinationWarehouseName},'%')
</if>
<if test="param.trainNumber != null and param.trainNumber !='' ">
and GROUP_CONCAT(DISTINCT ltad.train_number) like concat('%',#{param.trainNumber},'%')
</if>
<if test="param.loadCode != null and param.loadCode !='' ">
and GROUP_CONCAT(DISTINCT IFNULL(ltcls.load_code,ltclsm.load_code)) like concat('%',#{param.loadCode},'%')
</if>
group by ltad.order_code,
ltad.waybill_no,
ltad.brand,
@ -1561,23 +1567,10 @@
<trim prefix="HAVING" prefixOverrides="AND">
<if test="param.trainNumber != null and param.trainNumber !='' ">
and GROUP_CONCAT(DISTINCT ltad.train_number) like concat('%',#{param.trainNumber},'%')
GROUP_CONCAT(DISTINCT IFNULL(ltcls.load_code,ltclsm.load_code)) loadCode,
</if>
<if test="param.loadCode != null and param.loadCode !='' ">
and GROUP_CONCAT(DISTINCT IFNULL(ltcls.load_code,ltclsm.load_code)) like concat('%',#{param.loadCode},'%')
</if>
<if test="param.startTime != null ">
and min(ltad.create_time) &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and min(ltad.create_time) &lt;= #{param.endTime}
</if>
<if test="param.openTimeStart != null ">
and min(lww.create_time) &gt;= #{param.openTimeStart}
</if>
<if test="param.openTimeEnd != null ">
and min(lww.create_time) &lt;= #{param.openTimeEnd}
</if>
</trim>
</select>

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

@ -1146,6 +1146,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long warehouseId = loadCarsDTO.getWarehouseId();
Integer unloadType = loadCarsDTO.getUnloadType();
Date date = new Date();
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
if (Objects.isNull(warehouseEntity)) {
log.warn("#############unloadByLoadId: 仓库信息不存在 warehouseId={}", warehouseId);
@ -1319,6 +1321,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setAllocation(null);
newStockArticleEntity.setTrays(null);
newStockArticleEntity.setCarsLoadNum(0);
newStockArticleEntity.setWarehouseEntryTime(date);
newStockArticleEntity.setWarehouseEntryTimeEnd(date);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) {
@ -1340,6 +1344,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newParcelListEntity.setWarehouse(warehouseEntity.getName());
newParcelListEntity.setStockArticleId(orderId);
newParcelListEntity.setQuantity(totalUnloadNum);
newParcelListEntity.setWarehouseEntryTimeEnd(date);
Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId();
if(warehouseId.equals(acceptWarehouseId)){
newParcelListEntity.setIsTransfer(0);
@ -1390,6 +1395,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setHandQuantity(hQuantity);
newStockArticleEntity.setIncomingNum(incomingNum);
newStockArticleEntity.setWarehouseEntryTimeEnd(date);
List<DistributionParcelListEntity> listEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
//把listEntityList中所有元素的id放入一个集合
@ -1517,12 +1523,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
// 发送卸车作业事件
carsLoadAsyncService.sendStationArrivedEnter(carsLoadEntity,brands, AuthUtil.getUser(), warehouseEntity);
}
@ -5120,6 +5120,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
@Override
public R zeroUnloadEnter(List<Long> loadScanIds, Long warehouseId, String warehouseName) {
Date date = new Date();
List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.findListByIds(loadScanIds);
//排除carsLoadScanEntityList中unloadCheck为1的值
carsLoadScanEntityList = carsLoadScanEntityList.stream().filter(carsLoadScanEntity -> !carsLoadScanEntity.getUnloadCheck().equals(1)).collect(Collectors.toList());
@ -5181,6 +5183,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setAllocation(null);
newStockArticleEntity.setTrays(null);
newStockArticleEntity.setCarsLoadNum(0);
newStockArticleEntity.setWarehouseEntryTime(date);
newStockArticleEntity.setWarehouseEntryTimeEnd(date);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) {
@ -5202,6 +5206,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newParcelListEntity.setWarehouse(warehouseName);
newParcelListEntity.setStockArticleId(orderId);
newParcelListEntity.setQuantity(totalUnloadNum);
newParcelListEntity.setWarehouseEntryTimeEnd(date);
Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId();
if(warehouseId.equals(acceptWarehouseId)){
newParcelListEntity.setIsTransfer(0);
@ -5248,6 +5253,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setHandQuantity(hQuantity);
newStockArticleEntity.setIncomingNum(incomingNum);
newStockArticleEntity.setWarehouseEntryTimeEnd(date);
List<DistributionParcelListEntity> listEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
//把listEntityList中所有元素的id放入一个集合

Loading…
Cancel
Save