feature 1.全电的数量、单价长度为13位

release
zhenghaiyang@ele-cloud.com 2 years ago
parent bbf1177dc4
commit dcb8d19e6a
  1. 2
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/utils/ExcelUtils.java
  2. 1
      order-management-common/src/main/java/com/dxhy/order/constant/ConfigureConstant.java
  3. 4
      order-management-common/src/main/java/com/dxhy/order/constant/PatternConstant.java
  4. 19
      order-management-common/src/main/java/com/dxhy/order/utils/HttpUtils.java
  5. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/BeanTransServiceImpl.java
  6. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderCommonServiceImpl.java
  7. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderExcelReadServiceImpl.java
  8. 8
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderInfoServiceImpl.java
  9. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/validate/service/impl/ValidateInterfaceOrderServiceImpl.java
  10. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/validate/service/impl/ValidateOrderImportServiceImpl.java
  11. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/validate/service/impl/ValidateOrderInfoServiceImpl.java
  12. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.java
  13. 4
      order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/PageDataDealUtil.java
  14. 7
      order-management-consumer/src/main/resources/bootstrap-prod.yaml
  15. 4
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/service/impl/RushRedInvoiceRequestInfoServiceImpl.java
  16. 2
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoicespecial/controller/SpecialInvoiceReversalController.java
  17. 4
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoicespecial/service/impl/SpecialInvoiceServiceImpl.java

