feature:获取mdm物料时,不更新公司库,不更新税收编码

release
gaorl 2 years ago
parent f13a22eac9
commit c9064a3997
  1. 15
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java

@ -18,6 +18,7 @@ import com.dxhy.order.baseservice.module.taxclass.dao.TaxClassCodeMapper;
import com.dxhy.order.baseservice.module.taxclass.model.TaxClassCodeEntity;
import com.dxhy.order.baseservice.module.thirdservice.user.dto.AddUserRequestDto;
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService;
import com.dxhy.order.baseservice.utils.BaseServiceBeanTransitionUtils;
import com.dxhy.order.constant.ConfigureConstant;
import com.dxhy.order.consumer.dao.GroupCommodityCodeMapper;
import com.dxhy.order.consumer.modules.taxcodematch.dao.SdenergyTaxCodeMatchDao;
@ -341,18 +342,14 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
List<CommodityCodeEntity> commodityCodeEntities = commodityMapper.queryByCommoditySpbmCompany(reqBO.getCODE());
List<CommodityCodeEntity> collect = commodityCodeEntities.stream().filter(t -> "-1".equals(t.getXhfNsrsbh())).collect(Collectors.toList());
String ggxh = StringUtils.isNotBlank(reqBO.getDESCSHORT())&& reqBO.getDESCSHORT().contains("_")? reqBO.getDESCSHORT().substring(reqBO.getDESCSHORT().indexOf("_") + 1) : "";
if(GbkUtil.getGbkLength(ggxh) > ConfigureConstant.INT_40){
try {
ggxh = StringUtil.subStringByByte(ggxh, ConfigureConstant.INT_40);
} catch (IOException e) {
}
}
ggxh = BaseServiceBeanTransitionUtils.ggxhTransition(ggxh);
//调整后不更新公司物料
if(collect != null && collect.size() > 0){
matchCommodityCode(commodityCodeEntity);
//matchCommodityCode(commodityCodeEntity);
commodityCodeEntity.setXmmc(reqBO.getDESC1());
commodityCodeEntity.setZxbm(reqBO.getCODE()); // 编码
commodityCodeEntity.setXmdw(reqBO.getDESC5());
commodityCodeEntity.setCreateTime(new Date());
commodityCodeEntity.setModifyTime(new Date());
commodityCodeEntity.setBz(reqBO.getDESCSHORT());
commodityCodeEntity.setGgxh(ggxh);
commodityCodeEntity.setUUID(reqBO.getUUID());
@ -362,7 +359,7 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
}
commodityCodeEntity.setDataSource("4");
//matchCommodityCode(commodityCodeEntity);
List<String> ids = commodityCodeEntities.stream().map(t -> t.getId()).collect(Collectors.toList());
List<String> ids = collect.stream().map(t -> t.getId()).collect(Collectors.toList());
int updateCommodity = commodityMapper.batchUpdateCommodity(commodityCodeEntity, ids);
if (updateCommodity > 0) {
commodityCodeEntity.setSuccess(true);

Loading…
Cancel
Save