|
|
@ -15,6 +15,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.taxclass.model.TaxClassCodeEntity; |
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.dto.AddUserRequestDto; |
|
|
|
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.module.thirdservice.user.service.UserInfoService; |
|
|
|
|
|
|
|
import com.dxhy.order.constant.ConfigureConstant; |
|
|
|
import com.dxhy.order.consumer.dao.GroupCommodityCodeMapper; |
|
|
|
import com.dxhy.order.consumer.dao.GroupCommodityCodeMapper; |
|
|
|
import com.dxhy.order.consumer.modules.taxcodematch.dao.SdenergyTaxCodeMatchDao; |
|
|
|
import com.dxhy.order.consumer.modules.taxcodematch.dao.SdenergyTaxCodeMatchDao; |
|
|
|
import com.dxhy.order.consumer.modules.taxcodematch.entity.SdenergyTaxCodeMatch; |
|
|
|
import com.dxhy.order.consumer.modules.taxcodematch.entity.SdenergyTaxCodeMatch; |
|
|
@ -22,7 +23,9 @@ import com.dxhy.order.consumer.openapi.protocol.AjaxResult; |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.*; |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.*; |
|
|
|
import com.dxhy.order.model.R; |
|
|
|
import com.dxhy.order.model.R; |
|
|
|
import com.dxhy.order.utils.DistributedKeyMaker; |
|
|
|
import com.dxhy.order.utils.DistributedKeyMaker; |
|
|
|
|
|
|
|
import com.dxhy.order.utils.GbkUtil; |
|
|
|
import com.dxhy.order.utils.JsonUtils; |
|
|
|
import com.dxhy.order.utils.JsonUtils; |
|
|
|
|
|
|
|
import com.dxhy.order.utils.StringUtil; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -34,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.text.DecimalFormat; |
|
|
|
import java.text.DecimalFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -318,6 +322,12 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { |
|
|
|
List<CommodityCodeEntity> commodityCodeEntities = commodityMapper.queryByCommoditySpbmCompany(reqBO.getCODE()); |
|
|
|
List<CommodityCodeEntity> commodityCodeEntities = commodityMapper.queryByCommoditySpbmCompany(reqBO.getCODE()); |
|
|
|
List<CommodityCodeEntity> collect = commodityCodeEntities.stream().filter(t -> "-1".equals(t.getXhfNsrsbh())).collect(Collectors.toList()); |
|
|
|
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) : ""; |
|
|
|
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) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if(collect != null && collect.size() > 0){ |
|
|
|
if(collect != null && collect.size() > 0){ |
|
|
|
matchCommodityCode(commodityCodeEntity); |
|
|
|
matchCommodityCode(commodityCodeEntity); |
|
|
|
commodityCodeEntity.setXmmc(reqBO.getDESC1()); |
|
|
|
commodityCodeEntity.setXmmc(reqBO.getDESC1()); |
|
|
|