@ -363,7 +363,7 @@ public class ExcelUtils {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderExcel.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
OrderItemInfo orderItemInfo = new OrderItemInfo();
orderItemInfo.setGgxh(orderExcel.getGgxh());

@ -493,6 +493,7 @@ public class ConfigureConstant {
public static final int INT_11 = 11;
public static final int INT_12 = 12;
public static final int INT_13 = 13;
public static final int INT_14 = 14;

@ -15,7 +15,7 @@ public class PatternConstant {
/**
* 全电发票项目单价正则表达式
*/
public static final String PATTERN_QD_XMDJ = "\\d+?[.]?\\d{0,15}";
public static final String PATTERN_QD_XMDJ = "\\d+?[.]?\\d{0,13}";
/**
* 项目数量正则表达式
@ -24,7 +24,7 @@ public class PatternConstant {
/**
* 全电发票项目数量正则表达式
*/
public static final String PATTERN_QD_XMSL = "-?\\d+?[.]?\\d{0,15}";
public static final String PATTERN_QD_XMSL = "-?\\d+?[.]?\\d{0,13}";
/**
* 项目金额正则表达式

@ -1,13 +1,10 @@
package com.dxhy.order.utils;
import cn.hutool.http.HttpRequest;
import com.dxhy.order.model.R;
import lombok.extern.slf4j.Slf4j;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
@ -27,6 +24,7 @@ public class HttpUtils {
* @return
* @throws IOException
*/
//发票回推(调用外网) 调用旧开放平台 (可以不改造)
public static String doPost(String url, Map<String, ?> paramMap) {
Map<String, Object> requestMap = new HashMap<>(paramMap);
long startTime = System.currentTimeMillis();
@ -35,7 +33,7 @@ public class HttpUtils {
log.debug("{}以Map调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime);
return body;
}
//调用开放平台 bigdata 税控 票池
public static String doPost(String url, String request) {
long startTime = System.currentTimeMillis();
String body = HttpRequest.post(url).body(request).timeout(300000).execute().body();
@ -43,7 +41,7 @@ public class HttpUtils {
log.debug("{}以字符串调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime);
return body;
}
//调用基础服务 如果不使用c48不用改造
public static String doPostWithHeader(String url, String data, Map<String, String> header) {
long startTime = System.currentTimeMillis();
String body = HttpRequest.post(url).addHeaders(header).body(data).timeout(300000).execute().body();
@ -51,16 +49,7 @@ public class HttpUtils {
log.debug("{}带head调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime);
return body;
}
public static String doPostFormWithHeader(String url, Map<String, ?> paramMap, Map<String, String> header) {
Map<String, Object> requestMap = new HashMap<>(paramMap);
long startTime = System.currentTimeMillis();
String body = HttpRequest.post(url).addHeaders(header).form(requestMap).timeout(300000).execute().body();
long endTime = System.currentTimeMillis();
log.debug("{}带head和form调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime);
return body;
}
//调用大B获取用户 调用mqtt
public static String doGetWithHeader(String url, Map<String, String> header) {
long startTime = System.currentTimeMillis();
String body = HttpRequest.get(url).addHeaders(header).timeout(300000).execute().body();

@ -149,7 +149,7 @@ public class BeanTransServiceImpl implements BeanTransService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
List<OrderItemInfo> orderItemInfos = new ArrayList<>();

@ -633,7 +633,7 @@ public class OrderCommonServiceImpl implements OrderCommonService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
List<String> shList = new ArrayList<>();
shList.add(orderInfo.getXhfNsrsbh());
@ -1074,7 +1074,7 @@ public class OrderCommonServiceImpl implements OrderCommonService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
for (OrderItemInfo orderItemInfo : commonOrder.getOrderItemInfo()) {
@ -1378,7 +1378,7 @@ public class OrderCommonServiceImpl implements OrderCommonService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
int i = 1;

@ -473,7 +473,7 @@ public class OrderExcelReadServiceImpl implements OrderExcelReadService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderExcel.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
// 数量 非必填项 只能为数字
if (StringUtils.isNotBlank(orderExcel.getXmsl())) {

@ -4,11 +4,8 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.nacos.common.utils.CollectionUtils;
import com.dxhy.base.constant.OrderSeparationException;
import com.dxhy.base.constant.TaxSeparateConfig;
import com.dxhy.base.utils.OrderMergeUtil;
import com.dxhy.base.utils.PriceTaxSeparationUtilNew;
import com.dxhy.common.generatepdf.util.EwmUtil;
import com.dxhy.order.baseservice.config.BaseServiceConfig;
@ -16,7 +13,6 @@ import com.dxhy.order.baseservice.module.buyer.model.BuyerEntity;
import com.dxhy.order.baseservice.module.buyer.service.BuyerService;
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity;
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.simsback.service.SimsBackService;
import com.dxhy.order.baseservice.module.thirdservice.user.model.DeptEntity;
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService;
@ -57,13 +53,11 @@ import com.dxhy.order.model.newsk.taxpayerinfo.TaxpayerInfoResponse;
import com.dxhy.order.model.qd.OrderInfoQd;
import com.dxhy.order.model.qdsk.taxpayerinfo.Kysl;
import com.dxhy.order.model.qdsk.taxpayerinfo.Qdjcxx;
import com.dxhy.order.model.sk.kp.CommonInvoiceStatus;
import com.dxhy.order.utils.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import java.math.BigDecimal;
@ -684,7 +678,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
for (OrderItemInfo orderItemInfo : orderItemInfos) {
/**

@ -3122,7 +3122,7 @@ public class ValidateInterfaceOrderServiceImpl implements ValidateInterfaceOrder
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",fpzldm)){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
String jsXmdj = DecimalCalculateUtil.divNew(orderItemInfo.getXmje(), orderItemInfo.getXmsl(), afterPointLength);
if (DecimalCalculateUtil.stringCompare(jsXmdj, orderItemInfo.getXmdj()) != 0) {
@ -3812,7 +3812,7 @@ public class ValidateInterfaceOrderServiceImpl implements ValidateInterfaceOrder
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",fpzldm)){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
String jsXmdj = DecimalCalculateUtil.divNew(orderItemInfo.getXmje(), orderItemInfo.getXmsl(), afterPointLength);
if (DecimalCalculateUtil.stringCompare(jsXmdj, orderItemInfo.getXmdj()) != 0) {
@ -6198,7 +6198,7 @@ public class ValidateInterfaceOrderServiceImpl implements ValidateInterfaceOrder
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",ddfpxx.getFPLXDM())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
String jsXmdj = DecimalCalculateUtil.divNew(ddmxxx.getJE(), ddmxxx.getSL(), afterPointLength);
if (DecimalCalculateUtil.stringCompare(jsXmdj, ddmxxx.getDJ()) != 0) {

@ -219,7 +219,7 @@ public class ValidateOrderImportServiceImpl implements ValidateOrderImportServic
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
String jsXmdj = DecimalCalculateUtil.divNew(orderItemInfo.getXmje(), orderItemInfo.getXmsl(), afterPointLength);
if (DecimalCalculateUtil.stringCompare(jsXmdj, orderItemInfo.getXmdj()) != 0) {

@ -258,7 +258,7 @@ public class ValidateOrderInfoServiceImpl implements ValidateOrderInfoService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
String jsXmdj = DecimalCalculateUtil.divNew(orderItemInfo.getXmje(), orderItemInfo.getXmsl(), afterPointLength);
if (DecimalCalculateUtil.stringCompare(jsXmdj, orderItemInfo.getXmdj()) != 0) {

@ -3562,7 +3562,7 @@ public class BeanTransitionUtils {
if(StringUtils.isNotBlank(ddmxxxBO.getJE()) && StringUtils.isNotBlank(ddmxxxBO.getSPSL())){
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",ddpcxxBO.getFPLXDM())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
String xmdj = DecimalCalculateUtil.divNew(ddmxxxBO.getJE(), ddmxxxBO.getSPSL(), afterPointLength);
if (DecimalCalculateUtil.stringCompare(xmdj, ddmxxxBO.getDJ()) != 0) {

@ -36,7 +36,7 @@ public class PageDataDealUtil {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",fpzldm)){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
for (OrderItemInfo orderItemInfo : orderItemInfos) {
@ -162,7 +162,7 @@ public class PageDataDealUtil {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",orderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
//处理开票合计金额

@ -147,4 +147,11 @@ spring:
password: ${spring.cloud.nacos.config.password}
# 规则类型 授权
rule-type: authority
redis:
cluster:
nodes:
- 172.31.36.143:6490
- 172.31.36.142:6490
rabbitmq:
addresses:

@ -66,7 +66,7 @@ public class RushRedInvoiceRequestInfoServiceImpl implements RushRedInvoiceReque
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",fpzldm)){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
for (int i = 0; i < xmmx.size(); i++) {
final OrderItemInfo xm = xmmx.get(i);
@ -289,7 +289,7 @@ public class RushRedInvoiceRequestInfoServiceImpl implements RushRedInvoiceReque
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",sourceOrderInfo.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
List<OrderItemInfo> orderItems = commonOrderInvoiceAndOrderMxInfo.getOrderItemList();
for (OrderItemInfo orderItemInfo : orderItems) {

@ -235,7 +235,7 @@ public class SpecialInvoiceReversalController {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",specialInvoiceReversal.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
int finalAfterPointLength = afterPointLength;
specialInvoiceReversalItems.forEach(specialInvoiceReversalItem -> {

@ -1025,7 +1025,7 @@ public class SpecialInvoiceServiceImpl implements SpecialInvoiceService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",specialInvoiceReversal.getFpzlDm())){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
int finalAfterPointLength = afterPointLength;
@ -1127,7 +1127,7 @@ public class SpecialInvoiceServiceImpl implements SpecialInvoiceService {
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;
if(CommonUtils.judgeIsQdfp("",fpzldm)){
afterPointLength = ConfigureConstant.INT_15;
afterPointLength = ConfigureConstant.INT_13;
}
for (int i = 0; i < orderItems.size(); i++) {
OrderItemInfo redOrder = orderItems.get(i);

Loading…
Cancel
Save