Browse Source

Merge remote-tracking branch 'origin/fix_bug_20240104' into fix_bug_20240104

single_db
pref_mail@163.com 1 year ago
parent
commit
194bd5b022
  1. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java
  2. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLogEntity.java
  3. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java
  4. 6
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java
  5. 9
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  6. 51
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java
  7. 14
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java
  8. 50
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml
  9. 14
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java
  10. 10
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  11. 35
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java
  12. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java
  13. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml
  14. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
  15. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java
  16. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java
  17. 14
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  18. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java
  19. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java
  20. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml
  21. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java
  22. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  23. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

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

@ -109,5 +109,8 @@ public class TrunklineBillladingEntity extends TenantEntity {
/** 创建人名称 */
@ApiModelProperty(name = "创建人名称",notes = "")
private String createUserName ;
/** remark */
@ApiModelProperty(name = "备注",notes = "")
private String remark ;
}

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLogEntity.java

@ -45,9 +45,9 @@ public class TrunklineBillladingLogEntity extends TenantEntity {
private Long billladingId ;
/** 描述内容 */
@ApiModelProperty(name = "操作后",notes = "")
private String after ;
private String afterOpreation ;
/** 描述内容 */
@ApiModelProperty(name = "操作前",notes = "")
private String before ;
private String beforeOpreation ;
}

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java

@ -19,5 +19,6 @@ public class TrunklineBillladingVO extends TrunklineBillladingEntity {
private List<TrunklineBillladingWaybillVO> waybillList = new ArrayList<>();
private List<TrunklineBillladingLineVO> lineList = new ArrayList<>();
}

6
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java

@ -65,4 +65,10 @@ public interface IWarehouseWaybillClient {
@GetMapping(API_PREFIX + "/findList")
List<WarehouseWaybillEntity> findList();
@GetMapping(API_PREFIX + "/findMoreWaybillNo")
List<String> findMoreWaybillNo();
@GetMapping(API_PREFIX + "/findLastData")
Long findLastData(@RequestParam String waybillNo);
}

