Browse Source

修复模块名称

master
pref_mail@163.com 10 months ago
parent
commit
96ad8b2e0a
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  2. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/BusinessPreOrderDataQueueHandler.java
  3. 89
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java

@ -9,7 +9,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="-pref";
public static final String DEVAUTH ="";
/**
* 工厂对接服务名称

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/BusinessPreOrderDataQueueHandler.java

@ -73,11 +73,26 @@ public class BusinessPreOrderDataQueueHandler {
private final IDistributionAsyncService distributionAsyncService;
@RabbitHandler
public void businessPreOrderDataHandler(Map map, Message message, Channel channel) {
// plantA(map);
R<List<Tenant>> tenantList = sysClient.getTenantList();
if(tenantList.isSuccess()){
List<Tenant> data = tenantList.getData();
data.forEach(tenant -> {
if(!ObjectUtil.isEmpty(tenant.getTenantType())){
if(2==tenant.getTenantType()){
String mallName = tenant.getTenantName();
extracted(map, mallName);
}
}
});
}
// plantA(map);
String mallName = "仁寿欧派大家居";
}
private void extracted(Map map, String mallName) {
// 查询推送包件
List<DistributionParcelListEntity> distributionParcelListEntities = allList(map, mallName);
if (ObjectUtil.isEmpty(distributionParcelListEntities)) {
@ -118,7 +133,6 @@ public class BusinessPreOrderDataQueueHandler {
distributionAsyncService.saveOtherData(tenant.getTenantId(),waybillBilllByWaybillNos, trunklineAdvanceDetailEntities, trunklineAdvanceEntities, trunklineWaybillPackageEntities, trunklineWaybillOrderEntities, warehouseWayBillDetails, distributionParcelListEntities, mallName);
return null;
});
}

89
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -2842,16 +2842,41 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
waybillBilllByWaybillNo.setTenantId(tenant.getTenantId());
Long l = warehouseWaybillClient.addEnntity(waybillBilllByWaybillNo);
waybillBilllByWaybillNo.setId(l);
WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(waybillBilllByWaybillNo.getWaybillNo());
if(byWaybillNo==null){
Long l = warehouseWaybillClient.addEnntity(waybillBilllByWaybillNo);
waybillBilllByWaybillNo.setId(l);
}else{
waybillBilllByWaybillNo.setId(byWaybillNo.getId());
}
List<WarehouseWayBillDetail> byWaybillId = warehouseWaybillDetailClient.findByWaybillId(waybillBilllByWaybillNo.getId());
for (WarehouseWayBillDetail warehouseWayBillDetail : t) {
warehouseWayBillDetail.setId(null);
warehouseWayBillDetail.setWaybillId(waybillBilllByWaybillNo.getId());
warehouseWaybillDetailClient.addEntity(warehouseWayBillDetail);
for (WarehouseWayBillDetail wayBillDetail : byWaybillId) {
if(wayBillDetail.getProductName().equals(warehouseWayBillDetail.getProductName())){
// 不执行
warehouseWayBillDetail.setId(wayBillDetail.getId());
break;
}
}
if(warehouseWayBillDetail.getId()==null){
warehouseWayBillDetail.setWaybillId(waybillBilllByWaybillNo.getId());
warehouseWaybillDetailClient.addEntity(warehouseWayBillDetail);
}
}
List<TrunklineWaybillOrderEntity> listByWaybillNo = trunklineWaybillOrderClient.findListByWaybillNo(waybillBilllByWaybillNo.getWaybillNo());
for (TrunklineWaybillOrderEntity trunklineWaybillOrderEntity : collect1) {
trunklineWaybillOrderEntity.setId(null);
@ -2872,8 +2897,26 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
trunklineWaybillOrderEntity.setAdvanceId(foundEntity.getId());
}
Long l1 = trunklineWaybillOrderClient.addEntityReturnId(trunklineWaybillOrderEntity);
trunklineWaybillOrderEntity.setId(l1);
for (TrunklineWaybillOrderEntity waybillOrderEntity : listByWaybillNo) {
if(waybillOrderEntity.getOrderCode().equals(trunklineWaybillOrderEntity.getOrderCode())){
trunklineWaybillOrderEntity.setId(waybillOrderEntity.getId());
}
}
if(trunklineWaybillOrderEntity.getId()==null){
Long l1 = trunklineWaybillOrderClient.addEntityReturnId(trunklineWaybillOrderEntity);
trunklineWaybillOrderEntity.setId(l1);
}
List<Long> ids = Arrays.asList(waybillBilllByWaybillNo.getId());
List<TrunklineWaybillPackageEntity> listByWaybillIds = trunklineWaybillPackageClient.findListByWaybillIds(ids);
for (TrunklineWaybillPackageEntity trunklineWaybillPackageEntity : collect3) {
trunklineWaybillPackageEntity.setId(null);
@ -2892,8 +2935,21 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
}
for (TrunklineWaybillPackageEntity listByWaybillId : listByWaybillIds) {
if(listByWaybillId.getWaybillId().equals(trunklineWaybillPackageEntity.getWaybillId())){
if(listByWaybillId.getOrderPackageCode().equals(trunklineWaybillPackageEntity.getOrderPackageCode())){
trunklineWaybillPackageEntity.setId(listByWaybillId.getId());
break;
}
}
}
if(trunklineWaybillPackageEntity.getId()==null){
trunklineWaybillPackageClient.addEntity(trunklineWaybillPackageEntity);
}
trunklineWaybillPackageClient.addEntity(trunklineWaybillPackageEntity);
}
}
@ -2912,7 +2968,26 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
private void saveTrunklineAdvanceDetailEntity(List<TrunklineAdvanceDetailEntity> t, TrunklineAdvanceEntity trunklineAdvanceEntity, String mallName) {
Tenant tenant = changeDataBase(mallName);
List<Long> ids = Arrays.asList(trunklineAdvanceEntity.getId());
List<TrunklineAdvanceDetailVO> listByAdvanceIds = trunklineAdvanceDetailClient.findListByAdvanceIds(ids);
for (TrunklineAdvanceDetailEntity trunklineAdvanceDetailEntity : t) {
// 检测 保存的对象是否已经存在
for (TrunklineAdvanceDetailVO listByAdvanceId : listByAdvanceIds) {
if(listByAdvanceId.getOrderPackageCode().equals(trunklineAdvanceDetailEntity.getOrderPackageCode())){
trunklineAdvanceDetailEntity.setId(listByAdvanceId.getId());
break;
}
}
trunklineAdvanceDetailEntity.setPackageStatus("0");
trunklineAdvanceDetailEntity.setAdvanceId(trunklineAdvanceEntity.getId());
trunklineAdvanceDetailEntity.setTenantId(tenant.getTenantId());

Loading…
Cancel
Save