|
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil; |
|
|
|
|
import cn.hutool.core.collection.ListUtil; |
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.core.util.RandomUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import cn.hutool.extra.spring.SpringUtil; |
|
|
|
|
import com.alibaba.nacos.common.utils.CollectionUtils; |
|
|
|
|
import com.dxhy.order.baseservice.config.BaseServiceConfig; |
|
|
|
@ -531,8 +532,8 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { |
|
|
|
|
* 2.1 商品编码不为空,使用商品编码补全 |
|
|
|
|
* 2.2 商品编码为空,项目名称不为空,使用商品名称补全 |
|
|
|
|
*/ |
|
|
|
|
item.setZnfm("1"); |
|
|
|
|
item.setTswl("0"); |
|
|
|
|
item.setZnfm(ConfigureConstant.STRING_1); |
|
|
|
|
item.setTswl(ConfigureConstant.STRING_0); |
|
|
|
|
if (StringUtils.isNotBlank(item.getSpId())) { |
|
|
|
|
R r = commodityService.queryCommodityById(item.getSpId(), shList); |
|
|
|
|
if (ConfigureConstant.STRING_0000.equals(r.get(OrderManagementConstant.CODE))) { |
|
|
|
@ -577,9 +578,10 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { |
|
|
|
|
item.setSpbm(taxClassCodeEntity.getSpbm()); |
|
|
|
|
// item.setYhzcbs(taxClassCodeEntity.getYhzcmc()); // TODO 优惠政策
|
|
|
|
|
item.setZzstsgl(taxClassCodeEntity.getZzstsgl()); |
|
|
|
|
item.setZnfm("0"); // 配置为智能赋码
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
item.setZnfm(ConfigureConstant.STRING_0); // 公司库匹配到即非智能赋码;其他情况均为智能赋码
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 如果没有找到,记录异常
|
|
|
|
@ -592,9 +594,15 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { |
|
|
|
|
} else { |
|
|
|
|
// 如果找到记录,进行赋值匹配
|
|
|
|
|
// 判断是否推送了物料的名称、单位、规格型号信息
|
|
|
|
|
if (StringUtils.isEmpty(item.getXmmc())) { |
|
|
|
|
item.setXmmc(commodityCodeEntity.getXmmc()); |
|
|
|
|
//如果项目名称为空,使用底层返回数据进行补全,如果不为空,并且需要补全,则进行补全
|
|
|
|
|
String spmc = item.getXmmc(); |
|
|
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
|
|
if (StringUtils.isBlank(spmc)) { |
|
|
|
|
spmc = stringBuilder.append("*").append(commodityCodeEntity.getSpjc()).append("*").append(commodityCodeEntity.getXmmc()).toString(); |
|
|
|
|
} else if (StringUtil.checkStr(spmc, commodityCodeEntity.getSpjc())) { |
|
|
|
|
spmc = stringBuilder.append("*").append(commodityCodeEntity.getSpjc()).append("*").append(spmc).toString(); |
|
|
|
|
} |
|
|
|
|
item.setXmmc(spmc); |
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(item.getXmdw())) { |
|
|
|
|
item.setXmdw(commodityCodeEntity.getXmdw()); |
|
|
|
@ -604,7 +612,7 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { |
|
|
|
|
item.setGgxh(commodityCodeEntity.getGgxh()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
item.setTswl(commodityCodeEntity.getTswl()); |
|
|
|
|
item.setTswl(StrUtil.isBlank(commodityCodeEntity.getTswl())?"0":commodityCodeEntity.getTswl()); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|