9
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -113,6 +113,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
private final ITrunklineAdvanceDetailClient trunklineAdvanceDetailClient;
private final IOrderCountClient orderCountClient;
private final BladeRedis redis;
// @Override
// public FactoryTokenVO getToken(String corpId, String appKey, String appSecret) throws NoSuchAlgorithmException {
@ -700,6 +701,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
entity.setOrderCode(distributionStockArticleEntity.getOrderCode());
entity.setServiceNumber(distributionStockArticleEntity.getServiceNumber());
entity.setWaybillNumber(waybillNo);
entity.setBrandName(distributionStockArticleEntity.getBrand());
// if(ObjectUtil.isNotEmpty(warehouseWaybill)){
// entity.setWarehouseId(warehouseWaybill.getId());
// }
@ -769,11 +771,18 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
if (StringUtil.isBlank(waybillNo)) {
return;
}
if(redis.exists("dealwithWaybillNo:"+waybillNo)){
log.info("###########saveWaybillEntity: 已有保存数据 waybillNo={}",waybillNo);
return;
}
//通过运单号先去查询新系统是否存在这个运单号
WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo);
logger.info("#################handleDataToPlatform.warehouseWaybill: {}", warehouseWaybill);
if (Objects.isNull(warehouseWaybill)) {
redis.setEx("dealwithWaybillNo:"+waybillNo,waybillNo,30L);
//如果新系统中不存在这个运单,那么就去查询老系统的运单数据
WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(waybillNo);
logger.info("#################handleDataToPlatform.wayBillEntity: {}", wayBillEntity);

51
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java

@ -6,6 +6,7 @@ import com.logpm.basicdata.feign.*;
import com.logpm.oldproject.entity.*;
import com.logpm.oldproject.feign.*;
import com.logpm.patch.service.IWarehouseMappingDataService;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
@ -27,6 +28,8 @@ public class SyncWarehouseData {
private final IBasicdataGoodsAllocationClient basicdataGoodsAllocationClient;//货位
private final IBasicdataTrayClient basicdataTrayClient;//托盘
private final IWarehouseWaybillClient warehouseWaybillClient;
//-----------------老系统
private final IWarehouseClient warehouseClient;//仓库
private final ICargoClient cargoClient;//货区
@ -294,6 +297,54 @@ public class SyncWarehouseData {
}
@XxlJob("clearWaybillData")
public ReturnT<String> clearWaybillData(String param) {
log.info("############clearWaybillData: 清理重复运单数据 param={}", param);
List<String> ls = new ArrayList<>();
if(StringUtil.isNotBlank(param)){
ls.add(param);
}else{
ls = warehouseMappingDataService.findMoreWaybillNo();
}
for (String waybillNo : ls) {
Long waybillId = warehouseMappingDataService.findLastData(waybillNo);
warehouseMappingDataService.deletedByNotId(waybillId,waybillNo);
}
return ReturnT.SUCCESS;
}
@XxlJob("clearAdvanceData")
public ReturnT<String> clearAdvanceData(String param) {
log.info("############clearAdvanceData: 清理重复暂存单数据 param={}", param);
List<String> ls = new ArrayList<>();
if(StringUtil.isNotBlank(param)){
ls.add(param);
}else{
ls = warehouseMappingDataService.findMoreOrderCode();
}
for (String orderCode : ls) {
Long advanceId = warehouseMappingDataService.findAdvanceLastData(orderCode);
warehouseMappingDataService.deletedAdvanceByNotId(advanceId,orderCode);
warehouseMappingDataService.deletedAdcanceDetailByNotId(advanceId,orderCode);
}
return ReturnT.SUCCESS;
}
private boolean saveTrayData(Long newWarehouseId, Integer oldWarehouseId) {
//通过老系统仓库id查询所有托盘信息
List<TrayEntity> trayEntityList = trayClient.getAllTrayByWarehouseId(oldWarehouseId);

14
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java

@ -32,4 +32,18 @@ public interface WarehouseMappingDataMapper {
List<JSONObject> findAllocationDoubleDataAll();
JSONObject findAllocationDoubleInfoListByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode);
List<String> findMoreWaybillNo();
Long findLastData(@Param("waybillNo") String waybillNo);
void deletedByNotId(@Param("waybillId") Long waybillId,@Param("waybillNo") String waybillNo);
List<String> findMoreOrderCode();
Long findAdvanceLastData(@Param("orderCode") String orderCode);
void deletedAdvanceByNotId(@Param("advanceId") Long advanceId, @Param("orderCode") String orderCode);
void deletedAdcanceDetailByNotId(@Param("advanceId") Long advanceId, @Param("orderCode") String orderCode);
}

50
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml

@ -83,4 +83,54 @@
limit 1
</select>
<select id="findMoreWaybillNo" resultType="String">
select waybill_no
from logpm_warehouse_waybill
group by waybill_no
HAVING count(id) > 1
</select>
<select id="findLastData" resultType="Long">
select id
from logpm_warehouse_waybill
where waybill_no = #{waybillNo}
order by create_time desc
limit 1
</select>
<delete id="deletedByNotId">
delete from logpm_warehouse_waybill
where waybill_no = #{waybillNo}
and id != #{waybillId}
</delete>
<select id="findMoreOrderCode" resultType="String">
select t.order_code
from (select order_code
from logpm_trunkline_advance_detail
group by order_package_code,order_code
HAVING count(id) > 1) t
group by t.order_code
</select>
<select id="findAdvanceLastData" resultType="Long">
select id
from logpm_trunkline_advance
where order_code = #{orderCode}
order by create_time desc
limit 1
</select>
<delete id="deletedAdvanceByNotId">
delete from logpm_trunkline_advance
where order_code = #{orderCode}
and id != #{advanceId}
</delete>
<delete id="deletedAdcanceDetailByNotId">
delete from logpm_trunkline_advance_detail
where order_code = #{orderCode}
and advance_id != #{advanceId}
</delete>
</mapper>

14
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java

@ -28,4 +28,18 @@ public interface IWarehouseMappingDataService {
List<JSONObject> findAllocationDoubleDataAll();
JSONObject findAllocationDoubleInfoListByOrderPackageCode(String orderPackageCode);
List<String> findMoreWaybillNo();
Long findLastData(String waybillNo);
void deletedByNotId(Long waybillId, String waybillNo);
List<String> findMoreOrderCode();
Long findAdvanceLastData(String orderCode);
void deletedAdvanceByNotId(Long advanceId, String orderCode);
void deletedAdcanceDetailByNotId(Long advanceId, String orderCode);
}

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

@ -37,6 +37,7 @@ import org.springblade.common.constant.order.*;
import org.springblade.common.constant.orderpackage.*;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service;
@ -81,6 +82,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
private final IDetailProductClient detailProductClient;
private final ITrunklineDetailProductClient trunklineDetailProductClient;
private final ITrunklineAdvanceDetailClient trunklineAdvanceDetailClient;
private final BladeRedis redis;
@Transactional(rollbackFor = Exception.class)
@Override
@ -1438,6 +1440,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
entity.setWarehouseId(distributionStockArticleEntity.getWarehouseId());
entity.setStockArticleId(distributionStockArticleEntity.getId());
entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue());
entity.setBrandName(distributionStockArticleEntity.getBrand());
//状态:1到货,2分拣,3装车,4卸货,5出库,6配送
// if(1 == status){
// entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue());
@ -1570,12 +1573,17 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
//如果新系统中不存在这个运单,那么就去查询老系统的运单数据
WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(waybillNo);
if(redis.exists("dealwithWaybillNo:"+waybillNo)){
log.info("###########saveWaybillEntity: 已有保存数据 waybillNo={}",waybillNo);
return null;
}
//通过运单号先去查询新系统是否存在这个运单号
WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo);
log.info("#################handleDataToPlatform.warehouseWaybill: {}", warehouseWaybill);
if (Objects.isNull(warehouseWaybill)) {
redis.setEx("dealwithWaybillNo:"+waybillNo,waybillNo,30L);
log.info("#################handleDataToPlatform.wayBillEntity: {}", wayBillEntity);
if (Objects.isNull(wayBillEntity)) {
log.warn("##############saveWaybillEntity: 老系统中未找到对应运单waybillNo={}", waybillNo);

35
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java

@ -71,4 +71,39 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer
public JSONObject findAllocationDoubleInfoListByOrderPackageCode(String orderPackageCode) {
return warehouseMappingDataMapper.findAllocationDoubleInfoListByOrderPackageCode(orderPackageCode);
}
@Override
public List<String> findMoreWaybillNo() {
return warehouseMappingDataMapper.findMoreWaybillNo();
}
@Override
public Long findLastData(String waybillNo) {
return warehouseMappingDataMapper.findLastData(waybillNo);
}
@Override
public void deletedByNotId(Long waybillId, String waybillNo) {
warehouseMappingDataMapper.deletedByNotId(waybillId,waybillNo);
}
@Override
public List<String> findMoreOrderCode() {
return warehouseMappingDataMapper.findMoreOrderCode();
}
@Override
public Long findAdvanceLastData(String orderCode) {
return warehouseMappingDataMapper.findAdvanceLastData(orderCode);
}
@Override
public void deletedAdvanceByNotId(Long advanceId, String orderCode) {
warehouseMappingDataMapper.deletedAdvanceByNotId(advanceId,orderCode);
}
@Override
public void deletedAdcanceDetailByNotId(Long advanceId, String orderCode) {
warehouseMappingDataMapper.deletedAdcanceDetailByNotId(advanceId,orderCode);
}
}

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java

@ -2,8 +2,15 @@ package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.trunkline.entity.TrunklineBillladingLineEntity;
import com.logpm.trunkline.vo.TrunklineBillladingLineVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface TrunklineBillladingLineMapper extends BaseMapper<TrunklineBillladingLineEntity> {
List<TrunklineBillladingLineVO> findListByBillladingId(@Param("billladingId") Long billladingId);
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml

@ -2,5 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineBillladingLineMapper">
<select id="findListByBillladingId" resultType="com.logpm.trunkline.vo.TrunklineBillladingLineVO">
select *
from logpm_trunkline_billlading_line
where billlading_id = #{billladingId}
and is_deleted = 0
</select>
</mapper>

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

@ -55,7 +55,10 @@
line_name_title lineNameTitle,
plan_num planNum,
charge_type chargeType,
billlading_status billladingStatus
billlading_status billladingStatus,
warehouse_name warehouseName,
carrier_name carrierName,
remark remark
from logpm_trunkline_billlading
where billlading_status = '2'

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

@ -1,9 +1,14 @@
package com.logpm.trunkline.service;
import com.logpm.trunkline.entity.TrunklineBillladingLineEntity;
import com.logpm.trunkline.vo.TrunklineBillladingLineVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
public interface ITrunklineBillladingLineService extends BaseService<TrunklineBillladingLineEntity> {
void deleteByBillladingId(Long billladingId);
List<TrunklineBillladingLineVO> findListByBillladingId(Long billladingId);
}

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java

@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.trunkline.entity.TrunklineBillladingLineEntity;
import com.logpm.trunkline.mapper.TrunklineBillladingLineMapper;
import com.logpm.trunkline.service.ITrunklineBillladingLineService;
import com.logpm.trunkline.vo.TrunklineBillladingLineVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@AllArgsConstructor
@Service
@ -20,4 +23,9 @@ public class TrunklineBillladingLineServiceImpl extends BaseServiceImpl<Trunklin
queryWrapper.eq("billlading_id",billladingId);
baseMapper.delete(queryWrapper);
}
@Override
public List<TrunklineBillladingLineVO> findListByBillladingId(Long billladingId) {
return baseMapper.findListByBillladingId(billladingId);
}
}

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

