Browse Source

取消对老系统的站存单的数据推送

single_db
pref_mail@163.com 1 year ago
parent
commit
530d02b14b
  1. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  2. 3
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java
  3. 16
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java
  4. 2
      blade-service/logpm-factory/src/main/resources/application.yml
  5. 30
      blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1257,8 +1257,14 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (!Func.isEmpty(reservationStocklistEntityList)) { if (!Func.isEmpty(reservationStocklistEntityList)) {
//对库存品进行操作 //对库存品进行操作
reservationStocklistEntityList.forEach(l -> { reservationStocklistEntityList.forEach(l -> {
log.info(">>>> debug1 {}",l.getStocklistId());
DistributionStockListEntity stockListEntity = distributionStockListService.getById(l.getStocklistId()); DistributionStockListEntity stockListEntity = distributionStockListService.getById(l.getStocklistId());
log.info(">>>> debug2 {}",stockListEntity);
log.info(">>>> debug3 {}",l.getReservationNum());
if(stockListEntity.getQuantityStock() != null && stockListEntity.getQuantityStock()!=0){
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - l.getReservationNum()); stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - l.getReservationNum());
}
hashSet.add(stockListEntity.getOrderCode()); hashSet.add(stockListEntity.getOrderCode());
stockListId.append(stockListEntity.getId()).append(","); stockListId.append(stockListEntity.getId()).append(",");
//这里需要将库存品信息和配送进行信息绑定 //这里需要将库存品信息和配送进行信息绑定

3
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java

@ -451,6 +451,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
if (ObjectUtils.isNull(advanceEntitys)) { if (ObjectUtils.isNull(advanceEntitys)) {
AdvanceEntity advanceEntity = new AdvanceEntity(); AdvanceEntity advanceEntity = new AdvanceEntity();
advanceEntity.setOrderSelfNum(StringUtil.isBlank(factoryOrderEntity.getSelfCode()) ? "" : factoryOrderEntity.getSelfCode()); //订单自编号 advanceEntity.setOrderSelfNum(StringUtil.isBlank(factoryOrderEntity.getSelfCode()) ? "" : factoryOrderEntity.getSelfCode()); //订单自编号
advanceEntity.setSiteName(receivingOrderEntity.getFromWarehouseName()); // 基地 TODO 需要映射 advanceEntity.setSiteName(receivingOrderEntity.getFromWarehouseName()); // 基地 TODO 需要映射
@ -466,7 +467,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
advanceEntity.setFirstPackCode(""); //一级品类 advanceEntity.setFirstPackCode(""); //一级品类
advanceEntity.setDealerName(factoryOrderEntity.getShopName()); //商场名称 advanceEntity.setDealerName(factoryOrderEntity.getShopName()); //商场名称
advanceEntity.setDealerCode(factoryOrderEntity.getShopCode()); //商场编码 advanceEntity.setDealerCode(factoryOrderEntity.getShopCode()); //商场编码
advanceEntity.setDueDate(""); // 交期 advanceEntity.setDueDate(""); /// 交期
advanceEntity.setIsOpai(0); //是否干仓配 advanceEntity.setIsOpai(0); //是否干仓配
advanceEntity.setOrderNum("");//MSCS订单号 可以为空 advanceEntity.setOrderNum("");//MSCS订单号 可以为空
advanceEntity.setCarrierName("汇通");//承运商 可以为空 advanceEntity.setCarrierName("汇通");//承运商 可以为空

16
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

@ -104,7 +104,8 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
// 对返回i的数据进行处理 按照 发车单-->订单-->包件 完成保存 // 对返回i的数据进行处理 按照 发车单-->订单-->包件 完成保存
handleData(code); handleData(code);
if (ObjectUtils.isNotNull(code)) { if (ObjectUtils.isNotNull(code)) {
asyncDataService.handlerOuPaiDataToHt(code); // 暂停推送
// asyncDataService.handlerOuPaiDataToHt(code);
} }
return code; return code;
@ -739,10 +740,9 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
String selfCode = orderEntity.getString("SelfCode");//订单自编码 String selfCode = orderEntity.getString("SelfCode");//订单自编码
//先查询是否存在订单自编码 //先查询是否存在订单自编码
// //
// factoryOrderService.selectEntityBySelfCode(selfCode,receivingId); FactoryOrderEntity factoryOrderEntity = factoryOrderService.selectEntityBySelfCode(selfCode, receivingId);
if(Objects.isNull(factoryOrderEntity)){
factoryOrderEntity = new FactoryOrderEntity();
FactoryOrderEntity factoryOrderEntity = new FactoryOrderEntity();
factoryOrderEntity.setCode(orderEntity.getString("Code")); factoryOrderEntity.setCode(orderEntity.getString("Code"));
factoryOrderEntity.setSelfCode(selfCode); factoryOrderEntity.setSelfCode(selfCode);
factoryOrderEntity.setContractNumber(orderEntity.getString("ContractNumber")); factoryOrderEntity.setContractNumber(orderEntity.getString("ContractNumber"));
@ -838,16 +838,14 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
factoryOrderEntity.setReceiptStatus(0); factoryOrderEntity.setReceiptStatus(0);
factoryOrderEntity.setPushStatus(0); factoryOrderEntity.setPushStatus(0);
factoryOrderEntity.setTurnStatus(0); factoryOrderEntity.setTurnStatus(0);
// //
boolean save = factoryOrderService.save(factoryOrderEntity); boolean save = factoryOrderService.save(factoryOrderEntity);
if (!save) { if (!save) {
log.error("############handleData: 保存订单失败 selfCode={}", selfCode); log.error("############handleData: 保存订单失败 selfCode={}", selfCode);
throw new CustomerException(403, "保存订单失败"); throw new CustomerException(403, "保存订单失败");
} }
}
//保存订单成功,继续保存包件 //保存订单成功,继续保存包件
Long orderId = factoryOrderEntity.getId(); Long orderId = factoryOrderEntity.getId();
String packageCode = packageEntity.getString("Code"); String packageCode = packageEntity.getString("Code");

2
blade-service/logpm-factory/src/main/resources/application.yml

@ -46,5 +46,5 @@ xxl:
ip: 127.0.0.1 ip: 127.0.0.1
logpath: ../data/applogs/logpm-factory-xxljob/jobhandler logpath: ../data/applogs/logpm-factory-xxljob/jobhandler
logretentiondays: -1 logretentiondays: -1
port: 7018 port: 7019

30
blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

@ -19,7 +19,9 @@ import com.logpm.factory.listener.OrderStatusLogListener;
import com.logpm.factory.oupai.entity.FactoryPackageEntity; import com.logpm.factory.oupai.entity.FactoryPackageEntity;
import com.logpm.factory.oupai.entity.OpOrderStatusLogEntity; import com.logpm.factory.oupai.entity.OpOrderStatusLogEntity;
import com.logpm.factory.oupai.service.IFactoryPackageService; import com.logpm.factory.oupai.service.IFactoryPackageService;
import com.logpm.factory.oupai.service.IOuPaiFactoryDataService;
import com.logpm.factory.oupai.service.impl.OuPaiFactoryServiceImpl; import com.logpm.factory.oupai.service.impl.OuPaiFactoryServiceImpl;
import com.logpm.factory.oupai.vo.OuPaiDataPushVO;
import com.logpm.factory.pan.service.IPanFactoryDataService; import com.logpm.factory.pan.service.IPanFactoryDataService;
import com.logpm.factory.props.ZbFactoryProperties; import com.logpm.factory.props.ZbFactoryProperties;
import com.logpm.factory.snm.bean.Resp; import com.logpm.factory.snm.bean.Resp;
@ -93,6 +95,9 @@ public class TestService {
@Autowired @Autowired
private ZbFactoryProperties zbFactoryProperties; private ZbFactoryProperties zbFactoryProperties;
@Autowired
private IOuPaiFactoryDataService ouPaiFactoryDataService;
@Autowired @Autowired
private ZbCategoryContrastMapper zbCategoryContrastMapper; private ZbCategoryContrastMapper zbCategoryContrastMapper;
@Test @Test
@ -781,6 +786,31 @@ public class TestService {
}
@Test
public void test18(){
// 本地测试 推送服务器
/**
* {"event":3,"key":
* "fdee4693-5321-4713-9ce8-aec9581011ec",
* "orderCode":"SH20231217-1053",
* "typeName":"ReceivingOrder",
* "warehouseName":"汇通南充仓"}
*/
OuPaiDataPushVO ouPaiDataPushVO = new OuPaiDataPushVO();
ouPaiDataPushVO.setEvent(3);
ouPaiDataPushVO.setOrderCode("SH20231217-1053");
ouPaiDataPushVO.setKey("fdee4693-5321-4713-9ce8-aec9581011ec");
ouPaiDataPushVO.setTypeName("ReceivingOrder");
ouPaiDataPushVO.setWarehouseName("汇通南充仓");
ouPaiFactoryDataService.saveData(ouPaiDataPushVO);
} }

Loading…
Cancel
Save