Browse Source

1.干线bug修复

master
zhenghaoyu 4 months ago
parent
commit
7629ad6d5f
  1. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java
  2. 26
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java
  3. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java
  4. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/AdvanceDetailDealListener.java
  5. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/CarsLoadDealListener.java
  6. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java
  7. 14
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  8. 33
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  9. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

6
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java

@ -24,4 +24,10 @@ public interface ITrunklineCarsLoadClient {
@GetMapping(API_PREFIX+"/saveCostShareRecord")
void saveCostShareRecord(@RequestParam Long loadId);
@GetMapping(API_PREFIX+"/dealWaybillCancleCheck")
void dealWaybillCancleCheck(@RequestParam String waybillNo);
@GetMapping(API_PREFIX+"/dealWaybillCheck")
void dealWaybillCheck(@RequestParam String waybillNo);
}

26
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java

@ -1369,5 +1369,31 @@ public class SyncOrderInfoToPlatform {
}
@XxlJob("dealWaybillCheck")
public ReturnT<String> dealWaybillCheck(String param) {
log.info("############dealWaybillCheck: 处理运单重新审核 开始");
List<JSONObject> ls = warehouseMappingDataService.findAllDealWithWaybillNo();
ls.forEach(json -> {
Integer id = json.getInt("id");
String waybillNo = json.getStr("waybillNo");
log.info("###################dealWaybillCheck: 当前处理的运单为 waybillNo={}",waybillNo);
carsLoadClient.dealWaybillCancleCheck(waybillNo);
carsLoadClient.dealWaybillCheck(waybillNo);
warehouseMappingDataService.updateStatusDealwithWaybillById(id);
});
log.info("############dealWaybillCheck: 处理运单重新审核 完成");
return ReturnT.SUCCESS;
}
}

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java