@ -128,7 +128,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setContent("创建提货单 billladingCode="+billladingCode);
logEntity.setBillladingId(billladingId);
logEntity.setAfter(JSONObject.toJSONString(trunklineBillladingEntity));
logEntity.setAfterOpreation(JSONObject.toJSONString(trunklineBillladingEntity));
trunklineBillladingLogService.save(logEntity);
}
@ -172,7 +172,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setContent("修改提货单 billladingCode="+billladingCode);
logEntity.setBillladingId(billladingId);
logEntity.setBefore(JSONObject.toJSONString(billladingEntity));
logEntity.setBeforeOpreation(JSONObject.toJSONString(billladingEntity));
BeanUtil.copy(billladingDTO,billladingEntity);
updateById(billladingEntity);
@ -232,7 +232,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
}
}
logEntity.setAfter(JSONObject.toJSONString(billladingEntity));
logEntity.setAfterOpreation(JSONObject.toJSONString(billladingEntity));
trunklineBillladingLogService.save(logEntity);
}
@ -254,7 +254,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
logEntity.setWarehouseName(warehouseName);
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setBillladingId(billladingId);
logEntity.setBefore(JSONObject.toJSONString(billladingEntity));
logEntity.setBeforeOpreation(JSONObject.toJSONString(billladingEntity));
stringBuffer.append("变更提货单状态 billladingCode=").append(billladingCode);
@ -328,7 +328,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
//更新状态
updateById(billladingEntity);
logEntity.setContent(stringBuffer.toString());
logEntity.setAfter(JSONObject.toJSONString(billladingEntity));
logEntity.setAfterOpreation(JSONObject.toJSONString(billladingEntity));
trunklineBillladingLogService.save(logEntity);
}
@ -343,6 +343,10 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
TrunklineBillladingVO trunklineBillladingVO = new TrunklineBillladingVO();
BeanUtil.copy(billladingEntity,trunklineBillladingVO);
List<TrunklineBillladingLineVO> lineList = billladingLineService.findListByBillladingId(billladingId);
trunklineBillladingVO.setLineList(lineList);
//查询提货单关联的运单信息
List<TrunklineBillladingWaybillVO> ls = billladingWaybillService.findWaybillInfoListByBillladingId(billladingId);

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java

