Merge remote-tracking branch 'sdny/release' into test

release
zhenghaiyang@ele-cloud.com 2 years ago
commit 2d1d9df9ef
  1. 33
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/controller/CommodityController.java
  2. 14
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/model/CommodityCodeEnum.java
  3. 37
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java
  4. 15
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/groupmanagement/controller/GroupManagementController.java
  5. 13
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/utils/BaseServiceBeanTransitionUtils.java
  6. 147
      order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml
  7. 1
      order-management-common/src/main/java/com/dxhy/order/constant/OrderInfoContentEnum.java
  8. 4
      order-management-common/src/main/java/com/dxhy/order/constant/TaxClassCodeEnum.java
  9. 3
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java
  10. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/controller/BuyerController.java
  11. 27
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/GenerateReadyOpenOrderServiceImpl.java
  12. 8
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderInfoServiceImpl.java
  13. 15
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java
  14. 26
      order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.java

@ -11,7 +11,6 @@ import com.dxhy.order.baseservice.annotation.SysLog;
import com.dxhy.order.baseservice.module.base.service.BaseService; import com.dxhy.order.baseservice.module.base.service.BaseService;
import com.dxhy.order.baseservice.module.commodity.constant.CommodityEnum; import com.dxhy.order.baseservice.module.commodity.constant.CommodityEnum;
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity; import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity;
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEnum;
import com.dxhy.order.baseservice.module.commodity.model.CommodityExcel; import com.dxhy.order.baseservice.module.commodity.model.CommodityExcel;
import com.dxhy.order.baseservice.module.commodity.model.dto.QueryModifyLogDTO; import com.dxhy.order.baseservice.module.commodity.model.dto.QueryModifyLogDTO;
import com.dxhy.order.baseservice.module.commodity.service.CommodityCodeModifyLogService; import com.dxhy.order.baseservice.module.commodity.service.CommodityCodeModifyLogService;
@ -21,6 +20,7 @@ import com.dxhy.order.baseservice.module.thirdservice.user.model.DeptEntity;
import com.dxhy.order.baseservice.module.thirdservice.user.model.UserEntity; import com.dxhy.order.baseservice.module.thirdservice.user.model.UserEntity;
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService; import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService;
import com.dxhy.order.baseservice.openapi.protocol.qd.PageSpxxReq; import com.dxhy.order.baseservice.openapi.protocol.qd.PageSpxxReq;
import com.dxhy.order.baseservice.utils.BaseServiceBeanTransitionUtils;
import com.dxhy.order.constant.*; import com.dxhy.order.constant.*;
import com.dxhy.order.model.CommodityCodeCheckQuery; import com.dxhy.order.model.CommodityCodeCheckQuery;
import com.dxhy.order.model.CommodityTaxClassCodeReq; import com.dxhy.order.model.CommodityTaxClassCodeReq;
@ -120,7 +120,10 @@ public class CommodityController {
return R.error(OrderInfoContentEnum.MORE_NSRSBH_ERROR); return R.error(OrderInfoContentEnum.MORE_NSRSBH_ERROR);
} }
String nsrsbh = xfshs[0]; String nsrsbh = xfshs[0];
String entId = commodityCodeEntity.getEntId();
if(StringUtils.isBlank(entId)){
return R.error(OrderInfoContentEnum.MORE_ENTID_ERROR);
}
commodityCodeEntity.setXhfNsrsbh(nsrsbh); commodityCodeEntity.setXhfNsrsbh(nsrsbh);
log.info("参数:{}", JsonUtils.getInstance().toJsonString(commodityCodeEntity)); log.info("参数:{}", JsonUtils.getInstance().toJsonString(commodityCodeEntity));
@ -166,9 +169,8 @@ public class CommodityController {
/** /**
* 添加校验 * 添加校验
*/ */
List<CommodityCodeEntity> commodityCodeEntityList = new ArrayList<>(); List<CommodityCodeEntity> commodityCodeEntities = Arrays.asList(commodityCodeEntity);
commodityCodeEntityList.add(commodityCodeEntity); List<Map<String, String>> maps = verifyCommodityCodeService.checkCommodityParams(commodityCodeEntities, type, 0);
List<Map<String, String>> maps = verifyCommodityCodeService.checkCommodityParams(commodityCodeEntityList, type, 0);
if (ObjectUtil.isNotEmpty(maps)) { if (ObjectUtil.isNotEmpty(maps)) {
return R.error().put(OrderManagementConstant.DATA, maps); return R.error().put(OrderManagementConstant.DATA, maps);
} }
@ -335,12 +337,12 @@ public class CommodityController {
} }
/** /**
* 同步集团税编接口 * 同步集团税编接口,接口放弃如果需要启用则入库逻辑需要修改
* *
* @date: Created on 2018年7月25日 下午3:30:28 * @date: Created on 2018年7月25日 下午3:30:28
*/ */
@ApiOperation(value = "同步集团税编接口", notes = "商品信息管理-同步集团税编接口") @ApiOperation(value = "同步集团税编接口", notes = "商品信息管理-同步集团税编接口")
@PostMapping("/syncGroupTaxClassCode") //@PostMapping("/syncGroupTaxClassCode")
@SysLog(operation = "同步集团税编接口", operationDesc = "同步集团税编接口", key = "同步集团税编接口") @SysLog(operation = "同步集团税编接口", operationDesc = "同步集团税编接口", key = "同步集团税编接口")
public R syncGroupTaxClassCode(@RequestBody() CommodityTaxClassCodeReq groupTaxList) { public R syncGroupTaxClassCode(@RequestBody() CommodityTaxClassCodeReq groupTaxList) {
log.info("同步集团税编接口,入参:{}", groupTaxList); log.info("同步集团税编接口,入参:{}", groupTaxList);
@ -411,8 +413,9 @@ public class CommodityController {
@ApiParam(name = "entId", value = "数据组织Id", required = false) @RequestParam(value = "entId", required = false) String entId, @ApiParam(name = "entId", value = "数据组织Id", required = false) @RequestParam(value = "entId", required = false) String entId,
@ApiParam(name = "userId", value = "用户ID", required = true) @RequestParam(value = "userId") String userId) throws Exception { @ApiParam(name = "userId", value = "用户ID", required = true) @RequestParam(value = "userId") String userId) throws Exception {
log.info("商品模板导入"); log.info("商品模板导入");
if(StringUtils.isBlank(entId)||StringUtils.isBlank(userId)){
return R.error("请求参数有误");
}
Map<String, String> headToProperty = new HashMap<>(10); Map<String, String> headToProperty = new HashMap<>(10);
for (CommodityEnum flowStatus : CommodityEnum.values()) { for (CommodityEnum flowStatus : CommodityEnum.values()) {
@ -472,7 +475,7 @@ public class CommodityController {
* @param commodityExcelList * @param commodityExcelList
* @return * @return
*/ */
public List<CommodityCodeEntity> transCommodityCodeEntityList(List<CommodityExcel> commodityExcelList,String xhfNsrsbh,String xhfMc, String userId, String deptId) { public List<CommodityCodeEntity> transCommodityCodeEntityList(List<CommodityExcel> commodityExcelList,String xhfNsrsbh,String xhfMc, String userId, String entId) {
List<CommodityCodeEntity> commodityCodeEntityList = new ArrayList<>(); List<CommodityCodeEntity> commodityCodeEntityList = new ArrayList<>();
if (ObjectUtil.isNotEmpty(commodityExcelList)) { if (ObjectUtil.isNotEmpty(commodityExcelList)) {
for (CommodityExcel commodityExcel : commodityExcelList) { for (CommodityExcel commodityExcel : commodityExcelList) {
@ -495,7 +498,9 @@ public class CommodityController {
sl = CommonUtils.formatSl(sl); sl = CommonUtils.formatSl(sl);
} }
commodityCodeEntity.setSl(sl); commodityCodeEntity.setSl(sl);
commodityCodeEntity.setGgxh(commodityExcel.getGgxh());
String ggxh = BaseServiceBeanTransitionUtils.ggxhTransition(commodityExcel.getGgxh());
commodityCodeEntity.setGgxh(ggxh);
commodityCodeEntity.setXmdw(StringUtils.isEmpty(commodityExcel.getDw()) ? "" : commodityExcel.getDw()); commodityCodeEntity.setXmdw(StringUtils.isEmpty(commodityExcel.getDw()) ? "" : commodityExcel.getDw());
commodityCodeEntity.setXmdj(StringUtils.isEmpty(commodityExcel.getDj()) ? "" : commodityExcel.getDj()); commodityCodeEntity.setXmdj(StringUtils.isEmpty(commodityExcel.getDj()) ? "" : commodityExcel.getDj());
commodityCodeEntity.setHsbz(commodityExcel.getHsbz()); commodityCodeEntity.setHsbz(commodityExcel.getHsbz());
@ -519,10 +524,10 @@ public class CommodityController {
commodityCodeEntity.setSpjc(commodityExcel.getSpjc()); commodityCodeEntity.setSpjc(commodityExcel.getSpjc());
commodityCodeEntity.setBz(commodityExcel.getBz()); commodityCodeEntity.setBz(commodityExcel.getBz());
commodityCodeEntity.setCollectIdent(""); commodityCodeEntity.setCollectIdent("");
commodityCodeEntity.setCpy(""); commodityCodeEntity.setCpy(ConfigureConstant.STRING_N);
commodityCodeEntity.setJdc(""); commodityCodeEntity.setJdc(ConfigureConstant.STRING_N);
commodityCodeEntity.setBmbBbh(""); commodityCodeEntity.setBmbBbh("");
commodityCodeEntity.setEntId(deptId); commodityCodeEntity.setEntId(entId);
commodityCodeEntity.setUserId(userId); commodityCodeEntity.setUserId(userId);
if (StringUtils.isNotEmpty(commodityCodeEntity.getHsbz())) { if (StringUtils.isNotEmpty(commodityCodeEntity.getHsbz())) {

@ -1,12 +1,16 @@
package com.dxhy.order.baseservice.module.commodity.model; package com.dxhy.order.baseservice.module.commodity.model;
/**
* 不在使用使用TaxClassCodeEnum里的枚举
*/
@SuppressWarnings("")
public enum CommodityCodeEnum { public enum CommodityCodeEnum {
//0-集团共享;1-手工创建;2-模板导入;3-采集下级;4;MDM推送 //0-集团共享;1-手工创建;2-模板导入;3-采集下级;4;MDM推送
DATA_SOURCE_0("0", "集团共享"), DATA_SOURCE_10("0", "集团共享"),
DATA_SOURCE_1("1", "手工创建"), DATA_SOURCE_11("1", "手工创建"),
DATA_SOURCE_2("2", "模板导入"), DATA_SOURCE_12("2", "模板导入"),
DATA_SOURCE_3("3", "采集下级"), DATA_SOURCE_13("3", "采集下级"),
DATA_SOURCE_4("4", "MDM推送"), DATA_SOURCE_14("4", "MDM推送"),
; ;

@ -104,7 +104,6 @@ public class CommodityServiceImpl implements CommodityService {
public R addOrEditCommodity(CommodityCodeEntity codeEntity) { public R addOrEditCommodity(CommodityCodeEntity codeEntity) {
List<String> shList = NsrsbhUtils.transShListByNsrsbh(codeEntity.getXhfNsrsbh()); List<String> shList = NsrsbhUtils.transShListByNsrsbh(codeEntity.getXhfNsrsbh());
boolean flag;
//判断保存或者修改操作 //判断保存或者修改操作
String id = codeEntity.getId(); String id = codeEntity.getId();
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
@ -141,15 +140,14 @@ public class CommodityServiceImpl implements CommodityService {
} else { } else {
codeEntity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_1.getKey()); codeEntity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_1.getKey());
codeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_1.getKey());
//未匹配默认为停用
codeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_1.getKey());
if (StringUtils.isNotEmpty(codeEntity.getSsflMc()) && StringUtils.isNotEmpty(codeEntity.getSpbm())) { if (StringUtils.isNotEmpty(codeEntity.getSsflMc()) && StringUtils.isNotEmpty(codeEntity.getSpbm())) {
//税收分类名称和税收分类编码都存在 //税收分类名称和税收分类编码都存在
codeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_0.getKey()); codeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_0.getKey());
//已匹配默认为启用 //已匹配默认为启用
codeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_0.getKey()); codeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_0.getKey());
} else {
codeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_1.getKey());
//未匹配默认为停用
codeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_1.getKey());
} }
if(commodityMapper.insertCommodity(codeEntity) <= 0){ if(commodityMapper.insertCommodity(codeEntity) <= 0){
@ -251,7 +249,7 @@ public class CommodityServiceImpl implements CommodityService {
if (StringUtils.isNotEmpty(commodityCodeCheckQuery.getSl())) { if (StringUtils.isNotEmpty(commodityCodeCheckQuery.getSl())) {
commodityCodeCheckQuery.setSl(CommonUtils.formatSl(commodityCodeCheckQuery.getSl())); commodityCodeCheckQuery.setSl(CommonUtils.formatSl(commodityCodeCheckQuery.getSl()));
} }
map1.put("productName", xmmc); //map1.put("productName", xmmc);
map1.put("zxbm", zxbm); map1.put("zxbm", zxbm);
map1.put("entId",commodityCodeCheckQuery.getDeptId()); map1.put("entId",commodityCodeCheckQuery.getDeptId());
@ -320,7 +318,7 @@ public class CommodityServiceImpl implements CommodityService {
for (CommodityCodeEntity commodityCodeEntity : commodityCodeList) { for (CommodityCodeEntity commodityCodeEntity : commodityCodeList) {
commodityCodeEntity.setSpbm(StringUtil.fillZero(commodityCodeEntity.getSpbm(), ConfigureConstant.INT_19)); commodityCodeEntity.setSpbm(StringUtil.fillZero(commodityCodeEntity.getSpbm(), ConfigureConstant.INT_19));
//ent_id + encoding + spmc //ent_id + encoding + spmc
int i1 = commodityMapper.queryCountByEntAndEncode(commodityCodeEntity.getZxbm(), commodityCodeEntity.getXmmc(), commodityCodeEntity.getEntId()); int i1 = commodityMapper.queryCountByEntAndEncode(commodityCodeEntity.getZxbm(), "", commodityCodeEntity.getEntId());
if(i1>0){ if(i1>0){
Map<String, String> map = new HashMap<>(2); Map<String, String> map = new HashMap<>(2);
map.put(OrderManagementConstant.CODE, ConfigureConstant.STRING_9999); map.put(OrderManagementConstant.CODE, ConfigureConstant.STRING_9999);
@ -339,7 +337,7 @@ public class CommodityServiceImpl implements CommodityService {
commodityCodeEntity.setId(baseService.getGenerateShotKey()); commodityCodeEntity.setId(baseService.getGenerateShotKey());
commodityCodeEntity.setCommodityId(commodityCodeEntity.getId()); commodityCodeEntity.setCommodityId(commodityCodeEntity.getId());
log.debug("添加接口开始执行"); log.debug("物料导入开始执行");
String name = commodityCodeEntity.getGroupName(); String name = commodityCodeEntity.getGroupName();
// 获取分组id // 获取分组id
if (StringUtils.isNotBlank(commodityCodeEntity.getGroupName())) { if (StringUtils.isNotBlank(commodityCodeEntity.getGroupName())) {
@ -353,39 +351,28 @@ public class CommodityServiceImpl implements CommodityService {
commodityCodeEntity.setXmmc(tempMerchandiseName); commodityCodeEntity.setXmmc(tempMerchandiseName);
commodityCodeEntity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_2.getKey()); commodityCodeEntity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_2.getKey());
commodityCodeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_1.getKey());
commodityCodeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_1.getKey());
if (StringUtils.isNotEmpty(commodityCodeEntity.getSsflMc()) if (StringUtils.isNotEmpty(commodityCodeEntity.getSsflMc())
&& StringUtils.isNotEmpty(commodityCodeEntity.getSpbm())) { && StringUtils.isNotEmpty(commodityCodeEntity.getSpbm())) {
// 税收分类名称和税收分类编码都存在 // 税收分类名称和税收分类编码都存在
commodityCodeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_0.getKey()); commodityCodeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_0.getKey());
commodityCodeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_0.getKey()); commodityCodeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_0.getKey());
// 已匹配默认为启用 // 已匹配默认为启用
} else {
commodityCodeEntity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_1.getKey());
commodityCodeEntity.setDataState(TaxClassCodeEnum.DATA_STATE_1.getKey());
// 未匹配默认为停用
} }
if (StringUtils.isNotBlank(commodityCodeEntity.getSl()) && commodityCodeEntity.getSl().contains(ConfigureConstant.STRING_PERCENT)) { if (StringUtils.isNotBlank(commodityCodeEntity.getSl()) && commodityCodeEntity.getSl().contains(ConfigureConstant.STRING_PERCENT)) {
commodityCodeEntity.setSl(CommonUtils.formatSl(commodityCodeEntity.getSl())); commodityCodeEntity.setSl(CommonUtils.formatSl(commodityCodeEntity.getSl()));
} }
//成品油为空就设置默认值
if (StringUtils.isEmpty(commodityCodeEntity.getCpy())) {
commodityCodeEntity.setCpy(ConfigureConstant.STRING_N);
}
//机动车为空就设置默认值
if (StringUtils.isEmpty(commodityCodeEntity.getJdc())) {
commodityCodeEntity.setJdc(ConfigureConstant.STRING_N);
}
i = commodityMapper.insertCommodity(commodityCodeEntity); i = commodityMapper.insertCommodity(commodityCodeEntity);
log.debug("添加成功");
if (i > 0) { if (i <= 0) {
num++;
} else {
Map<String, String> map = new HashMap<>(2); Map<String, String> map = new HashMap<>(2);
map.put(OrderManagementConstant.CODE, ConfigureConstant.STRING_9999); map.put(OrderManagementConstant.CODE, ConfigureConstant.STRING_9999);
map.put("msg", "第" + num + "行,添加失败"); map.put("msg", "第" + num + "行,添加失败");
resultMap.add(map); resultMap.add(map);
continue;
} }
num++;
} }
return R.ok().put("list", resultMap).put("msg", "导入成功" + num + "条").put("count", commodityCodeList.size()) return R.ok().put("list", resultMap).put("msg", "导入成功" + num + "条").put("count", commodityCodeList.size())
@ -426,7 +413,7 @@ public class CommodityServiceImpl implements CommodityService {
entity.setSpbm(taxClassCodeParam.getSsbm()); entity.setSpbm(taxClassCodeParam.getSsbm());
entity.setXhfNsrsbh(nsrsbh); entity.setXhfNsrsbh(nsrsbh);
entity.setSpjc(taxClassCodeParam.getSsjc()); entity.setSpjc(taxClassCodeParam.getSsjc());
entity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_0.getKey()); entity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_0.getKey());//接口已放弃不在使用
entity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_0.getKey()); entity.setMatchingState(TaxClassCodeEnum.MATCHING_STATE_0.getKey());
entity.setDataState(TaxClassCodeEnum.DATA_STATE_0.getKey()); entity.setDataState(TaxClassCodeEnum.DATA_STATE_0.getKey());
entity.setUserId(userId); entity.setUserId(userId);

@ -61,18 +61,19 @@ public class GroupManagementController {
groupManagementVO.setGroupName(groupManagementQuery.getGroupName()); groupManagementVO.setGroupName(groupManagementQuery.getGroupName());
groupManagementVO.setEntId(groupManagementQuery.getEntId()); groupManagementVO.setEntId(groupManagementQuery.getEntId());
if (CollectionUtil.isNotEmpty(groupManagementEntityList)) { if (CollectionUtil.isNotEmpty(groupManagementEntityList)) {
groupManagementVO.setGroupType(groupManagementEntityList.get(0).getGroupType()); GroupManagementEntity groupManagementEntity = groupManagementEntityList.stream().filter(t -> OrderInfoEnum.ORDER_KPZZGL_SFMRX_1.getKey().equals(t.getDefaultItem())).findFirst().orElse(groupManagementEntityList.get(0));
groupManagementVO.setXhfNsrsbh(groupManagementEntityList.get(0).getXhfNsrsbh()); groupManagementVO.setGroupType(groupManagementEntity.getGroupType());
groupManagementVO.setXhfMc(groupManagementEntityList.get(0).getXhfMc()); groupManagementVO.setXhfNsrsbh(groupManagementEntity.getXhfNsrsbh());
groupManagementVO.setXhfMc(groupManagementEntity.getXhfMc());
if(StringUtils.isBlank(groupManagementVO.getEntId())){ if(StringUtils.isBlank(groupManagementVO.getEntId())){
groupManagementVO.setEntId(groupManagementEntityList.get(0).getEntId()); groupManagementVO.setEntId(groupManagementEntity.getEntId());
} }
groupManagementVO.setUsingEntId(groupManagementEntityList.get(0).getUsingEntId()); groupManagementVO.setUsingEntId(groupManagementEntity.getUsingEntId());
List<TaxPayerVO> taxPayerVOList = new ArrayList<>(); List<TaxPayerVO> taxPayerVOList = new ArrayList<>();
groupManagementEntityList.forEach(groupManagementEntity -> { groupManagementEntityList.forEach(t -> {
TaxPayerVO taxPayerVO = new TaxPayerVO(); TaxPayerVO taxPayerVO = new TaxPayerVO();
BeanUtils.copyProperties(groupManagementEntity, taxPayerVO); BeanUtils.copyProperties(t, taxPayerVO);
taxPayerVOList.add(taxPayerVO); taxPayerVOList.add(taxPayerVO);
}); });

@ -12,8 +12,11 @@ import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity;
import com.dxhy.order.baseservice.openapi.model.SksbxxtbReqBO; import com.dxhy.order.baseservice.openapi.model.SksbxxtbReqBO;
import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxBO; import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxBO;
import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbReqBO; import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbReqBO;
import com.dxhy.order.utils.GbkUtil;
import com.dxhy.order.utils.StringUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.util.Date; import java.util.Date;
/** /**
@ -230,4 +233,14 @@ public class BaseServiceBeanTransitionUtils {
return taxEquipmentInfo; return taxEquipmentInfo;
} }
public static String ggxhTransition(String ggxh){
if(GbkUtil.getGbkLength(ggxh) > ConfigureConstant.INT_40){
try {
ggxh = StringUtil.subStringByByte(ggxh, ConfigureConstant.INT_40);
} catch (IOException e) {
}
}
return ggxh;
}
} }

@ -249,64 +249,64 @@
<bind name="dataType" value="${dataType}"/> <bind name="dataType" value="${dataType}"/>
update commodity_code update commodity_code
<set> <set>
<if test="commodityCode.commodityId != null"> <if test="commodityCode.commodityId != null and commodityCode.commodityId != ''">
commodity_id = #{commodityCode.commodityId,jdbcType=VARCHAR}, commodity_id = #{commodityCode.commodityId,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.sortId != null"> <if test="commodityCode.sortId != null and commodityCode.sortId != ''">
sort_id = #{commodityCode.sortId,jdbcType=BIGINT}, sort_id = #{commodityCode.sortId,jdbcType=BIGINT},
</if> </if>
<if test="commodityCode.xhfNsrsbh != null"> <if test="commodityCode.xhfNsrsbh != null and commodityCode.xhfNsrsbh != ''">
xhf_nsrsbh = #{commodityCode.xhfNsrsbh,jdbcType=VARCHAR}, xhf_nsrsbh = #{commodityCode.xhfNsrsbh,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.xmmc != null"> <if test="commodityCode.xmmc != null and commodityCode.xmmc != ''">
merchandise_name = #{commodityCode.xmmc,jdbcType=VARCHAR}, merchandise_name = #{commodityCode.xmmc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.zxbm != null"> <if test="commodityCode.zxbm != null and commodityCode.zxbm != ''">
encoding = #{commodityCode.zxbm,jdbcType=VARCHAR}, encoding = #{commodityCode.zxbm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spsm != null"> <if test="commodityCode.spsm != null and commodityCode.spsm != ''">
tax_items = #{commodityCode.spsm,jdbcType=VARCHAR}, tax_items = #{commodityCode.spsm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spjm != null"> <if test="commodityCode.spjm != null and commodityCode.spjm != ''">
brief_code = #{commodityCode.spjm,jdbcType=VARCHAR}, brief_code = #{commodityCode.spjm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.sl != null"> <if test="commodityCode.sl != null and commodityCode.sl != ''">
tax_rate = #{commodityCode.sl,jdbcType=VARCHAR}, tax_rate = #{commodityCode.sl,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.ggxh != null"> <if test="commodityCode.ggxh != null and commodityCode.ggxh != ''">
specification_model = #{commodityCode.ggxh,jdbcType=VARCHAR}, specification_model = #{commodityCode.ggxh,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.xmdw != null"> <if test="commodityCode.xmdw != null and commodityCode.xmdw != ''">
metering_unit = #{commodityCode.xmdw,jdbcType=VARCHAR}, metering_unit = #{commodityCode.xmdw,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.xmdj != null"> <if test="commodityCode.xmdj != null and commodityCode.xmdj != ''">
unit_price = #{commodityCode.xmdj,jdbcType=VARCHAR}, unit_price = #{commodityCode.xmdj,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.hsbz != null"> <if test="commodityCode.hsbz != null and commodityCode.hsbz != ''">
tax_logo = #{commodityCode.hsbz,jdbcType=VARCHAR}, tax_logo = #{commodityCode.hsbz,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.ycbz != null"> <if test="commodityCode.ycbz != null and commodityCode.ycbz != ''">
hide_the_logo = #{commodityCode.ycbz,jdbcType=VARCHAR}, hide_the_logo = #{commodityCode.ycbz,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.yhzcbs != null"> <if test="commodityCode.yhzcbs != null and commodityCode.yhzcbs != ''">
enjoy_preferential_policies = #{commodityCode.yhzcbs,jdbcType=VARCHAR}, enjoy_preferential_policies = #{commodityCode.yhzcbs,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spbm != null"> <if test="commodityCode.spbm != null and commodityCode.spbm != ''">
tax_class_code = #{commodityCode.spbm,jdbcType=VARCHAR}, tax_class_code = #{commodityCode.spbm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.ssflMc != null"> <if test="commodityCode.ssflMc != null and commodityCode.ssflMc != ''">
tax_classification_name = #{commodityCode.ssflMc,jdbcType=VARCHAR}, tax_classification_name = #{commodityCode.ssflMc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.lslbs != null"> <if test="commodityCode.lslbs != null and commodityCode.lslbs != ''">
preferential_policies_type = #{commodityCode.lslbs,jdbcType=VARCHAR}, preferential_policies_type = #{commodityCode.lslbs,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.zzstsgl != null"> <if test="commodityCode.zzstsgl != null and commodityCode.zzstsgl != ''">
zzstsgl = #{commodityCode.zzstsgl,jdbcType=VARCHAR}, zzstsgl = #{commodityCode.zzstsgl,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.userId != null"> <if test="commodityCode.userId != null and commodityCode.userId != ''">
user_id = #{commodityCode.userId,jdbcType=VARCHAR}, user_id = #{commodityCode.userId,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.createTime != null"> <if test="commodityCode.createTime != null and commodityCode.createTime != ''">
create_time = #{commodityCode.createTime,jdbcType=TIMESTAMP}, create_time = #{commodityCode.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="dataType == 0"> <if test="dataType == 0">
@ -315,55 +315,55 @@
<if test="dataType == 1"> <if test="dataType == 1">
modify_time = SYSDATE, modify_time = SYSDATE,
</if> </if>
<if test="commodityCode.modifyUserId != null"> <if test="commodityCode.modifyUserId != null and commodityCode.modifyUserId != ''">
modify_user_id = #{commodityCode.modifyUserId,jdbcType=CHAR}, modify_user_id = #{commodityCode.modifyUserId,jdbcType=CHAR},
</if> </if>
<if test="commodityCode.groupId != null"> <if test="commodityCode.groupId != null and commodityCode.groupId != ''">
group_id = #{commodityCode.groupId,jdbcType=VARCHAR}, group_id = #{commodityCode.groupId,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.bz != null"> <if test="commodityCode.bz != null and commodityCode.bz != ''">
description = #{commodityCode.bz,jdbcType=VARCHAR}, description = #{commodityCode.bz,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.xhfMc != null"> <if test="commodityCode.xhfMc != null and commodityCode.xhfMc != ''">
enterprise_name = #{commodityCode.xhfMc,jdbcType=VARCHAR}, enterprise_name = #{commodityCode.xhfMc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.dataSource != null"> <if test="commodityCode.dataSource != null and commodityCode.dataSource != ''">
data_source = #{commodityCode.dataSource,jdbcType=VARCHAR}, data_source = #{commodityCode.dataSource,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.matchingState != null"> <if test="commodityCode.matchingState != null and commodityCode.matchingState != ''">
matching_state = #{commodityCode.matchingState,jdbcType=VARCHAR}, matching_state = #{commodityCode.matchingState,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.dataState != null"> <if test="commodityCode.dataState != null and commodityCode.dataState != ''">
data_state = #{commodityCode.dataState,jdbcType=VARCHAR}, data_state = #{commodityCode.dataState,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spjc != null"> <if test="commodityCode.spjc != null and commodityCode.spjc != ''">
tax_class_abbreviation = #{commodityCode.spjc,jdbcType=VARCHAR}, tax_class_abbreviation = #{commodityCode.spjc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.collectIdent != null"> <if test="commodityCode.collectIdent != null and commodityCode.collectIdent != ''">
collect_ident = #{commodityCode.collectIdent,jdbcType=VARCHAR}, collect_ident = #{commodityCode.collectIdent,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.cpy != null"> <if test="commodityCode.cpy != null and commodityCode.cpy != ''">
cpy = #{commodityCode.cpy,jdbcType=VARCHAR}, cpy = #{commodityCode.cpy,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.bmbBbh != null"> <if test="commodityCode.bmbBbh != null and commodityCode.bmbBbh != ''">
bmb_bbh = #{commodityCode.bmbBbh,jdbcType=VARCHAR}, bmb_bbh = #{commodityCode.bmbBbh,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.jdc != null"> <if test="commodityCode.jdc != null and commodityCode.jdc != ''">
jdc = #{commodityCode.jdc,jdbcType=VARCHAR}, jdc = #{commodityCode.jdc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.wlflbm != null"> <if test="commodityCode.wlflbm != null and commodityCode.wlflbm != ''">
wlflbm = #{commodityCode.wlflbm,jdbcType=VARCHAR}, wlflbm = #{commodityCode.wlflbm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.wlflmc != null"> <if test="commodityCode.wlflmc != null and commodityCode.wlflmc != ''">
wlflmc = #{commodityCode.wlflmc,jdbcType=VARCHAR}, wlflmc = #{commodityCode.wlflmc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.entId != null"> <if test="commodityCode.entId != null and commodityCode.entId != ''">
ent_id = #{commodityCode.entId,jdbcType=VARCHAR}, ent_id = #{commodityCode.entId,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.tswl != null"> <if test="commodityCode.tswl != null and commodityCode.tswl != ''">
tswl = #{commodityCode.tswl,jdbcType=VARCHAR}, tswl = #{commodityCode.tswl,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.invoiceName != null"> <if test="commodityCode.invoiceName != null and commodityCode.invoiceName != ''">
invoice_name = #{commodityCode.invoiceName,jdbcType=VARCHAR}, invoice_name = #{commodityCode.invoiceName,jdbcType=VARCHAR},
</if> </if>
@ -395,28 +395,28 @@
<bind name="dataType" value="${dataType}"/> <bind name="dataType" value="${dataType}"/>
update commodity_code update commodity_code
<set> <set>
<if test="commodityCode.ggxh != null"> <if test="commodityCode.ggxh != null and commodityCode.ggxh != ''">
specification_model = #{commodityCode.ggxh,jdbcType=VARCHAR}, specification_model = #{commodityCode.ggxh,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.xmdw != null"> <if test="commodityCode.xmdw != null and commodityCode.xmdw != ''">
metering_unit = #{commodityCode.xmdw,jdbcType=VARCHAR}, metering_unit = #{commodityCode.xmdw,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.ycbz != null"> <if test="commodityCode.ycbz != null and commodityCode.ycbz != ''">
hide_the_logo = #{commodityCode.ycbz,jdbcType=VARCHAR}, hide_the_logo = #{commodityCode.ycbz,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.lslbs != null"> <if test="commodityCode.lslbs != null and commodityCode.lslbs != ''">
preferential_policies_type = #{commodityCode.lslbs,jdbcType=VARCHAR}, preferential_policies_type = #{commodityCode.lslbs,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.yhzcbs != null"> <if test="commodityCode.yhzcbs != null and commodityCode.yhzcbs != ''">
enjoy_preferential_policies = #{commodityCode.yhzcbs,jdbcType=VARCHAR}, enjoy_preferential_policies = #{commodityCode.yhzcbs,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spbm != null"> <if test="commodityCode.spbm != null and commodityCode.spbm != ''">
tax_class_code = #{commodityCode.spbm,jdbcType=VARCHAR}, tax_class_code = #{commodityCode.spbm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spjc != null"> <if test="commodityCode.spjc != null and commodityCode.spjc != ''">
tax_class_abbreviation = #{commodityCode.spjc,jdbcType=VARCHAR}, tax_class_abbreviation = #{commodityCode.spjc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.zzstsgl != null"> <if test="commodityCode.zzstsgl != null and commodityCode.zzstsgl != ''">
zzstsgl = #{commodityCode.zzstsgl,jdbcType=VARCHAR}, zzstsgl = #{commodityCode.zzstsgl,jdbcType=VARCHAR},
</if> </if>
<if test="dataType == 0"> <if test="dataType == 0">
@ -425,16 +425,19 @@
<if test="dataType == 1"> <if test="dataType == 1">
modify_time = SYSDATE, modify_time = SYSDATE,
</if> </if>
<if test="commodityCode.modifyUserId != null"> <if test="commodityCode.modifyUserId != null and commodityCode.modifyUserId != ''">
modify_user_id = #{commodityCode.modifyUserId,jdbcType=CHAR}, modify_user_id = #{commodityCode.modifyUserId,jdbcType=CHAR},
</if> </if>
<if test="commodityCode.collectIdent != null"> <if test="commodityCode.collectIdent != null and commodityCode.collectIdent != ''">
collect_ident = #{commodityCode.collectIdent,jdbcType=VARCHAR}, collect_ident = #{commodityCode.collectIdent,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.cpy != null"> <if test="commodityCode.cpy != null and commodityCode.cpy != ''">
cpy = #{commodityCode.cpy,jdbcType=VARCHAR}, cpy = #{commodityCode.cpy,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.dataSource != null and commodityCode.dataSource != ''">
data_source = #{commodityCode.dataSource,jdbcType=VARCHAR},
</if>
</set> </set>
<where> <where>
@ -450,60 +453,66 @@
<bind name="dataType" value="${dataType}"/> <bind name="dataType" value="${dataType}"/>
update commodity_code update commodity_code
<set> <set>
<if test="commodityCode.zxbm != null"> <if test="commodityCode.zxbm != null and commodityCode.zxbm != ''">
encoding = #{commodityCode.zxbm,jdbcType=VARCHAR}, encoding = #{commodityCode.zxbm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.xmdw != null"> <if test="commodityCode.xmdw != null and commodityCode.xmdw != ''">
metering_unit = #{commodityCode.xmdw,jdbcType=VARCHAR}, metering_unit = #{commodityCode.xmdw,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.createTime != null"> <if test="commodityCode.createTime != null and commodityCode.createTime != ''">
create_time = #{commodityCode.createTime,jdbcType=TIMESTAMP}, create_time = #{commodityCode.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="commodityCode.bz != null"> <if test="commodityCode.modifyTime != null and commodityCode.modifyTime != ''">
modify_time = #{commodityCode.modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="commodityCode.bz != null and commodityCode.bz != ''">
description = #{commodityCode.bz,jdbcType=VARCHAR}, description = #{commodityCode.bz,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.wlflbm != null"> <if test="commodityCode.wlflbm != null and commodityCode.wlflbm != ''">
wlflbm = #{commodityCode.wlflbm,jdbcType=VARCHAR}, wlflbm = #{commodityCode.wlflbm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.wlflmc != null"> <if test="commodityCode.wlflmc != null and commodityCode.wlflmc != ''">
wlflmc = #{commodityCode.wlflmc,jdbcType=VARCHAR}, wlflmc = #{commodityCode.wlflmc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.ggxh != null"> <if test="commodityCode.ggxh != null and commodityCode.ggxh != ''">
specification_model = #{commodityCode.ggxh,jdbcType=VARCHAR}, specification_model = #{commodityCode.ggxh,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.commodityId != null"> <if test="commodityCode.commodityId != null and commodityCode.commodityId != ''">
commodity_id = #{commodityCode.commodityId,jdbcType=VARCHAR}, commodity_id = #{commodityCode.commodityId,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.sortId != null"> <if test="commodityCode.sortId != null and commodityCode.sortId != ''">
sort_id = #{commodityCode.sortId,jdbcType=BIGINT}, sort_id = #{commodityCode.sortId,jdbcType=BIGINT},
</if> </if>
<if test="commodityCode.xmmc != null"> <if test="commodityCode.xmmc != null and commodityCode.xmmc != ''">
merchandise_name = #{commodityCode.xmmc,jdbcType=VARCHAR}, merchandise_name = #{commodityCode.xmmc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.zzstsgl != null"> <if test="commodityCode.zzstsgl != null and commodityCode.zzstsgl != ''">
zzstsgl = #{commodityCode.zzstsgl,jdbcType=VARCHAR}, zzstsgl = #{commodityCode.zzstsgl,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spjc != null"> <if test="commodityCode.spjc != null and commodityCode.spjc != ''">
tax_class_abbreviation = #{commodityCode.spjc,jdbcType=VARCHAR}, tax_class_abbreviation = #{commodityCode.spjc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spbm != null"> <if test="commodityCode.spbm != null and commodityCode.spbm != ''">
tax_class_code = #{commodityCode.spbm,jdbcType=VARCHAR}, tax_class_code = #{commodityCode.spbm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.ssflMc != null"> <if test="commodityCode.ssflMc != null and commodityCode.ssflMc != ''">
tax_classification_name = #{commodityCode.ssflMc,jdbcType=VARCHAR}, tax_classification_name = #{commodityCode.ssflMc,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.yhzcbs != null"> <if test="commodityCode.yhzcbs != null and commodityCode.yhzcbs != ''">
enjoy_preferential_policies = #{commodityCode.yhzcbs,jdbcType=VARCHAR}, enjoy_preferential_policies = #{commodityCode.yhzcbs,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.hsbz != null"> <if test="commodityCode.hsbz != null and commodityCode.hsbz != ''">
tax_logo = #{commodityCode.hsbz,jdbcType=VARCHAR}, tax_logo = #{commodityCode.hsbz,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.spjm != null"> <if test="commodityCode.spjm != null and commodityCode.spjm != ''">
brief_code = #{commodityCode.spjm,jdbcType=VARCHAR}, brief_code = #{commodityCode.spjm,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.sl != null"> <if test="commodityCode.sl != null and commodityCode.sl != ''">
tax_rate = #{commodityCode.sl,jdbcType=VARCHAR}, tax_rate = #{commodityCode.sl,jdbcType=VARCHAR},
</if> </if>
<if test="commodityCode.dataSource != null and commodityCode.dataSource != ''">
data_source = #{commodityCode.dataSource,jdbcType=VARCHAR},
</if>
</set> </set>
<where> <where>
id in id in
@ -1271,12 +1280,12 @@
<if test="encoding != null and encoding != ''"> <if test="encoding != null and encoding != ''">
cc.encoding =#{encoding} cc.encoding =#{encoding}
</if> </if>
<if test="merchandiseName != null and merchandiseName != ''">
and cc.merchandise_name =#{merchandiseName}
</if>
<if test="entId != null and entId != ''"> <if test="entId != null and entId != ''">
and cc.ent_id =#{entId} and cc.ent_id =#{entId}
</if> </if>
<if test="merchandiseName != null and merchandiseName != ''">
and cc.merchandise_name =#{merchandiseName}
</if>
</where> </where>
</select> </select>

@ -59,6 +59,7 @@ public enum OrderInfoContentEnum {
INVALID_ORDER_STATUS("9644", "无效订单"), INVALID_ORDER_STATUS("9644", "无效订单"),
MORE_NSRSBH_ERROR("9999", "请选择明确的销方信息进行操作"), MORE_NSRSBH_ERROR("9999", "请选择明确的销方信息进行操作"),
MORE_ENTID_ERROR("9999", "组织编码不允许为"),
COMMON_ERROR("9999", "企业未配置税控设备"), COMMON_ERROR("9999", "企业未配置税控设备"),
QD_FW_ERROR("9999", "未开通全电业务,请联系运维人员"), QD_FW_ERROR("9999", "未开通全电业务,请联系运维人员"),

@ -19,11 +19,11 @@ public enum TaxClassCodeEnum {
/** /**
* 数据来源 * 数据来源
*/ */
DATA_SOURCE_0("0", "集团共享"), DATA_SOURCE_0("0", "集团共享"),//放弃使用
DATA_SOURCE_1("1", "手工创建"), DATA_SOURCE_1("1", "手工创建"),
DATA_SOURCE_2("2", "模板导入"), DATA_SOURCE_2("2", "模板导入"),
DATA_SOURCE_3("3", "采集下级"), DATA_SOURCE_3("3", "采集下级"),
DATA_SOURCE_4("4", "自动归集"), DATA_SOURCE_4("4", "自动归集"),//物料更新没使用
DATA_SOURCE_5("5", "接口同步"), DATA_SOURCE_5("5", "接口同步"),
DATA_SOURCE_6("6", "开票自动归集"), DATA_SOURCE_6("6", "开票自动归集"),
/** /**

@ -114,9 +114,6 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
@Resource @Resource
private OrderInfoQdMapper orderInfoQdMapper; private OrderInfoQdMapper orderInfoQdMapper;
@Resource
private OrderInfoQdFjysMapper orderInfoQdFjysMapper;
@Resource @Resource
private OrderProcessService orderProcessService; private OrderProcessService orderProcessService;

@ -284,7 +284,7 @@ public class BuyerController {
buyerEntity.setBankOfDeposit(buyerImportExcel.getGhfYh()); buyerEntity.setBankOfDeposit(buyerImportExcel.getGhfYh());
buyerEntity.setBankNumber(buyerImportExcel.getGhfZh()); buyerEntity.setBankNumber(buyerImportExcel.getGhfZh());
buyerEntity.setRemarks(buyerImportExcel.getGhfBz()); buyerEntity.setRemarks(buyerImportExcel.getGhfBz());
if(StringUtils.isBlank(buyerEntity.getBuyerCode())||"0000000000".equals(buyerEntity.getBuyerCode())){ if(StringUtils.isBlank(buyerImportExcel.getGhfBm())||"0000000000".equals(buyerImportExcel.getGhfBm())){
String format = String.format("%s%s", sdf.format(new Date()), String.format("%6s", String.valueOf(new Random().nextInt(1000000))).replace(' ', '0')); String format = String.format("%s%s", sdf.format(new Date()), String.format("%6s", String.valueOf(new Random().nextInt(1000000))).replace(' ', '0'));
buyerEntity.setBuyerCode(format); buyerEntity.setBuyerCode(format);
}else{ }else{

@ -33,6 +33,7 @@ import com.dxhy.order.model.*;
import com.dxhy.order.utils.CommonUtils; import com.dxhy.order.utils.CommonUtils;
import com.dxhy.order.utils.JsonUtils; import com.dxhy.order.utils.JsonUtils;
import com.dxhy.order.utils.NsrsbhUtils; import com.dxhy.order.utils.NsrsbhUtils;
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;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -293,7 +294,7 @@ public class GenerateReadyOpenOrderServiceImpl implements GenerateReadyOpenOrder
// 补全明细信息 // 补全明细信息
List<OrderItemInfo> orderItemList = commonOrderInfo.getOrderItemInfo(); List<OrderItemInfo> orderItemList = commonOrderInfo.getOrderItemInfo();
boolean kcp = orderItemList.stream().allMatch(orderItemInfo -> baseServiceConfig.getKcpspbm().contains(orderItemInfo.getSpbm())); boolean kcp = orderItemList.stream().allMatch(orderItemInfo -> StringUtils.isNotBlank(orderItemInfo.getSpbm()) && baseServiceConfig.getKcpspbm().contains(orderItemInfo.getSpbm()));
if(kcp){ if(kcp){
orderInfo.setQdBz(OrderInfoEnum.QDBZ_CODE_7.getKey()); orderInfo.setQdBz(OrderInfoEnum.QDBZ_CODE_7.getKey());
if(orderItemList.size() > ConfigureConstant.INT_8){ if(orderItemList.size() > ConfigureConstant.INT_8){
@ -314,6 +315,7 @@ public class GenerateReadyOpenOrderServiceImpl implements GenerateReadyOpenOrder
} }
/** /**
* 生成待开具订单 * 生成待开具订单
*/ */
@ -878,6 +880,29 @@ public class GenerateReadyOpenOrderServiceImpl implements GenerateReadyOpenOrder
} }
public static void main(String[] args) { public static void main(String[] args) {
List<String> list = Lists.newArrayList();
list.add("1");
list.add("2");
list.add("3");
list.add("4");
String collect = list.stream().collect(Collectors.joining(","));
// boolean kcp = orderItemList.stream().allMatch(orderItemInfo -> baseServiceConfig.getKcpspbm().contains(orderItemInfo.getSpbm()));
// if(kcp){
// orderInfo.setQdBz(OrderInfoEnum.QDBZ_CODE_7.getKey());
// if(orderItemList.size() > ConfigureConstant.INT_8){
// orderInfo.setQdBz(OrderInfoEnum.QDBZ_CODE_8.getKey());
// }
// }
String str1 = "";
boolean b = list.stream().allMatch(l -> StringUtils.isNotBlank(str1) && collect.contains(str1));
if(b){
System.out.println("98458845");
}else {
System.out.println("134567890");
}
String str = "差额征税:5000.00。aaaaa"; String str = "差额征税:5000.00。aaaaa";
int indexOf = str.indexOf(ConfigureConstant.STRING_CEZS); int indexOf = str.indexOf(ConfigureConstant.STRING_CEZS);
int indexOf2 = str.indexOf("。"); int indexOf2 = str.indexOf("。");

@ -1830,13 +1830,13 @@ public class OrderInfoServiceImpl implements OrderInfoService {
// 如果公司物料库匹配失败,从集团物料库匹配 // 如果公司物料库匹配失败,从集团物料库匹配
if (commodityCodeEntity == null) { if (commodityCodeEntity == null) {
// 如果匹配不到,则去集团物料库匹配 // 如果匹配不到,则去集团物料库匹配
commodityCodeEntity = commodityCodeMapper.queryCommodityCodeByZxbmAndXhfNsrsbhAndEntId(orderItemInfo.getZxbm(), "-1",null); commodityCodeEntity = commodityCodeMapper.queryCommodityCodeByZxbmAndXhfNsrsbhAndEntId(orderItemInfo.getZxbm(), ConfigureConstant.STRING_1_,null);
} }
if(commodityCodeEntity != null){ if(commodityCodeEntity != null){
completeCommodityMessageBySpid(orderItemInfo, commodityCodeEntity); completeCommodityMessageBySpid(orderItemInfo, commodityCodeEntity);
orderItemInfo.setZnfm(ConfigureConstant.STRING_0); String znfm = ConfigureConstant.STRING_1_.equals(commodityCodeEntity.getXhfNsrsbh())?ConfigureConstant.STRING_1:ConfigureConstant.STRING_0;
orderItemInfo.setZnfm(znfm);
orderItemInfo.setXmsl(null); orderItemInfo.setXmsl(null);
orderItemInfo.setXmdj(null); orderItemInfo.setXmdj(null);
} }
@ -2017,7 +2017,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
if (!OrderInfoEnum.FPHXZ_CODE_1.getKey().equals(item.getFphxz())) { if (!OrderInfoEnum.FPHXZ_CODE_1.getKey().equals(item.getFphxz())) {
//规格型号 //规格型号
if (StringUtils.isNotBlank(commodity.getGgxh())) { if (StringUtils.isNotBlank(commodity.getGgxh())) {
item.setGgxh(commodity.getGgxh()); item.setGgxh(commodity.getGgxh().trim());
} }
//单位 //单位
if (StringUtils.isNotBlank(commodity.getXmdw())) { if (StringUtils.isNotBlank(commodity.getXmdw())) {

@ -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.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.baseservice.utils.BaseServiceBeanTransitionUtils;
import com.dxhy.order.constant.ConfigureConstant; 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;
@ -341,18 +342,14 @@ 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){ ggxh = BaseServiceBeanTransitionUtils.ggxhTransition(ggxh);
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());
commodityCodeEntity.setZxbm(reqBO.getCODE()); // 编码 commodityCodeEntity.setZxbm(reqBO.getCODE()); // 编码
commodityCodeEntity.setXmdw(reqBO.getDESC5()); commodityCodeEntity.setXmdw(reqBO.getDESC5());
commodityCodeEntity.setCreateTime(new Date()); commodityCodeEntity.setModifyTime(new Date());
commodityCodeEntity.setBz(reqBO.getDESCSHORT()); commodityCodeEntity.setBz(reqBO.getDESCSHORT());
commodityCodeEntity.setGgxh(ggxh); commodityCodeEntity.setGgxh(ggxh);
commodityCodeEntity.setUUID(reqBO.getUUID()); commodityCodeEntity.setUUID(reqBO.getUUID());
@ -362,7 +359,7 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
} }
commodityCodeEntity.setDataSource("4"); commodityCodeEntity.setDataSource("4");
//matchCommodityCode(commodityCodeEntity); //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); int updateCommodity = commodityMapper.batchUpdateCommodity(commodityCodeEntity, ids);
if (updateCommodity > 0) { if (updateCommodity > 0) {
commodityCodeEntity.setSuccess(true); commodityCodeEntity.setSuccess(true);

@ -14,6 +14,7 @@ import com.dxhy.order.baseservice.openapi.model.SksbxxtbReqBO;
import com.dxhy.order.baseservice.openapi.protocol.qd.PageXfxx; import com.dxhy.order.baseservice.openapi.protocol.qd.PageXfxx;
import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxBO; import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxBO;
import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbReqBO; import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbReqBO;
import com.dxhy.order.baseservice.utils.BaseServiceBeanTransitionUtils;
import com.dxhy.order.constant.*; import com.dxhy.order.constant.*;
import com.dxhy.order.consumer.openapi.protocol.Response; import com.dxhy.order.consumer.openapi.protocol.Response;
import com.dxhy.order.consumer.openapi.protocol.cpy.*; import com.dxhy.order.consumer.openapi.protocol.cpy.*;
@ -50,10 +51,7 @@ import com.dxhy.order.model.sk.hp.*;
import com.dxhy.order.model.sk.kp.*; import com.dxhy.order.model.sk.kp.*;
import com.dxhy.order.model.sk.query.ResponseCommonInvoice; import com.dxhy.order.model.sk.query.ResponseCommonInvoice;
import com.dxhy.order.model.sk.sld.SearchSld; import com.dxhy.order.model.sk.sld.SearchSld;
import com.dxhy.order.utils.CommonUtils; import com.dxhy.order.utils.*;
import com.dxhy.order.utils.DecimalCalculateUtil;
import com.dxhy.order.utils.JsonUtils;
import com.dxhy.order.utils.StringUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -2154,6 +2152,9 @@ public class BeanTransitionUtils {
commonOrderInfo.getOrderInfo().setGhfZh(buyerEntity.getBankNumber()); commonOrderInfo.getOrderInfo().setGhfZh(buyerEntity.getBankNumber());
} }
if (StringUtils.isBlank(commonOrderInfo.getOrderInfo().getGhfEmail())) {
commonOrderInfo.getOrderInfo().setGhfEmail(buyerEntity.getEmail());
}
} }
@ -3549,19 +3550,8 @@ public class BeanTransitionUtils {
ddmxxxBO.setDJ(detail.getZZDJ()); ddmxxxBO.setDJ(detail.getZZDJ());
} }
if(StringUtils.isNotBlank(ddmxxxBO.getGGXH())){ if(StringUtils.isNotBlank(ddmxxxBO.getGGXH())){
String ggxh = ddmxxxBO.getGGXH(); String ggxh = BaseServiceBeanTransitionUtils.ggxhTransition(ddmxxxBO.getGGXH());
try { ddmxxxBO.setGGXH(ggxh);
if (ggxh.getBytes(ConfigureConstant.STRING_CHARSET_GBK).length > ConfigureConstant.INT_40) {
log.debug("对明细行规格型号进行截取,截取前数据为:{}", ggxh);
ggxh = StringUtil.subStringByByte(ggxh, ConfigureConstant.INT_40);
log.debug("对明细行规格型号进行截取,截取后数据为:{}", ggxh);
ddmxxxBO.setGGXH(ggxh);
}
} catch (IOException e) {
//编码格式错误
log.error("处理商品名称异常:{}", e);
throw new RuntimeException(e);
}
} }
ddmxxxBO.setSL(new BigDecimal(detail.getZTAX()).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP).toString()); ddmxxxBO.setSL(new BigDecimal(detail.getZTAX()).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP).toString());
@ -3825,6 +3815,4 @@ public class BeanTransitionUtils {
return orderItemInfos; return orderItemInfos;
} }
} }

Loading…
Cancel
Save