@ -2,6 +2,7 @@ package com.logpm.trunkline.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.service.IOpenOrderService;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
public class TrunklineCarsLoadClient implements ITrunklineCarsLoadClient{
private final ITrunklineCarsLoadService carsLoadService;
private final IOpenOrderService openOrderService;
@Override
public TrunklineCarsLoadEntity findEntityByCarsNo(String carsNo) {
@ -35,4 +37,15 @@ public class TrunklineCarsLoadClient implements ITrunklineCarsLoadClient{
public void saveCostShareRecord(Long loadId) {
carsLoadService.saveCostShareRecord(loadId);
}
@Override
public void dealWaybillCancleCheck(String waybillNo) {
openOrderService.patchCancleCheckWaybill(waybillNo);
}
@Override
public void dealWaybillCheck(String waybillNo) {
openOrderService.patchCheckWaybill(waybillNo);
}
}

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/AdvanceDetailDealListener.java

@ -327,6 +327,8 @@ public class AdvanceDetailDealListener {
ReportPackageBasicEntity reportPackageBasicEntity = new ReportPackageBasicEntity();
reportPackageBasicEntity.setWaybillNo(waybill.getWaybillNo());
reportPackageBasicEntity.setOrderCode(waybill.getWaybillNo());
reportPackageBasicEntity.setProductId(detail.getProductId());
reportPackageBasicEntity.setProductName(detail.getProductName());
reportPackageBasicEntity.setNum(detail.getNum());
reportPackageBasicEntity.setWeight(detail.getWeight());
reportPackageBasicEntity.setVolume(detail.getVolume());
@ -450,7 +452,7 @@ public class AdvanceDetailDealListener {
reportPackageBasicEntity.setSystemType(entity.getSystemType());
reportPackageBasicEntity.setCustomerTrain(entity.getCustomerTrain());
reportPackageBasicEntity.setBrandId(entity.getBrandId());
reportPackageBasicEntity.setBrand(entity.getBrand());
reportPackageBasicEntity.setBrand(entity.getBrandName());
reportPackageBasicEntity.setWarehouse(warehouse);
reportPackageBasicEntity.setWarehouseId(warehouseId);
addList.add(reportPackageBasicEntity);

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/report/CarsLoadDealListener.java

@ -275,6 +275,12 @@ public class CarsLoadDealListener {
Map<String, PackageData> packageDataMap = packageDataListByPackageType.stream().collect(Collectors.toMap(PackageData::getPackageCode, Function.identity()));
List<ReportPackageBasicEntity> packageBasicEntityList = reportPackageBasicService.findByOrderPackageCodes(packageCodes);
//把packageBasicEntityList转化成以orderPackageCode为key的Map
Map<String, ReportPackageBasicEntity> packageBasicEntityMap = packageBasicEntityList.stream().collect(Collectors.toMap(ReportPackageBasicEntity::getOrderPackageCode, Function.identity()));
// reportPackageTrunklineService.
packageBasicEntityList.forEach(entity -> {
ReportPackageTrunklineEntity reportPackageTrunklineEntity = new ReportPackageTrunklineEntity();
reportPackageTrunklineEntity.setBasicId(entity.getId());

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

@ -109,5 +109,9 @@ public interface IOpenOrderService {
*/
R checkWaybillList(CheckWaybillListDTO openOrderDTO);
void patchCancleCheckWaybill(String waybillNo);
void patchCheckWaybill(String waybillNo);
// R findWaybillInfo(String waybillNo);
}

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

@ -869,7 +869,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
json.put("details", packageDataList);
nodeFanoutMsg.setMain(json);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
sendFanoutService.sendFanoutMsg(fanoutMsg);
}
@ -938,7 +938,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
json.put("details", packageDataList);
nodeFanoutMsg.setMain(json);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
sendFanoutService.sendFanoutMsg(fanoutMsg);
}
@ -973,7 +973,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
nodeFanoutMsg.setMain(json);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
sendFanoutService.sendFanoutMsg(fanoutMsg);
}
@ -1011,7 +1011,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
json.put("details", packageDataList);
nodeFanoutMsg.setMain(json);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
sendFanoutService.sendFanoutMsg(fanoutMsg);
@ -1052,7 +1052,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
nodeFanoutMsg.setMain(json);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
sendFanoutService.sendFanoutMsg(fanoutMsg);
}
@ -1095,7 +1095,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
json.put("details", packageDataList);
nodeFanoutMsg.setMain(json);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
sendFanoutService.sendFanoutMsg(fanoutMsg);
@ -1132,7 +1132,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
json.put("details", packageDataList);
nodeFanoutMsg.setMain(json);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.CARSLOADDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build();
sendFanoutService.sendFanoutMsg(fanoutMsg);
}

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

@ -197,6 +197,37 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
return R.success("批量审核成功");
}
@Override
public void patchCancleCheckWaybill(String waybillNo) {
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(!Objects.isNull(warehouseWaybillEntity)){
OpenOrderDTO openOrderDTO = new OpenOrderDTO();
openOrderDTO.setWaybillId(warehouseWaybillEntity.getId());
openOrderDTO.setCheckRemark("系统皮脸处理");
openOrderDTO.setWarehouseId(warehouseWaybillEntity.getDestinationWarehouseId());
openOrderDTO.setWarehouseName(warehouseWaybillEntity.getDestinationWarehouseName());
cancleCheckWaybill(openOrderDTO);
}
}
@Override
public void patchCheckWaybill(String waybillNo) {
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(!Objects.isNull(warehouseWaybillEntity)){
OpenOrderDTO openOrderDTO = new OpenOrderDTO();
openOrderDTO.setWaybillId(warehouseWaybillEntity.getId());
openOrderDTO.setCheckRemark("系统皮脸处理");
openOrderDTO.setCheckReson("系统审核");
openOrderDTO.setWarehouseId(warehouseWaybillEntity.getDestinationWarehouseId());
openOrderDTO.setWarehouseName(warehouseWaybillEntity.getDestinationWarehouseName());
checkWaybill(openOrderDTO);
}
}
@Override
public List<TrunklineAdvanceDetailVO> findAdvanceDetailList(Long advanceId) {
return advanceDetailService.findList(advanceId);
@ -1163,7 +1194,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setNode(WorkNodeEnums.OPEN_ORDER);
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
nodeFanoutMsg.setBizOperation(BizOperationEnums.MODIFY);
nodeFanoutMsg.setOperator(nickName);
nodeFanoutMsg.setOperatorId(userId);
nodeFanoutMsg.setWarehouse(warehouseName);

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

@ -569,8 +569,8 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
packageData.setVolume(detailEntity.getVolume());
packageData.setPackageType(PackageTypeEnums.CMP);
packageData.setCustomerTrain(detailEntity.getTrainNumber());
packageData.setDealerCode(dealerName);
packageData.setDealerName(dealerCode);
packageData.setDealerCode(dealerCode);
packageData.setDealerName(dealerName);
String brand = detailEntity.getBrand();
packageData.setBrandId(brandMap.get(brand));
packageData.setBrandName(brand);

Loading…
Cancel
Save