Browse Source

1.订单整体时效逻辑优化

fix-sign
zhenghaoyu 2 months ago
parent
commit
e537e67fdc
  1. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  2. 4
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  3. 7
      blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java
  4. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.java
  5. 61
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  6. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java
  7. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -497,9 +497,12 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
} }
carsLoadScanEntity.setScanStatus("2"); carsLoadScanEntity.setScanStatus("2");
carsLoadScanEntity.setUnloadNum(carsLoadScanEntity.getUnloadNum()+enterNum); carsLoadScanEntity.setUnloadNum(carsLoadScanEntity.getUnloadNum()+enterNum);
carsLoadScanEntity.setUnloadNodeId(warehouseId);
carsLoadScanEntity.setUnloadNodeName(warehouseEntity.getName());
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadTime(new Date());
trunklineCarsLoadScanClient.updateEntity(carsLoadScanEntity); trunklineCarsLoadScanClient.updateEntity(carsLoadScanEntity);
String waybillNo = carsLoadScanEntity.getWaybillNo(); String waybillNo = carsLoadScanEntity.getWaybillNo();

4
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -66,7 +66,6 @@ import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz; import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User; import org.springblade.system.entity.User;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
import org.springblade.system.feign.IUserClient;
import org.springblade.system.feign.IUserSearchClient; import org.springblade.system.feign.IUserSearchClient;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -2896,9 +2895,6 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if (!withinOneMonth) { if (!withinOneMonth) {
throw new ServiceException("日期范伟不能超过两个月"); throw new ServiceException("日期范伟不能超过两个月");
} }
} else {
throw new ServiceException("导出时日期必填");
} }
List<AftersalesWorkOrderVO> exportData = baseMapper.getBasicExportData(workOrderDTO, ids, warehouseIds); List<AftersalesWorkOrderVO> exportData = baseMapper.getBasicExportData(workOrderDTO, ids, warehouseIds);
return exportData; return exportData;

7
blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java

@ -40,4 +40,11 @@ public class ReportTimeDTO implements Serializable {
private String trainNumber; private String trainNumber;
private String loadCode; private String loadCode;
private String openTimeStartStr;
private String openTimeEndStr;
private Date openTimeStart;
private Date openTimeEnd;
} }

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

@ -2,7 +2,6 @@ package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportTimeDTO; import com.logpm.report.dto.ReportTimeDTO;
import com.logpm.report.entity.ReportConfigOrderAllEntity;
import com.logpm.report.vo.*; import com.logpm.report.vo.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -47,5 +46,5 @@ public interface ReportTimeMapper {
IPage<ReportOrderAllTimeVO> orderAllTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO); IPage<ReportOrderAllTimeVO> orderAllTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportConfigOrderAllEntity> orderAllTimeExport(@Param("param") ReportTimeDTO reportTimeDTO); List<ReportOrderAllTimeVO> orderAllTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
} }

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