@ -61,4 +61,14 @@ public class WarehouseWaybillClient implements IWarehouseWaybillClient {
public List<WarehouseWaybillEntity> findList() {
return warehouseWaybillService.list();
}
@Override
public List<String> findMoreWaybillNo() {
return warehouseWaybillService.findMoreWaybillNo();
}
@Override
public Long findLastData(String waybillNo) {
return warehouseWaybillService.findLastData(waybillNo);
}
}

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

@ -50,4 +50,8 @@ public interface WarehouseWaybillMapper extends BaseMapper<WarehouseWaybillEntit
IPage<WarehouseWaybillEntity> pageInfo(IPage<Object> page,@Param("param") WarehouseWaybillDTO warehouseWaybillDTO);
IPage<WarehouseWaybillVO> pageList(IPage<Object> page, @Param("param") WarehouseWaybillDTO waybillDTO);
List<String> findMoreWaybillNo();
Long findLastData(@Param("waybillNo") String waybillNo);
}

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

@ -153,4 +153,15 @@
</if>
</select>
<select id="findMoreWaybillNo" resultType="String">
select waybill_no
from logpm_warehouse_waybill
group by waybill_no
HAVING count(id) > 1
</select>
<select id="findLastData" resultType="Long">
</select>
</mapper>

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java

