|
|
|
@ -304,15 +304,19 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { |
|
|
|
|
// 1.先去所有子公司库中匹配税编,以第一条为准;如果未匹配到,再去根据物料编码匹配
|
|
|
|
|
List<CommodityCodeEntity> commodityCodeEntities = commodityMapper.queryByCommoditySpbmCompany(reqBO.getCODE()); |
|
|
|
|
if(commodityCodeEntities != null && commodityCodeEntities.size() > 0){ |
|
|
|
|
matchCommodityCode(commodityCodeEntity); |
|
|
|
|
commodityCodeEntity.setXmmc(reqBO.getDESC1()); |
|
|
|
|
commodityCodeEntity.setZxbm(reqBO.getCODE()); // 编码
|
|
|
|
|
commodityCodeEntity.setXmdw(reqBO.getDESC5()); |
|
|
|
|
commodityCodeEntity.setCreateTime(new Date()); |
|
|
|
|
commodityCodeEntity.setBz(reqBO.getDESCSHORT()); |
|
|
|
|
commodityCodeEntity.setUUID(reqBO.getUUID()); |
|
|
|
|
commodityCodeEntity.setWlflbm(reqBO.getCATEGORYCODE()); |
|
|
|
|
if(StringUtils.isNotBlank(reqBO.getCATEGORYNAME())){ |
|
|
|
|
commodityCodeEntity.setWlflmc(reqBO.getCATEGORYNAME()); |
|
|
|
|
} |
|
|
|
|
commodityCodeEntity.setDataSource("4"); |
|
|
|
|
matchCommodityCode(commodityCodeEntity); |
|
|
|
|
//matchCommodityCode(commodityCodeEntity);
|
|
|
|
|
List<String> ids = commodityCodeEntities.stream().map(t -> t.getId()).collect(Collectors.toList()); |
|
|
|
|
commodityMapper.batchUpdateCommodity(commodityCodeEntity,ids); |
|
|
|
|
}else{ |
|
|
|
@ -320,14 +324,16 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { |
|
|
|
|
commodityCodeEntity.setXmmc(reqBO.getDESC1()); // 商品名称
|
|
|
|
|
matchCommodityCode(commodityCodeEntity); |
|
|
|
|
// 进行物料匹配
|
|
|
|
|
matchCommodityCode(commodityCodeEntity); |
|
|
|
|
//matchCommodityCode(commodityCodeEntity);
|
|
|
|
|
commodityCodeEntity.setZxbm(reqBO.getCODE()); // 编码
|
|
|
|
|
commodityCodeEntity.setXmdw(reqBO.getDESC5()); |
|
|
|
|
commodityCodeEntity.setCreateTime(new Date()); |
|
|
|
|
commodityCodeEntity.setBz(reqBO.getDESCSHORT()); |
|
|
|
|
commodityCodeEntity.setUUID(reqBO.getUUID()); |
|
|
|
|
commodityCodeEntity.setWlflbm(reqBO.getCATEGORYCODE()); |
|
|
|
|
if(StringUtils.isNotBlank(reqBO.getCATEGORYNAME())){ |
|
|
|
|
commodityCodeEntity.setWlflmc(reqBO.getCATEGORYNAME()); |
|
|
|
|
} |
|
|
|
|
commodityCodeEntity.setDataSource("4"); |
|
|
|
|
|
|
|
|
|
// sdenergyTaxCodeMatchDao.queryByWlflbm(requestBody.get)
|
|
|
|
@ -384,6 +390,7 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { |
|
|
|
|
commodityCodeEntity.setSpjc(taxClassCodeEntity.getSpjc()); |
|
|
|
|
commodityCodeEntity.setYhzcbs(taxClassCodeEntity.getZzstsgl()); |
|
|
|
|
commodityCodeEntity.setHsbz("1"); |
|
|
|
|
//commodityCodeEntity.setWlflmc(taxCodeMatch.getFlmc());
|
|
|
|
|
// commodityCodeEntity.setSl(taxClassCodeEntity.getZzssl());
|
|
|
|
|
commodityCodeEntity.setYhzcbs("0"); |
|
|
|
|
if (StringUtils.isNotBlank(taxClassCodeEntity.getYhzcmc())) { |
|
|
|
|