@ -1391,12 +1391,6 @@
where ltad.waybill_id is not null where ltad.waybill_id is not null
and ltad.create_time > '2024-10-22 00:00:00' and ltad.create_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != lww.destination_warehouse_id 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.brandList != null and param.brandList.size() > 0"> <if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in and lww.brand in
<foreach collection="param.brandList" item="item" open="(" separator="," close=")"> <foreach collection="param.brandList" item="item" open="(" separator="," close=")">
@ -1436,13 +1430,6 @@
<if test="param.destinationWarehouseName != null and param.destinationWarehouseName !='' "> <if test="param.destinationWarehouseName != null and param.destinationWarehouseName !='' ">
and lww.destination_warehouse_name like concat('%',#{param.destinationWarehouseName},'%') and lww.destination_warehouse_name like concat('%',#{param.destinationWarehouseName},'%')
</if> </if>
<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>
group by ltad.order_code, group by ltad.order_code,
ltad.waybill_no, ltad.waybill_no,
ltad.brand, ltad.brand,
@ -1451,6 +1438,26 @@
lww.departure_warehouse_name, lww.departure_warehouse_name,
lww.destination_warehouse_name, lww.destination_warehouse_name,
oat.day_time oat.day_time
<trim prefix="HAVING" prefixOverrides="AND">
<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>
<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> </select>
@ -1498,12 +1505,6 @@
where ltad.waybill_id is not null where ltad.waybill_id is not null
and ltad.create_time > '2024-10-22 00:00:00' and ltad.create_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != lww.destination_warehouse_id 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.brandList != null and param.brandList.size() > 0"> <if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in and lww.brand in
<foreach collection="param.brandList" item="item" open="(" separator="," close=")"> <foreach collection="param.brandList" item="item" open="(" separator="," close=")">
@ -1545,7 +1546,6 @@
</if> </if>
<if test="param.trainNumber != null and param.trainNumber !='' "> <if test="param.trainNumber != null and param.trainNumber !='' ">
and GROUP_CONCAT(DISTINCT ltad.train_number) like concat('%',#{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>
<if test="param.loadCode != null and param.loadCode !='' "> <if test="param.loadCode != null and param.loadCode !='' ">
and GROUP_CONCAT(DISTINCT IFNULL(ltcls.load_code,ltclsm.load_code)) like concat('%',#{param.loadCode},'%') and GROUP_CONCAT(DISTINCT IFNULL(ltcls.load_code,ltclsm.load_code)) like concat('%',#{param.loadCode},'%')
@ -1558,6 +1558,27 @@
lww.departure_warehouse_name, lww.departure_warehouse_name,
lww.destination_warehouse_name, lww.destination_warehouse_name,
oat.day_time oat.day_time
<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> </select>

6
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java

@ -415,6 +415,8 @@ public class ReportTimeServiceImpl implements IReportTimeService {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr())); reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr())); reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setOpenTimeStart(CommonUtil.getStartByDateStr(reportTimeDTO.getOpenTimeStartStr()));
reportTimeDTO.setOpenTimeEnd(CommonUtil.getEndByDateStr(reportTimeDTO.getOpenTimeEndStr()));
reportTimeDTO.setDayTime(0); reportTimeDTO.setDayTime(0);
@ -447,9 +449,9 @@ public class ReportTimeServiceImpl implements IReportTimeService {
reportTimeDTO.setDayTime(orderAllEntity.getDayTime()); reportTimeDTO.setDayTime(orderAllEntity.getDayTime());
} }
List<ReportConfigOrderAllEntity> list = reportTimeMapper.orderAllTimeExport(reportTimeDTO); List<ReportOrderAllTimeVO> list = reportTimeMapper.orderAllTimeExport(reportTimeDTO);
//导出ls //导出ls
ExcelUtil.export(response, "订单整体时效报表导出", "订单整体时效报表导出", list, ReportConfigOrderAllEntity.class); ExcelUtil.export(response, "订单整体时效报表导出", "订单整体时效报表导出", list, ReportOrderAllTimeVO.class);
} }
} }

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

@ -9043,7 +9043,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId);
if(!Objects.isNull(warehouseConfig)){ if(!Objects.isNull(warehouseConfig)){
Integer isTrunklineLoadingPhoto = warehouseConfig.getIsTrunklineLoadingPhoto(); Integer isTrunklineLoadingPhoto = warehouseConfig.getIsTrunklineLoadingPhoto();
if(NumberUtil.equals(isTrunklineLoadingPhoto,1)){ if(!Objects.isNull(isTrunklineLoadingPhoto) && NumberUtil.equals(isTrunklineLoadingPhoto,1)){
//限制装车之前上传图片 //限制装车之前上传图片
Integer isLoadingPhoto = loadLineEntity.getIsLoadingPhoto(); Integer isLoadingPhoto = loadLineEntity.getIsLoadingPhoto();
if(NumberUtil.equals(isLoadingPhoto,0)){ if(NumberUtil.equals(isLoadingPhoto,0)){

Loading…
Cancel
Save