|
|
|
@ -46,6 +46,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
@ -773,7 +774,22 @@ public class CommonInterfaceServiceImpl implements CommonInterfaceService { |
|
|
|
|
} |
|
|
|
|
item.setXmmc(spmc); |
|
|
|
|
|
|
|
|
|
//发票行性质为折扣行,不补全,单价,数量,单位,规格型号
|
|
|
|
|
if(StringUtils.isNotBlank(item.getXmmc())){ |
|
|
|
|
String xmmc = item.getXmmc(); |
|
|
|
|
try { |
|
|
|
|
if (xmmc.getBytes(ConfigureConstant.STRING_CHARSET_GBK).length > ConfigureConstant.INT_90) { |
|
|
|
|
log.debug("对明细行商品名称进行截取,截取前数据为:{}", xmmc); |
|
|
|
|
xmmc = StringUtil.subStringByByte(xmmc, ConfigureConstant.INT_90); |
|
|
|
|
log.debug("对明细行商品名称进行截取,截取后数据为:{}", xmmc); |
|
|
|
|
item.setXmmc(xmmc); |
|
|
|
|
} |
|
|
|
|
} catch (IOException e) { |
|
|
|
|
//编码格式错误
|
|
|
|
|
log.error("处理商品名称异常:{}", e); |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//发票行性质为折扣行,不补全,单价,数量,单位,规格型号
|
|
|
|
|
if (!OrderInfoEnum.FPHXZ_CODE_1.getKey().equals(item.getFphxz())) { |
|
|
|
|
//规格型号
|
|
|
|
|
if (StringUtils.isBlank(item.getGgxh()) && StringUtils.isNotBlank(commodity.getGgxh())) { |
|
|
|
|