Merge remote-tracking branch 'origin/dev-jdc' into release

release
wangrangrang 2 years ago
commit d0f52099ca
  1. 2
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/vehicles/controller/VehiclesController.java
  2. 20
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/vehicles/model/VehiclesCodeEntity.java
  3. 63
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/vehicles/service/impl/VehiclesServiceImpl.java
  4. 95
      order-management-base-service/src/main/resources/mybatis/mapper/VehiclesCodeMapper.xml
  5. 39
      order-management-common/src/main/java/com/dxhy/order/utils/CommonUtils.java
  6. 17
      order-management-consumer/src/main/java/com/dxhy/order/consumer/config/rabbitmq/OrderSaveSpxxHandler.java
  7. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/api/CommonRest.java
  8. 12
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/FangGeInterfaceServiceImpl.java
  9. 7
      order-management-invoice/src/main/java/com/dxhy/order/invoice/config/MqttPushClientNew.java
  10. 2
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/fangge/service/impl/FangGeServiceImpl.java

@ -178,7 +178,7 @@ public class VehiclesController {
if (StringUtils.isBlank(vehiclesCodeEntity.getCllx())) { if (StringUtils.isBlank(vehiclesCodeEntity.getCllx())) {
return R.error("车辆类型为空"); return R.error("车辆类型为空");
} }
if (StringUtils.isBlank(vehiclesCodeEntity.getTaxClassCode())) { if (StringUtils.isBlank(vehiclesCodeEntity.getSpbm())) {
return R.error("税收编码为空"); return R.error("税收编码为空");
} }
return R.ok(); return R.ok();

@ -49,35 +49,37 @@ public class VehiclesCodeEntity implements Serializable {
* 税收编码 * 税收编码
*/ */
@NotBlank(message = "税收编码 不允许为空") @NotBlank(message = "税收编码 不允许为空")
private String taxClassCode; private String spbm;
/** /**
* 税收简称 * 税收简称
*/ */
private String taxClassAbbreviation; private String spjc;
/** /**
* 税收分类名称 * 税收分类名称
*/ */
private String taxClassificationName; private String spmc;
/** /**
* 税率 * 税率
*/ */
private String taxRate; private String sl;
/** /**
* 产地 * 产地
*/ */
private String producingArea; private String clcd;
/** /**
* 生产企业名称 * 生产企业名称
*/ */
private String producingEnterpriseName; private String scqymc;
/** /**
* 享受优惠政策01 * 享受优惠政策01
*/ */
private String enjoyPreferentialPolicies; private String yhzcbs;
/** /**
* 优惠政策类型jh非零税率0:出口零税,1免税2不征税 3:普通零税率 4简易征收(如果是按3%简易征收需要保证税率为0.03) * 优惠政策类型jh非零税率0:出口零税,1免税2不征税 3:普通零税率
*/ */
private String preferentialPoliciesType; private String lslbs;
/** /**
* 数据来源(0-集团共享1-手工创建2-模板导入3-采集下级) * 数据来源(0-集团共享1-手工创建2-模板导入3-采集下级)
*/ */

@ -1,12 +1,5 @@
package com.dxhy.order.baseservice.module.vehicles.service.impl; package com.dxhy.base.service.module.vehicles.service.impl;
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEnum;
import com.dxhy.order.constant.*;
import com.dxhy.order.model.PageUtils;
import com.dxhy.order.model.R;
import com.dxhy.order.utils.CheckParamUtil;
import com.dxhy.order.utils.CommonUtils;
import com.dxhy.order.utils.GbkUtil;
import com.dxhy.order.baseservice.module.base.service.BaseService; import com.dxhy.order.baseservice.module.base.service.BaseService;
import com.dxhy.order.baseservice.module.taxclass.model.TaxClassCodeEntity; import com.dxhy.order.baseservice.module.taxclass.model.TaxClassCodeEntity;
import com.dxhy.order.baseservice.module.taxclass.service.TaxClassCodeService; import com.dxhy.order.baseservice.module.taxclass.service.TaxClassCodeService;
@ -16,6 +9,12 @@ import com.dxhy.order.baseservice.module.vehicles.model.VehiclesExcel;
import com.dxhy.order.baseservice.module.vehicles.protocol.FuzzyQueryVehiclesBO; import com.dxhy.order.baseservice.module.vehicles.protocol.FuzzyQueryVehiclesBO;
import com.dxhy.order.baseservice.module.vehicles.protocol.VehiclesCodeBO; import com.dxhy.order.baseservice.module.vehicles.protocol.VehiclesCodeBO;
import com.dxhy.order.baseservice.module.vehicles.service.VehiclesService; import com.dxhy.order.baseservice.module.vehicles.service.VehiclesService;
import com.dxhy.order.constant.*;
import com.dxhy.order.model.PageUtils;
import com.dxhy.order.model.R;
import com.dxhy.order.utils.CheckParamUtil;
import com.dxhy.order.utils.CommonUtils;
import com.dxhy.order.utils.GbkUtil;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -62,8 +61,8 @@ public class VehiclesServiceImpl implements VehiclesService {
PageHelper.startPage(vehiclesCodeBo.getCurrPage(), vehiclesCodeBo.getPageSize()); PageHelper.startPage(vehiclesCodeBo.getCurrPage(), vehiclesCodeBo.getPageSize());
List<VehiclesCodeEntity> vehiclesCodeEntities = vehiclesCodeMapper.queryVehicles(vehiclesCodeBo, nsrsbhList); List<VehiclesCodeEntity> vehiclesCodeEntities = vehiclesCodeMapper.queryVehicles(vehiclesCodeBo, nsrsbhList);
vehiclesCodeEntities.forEach(vehiclesCodeEntity -> { vehiclesCodeEntities.forEach(vehiclesCodeEntity -> {
if (StringUtils.isNotBlank(vehiclesCodeEntity.getTaxRate())) { if (StringUtils.isNotBlank(vehiclesCodeEntity.getSl())) {
vehiclesCodeEntity.setTaxRate(CommonUtils.formatSl(vehiclesCodeEntity.getTaxRate())); vehiclesCodeEntity.setSl(CommonUtils.formatSl(vehiclesCodeEntity.getSl()));
} }
}); });
PageInfo<VehiclesCodeEntity> pageInfo = new PageInfo<>(vehiclesCodeEntities); PageInfo<VehiclesCodeEntity> pageInfo = new PageInfo<>(vehiclesCodeEntities);
@ -85,13 +84,13 @@ public class VehiclesServiceImpl implements VehiclesService {
//设置主键id //设置主键id
vehiclesCodeEntity.setId(baseService.getGenerateShotKey()); vehiclesCodeEntity.setId(baseService.getGenerateShotKey());
} }
if (StringUtils.isBlank(vehiclesCodeEntity.getTaxRate())) { if (StringUtils.isBlank(vehiclesCodeEntity.getSl())) {
//税率 默认 //税率 默认
vehiclesCodeEntity.setTaxRate("0.13"); vehiclesCodeEntity.setSl("0.13");
} }
if (StringUtils.isBlank(vehiclesCodeEntity.getDataSource())) { if (StringUtils.isBlank(vehiclesCodeEntity.getDataSource())) {
//设置数据来源 //设置数据来源
vehiclesCodeEntity.setDataSource(CommodityCodeEnum.DATA_SOURCE_1.getKey()); vehiclesCodeEntity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_1.getKey());
} }
VehiclesCodeEntity duplicateVehiclesCodeEntity = isDuplicate(vehiclesCodeEntity); VehiclesCodeEntity duplicateVehiclesCodeEntity = isDuplicate(vehiclesCodeEntity);
if (Objects.isNull(duplicateVehiclesCodeEntity)) { if (Objects.isNull(duplicateVehiclesCodeEntity)) {
@ -171,56 +170,56 @@ public class VehiclesServiceImpl implements VehiclesService {
//税收分类名称 //税收分类名称
TaxClassCodeEntity taxClassCodeEntity = taxClassCodeService.queryTaxClassCodeFromCache(vehiclesExcel.getTaxClassCode()); TaxClassCodeEntity taxClassCodeEntity = taxClassCodeService.queryTaxClassCodeFromCache(vehiclesExcel.getTaxClassCode());
if (Objects.nonNull(taxClassCodeEntity)) { if (Objects.nonNull(taxClassCodeEntity)) {
vehiclesCodeEntity.setTaxClassificationName(taxClassCodeEntity.getSpmc()); vehiclesCodeEntity.setSpmc(taxClassCodeEntity.getSpmc());
} }
//税率 //税率
String taxRate = vehiclesCodeEntity.getTaxRate(); String taxRate = vehiclesCodeEntity.getSl();
if (StringUtils.isNotBlank(taxRate)) { if (StringUtils.isNotBlank(taxRate)) {
vehiclesCodeEntity.setTaxRate(CommonUtils.formatSl(taxRate)); vehiclesCodeEntity.setSl(CommonUtils.formatSl(taxRate));
} }
//享受优惠政策 //享受优惠政策
String enjoyPreferentialPolicies = vehiclesCodeEntity.getEnjoyPreferentialPolicies(); String enjoyPreferentialPolicies = vehiclesCodeEntity.getYhzcbs();
enjoyPreferentialPolicies = StringUtils.isEmpty(enjoyPreferentialPolicies) enjoyPreferentialPolicies = StringUtils.isEmpty(enjoyPreferentialPolicies)
? ConfigureConstant.STRING_YHZCBS_F : enjoyPreferentialPolicies; ? ConfigureConstant.STRING_YHZCBS_F : enjoyPreferentialPolicies;
if (ConfigureConstant.STRING_YHZCBS_S.equals(enjoyPreferentialPolicies)) { if (ConfigureConstant.STRING_YHZCBS_S.equals(enjoyPreferentialPolicies)) {
// '享受优惠政策(1:是,0:否)', // '享受优惠政策(1:是,0:否)',
vehiclesCodeEntity.setEnjoyPreferentialPolicies(OrderInfoEnum.YHZCBS_1.getKey()); vehiclesCodeEntity.setYhzcbs(OrderInfoEnum.YHZCBS_1.getKey());
} else if (ConfigureConstant.STRING_YHZCBS_F.equals(enjoyPreferentialPolicies)) { } else if (ConfigureConstant.STRING_YHZCBS_F.equals(enjoyPreferentialPolicies)) {
vehiclesCodeEntity.setEnjoyPreferentialPolicies(OrderInfoEnum.YHZCBS_0.getKey()); vehiclesCodeEntity.setYhzcbs(OrderInfoEnum.YHZCBS_0.getKey());
} else { } else {
vehiclesCodeEntity.setEnjoyPreferentialPolicies(OrderInfoEnum.YHZCBS_0.getKey()); vehiclesCodeEntity.setYhzcbs(OrderInfoEnum.YHZCBS_0.getKey());
} }
//优惠政策类型 //优惠政策类型
if (StringUtils.isNotBlank(vehiclesCodeEntity.getEnjoyPreferentialPolicies()) if (StringUtils.isNotBlank(vehiclesCodeEntity.getYhzcbs())
&& OrderInfoEnum.YHZCBS_1.getKey().equals(vehiclesCodeEntity.getEnjoyPreferentialPolicies())) { && OrderInfoEnum.YHZCBS_1.getKey().equals(vehiclesCodeEntity.getYhzcbs())) {
String preferentialPoliciesType = vehiclesCodeEntity.getPreferentialPoliciesType(); String preferentialPoliciesType = vehiclesCodeEntity.getLslbs();
if (StringUtils.isNotBlank(preferentialPoliciesType)) { if (StringUtils.isNotBlank(preferentialPoliciesType)) {
switch (preferentialPoliciesType) { switch (preferentialPoliciesType) {
case "不征税": case "不征税":
vehiclesCodeEntity.setPreferentialPoliciesType(OrderInfoEnum.LSLBS_2.getKey()); vehiclesCodeEntity.setLslbs(OrderInfoEnum.LSLBS_2.getKey());
break; break;
case "免税": case "免税":
vehiclesCodeEntity.setPreferentialPoliciesType(OrderInfoEnum.LSLBS_1.getKey()); vehiclesCodeEntity.setLslbs(OrderInfoEnum.LSLBS_1.getKey());
break; break;
case "出口零税": case "出口零税":
vehiclesCodeEntity.setPreferentialPoliciesType(OrderInfoEnum.LSLBS_0.getKey()); vehiclesCodeEntity.setLslbs(OrderInfoEnum.LSLBS_0.getKey());
break; break;
case "普通零税率": case "普通零税率":
vehiclesCodeEntity.setPreferentialPoliciesType(OrderInfoEnum.LSLBS_3.getKey()); vehiclesCodeEntity.setLslbs(OrderInfoEnum.LSLBS_3.getKey());
break; break;
case "非零税率": case "非零税率":
default: default:
vehiclesCodeEntity.setPreferentialPoliciesType(""); vehiclesCodeEntity.setLslbs("");
break; break;
} }
} else { } else {
vehiclesCodeEntity.setPreferentialPoliciesType(""); vehiclesCodeEntity.setLslbs("");
} }
} else { } else {
vehiclesCodeEntity.setPreferentialPoliciesType(""); vehiclesCodeEntity.setLslbs("");
} }
//数据来源(0-集团共享;1-手工创建;2-模板导入;3-采集下级;) //数据来源(0-集团共享;1-手工创建;2-模板导入;3-采集下级;)
vehiclesCodeEntity.setDataSource(CommodityCodeEnum.DATA_SOURCE_2.getKey()); vehiclesCodeEntity.setDataSource(TaxClassCodeEnum.DATA_SOURCE_2.getKey());
//数据创建时间 //数据创建时间
vehiclesCodeEntity.setCreateTime(new Date()); vehiclesCodeEntity.setCreateTime(new Date());
//更新时间 //更新时间
@ -243,7 +242,7 @@ public class VehiclesServiceImpl implements VehiclesService {
vehiclesCodeEntityNew.setCllx(vehiclesCodeEntity.getCllx()); vehiclesCodeEntityNew.setCllx(vehiclesCodeEntity.getCllx());
vehiclesCodeEntityNew.setClbm(vehiclesCodeEntity.getClbm()); vehiclesCodeEntityNew.setClbm(vehiclesCodeEntity.getClbm());
vehiclesCodeEntityNew.setCpxh(vehiclesCodeEntity.getCpxh()); vehiclesCodeEntityNew.setCpxh(vehiclesCodeEntity.getCpxh());
vehiclesCodeEntityNew.setTaxClassCode(vehiclesCodeEntity.getTaxClassCode()); vehiclesCodeEntityNew.setSpbm(vehiclesCodeEntity.getSpbm());
return vehiclesCodeMapper.selectCount(vehiclesCodeEntityNew); return vehiclesCodeMapper.selectCount(vehiclesCodeEntityNew);
} }

@ -50,11 +50,11 @@
</foreach> </foreach>
<!-- 车辆类型--> <!-- 车辆类型-->
<if test="vehiclesCodeBo.cllx != null and vehiclesCodeBo.cllx != ''"> <if test="vehiclesCodeBo.cllx != null and vehiclesCodeBo.cllx != ''">
AND cllx LIKE CONCAT(CONCAT('%',#{vehiclesCodeBo.cllx},'%')) AND cllx LIKE concat('%',REPLACE(REPLACE(#{vehiclesCodeBo.cllx},'%','\%'), '_', '\_'),'%')
</if> </if>
<!-- 车辆编码--> <!-- 车辆编码-->
<if test="vehiclesCodeBo.clbm != null and vehiclesCodeBo.clbm != ''"> <if test="vehiclesCodeBo.clbm != null and vehiclesCodeBo.clbm != ''">
AND clbm LIKE CONCAT(CONCAT('%',#{vehiclesCodeBo.clbm},'%')) AND clbm LIKE concat('%',REPLACE(REPLACE(#{vehiclesCodeBo.clbm},'%','\%'), '_', '\_'),'%')
</if> </if>
<!-- 数据来源(0-集团共享;1-手工创建;2-模板导入;3-采集下级;)--> <!-- 数据来源(0-集团共享;1-手工创建;2-模板导入;3-采集下级;)-->
<if test="vehiclesCodeBo.dataSource != null and vehiclesCodeBo.dataSource != ''"> <if test="vehiclesCodeBo.dataSource != null and vehiclesCodeBo.dataSource != ''">
@ -62,7 +62,8 @@
</if> </if>
<!-- 税收编码--> <!-- 税收编码-->
<if test="vehiclesCodeBo.taxClassCode != null and vehiclesCodeBo.taxClassCode != ''"> <if test="vehiclesCodeBo.taxClassCode != null and vehiclesCodeBo.taxClassCode != ''">
AND tax_class_code LIKE CONCAT(CONCAT('%',#{vehiclesCodeBo.taxClassCode},'%')) AND tax_class_code LIKE concat('%',REPLACE(REPLACE(#{vehiclesCodeBo.taxClassCode},'%','\%'), '_',
'\_'),'%')
</if> </if>
</where> </where>
ORDER BY create_time DESC ORDER BY create_time DESC
@ -96,13 +97,13 @@
<if test="dataType == 0"> <if test="dataType == 0">
AND concat_ws(',',xhf_nsrsbh,xhf_mc,cllx,clbm,cpxh,tax_class_code, AND concat_ws(',',xhf_nsrsbh,xhf_mc,cllx,clbm,cpxh,tax_class_code,
tax_classification_name,producing_area,producing_enterprise_name) LIKE tax_classification_name,producing_area,producing_enterprise_name) LIKE
CONCAT(CONCAT('%',#{fuzzyQueryCondition}),'%') concat('%',REPLACE(REPLACE(#{fuzzyQueryCondition},'%','\%'), '_', '\_'),'%')
</if> </if>
<if test="dataType == 1"> <if test="dataType == 1">
AND xhf_nsrsbh || ',' || xhf_mc || ',' || cllx ',' || clbm AND xhf_nsrsbh || ',' || xhf_mc || ',' || cllx ',' || clbm
',' || cpxh ',' || tax_class_code ',' || tax_classification_name ',' || cpxh ',' || tax_class_code ',' || tax_classification_name
',' || producing_area ',' || producing_enterprise_name LIKE ',' || producing_area ',' || producing_enterprise_name LIKE
CONCAT(CONCAT('%',#{fuzzyQueryCondition}),'%') concat('%',REPLACE(REPLACE(#{fuzzyQueryCondition},'%','\%'), '_', '\_'),'%')
</if> </if>
</if> </if>
</select> </select>
@ -130,28 +131,28 @@
<if test="cpxh != null"> <if test="cpxh != null">
cpxh, cpxh,
</if> </if>
<if test="taxClassCode != null"> <if test="spbm != null">
tax_class_code, tax_class_code,
</if> </if>
<if test="taxClassAbbreviation != null"> <if test="spjc != null">
tax_class_abbreviation, tax_class_abbreviation,
</if> </if>
<if test="taxClassificationName != null"> <if test="spmc != null">
tax_classification_name, tax_classification_name,
</if> </if>
<if test="taxRate != null"> <if test="sl != null">
tax_rate, tax_rate,
</if> </if>
<if test="producingArea != null"> <if test="clcd != null">
producing_area, producing_area,
</if> </if>
<if test="producingEnterpriseName != null"> <if test="scqymc != null">
producing_enterprise_name, producing_enterprise_name,
</if> </if>
<if test="enjoyPreferentialPolicies != null"> <if test="yhzcbs != null">
enjoy_preferential_policies, enjoy_preferential_policies,
</if> </if>
<if test="preferentialPoliciesType != null"> <if test="lslbs != null">
preferential_policies_type, preferential_policies_type,
</if> </if>
<if test="dataSource != null"> <if test="dataSource != null">
@ -179,29 +180,29 @@
<if test="cpxh != null"> <if test="cpxh != null">
#{cpxh,jdbcType=VARCHAR}, #{cpxh,jdbcType=VARCHAR},
</if> </if>
<if test="taxClassCode != null"> <if test="spbm != null">
#{taxClassCode,jdbcType=VARCHAR}, #{spbm,jdbcType=VARCHAR},
</if> </if>
<if test="taxClassAbbreviation != null"> <if test="spjc != null">
#{taxClassAbbreviation,jdbcType=VARCHAR}, #{spjc,jdbcType=VARCHAR},
</if> </if>
<if test="taxClassificationName != null"> <if test="spmc != null">
#{taxClassificationName,jdbcType=VARCHAR}, #{spmc,jdbcType=VARCHAR},
</if> </if>
<if test="taxRate != null"> <if test="sl != null">
#{taxRate,jdbcType=VARCHAR}, #{sl,jdbcType=VARCHAR},
</if> </if>
<if test="producingArea != null"> <if test="clcd != null">
#{producingArea,jdbcType=VARCHAR}, #{clcd,jdbcType=VARCHAR},
</if> </if>
<if test="producingEnterpriseName != null"> <if test="scqymc != null">
#{producingEnterpriseName,jdbcType=VARCHAR}, #{scqymc,jdbcType=VARCHAR},
</if> </if>
<if test="enjoyPreferentialPolicies != null"> <if test="yhzcbs != null">
#{enjoyPreferentialPolicies,jdbcType=VARCHAR}, #{yhzcbs,jdbcType=VARCHAR},
</if> </if>
<if test="preferentialPoliciesType != null"> <if test="lslbs != null">
#{preferentialPoliciesType,jdbcType=VARCHAR}, #{lslbs,jdbcType=VARCHAR},
</if> </if>
<if test="dataSource != null"> <if test="dataSource != null">
#{dataSource,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR},
@ -237,29 +238,29 @@
<if test="cpxh != null"> <if test="cpxh != null">
cpxh = #{cpxh,jdbcType=VARCHAR}, cpxh = #{cpxh,jdbcType=VARCHAR},
</if> </if>
<if test="taxClassCode != null"> <if test="spbm != null">
tax_class_code = #{taxClassCode,jdbcType=VARCHAR}, tax_class_code = #{spbm,jdbcType=VARCHAR},
</if> </if>
<if test="taxClassAbbreviation != null"> <if test="spjc != null">
tax_class_abbreviation = #{taxClassAbbreviation,jdbcType=VARCHAR}, tax_class_abbreviation = #{spjc,jdbcType=VARCHAR},
</if> </if>
<if test="taxClassificationName != null"> <if test="spmc != null">
tax_classification_name = #{taxClassificationName,jdbcType=VARCHAR}, tax_classification_name = #{spmc,jdbcType=VARCHAR},
</if> </if>
<if test="taxRate != null"> <if test="sl != null">
tax_rate = #{taxRate,jdbcType=VARCHAR}, tax_rate = #{sl,jdbcType=VARCHAR},
</if> </if>
<if test="producingArea != null"> <if test="clcd != null">
producing_area = #{producingArea,jdbcType=VARCHAR}, producing_area = #{clcd,jdbcType=VARCHAR},
</if> </if>
<if test="producingEnterpriseName != null"> <if test="scqymc != null">
producing_enterprise_name = #{producingEnterpriseName,jdbcType=VARCHAR}, producing_enterprise_name = #{scqymc,jdbcType=VARCHAR},
</if> </if>
<if test="enjoyPreferentialPolicies != null"> <if test="yhzcbs != null">
enjoy_preferential_policies = #{enjoyPreferentialPolicies,jdbcType=VARCHAR}, enjoy_preferential_policies = #{yhzcbs,jdbcType=VARCHAR},
</if> </if>
<if test="preferentialPoliciesType != null"> <if test="lslbs != null">
preferential_policies_type = #{preferentialPoliciesType,jdbcType=VARCHAR}, preferential_policies_type = #{lslbs,jdbcType=VARCHAR},
</if> </if>
<if test="dataSource != null"> <if test="dataSource != null">
data_source = #{dataSource,jdbcType=VARCHAR}, data_source = #{dataSource,jdbcType=VARCHAR},
@ -338,8 +339,8 @@
AND cpxh = #{cpxh,jdbcType=VARCHAR} AND cpxh = #{cpxh,jdbcType=VARCHAR}
</if> </if>
<!-- 税收编码--> <!-- 税收编码-->
<if test="taxClassCode != null and taxClassCode != ''"> <if test="spbm != null and spbm != ''">
AND tax_class_code = #{taxClassCode,jdbcType=VARCHAR} AND tax_class_code = #{spbm,jdbcType=VARCHAR}
</if> </if>
</where> </where>
LIMIT 1 LIMIT 1

@ -1132,17 +1132,16 @@ public class CommonUtils {
* @date 2021-09-07 * @date 2021-09-07
*/ */
public static boolean judgeIsFgTerminalNew(String terminalCode, String fgSkKpShList, String sh) { public static boolean judgeIsFgTerminalNew(String terminalCode, String fgSkKpShList, String sh) {
boolean isSkQd = true; if (StringUtils.isNotBlank(fgSkKpShList) && StringUtils.isNotBlank(sh)) {
// if (StringUtils.isNotBlank(fgSkKpShList) && StringUtils.isNotBlank(sh)) { String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
// String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2); for (String fgSkKp : fgSkKpList) {
// for (String fgSkKp : fgSkKpList) { if (sh.equals(fgSkKp)) {
// if (sh.equals(fgSkKp)) { return false;
// isSkQd = true; }
// break; }
// } }
// }
// }
boolean isSkQd = true;
return (OrderInfoEnum.TAX_EQUIPMENT_FGBW.getKey().equals(terminalCode) || return (OrderInfoEnum.TAX_EQUIPMENT_FGBW.getKey().equals(terminalCode) ||
OrderInfoEnum.TAX_EQUIPMENT_FGHX.getKey().equals(terminalCode) || OrderInfoEnum.TAX_EQUIPMENT_FGHX.getKey().equals(terminalCode) ||
OrderInfoEnum.TAX_EQUIPMENT_FGUKEY.getKey().equals(terminalCode) || OrderInfoEnum.TAX_EQUIPMENT_FGUKEY.getKey().equals(terminalCode) ||
@ -1158,17 +1157,15 @@ public class CommonUtils {
* @date 2021-09-07 * @date 2021-09-07
*/ */
public static boolean judgeIsFgTerminalOld(String terminalCode, String fgSkKpShList, String sh) { public static boolean judgeIsFgTerminalOld(String terminalCode, String fgSkKpShList, String sh) {
boolean isSkQd = false; if (StringUtils.isNotBlank(fgSkKpShList) && StringUtils.isNotBlank(sh)) {
// if (StringUtils.isNotBlank(fgSkKpShList) && StringUtils.isNotBlank(sh)) { String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
// String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2); for (String fgSkKp : fgSkKpList) {
// for (String fgSkKp : fgSkKpList) { if (sh.equals(fgSkKp)) {
// if (sh.equals(fgSkKp)) { return true;
// isSkQd = true; }
// break; }
// } }
// } boolean isSkQd = true;
// }
return (OrderInfoEnum.TAX_EQUIPMENT_FGBW.getKey().equals(terminalCode) || return (OrderInfoEnum.TAX_EQUIPMENT_FGBW.getKey().equals(terminalCode) ||
OrderInfoEnum.TAX_EQUIPMENT_FGHX.getKey().equals(terminalCode) || OrderInfoEnum.TAX_EQUIPMENT_FGHX.getKey().equals(terminalCode) ||
OrderInfoEnum.TAX_EQUIPMENT_FGUKEY.getKey().equals(terminalCode) || OrderInfoEnum.TAX_EQUIPMENT_FGUKEY.getKey().equals(terminalCode) ||

@ -14,7 +14,6 @@ import com.dxhy.order.baseservice.module.vehicles.service.VehiclesService;
import com.dxhy.order.baseservice.openapi.protocol.spxx.ReceiveSpxxReq; import com.dxhy.order.baseservice.openapi.protocol.spxx.ReceiveSpxxReq;
import com.dxhy.order.constant.OrderInfoContentEnum; import com.dxhy.order.constant.OrderInfoContentEnum;
import com.dxhy.order.constant.OrderInfoEnum; import com.dxhy.order.constant.OrderInfoEnum;
import com.dxhy.order.constant.TaxClassCodeEnum;
import com.dxhy.order.consumer.modules.order.service.OrderInfoEscService; import com.dxhy.order.consumer.modules.order.service.OrderInfoEscService;
import com.dxhy.order.consumer.modules.order.service.OrderInfoJdcService; import com.dxhy.order.consumer.modules.order.service.OrderInfoJdcService;
import com.dxhy.order.consumer.modules.order.service.OrderItemInfoService; import com.dxhy.order.consumer.modules.order.service.OrderItemInfoService;
@ -188,14 +187,14 @@ public class OrderSaveSpxxHandler implements BaseListener {
vehiclesCodeEntity.setCllx(cllx); vehiclesCodeEntity.setCllx(cllx);
vehiclesCodeEntity.setClbm(clbm); vehiclesCodeEntity.setClbm(clbm);
vehiclesCodeEntity.setCpxh(cpxh); vehiclesCodeEntity.setCpxh(cpxh);
vehiclesCodeEntity.setTaxClassCode(taxClassCodeEntity.getSpbm()); vehiclesCodeEntity.setSpbm(taxClassCodeEntity.getSpbm());
vehiclesCodeEntity.setTaxClassAbbreviation(taxClassCodeEntity.getSpjc()); vehiclesCodeEntity.setSpjc(taxClassCodeEntity.getSpjc());
vehiclesCodeEntity.setTaxClassificationName(taxClassCodeEntity.getSpmc()); vehiclesCodeEntity.setSpmc(taxClassCodeEntity.getSpmc());
vehiclesCodeEntity.setTaxRate(CommonUtils.formatSl(orderItemInfo.getSl())); vehiclesCodeEntity.setSl(CommonUtils.formatSl(orderItemInfo.getSl()));
vehiclesCodeEntity.setProducingArea(cd); vehiclesCodeEntity.setClcd(cd);
vehiclesCodeEntity.setProducingEnterpriseName(scqymc); vehiclesCodeEntity.setScqymc(scqymc);
vehiclesCodeEntity.setEnjoyPreferentialPolicies(orderItemInfo.getYhzcbs()); vehiclesCodeEntity.setYhzcbs(orderItemInfo.getYhzcbs());
vehiclesCodeEntity.setPreferentialPoliciesType(orderItemInfo.getLslbs()); vehiclesCodeEntity.setLslbs(orderItemInfo.getLslbs());
vehiclesCodeEntity.setDataSource(CommodityCodeEnum.DATA_SOURCE_4.getKey()); vehiclesCodeEntity.setDataSource(CommodityCodeEnum.DATA_SOURCE_4.getKey());
vehiclesCodeEntity.setCreateTime(new Date()); vehiclesCodeEntity.setCreateTime(new Date());
vehiclesCodeEntity.setModifyTime(new Date()); vehiclesCodeEntity.setModifyTime(new Date());

@ -218,7 +218,7 @@ public class CommonRest {
if (StringUtils.isNotBlank(xhfNsrsbh) && StringUtils.isNotBlank(jqbh)) { if (StringUtils.isNotBlank(xhfNsrsbh) && StringUtils.isNotBlank(jqbh)) {
try { try {
//解决方格启动和创建主题之间的延迟,程序睡眠2秒保证订阅的主题已创建 //解决方格启动和创建主题之间的延迟,程序睡眠2秒保证订阅的主题已创建
Thread.sleep(2000); Thread.sleep(15000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
log.error("{}接收emqx消息后程序自动延迟异常:{}", LOGGER_MSG, e.getMessage()); log.error("{}接收emqx消息后程序自动延迟异常:{}", LOGGER_MSG, e.getMessage());
return R.error("接收emqx消息后程序自动延迟异常"); return R.error("接收emqx消息后程序自动延迟异常");

@ -3021,8 +3021,16 @@ public class FangGeInterfaceServiceImpl implements FangGeInterfaceService {
log.info("{}请求税控设备类型为:{}", LOGGER_MSG, terminalCode); log.info("{}请求税控设备类型为:{}", LOGGER_MSG, terminalCode);
FgEnterpriseInfoBo fgEnterpriseInfoBo = new FgEnterpriseInfoBo(); FgEnterpriseInfoBo fgEnterpriseInfoBo = new FgEnterpriseInfoBo();
fgEnterpriseInfoBo.setSKSBCODE(terminalCode); fgEnterpriseInfoBo.setSKSBCODE(terminalCode);
fgEnterpriseInfoBo.setKPFS(CommonUtils.judgeIsFgTerminalNew(terminalCode,fgSkKpShList,sh)? FANGGE_INVOICE_TYPE_1.getKey():FANGGE_INVOICE_TYPE_0.getKey()); fgEnterpriseInfoBo.setKPFS(FANGGE_INVOICE_TYPE_1.getKey());
if (StringUtils.isNotBlank(fgSkKpShList) && StringUtils.isNotBlank(sh)) {
String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
for (String fgSkKp : fgSkKpList) {
if (sh.equals(fgSkKp)) {
fgEnterpriseInfoBo.setKPFS(FANGGE_INVOICE_TYPE_0.getKey());
break;
}
}
}
fgOrderResponse.setData(fgEnterpriseInfoBo); fgOrderResponse.setData(fgEnterpriseInfoBo);
} catch (Exception e) { } catch (Exception e) {
fgOrderResponse.setSTATUS_CODE(OrderInfoContentEnum.INVOICE_STAT_ERROR.getKey()); fgOrderResponse.setSTATUS_CODE(OrderInfoContentEnum.INVOICE_STAT_ERROR.getKey());

@ -223,14 +223,15 @@ public class MqttPushClientNew {
try { try {
//判断mqttTopic是否被订阅,如果没有订阅,则不发送消息 //判断mqttTopic是否被订阅,如果没有订阅,则不发送消息
String emqxReqUrl = String.format(invoiceConfig.configMqttSubscriptions(), clientId); String emqxReqUrl = String.format(invoiceConfig.configMqttSubscriptions(), clientId);
log.info("调用emqx地址:{},topic:{}",emqxReqUrl,topic);
String emqxMsg = getEmqxMsg(emqxReqUrl); String emqxMsg = getEmqxMsg(emqxReqUrl);
log.info("获取emqx返回的信息:{}",emqxMsg);
if (StringUtils.isNotBlank(emqxMsg)) { if (StringUtils.isNotBlank(emqxMsg)) {
JSONArray data = JSONObject.parseArray(emqxMsg); JSONArray data = JSONObject.parseArray(emqxMsg);
for (Object o : data) { for (Object o : data) {
JSONObject jsonObject = (JSONObject) o; JSONObject jsonObject = (JSONObject) o;
if (topic.equals(jsonObject.getString("topic"))) { String topic1 = jsonObject.getString("topic");
if (topic.equals(topic1)) {
flag = true; flag = true;
break; break;
} }

@ -642,7 +642,7 @@ public class FangGeServiceImpl implements FangGeService {
public boolean getSubscriptions(String nsrsbh, String jqbh) { public boolean getSubscriptions(String nsrsbh, String jqbh) {
//发布消息topic //发布消息topic
String mqttTopic = String.format(RedisConstant.FG_MQTT_TOPIC_PUB_FANGGE, nsrsbh, jqbh); String mqttTopic = String.format(RedisConstant.FG_MQTT_TOPIC_PUB_FANGGE, nsrsbh, jqbh);
String clientId = nsrsbh + ConfigureConstant.STRING_UNDERLINE + jqbh; String clientId = nsrsbh + "_" + jqbh;
return mqttPushClientNew.getSubscriptions(mqttTopic, clientId); return mqttPushClientNew.getSubscriptions(mqttTopic, clientId);
} }

Loading…
Cancel
Save