feature:去除aisinoutils

release
高荣琳 2 years ago
parent c5a3a3e125
commit ca8a12abd2
  1. 10
      order-management-consumer/pom.xml
  2. 30
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/bigdata/util/ProXml.java
  3. 30
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/jdjos/utils/ProXml.java
  4. 38
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/HomeBoardServiceImpl.java

@ -480,11 +480,11 @@
</dependency>
<!-- 京东宙斯对接SDK依赖包 -->
<!-- 大数据服务依赖包 -->
<dependency>
<groupId>com.aisino</groupId>
<artifactId>aisinoutils</artifactId>
<version>1.0</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.aisino</groupId>-->
<!--<artifactId>aisinoutils</artifactId>-->
<!--<version>1.0</version>-->
<!--</dependency>-->
<!-- 京东宙斯对接SDK依赖包 -->
<!-- 大数据服务依赖包 -->
<dependency>

@ -10,7 +10,7 @@
package com.dxhy.order.consumer.modules.bigdata.util;
import com.aisino.common.util.XMLShellFactory;
//import com.aisino.common.util.XMLShellFactory;
import com.dxhy.order.constant.ConfigureConstant;
import com.dxhy.order.utils.Base64Encoding;
import com.dxhy.order.utils.GbkUtil;
@ -214,7 +214,7 @@ public class ProXml {
public static String makeFirstLayerXml(BigDataGlobalInfo glo, Object reqObj, String encryptCode) {
BigDataReturnStateInfo rs = ProXml.getReturnStateInfo(XmlPar.BUSI_SSUCCESS, "");
ByteArrayOutputStream out = new ByteArrayOutputStream();
XMLShellFactory.newInstance().saveXml(out, reqObj);
// XMLShellFactory.newInstance().saveXml(out, reqObj);
BigDataData data = ProXml.getData(out, encryptCode, false);
return ProXml.getXml(glo, rs, data);
}
@ -266,25 +266,25 @@ public class ProXml {
/**
* <p>获取二层协议中的协议对象</p>
*
* @param xml
* @param
* @return
* @throws Exception List
* @author: jerome.wang
* @date: Created on 2016-5-11 下午02:33:25
*/
@SuppressWarnings("AlibabaUndefineMagicConstant")
public static List getDataRoot(String xml) throws Exception {
String xmlRootStart = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <ROOT>";
String xmlRootEnd = "</ROOT>";
if (xml.startsWith("<?xml")) {
XMLShellFactory factory = XMLShellFactory.newInstance();
return (List) factory.generateDomainObject(xml).get(0);
} else {
XMLShellFactory factory = XMLShellFactory.newInstance();
return (List) factory.generateDomainObject(xmlRootStart + xml + xmlRootEnd).get(0);
}
}
// public static List getDataRoot(String xml) throws Exception {
// String xmlRootStart = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <ROOT>";
// String xmlRootEnd = "</ROOT>";
// if (xml.startsWith("<?xml")) {
// XMLShellFactory factory = XMLShellFactory.newInstance();
// return (List) factory.generateDomainObject(xml).get(0);
// } else {
// XMLShellFactory factory = XMLShellFactory.newInstance();
// return (List) factory.generateDomainObject(xmlRootStart + xml + xmlRootEnd).get(0);
// }
//
// }
/**
* <p>获取一层协议的data对象</p>

@ -10,7 +10,7 @@
package com.dxhy.order.consumer.modules.jdjos.utils;
import com.aisino.common.util.XMLShellFactory;
//import com.aisino.common.util.XMLShellFactory;
import com.dxhy.order.constant.ConfigureConstant;
import com.dxhy.order.utils.Base64Encoding;
import com.dxhy.order.utils.GbkUtil;
@ -214,7 +214,7 @@ public class ProXml {
public static String makeFirstLayerXml(JdJosGlobalInfo glo, Object reqObj, String encryptCode) {
JdJosReturnStateInfo rs = ProXml.getReturnStateInfo(XmlPar.BUSI_SSUCCESS, "");
ByteArrayOutputStream out = new ByteArrayOutputStream();
XMLShellFactory.newInstance().saveXml(out, reqObj);
//XMLShellFactory.newInstance().saveXml(out, reqObj);
JdJosData data = ProXml.getData(out, encryptCode, false);
return ProXml.getXml(glo, rs, data);
}
@ -266,25 +266,25 @@ public class ProXml {
/**
* <p>获取二层协议中的协议对象</p>
*
* @param xml
* @param
* @return
* @throws Exception List
* @author: jerome.wang
* @date: Created on 2016-5-11 下午02:33:25
*/
@SuppressWarnings("AlibabaUndefineMagicConstant")
public static List getDataRoot(String xml) throws Exception {
String xmlRootStart = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <ROOT>";
String xmlRootEnd = "</ROOT>";
if (xml.startsWith("<?xml")) {
XMLShellFactory factory = XMLShellFactory.newInstance();
return (List) factory.generateDomainObject(xml).get(0);
} else {
XMLShellFactory factory = XMLShellFactory.newInstance();
return (List) factory.generateDomainObject(xmlRootStart + xml + xmlRootEnd).get(0);
}
}
// public static List getDataRoot(String xml) throws Exception {
// String xmlRootStart = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <ROOT>";
// String xmlRootEnd = "</ROOT>";
// if (xml.startsWith("<?xml")) {
// XMLShellFactory factory = XMLShellFactory.newInstance();
// return (List) factory.generateDomainObject(xml).get(0);
// } else {
// XMLShellFactory factory = XMLShellFactory.newInstance();
// return (List) factory.generateDomainObject(xmlRootStart + xml + xmlRootEnd).get(0);
// }
//
// }
/**
* <p>获取一层协议的data对象</p>

@ -157,37 +157,37 @@ public class HomeBoardServiceImpl implements HomeBoardService {
String currDateStr = DateUtil.format(currDate, ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
if (StringUtils.equals(ConfigureConstant.STRING_0, queryType)) {
//本月开票数据
DateTime beginOfMonth = DateUtil.beginOfMonth(currDate);
String beginOfMonthStr = DateUtil.formatDateTime(beginOfMonth);
startTime = com.aisino.common.util.DateUtil.parse(beginOfMonthStr,
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
// DateTime beginOfMonth = DateUtil.beginOfMonth(currDate);
// String beginOfMonthStr = DateUtil.formatDateTime(beginOfMonth);
// startTime = com.aisino.common.util.DateUtil.parse(beginOfMonthStr,
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
// endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
} else if (StringUtils.equals(ConfigureConstant.STRING_1, queryType)) {
//本季度开票数据
DateTime beginOfQuarter = DateUtil.beginOfQuarter(currDate);
String beginOfQuarterStr = DateUtil.formatDateTime(beginOfQuarter);
startTime = com.aisino.common.util.DateUtil.parse(beginOfQuarterStr,
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
// startTime = com.aisino.common.util.DateUtil.parse(beginOfQuarterStr,
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
// endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
} else if (StringUtils.equals(ConfigureConstant.STRING_2, queryType)) {
//累计开票数据
endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
// endTime = com.aisino.common.util.DateUtil.parse(currDateStr,
// ConfigureConstant.DATE_FORMAT_DATE_Y_M_DH_M_S);
} else {
throw new OrderReceiveException(ConfigureConstant.STRING_9999, "查询类型不合法,只能是0:本月,1:本季度,2:累计");
}
List<String> shList = Lists.newArrayList(kpsjBO.getNsrsbh());
List<String> entList = Lists.newArrayList(kpsjBO.getEntId());
KpsjVO kpsjVO = new KpsjVO();
InvoiceCount invoiceCount = invoiceCountService.countInvoiceInfoByTime(startTime, endTime, shList, entList);
if (Objects.isNull(invoiceCount)) {
throw new OrderReceiveException(ConfigureConstant.STRING_9999, "未查询到相关开票数据!");
}
kpsjVO.setKpl(Integer.parseInt(invoiceCount.getCount()));
kpsjVO.setHjje(invoiceCount.getHjje());
kpsjVO.setHjse(invoiceCount.getHjse());
// InvoiceCount invoiceCount = invoiceCountService.countInvoiceInfoByTime(startTime, endTime, shList, entList);
// if (Objects.isNull(invoiceCount)) {
// throw new OrderReceiveException(ConfigureConstant.STRING_9999, "未查询到相关开票数据!");
// }
// kpsjVO.setKpl(Integer.parseInt(invoiceCount.getCount()));
// kpsjVO.setHjje(invoiceCount.getHjje());
// kpsjVO.setHjse(invoiceCount.getHjse());
return kpsjVO;
}

Loading…
Cancel
Save