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

dev_unify
wangwei 5 months ago
commit 9ac558a038

@ -347,6 +347,7 @@ public class UdiProductEntity {
*/ */
@TableField(value = "detailSort") @TableField(value = "detailSort")
private Integer detailSort; private Integer detailSort;
public Integer getMyBhxjsl() { public Integer getMyBhxjsl() {
if (bhxjsl == null || bhxjsl == 0) if (bhxjsl == null || bhxjsl == 0)
return 1; return 1;

@ -32,6 +32,7 @@ import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.ProductInfoService; import com.glxp.api.service.basic.ProductInfoService;
import com.glxp.api.service.basic.UdiProductService; import com.glxp.api.service.basic.UdiProductService;
import com.glxp.api.util.HttpClient; import com.glxp.api.util.HttpClient;
import com.glxp.api.util.alihealth.AlihealthUtils;
import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.FilterUdiUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -59,7 +60,8 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode
private CustomerService customerService; private CustomerService customerService;
@Resource @Resource
private ProductInfoService productInfoService; private ProductInfoService productInfoService;
@Resource
private AlihealthUtils alihealthUtils;
/** /**
* *
* *
@ -363,7 +365,7 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode
public void threadUpdateIoCodeTempEntity(String parentCode) { public void threadUpdateIoCodeTempEntity(String parentCode) {
List<IoCodeTempEntity> ioCodeTempEntities = ioCodeTempDao.selectList(new LambdaQueryWrapper<IoCodeTempEntity>().eq(IoCodeTempEntity::getCode, parentCode)); List<IoCodeTempEntity> ioCodeTempEntities = ioCodeTempDao.selectList(new LambdaQueryWrapper<IoCodeTempEntity>().eq(IoCodeTempEntity::getCode, parentCode));
if (CollUtil.isNotEmpty(ioCodeTempEntities)) { if (CollUtil.isNotEmpty(ioCodeTempEntities)) {
IoCodeTempEntity codeTempEntity = ioCodeTempEntities.get(0);
//1、排除掉层级是1的 //1、排除掉层级是1的
UdiEntity udi = FilterUdiUtils.getUdi(parentCode); UdiEntity udi = FilterUdiUtils.getUdi(parentCode);
if (udi == null) if (udi == null)
@ -374,6 +376,19 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode
return; return;
List<RelCodeBatch> navList = this.list(new LambdaQueryWrapper<RelCodeBatch>() List<RelCodeBatch> navList = this.list(new LambdaQueryWrapper<RelCodeBatch>()
.eq(RelCodeBatch::getParentCode, parentCode)); .eq(RelCodeBatch::getParentCode, parentCode));
// codeTempEntity.getSupId()
//todo if(navList)是空的 1.查供应商key2根据parentCode查阿里接口3根据返回结果再次查询
if(navList == null || navList.size() == 0 ){
BaseResponse baseResponse = alihealthUtils.relCodeInsert(codeTempEntity.getSupId(),parentCode);
if(baseResponse.getCode() == 20000){
// 插入成功就重新查询一下
navList = this.list(new LambdaQueryWrapper<RelCodeBatch>()
.eq(RelCodeBatch::getParentCode, parentCode));
}else {
log.error(baseResponse.getMessage());
}
}
if ((udiProductEntity != null && "1".equals(udiProductEntity.getPackLevel())) if ((udiProductEntity != null && "1".equals(udiProductEntity.getPackLevel()))
|| (CollUtil.isNotEmpty(navList)) || (CollUtil.isNotEmpty(navList))
) { ) {

Loading…
Cancel
Save