Browse Source

1.增加Ht使用欧派系统 不进行数据回推的逻辑,需要增加字典表中ht_use_op_shops key 维护这些key value 存在这字典表的数据将不会进行推送

training
pref_mail@163.com 1 year ago
parent
commit
9bf11b122a
  1. 35
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java
  2. 240
      blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

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

@ -31,6 +31,8 @@ import org.springblade.core.oss.model.BladeFile;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.resource.feign.IOssClient;
import org.springblade.system.cache.DictCache;
import org.springblade.system.entity.Dict;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
@ -42,10 +44,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.*;
@Slf4j
@Service
@ -355,6 +354,12 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
return Resp.fail(400, "包条为干仓配的数据类型");
}
boolean isPushHtNomal = checkOpfactoryOrderBusinessModel(factoryOrder);
if(!isPushHtNomal){
log.info("oupai- 该包条为汇通使用欧派系统进行作业类型型 不进行推送 >>> unitNo={} businessModel:{}", unitNo, factoryOrder.getBusinessModel());
return Resp.fail(400, "该包条为汇通使用欧派系统进行作业类型");
}
// 通过仓库编码查询
ReceivingOrderEntity receivingOrderEntity = receivingOrderMapper.selectById(factoryOrder.getReceivingId());
@ -411,6 +416,28 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
return Resp.success("物流状态传递成功");
}
/**
* 根据汇通业务提供是否操作欧派系统的商场 来决定是否会推数据
* 如果需要使用欧派系统 这里就需要不进行回传
* @param factoryOrder 工厂订单
* @return true 匹配到维护的商场 就不需要进行回传
*/
private boolean checkOpfactoryOrderBusinessModel(FactoryOrderEntity factoryOrder) {
String shopCode = factoryOrder.getShopCode();
// 获取字典上配置的不
log.info(" >>>>>>>>>>>>>>>>>>>>>>> 传入的订单参数商场 {}",shopCode);
List<Dict> htUseOpShops = DictCache.getList("ht_use_op_shops");
log.info(" >>>>>>>>>>>>>>>>>>>>>>> 配置的使用欧派系统的商场 {}",htUseOpShops);
for (Dict htUseOpShop : htUseOpShops) {
if(shopCode.equals(htUseOpShop.getDictKey())){
return true;
}
}
return false;
}
private void handleSignBillData(String url, Integer event) {
OpOrderStatusLogEntity opOrderStatusLogEntity = sendRequestData(url, event);

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

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save