@ -52,4 +52,8 @@ public interface IWarehouseWaybillService extends BaseService<WarehouseWaybillEn
IPage<WarehouseWaybillVO> pageList(WarehouseWaybillDTO waybillDTO);
R findWaybillInfo(String waybillNo);
List<String> findMoreWaybillNo();
Long findLastData(String waybillNo);
}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -52,6 +52,7 @@ import org.springblade.common.constant.orderpackage.*;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.ObjectUtil;
@ -120,6 +121,8 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
private ITrunklineDetailProductClient trunklineDetailProductClient;
@Autowired
private ITrunklineAdvanceClient trunklineAdvanceClient;
@Autowired
private BladeRedis redis;
@Override
public IPage<WarehouseTrayTypeVO> orderPageList(TrayTypeDTO trayTypeDTO,Long warehouseId) {
@ -3282,6 +3285,12 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
if (StringUtil.isBlank(waybillNo)) {
return null;
}
if(redis.exists("dealwithWaybillNo:"+waybillNo)){
log.info("###########saveWaybillEntity: 已有保存数据 waybillNo={}",waybillNo);
return null;
}
//如果新系统中不存在这个运单,那么就去查询老系统的运单数据
WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(waybillNo);
@ -3290,7 +3299,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
log.info("#################handleDataToPlatform.warehouseWaybill: {}", warehouseWaybill);
if (Objects.isNull(warehouseWaybill)) {
redis.setEx("dealwithWaybillNo:"+waybillNo,waybillNo,30L);
log.info("#################handleDataToPlatform.wayBillEntity: {}", wayBillEntity);
if (Objects.isNull(wayBillEntity)) {
log.warn("##############saveWaybillEntity: 老系统中未找到对应运单waybillNo={}", waybillNo);

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -727,4 +727,14 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
warehouseWaybillVO.setDetailList(detailList);
return R.data(warehouseWaybillVO);
}
@Override
public List<String> findMoreWaybillNo() {
return baseMapper.findMoreWaybillNo();
}
@Override
public Long findLastData(String waybillNo) {
return baseMapper.findLastData(waybillNo);
}
}

Loading…
Cancel
Save