diff --git a/.gitignore b/.gitignore
index b252f4db..eb7f9414 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
./idea/
+/.idea/
/buildpackage/src/main/resources/banner.txt
/webapp/target/
/service/target/
@@ -66,3 +67,4 @@ $RECYCLE.BIN/
/base-webapp/target/classes/com/hzya/frame/
/fw-weixin/target/
/E:/yongansystem/log/2024-10-15/
+/D:/
diff --git a/base-buildpackage/pom.xml b/base-buildpackage/pom.xml
index f4f9b259..c9143ecf 100644
--- a/base-buildpackage/pom.xml
+++ b/base-buildpackage/pom.xml
@@ -18,6 +18,11 @@
base-webapp
${revision}
+
+ com.hzya.frame
+ fw-oa
+ 0.0.1-SNAPSHOT
+
@@ -32,8 +37,30 @@
true
-
-
+
+ httest
+
+ httest
+
+
+
+ dev
+
+ dev
+
+
+
+ xel
+
+ xel
+
+
+
+ llg
+
+ llg
+
+
kangarooDataCenterV3
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/BusInvoiceAssembler.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/BusInvoiceAssembler.java
new file mode 100644
index 00000000..348651ca
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/BusInvoiceAssembler.java
@@ -0,0 +1,48 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import com.alibaba.fastjson.JSONObject;
+
+/**
+ * @Description 客运汽车(a3)
+ * @Author xiangerlin
+ * @Date 2025/4/21 11:41
+ **/
+public class BusInvoiceAssembler implements ParamAssembler{
+
+ private JSONObject jsonObject;
+
+ public BusInvoiceAssembler(JSONObject jsonObject) {
+ this.jsonObject = jsonObject;
+ }
+
+ /**
+ * 组装参数
+ *
+ * @return
+ */
+ @Override
+ public JSONObject assembleParam() {
+ JSONObject param = new JSONObject();
+ // 发票代码,必填
+ param.put("fpdm", "");
+ // 发票号码,必填
+ param.put("fphm", "");
+ // 乘车日期/开票时间,格式为 yyyy-MM-dd,必填
+ param.put("ccrq", "");
+ // 乘车时间,格式为 HH:mm,非必填
+ param.put("ccsj", "");
+ // 出发地,非必填
+ param.put("cfd", "");
+ // 到达地,非必填
+ param.put("ddd", "");
+ // 乘车人姓名,非必填
+ param.put("ccrxm", "");
+ // 身份证号,非必填
+ param.put("sfzh", "");
+ // 金额,必填
+ param.put("je", "");
+ // 发票消费类型,非必填
+ param.put("fpxflx", "");
+ return param;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ElecFlightInvoiceAssembler.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ElecFlightInvoiceAssembler.java
new file mode 100644
index 00000000..83e06759
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ElecFlightInvoiceAssembler.java
@@ -0,0 +1,119 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.plugin.cinvoice.dto.FlightItemInfo;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketsEntity;
+import org.apache.commons.collections.CollectionUtils;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @Description 400-电子发票(航空运输客票电子行程单)
+ * @Author xiangerlin
+ * @Date 2025/4/21 14:30
+ **/
+public class ElecFlightInvoiceAssembler implements ParamAssembler{
+
+ private JSONObject jsonObject;
+
+ public ElecFlightInvoiceAssembler(JSONObject jsonObject) {
+ this.jsonObject = jsonObject;
+ }
+
+ /**
+ * 组装参数
+ *
+ * @return
+ */
+ @Override
+ public JSONObject assembleParam() {
+ JSONObject param = new JSONObject();
+ String planeticketHStr = jsonObject.getString("planeticketH");
+ String planeticketBListStr = jsonObject.getString("planeticketBList");
+ if (StrUtil.isNotEmpty(planeticketHStr)){
+ LexmiscivPlaneticketEntity planeticketH = JSONObject.parseObject(planeticketHStr, LexmiscivPlaneticketEntity.class);
+ List planeticketBList = JSONObject.parseArray(planeticketBListStr, LexmiscivPlaneticketsEntity.class);
+ // 1. 单据号码/电子客票号码,必填
+ param.put("djhm", planeticketH.getPT_ETICKETNO());
+ // 2. 验证码,非必填
+ param.put("yzm", planeticketH.getPT_VALIDCODE());
+ // 3. 开票日期,格式为 yyyy-MM-dd,必填
+ param.put("kprq", planeticketH.getPT_DATE());
+ // 4. 销售单位代号,非必填
+ param.put("xsdwdh", planeticketH.getPT_SALERCODE());
+ // 5. 填开单位,非必填
+ param.put("tkdw", planeticketH.getPT_SALERNAME());
+ // 6. 乘车人姓名,非必填
+ param.put("cjrxm", planeticketH.getPT_CUSTOMER());
+ // 7. 身份证号,非必填
+ param.put("sfzh", planeticketH.getPT_IDNO());
+ // 8. 票价,必填
+ param.put("pj", planeticketH.getPT_PRICE());
+ // 9. 民航发展基金,非必填
+ param.put("mhfzjj", planeticketH.getPT_FUNDSAMOUNT());
+ // 10. 保险费,非必填
+ param.put("bxf", planeticketH.getPT_INSURANCE());
+ // 11. 总额,必填
+ param.put("ze", planeticketH.getPT_AMOUNT());
+ // 12. 发票消费类型,非必填
+ param.put("fpxflx", "");
+ // 13. 国内国际标签,非必填
+ param.put("gngjbq", planeticketH.getPT_INTERNATIONALFLAG());
+ // 14. 印刷序号,非必填
+ param.put("ysxh", planeticketH.getPT_SERIALNO());
+ // 15. 燃油附加费,非必填
+ param.put("ryfjf", planeticketH.getPT_FUELAMOUNT());
+ if ("1".equals(planeticketH.getPT_ELECTRONICMARK())){
+ //电子票需要的字段
+ // 16. 购方税号,非必填
+ param.put("gfsh", planeticketH.getPT_BUYERTAXNO());
+ // 17. 购方名称,非必填
+ param.put("gfmc", planeticketH.getPT_BUYERNAME());
+ // 18. 签注,非必填
+ param.put("xcdqz", planeticketH.getPT_MARKDESC());
+ // 19. 开票状态,非必填
+ param.put("kpzt", planeticketH.getPT_ISSUINGSTATE());
+ // 20. 行程单提示信息,非必填
+ param.put("xcdtsxx", planeticketH.getPT_PROMPTINFO());
+ // 21. 增值税税率,非必填
+ param.put("zzssl", planeticketH.getPT_TAXRATE());
+ // 22. 增值税税额,非必填
+ param.put("zzsse", planeticketH.getPT_TAXRATEAMOUNT());
+ // 23. 合计,非必填
+ param.put("hj", planeticketH.getPT_NOTAXAMOUNT());
+ }
+ List filightItemList = new LinkedList<>();
+ param.put("flightInfos",filightItemList);
+ if (CollectionUtils.isNotEmpty(planeticketBList)){
+ for (LexmiscivPlaneticketsEntity b : planeticketBList) {
+ //for循环
+ FlightItemInfo flightItem = new FlightItemInfo();
+ flightItem.setCfz(b.getPTS_FSTATION());//出发站
+ flightItem.setDdz(b.getPTS_TSTATION());//到达站
+ flightItem.setHbh(b.getPTS_NO());//航班号
+ flightItem.setCjsj(b.getPTS_TIME());//乘机时间
+ flightItem.setZwdj(b.getPTS_CLASS());//座位等级
+ flightItem.setCyr(b.getPTS_CARRIER());//承运人
+ flightItem.setCwdj(b.getPTS_CLASSNAME());//舱位等级
+ if ("1".equals(planeticketH.getPT_ELECTRONICMARK())){
+ //电子票需要的字段
+ flightItem.setSsflbm("");//税收分类编码
+ flightItem.setXmmc("");//项目名称
+ flightItem.setGgxh("");//规格型号
+ flightItem.setDw("");//单位
+ flightItem.setSl("");//数量
+ flightItem.setDj("");//单价
+ flightItem.setJe(String.valueOf(planeticketH.getPT_PRICE()));//金额
+ flightItem.setSlv(planeticketH.getPT_TAXRATE());//税率
+ flightItem.setSe(planeticketH.getPT_TAXAMOUNT());//税额
+ }
+ filightItemList.add(flightItem);
+ }
+ }
+ }
+ return param;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ElecTrainInvoiceAssembler.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ElecTrainInvoiceAssembler.java
new file mode 100644
index 00000000..a1ca24d5
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ElecTrainInvoiceAssembler.java
@@ -0,0 +1,109 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivTrainticketEntity;
+
+/**
+ * @Description 200-电子发票(铁路电子客票)
+ * @Author xiangerlin
+ * @Date 2025/4/21 14:08
+ **/
+public class ElecTrainInvoiceAssembler implements ParamAssembler{
+
+ private JSONObject jsonObject;
+
+ public ElecTrainInvoiceAssembler(JSONObject jsonObject) {
+ this.jsonObject = jsonObject;
+ }
+
+ /**
+ * 组装参数
+ *
+ * @return
+ */
+ @Override
+ public JSONObject assembleParam() {
+ JSONObject param = new JSONObject();
+ String trainInvoice = jsonObject.getString("trainInvoice");
+ if (StrUtil.isNotEmpty(trainInvoice)){
+ LexmiscivTrainticketEntity trainticketEntity = JSONObject.parseObject(trainInvoice, LexmiscivTrainticketEntity.class);
+ if (null != trainticketEntity){
+ // 1. 火车票号,必填
+ param.put("hcph", trainticketEntity.getTT_CODE());
+ // 2. 乘车日期,格式为 yyyy-MM-dd,必填
+ param.put("ccrq", trainticketEntity.getTT_DATE());
+ // 3. 乘车时间,格式为 HH:mm,非必填
+ param.put("ccsj", trainticketEntity.getTT_TIME());
+ // 4. 出发地,非必填
+ param.put("cfd", trainticketEntity.getTT_FSTATION());
+ // 5. 到达地,非必填
+ param.put("ddd", trainticketEntity.getTT_TSTATION());
+ // 6. 车次,非必填
+ param.put("cc", trainticketEntity.getTT_NO());
+ // 7. 乘车人姓名,非必填
+ param.put("ccrxm", trainticketEntity.getTT_CUSTOMER());
+ // 8. 身份证号,非必填
+ param.put("sfzh", trainticketEntity.getTT_IDNO());
+ // 9. 座位类型,非必填
+ param.put("zwlx", trainticketEntity.getTT_CLASS());
+ // 10. 金额,必填
+ param.put("je", trainticketEntity.getTT_AMOUNT());
+ // 11. 发票消费类型,非必填
+ param.put("fpxflx", "");
+ // 12. 序列号,非必填
+ param.put("xlh", trainticketEntity.getTT_SERIALNO());
+ // 13. 开票日期,格式为 yyyy-MM-dd,必填
+ param.put("kprq", trainticketEntity.getTT_OUTDATE());
+ // 14. 不含税金额,非必填
+ param.put("bhsje", trainticketEntity.getTT_NOTAXAMOUNT());
+ // 15. 税额,非必填
+ param.put("se", trainticketEntity.getTT_TAXRATEAMOUNT());
+ // 16. 税率,非必填
+ param.put("slv", trainticketEntity.getTT_TAXRATE());
+ // 17. 销方税号,非必填
+ param.put("xfsh", "");
+ // 18. 销方名称,非必填
+ param.put("xfmc", "");
+ // 19. 购方税号,非必填
+ param.put("gfsh", trainticketEntity.getTT_BUYERTAXNO());
+ // 20. 购方名称,非必填
+ param.put("gfmc", trainticketEntity.getTT_BUYERNAME());
+ // 21. 出发站拼音,非必填
+ param.put("cfzpy", "");
+ // 22. 到达站拼音,非必填
+ param.put("ddzpy", "");
+ // 23. 车厢,非必填
+ param.put("cx", trainticketEntity.getTT_CARRIAGE());
+ // 24. 厢位,非必填
+ param.put("xw", trainticketEntity.getTT_SEAT());
+ // 25. 电子客票号,非必填
+ param.put("dzkph", trainticketEntity.getTT_SERIALNO());
+ // 26. 发票明细信息,非必填,这里先创建一个空的 JSONArray
+ JSONArray qdHcpInfosArray = new JSONArray();
+ param.put("qdHcpInfos", qdHcpInfosArray);
+ JSONObject qdHcpInfo = new JSONObject();
+ // 27. 税收分类编码,非必填
+ qdHcpInfo.put("ssflbm", "");
+ // 28. 项目名称,非必填
+ qdHcpInfo.put("xmmc", "");
+ // 29. 规格型号,非必填
+ qdHcpInfo.put("ggxh", "");
+ // 30. 单位,非必填
+ qdHcpInfo.put("dw", "");
+ // 31. 数量,非必填
+ qdHcpInfo.put("sl", "");
+ // 32. 单价,非必填
+ qdHcpInfo.put("dj", "");
+ // 33. 金额,非必填
+ qdHcpInfo.put("je", trainticketEntity.getTT_AMOUNT());
+ // 34. 税率,非必填
+ qdHcpInfo.put("slv", trainticketEntity.getTT_TAXRATE());
+ // 35. 税额,非必填
+ qdHcpInfo.put("se", trainticketEntity.getTT_TAXRATEAMOUNT());
+ }
+ }
+ return param;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/FlightInvoiceAssembler.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/FlightInvoiceAssembler.java
new file mode 100644
index 00000000..b21165e2
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/FlightInvoiceAssembler.java
@@ -0,0 +1,73 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.plugin.cinvoice.dto.FlightItemInfo;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketsEntity;
+import org.apache.commons.collections.CollectionUtils;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @Description 航空运输电子客票行程单(a4) 参数组装
+ * @Author xiangerlin
+ * @Date 2025/4/21 10:57
+ **/
+public class FlightInvoiceAssembler implements ParamAssembler{
+
+ private JSONObject jsonObject;
+
+ public FlightInvoiceAssembler(JSONObject jsonObject) {
+ this.jsonObject = jsonObject;
+ }
+
+ /**
+ * 组装参数
+ *
+ * @return
+ */
+ @Override
+ public JSONObject assembleParam() {
+ JSONObject params = new JSONObject();
+ String planeticketHStr = jsonObject.getString("planeticketH");
+ String planeticketBListStr = jsonObject.getString("planeticketBList");
+ if (StrUtil.isNotEmpty(planeticketHStr)){
+ LexmiscivPlaneticketEntity planeticketH = JSONObject.parseObject(planeticketHStr, LexmiscivPlaneticketEntity.class);
+ List planeticketBList = JSONObject.parseArray(planeticketBListStr, LexmiscivPlaneticketsEntity.class);
+ params.put("djhm", planeticketH.getPT_ETICKETNO()); // 单据号码/电子客票号码
+ params.put("yzm", planeticketH.getPT_VALIDCODE()); // 验证码
+ params.put("kprq", planeticketH.getPT_DATE()); // 开票日期,yyyy-MM-dd
+ params.put("xsdwdh", planeticketH.getPT_SALERCODE()); // 销售单位代号
+ params.put("tkdw", planeticketH.getPT_SALERNAME()); // 填开单位
+ params.put("cjrxm", planeticketH.getPT_CUSTOMER()); // 乘车人姓名
+ params.put("sfzh", planeticketH.getPT_IDNO()); // 身份证号
+ params.put("pj", planeticketH.getPT_PRICE()); // 票价
+ params.put("mhfzjj", planeticketH.getPT_FUNDSAMOUNT()); // 民航发展基金
+ params.put("bxf", planeticketH.getPT_INSURANCE()); // 保险费
+ params.put("ze", planeticketH.getPT_AMOUNT()); // 总额
+ params.put("fpxflx", ""); // 发票消费类型
+ params.put("gngjbq", planeticketH.getPT_INTERNATIONALFLAG()); // 国内国际标签
+ params.put("ysxh", planeticketH.getPT_SERIALNO()); // 印刷序号
+ params.put("ryfjf", planeticketH.getPT_FUELAMOUNT()); // 燃油附加费
+ List filightItemList = new LinkedList<>();
+ params.put("flightInfos",filightItemList);
+ //for循环
+ if (CollectionUtils.isNotEmpty(planeticketBList)){
+ for (LexmiscivPlaneticketsEntity b : planeticketBList) {
+ FlightItemInfo flightItem = new FlightItemInfo();
+ flightItem.setCfz(b.getPTS_FSTATION());//出发站
+ flightItem.setDdz(b.getPTS_TSTATION());//到达站
+ flightItem.setHbh(b.getPTS_NO());//航班号
+ flightItem.setCjsj(b.getPTS_TIME());//乘机时间
+ flightItem.setZwdj(b.getPTS_CLASS());//座位等级
+ flightItem.setCyr(b.getPTS_CARRIER());//承运人
+ flightItem.setCwdj(b.getPTS_CLASSNAME());//舱位等级
+ filightItemList.add(flightItem);
+ }
+ }
+ }
+ return params;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ParamAssembler.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ParamAssembler.java
new file mode 100644
index 00000000..73739c1d
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ParamAssembler.java
@@ -0,0 +1,17 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import com.alibaba.fastjson.JSONObject;
+
+/**
+ * @Description 定义组装参数的接口
+ * @Author xiangerlin
+ * @Date 2025/4/21 09:22
+ **/
+public interface ParamAssembler {
+
+ /**
+ * 组装参数
+ * @return
+ */
+ JSONObject assembleParam();
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ParamAssemblerContext.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ParamAssemblerContext.java
new file mode 100644
index 00000000..3b664946
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ParamAssemblerContext.java
@@ -0,0 +1,20 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import com.alibaba.fastjson.JSONObject;
+
+/**
+ * @Description 上下文类,根据发票类型选择相应的组装策略
+ * @Author xiangerlin
+ * @Date 2025/4/21 14:51
+ **/
+public class ParamAssemblerContext {
+
+ private ParamAssembler assembler;
+
+ public ParamAssemblerContext(ParamAssembler assembler) {
+ this.assembler = assembler;
+ }
+ public JSONObject assemble(){
+ return assembler.assembleParam();
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/TrainInvoiceAssembler.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/TrainInvoiceAssembler.java
new file mode 100644
index 00000000..cb516f2a
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/TrainInvoiceAssembler.java
@@ -0,0 +1,48 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivTrainticketEntity;
+
+/**
+ * @Description a2 纸质火车票参数组装
+ * @Author xiangerlin
+ * @Date 2025/4/21 10:20
+ **/
+public class TrainInvoiceAssembler implements ParamAssembler{
+
+ private JSONObject jsonObject;
+
+ public TrainInvoiceAssembler(JSONObject jsonObject) {
+ this.jsonObject = jsonObject;
+ }
+
+ /**
+ * 组装参数
+ *
+ * @return
+ */
+ @Override
+ public JSONObject assembleParam() {
+ JSONObject param = new JSONObject();
+ String trainInvoice = jsonObject.getString("trainInvoice");
+ if (StrUtil.isNotEmpty(trainInvoice)){
+ LexmiscivTrainticketEntity trainticketEntity = JSONObject.parseObject(trainInvoice, LexmiscivTrainticketEntity.class);
+ if (null != trainticketEntity){
+ param.put("hcph", trainticketEntity.getTT_CODE()); // 火车票号
+ param.put("ccrq", trainticketEntity.getTT_DATE()); // 乘车日期,yyyy-MM-dd
+ param.put("ccsj", trainticketEntity.getTT_TIME()); // 乘车时间,HH:mm
+ param.put("cfd", trainticketEntity.getTT_FSTATION()); // 出发地
+ param.put("ddd", trainticketEntity.getTT_TSTATION()); // 到达地
+ param.put("cc", trainticketEntity.getTT_NO()); // 车次
+ param.put("ccrxm", trainticketEntity.getTT_CUSTOMER()); // 乘车人姓名
+ param.put("sfzh", trainticketEntity.getTT_IDNO()); // 身份证号
+ param.put("zwlx", trainticketEntity.getTT_CLASS()); // 座位类型
+ param.put("je", trainticketEntity.getTT_AMOUNT()); // 金额
+ param.put("fpxflx", ""); // 发票消费类型
+ param.put("xlh", trainticketEntity.getTT_SERIALNO()); // 序列号
+ }
+ }
+ return param;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ZzsInvoiceAssembler.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ZzsInvoiceAssembler.java
new file mode 100644
index 00000000..6949e750
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/assembler/ZzsInvoiceAssembler.java
@@ -0,0 +1,88 @@
+package com.hzya.frame.plugin.cinvoice.assembler;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.plugin.cinvoice.dto.ZzsItemInfo;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicedetailEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicemainEntity;
+import org.apache.commons.collections.CollectionUtils;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @Description 增值税类发票参数
+ * 增值税类发票(01增值税专票,04增值税普票,08增值税电子专票,10增值税电子普票,11增值税普票(票卷),31电子发票(增值税专票),32电子发票(普票))
+ * @Author xiangerlin
+ * @Date 2025/4/21 09:27
+ **/
+public class ZzsInvoiceAssembler implements ParamAssembler{
+
+ private JSONObject jsonObject;
+
+ public ZzsInvoiceAssembler(JSONObject jsonObject) {
+ this.jsonObject = jsonObject;
+ }
+
+ /**
+ * 增值税类发票参数组装
+ *
+ * @return
+ */
+ @Override
+ public JSONObject assembleParam() {
+ JSONObject param = new JSONObject();
+ String zzsInvoiceHStr = jsonObject.getString("zzsInvoiceH");
+ String zzsInvoiceBListStr = jsonObject.getString("zzsInvoiceBList");
+ if (StrUtil.isNotEmpty(zzsInvoiceHStr) && StrUtil.isNotEmpty(zzsInvoiceBListStr)){
+ LexmiscivInvoicemainEntity zzsInvoiceH = JSONObject.parseObject(zzsInvoiceHStr, LexmiscivInvoicemainEntity.class);
+ List zzsInvoiceBList = JSONObject.parseArray(zzsInvoiceBListStr, LexmiscivInvoicedetailEntity.class);
+ if (null != zzsInvoiceH){
+ param.put("fpdm", zzsInvoiceH.getIM_FPDM());//发票代码
+ param.put("fphm", zzsInvoiceH.getIM_FPHM());//发票号码
+ param.put("kprq", zzsInvoiceH.getIM_DATE());//开票日期 yyyy-MM-dd
+ param.put("xfsh", zzsInvoiceH.getIM_SALERTAXNO());//销方税号
+ param.put("xfmc", zzsInvoiceH.getIM_SALERNAME());//销方名称
+ param.put("gfsh", zzsInvoiceH.getIM_BUYERTAXNO());//购方税号
+ param.put("gfmc", zzsInvoiceH.getIM_BUYERNAME());//购方名称
+ param.put("hjje", zzsInvoiceH.getIM_NOTAXAMOUNT());//合计金额(不含税)
+ param.put("hjse", zzsInvoiceH.getIM_TAXAMOUNT());//合计税额
+ param.put("jshj", zzsInvoiceH.getIM_TOTALAMOUNT());//价税合计,发票类型为31电子发票(增值税专票),32电子发票(普票) 时必填
+ param.put("jym", zzsInvoiceH.getIM_CHECKCODE());//校验码,发票类型为04增值税普票、10增值税电子普票,11增值税普票(票卷) 时必填
+ param.put("xfdzdh", zzsInvoiceH.getIM_SALERADDRESS());//销售方地址,电话
+ param.put("xfyhzh", zzsInvoiceH.getIM_SALERBANKNO());//销售方开户行及账号
+ param.put("gfdzdh", zzsInvoiceH.getIM_BUYERADDRESS());//购买方地址、电话
+ param.put("gfyhzh", zzsInvoiceH.getIM_BUYERBANKNO());//购买方开户行及账号
+ param.put("mmq", zzsInvoiceH.getIM_ENCRYPTIONCODE());//密码区
+ param.put("bz", zzsInvoiceH.getIM_MEMO());//备注
+ param.put("jqbh", zzsInvoiceH.getIM_MACHINENO());//机器编号
+ param.put("jdhm", zzsInvoiceH.getIM_PRINTEDFPHM());//机打号码,发票类型为11增值税普票(票卷) 时必填
+ param.put("kpr", zzsInvoiceH.getIM_MAKERNM());//开票人
+ param.put("skr", zzsInvoiceH.getIM_PAYEE());//收款人
+ param.put("fhr", zzsInvoiceH.getIM_AUDITOR());//复核人
+ // 发票明细信息
+ List zzsItemInfoList = new LinkedList<>();
+ param.put("zzsItemInfos", zzsItemInfoList);
+ if (CollectionUtils.isNotEmpty(zzsInvoiceBList)){
+ for (LexmiscivInvoicedetailEntity b : zzsInvoiceBList) {
+ ZzsItemInfo zzsItemInfo = new ZzsItemInfo();
+ // 发票明细项
+ zzsItemInfo.setXh(b.getID_ROWID());//序号
+ zzsItemInfo.setSsflbm("");//税收分类编码
+ zzsItemInfo.setXmmc(b.getID_SERVICENM());//项目名称
+ zzsItemInfo.setGgxh(b.getID_SERVICETYPE());//规格型号
+ zzsItemInfo.setDw(b.getID_UNIT());//单位
+ zzsItemInfo.setSl(b.getID_NUM());//数量
+ zzsItemInfo.setDj(b.getID_PRICE());//单价
+ zzsItemInfo.setJe(b.getID_NOTAXAMOUNT());//金额
+ zzsItemInfo.setSlv(b.getID_TAX());//税率
+ zzsItemInfo.setSe(b.getID_TAXAMOUNT());//税额
+ zzsItemInfoList.add(zzsItemInfo);
+ }
+ }
+ }
+ }
+
+ return param;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/ICInvoiceImportBDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/ICInvoiceImportBDao.java
new file mode 100644
index 00000000..0429933f
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/ICInvoiceImportBDao.java
@@ -0,0 +1,12 @@
+package com.hzya.frame.plugin.cinvoice.dao;
+
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportBEntity;
+
+/**
+ * @Description 发票批量导入有度税务 表体dao
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:27
+ **/
+public interface ICInvoiceImportBDao extends IBaseDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/ICInvoiceImportHDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/ICInvoiceImportHDao.java
new file mode 100644
index 00000000..8251dd42
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/ICInvoiceImportHDao.java
@@ -0,0 +1,12 @@
+package com.hzya.frame.plugin.cinvoice.dao;
+
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity;
+
+/**
+ * @Description 发票批量导入有度税务 表头dao
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:25
+ **/
+public interface ICInvoiceImportHDao extends IBaseDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/impl/CInvoiceImportBDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/impl/CInvoiceImportBDaoImpl.java
new file mode 100644
index 00000000..52992ce6
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/impl/CInvoiceImportBDaoImpl.java
@@ -0,0 +1,16 @@
+package com.hzya.frame.plugin.cinvoice.dao.impl;
+
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.cinvoice.dao.ICInvoiceImportBDao;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportBEntity;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Description 发票批量导入有度税务 表体dao
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:32
+ **/
+@Repository
+public class CInvoiceImportBDaoImpl extends MybatisGenericDao implements ICInvoiceImportBDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/impl/CInvoiceImportHDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/impl/CInvoiceImportHDaoImpl.java
new file mode 100644
index 00000000..e46fa21b
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dao/impl/CInvoiceImportHDaoImpl.java
@@ -0,0 +1,15 @@
+package com.hzya.frame.plugin.cinvoice.dao.impl;
+
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.cinvoice.dao.ICInvoiceImportHDao;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Description 发票批量导入有度税务 表头dao
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:31
+ **/
+@Repository
+public class CInvoiceImportHDaoImpl extends MybatisGenericDao implements ICInvoiceImportHDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dto/FlightItemInfo.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dto/FlightItemInfo.java
new file mode 100644
index 00000000..e0139e53
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dto/FlightItemInfo.java
@@ -0,0 +1,154 @@
+package com.hzya.frame.plugin.cinvoice.dto;
+
+/**
+ * @Description 航空运输电子客票行程单明细
+ * @Author xiangerlin
+ * @Date 2025/4/21 10:36
+ **/
+public class FlightItemInfo {
+ private String cfz;//出发站
+ private String ddz;//到达站
+ private String hbh;//航班号
+ private String cjsj;//乘机时间
+ private String zwdj;//座位等级
+ private String cyr;//承运人
+ private String cwdj;//仓位等级
+
+
+ private String ssflbm;//税收分类编码
+ private String xmmc;//项目名称
+ private String ggxh;//规格型号
+ private String dw;//单位
+ private String sl;//数量
+ private String dj;//单价
+ private String je;//金额
+ private String slv;//税率
+ private String se;//税额
+ public String getCfz() {
+ return cfz;
+ }
+
+ public void setCfz(String cfz) {
+ this.cfz = cfz;
+ }
+
+ public String getDdz() {
+ return ddz;
+ }
+
+ public void setDdz(String ddz) {
+ this.ddz = ddz;
+ }
+
+ public String getHbh() {
+ return hbh;
+ }
+
+ public void setHbh(String hbh) {
+ this.hbh = hbh;
+ }
+
+ public String getCjsj() {
+ return cjsj;
+ }
+
+ public void setCjsj(String cjsj) {
+ this.cjsj = cjsj;
+ }
+
+ public String getZwdj() {
+ return zwdj;
+ }
+
+ public void setZwdj(String zwdj) {
+ this.zwdj = zwdj;
+ }
+
+ public String getCyr() {
+ return cyr;
+ }
+
+ public void setCyr(String cyr) {
+ this.cyr = cyr;
+ }
+
+ public String getCwdj() {
+ return cwdj;
+ }
+
+ public void setCwdj(String cwdj) {
+ this.cwdj = cwdj;
+ }
+
+ public String getSsflbm() {
+ return ssflbm;
+ }
+
+ public void setSsflbm(String ssflbm) {
+ this.ssflbm = ssflbm;
+ }
+
+ public String getXmmc() {
+ return xmmc;
+ }
+
+ public void setXmmc(String xmmc) {
+ this.xmmc = xmmc;
+ }
+
+ public String getGgxh() {
+ return ggxh;
+ }
+
+ public void setGgxh(String ggxh) {
+ this.ggxh = ggxh;
+ }
+
+ public String getDw() {
+ return dw;
+ }
+
+ public void setDw(String dw) {
+ this.dw = dw;
+ }
+
+ public String getSl() {
+ return sl;
+ }
+
+ public void setSl(String sl) {
+ this.sl = sl;
+ }
+
+ public String getDj() {
+ return dj;
+ }
+
+ public void setDj(String dj) {
+ this.dj = dj;
+ }
+
+ public String getJe() {
+ return je;
+ }
+
+ public void setJe(String je) {
+ this.je = je;
+ }
+
+ public String getSlv() {
+ return slv;
+ }
+
+ public void setSlv(String slv) {
+ this.slv = slv;
+ }
+
+ public String getSe() {
+ return se;
+ }
+
+ public void setSe(String se) {
+ this.se = se;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dto/ZzsItemInfo.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dto/ZzsItemInfo.java
new file mode 100644
index 00000000..aa3b26d4
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/dto/ZzsItemInfo.java
@@ -0,0 +1,99 @@
+package com.hzya.frame.plugin.cinvoice.dto;
+
+/**
+ * @Description 增值税发票明细表
+ * @Author xiangerlin
+ * @Date 2025/4/21 09:56
+ **/
+public class ZzsItemInfo {
+ private String xh;//序号
+ private String ssflbm; // 税收分类编码
+ private String xmmc; // 项目名称
+ private String ggxh; // 规格型号
+ private String dw; // 单位
+ private String sl; // 数量
+ private String dj; // 单价
+ private String je; // 金额
+ private String slv; // 税率
+ private String se; // 税额
+
+ public String getXh() {
+ return xh;
+ }
+
+ public void setXh(String xh) {
+ this.xh = xh;
+ }
+
+ public String getSsflbm() {
+ return ssflbm;
+ }
+
+ public void setSsflbm(String ssflbm) {
+ this.ssflbm = ssflbm;
+ }
+
+ public String getXmmc() {
+ return xmmc;
+ }
+
+ public void setXmmc(String xmmc) {
+ this.xmmc = xmmc;
+ }
+
+ public String getGgxh() {
+ return ggxh;
+ }
+
+ public void setGgxh(String ggxh) {
+ this.ggxh = ggxh;
+ }
+
+ public String getDw() {
+ return dw;
+ }
+
+ public void setDw(String dw) {
+ this.dw = dw;
+ }
+
+ public String getSl() {
+ return sl;
+ }
+
+ public void setSl(String sl) {
+ this.sl = sl;
+ }
+
+ public String getDj() {
+ return dj;
+ }
+
+ public void setDj(String dj) {
+ this.dj = dj;
+ }
+
+ public String getJe() {
+ return je;
+ }
+
+ public void setJe(String je) {
+ this.je = je;
+ }
+
+ public String getSlv() {
+ return slv;
+ }
+
+ public void setSlv(String slv) {
+ this.slv = slv;
+ }
+
+ public String getSe() {
+ return se;
+ }
+
+ public void setSe(String se) {
+ this.se = se;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportBEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportBEntity.java
new file mode 100644
index 00000000..6086433c
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportBEntity.java
@@ -0,0 +1,81 @@
+package com.hzya.frame.plugin.cinvoice.entity;
+
+import com.hzya.frame.web.entity.BaseEntity;
+
+/**
+ * @Description 发票批量导入有度税务表体
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:20
+ **/
+public class CInvoiceImportBEntity extends BaseEntity {
+ //主表id
+ private String formmain_id;
+ //主表名称
+ private String formmain_tab_name;
+ //发票号
+ private String cinvoice_number;
+ //发票代码
+ private String cinvoice_code;
+ //发票类型
+ private String cinvoice_type;
+ //发票日期
+ private String cinvoice_date;
+ //发票金额
+ private String cinvoice_amount;
+
+ public String getFormmain_id() {
+ return formmain_id;
+ }
+
+ public void setFormmain_id(String formmain_id) {
+ this.formmain_id = formmain_id;
+ }
+
+ public String getFormmain_tab_name() {
+ return formmain_tab_name;
+ }
+
+ public void setFormmain_tab_name(String formmain_tab_name) {
+ this.formmain_tab_name = formmain_tab_name;
+ }
+
+ public String getCinvoice_number() {
+ return cinvoice_number;
+ }
+
+ public void setCinvoice_number(String cinvoice_number) {
+ this.cinvoice_number = cinvoice_number;
+ }
+
+ public String getCinvoice_code() {
+ return cinvoice_code;
+ }
+
+ public void setCinvoice_code(String cinvoice_code) {
+ this.cinvoice_code = cinvoice_code;
+ }
+
+ public String getCinvoice_type() {
+ return cinvoice_type;
+ }
+
+ public void setCinvoice_type(String cinvoice_type) {
+ this.cinvoice_type = cinvoice_type;
+ }
+
+ public String getCinvoice_date() {
+ return cinvoice_date;
+ }
+
+ public void setCinvoice_date(String cinvoice_date) {
+ this.cinvoice_date = cinvoice_date;
+ }
+
+ public String getCinvoice_amount() {
+ return cinvoice_amount;
+ }
+
+ public void setCinvoice_amount(String cinvoice_amount) {
+ this.cinvoice_amount = cinvoice_amount;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportBEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportBEntity.xml
new file mode 100644
index 00000000..85a66cdb
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportBEntity.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportHEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportHEntity.java
new file mode 100644
index 00000000..77da27ba
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportHEntity.java
@@ -0,0 +1,41 @@
+package com.hzya.frame.plugin.cinvoice.entity;
+
+import com.hzya.frame.web.entity.BaseEntity;
+
+/**
+ * @Description 发票批量导入有度税务表头
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:19
+ **/
+public class CInvoiceImportHEntity extends BaseEntity {
+ //表名称
+ private String tab_name;
+ //单据类型
+ private String bill_type;
+ //单据编码
+ private String bill_code;
+
+ public String getTab_name() {
+ return tab_name;
+ }
+
+ public void setTab_name(String tab_name) {
+ this.tab_name = tab_name;
+ }
+
+ public String getBill_type() {
+ return bill_type;
+ }
+
+ public void setBill_type(String bill_type) {
+ this.bill_type = bill_type;
+ }
+
+ public String getBill_code() {
+ return bill_code;
+ }
+
+ public void setBill_code(String bill_code) {
+ this.bill_code = bill_code;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportHEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportHEntity.xml
new file mode 100644
index 00000000..3a492e25
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/entity/CInvoiceImportHEntity.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmisPublicinfoDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmisPublicinfoDao.java
new file mode 100644
index 00000000..50f8e5e2
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmisPublicinfoDao.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmisPublicinfoEntity;
+/**
+ * @description: 迈锐思-公共信息表 dao
+ * @tableName: LEXMISCIV_PUBLICINFO
+ * @entityName: LexmisPublicinfoEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmisPublicinfoDao extends IBaseDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivInvoicedetailDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivInvoicedetailDao.java
new file mode 100644
index 00000000..cb084086
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivInvoicedetailDao.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicedetailEntity;
+/**
+ * @description: 迈锐思-增值税发票子表 dao
+ * @tableName: LEXMISCIV_INVOICEDETAIL
+ * @entityName: LexmiscivInvoicedetailEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivInvoicedetailDao extends IBaseDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivInvoicemainDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivInvoicemainDao.java
new file mode 100644
index 00000000..ab5251be
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivInvoicemainDao.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicemainEntity;
+/**
+ * @description: 迈锐思-增值税发票主表 dao
+ * @tableName: LEXMISCIV_INVOICEMAIN
+ * @entityName: LexmiscivInvoicemainEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivInvoicemainDao extends IBaseDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivPlaneticketDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivPlaneticketDao.java
new file mode 100644
index 00000000..877ebd5e
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivPlaneticketDao.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketEntity;
+/**
+ * @description: 迈锐思-飞机行程单 dao
+ * @tableName: LEXMISCIV_PLANETICKET
+ * @entityName: LexmiscivPlaneticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivPlaneticketDao extends IBaseDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivPlaneticketsDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivPlaneticketsDao.java
new file mode 100644
index 00000000..c562e89d
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivPlaneticketsDao.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketsEntity;
+/**
+ * @description: 迈锐思-飞机行程单明细 dao
+ * @tableName: LEXMISCIV_PLANETICKETS
+ * @entityName: LexmiscivPlaneticketsEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivPlaneticketsDao extends IBaseDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivTrainticketDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivTrainticketDao.java
new file mode 100644
index 00000000..caf1275d
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/ILexmiscivTrainticketDao.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivTrainticketEntity;
+/**
+ * @description: 迈锐思-火车票 dao
+ * @tableName: LEXMISCIV_TRAINTICKET
+ * @entityName: LexmiscivTrainticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivTrainticketDao extends IBaseDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmisPublicinfoDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmisPublicinfoDaoImpl.java
new file mode 100644
index 00000000..101a3d35
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmisPublicinfoDaoImpl.java
@@ -0,0 +1,17 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao.impl;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmisPublicinfoDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmisPublicinfoEntity;
+import org.springframework.stereotype.Repository;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+
+/**
+ * @description: 迈锐思-公共信息表 dao
+ * @tableName: LEXMISCIV_PUBLICINFO
+ * @entityName: LexmisPublicinfoEntity
+ * @author: gjh
+ * @history:1.0
+ */
+@Repository("LEXMISCIV_PUBLICINFOdao")
+public class LexmisPublicinfoDaoImpl extends MybatisGenericDao implements ILexmisPublicinfoDao {
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivInvoicedetailDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivInvoicedetailDaoImpl.java
new file mode 100644
index 00000000..14e78a7f
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivInvoicedetailDaoImpl.java
@@ -0,0 +1,17 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao.impl;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicedetailEntity;
+import org.springframework.stereotype.Repository;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivInvoicedetailDao;
+
+/**
+ * @description: 迈锐思-增值税发票子表 dao
+ * @tableName: LEXMISCIV_INVOICEDETAIL
+ * @entityName: LexmiscivInvoicedetailEntity
+ * @author: gjh
+ * @history:1.0
+ */
+@Repository("LEXMISCIV_INVOICEDETAILdao")
+public class LexmiscivInvoicedetailDaoImpl extends MybatisGenericDao implements ILexmiscivInvoicedetailDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivInvoicemainDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivInvoicemainDaoImpl.java
new file mode 100644
index 00000000..d08812e1
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivInvoicemainDaoImpl.java
@@ -0,0 +1,17 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao.impl;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicemainEntity;
+import org.springframework.stereotype.Repository;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivInvoicemainDao;
+
+/**
+ * @description: 迈锐思-增值税发票主表 dao
+ * @tableName: LEXMISCIV_INVOICEMAIN
+ * @entityName: LexmiscivInvoicemainEntity
+ * @author: gjh
+ * @history:1.0
+ */
+@Repository("LEXMISCIV_INVOICEMAINdao")
+public class LexmiscivInvoicemainDaoImpl extends MybatisGenericDao implements ILexmiscivInvoicemainDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivPlaneticketDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivPlaneticketDaoImpl.java
new file mode 100644
index 00000000..a962fcb0
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivPlaneticketDaoImpl.java
@@ -0,0 +1,17 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao.impl;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketEntity;
+import org.springframework.stereotype.Repository;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivPlaneticketDao;
+
+/**
+ * @description: 迈锐思-飞机行程单 dao
+ * @tableName: LEXMISCIV_PLANETICKET
+ * @entityName: LexmiscivPlaneticketEntity
+ * @author: gjh
+ * @history:1.0
+ */
+@Repository("LEXMISCIV_PLANETICKETdao")
+public class LexmiscivPlaneticketDaoImpl extends MybatisGenericDao implements ILexmiscivPlaneticketDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivPlaneticketsDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivPlaneticketsDaoImpl.java
new file mode 100644
index 00000000..33546d45
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivPlaneticketsDaoImpl.java
@@ -0,0 +1,17 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao.impl;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketsEntity;
+import org.springframework.stereotype.Repository;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivPlaneticketsDao;
+
+/**
+ * @description: 迈锐思-飞机行程单明细 dao
+ * @tableName: LEXMISCIV_PLANETICKETS
+ * @entityName: LexmiscivPlaneticketsEntity
+ * @author: gjh
+ * @history:1.0
+ */
+@Repository("LEXMISCIV_PLANETICKETSdao")
+public class LexmiscivPlaneticketsDaoImpl extends MybatisGenericDao implements ILexmiscivPlaneticketsDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivTrainticketDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivTrainticketDaoImpl.java
new file mode 100644
index 00000000..ab34b7cb
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/dao/impl/LexmiscivTrainticketDaoImpl.java
@@ -0,0 +1,17 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.dao.impl;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivTrainticketEntity;
+import org.springframework.stereotype.Repository;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivTrainticketDao;
+
+/**
+ * @description: 迈锐思-火车票 dao
+ * @tableName: LEXMISCIV_TRAINTICKET
+ * @entityName: LexmiscivTrainticketEntity
+ * @author: gjh
+ * @history:1.0
+ */
+@Repository("LEXMISCIV_TRAINTICKETdao")
+public class LexmiscivTrainticketDaoImpl extends MybatisGenericDao implements ILexmiscivTrainticketDao{
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmisPublicinfoEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmisPublicinfoEntity.java
new file mode 100644
index 00000000..d21943e5
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmisPublicinfoEntity.java
@@ -0,0 +1,2080 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+
+import com.hzya.frame.web.entity.BaseEntity;
+
+/**
+ * @description: 迈锐思-公共信息表
+ * @tableName: LEXMISCIV_PUBLICINFO
+ * @entityName: LexmisPublicinfoEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public class LexmisPublicinfoEntity extends BaseEntity {
+ public LexmisPublicinfoEntity() {
+
+ }
+
+ public LexmisPublicinfoEntity(String PI_FORMDATAID,String dataSourceCode) {
+ this.PI_FORMDATAID = PI_FORMDATAID;
+ this.setDataSourceCode(dataSourceCode);
+ }
+
+ private String PI_BELONGID;
+ /**
+ * 无备注
+ */
+ private String PI_ID;
+ /**
+ * 无备注
+ */
+ private String PI_KEY;
+ /**
+ * 无备注
+ */
+ private String PI_KEY_NEW;
+ /**
+ * 无备注
+ */
+ private String PI_DATAKEY;
+ /**
+ * 无备注
+ */
+ private String PI_MAINCONFIGID;
+ /**
+ * 无备注
+ */
+ private String PI_TAXNO;
+ /**
+ * 无备注
+ */
+ private String PI_TABLENAME;
+ /**
+ * 无备注
+ */
+ private String PI_BILLKIND;
+ /**
+ * 无备注
+ */
+ private String PI_BILLNAME;
+ /**
+ * 无备注
+ */
+ private String PI_AMOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_STATE;
+ /**
+ * 无备注
+ */
+ private String PI_FILEID;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_FILEDATE;
+ /**
+ * 无备注
+ */
+ private String PI_IMAGEPATH;
+ /**
+ * 无备注
+ */
+ private String PI_UPDATEDATA;
+ /**
+ * 无备注
+ */
+ private String PI_TYPE;
+ /**
+ * 无备注
+ */
+ private String PI_MEMBERID;
+ /**
+ * 无备注
+ */
+ private String PI_MEMBERNM;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_MAKEDATE;
+ /**
+ * 无备注
+ */
+ private String PI_BEStringID;
+ /**
+ * 无备注
+ */
+ private String PI_BEStringNM;
+ /**
+ * 无备注
+ */
+ private String PI_USEACCOUNTID;
+ /**
+ * 无备注
+ */
+ private String PI_USEACCOUNTNM;
+ /**
+ * 无备注
+ */
+ private String PI_USEDEPARTMENTID;
+ /**
+ * 无备注
+ */
+ private String PI_USEDEPARTMENTNM;
+ /**
+ * 无备注
+ */
+ private String PI_USEID;
+ /**
+ * 无备注
+ */
+ private String PI_USENM;
+ /**
+ * 无备注
+ */
+ private String PI_USESTATE;
+ /**
+ * 无备注
+ */
+ private String PI_SUMMARYID;
+ /**
+ * 无备注
+ */
+ private String PI_SUBJECT;
+ /**
+ * 无备注
+ */
+ private String PI_FORMID;
+ /**
+ * 无备注
+ */
+ private String PI_FORMDATAID;
+ /**
+ * 无备注
+ */
+ private String PI_TEMPLATEID;
+ /**
+ * 无备注
+ */
+ private String PI_STARTACCOUNTID;
+ /**
+ * 无备注
+ */
+ private String PI_STARTDEPARTMENTID;
+ /**
+ * 无备注
+ */
+ private String PI_STARTMEMBERID;
+ /**
+ * 无备注
+ */
+ private String PI_STARTMEMBERNM;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_STARTDATE;
+ /**
+ * 无备注
+ */
+ private String PI_DEALACCOUNTID;
+ /**
+ * 无备注
+ */
+ private String PI_DEALDEPARTMENTID;
+ /**
+ * 无备注
+ */
+ private String PI_DEALMEMBERID;
+ /**
+ * 无备注
+ */
+ private String PI_DEALMEMBERNM;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_DEALDATE;
+ /**
+ * 无备注
+ */
+ private String PI_DEALSTATE;
+ /**
+ * 无备注
+ */
+ private String PI_DEALPOLICY;
+ /**
+ * 无备注
+ */
+ private String PI_DEALINFO;
+ /**
+ * 无备注
+ */
+ private String PI_SHAREID;
+ /**
+ * 无备注
+ */
+ private String PI_SHARENM;
+ /**
+ * 无备注
+ */
+ private String PI_APITYPE;
+ /**
+ * 无备注
+ */
+ private String PI_ISVALID;
+ /**
+ * 无备注
+ */
+ private String PI_VALIDRESULT;
+ /**
+ * 无备注
+ */
+ private String PI_RESULTNM;
+ /**
+ * 无备注
+ */
+ private String PI_VALIDSTATE;
+ /**
+ * 无备注
+ */
+ private String PI_CLASSTYPE;
+ /**
+ * 无备注
+ */
+ private String PI_CLASSNAME;
+ /**
+ * 无备注
+ */
+ private String PI_RECOVERSTATE;
+ /**
+ * 无备注
+ */
+ private String PI_RECOVERMEMBERID;
+ /**
+ * 无备注
+ */
+ private String PI_RECOVERMEMBERNM;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_RECOVERDATE;
+ /**
+ * 无备注
+ */
+ private String PI_ORGID;
+ /**
+ * 无备注
+ */
+ private String PI_ORGNM;
+ /**
+ * 无备注
+ */
+ private String PI_YEAR;
+ /**
+ * 无备注
+ */
+ private String PI_MONTH;
+ /**
+ * 无备注
+ */
+ private String PI_QUARTER;
+ /**
+ * 无备注
+ */
+ private String PI_HALFYEAR;
+ /**
+ * 无备注
+ */
+ private String PI_XMMC;
+ /**
+ * 无备注
+ */
+ private String PI_FPDM;
+ /**
+ * 无备注
+ */
+ private String PI_FPHM;
+ /**
+ * 无备注
+ */
+ private String PI_SALERTAXNO;
+ /**
+ * 无备注
+ */
+ private String PI_SALERNAME;
+ /**
+ * 无备注
+ */
+ private String PI_BUYERTAXNO;
+ /**
+ * 无备注
+ */
+ private String PI_BUYERNAME;
+ /**
+ * 无备注
+ */
+ private String PI_INVOICETYPE;
+ /**
+ * 无备注
+ */
+ private String PI_INVOICENAME;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_INVOICEDATE;
+ /**
+ * 无备注
+ */
+ private String PI_FSTATION;
+ /**
+ * 无备注
+ */
+ private String PI_TSTATION;
+ /**
+ * 无备注
+ */
+ private String PI_USERNAME;
+ /**
+ * 无备注
+ */
+ private String PI_TRAINNO;
+ /**
+ * 无备注
+ */
+ private String PI_TRAINCODE;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_STARTDATETIME;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_ENDDATETIME;
+ /**
+ * 无备注
+ */
+ private String PI_STARTTIME;
+ /**
+ * 无备注
+ */
+ private String PI_ENDTIME;
+ /**
+ * 无备注
+ */
+ private String PI_TAXRATE;
+ /**
+ * 无备注
+ */
+ private String PI_TAXAMOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_NOTAXAMOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_DEDUCTIONAMOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_FILEURL;
+ /**
+ * 无备注
+ */
+ private String PI_MATTERID;
+ /**
+ * 无备注
+ */
+ private String PI_VOUCHER;
+ /**
+ * 无备注
+ */
+ private String PI_VOUCHERINFO;
+ /**
+ * 无备注
+ */
+ private String PI_FIELD0001;
+ /**
+ * 无备注
+ */
+ private String PI_FIELD0002;
+ /**
+ * 无备注
+ */
+ private String PI_FIELD0003;
+ /**
+ * 无备注
+ */
+ private String PI_FIELD0004;
+ /**
+ * 无备注
+ */
+ private String PI_FIELD0005;
+ /**
+ * 无备注
+ */
+ private String PI_INVOICEVALIDSTATE;
+ /**
+ * 无备注
+ */
+ private String PI_MODIFYSTATE;
+ /**
+ * 无备注
+ */
+ private String PI_USAGEAMOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_VERIFYAMOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_UNUSEDAMOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_USECOUNT;
+ /**
+ * 无备注
+ */
+ private String PI_FILENAME;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_UPDATEDATE;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_VOUCHERDATE;
+ /**
+ * 无备注
+ */
+ private String PI_CPAY_STATE;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date PI_CPAY_DATE;
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_ID(String PI_ID) {
+ this.PI_ID = PI_ID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_ID() {
+ return PI_ID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_KEY(String PI_KEY) {
+ this.PI_KEY = PI_KEY;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_KEY() {
+ return PI_KEY;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_KEY_NEW(String PI_KEY_NEW) {
+ this.PI_KEY_NEW = PI_KEY_NEW;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_KEY_NEW() {
+ return PI_KEY_NEW;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DATAKEY(String PI_DATAKEY) {
+ this.PI_DATAKEY = PI_DATAKEY;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DATAKEY() {
+ return PI_DATAKEY;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_MAINCONFIGID(String PI_MAINCONFIGID) {
+ this.PI_MAINCONFIGID = PI_MAINCONFIGID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_MAINCONFIGID() {
+ return PI_MAINCONFIGID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TAXNO(String PI_TAXNO) {
+ this.PI_TAXNO = PI_TAXNO;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TAXNO() {
+ return PI_TAXNO;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TABLENAME(String PI_TABLENAME) {
+ this.PI_TABLENAME = PI_TABLENAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TABLENAME() {
+ return PI_TABLENAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_BILLKIND(String PI_BILLKIND) {
+ this.PI_BILLKIND = PI_BILLKIND;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_BILLKIND() {
+ return PI_BILLKIND;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_BILLNAME(String PI_BILLNAME) {
+ this.PI_BILLNAME = PI_BILLNAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_BILLNAME() {
+ return PI_BILLNAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_AMOUNT(String PI_AMOUNT) {
+ this.PI_AMOUNT = PI_AMOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_AMOUNT() {
+ return PI_AMOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STATE(String PI_STATE) {
+ this.PI_STATE = PI_STATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_STATE() {
+ return PI_STATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FILEID(String PI_FILEID) {
+ this.PI_FILEID = PI_FILEID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FILEID() {
+ return PI_FILEID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FILEDATE(Date PI_FILEDATE) {
+ this.PI_FILEDATE = PI_FILEDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_FILEDATE() {
+ return PI_FILEDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_IMAGEPATH(String PI_IMAGEPATH) {
+ this.PI_IMAGEPATH = PI_IMAGEPATH;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_IMAGEPATH() {
+ return PI_IMAGEPATH;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_UPDATEDATA(String PI_UPDATEDATA) {
+ this.PI_UPDATEDATA = PI_UPDATEDATA;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_UPDATEDATA() {
+ return PI_UPDATEDATA;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TYPE(String PI_TYPE) {
+ this.PI_TYPE = PI_TYPE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TYPE() {
+ return PI_TYPE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_MEMBERID(String PI_MEMBERID) {
+ this.PI_MEMBERID = PI_MEMBERID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_MEMBERID() {
+ return PI_MEMBERID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_MEMBERNM(String PI_MEMBERNM) {
+ this.PI_MEMBERNM = PI_MEMBERNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_MEMBERNM() {
+ return PI_MEMBERNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_MAKEDATE(Date PI_MAKEDATE) {
+ this.PI_MAKEDATE = PI_MAKEDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_MAKEDATE() {
+ return PI_MAKEDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_BEStringID(String PI_BEStringID) {
+ this.PI_BEStringID = PI_BEStringID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_BEStringID() {
+ return PI_BEStringID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_BEStringNM(String PI_BEStringNM) {
+ this.PI_BEStringNM = PI_BEStringNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_BEStringNM() {
+ return PI_BEStringNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USEACCOUNTID(String PI_USEACCOUNTID) {
+ this.PI_USEACCOUNTID = PI_USEACCOUNTID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USEACCOUNTID() {
+ return PI_USEACCOUNTID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USEACCOUNTNM(String PI_USEACCOUNTNM) {
+ this.PI_USEACCOUNTNM = PI_USEACCOUNTNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USEACCOUNTNM() {
+ return PI_USEACCOUNTNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USEDEPARTMENTID(String PI_USEDEPARTMENTID) {
+ this.PI_USEDEPARTMENTID = PI_USEDEPARTMENTID;
+ }
+
+ public String getPI_BELONGID() {
+ return PI_BELONGID;
+ }
+
+ public void setPI_BELONGID(String PI_BELONGID) {
+ this.PI_BELONGID = PI_BELONGID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USEDEPARTMENTID() {
+ return PI_USEDEPARTMENTID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USEDEPARTMENTNM(String PI_USEDEPARTMENTNM) {
+ this.PI_USEDEPARTMENTNM = PI_USEDEPARTMENTNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USEDEPARTMENTNM() {
+ return PI_USEDEPARTMENTNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USEID(String PI_USEID) {
+ this.PI_USEID = PI_USEID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USEID() {
+ return PI_USEID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USENM(String PI_USENM) {
+ this.PI_USENM = PI_USENM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USENM() {
+ return PI_USENM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USESTATE(String PI_USESTATE) {
+ this.PI_USESTATE = PI_USESTATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USESTATE() {
+ return PI_USESTATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_SUMMARYID(String PI_SUMMARYID) {
+ this.PI_SUMMARYID = PI_SUMMARYID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_SUMMARYID() {
+ return PI_SUMMARYID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_SUBJECT(String PI_SUBJECT) {
+ this.PI_SUBJECT = PI_SUBJECT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_SUBJECT() {
+ return PI_SUBJECT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FORMID(String PI_FORMID) {
+ this.PI_FORMID = PI_FORMID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FORMID() {
+ return PI_FORMID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FORMDATAID(String PI_FORMDATAID) {
+ this.PI_FORMDATAID = PI_FORMDATAID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FORMDATAID() {
+ return PI_FORMDATAID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TEMPLATEID(String PI_TEMPLATEID) {
+ this.PI_TEMPLATEID = PI_TEMPLATEID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TEMPLATEID() {
+ return PI_TEMPLATEID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STARTACCOUNTID(String PI_STARTACCOUNTID) {
+ this.PI_STARTACCOUNTID = PI_STARTACCOUNTID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_STARTACCOUNTID() {
+ return PI_STARTACCOUNTID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STARTDEPARTMENTID(String PI_STARTDEPARTMENTID) {
+ this.PI_STARTDEPARTMENTID = PI_STARTDEPARTMENTID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_STARTDEPARTMENTID() {
+ return PI_STARTDEPARTMENTID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STARTMEMBERID(String PI_STARTMEMBERID) {
+ this.PI_STARTMEMBERID = PI_STARTMEMBERID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_STARTMEMBERID() {
+ return PI_STARTMEMBERID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STARTMEMBERNM(String PI_STARTMEMBERNM) {
+ this.PI_STARTMEMBERNM = PI_STARTMEMBERNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_STARTMEMBERNM() {
+ return PI_STARTMEMBERNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STARTDATE(Date PI_STARTDATE) {
+ this.PI_STARTDATE = PI_STARTDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_STARTDATE() {
+ return PI_STARTDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALACCOUNTID(String PI_DEALACCOUNTID) {
+ this.PI_DEALACCOUNTID = PI_DEALACCOUNTID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEALACCOUNTID() {
+ return PI_DEALACCOUNTID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALDEPARTMENTID(String PI_DEALDEPARTMENTID) {
+ this.PI_DEALDEPARTMENTID = PI_DEALDEPARTMENTID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEALDEPARTMENTID() {
+ return PI_DEALDEPARTMENTID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALMEMBERID(String PI_DEALMEMBERID) {
+ this.PI_DEALMEMBERID = PI_DEALMEMBERID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEALMEMBERID() {
+ return PI_DEALMEMBERID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALMEMBERNM(String PI_DEALMEMBERNM) {
+ this.PI_DEALMEMBERNM = PI_DEALMEMBERNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEALMEMBERNM() {
+ return PI_DEALMEMBERNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALDATE(Date PI_DEALDATE) {
+ this.PI_DEALDATE = PI_DEALDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_DEALDATE() {
+ return PI_DEALDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALSTATE(String PI_DEALSTATE) {
+ this.PI_DEALSTATE = PI_DEALSTATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEALSTATE() {
+ return PI_DEALSTATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALPOLICY(String PI_DEALPOLICY) {
+ this.PI_DEALPOLICY = PI_DEALPOLICY;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEALPOLICY() {
+ return PI_DEALPOLICY;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEALINFO(String PI_DEALINFO) {
+ this.PI_DEALINFO = PI_DEALINFO;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEALINFO() {
+ return PI_DEALINFO;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_SHAREID(String PI_SHAREID) {
+ this.PI_SHAREID = PI_SHAREID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_SHAREID() {
+ return PI_SHAREID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_SHARENM(String PI_SHARENM) {
+ this.PI_SHARENM = PI_SHARENM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_SHARENM() {
+ return PI_SHARENM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_APITYPE(String PI_APITYPE) {
+ this.PI_APITYPE = PI_APITYPE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_APITYPE() {
+ return PI_APITYPE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_ISVALID(String PI_ISVALID) {
+ this.PI_ISVALID = PI_ISVALID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_ISVALID() {
+ return PI_ISVALID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_VALIDRESULT(String PI_VALIDRESULT) {
+ this.PI_VALIDRESULT = PI_VALIDRESULT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_VALIDRESULT() {
+ return PI_VALIDRESULT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_RESULTNM(String PI_RESULTNM) {
+ this.PI_RESULTNM = PI_RESULTNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_RESULTNM() {
+ return PI_RESULTNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_VALIDSTATE(String PI_VALIDSTATE) {
+ this.PI_VALIDSTATE = PI_VALIDSTATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_VALIDSTATE() {
+ return PI_VALIDSTATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_CLASSTYPE(String PI_CLASSTYPE) {
+ this.PI_CLASSTYPE = PI_CLASSTYPE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_CLASSTYPE() {
+ return PI_CLASSTYPE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_CLASSNAME(String PI_CLASSNAME) {
+ this.PI_CLASSNAME = PI_CLASSNAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_CLASSNAME() {
+ return PI_CLASSNAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_RECOVERSTATE(String PI_RECOVERSTATE) {
+ this.PI_RECOVERSTATE = PI_RECOVERSTATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_RECOVERSTATE() {
+ return PI_RECOVERSTATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_RECOVERMEMBERID(String PI_RECOVERMEMBERID) {
+ this.PI_RECOVERMEMBERID = PI_RECOVERMEMBERID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_RECOVERMEMBERID() {
+ return PI_RECOVERMEMBERID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_RECOVERMEMBERNM(String PI_RECOVERMEMBERNM) {
+ this.PI_RECOVERMEMBERNM = PI_RECOVERMEMBERNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_RECOVERMEMBERNM() {
+ return PI_RECOVERMEMBERNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_RECOVERDATE(Date PI_RECOVERDATE) {
+ this.PI_RECOVERDATE = PI_RECOVERDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_RECOVERDATE() {
+ return PI_RECOVERDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_ORGID(String PI_ORGID) {
+ this.PI_ORGID = PI_ORGID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_ORGID() {
+ return PI_ORGID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_ORGNM(String PI_ORGNM) {
+ this.PI_ORGNM = PI_ORGNM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_ORGNM() {
+ return PI_ORGNM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_YEAR(String PI_YEAR) {
+ this.PI_YEAR = PI_YEAR;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_YEAR() {
+ return PI_YEAR;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_MONTH(String PI_MONTH) {
+ this.PI_MONTH = PI_MONTH;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_MONTH() {
+ return PI_MONTH;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_QUARTER(String PI_QUARTER) {
+ this.PI_QUARTER = PI_QUARTER;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_QUARTER() {
+ return PI_QUARTER;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_HALFYEAR(String PI_HALFYEAR) {
+ this.PI_HALFYEAR = PI_HALFYEAR;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_HALFYEAR() {
+ return PI_HALFYEAR;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_XMMC(String PI_XMMC) {
+ this.PI_XMMC = PI_XMMC;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_XMMC() {
+ return PI_XMMC;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FPDM(String PI_FPDM) {
+ this.PI_FPDM = PI_FPDM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FPDM() {
+ return PI_FPDM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FPHM(String PI_FPHM) {
+ this.PI_FPHM = PI_FPHM;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FPHM() {
+ return PI_FPHM;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_SALERTAXNO(String PI_SALERTAXNO) {
+ this.PI_SALERTAXNO = PI_SALERTAXNO;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_SALERTAXNO() {
+ return PI_SALERTAXNO;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_SALERNAME(String PI_SALERNAME) {
+ this.PI_SALERNAME = PI_SALERNAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_SALERNAME() {
+ return PI_SALERNAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_BUYERTAXNO(String PI_BUYERTAXNO) {
+ this.PI_BUYERTAXNO = PI_BUYERTAXNO;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_BUYERTAXNO() {
+ return PI_BUYERTAXNO;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_BUYERNAME(String PI_BUYERNAME) {
+ this.PI_BUYERNAME = PI_BUYERNAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_BUYERNAME() {
+ return PI_BUYERNAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_INVOICETYPE(String PI_INVOICETYPE) {
+ this.PI_INVOICETYPE = PI_INVOICETYPE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_INVOICETYPE() {
+ return PI_INVOICETYPE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_INVOICENAME(String PI_INVOICENAME) {
+ this.PI_INVOICENAME = PI_INVOICENAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_INVOICENAME() {
+ return PI_INVOICENAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_INVOICEDATE(Date PI_INVOICEDATE) {
+ this.PI_INVOICEDATE = PI_INVOICEDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_INVOICEDATE() {
+ return PI_INVOICEDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FSTATION(String PI_FSTATION) {
+ this.PI_FSTATION = PI_FSTATION;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FSTATION() {
+ return PI_FSTATION;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TSTATION(String PI_TSTATION) {
+ this.PI_TSTATION = PI_TSTATION;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TSTATION() {
+ return PI_TSTATION;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USERNAME(String PI_USERNAME) {
+ this.PI_USERNAME = PI_USERNAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USERNAME() {
+ return PI_USERNAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TRAINNO(String PI_TRAINNO) {
+ this.PI_TRAINNO = PI_TRAINNO;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TRAINNO() {
+ return PI_TRAINNO;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TRAINCODE(String PI_TRAINCODE) {
+ this.PI_TRAINCODE = PI_TRAINCODE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TRAINCODE() {
+ return PI_TRAINCODE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STARTDATETIME(Date PI_STARTDATETIME) {
+ this.PI_STARTDATETIME = PI_STARTDATETIME;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_STARTDATETIME() {
+ return PI_STARTDATETIME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_ENDDATETIME(Date PI_ENDDATETIME) {
+ this.PI_ENDDATETIME = PI_ENDDATETIME;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_ENDDATETIME() {
+ return PI_ENDDATETIME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_STARTTIME(String PI_STARTTIME) {
+ this.PI_STARTTIME = PI_STARTTIME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_STARTTIME() {
+ return PI_STARTTIME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_ENDTIME(String PI_ENDTIME) {
+ this.PI_ENDTIME = PI_ENDTIME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_ENDTIME() {
+ return PI_ENDTIME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TAXRATE(String PI_TAXRATE) {
+ this.PI_TAXRATE = PI_TAXRATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TAXRATE() {
+ return PI_TAXRATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_TAXAMOUNT(String PI_TAXAMOUNT) {
+ this.PI_TAXAMOUNT = PI_TAXAMOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_TAXAMOUNT() {
+ return PI_TAXAMOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_NOTAXAMOUNT(String PI_NOTAXAMOUNT) {
+ this.PI_NOTAXAMOUNT = PI_NOTAXAMOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_NOTAXAMOUNT() {
+ return PI_NOTAXAMOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_DEDUCTIONAMOUNT(String PI_DEDUCTIONAMOUNT) {
+ this.PI_DEDUCTIONAMOUNT = PI_DEDUCTIONAMOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_DEDUCTIONAMOUNT() {
+ return PI_DEDUCTIONAMOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FILEURL(String PI_FILEURL) {
+ this.PI_FILEURL = PI_FILEURL;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FILEURL() {
+ return PI_FILEURL;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_MATTERID(String PI_MATTERID) {
+ this.PI_MATTERID = PI_MATTERID;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_MATTERID() {
+ return PI_MATTERID;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_VOUCHER(String PI_VOUCHER) {
+ this.PI_VOUCHER = PI_VOUCHER;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_VOUCHER() {
+ return PI_VOUCHER;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_VOUCHERINFO(String PI_VOUCHERINFO) {
+ this.PI_VOUCHERINFO = PI_VOUCHERINFO;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_VOUCHERINFO() {
+ return PI_VOUCHERINFO;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FIELD0001(String PI_FIELD0001) {
+ this.PI_FIELD0001 = PI_FIELD0001;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FIELD0001() {
+ return PI_FIELD0001;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FIELD0002(String PI_FIELD0002) {
+ this.PI_FIELD0002 = PI_FIELD0002;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FIELD0002() {
+ return PI_FIELD0002;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FIELD0003(String PI_FIELD0003) {
+ this.PI_FIELD0003 = PI_FIELD0003;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FIELD0003() {
+ return PI_FIELD0003;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FIELD0004(String PI_FIELD0004) {
+ this.PI_FIELD0004 = PI_FIELD0004;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FIELD0004() {
+ return PI_FIELD0004;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FIELD0005(String PI_FIELD0005) {
+ this.PI_FIELD0005 = PI_FIELD0005;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FIELD0005() {
+ return PI_FIELD0005;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_INVOICEVALIDSTATE(String PI_INVOICEVALIDSTATE) {
+ this.PI_INVOICEVALIDSTATE = PI_INVOICEVALIDSTATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_INVOICEVALIDSTATE() {
+ return PI_INVOICEVALIDSTATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_MODIFYSTATE(String PI_MODIFYSTATE) {
+ this.PI_MODIFYSTATE = PI_MODIFYSTATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_MODIFYSTATE() {
+ return PI_MODIFYSTATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USAGEAMOUNT(String PI_USAGEAMOUNT) {
+ this.PI_USAGEAMOUNT = PI_USAGEAMOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USAGEAMOUNT() {
+ return PI_USAGEAMOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_VERIFYAMOUNT(String PI_VERIFYAMOUNT) {
+ this.PI_VERIFYAMOUNT = PI_VERIFYAMOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_VERIFYAMOUNT() {
+ return PI_VERIFYAMOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_UNUSEDAMOUNT(String PI_UNUSEDAMOUNT) {
+ this.PI_UNUSEDAMOUNT = PI_UNUSEDAMOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_UNUSEDAMOUNT() {
+ return PI_UNUSEDAMOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_USECOUNT(String PI_USECOUNT) {
+ this.PI_USECOUNT = PI_USECOUNT;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_USECOUNT() {
+ return PI_USECOUNT;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_FILENAME(String PI_FILENAME) {
+ this.PI_FILENAME = PI_FILENAME;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_FILENAME() {
+ return PI_FILENAME;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_UPDATEDATE(Date PI_UPDATEDATE) {
+ this.PI_UPDATEDATE = PI_UPDATEDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_UPDATEDATE() {
+ return PI_UPDATEDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_VOUCHERDATE(Date PI_VOUCHERDATE) {
+ this.PI_VOUCHERDATE = PI_VOUCHERDATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_VOUCHERDATE() {
+ return PI_VOUCHERDATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_CPAY_STATE(String PI_CPAY_STATE) {
+ this.PI_CPAY_STATE = PI_CPAY_STATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public String getPI_CPAY_STATE() {
+ return PI_CPAY_STATE;
+ }
+
+
+ /**
+ * 无备注
+ */
+ public void setPI_CPAY_DATE(Date PI_CPAY_DATE) {
+ this.PI_CPAY_DATE = PI_CPAY_DATE;
+ }
+
+ /**
+ * 无备注
+ */
+ public Date getPI_CPAY_DATE() {
+ return PI_CPAY_DATE;
+ }
+
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmisPublicinfoEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmisPublicinfoEntity.xml
new file mode 100644
index 00000000..c997a976
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmisPublicinfoEntity.xml
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PI_ID,
+ PI_KEY,
+ PI_KEY_NEW,
+ PI_DATAKEY,
+ PI_MAINCONFIGID,
+ PI_TAXNO,
+ PI_TABLENAME,
+ PI_BILLKIND,
+ PI_AMOUNT,
+ PI_USESTATE,
+ PI_SUMMARYID,
+ PI_SUBJECT,
+ PI_FORMID,
+ PI_FORMDATAID
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicedetailEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicedetailEntity.java
new file mode 100644
index 00000000..4440c786
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicedetailEntity.java
@@ -0,0 +1,170 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.entity;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.math.BigDecimal;
+import com.hzya.frame.web.entity.BaseEntity;
+/**
+ * @description: 迈锐思-增值税发票子表
+ * @tableName: LEXMISCIV_INVOICEDETAIL
+ * @entityName: LexmiscivInvoicedetailEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public class LexmiscivInvoicedetailEntity extends BaseEntity {
+ public LexmiscivInvoicedetailEntity() {
+
+ }
+
+ public LexmiscivInvoicedetailEntity(String ID_MAINID,String dataSourceCode) {
+ this.ID_MAINID = ID_MAINID;
+ this.setDataSourceCode(dataSourceCode);
+ }
+
+ /** 无备注 */
+private String ID_ID;
+/** 无备注 */
+private String ID_MAINID;
+/** 无备注 */
+private String ID_ROWID;
+/** 无备注 */
+private String ID_ACCOUNTNAME;
+/** 无备注 */
+private String ID_SERVICENM;
+/** 无备注 */
+private String ID_SERVICETYPE;
+/** 无备注 */
+private String ID_PRICE;
+/** 无备注 */
+private String ID_UNIT;
+/** 无备注 */
+private String ID_NUM;
+/** 无备注 */
+private String ID_NOTAXAMOUNT;
+/** 无备注 */
+private String ID_TAX;
+/** 无备注 */
+private String ID_TAXAMOUNT;
+
+
+/** 无备注 */
+public void setID_ID(String ID_ID) {
+ this.ID_ID = ID_ID;
+ }
+/** 无备注 */
+public String getID_ID() {
+ return ID_ID;
+ }
+
+
+/** 无备注 */
+public void setID_MAINID(String ID_MAINID) {
+ this.ID_MAINID = ID_MAINID;
+ }
+/** 无备注 */
+public String getID_MAINID() {
+ return ID_MAINID;
+ }
+
+
+/** 无备注 */
+public void setID_ROWID(String ID_ROWID) {
+ this.ID_ROWID = ID_ROWID;
+ }
+/** 无备注 */
+public String getID_ROWID() {
+ return ID_ROWID;
+ }
+
+
+/** 无备注 */
+public void setID_ACCOUNTNAME(String ID_ACCOUNTNAME) {
+ this.ID_ACCOUNTNAME = ID_ACCOUNTNAME;
+ }
+/** 无备注 */
+public String getID_ACCOUNTNAME() {
+ return ID_ACCOUNTNAME;
+ }
+
+
+/** 无备注 */
+public void setID_SERVICENM(String ID_SERVICENM) {
+ this.ID_SERVICENM = ID_SERVICENM;
+ }
+/** 无备注 */
+public String getID_SERVICENM() {
+ return ID_SERVICENM;
+ }
+
+
+/** 无备注 */
+public void setID_SERVICETYPE(String ID_SERVICETYPE) {
+ this.ID_SERVICETYPE = ID_SERVICETYPE;
+ }
+/** 无备注 */
+public String getID_SERVICETYPE() {
+ return ID_SERVICETYPE;
+ }
+
+
+/** 无备注 */
+public void setID_PRICE(String ID_PRICE) {
+ this.ID_PRICE = ID_PRICE;
+ }
+/** 无备注 */
+public String getID_PRICE() {
+ return ID_PRICE;
+ }
+
+
+/** 无备注 */
+public void setID_UNIT(String ID_UNIT) {
+ this.ID_UNIT = ID_UNIT;
+ }
+/** 无备注 */
+public String getID_UNIT() {
+ return ID_UNIT;
+ }
+
+
+/** 无备注 */
+public void setID_NUM(String ID_NUM) {
+ this.ID_NUM = ID_NUM;
+ }
+/** 无备注 */
+public String getID_NUM() {
+ return ID_NUM;
+ }
+
+
+/** 无备注 */
+public void setID_NOTAXAMOUNT(String ID_NOTAXAMOUNT) {
+ this.ID_NOTAXAMOUNT = ID_NOTAXAMOUNT;
+ }
+/** 无备注 */
+public String getID_NOTAXAMOUNT() {
+ return ID_NOTAXAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setID_TAX(String ID_TAX) {
+ this.ID_TAX = ID_TAX;
+ }
+/** 无备注 */
+public String getID_TAX() {
+ return ID_TAX;
+ }
+
+
+/** 无备注 */
+public void setID_TAXAMOUNT(String ID_TAXAMOUNT) {
+ this.ID_TAXAMOUNT = ID_TAXAMOUNT;
+ }
+/** 无备注 */
+public String getID_TAXAMOUNT() {
+ return ID_TAXAMOUNT;
+ }
+
+
+ }
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicedetailEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicedetailEntity.xml
new file mode 100644
index 00000000..e4e1aca9
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicedetailEntity.xml
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID_ID,
+ ID_MAINID,
+ ID_ROWID,
+ ID_ACCOUNTNAME,
+ ID_SERVICENM,
+ ID_SERVICETYPE,
+ ID_PRICE,
+ ID_UNIT,
+ ID_NUM,
+ ID_NOTAXAMOUNT,
+ ID_TAX,
+ ID_TAXAMOUNT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicemainEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicemainEntity.java
new file mode 100644
index 00000000..fd42a97e
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicemainEntity.java
@@ -0,0 +1,651 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.entity;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.math.BigDecimal;
+import com.hzya.frame.web.entity.BaseEntity;
+/**
+ * @description: 迈锐思-增值税发票主表
+ * @tableName: LEXMISCIV_INVOICEMAIN
+ * @entityName: LexmiscivInvoicemainEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public class LexmiscivInvoicemainEntity extends BaseEntity {
+ public LexmiscivInvoicemainEntity() {
+
+ }
+
+ public LexmiscivInvoicemainEntity(String IM_ID,String dataSourceCode) {
+ this.IM_ID = IM_ID;
+ this.setDataSourceCode(dataSourceCode);
+ }
+
+ /** 无备注 */
+private String IM_ID;
+/** 无备注 */
+private String IM_FPDM;
+/** 无备注 */
+private String IM_FPHM;
+@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+private Date IM_DATE;
+/** 无备注 */
+private String IM_CHECKCODE;
+/** 无备注 */
+private String IM_SALERTAXNO;
+/** 无备注 */
+private String IM_SALERNAME;
+/** 无备注 */
+private String IM_SALERADDRESS;
+/** 无备注 */
+private String IM_SALERBANKNO;
+/** 无备注 */
+private String IM_SALERBANKNM;
+/** 无备注 */
+private String IM_BUYERTAXNO;
+/** 无备注 */
+private String IM_BUYERNAME;
+/** 无备注 */
+private String IM_BUYERADDRESS;
+/** 无备注 */
+private String IM_BUYERBANKNO;
+/** 无备注 */
+private String IM_BUYERBANKNM;
+/** 无备注 */
+private String IM_MAKERNM;
+/** 无备注 */
+private String IM_PAYEE;
+/** 无备注 */
+private String IM_AUDITOR;
+/** 无备注 */
+private BigDecimal IM_NOTAXAMOUNT;
+/** 无备注 */
+private BigDecimal IM_TAXAMOUNT;
+/** 无备注 */
+private BigDecimal IM_TOTALAMOUNT;
+/** 无备注 */
+private String IM_TAX;
+/** 无备注 */
+private String IM_MACHINENO;
+/** 无备注 */
+private String IM_MEMO;
+/** 无备注 */
+private String IM_ENCRYPTIONCODE;
+/** 无备注 */
+private String IM_TYPE;
+/** 无备注 */
+private String IM_TYPENAME;
+/** 无备注 */
+private String IM_XMMC;
+/** 无备注 */
+private String IM_KEY;
+/** 无备注 */
+private String IM_AREACODE;
+/** 无备注 */
+private String IM_AREANAME;
+/** 无备注 */
+private String IM_PRINTEDFPDM;
+/** 无备注 */
+private String IM_PRINTEDFPHM;
+/** 无备注 */
+private Integer IM_COUNT;
+/** 无备注 */
+private Integer IM_AGENCY;
+/** 无备注 */
+private Integer IM_BLOCKCHAIN;
+/** 无备注 */
+private Integer IM_COMPANYSEAL;
+/** 无备注 */
+private String IM_COMPANYSEALDEPT;
+/** 无备注 */
+private String IM_COMPANYSEALNUM;
+/** 无备注 */
+private String IM_SADDRESS;
+/** 无备注 */
+private String IM_STEL;
+/** 无备注 */
+private String IM_SBANKNM;
+/** 无备注 */
+private String IM_SBANKNO;
+/** 无备注 */
+private String IM_BADDRESS;
+/** 无备注 */
+private String IM_BTEL;
+/** 无备注 */
+private String IM_BBANKNM;
+/** 无备注 */
+private String IM_BBANKNO;
+/** 无备注 */
+private String IM_DATETIME;
+/** 无备注 */
+private String IM_EDATETIME;
+/** 无备注 */
+private BigDecimal IM_TOTALAMOUNTOCR;
+/** 无备注 */
+private Integer IM_PAGER_ELECTRONIC;
+/** 无备注 */
+private String IM_ELECTRONIC_NUMBER;
+
+
+/** 无备注 */
+public void setIM_ID(String IM_ID) {
+ this.IM_ID = IM_ID;
+ }
+/** 无备注 */
+public String getIM_ID() {
+ return IM_ID;
+ }
+
+
+/** 无备注 */
+public void setIM_FPDM(String IM_FPDM) {
+ this.IM_FPDM = IM_FPDM;
+ }
+/** 无备注 */
+public String getIM_FPDM() {
+ return IM_FPDM;
+ }
+
+
+/** 无备注 */
+public void setIM_FPHM(String IM_FPHM) {
+ this.IM_FPHM = IM_FPHM;
+ }
+/** 无备注 */
+public String getIM_FPHM() {
+ return IM_FPHM;
+ }
+
+
+/** 无备注 */
+public void setIM_DATE(Date IM_DATE) {
+ this.IM_DATE = IM_DATE;
+ }
+/** 无备注 */
+public Date getIM_DATE() {
+ return IM_DATE;
+ }
+
+
+/** 无备注 */
+public void setIM_CHECKCODE(String IM_CHECKCODE) {
+ this.IM_CHECKCODE = IM_CHECKCODE;
+ }
+/** 无备注 */
+public String getIM_CHECKCODE() {
+ return IM_CHECKCODE;
+ }
+
+
+/** 无备注 */
+public void setIM_SALERTAXNO(String IM_SALERTAXNO) {
+ this.IM_SALERTAXNO = IM_SALERTAXNO;
+ }
+/** 无备注 */
+public String getIM_SALERTAXNO() {
+ return IM_SALERTAXNO;
+ }
+
+
+/** 无备注 */
+public void setIM_SALERNAME(String IM_SALERNAME) {
+ this.IM_SALERNAME = IM_SALERNAME;
+ }
+/** 无备注 */
+public String getIM_SALERNAME() {
+ return IM_SALERNAME;
+ }
+
+
+/** 无备注 */
+public void setIM_SALERADDRESS(String IM_SALERADDRESS) {
+ this.IM_SALERADDRESS = IM_SALERADDRESS;
+ }
+/** 无备注 */
+public String getIM_SALERADDRESS() {
+ return IM_SALERADDRESS;
+ }
+
+
+/** 无备注 */
+public void setIM_SALERBANKNO(String IM_SALERBANKNO) {
+ this.IM_SALERBANKNO = IM_SALERBANKNO;
+ }
+/** 无备注 */
+public String getIM_SALERBANKNO() {
+ return IM_SALERBANKNO;
+ }
+
+
+/** 无备注 */
+public void setIM_SALERBANKNM(String IM_SALERBANKNM) {
+ this.IM_SALERBANKNM = IM_SALERBANKNM;
+ }
+/** 无备注 */
+public String getIM_SALERBANKNM() {
+ return IM_SALERBANKNM;
+ }
+
+
+/** 无备注 */
+public void setIM_BUYERTAXNO(String IM_BUYERTAXNO) {
+ this.IM_BUYERTAXNO = IM_BUYERTAXNO;
+ }
+/** 无备注 */
+public String getIM_BUYERTAXNO() {
+ return IM_BUYERTAXNO;
+ }
+
+
+/** 无备注 */
+public void setIM_BUYERNAME(String IM_BUYERNAME) {
+ this.IM_BUYERNAME = IM_BUYERNAME;
+ }
+/** 无备注 */
+public String getIM_BUYERNAME() {
+ return IM_BUYERNAME;
+ }
+
+
+/** 无备注 */
+public void setIM_BUYERADDRESS(String IM_BUYERADDRESS) {
+ this.IM_BUYERADDRESS = IM_BUYERADDRESS;
+ }
+/** 无备注 */
+public String getIM_BUYERADDRESS() {
+ return IM_BUYERADDRESS;
+ }
+
+
+/** 无备注 */
+public void setIM_BUYERBANKNO(String IM_BUYERBANKNO) {
+ this.IM_BUYERBANKNO = IM_BUYERBANKNO;
+ }
+/** 无备注 */
+public String getIM_BUYERBANKNO() {
+ return IM_BUYERBANKNO;
+ }
+
+
+/** 无备注 */
+public void setIM_BUYERBANKNM(String IM_BUYERBANKNM) {
+ this.IM_BUYERBANKNM = IM_BUYERBANKNM;
+ }
+/** 无备注 */
+public String getIM_BUYERBANKNM() {
+ return IM_BUYERBANKNM;
+ }
+
+
+/** 无备注 */
+public void setIM_MAKERNM(String IM_MAKERNM) {
+ this.IM_MAKERNM = IM_MAKERNM;
+ }
+/** 无备注 */
+public String getIM_MAKERNM() {
+ return IM_MAKERNM;
+ }
+
+
+/** 无备注 */
+public void setIM_PAYEE(String IM_PAYEE) {
+ this.IM_PAYEE = IM_PAYEE;
+ }
+/** 无备注 */
+public String getIM_PAYEE() {
+ return IM_PAYEE;
+ }
+
+
+/** 无备注 */
+public void setIM_AUDITOR(String IM_AUDITOR) {
+ this.IM_AUDITOR = IM_AUDITOR;
+ }
+/** 无备注 */
+public String getIM_AUDITOR() {
+ return IM_AUDITOR;
+ }
+
+
+/** 无备注 */
+public void setIM_NOTAXAMOUNT(BigDecimal IM_NOTAXAMOUNT) {
+ this.IM_NOTAXAMOUNT = IM_NOTAXAMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getIM_NOTAXAMOUNT() {
+ return IM_NOTAXAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setIM_TAXAMOUNT(BigDecimal IM_TAXAMOUNT) {
+ this.IM_TAXAMOUNT = IM_TAXAMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getIM_TAXAMOUNT() {
+ return IM_TAXAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setIM_TOTALAMOUNT(BigDecimal IM_TOTALAMOUNT) {
+ this.IM_TOTALAMOUNT = IM_TOTALAMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getIM_TOTALAMOUNT() {
+ return IM_TOTALAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setIM_TAX(String IM_TAX) {
+ this.IM_TAX = IM_TAX;
+ }
+/** 无备注 */
+public String getIM_TAX() {
+ return IM_TAX;
+ }
+
+
+/** 无备注 */
+public void setIM_MACHINENO(String IM_MACHINENO) {
+ this.IM_MACHINENO = IM_MACHINENO;
+ }
+/** 无备注 */
+public String getIM_MACHINENO() {
+ return IM_MACHINENO;
+ }
+
+
+/** 无备注 */
+public void setIM_MEMO(String IM_MEMO) {
+ this.IM_MEMO = IM_MEMO;
+ }
+/** 无备注 */
+public String getIM_MEMO() {
+ return IM_MEMO;
+ }
+
+
+/** 无备注 */
+public void setIM_ENCRYPTIONCODE(String IM_ENCRYPTIONCODE) {
+ this.IM_ENCRYPTIONCODE = IM_ENCRYPTIONCODE;
+ }
+/** 无备注 */
+public String getIM_ENCRYPTIONCODE() {
+ return IM_ENCRYPTIONCODE;
+ }
+
+
+/** 无备注 */
+public void setIM_TYPE(String IM_TYPE) {
+ this.IM_TYPE = IM_TYPE;
+ }
+/** 无备注 */
+public String getIM_TYPE() {
+ return IM_TYPE;
+ }
+
+
+/** 无备注 */
+public void setIM_TYPENAME(String IM_TYPENAME) {
+ this.IM_TYPENAME = IM_TYPENAME;
+ }
+/** 无备注 */
+public String getIM_TYPENAME() {
+ return IM_TYPENAME;
+ }
+
+
+/** 无备注 */
+public void setIM_XMMC(String IM_XMMC) {
+ this.IM_XMMC = IM_XMMC;
+ }
+/** 无备注 */
+public String getIM_XMMC() {
+ return IM_XMMC;
+ }
+
+
+/** 无备注 */
+public void setIM_KEY(String IM_KEY) {
+ this.IM_KEY = IM_KEY;
+ }
+/** 无备注 */
+public String getIM_KEY() {
+ return IM_KEY;
+ }
+
+
+/** 无备注 */
+public void setIM_AREACODE(String IM_AREACODE) {
+ this.IM_AREACODE = IM_AREACODE;
+ }
+/** 无备注 */
+public String getIM_AREACODE() {
+ return IM_AREACODE;
+ }
+
+
+/** 无备注 */
+public void setIM_AREANAME(String IM_AREANAME) {
+ this.IM_AREANAME = IM_AREANAME;
+ }
+/** 无备注 */
+public String getIM_AREANAME() {
+ return IM_AREANAME;
+ }
+
+
+/** 无备注 */
+public void setIM_PRINTEDFPDM(String IM_PRINTEDFPDM) {
+ this.IM_PRINTEDFPDM = IM_PRINTEDFPDM;
+ }
+/** 无备注 */
+public String getIM_PRINTEDFPDM() {
+ return IM_PRINTEDFPDM;
+ }
+
+
+/** 无备注 */
+public void setIM_PRINTEDFPHM(String IM_PRINTEDFPHM) {
+ this.IM_PRINTEDFPHM = IM_PRINTEDFPHM;
+ }
+/** 无备注 */
+public String getIM_PRINTEDFPHM() {
+ return IM_PRINTEDFPHM;
+ }
+
+
+/** 无备注 */
+public void setIM_COUNT(Integer IM_COUNT) {
+ this.IM_COUNT = IM_COUNT;
+ }
+/** 无备注 */
+public Integer getIM_COUNT() {
+ return IM_COUNT;
+ }
+
+
+/** 无备注 */
+public void setIM_AGENCY(Integer IM_AGENCY) {
+ this.IM_AGENCY = IM_AGENCY;
+ }
+/** 无备注 */
+public Integer getIM_AGENCY() {
+ return IM_AGENCY;
+ }
+
+
+/** 无备注 */
+public void setIM_BLOCKCHAIN(Integer IM_BLOCKCHAIN) {
+ this.IM_BLOCKCHAIN = IM_BLOCKCHAIN;
+ }
+/** 无备注 */
+public Integer getIM_BLOCKCHAIN() {
+ return IM_BLOCKCHAIN;
+ }
+
+
+/** 无备注 */
+public void setIM_COMPANYSEAL(Integer IM_COMPANYSEAL) {
+ this.IM_COMPANYSEAL = IM_COMPANYSEAL;
+ }
+/** 无备注 */
+public Integer getIM_COMPANYSEAL() {
+ return IM_COMPANYSEAL;
+ }
+
+
+/** 无备注 */
+public void setIM_COMPANYSEALDEPT(String IM_COMPANYSEALDEPT) {
+ this.IM_COMPANYSEALDEPT = IM_COMPANYSEALDEPT;
+ }
+/** 无备注 */
+public String getIM_COMPANYSEALDEPT() {
+ return IM_COMPANYSEALDEPT;
+ }
+
+
+/** 无备注 */
+public void setIM_COMPANYSEALNUM(String IM_COMPANYSEALNUM) {
+ this.IM_COMPANYSEALNUM = IM_COMPANYSEALNUM;
+ }
+/** 无备注 */
+public String getIM_COMPANYSEALNUM() {
+ return IM_COMPANYSEALNUM;
+ }
+
+
+/** 无备注 */
+public void setIM_SADDRESS(String IM_SADDRESS) {
+ this.IM_SADDRESS = IM_SADDRESS;
+ }
+/** 无备注 */
+public String getIM_SADDRESS() {
+ return IM_SADDRESS;
+ }
+
+
+/** 无备注 */
+public void setIM_STEL(String IM_STEL) {
+ this.IM_STEL = IM_STEL;
+ }
+/** 无备注 */
+public String getIM_STEL() {
+ return IM_STEL;
+ }
+
+
+/** 无备注 */
+public void setIM_SBANKNM(String IM_SBANKNM) {
+ this.IM_SBANKNM = IM_SBANKNM;
+ }
+/** 无备注 */
+public String getIM_SBANKNM() {
+ return IM_SBANKNM;
+ }
+
+
+/** 无备注 */
+public void setIM_SBANKNO(String IM_SBANKNO) {
+ this.IM_SBANKNO = IM_SBANKNO;
+ }
+/** 无备注 */
+public String getIM_SBANKNO() {
+ return IM_SBANKNO;
+ }
+
+
+/** 无备注 */
+public void setIM_BADDRESS(String IM_BADDRESS) {
+ this.IM_BADDRESS = IM_BADDRESS;
+ }
+/** 无备注 */
+public String getIM_BADDRESS() {
+ return IM_BADDRESS;
+ }
+
+
+/** 无备注 */
+public void setIM_BTEL(String IM_BTEL) {
+ this.IM_BTEL = IM_BTEL;
+ }
+/** 无备注 */
+public String getIM_BTEL() {
+ return IM_BTEL;
+ }
+
+
+/** 无备注 */
+public void setIM_BBANKNM(String IM_BBANKNM) {
+ this.IM_BBANKNM = IM_BBANKNM;
+ }
+/** 无备注 */
+public String getIM_BBANKNM() {
+ return IM_BBANKNM;
+ }
+
+
+/** 无备注 */
+public void setIM_BBANKNO(String IM_BBANKNO) {
+ this.IM_BBANKNO = IM_BBANKNO;
+ }
+/** 无备注 */
+public String getIM_BBANKNO() {
+ return IM_BBANKNO;
+ }
+
+
+/** 无备注 */
+public void setIM_DATETIME(String IM_DATETIME) {
+ this.IM_DATETIME = IM_DATETIME;
+ }
+/** 无备注 */
+public String getIM_DATETIME() {
+ return IM_DATETIME;
+ }
+
+
+/** 无备注 */
+public void setIM_EDATETIME(String IM_EDATETIME) {
+ this.IM_EDATETIME = IM_EDATETIME;
+ }
+/** 无备注 */
+public String getIM_EDATETIME() {
+ return IM_EDATETIME;
+ }
+
+
+/** 无备注 */
+public void setIM_TOTALAMOUNTOCR(BigDecimal IM_TOTALAMOUNTOCR) {
+ this.IM_TOTALAMOUNTOCR = IM_TOTALAMOUNTOCR;
+ }
+/** 无备注 */
+public BigDecimal getIM_TOTALAMOUNTOCR() {
+ return IM_TOTALAMOUNTOCR;
+ }
+
+
+/** 无备注 */
+public void setIM_PAGER_ELECTRONIC(Integer IM_PAGER_ELECTRONIC) {
+ this.IM_PAGER_ELECTRONIC = IM_PAGER_ELECTRONIC;
+ }
+/** 无备注 */
+public Integer getIM_PAGER_ELECTRONIC() {
+ return IM_PAGER_ELECTRONIC;
+ }
+
+
+/** 无备注 */
+public void setIM_ELECTRONIC_NUMBER(String IM_ELECTRONIC_NUMBER) {
+ this.IM_ELECTRONIC_NUMBER = IM_ELECTRONIC_NUMBER;
+ }
+/** 无备注 */
+public String getIM_ELECTRONIC_NUMBER() {
+ return IM_ELECTRONIC_NUMBER;
+ }
+
+
+ }
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicemainEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicemainEntity.xml
new file mode 100644
index 00000000..398e3843
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivInvoicemainEntity.xml
@@ -0,0 +1,427 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IM_ID,
+ IM_FPDM,
+ IM_FPHM,
+ IM_DATE,
+ IM_CHECKCODE,
+ IM_SALERTAXNO,
+ IM_SALERNAME,
+ IM_SALERADDRESS,
+ IM_SALERBANKNO,
+ IM_SALERBANKNM,
+ IM_BUYERTAXNO,
+ IM_BUYERNAME,
+ IM_BUYERADDRESS,
+ IM_BUYERBANKNO,
+ IM_BUYERBANKNM,
+ IM_MAKERNM,
+ IM_PAYEE,
+ IM_AUDITOR,
+ IM_NOTAXAMOUNT,
+ IM_TAXAMOUNT,
+ IM_TOTALAMOUNT,
+ IM_TAX,
+ IM_MACHINENO,
+ IM_MEMO,
+ IM_ENCRYPTIONCODE,
+ IM_TYPE,
+ IM_TYPENAME,
+ IM_XMMC,
+ IM_KEY,
+ IM_AREACODE,
+ IM_AREANAME,
+ IM_PRINTEDFPDM,
+ IM_PRINTEDFPHM,
+ IM_COUNT,
+ IM_AGENCY,
+ IM_BLOCKCHAIN,
+ IM_COMPANYSEAL,
+ IM_COMPANYSEALDEPT,
+ IM_COMPANYSEALNUM,
+ IM_SADDRESS,
+ IM_STEL,
+ IM_SBANKNM,
+ IM_SBANKNO,
+ IM_BADDRESS,
+ IM_BTEL,
+ IM_BBANKNM,
+ IM_BBANKNO,
+ IM_DATETIME,
+ IM_EDATETIME,
+ IM_TOTALAMOUNTOCR,
+ IM_PAGER_ELECTRONIC,
+ IM_ELECTRONIC_NUMBER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketEntity.java
new file mode 100644
index 00000000..aba49e43
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketEntity.java
@@ -0,0 +1,575 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.entity;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.math.BigDecimal;
+import com.hzya.frame.web.entity.BaseEntity;
+/**
+ * @description: 迈锐思-飞机行程单
+ * @tableName: LEXMISCIV_PLANETICKET
+ * @entityName: LexmiscivPlaneticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public class LexmiscivPlaneticketEntity extends BaseEntity {
+ public LexmiscivPlaneticketEntity(String PT_ID,String dataSourceCode) {
+ this.PT_ID = PT_ID;
+ this.setDataSourceCode(dataSourceCode);
+ }
+
+ /** 无备注 */
+private String PT_ID;
+/** 无备注 */
+private String PT_ETICKETNO;
+/** 无备注 */
+private String PT_NO;
+/** 无备注 */
+private String PT_FSTATION;
+/** 无备注 */
+private String PT_TSTATION;
+/** 无备注 */
+private String PT_TSTATION1;
+/** 无备注 */
+private String PT_TSTATION2;
+/** 无备注 */
+private String PT_TSTATION3;
+/** 无备注 */
+private BigDecimal PT_PRICE;
+/** 无备注 */
+private String PT_FUNDSAMOUNT;
+/** 无备注 */
+private String PT_FUELAMOUNT;
+/** 无备注 */
+private String PT_TAXAMOUNT;
+/** 无备注 */
+private BigDecimal PT_AMOUNT;
+/** 无备注 */
+private String PT_TAXRATE;
+/** 无备注 */
+private BigDecimal PT_TAXRATEAMOUNT;
+/** 无备注 */
+private BigDecimal PT_NOTAXAMOUNT;
+@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+private Date PT_DATE;
+/** 无备注 */
+private String PT_TIME;
+/** 无备注 */
+private String PT_SERIALNO;
+/** 无备注 */
+private String PT_IDNO;
+/** 无备注 */
+private String PT_CUSTOMER;
+/** 无备注 */
+private String PT_CARRIER;
+/** 无备注 */
+private String PT_CLASS;
+/** 无备注 */
+private String PT_VALIDDATE;
+/** 无备注 */
+private String PT_INVALIDDATE;
+/** 无备注 */
+private String PT_ALLOW;
+/** 无备注 */
+private String PT_VALIDCODE;
+/** 无备注 */
+private String PT_INSURANCE;
+/** 无备注 */
+private String PT_SALERCODE;
+/** 无备注 */
+private String PT_SALERNAME;
+/** 无备注 */
+private Date PT_MAKEDATE;
+/** 无备注 */
+private String PT_KEY;
+/** 无备注 */
+private Integer PT_COUNT;
+/** 无备注 */
+private String PT_DATETIME;
+/** 无备注 */
+private String PT_EDATETIME;
+/** 无备注 */
+private String PT_INTERNATIONALFLAG;
+/** 无备注 */
+private String PT_MARKDESC;
+/** 无备注 */
+private String PT_GPNUMBER;
+/** 无备注 */
+private String PT_ISSUINGSTATE;
+/** 无备注 */
+private String PT_FPHM;
+/** 无备注 */
+private String PT_PROMPTINFO;
+/** 无备注 */
+private String PT_BUYERNAME;
+/** 无备注 */
+private String PT_BUYERTAXNO;
+/** 无备注 */
+private String PT_ORIGINALNUMBER;
+/** 无备注 */
+private String PT_RUSHREDREASON;
+/** 无备注 */
+private String PT_ELECTRONICMARK;
+
+
+/** 无备注 */
+public void setPT_ID(String PT_ID) {
+ this.PT_ID = PT_ID;
+ }
+/** 无备注 */
+public String getPT_ID() {
+ return PT_ID;
+ }
+
+
+/** 无备注 */
+public void setPT_ETICKETNO(String PT_ETICKETNO) {
+ this.PT_ETICKETNO = PT_ETICKETNO;
+ }
+/** 无备注 */
+public String getPT_ETICKETNO() {
+ return PT_ETICKETNO;
+ }
+
+
+/** 无备注 */
+public void setPT_NO(String PT_NO) {
+ this.PT_NO = PT_NO;
+ }
+/** 无备注 */
+public String getPT_NO() {
+ return PT_NO;
+ }
+
+
+/** 无备注 */
+public void setPT_FSTATION(String PT_FSTATION) {
+ this.PT_FSTATION = PT_FSTATION;
+ }
+/** 无备注 */
+public String getPT_FSTATION() {
+ return PT_FSTATION;
+ }
+
+
+/** 无备注 */
+public void setPT_TSTATION(String PT_TSTATION) {
+ this.PT_TSTATION = PT_TSTATION;
+ }
+/** 无备注 */
+public String getPT_TSTATION() {
+ return PT_TSTATION;
+ }
+
+
+/** 无备注 */
+public void setPT_TSTATION1(String PT_TSTATION1) {
+ this.PT_TSTATION1 = PT_TSTATION1;
+ }
+/** 无备注 */
+public String getPT_TSTATION1() {
+ return PT_TSTATION1;
+ }
+
+
+/** 无备注 */
+public void setPT_TSTATION2(String PT_TSTATION2) {
+ this.PT_TSTATION2 = PT_TSTATION2;
+ }
+/** 无备注 */
+public String getPT_TSTATION2() {
+ return PT_TSTATION2;
+ }
+
+
+/** 无备注 */
+public void setPT_TSTATION3(String PT_TSTATION3) {
+ this.PT_TSTATION3 = PT_TSTATION3;
+ }
+/** 无备注 */
+public String getPT_TSTATION3() {
+ return PT_TSTATION3;
+ }
+
+
+/** 无备注 */
+public void setPT_PRICE(BigDecimal PT_PRICE) {
+ this.PT_PRICE = PT_PRICE;
+ }
+/** 无备注 */
+public BigDecimal getPT_PRICE() {
+ return PT_PRICE;
+ }
+
+
+/** 无备注 */
+public void setPT_FUNDSAMOUNT(String PT_FUNDSAMOUNT) {
+ this.PT_FUNDSAMOUNT = PT_FUNDSAMOUNT;
+ }
+/** 无备注 */
+public String getPT_FUNDSAMOUNT() {
+ return PT_FUNDSAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setPT_FUELAMOUNT(String PT_FUELAMOUNT) {
+ this.PT_FUELAMOUNT = PT_FUELAMOUNT;
+ }
+/** 无备注 */
+public String getPT_FUELAMOUNT() {
+ return PT_FUELAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setPT_TAXAMOUNT(String PT_TAXAMOUNT) {
+ this.PT_TAXAMOUNT = PT_TAXAMOUNT;
+ }
+/** 无备注 */
+public String getPT_TAXAMOUNT() {
+ return PT_TAXAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setPT_AMOUNT(BigDecimal PT_AMOUNT) {
+ this.PT_AMOUNT = PT_AMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getPT_AMOUNT() {
+ return PT_AMOUNT;
+ }
+
+
+/** 无备注 */
+public void setPT_TAXRATE(String PT_TAXRATE) {
+ this.PT_TAXRATE = PT_TAXRATE;
+ }
+/** 无备注 */
+public String getPT_TAXRATE() {
+ return PT_TAXRATE;
+ }
+
+
+/** 无备注 */
+public void setPT_TAXRATEAMOUNT(BigDecimal PT_TAXRATEAMOUNT) {
+ this.PT_TAXRATEAMOUNT = PT_TAXRATEAMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getPT_TAXRATEAMOUNT() {
+ return PT_TAXRATEAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setPT_NOTAXAMOUNT(BigDecimal PT_NOTAXAMOUNT) {
+ this.PT_NOTAXAMOUNT = PT_NOTAXAMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getPT_NOTAXAMOUNT() {
+ return PT_NOTAXAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setPT_DATE(Date PT_DATE) {
+ this.PT_DATE = PT_DATE;
+ }
+/** 无备注 */
+public Date getPT_DATE() {
+ return PT_DATE;
+ }
+
+
+/** 无备注 */
+public void setPT_TIME(String PT_TIME) {
+ this.PT_TIME = PT_TIME;
+ }
+/** 无备注 */
+public String getPT_TIME() {
+ return PT_TIME;
+ }
+
+
+/** 无备注 */
+public void setPT_SERIALNO(String PT_SERIALNO) {
+ this.PT_SERIALNO = PT_SERIALNO;
+ }
+/** 无备注 */
+public String getPT_SERIALNO() {
+ return PT_SERIALNO;
+ }
+
+
+/** 无备注 */
+public void setPT_IDNO(String PT_IDNO) {
+ this.PT_IDNO = PT_IDNO;
+ }
+/** 无备注 */
+public String getPT_IDNO() {
+ return PT_IDNO;
+ }
+
+
+/** 无备注 */
+public void setPT_CUSTOMER(String PT_CUSTOMER) {
+ this.PT_CUSTOMER = PT_CUSTOMER;
+ }
+/** 无备注 */
+public String getPT_CUSTOMER() {
+ return PT_CUSTOMER;
+ }
+
+
+/** 无备注 */
+public void setPT_CARRIER(String PT_CARRIER) {
+ this.PT_CARRIER = PT_CARRIER;
+ }
+/** 无备注 */
+public String getPT_CARRIER() {
+ return PT_CARRIER;
+ }
+
+
+/** 无备注 */
+public void setPT_CLASS(String PT_CLASS) {
+ this.PT_CLASS = PT_CLASS;
+ }
+/** 无备注 */
+public String getPT_CLASS() {
+ return PT_CLASS;
+ }
+
+
+/** 无备注 */
+public void setPT_VALIDDATE(String PT_VALIDDATE) {
+ this.PT_VALIDDATE = PT_VALIDDATE;
+ }
+/** 无备注 */
+public String getPT_VALIDDATE() {
+ return PT_VALIDDATE;
+ }
+
+
+/** 无备注 */
+public void setPT_INVALIDDATE(String PT_INVALIDDATE) {
+ this.PT_INVALIDDATE = PT_INVALIDDATE;
+ }
+/** 无备注 */
+public String getPT_INVALIDDATE() {
+ return PT_INVALIDDATE;
+ }
+
+
+/** 无备注 */
+public void setPT_ALLOW(String PT_ALLOW) {
+ this.PT_ALLOW = PT_ALLOW;
+ }
+/** 无备注 */
+public String getPT_ALLOW() {
+ return PT_ALLOW;
+ }
+
+
+/** 无备注 */
+public void setPT_VALIDCODE(String PT_VALIDCODE) {
+ this.PT_VALIDCODE = PT_VALIDCODE;
+ }
+/** 无备注 */
+public String getPT_VALIDCODE() {
+ return PT_VALIDCODE;
+ }
+
+
+/** 无备注 */
+public void setPT_INSURANCE(String PT_INSURANCE) {
+ this.PT_INSURANCE = PT_INSURANCE;
+ }
+/** 无备注 */
+public String getPT_INSURANCE() {
+ return PT_INSURANCE;
+ }
+
+
+/** 无备注 */
+public void setPT_SALERCODE(String PT_SALERCODE) {
+ this.PT_SALERCODE = PT_SALERCODE;
+ }
+/** 无备注 */
+public String getPT_SALERCODE() {
+ return PT_SALERCODE;
+ }
+
+
+/** 无备注 */
+public void setPT_SALERNAME(String PT_SALERNAME) {
+ this.PT_SALERNAME = PT_SALERNAME;
+ }
+/** 无备注 */
+public String getPT_SALERNAME() {
+ return PT_SALERNAME;
+ }
+
+
+/** 无备注 */
+public void setPT_MAKEDATE(Date PT_MAKEDATE) {
+ this.PT_MAKEDATE = PT_MAKEDATE;
+ }
+/** 无备注 */
+public Date getPT_MAKEDATE() {
+ return PT_MAKEDATE;
+ }
+
+
+/** 无备注 */
+public void setPT_KEY(String PT_KEY) {
+ this.PT_KEY = PT_KEY;
+ }
+/** 无备注 */
+public String getPT_KEY() {
+ return PT_KEY;
+ }
+
+
+/** 无备注 */
+public void setPT_COUNT(Integer PT_COUNT) {
+ this.PT_COUNT = PT_COUNT;
+ }
+/** 无备注 */
+public Integer getPT_COUNT() {
+ return PT_COUNT;
+ }
+
+
+/** 无备注 */
+public void setPT_DATETIME(String PT_DATETIME) {
+ this.PT_DATETIME = PT_DATETIME;
+ }
+/** 无备注 */
+public String getPT_DATETIME() {
+ return PT_DATETIME;
+ }
+
+
+/** 无备注 */
+public void setPT_EDATETIME(String PT_EDATETIME) {
+ this.PT_EDATETIME = PT_EDATETIME;
+ }
+/** 无备注 */
+public String getPT_EDATETIME() {
+ return PT_EDATETIME;
+ }
+
+
+/** 无备注 */
+public void setPT_INTERNATIONALFLAG(String PT_INTERNATIONALFLAG) {
+ this.PT_INTERNATIONALFLAG = PT_INTERNATIONALFLAG;
+ }
+/** 无备注 */
+public String getPT_INTERNATIONALFLAG() {
+ return PT_INTERNATIONALFLAG;
+ }
+
+
+/** 无备注 */
+public void setPT_MARKDESC(String PT_MARKDESC) {
+ this.PT_MARKDESC = PT_MARKDESC;
+ }
+/** 无备注 */
+public String getPT_MARKDESC() {
+ return PT_MARKDESC;
+ }
+
+
+/** 无备注 */
+public void setPT_GPNUMBER(String PT_GPNUMBER) {
+ this.PT_GPNUMBER = PT_GPNUMBER;
+ }
+/** 无备注 */
+public String getPT_GPNUMBER() {
+ return PT_GPNUMBER;
+ }
+
+
+/** 无备注 */
+public void setPT_ISSUINGSTATE(String PT_ISSUINGSTATE) {
+ this.PT_ISSUINGSTATE = PT_ISSUINGSTATE;
+ }
+/** 无备注 */
+public String getPT_ISSUINGSTATE() {
+ return PT_ISSUINGSTATE;
+ }
+
+
+/** 无备注 */
+public void setPT_FPHM(String PT_FPHM) {
+ this.PT_FPHM = PT_FPHM;
+ }
+/** 无备注 */
+public String getPT_FPHM() {
+ return PT_FPHM;
+ }
+
+
+/** 无备注 */
+public void setPT_PROMPTINFO(String PT_PROMPTINFO) {
+ this.PT_PROMPTINFO = PT_PROMPTINFO;
+ }
+/** 无备注 */
+public String getPT_PROMPTINFO() {
+ return PT_PROMPTINFO;
+ }
+
+
+/** 无备注 */
+public void setPT_BUYERNAME(String PT_BUYERNAME) {
+ this.PT_BUYERNAME = PT_BUYERNAME;
+ }
+/** 无备注 */
+public String getPT_BUYERNAME() {
+ return PT_BUYERNAME;
+ }
+
+
+/** 无备注 */
+public void setPT_BUYERTAXNO(String PT_BUYERTAXNO) {
+ this.PT_BUYERTAXNO = PT_BUYERTAXNO;
+ }
+/** 无备注 */
+public String getPT_BUYERTAXNO() {
+ return PT_BUYERTAXNO;
+ }
+
+
+/** 无备注 */
+public void setPT_ORIGINALNUMBER(String PT_ORIGINALNUMBER) {
+ this.PT_ORIGINALNUMBER = PT_ORIGINALNUMBER;
+ }
+/** 无备注 */
+public String getPT_ORIGINALNUMBER() {
+ return PT_ORIGINALNUMBER;
+ }
+
+
+/** 无备注 */
+public void setPT_RUSHREDREASON(String PT_RUSHREDREASON) {
+ this.PT_RUSHREDREASON = PT_RUSHREDREASON;
+ }
+/** 无备注 */
+public String getPT_RUSHREDREASON() {
+ return PT_RUSHREDREASON;
+ }
+
+
+/** 无备注 */
+public void setPT_ELECTRONICMARK(String PT_ELECTRONICMARK) {
+ this.PT_ELECTRONICMARK = PT_ELECTRONICMARK;
+ }
+/** 无备注 */
+public String getPT_ELECTRONICMARK() {
+ return PT_ELECTRONICMARK;
+ }
+
+
+ }
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketEntity.xml
new file mode 100644
index 00000000..17956bbf
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketEntity.xml
@@ -0,0 +1,385 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PT_ID,
+ PT_ETICKETNO,
+ PT_NO,
+ PT_FSTATION,
+ PT_TSTATION,
+ PT_TSTATION1,
+ PT_TSTATION2,
+ PT_TSTATION3,
+ PT_PRICE,
+ PT_FUNDSAMOUNT,
+ PT_FUELAMOUNT,
+ PT_TAXAMOUNT,
+ PT_AMOUNT,
+ PT_TAXRATE,
+ PT_TAXRATEAMOUNT,
+ PT_NOTAXAMOUNT,
+ PT_DATE,
+ PT_TIME,
+ PT_SERIALNO,
+ PT_IDNO,
+ PT_CUSTOMER,
+ PT_CARRIER,
+ PT_CLASS,
+ PT_VALIDDATE,
+ PT_INVALIDDATE,
+ PT_ALLOW,
+ PT_VALIDCODE,
+ PT_INSURANCE,
+ PT_SALERCODE,
+ PT_SALERNAME,
+ PT_MAKEDATE,
+ PT_KEY,
+ PT_COUNT,
+ PT_DATETIME,
+ PT_EDATETIME,
+ PT_INTERNATIONALFLAG,
+ PT_MARKDESC,
+ PT_GPNUMBER,
+ PT_ISSUINGSTATE,
+ PT_FPHM,
+ PT_PROMPTINFO,
+ PT_BUYERNAME,
+ PT_BUYERTAXNO,
+ PT_ORIGINALNUMBER,
+ PT_RUSHREDREASON,
+ PT_ELECTRONICMARK
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketsEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketsEntity.java
new file mode 100644
index 00000000..68a92a86
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketsEntity.java
@@ -0,0 +1,219 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.entity;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.math.BigDecimal;
+import com.hzya.frame.web.entity.BaseEntity;
+/**
+ * @description: 迈锐思-飞机行程单明细
+ * @tableName: LEXMISCIV_PLANETICKETS
+ * @entityName: LexmiscivPlaneticketsEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public class LexmiscivPlaneticketsEntity extends BaseEntity {
+ public LexmiscivPlaneticketsEntity() {
+
+ }
+
+ public LexmiscivPlaneticketsEntity(String PTS_MAINID, String dataSourceCode) {
+ this.PTS_MAINID = PTS_MAINID;
+ this.setDataSourceCode(dataSourceCode);
+ }
+
+ /** 无备注 */
+private String PTS_ID;
+/** 无备注 */
+private String PTS_MAINID;
+/** 无备注 */
+private Integer PTS_SORTNUM;
+@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+private Date PTS_DATE;
+/** 无备注 */
+private String PTS_TIME;
+/** 无备注 */
+private String PTS_CLASS;
+/** 无备注 */
+private String PTS_CARRIER;
+/** 无备注 */
+private String PTS_NO;
+/** 无备注 */
+private String PTS_FSTATION;
+/** 无备注 */
+private String PTS_TSTATION;
+/** 无备注 */
+private String PTS_CLASSNAME;
+/** 无备注 */
+private String PTS_FAREBASIS;
+/** 无备注 */
+private String PTS_ALLOW;
+/** 无备注 */
+private String PTS_DATETIME;
+/** 无备注 */
+private String PTS_NOTVALIDAFTER;
+/** 无备注 */
+private String PTS_NOTVALIDBEFORE;
+
+
+/** 无备注 */
+public void setPTS_ID(String PTS_ID) {
+ this.PTS_ID = PTS_ID;
+ }
+/** 无备注 */
+public String getPTS_ID() {
+ return PTS_ID;
+ }
+
+
+/** 无备注 */
+public void setPTS_MAINID(String PTS_MAINID) {
+ this.PTS_MAINID = PTS_MAINID;
+ }
+/** 无备注 */
+public String getPTS_MAINID() {
+ return PTS_MAINID;
+ }
+
+
+/** 无备注 */
+public void setPTS_SORTNUM(Integer PTS_SORTNUM) {
+ this.PTS_SORTNUM = PTS_SORTNUM;
+ }
+/** 无备注 */
+public Integer getPTS_SORTNUM() {
+ return PTS_SORTNUM;
+ }
+
+
+/** 无备注 */
+public void setPTS_DATE(Date PTS_DATE) {
+ this.PTS_DATE = PTS_DATE;
+ }
+/** 无备注 */
+public Date getPTS_DATE() {
+ return PTS_DATE;
+ }
+
+
+/** 无备注 */
+public void setPTS_TIME(String PTS_TIME) {
+ this.PTS_TIME = PTS_TIME;
+ }
+/** 无备注 */
+public String getPTS_TIME() {
+ return PTS_TIME;
+ }
+
+
+/** 无备注 */
+public void setPTS_CLASS(String PTS_CLASS) {
+ this.PTS_CLASS = PTS_CLASS;
+ }
+/** 无备注 */
+public String getPTS_CLASS() {
+ return PTS_CLASS;
+ }
+
+
+/** 无备注 */
+public void setPTS_CARRIER(String PTS_CARRIER) {
+ this.PTS_CARRIER = PTS_CARRIER;
+ }
+/** 无备注 */
+public String getPTS_CARRIER() {
+ return PTS_CARRIER;
+ }
+
+
+/** 无备注 */
+public void setPTS_NO(String PTS_NO) {
+ this.PTS_NO = PTS_NO;
+ }
+/** 无备注 */
+public String getPTS_NO() {
+ return PTS_NO;
+ }
+
+
+/** 无备注 */
+public void setPTS_FSTATION(String PTS_FSTATION) {
+ this.PTS_FSTATION = PTS_FSTATION;
+ }
+/** 无备注 */
+public String getPTS_FSTATION() {
+ return PTS_FSTATION;
+ }
+
+
+/** 无备注 */
+public void setPTS_TSTATION(String PTS_TSTATION) {
+ this.PTS_TSTATION = PTS_TSTATION;
+ }
+/** 无备注 */
+public String getPTS_TSTATION() {
+ return PTS_TSTATION;
+ }
+
+
+/** 无备注 */
+public void setPTS_CLASSNAME(String PTS_CLASSNAME) {
+ this.PTS_CLASSNAME = PTS_CLASSNAME;
+ }
+/** 无备注 */
+public String getPTS_CLASSNAME() {
+ return PTS_CLASSNAME;
+ }
+
+
+/** 无备注 */
+public void setPTS_FAREBASIS(String PTS_FAREBASIS) {
+ this.PTS_FAREBASIS = PTS_FAREBASIS;
+ }
+/** 无备注 */
+public String getPTS_FAREBASIS() {
+ return PTS_FAREBASIS;
+ }
+
+
+/** 无备注 */
+public void setPTS_ALLOW(String PTS_ALLOW) {
+ this.PTS_ALLOW = PTS_ALLOW;
+ }
+/** 无备注 */
+public String getPTS_ALLOW() {
+ return PTS_ALLOW;
+ }
+
+
+/** 无备注 */
+public void setPTS_DATETIME(String PTS_DATETIME) {
+ this.PTS_DATETIME = PTS_DATETIME;
+ }
+/** 无备注 */
+public String getPTS_DATETIME() {
+ return PTS_DATETIME;
+ }
+
+
+/** 无备注 */
+public void setPTS_NOTVALIDAFTER(String PTS_NOTVALIDAFTER) {
+ this.PTS_NOTVALIDAFTER = PTS_NOTVALIDAFTER;
+ }
+/** 无备注 */
+public String getPTS_NOTVALIDAFTER() {
+ return PTS_NOTVALIDAFTER;
+ }
+
+
+/** 无备注 */
+public void setPTS_NOTVALIDBEFORE(String PTS_NOTVALIDBEFORE) {
+ this.PTS_NOTVALIDBEFORE = PTS_NOTVALIDBEFORE;
+ }
+/** 无备注 */
+public String getPTS_NOTVALIDBEFORE() {
+ return PTS_NOTVALIDBEFORE;
+ }
+
+
+ }
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketsEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketsEntity.xml
new file mode 100644
index 00000000..f0e0bf3f
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivPlaneticketsEntity.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PTS_ID,
+ PTS_MAINID,
+ PTS_SORTNUM,
+ PTS_DATE,
+ PTS_TIME,
+ PTS_CLASS,
+ PTS_CARRIER,
+ PTS_NO,
+ PTS_FSTATION,
+ PTS_TSTATION,
+ PTS_CLASSNAME,
+ PTS_FAREBASIS,
+ PTS_ALLOW,
+ PTS_DATETIME,
+ PTS_NOTVALIDAFTER,
+ PTS_NOTVALIDBEFORE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivTrainticketEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivTrainticketEntity.java
new file mode 100644
index 00000000..d87bc3b5
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivTrainticketEntity.java
@@ -0,0 +1,388 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.entity;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.math.BigDecimal;
+import com.hzya.frame.web.entity.BaseEntity;
+/**
+ * @description: 迈锐思-火车票
+ * @tableName: LEXMISCIV_TRAINTICKET
+ * @entityName: LexmiscivTrainticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public class LexmiscivTrainticketEntity extends BaseEntity {
+ public LexmiscivTrainticketEntity() {
+
+ }
+
+ public LexmiscivTrainticketEntity(String TT_ID,String dataSourceCode) {
+ this.TT_ID = TT_ID;
+ this.setDataSourceCode(dataSourceCode);
+ }
+
+ /** 无备注 */
+private String TT_ID;
+/** 无备注 */
+private String TT_CODE;
+/** 无备注 */
+private String TT_NO;
+/** 无备注 */
+private String TT_FSTATION;
+/** 无备注 */
+private String TT_TSTATION;
+/** 无备注 */
+private BigDecimal TT_AMOUNT;
+/** 无备注 */
+private String TT_TAXRATE;
+/** 无备注 */
+private BigDecimal TT_TAXRATEAMOUNT;
+/** 无备注 */
+private BigDecimal TT_NOTAXAMOUNT;
+@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+private Date TT_DATE;
+/** 无备注 */
+private String TT_TIME;
+/** 无备注 */
+private String TT_SERIALNO;
+/** 无备注 */
+private String TT_IDNO;
+/** 无备注 */
+private String TT_CUSTOMER;
+/** 无备注 */
+private String TT_SALESTATION;
+/** 无备注 */
+private String TT_SALETYPE;
+/** 无备注 */
+private String TT_CARRIAGE;
+/** 无备注 */
+private String TT_SEAT;
+/** 无备注 */
+private String TT_CLASS;
+/** 无备注 */
+private String TT_TICKETCHECKING;
+/** 无备注 */
+private String TT_KEY;
+/** 无备注 */
+private Integer TT_COUNT;
+/** 无备注 */
+private String TT_DATETIME;
+/** 无备注 */
+private String TT_EDATETIME;
+@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+private Date TT_OUTDATE;
+/** 无备注 */
+private Integer TT_ELECTRONIC;
+/** 无备注 */
+private Integer TT_BUSINESSTYPE;
+/** 无备注 */
+private String TT_BUYERNAME;
+/** 无备注 */
+private String TT_BUYERTAXNO;
+/** 无备注 */
+private String TT_ORIGINALINVOICE;
+
+
+/** 无备注 */
+public void setTT_ID(String TT_ID) {
+ this.TT_ID = TT_ID;
+ }
+/** 无备注 */
+public String getTT_ID() {
+ return TT_ID;
+ }
+
+
+/** 无备注 */
+public void setTT_CODE(String TT_CODE) {
+ this.TT_CODE = TT_CODE;
+ }
+/** 无备注 */
+public String getTT_CODE() {
+ return TT_CODE;
+ }
+
+
+/** 无备注 */
+public void setTT_NO(String TT_NO) {
+ this.TT_NO = TT_NO;
+ }
+/** 无备注 */
+public String getTT_NO() {
+ return TT_NO;
+ }
+
+
+/** 无备注 */
+public void setTT_FSTATION(String TT_FSTATION) {
+ this.TT_FSTATION = TT_FSTATION;
+ }
+/** 无备注 */
+public String getTT_FSTATION() {
+ return TT_FSTATION;
+ }
+
+
+/** 无备注 */
+public void setTT_TSTATION(String TT_TSTATION) {
+ this.TT_TSTATION = TT_TSTATION;
+ }
+/** 无备注 */
+public String getTT_TSTATION() {
+ return TT_TSTATION;
+ }
+
+
+/** 无备注 */
+public void setTT_AMOUNT(BigDecimal TT_AMOUNT) {
+ this.TT_AMOUNT = TT_AMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getTT_AMOUNT() {
+ return TT_AMOUNT;
+ }
+
+
+/** 无备注 */
+public void setTT_TAXRATE(String TT_TAXRATE) {
+ this.TT_TAXRATE = TT_TAXRATE;
+ }
+/** 无备注 */
+public String getTT_TAXRATE() {
+ return TT_TAXRATE;
+ }
+
+
+/** 无备注 */
+public void setTT_TAXRATEAMOUNT(BigDecimal TT_TAXRATEAMOUNT) {
+ this.TT_TAXRATEAMOUNT = TT_TAXRATEAMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getTT_TAXRATEAMOUNT() {
+ return TT_TAXRATEAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setTT_NOTAXAMOUNT(BigDecimal TT_NOTAXAMOUNT) {
+ this.TT_NOTAXAMOUNT = TT_NOTAXAMOUNT;
+ }
+/** 无备注 */
+public BigDecimal getTT_NOTAXAMOUNT() {
+ return TT_NOTAXAMOUNT;
+ }
+
+
+/** 无备注 */
+public void setTT_DATE(Date TT_DATE) {
+ this.TT_DATE = TT_DATE;
+ }
+/** 无备注 */
+public Date getTT_DATE() {
+ return TT_DATE;
+ }
+
+
+/** 无备注 */
+public void setTT_TIME(String TT_TIME) {
+ this.TT_TIME = TT_TIME;
+ }
+/** 无备注 */
+public String getTT_TIME() {
+ return TT_TIME;
+ }
+
+
+/** 无备注 */
+public void setTT_SERIALNO(String TT_SERIALNO) {
+ this.TT_SERIALNO = TT_SERIALNO;
+ }
+/** 无备注 */
+public String getTT_SERIALNO() {
+ return TT_SERIALNO;
+ }
+
+
+/** 无备注 */
+public void setTT_IDNO(String TT_IDNO) {
+ this.TT_IDNO = TT_IDNO;
+ }
+/** 无备注 */
+public String getTT_IDNO() {
+ return TT_IDNO;
+ }
+
+
+/** 无备注 */
+public void setTT_CUSTOMER(String TT_CUSTOMER) {
+ this.TT_CUSTOMER = TT_CUSTOMER;
+ }
+/** 无备注 */
+public String getTT_CUSTOMER() {
+ return TT_CUSTOMER;
+ }
+
+
+/** 无备注 */
+public void setTT_SALESTATION(String TT_SALESTATION) {
+ this.TT_SALESTATION = TT_SALESTATION;
+ }
+/** 无备注 */
+public String getTT_SALESTATION() {
+ return TT_SALESTATION;
+ }
+
+
+/** 无备注 */
+public void setTT_SALETYPE(String TT_SALETYPE) {
+ this.TT_SALETYPE = TT_SALETYPE;
+ }
+/** 无备注 */
+public String getTT_SALETYPE() {
+ return TT_SALETYPE;
+ }
+
+
+/** 无备注 */
+public void setTT_CARRIAGE(String TT_CARRIAGE) {
+ this.TT_CARRIAGE = TT_CARRIAGE;
+ }
+/** 无备注 */
+public String getTT_CARRIAGE() {
+ return TT_CARRIAGE;
+ }
+
+
+/** 无备注 */
+public void setTT_SEAT(String TT_SEAT) {
+ this.TT_SEAT = TT_SEAT;
+ }
+/** 无备注 */
+public String getTT_SEAT() {
+ return TT_SEAT;
+ }
+
+
+/** 无备注 */
+public void setTT_CLASS(String TT_CLASS) {
+ this.TT_CLASS = TT_CLASS;
+ }
+/** 无备注 */
+public String getTT_CLASS() {
+ return TT_CLASS;
+ }
+
+
+/** 无备注 */
+public void setTT_TICKETCHECKING(String TT_TICKETCHECKING) {
+ this.TT_TICKETCHECKING = TT_TICKETCHECKING;
+ }
+/** 无备注 */
+public String getTT_TICKETCHECKING() {
+ return TT_TICKETCHECKING;
+ }
+
+
+/** 无备注 */
+public void setTT_KEY(String TT_KEY) {
+ this.TT_KEY = TT_KEY;
+ }
+/** 无备注 */
+public String getTT_KEY() {
+ return TT_KEY;
+ }
+
+
+/** 无备注 */
+public void setTT_COUNT(Integer TT_COUNT) {
+ this.TT_COUNT = TT_COUNT;
+ }
+/** 无备注 */
+public Integer getTT_COUNT() {
+ return TT_COUNT;
+ }
+
+
+/** 无备注 */
+public void setTT_DATETIME(String TT_DATETIME) {
+ this.TT_DATETIME = TT_DATETIME;
+ }
+/** 无备注 */
+public String getTT_DATETIME() {
+ return TT_DATETIME;
+ }
+
+
+/** 无备注 */
+public void setTT_EDATETIME(String TT_EDATETIME) {
+ this.TT_EDATETIME = TT_EDATETIME;
+ }
+/** 无备注 */
+public String getTT_EDATETIME() {
+ return TT_EDATETIME;
+ }
+
+
+/** 无备注 */
+public void setTT_OUTDATE(Date TT_OUTDATE) {
+ this.TT_OUTDATE = TT_OUTDATE;
+ }
+/** 无备注 */
+public Date getTT_OUTDATE() {
+ return TT_OUTDATE;
+ }
+
+
+/** 无备注 */
+public void setTT_ELECTRONIC(Integer TT_ELECTRONIC) {
+ this.TT_ELECTRONIC = TT_ELECTRONIC;
+ }
+/** 无备注 */
+public Integer getTT_ELECTRONIC() {
+ return TT_ELECTRONIC;
+ }
+
+
+/** 无备注 */
+public void setTT_BUSINESSTYPE(Integer TT_BUSINESSTYPE) {
+ this.TT_BUSINESSTYPE = TT_BUSINESSTYPE;
+ }
+/** 无备注 */
+public Integer getTT_BUSINESSTYPE() {
+ return TT_BUSINESSTYPE;
+ }
+
+
+/** 无备注 */
+public void setTT_BUYERNAME(String TT_BUYERNAME) {
+ this.TT_BUYERNAME = TT_BUYERNAME;
+ }
+/** 无备注 */
+public String getTT_BUYERNAME() {
+ return TT_BUYERNAME;
+ }
+
+
+/** 无备注 */
+public void setTT_BUYERTAXNO(String TT_BUYERTAXNO) {
+ this.TT_BUYERTAXNO = TT_BUYERTAXNO;
+ }
+/** 无备注 */
+public String getTT_BUYERTAXNO() {
+ return TT_BUYERTAXNO;
+ }
+
+
+/** 无备注 */
+public void setTT_ORIGINALINVOICE(String TT_ORIGINALINVOICE) {
+ this.TT_ORIGINALINVOICE = TT_ORIGINALINVOICE;
+ }
+/** 无备注 */
+public String getTT_ORIGINALINVOICE() {
+ return TT_ORIGINALINVOICE;
+ }
+
+
+ }
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivTrainticketEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivTrainticketEntity.xml
new file mode 100644
index 00000000..105b4b75
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/entity/LexmiscivTrainticketEntity.xml
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TT_ID,
+ TT_CODE,
+ TT_NO,
+ TT_FSTATION,
+ TT_TSTATION,
+ TT_AMOUNT,
+ TT_TAXRATE,
+ TT_TAXRATEAMOUNT,
+ TT_NOTAXAMOUNT,
+ TT_DATE,
+ TT_TIME,
+ TT_SERIALNO,
+ TT_IDNO,
+ TT_CUSTOMER,
+ TT_SALESTATION,
+ TT_SALETYPE,
+ TT_CARRIAGE,
+ TT_SEAT,
+ TT_CLASS,
+ TT_TICKETCHECKING,
+ TT_KEY,
+ TT_COUNT,
+ TT_DATETIME,
+ TT_EDATETIME,
+ TT_OUTDATE,
+ TT_ELECTRONIC,
+ TT_BUSINESSTYPE,
+ TT_BUYERNAME,
+ TT_BUYERTAXNO,
+ TT_ORIGINALINVOICE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmisPublicinfoService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmisPublicinfoService.java
new file mode 100644
index 00000000..21eb3c4e
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmisPublicinfoService.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmisPublicinfoEntity;
+/**
+ * @description: 迈锐思-公共信息表 service
+ * @tableName: LEXMISCIV_PUBLICINFO
+ * @entityName: LexmisPublicinfoEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmisPublicinfoService extends IBaseService {
+
+}
\ No newline at end of file
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivInvoicedetailService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivInvoicedetailService.java
new file mode 100644
index 00000000..79b54882
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivInvoicedetailService.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicedetailEntity;
+/**
+ * @description: 迈锐思-增值税发票子表 service
+ * @tableName: LEXMISCIV_INVOICEDETAIL
+ * @entityName: LexmiscivInvoicedetailEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivInvoicedetailService extends IBaseService {
+
+}
\ No newline at end of file
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivInvoicemainService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivInvoicemainService.java
new file mode 100644
index 00000000..6f9b4abe
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivInvoicemainService.java
@@ -0,0 +1,19 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicemainEntity;
+/**
+ * @description: 迈锐思-增值税发票主表 service
+ * @tableName: LEXMISCIV_INVOICEMAIN
+ * @entityName: LexmiscivInvoicemainEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivInvoicemainService extends IBaseService {
+
+ /**
+ * 根据主键查查增值税发票主表信息
+ * @param entity
+ * @return
+ */
+ LexmiscivInvoicemainEntity getByImId(LexmiscivInvoicemainEntity entity);
+}
\ No newline at end of file
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivPlaneticketService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivPlaneticketService.java
new file mode 100644
index 00000000..e6d3b0ee
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivPlaneticketService.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketEntity;
+/**
+ * @description: 迈锐思-飞机行程单 service
+ * @tableName: LEXMISCIV_PLANETICKET
+ * @entityName: LexmiscivPlaneticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivPlaneticketService extends IBaseService {
+
+}
\ No newline at end of file
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivPlaneticketsService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivPlaneticketsService.java
new file mode 100644
index 00000000..011c8e9e
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivPlaneticketsService.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketsEntity;
+/**
+ * @description: 迈锐思-飞机行程单明细 service
+ * @tableName: LEXMISCIV_PLANETICKETS
+ * @entityName: LexmiscivPlaneticketsEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivPlaneticketsService extends IBaseService {
+
+}
\ No newline at end of file
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivTrainticketService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivTrainticketService.java
new file mode 100644
index 00000000..2b88b128
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/ILexmiscivTrainticketService.java
@@ -0,0 +1,13 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivTrainticketEntity;
+/**
+ * @description: 迈锐思-火车票 service
+ * @tableName: LEXMISCIV_TRAINTICKET
+ * @entityName: LexmiscivTrainticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+public interface ILexmiscivTrainticketService extends IBaseService {
+
+}
\ No newline at end of file
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmisPublicinfoServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmisPublicinfoServiceImpl.java
new file mode 100644
index 00000000..76ff2d22
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmisPublicinfoServiceImpl.java
@@ -0,0 +1,26 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service.impl;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmisPublicinfoDao;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmisPublicinfoEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.service.ILexmisPublicinfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.hzya.frame.basedao.service.impl.BaseService;
+/**
+ * @description: 迈锐思-公共信息表 service
+ * @tableName: LEXMISCIV_PUBLICINFO
+ * @entityName: LexmisPublicinfoEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+@Service(value="LEXMISCIV_PUBLICINFOService")
+public class LexmisPublicinfoServiceImpl extends BaseService implements ILexmisPublicinfoService {
+
+ protected ILexmisPublicinfoDao lexmispublicinfoDao;
+
+ @Autowired
+ public void setLexmisPublicinfoDao(ILexmisPublicinfoDao dao) {
+ this.lexmispublicinfoDao = dao;
+ this.dao=dao;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivInvoicedetailServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivInvoicedetailServiceImpl.java
new file mode 100644
index 00000000..469eb285
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivInvoicedetailServiceImpl.java
@@ -0,0 +1,25 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service.impl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicedetailEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.service.ILexmiscivInvoicedetailService;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivInvoicedetailDao;
+import com.hzya.frame.basedao.service.impl.BaseService;
+/**
+ * @description: 迈锐思-增值税发票子表 service
+ * @tableName: LEXMISCIV_INVOICEDETAIL
+ * @entityName: LexmiscivInvoicedetailEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+@Service(value="LEXMISCIV_INVOICEDETAILService")
+public class LexmiscivInvoicedetailServiceImpl extends BaseService< LexmiscivInvoicedetailEntity,String> implements ILexmiscivInvoicedetailService{
+
+ protected ILexmiscivInvoicedetailDao lexmiscivinvoicedetailDao;
+
+ @Autowired
+ public void setLexmiscivInvoicedetailDao(ILexmiscivInvoicedetailDao dao) {
+ this.lexmiscivinvoicedetailDao = dao;
+ this.dao=dao;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivInvoicemainServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivInvoicemainServiceImpl.java
new file mode 100644
index 00000000..9b2507f0
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivInvoicemainServiceImpl.java
@@ -0,0 +1,39 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service.impl;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivInvoicemainEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.service.ILexmiscivInvoicemainService;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivInvoicemainDao;
+import com.hzya.frame.basedao.service.impl.BaseService;
+/**
+ * @description: 迈锐思-增值税发票主表 service
+ * @tableName: LEXMISCIV_INVOICEMAIN
+ * @entityName: LexmiscivInvoicemainEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+@Service(value="LEXMISCIV_INVOICEMAINService")
+public class LexmiscivInvoicemainServiceImpl extends BaseService< LexmiscivInvoicemainEntity,String> implements ILexmiscivInvoicemainService{
+
+ protected ILexmiscivInvoicemainDao lexmiscivinvoicemainDao;
+
+ @Autowired
+ public void setLexmiscivInvoicemainDao(ILexmiscivInvoicemainDao dao) {
+ this.lexmiscivinvoicemainDao = dao;
+ this.dao=dao;
+ }
+
+ /**
+ * 根据主键查查增值税发票主表信息
+ *
+ * @param entity
+ * @return
+ */
+ @DS("#entity.dataSourceCode")
+ @Override
+ public LexmiscivInvoicemainEntity getByImId(LexmiscivInvoicemainEntity entity) {
+ LexmiscivInvoicemainEntity lexmiscivInvoicemainEntity = lexmiscivinvoicemainDao.queryOne(entity);
+ return lexmiscivInvoicemainEntity;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivPlaneticketServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivPlaneticketServiceImpl.java
new file mode 100644
index 00000000..a1e7fb1a
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivPlaneticketServiceImpl.java
@@ -0,0 +1,25 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service.impl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.service.ILexmiscivPlaneticketService;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivPlaneticketDao;
+import com.hzya.frame.basedao.service.impl.BaseService;
+/**
+ * @description: 迈锐思-飞机行程单 service
+ * @tableName: LEXMISCIV_PLANETICKET
+ * @entityName: LexmiscivPlaneticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+@Service(value="LEXMISCIV_PLANETICKETService")
+public class LexmiscivPlaneticketServiceImpl extends BaseService< LexmiscivPlaneticketEntity,String> implements ILexmiscivPlaneticketService{
+
+ protected ILexmiscivPlaneticketDao lexmiscivplaneticketDao;
+
+ @Autowired
+ public void setLexmiscivPlaneticketDao(ILexmiscivPlaneticketDao dao) {
+ this.lexmiscivplaneticketDao = dao;
+ this.dao=dao;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivPlaneticketsServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivPlaneticketsServiceImpl.java
new file mode 100644
index 00000000..18531a6b
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivPlaneticketsServiceImpl.java
@@ -0,0 +1,25 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service.impl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivPlaneticketsEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.service.ILexmiscivPlaneticketsService;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivPlaneticketsDao;
+import com.hzya.frame.basedao.service.impl.BaseService;
+/**
+ * @description: 迈锐思-飞机行程单明细 service
+ * @tableName: LEXMISCIV_PLANETICKETS
+ * @entityName: LexmiscivPlaneticketsEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+@Service(value="LEXMISCIV_PLANETICKETSService")
+public class LexmiscivPlaneticketsServiceImpl extends BaseService< LexmiscivPlaneticketsEntity,String> implements ILexmiscivPlaneticketsService{
+
+ protected ILexmiscivPlaneticketsDao lexmiscivplaneticketsDao;
+
+ @Autowired
+ public void setLexmiscivPlaneticketsDao(ILexmiscivPlaneticketsDao dao) {
+ this.lexmiscivplaneticketsDao = dao;
+ this.dao=dao;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivTrainticketServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivTrainticketServiceImpl.java
new file mode 100644
index 00000000..d95c8562
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/lexmis/service/impl/LexmiscivTrainticketServiceImpl.java
@@ -0,0 +1,25 @@
+package com.hzya.frame.plugin.cinvoice.lexmis.service.impl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivTrainticketEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.service.ILexmiscivTrainticketService;
+import com.hzya.frame.plugin.cinvoice.lexmis.dao.ILexmiscivTrainticketDao;
+import com.hzya.frame.basedao.service.impl.BaseService;
+/**
+ * @description: 迈锐思-火车票 service
+ * @tableName: LEXMISCIV_TRAINTICKET
+ * @entityName: LexmiscivTrainticketEntity
+ * @author: gjh
+ * @history: 1.0
+ */
+@Service(value="LEXMISCIV_TRAINTICKETService")
+public class LexmiscivTrainticketServiceImpl extends BaseService< LexmiscivTrainticketEntity,String> implements ILexmiscivTrainticketService{
+
+ protected ILexmiscivTrainticketDao lexmiscivtrainticketDao;
+
+ @Autowired
+ public void setLexmiscivTrainticketDao(ILexmiscivTrainticketDao dao) {
+ this.lexmiscivtrainticketDao = dao;
+ this.dao=dao;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/plugin/CInvoiceImportPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/plugin/CInvoiceImportPluginInitializer.java
new file mode 100644
index 00000000..65865947
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/plugin/CInvoiceImportPluginInitializer.java
@@ -0,0 +1,101 @@
+package com.hzya.frame.plugin.cinvoice.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.plugin.cinvoice.service.ICInvoiceImportPluginService;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description 发票批量导入有度税务
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:12
+ **/
+public class CInvoiceImportPluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(getClass());
+ @Autowired
+ private ICInvoiceImportPluginService pluginService;
+ /***
+ * 插件初始化方法
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 10:48
+ * @Param []
+ * @return void
+ **/
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ /****
+ * 插件销毁方法
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ /****
+ * 插件的ID
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginId() {
+ return "CInvoiceImportPluginInitializer";
+ }
+
+ /****
+ * 插件的名称
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginName() {
+ return "OA发票导入有度税务";
+ }
+
+ /****
+ * 插件的显示值
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginLabel() {
+ return "OA发票导入有度税务";
+ }
+
+ /***
+ * 插件类型 1、场景插件
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 14:01
+ * @Param []
+ * @return java.lang.String
+ **/
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+
+ /***
+ * 执行业务代码
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-07 11:20
+ * @param requestJson 执行业务代码的参数
+ * @return void
+ **/
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
+ logger.info("======开始执OA发票批量导入有度税务插件======");
+ pluginService.importInvoice(requestJson);
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportBService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportBService.java
new file mode 100644
index 00000000..1a1d5445
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportBService.java
@@ -0,0 +1,21 @@
+package com.hzya.frame.plugin.cinvoice.service;
+
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportBEntity;
+
+import java.util.List;
+
+/**
+ * @Description 发票批量导入有度税务 表体service
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:35
+ **/
+public interface ICInvoiceImportBService extends IBaseService {
+
+ /***
+ * 查询子表数据
+ * @param entity
+ * @return
+ */
+ List queryInvoiceDetails(CInvoiceImportBEntity entity)throws Exception;
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportHService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportHService.java
new file mode 100644
index 00000000..5ce1a532
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportHService.java
@@ -0,0 +1,22 @@
+package com.hzya.frame.plugin.cinvoice.service;
+
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity;
+
+import java.util.List;
+
+/**
+ * @Description 发票批量导入有度税务 表头service
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:34
+ **/
+public interface ICInvoiceImportHService extends IBaseService {
+
+ /**
+ * 查询发票列表
+ * @param entity
+ * @return
+ * @throws Exception
+ */
+ List queryInvoiceList(CInvoiceImportHEntity entity) throws Exception;
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportPluginService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportPluginService.java
new file mode 100644
index 00000000..be268219
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/ICInvoiceImportPluginService.java
@@ -0,0 +1,18 @@
+package com.hzya.frame.plugin.cinvoice.service;
+
+import com.alibaba.fastjson.JSONObject;
+
+/**
+ * @Description 税务发票批量导入
+ * @Author xiangerlin
+ * @Date 2025/4/21 17:29
+ **/
+public interface ICInvoiceImportPluginService {
+ /**
+ * 发票导入
+ * @param requestJson
+ * @return
+ * @throws Exception
+ */
+ String importInvoice(JSONObject requestJson)throws Exception;
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportBServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportBServiceImpl.java
new file mode 100644
index 00000000..6f33923b
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportBServiceImpl.java
@@ -0,0 +1,43 @@
+package com.hzya.frame.plugin.cinvoice.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.hzya.frame.basedao.service.impl.BaseService;
+import com.hzya.frame.plugin.cinvoice.dao.ICInvoiceImportBDao;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportBEntity;
+import com.hzya.frame.plugin.cinvoice.service.ICInvoiceImportBService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description 发票批量导入有度税务 表体service
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:39
+ **/
+@Service()
+public class CInvoiceImportBServiceImpl extends BaseService implements ICInvoiceImportBService {
+ Logger logger = LogManager.getLogger(getClass());
+
+ private ICInvoiceImportBDao cInvoiceImportBDao;
+
+ @Autowired
+ public void setcInvoiceImportBDao(ICInvoiceImportBDao dao) {
+ this.cInvoiceImportBDao = dao;
+ this.dao = dao;
+ }
+
+ /***
+ * 查询子表数据
+ * @param entity
+ * @return
+ */
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryInvoiceDetails(CInvoiceImportBEntity entity) throws Exception {
+ List list = cInvoiceImportBDao.queryList(entity, "com.hzya.frame.plugin.cinvoice.dao.impl.CInvoiceImportBDaoImpl.entity_list_base");
+ return list;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportHServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportHServiceImpl.java
new file mode 100644
index 00000000..c6edb605
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportHServiceImpl.java
@@ -0,0 +1,45 @@
+package com.hzya.frame.plugin.cinvoice.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.hzya.frame.basedao.service.impl.BaseService;
+import com.hzya.frame.plugin.cinvoice.dao.ICInvoiceImportHDao;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity;
+import com.hzya.frame.plugin.cinvoice.service.ICInvoiceImportHService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description 发票批量导入有度税务 表头service
+ * @Author xiangerlin
+ * @Date 2025/4/18 15:38
+ **/
+@Service()
+public class CInvoiceImportHServiceImpl extends BaseService implements ICInvoiceImportHService {
+ Logger logger = LogManager.getLogger(getClass());
+
+ private ICInvoiceImportHDao cInvoiceImportHDao;
+
+ @Autowired
+ public void setcInvoiceImportHDao(ICInvoiceImportHDao dao) {
+ this.cInvoiceImportHDao = dao;
+ this.dao = dao;
+ }
+
+ /**
+ * 查询发票列表
+ *
+ * @param entity
+ * @return
+ * @throws Exception
+ */
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryInvoiceList(CInvoiceImportHEntity entity) throws Exception {
+ List list = cInvoiceImportHDao.queryList(entity, "com.hzya.frame.plugin.cinvoice.dao.impl.CInvoiceImportHDaoImpl.entity_list_base");
+ return list;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportPluginServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportPluginServiceImpl.java
new file mode 100644
index 00000000..dcc9d89d
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/service/impl/CInvoiceImportPluginServiceImpl.java
@@ -0,0 +1,327 @@
+package com.hzya.frame.plugin.cinvoice.service.impl;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.lang.Assert;
+import cn.hutool.core.map.MapBuilder;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.plugin.cinvoice.assembler.*;
+import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity;
+import com.hzya.frame.plugin.cinvoice.lexmis.entity.*;
+import com.hzya.frame.plugin.cinvoice.lexmis.service.*;
+import com.hzya.frame.plugin.cinvoice.service.ICInvoiceImportHService;
+import com.hzya.frame.plugin.cinvoice.service.ICInvoiceImportPluginService;
+import com.hzya.frame.seeyon.util.YzfSignUtil;
+import org.apache.commons.collections.CollectionUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description 有度税务发票批量导入
+ * @Author xiangerlin
+ * @Date 2025/4/21 17:30
+ **/
+@Service()
+public class CInvoiceImportPluginServiceImpl implements ICInvoiceImportPluginService {
+ Logger logger = LoggerFactory.getLogger(getClass());
+ @Autowired
+ private ILexmisPublicinfoService lexmisPublicinfoService;
+ @Autowired
+ private ICInvoiceImportHService cInvoiceImportHService;
+ @Autowired
+ private ILexmiscivInvoicemainService lexmiscivInvoicemainService;
+ @Autowired
+ private ILexmiscivInvoicedetailService lexmiscivInvoicedetailService;
+ @Autowired
+ private ILexmiscivTrainticketService lexmiscivTrainticketService;
+ @Autowired
+ private ILexmiscivPlaneticketService lexmiscivPlaneticketService;
+ @Autowired
+ ILexmiscivPlaneticketsService lexmiscivPlaneticketsService;
+
+ @Value("${zt.url:}")
+ private String url;
+ @Value("${yzf.accessSecret:}")
+ private String accessSecret;
+ @Value("${yzf.accesskey:}")
+ private String accesskey;
+ /**
+ * 发票导入
+ *
+ * @param requestJson
+ * @return
+ * @throws Exception
+ */
+ @Override
+ public String importInvoice(JSONObject requestJson) throws Exception {
+
+
+ //1、 查OA主表
+ requestJson.get("");
+ String dataSourceCode = "HT-OA";
+ CInvoiceImportHEntity importHEntity = new CInvoiceImportHEntity();
+ importHEntity.setDataSourceCode(dataSourceCode);
+ importHEntity.setId("3922481031277596479");
+ List cInvoiceImportHList = cInvoiceImportHService.queryInvoiceList(importHEntity);
+ if (CollectionUtils.isNotEmpty(cInvoiceImportHList)){
+ ParamAssembler assembler = null;
+ CInvoiceImportHEntity cInvoiceH = cInvoiceImportHList.get(0);
+ //2、 查OA明细表
+ //3、 查迈瑞思发票表
+ //迈锐思发票公共信息表
+ List lexmisPublicinfoEntityList = lexmisPublicinfoService.query(new LexmisPublicinfoEntity(cInvoiceH.getId(),dataSourceCode));
+ if (CollectionUtils.isNotEmpty(lexmisPublicinfoEntityList)){
+ //税务接口每次最多传50张发票
+ int size = lexmisPublicinfoEntityList.size();
+ int batchSize = 50;
+ for (int i = 0; i < size; i += batchSize){
+ int no = 1;//序号
+ //4、 根据发票类型,组装不同参数
+ long timestamp = System.currentTimeMillis();
+ Map parametersMap = new HashMap<>();
+ parametersMap.put("accessKey",accesskey);
+ parametersMap.put("timestamp",timestamp);
+ String sign = YzfSignUtil.signRequest(parametersMap, accessSecret);
+ JSONObject head = new JSONObject();
+ head.put("accessKey","6X3B526P5HqE6ums");//密钥
+ head.put("sign",sign);//签名
+ head.put("timestamp",timestamp);//时间戳
+ head.put("taxNo","91330110MAC5FPUY2U");//当前企业税号
+ JSONArray inputInfos = new JSONArray();
+ head.put("inputInfos",inputInfos);//发票录入信息,单次最大50张
+
+ // 获取当前批次的子列表
+ List batchList = lexmisPublicinfoEntityList.subList(i, Math.min(i + batchSize, size));
+ //使用stream方式 publicinfoList 按 PI_TABLENAME分组
+ Map> groupedByPiTablename = batchList.stream()
+ .collect(Collectors.groupingBy(LexmisPublicinfoEntity::getPI_TABLENAME));
+ for (Map.Entry> entry : groupedByPiTablename.entrySet()){
+ String key = entry.getKey();//对应发票类型的表名
+ List publicinfoList = entry.getValue();
+ ParamAssemblerContext context = null;//策略上下文类
+ for (LexmisPublicinfoEntity info : publicinfoList){
+
+ JSONObject inputInfo = new JSONObject();
+ inputInfos.add(inputInfo);
+ inputInfo.put("no",no);//编号
+ inputInfo.put("systemName","4");//来源系统 默认写4 代表OA
+ inputInfo.put("businessNo",cInvoiceH.getBill_code());//业务单据号
+ inputInfo.put("bookkeepingStatus","1");//记账状态,默认传1
+ inputInfo.put("customFlag","2");//业务流转状态,默认传2
+ JSONObject invoiceInfo = new JSONObject();//票面信息
+ inputInfo.put("invoiceInfo", invoiceInfo);
+ JSONObject baseInfo = new JSONObject();//发票基本信息
+ JSONObject contentInfo = new JSONObject();//发票内容
+ JSONArray taxturnsInfos = new JSONArray();//进项转出信息
+ invoiceInfo.put("taxturnsInfos",taxturnsInfos);
+
+ switch (key){
+ case "LEXMISCIV_INVOICEMAIN"://增值税发票
+ zzsInvoice(dataSourceCode, info, invoiceInfo, baseInfo);
+ //}
+ break;
+ case "LEXMISCIV_TRAINTICKET"://火车票
+ trainInvoice(dataSourceCode, inputInfos, info, inputInfo, invoiceInfo, baseInfo);
+ break;
+ case "LEXMISCIV_PLANETICKET"://飞机行程单
+ planeInvoice(dataSourceCode, info, invoiceInfo, baseInfo);
+ break;
+ default:
+ System.out.println("没有匹配到类型");
+ break;
+ }
+ no++;
+ }
+ }
+ logger.info("调用有度发票批量导入接口请求参数:{}",head.toString());
+ //调用税务接口
+ Map headerMap = MapBuilder.create(true)
+ .put("apiCode", "8000600005")//有度发票导入接口
+ .put("publicKey","ZJYA7f8FzV219otH8zhkReiyyWpXswpbY/+StvC2em0hf59Ce7eDIk+3zDUT+v578prj")
+ .put("secretKey","xJ9J1Ev2F0faiJ/nQnCNklskAgtQp3QSm+ihO21uY/H0UADj0tSDPxmIhFfC4v6Fj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
+ .put("appId","800060")
+ .build();
+ String body = HttpRequest.post(url).addHeaders(headerMap).body(head.toString()).timeout(60000).execute().body();
+ logger.info("调用有度发票批量导入接口响应参数:{}",body);
+ }
+ }
+ }
+
+
+ return null;
+ }
+
+ /**
+ * 机票
+ * @param dataSourceCode
+ * @param info
+ * @param invoiceInfo
+ * @param baseInfo
+ */
+ private void planeInvoice(String dataSourceCode, LexmisPublicinfoEntity info, JSONObject invoiceInfo, JSONObject baseInfo) {
+ ParamAssemblerContext context;
+ JSONObject contentInfo;
+ ParamAssembler assembler;
+ LexmiscivPlaneticketEntity planeticketH = lexmiscivPlaneticketService.queryOne(new LexmiscivPlaneticketEntity(info.getPI_DATAKEY(), dataSourceCode));
+ if (null != planeticketH){
+ String fplx = "a4";
+ LexmiscivPlaneticketsEntity planeticketB = new LexmiscivPlaneticketsEntity(planeticketH.getPT_ID(), dataSourceCode);
+ //飞机行程单子表
+ List planeticketBList = lexmiscivPlaneticketsService.query(planeticketB);
+ JSONObject planeObj = new JSONObject();
+ planeObj.put("planeticketH",JSONObject.toJSONString(planeticketH));
+ planeObj.put("planeticketBList",JSONObject.toJSONString(planeticketBList));
+ //1表示电子行程单 先不区分试试,策略类内部判断来实现区分
+ if ("1".equals(planeticketH.getPT_ELECTRONICMARK())){
+ //assembler = new ElecFlightInvoiceAssembler(planeObj);
+ fplx = "400";
+ }
+// else {
+// assembler = new FlightInvoiceAssembler(planeObj);
+// }
+ assembler = new ElecFlightInvoiceAssembler(planeObj);
+ context = new ParamAssemblerContext(assembler);
+ contentInfo = context.assemble();
+ baseInfo.put("fphm",planeticketH.getPT_FPHM());//发票号码
+ baseInfo.put("fpdm","");//发票代码
+ baseInfo.put("fplx",fplx);//发票类型
+ baseInfo.put("kprq",DateUtil.format(planeticketH.getPT_MAKEDATE(),"yyyy-MM-dd"));//开票日期
+ baseInfo.put("bhszje",planeticketH.getPT_NOTAXAMOUNT());//不含税总金额
+ baseInfo.put("jym","");//校验码
+ baseInfo.put("bxje",planeticketH.getPT_NOTAXAMOUNT());//不含税实际报销金额
+ baseInfo.put("jsse","");//有效计算税额
+ baseInfo.put("jsdkzq","");//计算抵扣账期
+ baseInfo.put("signPerson","");//签收人
+ baseInfo.put("signStatus","1");//签收状态,默认传1
+ invoiceInfo.put("baseInfo", baseInfo);
+ invoiceInfo.put("contentInfo",contentInfo);
+ }
+ }
+
+ /**
+ * 火车票发票
+ * @param dataSourceCode
+ * @param inputInfos
+ * @param info
+ * @param inputInfo
+ * @param invoiceInfo
+ * @param baseInfo
+ */
+ private void trainInvoice(String dataSourceCode, JSONArray inputInfos, LexmisPublicinfoEntity info, JSONObject inputInfo, JSONObject invoiceInfo, JSONObject baseInfo) {
+ JSONObject contentInfo;
+ ParamAssembler assembler;
+ ParamAssemblerContext context;
+ LexmiscivTrainticketEntity trainticketEntity = new LexmiscivTrainticketEntity(info.getPI_DATAKEY(), dataSourceCode);
+ trainticketEntity.setTT_BUSINESSTYPE(1);//1售票 2退票 3售票换开 4退票换开,3和4没遇到过,先查1
+ LexmiscivTrainticketEntity trainticket = lexmiscivTrainticketService.queryOne(trainticketEntity);
+ if (null != trainticket){
+ JSONObject trainObj = new JSONObject();
+ trainObj.put("trainInvoice",JSONObject.toJSONString(trainticket));
+ String fplx = "a2";
+ //1是电子票
+ if ("1".equals(trainticket.getTT_ELECTRONIC())){
+ assembler = new ElecTrainInvoiceAssembler(trainObj);
+ fplx = "200";
+ }else {
+ assembler = new TrainInvoiceAssembler(trainObj);
+ }
+ context = new ParamAssemblerContext(assembler);
+ contentInfo = context.assemble();
+ baseInfo.put("fphm",trainticket.getTT_CODE());//发票号码
+ baseInfo.put("fpdm","");//发票代码 火车票不用传
+ baseInfo.put("fplx",fplx);//发票类型
+ baseInfo.put("kprq",DateUtil.format(trainticket.getTT_OUTDATE(),"yyyy-MM-dd"));//开票日期
+ baseInfo.put("bhszje",trainticket.getTT_NOTAXAMOUNT());//不含税总金额
+ baseInfo.put("jym","");//校验码
+ baseInfo.put("bxje",trainticket.getTT_NOTAXAMOUNT());//不含税实际报销金额
+ baseInfo.put("jsse","");//有效计算税额
+ baseInfo.put("jsdkzq","");//计算抵扣账期
+ baseInfo.put("signPerson","");//签收人
+ baseInfo.put("signStatus","1");//签收状态,默认传1
+ invoiceInfo.put("baseInfo", baseInfo);
+ invoiceInfo.put("contentInfo",contentInfo);
+ }else {
+ inputInfos.remove(inputInfo);
+ logger.info("根据pi_datakey没有查到火车票发票信息:{},发票号:{}", info.getPI_DATAKEY());
+ }
+ }
+
+ /**
+ * 增值税发票
+ * @param dataSourceCode 数据源编码
+ * @param info 发票公共表
+ * @param invoiceInfo 发票信息对象
+ * @param baseInfo 发票基本数据对象
+ */
+ private void zzsInvoice(String dataSourceCode, LexmisPublicinfoEntity info, JSONObject invoiceInfo, JSONObject baseInfo) {
+ ParamAssemblerContext context;
+ JSONObject contentInfo;
+ ParamAssembler assembler;
+ LexmiscivInvoicemainEntity zzsInvoiceH = lexmiscivInvoicemainService.queryOne(new LexmiscivInvoicemainEntity(info.getPI_DATAKEY(), dataSourceCode));
+ //增值税发票表体
+ List zzsInvoiceBList = lexmiscivInvoicedetailService.query(new LexmiscivInvoicedetailEntity(zzsInvoiceH.getIM_ID(), dataSourceCode));
+ JSONObject zzs = new JSONObject();
+ zzs.put("zzsInvoiceH",JSONObject.toJSONString(zzsInvoiceH));
+ zzs.put("zzsInvoiceBList",JSONObject.toJSONString(zzsInvoiceBList));
+ assembler = new ZzsInvoiceAssembler(zzs);
+ context = new ParamAssemblerContext(assembler);
+ contentInfo = context.assemble();
+ baseInfo.put("fphm",zzsInvoiceH.getIM_FPHM());//发票号码
+ baseInfo.put("fpdm",zzsInvoiceH.getIM_FPDM());//发票代码
+ baseInfo.put("fplx",convertZzsFplx(zzsInvoiceH.getIM_TYPE()));//发票类型
+ baseInfo.put("kprq",DateUtil.format(zzsInvoiceH.getIM_DATE(),"yyyy-MM-dd"));//开票日期
+ baseInfo.put("bhszje",zzsInvoiceH.getIM_NOTAXAMOUNT());//不含税总金额
+ baseInfo.put("jym",zzsInvoiceH.getIM_CHECKCODE());//校验码
+ baseInfo.put("bxje",zzsInvoiceH.getIM_NOTAXAMOUNT());//不含税实际报销金额
+ baseInfo.put("jsse","");//有效计算税额
+ baseInfo.put("jsdkzq","");//计算抵扣账期
+ baseInfo.put("signPerson","");//签收人
+ baseInfo.put("signStatus","1");//签收状态,默认传1
+ invoiceInfo.put("baseInfo", baseInfo);
+ invoiceInfo.put("contentInfo",contentInfo);
+ }
+
+
+ /**
+ * 迈锐思增值税类发票类型转换成有度发票类型
+ * @param fplx 迈锐思发票类型
+ * @return
+ */
+ private String convertZzsFplx(String fplx){
+ if (StrUtil.isNotEmpty(fplx)){
+ String youduFplx = null;
+ switch (fplx){
+ case "01"://增值税专用发票
+ youduFplx = "01";
+ break;
+ case "04"://增值税普通发票
+ youduFplx = "04";
+ break;
+ case "10"://增值税电子普票
+ youduFplx = "10";
+ break;
+ case "20"://增值税电子专票
+ youduFplx = "08";
+ break;
+ case "31"://电子发票(增值税专票)
+ youduFplx = "31";
+ break;
+ case "32"://电子发票(增值税普票)
+ youduFplx = "32";
+ break;
+ }
+ return youduFplx;
+ }
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/util/YzfUtils.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/util/YzfUtils.java
new file mode 100644
index 00000000..b1811548
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/cinvoice/util/YzfUtils.java
@@ -0,0 +1,99 @@
+package com.hzya.frame.plugin.cinvoice.util;
+
+import cn.hutool.core.lang.Assert;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
+import com.alibaba.fastjson.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+
+import java.time.Instant;
+
+/**
+ * @Description 云帐房accessToken
+ * @Author xiangerlin
+ * @Date 2025/4/24 10:03
+ **/
+public class YzfUtils {
+ static Logger logger = LoggerFactory.getLogger(YzfUtils.class);
+ //token
+ private static String accessToken;
+ //过期时间
+ private static Instant expireTime;
+ private static final Long CACHE_EXPIRY_TIME = 7000L; // 缓存有效时间(秒)
+ //应用key
+ private static String accessKey;
+ //应用密钥
+ private static String accessSecret;
+ //接口地址
+ private static String baseUrl;
+ @Value("${yzf.accessKey:}")
+ public static void setaccessKey(String accessKey) {
+ YzfUtils.accessKey = accessKey;
+ }
+ @Value("${yzf.accessSecret:}")
+ public static void setaccessSecret(String accessSecret) {
+ YzfUtils.accessSecret = accessSecret;
+ }
+ @Value("${yzf.baseUrl:}")
+ public static void setBaseUrl(String baseUrl){
+ YzfUtils.baseUrl = baseUrl;
+ }
+ /**
+ * 获取token
+ * @return
+ */
+ public static String getAccessToken(){
+ return getAccessToken(accessKey,accessSecret);
+ }
+
+ /**
+ * 获取accessToken
+ *
+ * @param accessKey
+ * @param accessSecret
+ * @return
+ */
+ public static String getAccessToken(String accessKey,String accessSecret) {
+ //判断是否过期 如果没过期直接返回
+ if (null != accessToken && expireTime != null && Instant.now().isBefore(expireTime)) {
+ return accessToken;
+ }
+ //获取新的accessToken
+ accessToken = fetchNewAccessToken(accessKey,accessSecret);
+ //过期时间设置成当前事件+7000s,预留200s的时间
+ expireTime = Instant.now().plusSeconds(CACHE_EXPIRY_TIME);
+ return accessToken;
+ }
+ /**
+ * 获取新的accessToken
+ *
+ * @return
+ */
+ private static String fetchNewAccessToken(String accessKey,String accessSecret) {
+ try {
+
+ if (StrUtil.isNotEmpty(accessKey) && StrUtil.isNotEmpty(accessSecret)) {
+ JSONObject param = new JSONObject();
+ param.put("accessKey", YzfUtils.accessKey);
+ param.put("accessSecret", YzfUtils.accessSecret);
+ String res = HttpRequest.post(YzfUtils.baseUrl+"/api/getToken").body(param.toString()).execute().body();
+ logger.info("调用云帐房token返回参数:{}",res);
+ if (StrUtil.isNotEmpty(res)){
+ JSONObject tokenObj = JSONObject.parseObject(res);
+ String code = tokenObj.getString("code");
+ if ("0".equals(code)){
+ JSONObject resultObj = tokenObj.getJSONObject("result");
+ if (null != resultObj){
+ return resultObj.getString("accessToken");
+ }
+ }
+ }
+ }
+ } catch (Exception _err) {
+ logger.error("获取oken出错:{}", _err);
+ }
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/dao/IContractAuditDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/dao/IContractAuditDao.java
new file mode 100644
index 00000000..ca94f335
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/dao/IContractAuditDao.java
@@ -0,0 +1,12 @@
+package com.hzya.frame.plugin.contract.dao;
+
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.contract.entity.ContractAuditEntity;
+
+/**
+ * @Description 合同评审
+ * @Author xiangerlin
+ * @Date 2025/3/31 14:55
+ **/
+public interface IContractAuditDao extends IBaseDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/dao/impl/ContractAuditDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/dao/impl/ContractAuditDaoImpl.java
new file mode 100644
index 00000000..981ed004
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/dao/impl/ContractAuditDaoImpl.java
@@ -0,0 +1,15 @@
+package com.hzya.frame.plugin.contract.dao.impl;
+
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.contract.dao.IContractAuditDao;
+import com.hzya.frame.plugin.contract.entity.ContractAuditEntity;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Description 合同评审
+ * @Author xiangerlin
+ * @Date 2025/3/31 14:56
+ **/
+@Repository()
+public class ContractAuditDaoImpl extends MybatisGenericDao implements IContractAuditDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/entity/ContractAuditEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/entity/ContractAuditEntity.java
new file mode 100644
index 00000000..5d3b3cbe
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/entity/ContractAuditEntity.java
@@ -0,0 +1,144 @@
+package com.hzya.frame.plugin.contract.entity;
+
+import com.hzya.frame.web.entity.BaseEntity;
+
+/**
+ * @Description
+ * @Author xiangerlin
+ * @Date 2025/3/31 11:22
+ **/
+public class ContractAuditEntity extends BaseEntity {
+
+ //表单id
+ private String id;
+ //单据号
+ private String field0168;
+ //合同编号
+ private String field0239;
+ //合同名称
+ private String field0005;
+ //流程id
+ private String col_summary_id;
+ //待办id
+ private String affairId;
+ //待办表体
+ private String subject;
+ //节点名称
+ private String node_name;
+ //节点权限
+ private String node_policy;
+ //待办接收时间
+ private String receive_time;
+ //待办完成时间
+ private String complete_time;
+ //待办状态
+ private String state;
+ //待办人登录名
+ private String login_name;
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getCol_summary_id() {
+ return col_summary_id;
+ }
+
+ public void setCol_summary_id(String col_summary_id) {
+ this.col_summary_id = col_summary_id;
+ }
+
+ public String getAffairId() {
+ return affairId;
+ }
+
+ public void setAffairId(String affairId) {
+ this.affairId = affairId;
+ }
+
+ public String getField0168() {
+ return field0168;
+ }
+
+ public void setField0168(String field0168) {
+ this.field0168 = field0168;
+ }
+
+ public String getField0239() {
+ return field0239;
+ }
+
+ public void setField0239(String field0239) {
+ this.field0239 = field0239;
+ }
+
+ public String getField0005() {
+ return field0005;
+ }
+
+ public void setField0005(String field0005) {
+ this.field0005 = field0005;
+ }
+
+ public String getSubject() {
+ return subject;
+ }
+
+ public void setSubject(String subject) {
+ this.subject = subject;
+ }
+
+ public String getNode_name() {
+ return node_name;
+ }
+
+ public void setNode_name(String node_name) {
+ this.node_name = node_name;
+ }
+
+ public String getNode_policy() {
+ return node_policy;
+ }
+
+ public void setNode_policy(String node_policy) {
+ this.node_policy = node_policy;
+ }
+
+ public String getReceive_time() {
+ return receive_time;
+ }
+
+ public void setReceive_time(String receive_time) {
+ this.receive_time = receive_time;
+ }
+
+ public String getComplete_time() {
+ return complete_time;
+ }
+
+ public void setComplete_time(String complete_time) {
+ this.complete_time = complete_time;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getLogin_name() {
+ return login_name;
+ }
+
+ public void setLogin_name(String login_name) {
+ this.login_name = login_name;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/entity/ContractAuditEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/entity/ContractAuditEntity.xml
new file mode 100644
index 00000000..5f5f918e
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/entity/ContractAuditEntity.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/plugin/ContractAuditPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/plugin/ContractAuditPluginInitializer.java
new file mode 100644
index 00000000..6f7ae7e7
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/plugin/ContractAuditPluginInitializer.java
@@ -0,0 +1,160 @@
+package com.hzya.frame.plugin.contract.plugin;
+
+import cn.hutool.core.map.MapBuilder;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.plugin.contract.entity.ContractAuditEntity;
+import com.hzya.frame.plugin.contract.service.IContractAuditService;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.apache.commons.collections.CollectionUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description 合同评审,超过60天流程未审批的,把流程终止掉
+ * @Author xiangerlin
+ * @Date 2025/3/31 11:07
+ **/
+public class ContractAuditPluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(getClass());
+
+ @Resource
+ private IContractAuditService contractAuditService;
+ /***
+ * 插件初始化方法
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 10:48
+ * @Param []
+ * @return void
+ **/
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ /****
+ * 插件销毁方法
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ /****
+ * 插件的ID
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginId() {
+ return "ContractAuditPluginInitializer";
+ }
+
+ /****
+ * 插件的名称
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginName() {
+ return "OA合同评审流程检测插件";
+ }
+
+ /****
+ * 插件的显示值
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginLabel() {
+ return "OA合同评审流程检测插件";
+ }
+
+ /***
+ * 插件类型 1、场景插件
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 14:01
+ * @Param []
+ * @return java.lang.String
+ **/
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+
+ /***
+ * 执行业务代码
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-07 11:20
+ * @param requestJson 执行业务代码的参数
+ * @return void
+ **/
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
+ logger.info("======开始执行合同评审流程检测插件定时任务======");
+ //1、查询超期的合同
+ ContractAuditEntity contractAuditEntity = new ContractAuditEntity();
+ contractAuditEntity.setDataSourceCode(requestJson.getString("sourceCode"));
+ //contractAuditEntity.setField0168("PS202503270198");
+ List contractAuditList = contractAuditService.queryOverdueList(contractAuditEntity);
+ if (CollectionUtils.isNotEmpty(contractAuditList)){
+ String token = getToken();
+ for (ContractAuditEntity auditEntity : contractAuditList) {
+ //2、更新流程状态为终止状态
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("affairId",auditEntity.getAffairId());//待办id
+ jsonObject.put("member",auditEntity.getLogin_name());//当前待办登录名
+ //jsonObject.put("affairId","9022465059383233743");//待办id
+ //jsonObject.put("member","yonyou");//当前待办登录名
+ String reqParams = jsonObject.toString();
+ logger.info("合同评审流程终止接口请求参数:{}",reqParams);
+ //调用wms接口
+ Map headerMap = MapBuilder.create(true)
+ .put("apiCode", "8000590002")
+ .put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
+ .put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
+ .put("appId","800059")
+ .put("token",token)
+ .build();
+ String body = HttpRequest.post("http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(reqParams).timeout(60000).execute().body();
+ logger.info("合同评审流程终止接口返回参数:{}",body);
+ }
+ }
+ return null;
+ }
+
+ //获取token
+ private String getToken(){
+ String token = null;
+ JSONObject tokenObj = new JSONObject();
+ tokenObj.put("userName","rest0331");
+ tokenObj.put("password","27db12a6-e09d-488f-90fb-143d9f45938d");
+ tokenObj.put("loginName","yonyou");
+ String tokenReqParams = tokenObj.toString();
+ Map tokenHeaderMap = MapBuilder.create(true)
+ .put("apiCode", "8000590001")
+ .put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
+ .put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
+ .put("appId","800059")
+ .build();
+ String tokenBody = HttpRequest.post("http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(tokenHeaderMap).body(tokenReqParams).timeout(60000).execute().body();
+ if (StrUtil.isNotEmpty(tokenBody)){
+ JsonResultEntity jsonResultEntity = JSONObject.parseObject(tokenBody, JsonResultEntity.class);
+ JSONObject jsonObject = (JSONObject) jsonResultEntity.getAttribute();
+ token = jsonObject.getString("id");
+ }
+ return token;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/service/IContractAuditService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/service/IContractAuditService.java
new file mode 100644
index 00000000..8d216ac0
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/service/IContractAuditService.java
@@ -0,0 +1,22 @@
+package com.hzya.frame.plugin.contract.service;
+
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.contract.entity.ContractAuditEntity;
+
+import java.util.List;
+
+/**
+ * @Description 合同评审
+ * @Author xiangerlin
+ * @Date 2025/3/31 11:15
+ **/
+public interface IContractAuditService extends IBaseService {
+
+ /**
+ * 查询超过60天还没审批的逾期合同
+ * @param entity
+ * @return
+ * @throws Exception
+ */
+ List queryOverdueList(ContractAuditEntity entity)throws Exception;
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/service/impl/ContractAuditServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/service/impl/ContractAuditServiceImpl.java
new file mode 100644
index 00000000..5d953f29
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/contract/service/impl/ContractAuditServiceImpl.java
@@ -0,0 +1,46 @@
+package com.hzya.frame.plugin.contract.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.hzya.frame.basedao.service.impl.BaseService;
+import com.hzya.frame.plugin.contract.dao.IContractAuditDao;
+import com.hzya.frame.plugin.contract.entity.ContractAuditEntity;
+import com.hzya.frame.plugin.contract.service.IContractAuditService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description 合同评审
+ * @Author xiangerlin
+ * @Date 2025/3/31 11:16
+ **/
+@Service()
+public class ContractAuditServiceImpl extends BaseService implements IContractAuditService {
+
+ Logger logger = LogManager.getLogger(getClass());
+
+ private IContractAuditDao contractAuditDao;
+
+ @Autowired
+ public void setContractAuditDao(IContractAuditDao dao) {
+ this.contractAuditDao = dao;
+ this.dao = dao;
+ }
+
+ /**
+ * 查询超过60天还没审批的逾期合同
+ *
+ * @param entity
+ * @return
+ * @throws Exception
+ */
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryOverdueList(ContractAuditEntity entity) throws Exception {
+ List query = contractAuditDao.query(entity);
+ return query;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/InvoiceDistributePluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/InvoiceDistributePluginInitializer.java
new file mode 100644
index 00000000..14fc3fe7
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/InvoiceDistributePluginInitializer.java
@@ -0,0 +1,1550 @@
+package com.hzya.frame.plugin.ht.plugin;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
+import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
+import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
+import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
+import com.hzya.frame.mdm.mdmModuleDbFiledsRule.dao.IMdmModuleDbFiledsRuleDao;
+import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
+import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
+import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
+import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
+import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
+import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
+import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
+import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
+import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
+import com.hzya.frame.mdm.service.IMdmServiceCache;
+import com.hzya.frame.sys.sysenum.SysEnum;
+import com.hzya.frame.sysnew.application.api.dao.ISysApplicationApiDao;
+import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
+import com.hzya.frame.sysnew.application.dao.ISysApplicationDao;
+import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
+import com.hzya.frame.sysnew.application.script.dao.ISysApplicationScriptDao;
+import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity;
+import com.hzya.frame.sysnew.grovy.service.IGroovyIntegrationService;
+import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
+import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
+import com.hzya.frame.uuid.UUIDUtils;
+import com.hzya.frame.web.entity.BaseResult;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.util.*;
+
+public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(getClass());
+
+ @Resource
+ private IMdmModuleDistributeDetailDao mdmModuleDistributeDetailDao;
+ @Resource
+ private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
+ @Resource
+ private ISysApplicationApiDao sysApplicationApiDao;
+ @Resource
+ private ISysApplicationDao sysApplicationDao;
+ @Resource
+ private ISysApplicationScriptDao sysApplicationScriptDao;
+ @Resource
+ private IMdmModuleDistributeDao mdmModuleDistributeDao;
+ @Resource
+ private IGroovyIntegrationService groovyIntegrationService;
+ @Resource
+ private IMdmModuleDbFiledsRuleDao mdmModuleDbFiledsRuleDao;
+ @Resource
+ private IMdmModuleDao mdmModuleDao;
+ @Resource
+ private IMdmServiceCache mdmServiceCache;
+ @Resource
+ private IMdmModuleSendLogDao mdmModuleSendLogDao;
+ @Resource
+ private IMdmModuleDistributeTripartiteDao mdmModuleDistributeTripartiteDao;
+ @Value("${zt.url}")
+ private String url ;
+
+ private final Object lock = new Object();
+
+ /***
+ * 插件初始化方法
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 10:48
+ * @Param []
+ * @return void
+ **/
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ /****
+ * 插件销毁方法
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ /****
+ * 插件的ID
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginId() {
+ return "InvoiceDistributePluginInitializer";
+ }
+
+ /****
+ * 插件的名称
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginName() {
+ return "蓝字发票申请单申请下发";
+ }
+
+ /****
+ * 插件的显示值
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginLabel() {
+ return "蓝字发票申请单申请下发";
+ }
+
+ /***
+ * 插件类型 1、场景插件
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 14:01
+ * @Param []
+ * @return java.lang.String
+ **/
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+
+ /***
+ * 执行业务代码
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-07 11:20
+ * @param requestJson 执行业务代码的参数
+ * @return void
+ **/
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
+ try{
+ //重试方法
+ if (null != requestJson) {
+ //如果这个id不为空,说明是重试的
+ String id = requestJson.getString("integration_task_living_details_id");
+ //执行重新发送
+ if (StrUtil.isNotEmpty(id)) {
+ //查询日志表
+ IntegrationTaskLivingDetailsEntity taskDetailEntity = taskLivingDetailsService.get(id);
+ if (null != taskDetailEntity && JSONUtil.isTypeJSON(taskDetailEntity.getRootAppPk())){
+ //拿到这张表的源系统ID
+ JSONObject jsonObject = JSONObject.parseObject(taskDetailEntity.getRootAppPk());
+ Long mdmCode = jsonObject.getLong("mdmCode");//主数据编码
+ String documentRule = jsonObject.getString("documentRule");//行数据的单据规则编码
+ String distributeId = jsonObject.getString("distributeId");//发送表id
+ String type = jsonObject.getString("type");//发送类型,1、新增2、修改3、删除
+ if(mdmCode == null || documentRule == null || distributeId == null || type == null
+ || "".equals(mdmCode) || "".equals(documentRule) || "".equals(distributeId) || "".equals(type)){
+ taskDetailEntity.setResult("系统保存参数错误");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("系统保存参数错误");
+ }
+ String apiId = null;
+ String scriptId = null;
+ //查找对应数据,组装数据发送
+
+ //获取主数据信息
+ MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(mdmCode);
+ if(mdmModuleEntity == null || mdmModuleEntity.getId() == null ){
+ taskDetailEntity.setResult("主数据不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("主数据不存在");
+
+ }
+
+ //获取主数据db
+ MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
+ mdmModuleDbEntity.setMdmId(mdmModuleEntity.getId());
+ List mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(mdmModuleDbEntity);
+ if(mdmModuleDbEntities == null || mdmModuleDbEntities.size() == 0){
+ taskDetailEntity.setResult("主数据数据源不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("主数据数据源不存在");
+
+ }
+
+ //获取分发表
+ //获取分发的接口
+ MdmModuleDistributeEntity mdmModuleDistributeEntity = mdmModuleDistributeDao.get(distributeId);
+ if(mdmModuleDistributeEntity == null || mdmModuleDistributeEntity.getId() == null ){
+ taskDetailEntity.setResult("分发不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("分发不存在");
+
+ }
+ // 启用停用 0、停用
+ if("0".equals(mdmModuleDistributeEntity.getEnabledState())){
+ taskDetailEntity.setResult("分发已停用");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("分发已停用");
+
+ }
+ MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
+ mdmModuleDistributeDetailEntity.setDistributeId(distributeId);
+ mdmModuleDistributeDetailEntity.setSts("Y");
+ List mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
+
+ // 启用停用 0、停用
+ //if("1".equals(mdmModuleDistributeEntity.getEnabledType())){
+ // taskDetailEntity.setResult("分发为手动下发");
+ // taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ // return BaseResult.getFailureMessageEntity("分发为手动下发");
+ //}
+ //1、新增2、修改3、删除
+ if("1".equals(type)){
+ apiId = mdmModuleDistributeEntity.getAddApi();
+ scriptId = mdmModuleDistributeEntity.getAddScript();
+ }else if("2".equals(type)){
+ apiId = mdmModuleDistributeEntity.getUpdateApi();
+ scriptId = mdmModuleDistributeEntity.getUpdateScript();
+
+ }else if("3".equals(type)){
+ apiId = mdmModuleDistributeEntity.getDeleteApi();
+ scriptId = mdmModuleDistributeEntity.getDeleteScript();
+ }
+ if(apiId == null || "".equals(apiId)){
+ taskDetailEntity.setResult("分发接口未选择,请先选择");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("分发接口未选择,请先选择");
+
+ }
+ SysApplicationScriptEntity scriptEntity = null;
+ if(scriptId != null && !"".equals(scriptId)){
+ scriptEntity = sysApplicationScriptDao.get(scriptId);
+ if(scriptEntity == null || scriptEntity.getId() == null ){
+ taskDetailEntity.setResult("分发接口脚本不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("分发接口脚本不存在");
+ }
+ }
+ SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(apiId);
+ if(apiEntity == null || apiEntity.getId() == null ){
+ taskDetailEntity.setResult("分发接口不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("分发接口不存在");
+
+ }
+ SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
+ if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
+ taskDetailEntity.setResult("应用不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("应用不存在");
+ }
+
+ //获取主数据db字段,以及字段的规则
+ MdmModuleDbFiledsEntity queryFild = new MdmModuleDbFiledsEntity();
+ queryFild.setMdmId(mdmModuleEntity.getId());
+ List mdmModuleDbFiledsEntities = mdmServiceCache.queryMdmModuleDbFileds(queryFild);
+ MdmModuleDbFiledsRuleEntity queryFildRule = new MdmModuleDbFiledsRuleEntity();
+ queryFildRule.setMdmId(mdmModuleEntity.getId());
+ queryFildRule.setRuleCode("service");
+ List mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
+
+ //获取主数据db对应的实体表的数据
+ JSONObject object = new JSONObject();
+ for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
+ if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
+ Map map = new HashMap<>();
+ map.put("tableName",mdmModuleDbEntities.get(i).getDbName());
+ map.put("documentRule",documentRule);
+ object = mdmModuleDao.queryMdmST(map);
+ object = toLowerCaseKeys(object);
+ if(object.getString("id") == null || "".equals(object.getString("id")) ){
+ taskDetailEntity.setResult("当前数据不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("当前数据不存在");
+ }
+ if(mdmModuleDistributeDetailEntities != null && mdmModuleDistributeDetailEntities.size() > 0){
+ Map checkData = new HashMap<>();
+ checkData.put("tableName",mdmModuleDbEntities.get(i).getDbName());
+ checkData.put("documentRule",documentRule);
+ checkData.put("mdmModuleDistributeDetailEntities",mdmModuleDistributeDetailEntities);
+ JSONObject object1 = mdmModuleDao.queryMdmST(checkData);
+ object1 = toLowerCaseKeys(object1);
+
+ if(object1.getString("id") == null || "".equals(object1.getString("id")) ){
+ taskDetailEntity.setResult("当前数据不符合规则不发送");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("当前数据不符合规则不发送");
+ }
+ }
+ //查看主表是否有字段是关联的
+ if(mdmModuleDbFiledsRuleEntities != null && mdmModuleDbFiledsRuleEntities.size() > 0){
+ for (int i1 = 0; i1 < mdmModuleDbFiledsRuleEntities.size(); i1++) {
+ if(mdmModuleDbFiledsRuleEntities.get(i1).getDbId().equals(mdmModuleDbEntities.get(i).getId())){
+ if(mdmModuleDbFiledsEntities != null && mdmModuleDbFiledsEntities.size() > 0){
+ for (int i2 = 0; i2 < mdmModuleDbFiledsEntities.size(); i2++) {
+ if(mdmModuleDbFiledsRuleEntities.get(i1).getFiledId().equals(mdmModuleDbFiledsEntities.get(i2).getId())){
+ if(object.getString(mdmModuleDbFiledsEntities.get(i2).getEnName()) != null){
+ Map mapDetail = new HashMap<>();
+ mapDetail.put("tableName",mdmModuleDbFiledsRuleEntities.get(i1).getRuleValue());
+ String ids = object.getString(mdmModuleDbFiledsEntities.get(i2).getEnName());
+ String[] idss = ids.split(",");
+ mapDetail.put("id", idss[idss.length-1]);
+ JSONObject objectDetail = mdmModuleDao.queryMdmST(mapDetail);
+ objectDetail = toLowerCaseKeys(objectDetail);
+ object.put(mdmModuleDbFiledsEntities.get(i2).getEnName(),objectDetail);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
+ if("2".equals(mdmModuleDbEntities.get(i).getDbType())){
+ Map map = new HashMap<>();
+ map.put("tableName",mdmModuleDbEntities.get(i).getDbName());
+ map.put("formmainId",object.getString("id"));
+ List detail = mdmModuleDao.queryMdmSTDetail(map);
+ detail = toLowerCaseKeys(detail);
+
+ //查看主表是否有字段是关联的
+ if(detail != null && detail.size() > 0){
+ if(mdmModuleDbFiledsRuleEntities != null && mdmModuleDbFiledsRuleEntities.size() > 0){
+ for (int i1 = 0; i1 < mdmModuleDbFiledsRuleEntities.size(); i1++) {
+ if(mdmModuleDbFiledsRuleEntities.get(i1).getDbId().equals(mdmModuleDbEntities.get(i).getId())){
+ if(mdmModuleDbFiledsEntities != null && mdmModuleDbFiledsEntities.size() > 0){
+ for (int i2 = 0; i2 < mdmModuleDbFiledsEntities.size(); i2++) {
+ if(mdmModuleDbFiledsRuleEntities.get(i1).getFiledId().equals(mdmModuleDbFiledsEntities.get(i2).getId())){
+ for (int i3 = 0; i3 < detail.size(); i3++) {
+ if(detail.get(i3).getString(mdmModuleDbFiledsEntities.get(i2).getEnName()) != null){
+ Map mapDetail = new HashMap<>();
+ mapDetail.put("tableName",mdmModuleDbFiledsRuleEntities.get(i1).getRuleValue());
+ String ids = detail.get(i3).getString(mdmModuleDbFiledsEntities.get(i2).getEnName());
+ String[] idss = ids.split(",");
+ mapDetail.put("id", idss[idss.length-1]);
+
+ JSONObject objectDetail = mdmModuleDao.queryMdmST(mapDetail);
+ objectDetail = toLowerCaseKeys(objectDetail);
+
+ detail.get(i3).put(mdmModuleDbFiledsEntities.get(i2).getEnName(),objectDetail);
+ }
+
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ object.put(mdmModuleDbEntities.get(i).getDbName(),detail);
+ }
+ }
+ //执行脚本
+ JSONObject groovy = new JSONObject();
+ JSONObject parameterJson = new JSONObject();
+ parameterJson.put("header",apiEntity.getHeaderIn());
+ parameterJson.put("body",apiEntity.getBodyIn());
+ parameterJson.put("query",apiEntity.getQueryIn());
+ parameterJson.put("data",object);
+
+ if (!"1".equals(type)) {//删除或者修改情况,查询三方id,有就设置,没有就设置空
+ //1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
+ MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
+ mdmModuleDistributeTripartiteEntity.setSts("Y");
+ mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
+ mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
+ mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
+ mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
+ String tripartiteId = "";
+ if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
+ tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
+ }
+ parameterJson.put("tripartiteId", tripartiteId);
+ }
+ /** head */
+ Map header = null;
+ /** query */
+ String querys = null;
+ /** body */
+ String bodys = object.toJSONString();
+ if(scriptEntity != null && scriptEntity.getId() != null ){
+ groovy.put("code",scriptEntity.getScriptCode());
+ groovy.put("className",scriptEntity.getClassName());
+ groovy.put("name",scriptEntity.getScriptName());
+ groovy.put("methodStr",scriptEntity.getScriptData());
+ groovy.put("parameterJson",parameterJson);
+ JSONObject groovyStr = new JSONObject();
+ groovyStr.put("jsonStr",groovy);
+ try {
+ Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
+ JSONObject jsonResultEntity = JSONObject.parseObject(str.toString());
+ header = (Map) jsonResultEntity.get("header");
+ querys = jsonResultEntity.getString("querys");
+ bodys = jsonResultEntity.getString("bodys");
+ }catch (Exception e){
+ taskDetailEntity.setResult("分发脚本转换错误");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("分发脚本转换错误");
+ }
+ }
+ Map headers = new HashMap<>();
+ headers.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headers.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headers.put("appId",sysApplicationEntity.getAppId().toString());
+ headers.put("apiCode",apiEntity.getApiCode().toString());
+ if(header != null){
+ headers.putAll(header);
+ }
+ if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
+ //找到登陆接口
+ SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
+ if (null == loginApi) {
+ taskDetailEntity.setResult("发送错误,认证接口不存在");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("发送错误,认证接口不存在");
+ }
+ String rzquerys = getQuery(loginApi,null,null);
+ Map headersa = new HashMap<>();
+ headersa.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headersa.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headersa.put("appId", sysApplicationEntity.getAppId().toString());
+ headersa.put("apiCode", loginApi.getApiCode().toString());
+ Map rzheaders = getHeaders(loginApi,headersa,null);
+ String rzbodys = getBodys(loginApi,null,null);
+ JsonResultEntity rzjsonResultEntity = sendData(loginApi,rzheaders,rzbodys,rzquerys);
+ if (!rzjsonResultEntity.isFlag()) {
+ taskDetailEntity.setResult("发送错误,认证接口错误");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("发送错误:"+rzjsonResultEntity.getMsg());
+ }
+ JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
+ logger.info("认证接口返回信息:"+ attritube.toJSONString());
+ querys = getQuery(apiEntity,querys,attritube);
+ headers = getHeaders(apiEntity,headers,attritube);
+
+ bodys = getBodys(apiEntity,bodys,attritube);
+ }
+ //组装数据发送
+ JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
+ if(jsonResultEntity.isFlag()){
+ if ("1".equals(type)) {//保存三方返回id
+ if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
+ JSONObject backScriptJson = new JSONObject();
+ backScriptJson.put("data", jsonResultEntity.getAttribute());
+ groovy.put("code", scriptEntity.getScriptCode()+"back");
+ groovy.put("className", scriptEntity.getClassName()+"back");
+ groovy.put("name", scriptEntity.getScriptName()+"back");
+ groovy.put("methodStr", scriptEntity.getBackScriptData());
+ groovy.put("parameterJson", backScriptJson);
+ JSONObject groovyStr = new JSONObject();
+ groovyStr.put("jsonStr", groovy);
+ try {
+ Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
+ if(str != null){
+ JSONObject backJsonResultEntity = JSONObject.parseObject(str.toString());
+ if(backJsonResultEntity != null && backJsonResultEntity.getString("success") != null && "true".equals(backJsonResultEntity.getString("success"))){
+ MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
+ mdmModuleDistributeTripartiteEntity.setCreate();
+ mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
+ mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
+ mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
+ mdmModuleDistributeTripartiteEntity.setTripartiteId(backJsonResultEntity.getString("tripartiteId"));
+ mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
+ }
+ }
+ } catch (Exception e) {
+ logger.info("执行异常错误原因:"+e);
+ logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
+ taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("发送错误");
+ }
+ }
+ }
+ taskDetailEntity.setResult("发送成功");
+ taskLivingDetailsService.saveLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("发送成功");
+ }else {
+ taskDetailEntity.setResult("发送错误");
+ taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
+ return BaseResult.getFailureMessageEntity("发送错误");
+ }
+ }
+ }else {//执行正常下发
+ logger.info("==========开始执行正常蓝字发票申请单申请数据下发=============");
+ //查询主数据
+ MdmModuleEntity queryMdmModuleEntity = new MdmModuleEntity();
+ queryMdmModuleEntity.setSts("Y");
+ queryMdmModuleEntity.setMdmCode(Long.valueOf("10049"));
+ List mdmModuleEntities = mdmModuleDao.queryBase(queryMdmModuleEntity);
+ if(mdmModuleEntities == null || mdmModuleEntities.size() == 0){
+ return BaseResult.getSuccessMessageEntity("蓝字发票申请单申请数据未设置,不需要下发");
+ }
+ //查询下发的配置 没有直接跳过
+ for (int i = 0; i < mdmModuleEntities.size(); i++) {
+ Long mdmCode = mdmModuleEntities.get(i).getMdmCode();
+ MdmModuleDistributeEntity queryMdmModuleDistributeEntity = new MdmModuleDistributeEntity();
+ queryMdmModuleDistributeEntity.setMdmId(mdmModuleEntities.get(i).getId());
+ queryMdmModuleDistributeEntity.setEnabledType("1");
+ queryMdmModuleDistributeEntity.setEnabledState("1");
+ List mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(queryMdmModuleDistributeEntity);
+ if(mdmModuleDistributeEntities == null || mdmModuleDistributeEntities.size() == 0){
+ continue;
+ }
+ //查询主数据db
+ MdmModuleDbEntity queryMdmModuleDbEntity = new MdmModuleDbEntity();
+ queryMdmModuleDbEntity.setMdmId(mdmModuleEntities.get(i).getId());
+ List mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(queryMdmModuleDbEntity);
+ if(mdmModuleDbEntities == null || mdmModuleDbEntities.size() == 0){
+ continue;
+ }
+ //查询主数据字段
+ MdmModuleDbFiledsEntity queryFild = new MdmModuleDbFiledsEntity();
+ queryFild.setMdmId(mdmModuleEntities.get(i).getId());
+ List mdmModuleDbFiledsEntities = mdmServiceCache.queryMdmModuleDbFileds(queryFild);
+ if(mdmModuleDbFiledsEntities == null || mdmModuleDbFiledsEntities.size() == 0){
+ continue;
+ }
+ //字段的规则
+ MdmModuleDbFiledsRuleEntity queryFildRule = new MdmModuleDbFiledsRuleEntity();
+ queryFildRule.setMdmId(mdmModuleEntities.get(i).getId());
+ queryFildRule.setRuleCode("service");
+ List mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
+ //新增
+ doAdd(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+ //修改
+ doUpdate(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+ //删除
+ doDelete(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+ }
+
+ }
+ }
+ logger.info("执行成功");
+ return BaseResult.getSuccessMessageEntity("执行成功");
+ } catch (Exception e) {
+ logger.error("执行失败{}",e.getMessage());
+ }
+ return BaseResult.getSuccessMessageEntity("执行成功");
+ }
+
+ private void doDelete(String mdmId,Long mainCode,List mdmModuleDbEntities, List mdmModuleDistributeEntities, List mdmModuleDbFiledsRuleEntities, List mdmModuleDbFiledsEntities) throws Exception {
+ //查询一千条数据
+ String mainDb = null;
+ List objects = new ArrayList<>();
+ for (int i2 = 0; i2 < mdmModuleDbEntities.size(); i2++) {
+ if("1".equals(mdmModuleDbEntities.get(i2).getDbType())) {
+ mainDb = mdmModuleDbEntities.get(i2).getDbName();
+ }
+ }
+ if(mainDb == null){
+ return;
+ }
+ Map map1 = new HashMap<>();
+ map1.put("tableName",mainDb);
+ map1.put("dataStatus", "N");
+ map1.put("deleteStatus", "0");
+ map1.put("size", 50);
+ objects = mdmModuleDao.queryMdmSTs(map1);
+ objects = toLowerCaseKeys(objects);
+
+ if(objects == null || objects.size() == 0){
+ return;
+ }
+ for (int i1 = 0; i1 < mdmModuleDistributeEntities.size(); i1++) {
+ //查询下发的配置
+ MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
+ mdmModuleDistributeDetailEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
+ mdmModuleDistributeDetailEntity.setSts("Y");
+ List mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
+ //查询这一千条数据是否符合规则
+ Map map = new HashMap<>();
+ map.put("tableName", mainDb);
+ map.put("dataStatus", "N");
+ map.put("deleteStatus", "0");
+ map.put("mdmModuleDistributeDetailEntities", mdmModuleDistributeDetailEntities);
+ map.put("ids", objects);
+ List doObjects = mdmModuleDao.queryMdmSTs(map);
+ doObjects = toLowerCaseKeys(doObjects);
+
+ if(doObjects == null || doObjects.size() == 0){
+ continue;
+ }
+ if(mdmModuleDistributeEntities.get(i1).getDeleteApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getDeleteApi())){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","删除接口未设置",mainDb,objects.get(i).getString("id"),null,null,null,null,doObjects.get(i).toJSONString(),"3");
+ }
+ return ;
+ }
+ SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getDeleteApi());
+ if(apiEntity == null || apiEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","删除接口未找到",mainDb,objects.get(i).getString("id"),null,null,null,null,doObjects.get(i).toJSONString(),"3");
+ }
+ return ;
+ }
+ SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
+ if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","删除接口的应用未找到",mainDb,objects.get(i).getString("id"),null,null,apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3");
+ }
+ return ;
+ }
+
+ SysApplicationScriptEntity scriptEntity = null;
+ if(mdmModuleDistributeEntities.get(i1).getDeleteScript() != null && !"".equals(mdmModuleDistributeEntities.get(i1).getDeleteScript())){
+ scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getDeleteScript());
+ if(scriptEntity == null || scriptEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","删除接口脚本未找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3");
+ }
+ return ;
+ }
+ }
+
+ for (int i = 0; i < doObjects.size(); i++) {
+ //查询发送日志是否已经有这条数据
+ MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
+ mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
+ mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
+ mdmModuleSendLogEntity.setSts("Y");
+ mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
+ mdmModuleSendLogEntity.setApiId(apiEntity.getId());
+ //mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
+ mdmModuleSendLogEntity.setOptionType("3");
+ Integer num = mdmModuleSendLogDao.getCount(mdmModuleSendLogEntity);
+ if(num > 0){//已经过不发送
+ continue;
+ }
+ getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+
+ //执行脚本
+ JSONObject groovy = new JSONObject();
+ JSONObject parameterJson = new JSONObject();
+ parameterJson.put("header",apiEntity.getHeaderIn());
+ parameterJson.put("body",apiEntity.getBodyIn());
+ parameterJson.put("query",apiEntity.getQueryIn());
+ parameterJson.put("data",doObjects.get(i));
+
+ //1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
+ MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
+ mdmModuleDistributeTripartiteEntity.setSts("Y");
+ mdmModuleDistributeTripartiteEntity.setMdmId(mdmId);
+ mdmModuleDistributeTripartiteEntity.setDataId(objects.get(i).getString("id"));
+ mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
+ mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
+ String tripartiteId = "";
+ if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
+ tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
+ }
+ parameterJson.put("tripartiteId", tripartiteId);
+
+ /** head */
+ Map header = null;
+ /** query */
+ String querys = null;
+ /** body */
+ String bodys = doObjects.get(i).toJSONString();
+ if(scriptEntity != null && scriptEntity.getId() != null ){
+ groovy.put("code",scriptEntity.getScriptCode());
+ groovy.put("className",scriptEntity.getClassName());
+ groovy.put("name",scriptEntity.getScriptName());
+ groovy.put("methodStr",scriptEntity.getScriptData());
+ groovy.put("parameterJson",parameterJson);
+ JSONObject groovyStr = new JSONObject();
+ groovyStr.put("jsonStr",groovy);
+ try {
+ Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
+ JSONObject jsonResultEntity = JSONObject.parseObject(str.toString());
+ header = (Map) jsonResultEntity.get("header");
+ querys = jsonResultEntity.getString("querys");
+ bodys = jsonResultEntity.getString("bodys");
+ }catch (Exception e){
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3");
+ continue;
+ }
+ }
+ Map headers = new HashMap<>();
+ headers.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headers.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headers.put("appId",sysApplicationEntity.getAppId().toString());
+ headers.put("apiCode",apiEntity.getApiCode().toString());
+ if(header != null){
+ headers.putAll(header);
+ }
+ if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
+ //找到登陆接口
+ SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
+ if (null == loginApi) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口不存在",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }
+ String rzquerys = getQuery(loginApi,null,null);
+ Map headersa = new HashMap<>();
+ headersa.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headersa.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headersa.put("appId", sysApplicationEntity.getAppId().toString());
+ headersa.put("apiCode", loginApi.getApiCode().toString());
+ Map rzheaders = getHeaders(loginApi,headersa,null);
+ String rzbodys = getBodys(loginApi,null,null);
+ JsonResultEntity rzjsonResultEntity = sendData(loginApi,rzheaders,rzbodys,rzquerys);
+ if (!rzjsonResultEntity.isFlag()) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }
+ JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
+ querys = getQuery(apiEntity,querys,attritube);
+ headers = getHeaders(apiEntity,headers,attritube);
+ bodys = getBodys(apiEntity,bodys,attritube);
+ }
+ //组装数据发送
+ JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
+ if(jsonResultEntity.isFlag()){
+ //保存日志
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3");
+ continue;
+ }else {
+ //保存日志
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3");
+ continue;
+ }
+ }
+
+ }
+
+ //所有下发发送完成,修改数据状态
+ for (int i = 0; i < objects.size(); i++) {
+ Map updateMap = new HashMap<>();
+ updateMap.put("tableName",mainDb);
+ updateMap.put("dataStatus", "N");
+ updateMap.put("deleteStatus", "1");
+ updateMap.put("id", objects.get(i).getString("id"));
+ mdmModuleDao.updateMdmSTs(updateMap);
+ }
+ }
+
+ private void doUpdate(String mdmId,Long mainCode,List mdmModuleDbEntities, List mdmModuleDistributeEntities, List mdmModuleDbFiledsRuleEntities, List mdmModuleDbFiledsEntities) throws Exception {
+ //查询一千条数据
+ String mainDb = null;
+ List objects = new ArrayList<>();
+ for (int i2 = 0; i2 < mdmModuleDbEntities.size(); i2++) {
+ if("1".equals(mdmModuleDbEntities.get(i2).getDbType())) {
+ mainDb = mdmModuleDbEntities.get(i2).getDbName();
+ }
+ }
+ if(mainDb == null){
+ return;
+ }
+ Map map1 = new HashMap<>();
+ map1.put("tableName",mainDb);
+ //map1.put("dataStatus", "F");
+ map1.put("updateStatus", "0");
+ map1.put("size", 50);
+ objects = mdmModuleDao.queryMdmSTs(map1);
+ objects = toLowerCaseKeys(objects);
+
+ if(objects == null || objects.size() == 0){
+ return;
+ }
+ for (int i1 = 0; i1 < mdmModuleDistributeEntities.size(); i1++) {
+ //查询下发的配置
+ MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
+ mdmModuleDistributeDetailEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
+ mdmModuleDistributeDetailEntity.setSts("Y");
+ List mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
+ //查询这一千条数据是否符合规则
+ Map map = new HashMap<>();
+ map.put("tableName", mainDb);
+ //map.put("dataStatus", "F");
+ map.put("updateStatus", "0");
+ map.put("mdmModuleDistributeDetailEntities", mdmModuleDistributeDetailEntities);
+ map.put("ids", objects);
+ List doObjects = mdmModuleDao.queryMdmSTs(map);
+ doObjects = toLowerCaseKeys(doObjects);
+
+ if(doObjects == null || doObjects.size() == 0){
+ continue;
+ }
+ if(mdmModuleDistributeEntities.get(i1).getUpdateApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getUpdateApi())){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","修改接口未设置",mainDb,objects.get(i).getString("id"),null,null,null,null,doObjects.get(i).toJSONString(),"2");
+ }
+ return ;
+ }
+ SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getUpdateApi());
+ if(apiEntity == null || apiEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","修改接口未查找到",mainDb,objects.get(i).getString("id"),null,null,null,null,doObjects.get(i).toJSONString(),"2");
+ }
+ return ;
+ }
+ SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
+ if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","应用未查找到",mainDb,objects.get(i).getString("id"),null,null,apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
+ }
+ return ;
+ }
+
+ SysApplicationScriptEntity scriptEntity = null;
+ if(mdmModuleDistributeEntities.get(i1).getUpdateScript() != null && !"".equals(mdmModuleDistributeEntities.get(i1).getUpdateScript())){
+ scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getUpdateScript());
+ if(scriptEntity == null || scriptEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","脚本未查找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
+ }
+ return ;
+ }
+ }
+
+ for (int i = 0; i < doObjects.size(); i++) {
+
+ getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+
+ //执行脚本
+ JSONObject groovy = new JSONObject();
+ JSONObject parameterJson = new JSONObject();
+ parameterJson.put("header",apiEntity.getHeaderIn());
+ parameterJson.put("body",apiEntity.getBodyIn());
+ parameterJson.put("query",apiEntity.getQueryIn());
+ parameterJson.put("data",doObjects.get(i));
+ //1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
+ MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
+ mdmModuleDistributeTripartiteEntity.setSts("Y");
+ mdmModuleDistributeTripartiteEntity.setMdmId(mdmId);
+ mdmModuleDistributeTripartiteEntity.setDataId(objects.get(i).getString("id"));
+ mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
+ mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
+ String tripartiteId = "";
+ if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
+ tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
+ }
+ parameterJson.put("tripartiteId", tripartiteId);
+ /** head */
+ Map header = null;
+ /** query */
+ String querys = null;
+ /** body */
+ String bodys = doObjects.get(i).toJSONString();
+ if(scriptEntity != null && scriptEntity.getId() != null ){
+ logger.info("=========开始执行正常开票申请单申请数据修改下发脚本,第一次==============");
+ groovy.put("code",scriptEntity.getScriptCode());
+ groovy.put("className",scriptEntity.getClassName());
+ groovy.put("name",scriptEntity.getScriptName());
+ groovy.put("methodStr",scriptEntity.getScriptData());
+ groovy.put("parameterJson",parameterJson);
+ JSONObject groovyStr = new JSONObject();
+ groovyStr.put("jsonStr",groovy);
+ try {
+ Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
+ JSONObject jsonResultEntity = JSONObject.parseObject(str.toString());
+ header = (Map) jsonResultEntity.get("header");
+ querys = jsonResultEntity.getString("querys");
+ bodys = jsonResultEntity.getString("bodys");
+ }catch (Exception e){
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
+ continue;
+ }
+ }
+ Map headers = new HashMap<>();
+ headers.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headers.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headers.put("appId",sysApplicationEntity.getAppId().toString());
+ headers.put("apiCode",apiEntity.getApiCode().toString());
+ if(header != null){
+ headers.putAll(header);
+ }
+ if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
+ logger.info("=========正常开票申请单申请数据修改开始执行登录接口==============");
+ //找到登陆接口
+ SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
+ if (null == loginApi) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口不存在",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }
+ String rzquerys = getQuery(loginApi,null,null);
+ Map headersa = new HashMap<>();
+ headersa.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headersa.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headersa.put("appId", sysApplicationEntity.getAppId().toString());
+ headersa.put("apiCode", loginApi.getApiCode().toString());
+ Map rzheaders = getHeaders(loginApi,headersa,null);
+ String rzbodys = getBodys(loginApi,null,null);
+ JsonResultEntity rzjsonResultEntity = sendData(loginApi,rzheaders,rzbodys,rzquerys);
+ if (!rzjsonResultEntity.isFlag()) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }
+ JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
+ logger.info("=======开票申请单申请数据正常修改下发登录返回数据:{}========",attritube.toJSONString());
+ querys = getQuery(apiEntity,querys,attritube);
+ headers = getHeaders(apiEntity,headers,attritube);
+ bodys = getBodys(apiEntity,bodys,attritube);
+ }
+ //组装数据发送
+ logger.info("=========开始执行开票申请单申请业务修改数据下发脚本,第二次==============");
+ JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
+ logger.info("=====开票申请单申请数据修改下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
+ if(jsonResultEntity.isFlag()){
+ //保存日志
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
+ continue;
+ }else {
+ //保存日志
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
+ continue;
+ }
+ }
+ }
+
+ //所有下发发送完成,修改数据状态
+ for (int i = 0; i < objects.size(); i++) {
+ Map updateMap = new HashMap<>();
+ updateMap.put("tableName",mainDb);
+ //updateMap.put("dataStatus", "F");
+ updateMap.put("updateStatus", "1");
+ updateMap.put("id", objects.get(i).getString("id"));
+ mdmModuleDao.updateMdmSTs(updateMap);
+ }
+ }
+
+ private void doAdd(String mdmId,Long mainCode,List mdmModuleDbEntities, List mdmModuleDistributeEntities,List mdmModuleDbFiledsRuleEntities,List mdmModuleDbFiledsEntities ) throws Exception {
+ //查询一千条数据
+ String mainDb = null;
+ List objects = new ArrayList<>();
+ for (int i2 = 0; i2 < mdmModuleDbEntities.size(); i2++) {
+ if("1".equals(mdmModuleDbEntities.get(i2).getDbType())) {
+ mainDb = mdmModuleDbEntities.get(i2).getDbName();
+ }
+ }
+ if(mainDb == null){
+ return;
+ }
+ Map map1 = new HashMap<>();
+ map1.put("tableName",mainDb);
+ //map1.put("dataStatus", "Y");
+ map1.put("addStatus", "0");
+ objects = mdmModuleDao.queryMdmSTs(map1);
+ objects = toLowerCaseKeys(objects);
+
+ if(objects == null || objects.size() == 0){
+ return;
+ }
+ for (int i1 = 0; i1 < mdmModuleDistributeEntities.size(); i1++) {
+ //查询下发的配置
+ MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
+ mdmModuleDistributeDetailEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
+ mdmModuleDistributeDetailEntity.setSts("Y");
+ List mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
+ //查询这一千条数据是否符合规则
+ Map map = new HashMap<>();
+ map.put("tableName", mainDb);
+ //map.put("dataStatus", "Y");
+ map.put("addStatus", "0");
+ map.put("mdmModuleDistributeDetailEntities", mdmModuleDistributeDetailEntities);
+ map.put("ids", objects);
+ List doObjects = mdmModuleDao.queryMdmSTs(map);
+ doObjects = toLowerCaseKeys(doObjects);
+
+ if(doObjects == null || doObjects.size() == 0){
+ continue;
+ }
+ if(mdmModuleDistributeEntities.get(i1).getAddApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getAddApi())){
+ for (int i = 0; i < doObjects.size(); i++) {
+ //taskLivingDetailsService.saveLogToSuccess();
+ saveMdmModuleSendLogEntity( mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","新增接口未设置",mainDb,objects.get(i).getString("id"),null,null,null,null,doObjects.get(i).toJSONString(),"1");
+ }
+ return ;
+ }
+ SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getAddApi());
+ if(apiEntity == null || apiEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","新增接口未查找到",mainDb,objects.get(i).getString("id"),null,null,null,null,doObjects.get(i).toJSONString(),"1");
+ }
+ return ;
+ }
+ SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
+ if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","应用未查找到",mainDb,objects.get(i).getString("id"),null,null,apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ }
+ return ;
+ }
+
+ SysApplicationScriptEntity scriptEntity = null;
+ if(mdmModuleDistributeEntities.get(i1).getAddScript() != null && !"".equals(mdmModuleDistributeEntities.get(i1).getAddScript())){
+ scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getAddScript());
+ if(scriptEntity == null || scriptEntity.getId() == null ){
+ for (int i = 0; i < doObjects.size(); i++) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","脚本未查找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ }
+ return ;
+ }
+ }
+
+ for (int i = 0; i < doObjects.size(); i++) {
+ //查询是否已经手动发送过。只有新增校验,查询发送日志是否已经有这条数据
+ MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
+ mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
+ mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
+ mdmModuleSendLogEntity.setSts("Y");
+ mdmModuleSendLogEntity.setDataType("1");
+ mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
+ mdmModuleSendLogEntity.setApiId(apiEntity.getId());
+ //mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
+ mdmModuleSendLogEntity.setOptionType("1");
+ Integer num = mdmModuleSendLogDao.getCount(mdmModuleSendLogEntity);
+ if(num > 0){//已经新增过不发送
+ continue;
+ }
+ getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+
+ //执行脚本
+ JSONObject groovy = new JSONObject();
+ JSONObject parameterJson = new JSONObject();
+ parameterJson.put("header",apiEntity.getHeaderIn());
+ parameterJson.put("body",apiEntity.getBodyIn());
+ parameterJson.put("query",apiEntity.getQueryIn());
+ parameterJson.put("data",doObjects.get(i));
+ //1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
+ MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity1 = new MdmModuleDistributeTripartiteEntity();
+ mdmModuleDistributeTripartiteEntity1.setSts("Y");
+ mdmModuleDistributeTripartiteEntity1.setMdmId(mdmId);
+ mdmModuleDistributeTripartiteEntity1.setDataId(objects.get(i).getString("id"));
+ mdmModuleDistributeTripartiteEntity1.setAppId(sysApplicationEntity.getId());
+ mdmModuleDistributeTripartiteEntity1 = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity1);
+ String tripartiteId = "";
+ if(mdmModuleDistributeTripartiteEntity1 != null && mdmModuleDistributeTripartiteEntity1.getTripartiteId() != null ){
+ tripartiteId = mdmModuleDistributeTripartiteEntity1.getTripartiteId();
+ }
+ parameterJson.put("tripartiteId", tripartiteId);
+ /** head */
+ Map header = null;
+ /** query */
+ String querys = null;
+ /** body */
+ String bodys = doObjects.get(i).toJSONString();
+ if(scriptEntity != null && scriptEntity.getId() != null ){
+ logger.info("=========开始执行正常开票申请单申请数据新增下发脚本,第一次==============");
+ groovy.put("code",scriptEntity.getScriptCode());
+ groovy.put("className",scriptEntity.getClassName());
+ groovy.put("name",scriptEntity.getScriptName());
+ groovy.put("methodStr",scriptEntity.getScriptData());
+ groovy.put("parameterJson",parameterJson);
+ JSONObject groovyStr = new JSONObject();
+ groovyStr.put("jsonStr",groovy);
+ try {
+ Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
+ JSONObject jsonResultEntity = JSONObject.parseObject(str.toString());
+ header = (Map) jsonResultEntity.get("header");
+ querys = jsonResultEntity.getString("querys");
+ bodys = jsonResultEntity.getString("bodys");
+ }catch (Exception e){
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }
+ }
+ Map headers = new HashMap<>();
+ headers.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headers.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headers.put("appId",sysApplicationEntity.getAppId().toString());
+ headers.put("apiCode",apiEntity.getApiCode().toString());
+ if(header != null){
+ headers.putAll(header);
+ }
+ if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
+ /* logger.info("=========正常开票申请单申请数据新增开始执行登录接口==============");
+ //找到登陆接口
+ SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
+ if (null == loginApi) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口不存在",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }
+ String rzquerys = getQuery(loginApi,null,null);
+ Map headersa = new HashMap<>();
+ headersa.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
+ headersa.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
+ headersa.put("appId", sysApplicationEntity.getAppId().toString());
+ headersa.put("apiCode", loginApi.getApiCode().toString());
+ Map rzheaders = getHeaders(loginApi,headersa,null);
+ String rzbodys = getBodys(loginApi,null,null);
+ JsonResultEntity rzjsonResultEntity = sendData(loginApi,rzheaders,rzbodys,rzquerys);
+ if (!rzjsonResultEntity.isFlag()) {
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","发送错误,认证接口错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }*/
+ JSONObject jsonObject=new JSONObject();
+ jsonObject.put("accessKey","6X3B526P5HqE6ums");
+ jsonObject.put("accessSecret","34e5fc32ac894a2ba2ade8c3852c7a0a");
+ //获取TOKEN
+ String tokenResult = HttpRequest.post(url).
+ header("appId", "800060").
+ header("apiCode", "8000600004").
+ header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
+ header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
+ body(jsonObject.toJSONString()).
+ execute().
+ body();
+ logger.error("开票申请推送BIPtoken返回结果:"+tokenResult);
+ JSONObject attritube = JSONObject.parseObject(JSONObject.parseObject(tokenResult).getString("attribute"));
+ logger.info("=======开票申请单申请数据正常新增下发登录返回数据:{}========",attritube.toJSONString());
+ querys = getQuery(apiEntity,querys,attritube);
+ headers = getHeaders(apiEntity,headers,attritube);
+ headers.remove("");
+ bodys = getBodys(apiEntity,bodys,attritube);
+ }
+
+ //组装数据发送
+ logger.info("=========开始执行开票申请单申请新增数据下发脚本,第二次==============");
+ JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
+ logger.info("=====开票申请单申请数据新增下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
+ if(jsonResultEntity.isFlag()){
+ if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
+ logger.info("=========开始执行开票申请单申请数据新增返回脚本==============");
+ JSONObject backScriptJson = new JSONObject();
+ backScriptJson.put("data", jsonResultEntity.getAttribute());
+ groovy.put("code", scriptEntity.getScriptCode()+"back");
+ groovy.put("className", scriptEntity.getClassName()+"back");
+ groovy.put("name", scriptEntity.getScriptName()+"back");
+ groovy.put("methodStr", scriptEntity.getBackScriptData());
+ groovy.put("parameterJson", backScriptJson);
+ JSONObject groovyStr = new JSONObject();
+ groovyStr.put("jsonStr", groovy);
+ try {
+ Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
+ if(str != null){
+ JSONObject backJsonResultEntity = JSONObject.parseObject(str.toString());
+ if(backJsonResultEntity != null && backJsonResultEntity.getString("success") != null && "true".equals(backJsonResultEntity.getString("success"))){
+ MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
+ mdmModuleDistributeTripartiteEntity.setId(UUIDUtils.getUUID());
+ mdmModuleDistributeTripartiteEntity.setSts("Y");
+ mdmModuleDistributeTripartiteEntity.setCreate_user_id("1");
+ mdmModuleDistributeTripartiteEntity.setModify_user_id("1");
+ mdmModuleDistributeTripartiteEntity.setCreate_time(new Date());
+ mdmModuleDistributeTripartiteEntity.setModify_time(new Date());
+ mdmModuleDistributeTripartiteEntity.setOrg_id("0");
+ mdmModuleDistributeTripartiteEntity.setCompanyId("0");
+ mdmModuleDistributeTripartiteEntity.setMdmId(mdmId);
+ mdmModuleDistributeTripartiteEntity.setDataId(objects.get(i).getString("id"));
+ mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
+ mdmModuleDistributeTripartiteEntity.setTripartiteId(backJsonResultEntity.getString("tripartiteId"));
+ mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
+ }
+ }
+ } catch (Exception e) {
+ logger.error("开票申请单申请下发新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","新增返回脚本解析保存三方id错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ continue;
+ }
+ }
+ //保存日志
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ objects.get(i).put("sendsanfzt123",true);
+ logger.info("========开票申请单申请数据新增下发完成,日志保存为成功============");
+ continue;
+ }else {
+ //保存日志
+ saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
+ objects.get(i).put("sendsanfzt123",false);
+ logger.info("========开票申请单申请数据新增下发完成,日志保存为失败============");
+ continue;
+ }
+ }
+ }
+
+ //所有下发发送完成,修改数据状态
+ for (int i = 0; i < objects.size(); i++) {
+ if(objects.get(i).getBoolean("sendsanfzt123")){
+ Map updateMap = new HashMap<>();
+ updateMap.put("tableName",mainDb);
+ //updateMap.put("dataStatus", "Y");
+ updateMap.put("addStatus", "1");
+ updateMap.put("id", objects.get(i).getString("id"));
+ mdmModuleDao.updateMdmSTs(updateMap);
+ }
+ }
+ }
+
+ private void saveMdmModuleSendLogEntity(Long mdmCode,String distributeId,String dataType,String remark,String dbname,String formmain_id, String target_app, String appId, String target_api,String apiID, String source_data, String option_type) throws Exception {
+ MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
+ mdmModuleSendLogEntity.setTableName(dbname+"_send_log");
+ mdmModuleSendLogEntity.setId(UUIDUtils.getUUID());
+ mdmModuleSendLogEntity.setSts("Y");
+ mdmModuleSendLogEntity.setDistributeId(distributeId);
+ mdmModuleSendLogEntity.setAppId(appId);
+ mdmModuleSendLogEntity.setApiId(apiID);
+ mdmModuleSendLogEntity.setCreate_user_id("1");
+ mdmModuleSendLogEntity.setModify_user_id("1");
+ mdmModuleSendLogEntity.setCreate_time(new Date());
+ mdmModuleSendLogEntity.setModify_time(new Date());
+ mdmModuleSendLogEntity.setOrg_id("0");
+ mdmModuleSendLogEntity.setCompanyId("0");
+ mdmModuleSendLogEntity.setFormmainId(formmain_id);
+ mdmModuleSendLogEntity.setTargetApp(target_app);
+ mdmModuleSendLogEntity.setTargetApi(target_api);
+ mdmModuleSendLogEntity.setSourceData(source_data);
+ mdmModuleSendLogEntity.setOptionType(option_type);
+ mdmModuleSendLogEntity.setDataType(dataType);
+ mdmModuleSendLogEntity.setRemark(remark);
+ mdmModuleSendLogDao.save(mdmModuleSendLogEntity);
+
+
+ JSONObject jsonObject = JSONObject.parseObject(source_data);
+ IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
+ integrationTaskLivingDetailsEntity.setId(UUIDUtils.getUUID());
+ integrationTaskLivingDetailsEntity.setSts("Y");
+ integrationTaskLivingDetailsEntity.setCreate_user_id("1");
+ integrationTaskLivingDetailsEntity.setModify_user_id("1");
+ integrationTaskLivingDetailsEntity.setCreate_time(new Date());
+ integrationTaskLivingDetailsEntity.setModify_time(new Date());
+ integrationTaskLivingDetailsEntity.setOrg_id("0");
+ integrationTaskLivingDetailsEntity.setCompanyId("0");
+ JSONObject aa = new JSONObject();
+ aa.put("mdmCode",mdmCode);//主数据编码
+ aa.put("documentRule",jsonObject.getString("document_rule"));//行数据的单据规则编码
+ aa.put("distributeId",distributeId);//发送表id
+ aa.put("type",option_type);//发送类型,1、新增2、修改3、删除
+ integrationTaskLivingDetailsEntity.setRootAppPk(aa.toJSONString());
+ integrationTaskLivingDetailsEntity.setRootAppBill(jsonObject.getString("document_rule"));
+ integrationTaskLivingDetailsEntity.setPluginId("MdmModulePlugin");
+ integrationTaskLivingDetailsEntity.setRootAppNewData(source_data);
+ integrationTaskLivingDetailsEntity.setNewTransmitInfo(remark);
+ if("1".equals(dataType)){
+ taskLivingDetailsService.saveLogToSuccess(integrationTaskLivingDetailsEntity);
+ }else {
+ taskLivingDetailsService.saveLogToFail(integrationTaskLivingDetailsEntity);
+
+ }
+
+ }
+
+ private JSONObject getDetailData(List mdmModuleDbEntities, JSONObject object, List mdmModuleDbFiledsRuleEntities,List mdmModuleDbFiledsEntities) {
+
+ for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
+ if("2".equals(mdmModuleDbEntities.get(i).getDbType())){
+ Map map = new HashMap<>();
+ map.put("tableName",mdmModuleDbEntities.get(i).getDbName());
+ map.put("formmainId",object.getString("id"));
+ List detail = mdmModuleDao.queryMdmSTDetail(map);
+ detail = toLowerCaseKeys(detail);
+
+ //查看主表是否有字段是关联的
+ if(detail != null && detail.size() > 0){
+ if(mdmModuleDbFiledsRuleEntities != null && mdmModuleDbFiledsRuleEntities.size() > 0){
+ for (int i1 = 0; i1 < mdmModuleDbFiledsRuleEntities.size(); i1++) {
+ if(mdmModuleDbFiledsRuleEntities.get(i1).getDbId().equals(mdmModuleDbEntities.get(i).getId())){
+ if(mdmModuleDbFiledsEntities != null && mdmModuleDbFiledsEntities.size() > 0){
+ for (int i2 = 0; i2 < mdmModuleDbFiledsEntities.size(); i2++) {
+ if(mdmModuleDbFiledsRuleEntities.get(i1).getFiledId().equals(mdmModuleDbFiledsEntities.get(i2).getId())){
+ for (int i3 = 0; i3 < detail.size(); i3++) {
+ if(detail.get(i3).getString(mdmModuleDbFiledsEntities.get(i2).getEnName()) != null){
+ Map mapDetail = new HashMap<>();
+ mapDetail.put("tableName",mdmModuleDbFiledsRuleEntities.get(i1).getRuleValue());
+ String ids = detail.get(i3).getString(mdmModuleDbFiledsEntities.get(i2).getEnName());
+ String[] idss = ids.split(",");
+ mapDetail.put("id", idss[idss.length-1]);
+ JSONObject objectDetail = mdmModuleDao.queryMdmST(mapDetail);
+ objectDetail = toLowerCaseKeys(objectDetail);
+
+ detail.get(i3).put(mdmModuleDbFiledsEntities.get(i2).getEnName(),objectDetail);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ object.put(mdmModuleDbEntities.get(i).getDbName(),detail);
+ }
+ }
+
+ return object;
+ }
+
+
+ private JsonResultEntity sendData(SysApplicationApiEntity applicationApiEntity, Map headers ,String bodys ,String querys) {
+ StringBuffer urls = new StringBuffer(url);
+ if (querys != null) {
+ urls.append("?");
+ urls.append(querys);
+ }
+ HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
+ // HttpClient
+ CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build();
+ HttpPost post = new HttpPost(urls.toString());
+ CloseableHttpResponse response = null;
+
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(Integer.valueOf(applicationApiEntity.getTimeoutPeriod())).build();
+ post.setConfig(requestConfig);//设置请求参数【超时时间】
+
+ if (headers != null && headers.size() > 0) {
+ for (String key : headers.keySet()) {
+ post.setHeader(key, headers.get(key));
+ }
+ }
+ StringBuilder body = new StringBuilder();
+ boolean flag = true;
+ try {
+ if (bodys != null && !"".equals(bodys)) {
+ ByteArrayEntity entity = new ByteArrayEntity(bodys.getBytes("UTF-8"));
+ entity.setContentType("application/json");
+ post.setEntity(entity);
+ }
+ response = closeableHttpClient.execute(post);
+
+ HttpEntity entity = response.getEntity();
+ synchronized (lock) {
+ body.append(EntityUtils.toString(entity,"UTF-8"));
+ }
+ flag = true;
+ logger.info("返回结果:" + body);
+ } catch (Exception e) {
+ logger.error("请求错误:" + e.getMessage());
+ body.append(e.getMessage());
+ flag = false;
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ if (flag) {
+ if (JSONUtil.isTypeJSON(body.toString())) {
+ JsonResultEntity jsonResultEntity = JSONObject.parseObject(body.toString(),JsonResultEntity.class);
+ if(jsonResultEntity.isFlag()){
+ return BaseResult.getSuccessMessageEntity("转发成功", body);
+ }else {
+ return BaseResult.getFailureMessageEntity("转发失败", body);
+ }
+ }else {
+ return BaseResult.getFailureMessageEntity("转发失败", body);
+ }
+ } else {
+ return BaseResult.getFailureMessageEntity("转发失败", body);
+ }
+ }
+
+
+ private Map getHeaders(SysApplicationApiEntity loginApi,Map map,JSONObject loginData) {
+ if(loginData == null){
+ loginData = new JSONObject();
+ }
+ if (loginApi.getHeaderIn() != null && !"".equals(loginApi.getHeaderIn())) {
+ if (JSONUtil.isTypeJSONArray(loginApi.getHeaderIn())) {
+ JSONArray headerArray = JSON.parseArray(loginApi.getHeaderIn());
+ for (int i = 0; i < headerArray.size(); i++) {
+ JSONObject querys = headerArray.getJSONObject(i);
+ //query 只有基本类型,不用循环判断下级
+ //判断参数是否有值
+ //获取对象下面的层级数据
+ if (SysEnum.AUTHPORT.getValue().equals(querys.getString(SysEnum.PARAMETERTYPE.getValue()))) {//认证类型
+ String query = querys.getString(SysEnum.EXAMPLE.getValue());
+ if (query != null && !"".equals(query)) {
+ JSONArray example = JSONArray.parseArray(query);
+ String logValue = getObjectValue(loginData, example);
+ map.put(querys.getString(SysEnum.PARAMETERNAME.getValue()), logValue);
+ }
+ } else {
+ if (querys.getString(SysEnum.EXAMPLE.getValue()) != null && !"".equals(querys.getString(SysEnum.EXAMPLE.getValue()))) {//入参没有值用实例值,如果没有不添加
+ if(map.get(querys.getString(SysEnum.PARAMETERNAME.getValue())) == null){
+ map.put(querys.getString(SysEnum.PARAMETERNAME.getValue()), querys.getString(SysEnum.EXAMPLE.getValue()));
+ }
+ } else {//没有值直接拼接
+ if(map.get(querys.getString(SysEnum.PARAMETERNAME.getValue())) == null){
+ map.put(querys.getString(SysEnum.PARAMETERNAME.getValue()), "");
+ }
+ }
+ }
+ }
+ }
+ }
+ return map;
+
+
+
+
+ }
+
+
+ private String getQuery(SysApplicationApiEntity loginApi,String sendDatastr,JSONObject loginData) {
+ Map map = new HashMap<>();
+ if(sendDatastr != null){
+ String[] parts = sendDatastr.split("&");
+ if(parts != null && parts.length > 0){
+ for (int i = 0; i < parts.length; i++) {
+ String[] part = parts[i].split("=");
+ if(part != null && part.length >=2 ){
+ for (int a = 0; a < part.length; a++) {
+ map.put(part[0],part[1]);
+ }
+ }
+ }
+ }
+ }
+ if(loginData == null){
+ loginData = new JSONObject();
+ }
+ if (loginApi.getQueryIn() != null && !"".equals(loginApi.getQueryIn())) {
+ if (JSONUtil.isTypeJSONArray(loginApi.getQueryIn())) {
+ JSONArray headerArray = JSON.parseArray(loginApi.getQueryIn());
+ for (int i = 0; i < headerArray.size(); i++) {
+ JSONObject querys = headerArray.getJSONObject(i);
+ //query 只有基本类型,不用循环判断下级
+ //判断参数是否有值
+ //获取对象下面的层级数据
+ if (SysEnum.AUTHPORT.getValue().equals(querys.getString(SysEnum.PARAMETERTYPE.getValue()))) {//认证类型
+ String query = querys.getString(SysEnum.EXAMPLE.getValue());
+ if (query != null && !"".equals(query)) {
+ JSONArray example = JSONArray.parseArray(query);
+ String logValue = getObjectValue(loginData, example);
+ map.put(querys.getString(SysEnum.PARAMETERNAME.getValue()), logValue);
+ }
+ } else {
+ //不是认证类型直接取值
+ if (querys.getString(SysEnum.EXAMPLE.getValue()) != null && !"".equals(querys.getString(SysEnum.EXAMPLE.getValue()))) {//入参没有值用实例值,如果没有不添加
+ if(map.get(querys.getString(SysEnum.PARAMETERNAME.getValue())) == null){
+ map.put(querys.getString(SysEnum.PARAMETERNAME.getValue()), querys.getString(SysEnum.EXAMPLE.getValue()));
+ }
+ } else {//没有值直接拼接
+ if(map.get(querys.getString(SysEnum.PARAMETERNAME.getValue())) == null){
+ map.put(querys.getString(SysEnum.PARAMETERNAME.getValue()), "");
+ }
+ }
+ }
+ }
+ }
+ }
+ StringBuffer returnStr = new StringBuffer();
+ if(map != null && map.size() > 0){
+ for (String key : map.keySet()) {
+ if("".equals(returnStr)){
+ returnStr.append(key).append("=").append(map.get(key));
+ }else {
+ returnStr.append("&").append(key).append("=").append(map.get(key));
+ }
+ }
+ }
+ return returnStr.toString();
+ }
+ /**
+ * @param loginData
+ * @param example
+ * @return java.lang.String
+ * @Author lvleigang
+ * @Description 根据jsonArray 获取jsonobject中的值
+ * @Date 11:47 上午 2023/8/31
+ **/
+ private String getObjectValue(JSONObject loginData, JSONArray example) {
+ String values = "";
+ if (example != null && example.size() > 0) {
+ for (int i = 0; i < example.size(); i++) {
+ if (loginData.getString(example.getString(i)) != null && !"".equals(loginData.getString(example.getString(i)))) {
+ if (i == (example.size() - 1)) {
+ values = loginData.getString(example.getString(i));
+ } else {
+ loginData = JSONObject.parseObject(loginData.getString(example.getString(i)));
+ }
+ } else {
+ return values;
+ }
+ }
+ }
+ return values;
+ }
+ private String getBodys(SysApplicationApiEntity loginApi,String sendDatastr, JSONObject loginData) {
+ JSONObject sendData = new JSONObject();
+ if(sendDatastr != null ){
+ sendData = JSONObject.parseObject(sendDatastr);
+ }
+ if(loginData == null){
+ loginData = new JSONObject();
+ }
+ if (loginApi.getBodyIn() != null && !"".equals(loginApi.getBodyIn())) {
+ if (JSONUtil.isTypeJSONArray(loginApi.getBodyIn())) {
+ JSONArray headerArray = JSON.parseArray(loginApi.getBodyIn());
+ for (int i = 0; i < headerArray.size(); i++) {
+ //获取到第一个数据
+ JSONObject querys = headerArray.getJSONObject(i);
+ if (SysEnum.AUTHPORT.getValue().equals(querys.getString(SysEnum.PARAMETERTYPE.getValue()))) {//认证类型
+ String query = querys.getString(SysEnum.EXAMPLE.getValue());
+ if (query != null && !"".equals(query)) {
+ JSONArray example = JSONArray.parseArray(query);
+ String logValue = getObjectValue(loginData, example);
+ sendData.put(querys.getString(SysEnum.PARAMETERNAME.getValue()),logValue);
+ }
+ }
+ }
+ }
+ }
+ return sendData.toString();
+ }
+ public JSONObject toLowerCaseKeys(JSONObject jsonObject) {
+ JSONObject lowerCaseJson = new JSONObject();
+ if (jsonObject != null) {
+ for (String key : jsonObject.keySet()) {
+ Object value = jsonObject.get(key);
+ lowerCaseJson.put(key.toLowerCase(), value);
+ }
+ }
+ return lowerCaseJson;
+ }
+ public List toLowerCaseKeys(List list) {
+ List jsonObjects = new ArrayList<>();
+ if (list != null && list.size() > 0) {
+ for (int i = 0; i < list.size(); i++) {
+ jsonObjects.add(toLowerCaseKeys(list.get(i)));
+ }
+ }
+ return jsonObjects;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java
index 3504ca4c..6ce63b2d 100644
--- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java
@@ -2,7 +2,7 @@ package com.hzya.frame.plugin.ht.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
-//import com.hzya.frame.seeyon.makeinvoice.service.IMakeInvoiceService;
+import com.hzya.frame.seeyon.invoice.service.impl.InvoiceServiceImpl;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
@@ -15,9 +15,10 @@ import org.springframework.beans.factory.annotation.Autowired;
* @Date 2024/8/22 16:39
**/
public class MakeInvoicePluginInitializer extends PluginBaseEntity {
- Logger logger = LoggerFactory.getLogger(getClass());
+
@Autowired
-// private IMakeInvoiceService makeInvoiceService;
+ private InvoiceServiceImpl invoiceService;
+ Logger logger = LoggerFactory.getLogger(getClass());
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
@@ -95,7 +96,13 @@ public class MakeInvoicePluginInitializer extends PluginBaseEntity {
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
-// JsonResultEntity result = makeInvoiceService.sendMakeInvoiceSw(requestJson);
- return BaseResult.getSuccessMessageEntity("操作成功");
+ try {
+ logger.info("======开始执行杭泰开票申请单同步========");
+ return invoiceService.queryArchives(requestJson);
+ }catch (Exception e){
+ logger.info("======执行杭泰开票申请单同步失败:{}========",e.getMessage());
+ e.printStackTrace();
+ }
+ return null;
}
}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/QueryInputInvoiceResultPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/QueryInputInvoiceResultPluginInitializer.java
new file mode 100644
index 00000000..52cd42ca
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/QueryInputInvoiceResultPluginInitializer.java
@@ -0,0 +1,58 @@
+package com.hzya.frame.plugin.ht.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.plugin.zxBank.plugin.ZxBankResultPluginInitializer;
+import com.hzya.frame.seeyon.invoice.service.impl.InvoiceServiceImpl;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class QueryInputInvoiceResultPluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(QueryInputInvoiceResultPluginInitializer.class);
+
+ @Autowired
+ private InvoiceServiceImpl invoiceService;
+
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ @Override
+ public String getPluginId() {
+ return "QueryInputInvoiceResultPluginInitializer";
+ }
+
+ @Override
+ public String getPluginName() {
+ return "查询发票批量录入返回结果插件";
+ }
+
+ @Override
+ public String getPluginLabel() {
+ return "QueryInputInvoiceResultPluginInitializer";
+ }
+
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) {
+ try {
+ logger.info("======开始执行查询税务进项发票批量录入返回结果========");
+ return invoiceService.queryInputInvoiceResult(requestJson);
+ }catch (Exception e){
+ logger.info("======执行查询税务进项发票批量录入返回结果失败:{}========",e.getMessage());
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/QueryInvoiceResultPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/QueryInvoiceResultPluginInitializer.java
new file mode 100644
index 00000000..f688f5be
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/QueryInvoiceResultPluginInitializer.java
@@ -0,0 +1,58 @@
+package com.hzya.frame.plugin.ht.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.plugin.zxBank.plugin.ZxBankResultPluginInitializer;
+import com.hzya.frame.seeyon.invoice.service.impl.InvoiceServiceImpl;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class QueryInvoiceResultPluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(ZxBankResultPluginInitializer.class);
+
+ @Autowired
+ private InvoiceServiceImpl invoiceService;
+
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ @Override
+ public String getPluginId() {
+ return "QueryInvoiceResultPluginInitializer";
+ }
+
+ @Override
+ public String getPluginName() {
+ return "查询开票申请详情插件";
+ }
+
+ @Override
+ public String getPluginLabel() {
+ return "QueryInvoiceResultPluginInitializer";
+ }
+
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) {
+ try {
+ logger.info("======开始执行查询税务开票申请详情返回结果========");
+ return invoiceService.queryInvoiceResult(requestJson);
+ }catch (Exception e){
+ logger.info("======执行查询税务开票申请详情返回结果失败:{}========",e.getMessage());
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/dao/IIncomeInvoiceDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/dao/IIncomeInvoiceDao.java
new file mode 100644
index 00000000..8fb161da
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/dao/IIncomeInvoiceDao.java
@@ -0,0 +1,36 @@
+package com.hzya.frame.plugin.incomeInvoiceData.dao;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity;
+
+import java.util.List;
+
+/**
+ * 客户档案(mdm_customer: table)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-06-21 13:52:35
+ */
+public interface IIncomeInvoiceDao extends IBaseDao {
+
+
+ List queryData(JSONObject saveData);
+
+ int saveDetailData(JSONObject saveDetailData);
+
+ int saveData(JSONObject saveData);
+
+ List queryOaZb(IncomeInvoiceEntity incomeInvoiceEntity);
+
+ List queryOaMx(IncomeInvoiceEntity incomeInvoiceEntity);
+
+ int updateMx(IncomeInvoiceEntity incomeInvoiceEntity);
+
+ int saveMx(IncomeInvoiceEntity incomeInvoiceEntity);
+
+ List queryZtzz(IncomeInvoiceEntity entity);
+
+ List queryByAloneId(IncomeInvoiceEntity jnquerydata);
+}
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/dao/impl/IncomeInvoiceDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/dao/impl/IncomeInvoiceDaoImpl.java
new file mode 100644
index 00000000..8582aab4
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/dao/impl/IncomeInvoiceDaoImpl.java
@@ -0,0 +1,70 @@
+package com.hzya.frame.plugin.incomeInvoiceData.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.incomeInvoiceData.dao.IIncomeInvoiceDao;
+import com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity;
+
+import java.util.List;
+
+
+/**
+ *
+ * @author makejava
+ * @since 2024-06-21 13:52:35
+ */
+public class IncomeInvoiceDaoImpl extends MybatisGenericDao implements IIncomeInvoiceDao {
+
+ @Override
+ public List queryData(JSONObject saveData) {
+ List o = (List) super.selectList(getSqlIdPrifx() + "queryData", saveData);
+ return o;
+ }
+ @Override
+ public int saveData(JSONObject saveData) {
+ return super.insert(getSqlIdPrifx() + "saveData", saveData);
+ }
+ @Override
+ public int saveDetailData(JSONObject saveData) {
+ return super.insert(getSqlIdPrifx() + "saveDetailData", saveData);
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryOaZb(IncomeInvoiceEntity entity) {
+ List o = (List) super.selectList(getSqlIdPrifx() + "queryOaZb", entity);
+ return o;
+ }
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryOaMx(IncomeInvoiceEntity entity) {
+ List o = (List) super.selectList(getSqlIdPrifx() + "queryOaMx", entity);
+ return o;
+ }
+ @DS("#entity.dataSourceCode")
+ @Override
+ public int updateMx(IncomeInvoiceEntity entity) {
+ return super.update(getSqlIdPrifx() + "updateMx", entity);
+ }
+ @DS("#entity.dataSourceCode")
+ @Override
+ public int saveMx(IncomeInvoiceEntity entity) {
+ return super.insert(getSqlIdPrifx() + "saveMx", entity);
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryZtzz(IncomeInvoiceEntity entity) {
+ List o = (List) super.selectList(getSqlIdPrifx() + "queryZtzz", entity);
+ return o;
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryByAloneId(IncomeInvoiceEntity entity) {
+ List o = (List) super.selectList(getSqlIdPrifx() + "queryByAloneId", entity);
+ return o;
+ }
+}
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/entity/IncomeInvoiceEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/entity/IncomeInvoiceEntity.java
new file mode 100644
index 00000000..27f90943
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/entity/IncomeInvoiceEntity.java
@@ -0,0 +1,125 @@
+package com.hzya.frame.plugin.incomeInvoiceData.entity;
+
+import com.hzya.frame.web.entity.BaseEntity;
+/**
+ *
+ * @author makejava
+ * @since 2024-06-21 13:52:35
+ */
+public class IncomeInvoiceEntity extends BaseEntity {
+
+ //发票字段
+ private Integer dataId;
+ private Integer formmainId;
+ private String field0127;
+ private String field0128;
+ private String field0129;
+ private String field0130;
+ private String field0003;
+
+
+ //财报数据 字段
+ private String aloneId;
+ private String sysData;
+ private String orgCode;
+ private String orgName;
+ private String iufoVer;
+
+
+ public String getAloneId() {
+ return aloneId;
+ }
+
+ public void setAloneId(String aloneId) {
+ this.aloneId = aloneId;
+ }
+
+ public String getSysData() {
+ return sysData;
+ }
+
+ public void setSysData(String sysData) {
+ this.sysData = sysData;
+ }
+
+ public String getOrgCode() {
+ return orgCode;
+ }
+
+ public void setOrgCode(String orgCode) {
+ this.orgCode = orgCode;
+ }
+
+ public String getOrgName() {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName) {
+ this.orgName = orgName;
+ }
+
+ public String getIufoVer() {
+ return iufoVer;
+ }
+
+ public void setIufoVer(String iufoVer) {
+ this.iufoVer = iufoVer;
+ }
+
+ public Integer getDataId() {
+ return dataId;
+ }
+
+ public void setDataId(Integer dataId) {
+ this.dataId = dataId;
+ }
+
+ public Integer getFormmainId() {
+ return formmainId;
+ }
+
+ public void setFormmainId(Integer formmainId) {
+ this.formmainId = formmainId;
+ }
+
+ public String getField0127() {
+ return field0127;
+ }
+
+ public void setField0127(String field0127) {
+ this.field0127 = field0127;
+ }
+
+ public String getField0128() {
+ return field0128;
+ }
+
+ public void setField0128(String field0128) {
+ this.field0128 = field0128;
+ }
+
+ public String getField0129() {
+ return field0129;
+ }
+
+ public void setField0129(String field0129) {
+ this.field0129 = field0129;
+ }
+
+ public String getField0130() {
+ return field0130;
+ }
+
+ public void setField0130(String field0130) {
+ this.field0130 = field0130;
+ }
+
+ public String getField0003() {
+ return field0003;
+ }
+
+ public void setField0003(String field0003) {
+ this.field0003 = field0003;
+ }
+}
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/entity/IncomeInvoiceEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/entity/IncomeInvoiceEntity.xml
new file mode 100644
index 00000000..4646593b
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/entity/IncomeInvoiceEntity.xml
@@ -0,0 +1,538 @@
+
+
+
+
+
+
+
+ insert into mdm_fp(
+
+ id ,
+ document_rule ,
+ document_rule_num ,
+ data_status ,
+ add_status ,
+ update_status ,
+ delete_status ,
+ sorts ,
+ create_user_id ,
+ create_time ,
+ modify_user_id ,
+ modify_time ,
+ sts ,
+ org_id ,
+ company_id ,
+
+ fphm ,
+ fpdm ,
+ kprq ,
+ xfsh ,
+ xfmc ,
+ gfsh ,
+ gfmc ,
+ hjje ,
+ hjse ,
+ jshj ,
+ jym ,
+ xfdzdh ,
+ xfyhzh ,
+ gfdzdh ,
+ gfyhzh ,
+ mmq ,
+ bz ,
+ jqbh ,
+ jdhm ,
+ kpr ,
+ skr ,
+ fhr ,
+ url ,
+ ofdurl ,
+ xmlurl ,
+ htbh ,
+
+
+
+ )values
+ (
+
+ #{id} ,
+ #{document_rule} ,
+ #{document_rule_num} ,
+ #{data_status} ,
+ #{add_status} ,
+ #{update_status} ,
+ #{delete_status} ,
+ #{sorts} ,
+ #{create_user_id} ,
+ #{create_time} ,
+ #{modify_user_id} ,
+ #{modify_time} ,
+ #{sts} ,
+ #{org_id} ,
+ #{company_id} ,
+
+ #{fphm} ,
+ #{fpdm} ,
+ #{kprq} ,
+ #{xfsh} ,
+ #{xfmc} ,
+ #{gfsh} ,
+ #{gfmc} ,
+ #{hjje} ,
+ #{hjse} ,
+ #{jshj} ,
+ #{jym} ,
+ #{xfdzdh} ,
+ #{xfyhzh} ,
+ #{gfdzdh} ,
+ #{gfyhzh} ,
+ #{mmq} ,
+ #{bz} ,
+ #{jqbh} ,
+ #{jdhm} ,
+ #{kpr} ,
+ #{skr} ,
+ #{fhr} ,
+ #{url} ,
+ #{ofdurl} ,
+ #{xmlurl} ,
+ #{htbh} ,
+
+
+ )
+
+
+ insert into mdm_fp_detail(
+
+ id ,
+ formmain_id ,
+ data_status ,
+ sorts ,
+ create_user_id ,
+ create_time ,
+ modify_user_id ,
+ modify_time ,
+ sts ,
+ org_id ,
+ company_id ,
+ remark ,
+
+ xh ,
+ ssflbm ,
+ xmmc ,
+ ggxh ,
+ dw ,
+ sl ,
+ dj ,
+ je ,
+ slv ,
+ se ,
+
+
+
+
+ )values
+ (
+
+ #{id} ,
+ #{formmain_id} ,
+ #{data_status},
+ #{sorts} ,
+ #{create_user_id} ,
+ #{create_time} ,
+ #{modify_user_id} ,
+ #{modify_time} ,
+ #{sts} ,
+ #{org_id} ,
+ #{company_id} ,
+ #{remark} ,
+
+ #{xh} ,
+ #{ssflbm} ,
+ #{xmmc} ,
+ #{ggxh} ,
+ #{dw} ,
+ #{sl} ,
+ #{dj} ,
+ #{je} ,
+ #{slv} ,
+ #{se} ,
+
+
+ )
+
+
+
+
+
+
+ update formson_0702 set
+
+ field0127 = #{field0127},
+ field0128 = #{field0128},
+ field0129 = #{field0129},
+ field0130 = #{field0130},
+
+ where id = #{dataId}
+
+
+
+ insert into formson_0702(
+
+ id ,
+ formmain_id ,
+ field0127 ,
+ field0128 ,
+ field0129 ,
+ field0130 ,
+
+
+ )values(
+
+ #{dataId} ,
+ #{formmainId} ,
+ #{field0127} ,
+ #{field0128} ,
+ #{field0129} ,
+ #{field0130} ,
+
+ )
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/plugin/FinancialReportPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/plugin/FinancialReportPluginInitializer.java
new file mode 100644
index 00000000..d1b275a1
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/plugin/FinancialReportPluginInitializer.java
@@ -0,0 +1,65 @@
+package com.hzya.frame.plugin.incomeInvoiceData.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.plugin.incomeInvoiceData.service.IIncomeInvoiceService;
+import com.hzya.frame.web.entity.BaseResult;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 主数据同步
+ *
+ * @author makejava
+ * @since 2024-06-21 13:52:35
+ */
+public class FinancialReportPluginInitializer extends PluginBaseEntity{
+ Logger logger = LoggerFactory.getLogger(FinancialReportPluginInitializer.class);
+
+ @Autowired
+ private IIncomeInvoiceService incomeInvoiceService;
+
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "执行初始化方法initialize()");
+ }
+
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "执行销毁方法destroy()");
+ }
+
+ @Override
+ public String getPluginId() {
+ return "FinancialReportPlugin";
+ }
+
+ @Override
+ public String getPluginName() {
+ return "FinancialReportPlugin插件";
+ }
+
+ @Override
+ public String getPluginLabel() {
+ return "FinancialReportPlugin";
+ }
+
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) {
+ try {
+ logger.info("======开始执行财务信息同步========");
+ //return BaseResult.getSuccessMessageEntity("数据获取成功");
+ return incomeInvoiceService.sendFinancialReportPlugin(requestJson);
+ }catch (Exception e){
+ logger.info("======执行财务同步失败:{}========",e.getMessage());
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/plugin/IncomeInvoicePluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/plugin/IncomeInvoicePluginInitializer.java
new file mode 100644
index 00000000..8c966920
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/plugin/IncomeInvoicePluginInitializer.java
@@ -0,0 +1,63 @@
+package com.hzya.frame.plugin.incomeInvoiceData.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.plugin.incomeInvoiceData.service.IIncomeInvoiceService;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 主数据同步
+ *
+ * @author makejava
+ * @since 2024-06-21 13:52:35
+ */
+public class IncomeInvoicePluginInitializer extends PluginBaseEntity{
+ Logger logger = LoggerFactory.getLogger(IncomeInvoicePluginInitializer.class);
+
+ @Autowired
+ private IIncomeInvoiceService incomeInvoiceService;
+
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "执行初始化方法initialize()");
+ }
+
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "执行销毁方法destroy()");
+ }
+
+ @Override
+ public String getPluginId() {
+ return "IncomeInvoicePlugin";
+ }
+
+ @Override
+ public String getPluginName() {
+ return "IncomeInvoicePlugin插件";
+ }
+
+ @Override
+ public String getPluginLabel() {
+ return "IncomeInvoicePlugin";
+ }
+
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) {
+ try {
+ logger.info("======开始执行进项全量发票主数据信息同步========");
+ return incomeInvoiceService.getIncomeInvoiceData(requestJson);
+ }catch (Exception e){
+ logger.info("======执行进项全量发票主数据同步失败:{}========",e.getMessage());
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/service/IIncomeInvoiceService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/service/IIncomeInvoiceService.java
new file mode 100644
index 00000000..2276deeb
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/service/IIncomeInvoiceService.java
@@ -0,0 +1,26 @@
+package com.hzya.frame.plugin.incomeInvoiceData.service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity;
+import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
+import com.hzya.frame.web.entity.JsonResultEntity;
+
+/**
+ *
+ * @author makejava
+ * @since 2024-06-21 13:52:35
+ */
+public interface IIncomeInvoiceService extends IBaseService {
+ /**
+ * @Author lvleigang
+ * @Description 全量发票数据
+ * @Date 4:28 下午 2025/4/16
+ * @param requestJson
+ * @return com.hzya.frame.web.entity.JsonResultEntity
+ **/
+ JsonResultEntity getIncomeInvoiceData(JSONObject requestJson);
+ SysExtensionApiEntity setData(SysExtensionApiEntity entity) throws Exception;
+
+ JsonResultEntity sendFinancialReportPlugin(JSONObject requestJson);
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/service/impl/IncomeInvoiceServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/service/impl/IncomeInvoiceServiceImpl.java
new file mode 100644
index 00000000..276820a3
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/incomeInvoiceData/service/impl/IncomeInvoiceServiceImpl.java
@@ -0,0 +1,1019 @@
+package com.hzya.frame.plugin.incomeInvoiceData.service.impl;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
+import com.hzya.frame.plugin.incomeInvoiceData.dao.IIncomeInvoiceDao;
+import com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity;
+import com.hzya.frame.plugin.incomeInvoiceData.service.IIncomeInvoiceService;
+import com.hzya.frame.seeyon.util.YzfSignUtil;
+import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
+import com.hzya.frame.sysnew.comparison.controlsLog.dao.impl.ControlsLogDaoImpl;
+import com.hzya.frame.sysnew.comparison.controlsLog.entity.ControlsLogEntity;
+import com.hzya.frame.sysnew.comparison.dao.IComparisonDao;
+import com.hzya.frame.sysnew.comparison.entity.ComparisonEntity;
+import com.hzya.frame.uuid.UUIDLong;
+import com.hzya.frame.uuid.UUIDUtils;
+import com.hzya.frame.web.entity.BaseResult;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.util.EntityUtils;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.hzya.frame.basedao.service.impl.BaseService;
+import org.springframework.core.task.TaskExecutor;
+
+import javax.annotation.Resource;
+import javax.net.ssl.SSLContext;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author makejava
+ * @since 2024-06-21 13:52:35
+ */
+public class IncomeInvoiceServiceImpl extends BaseService implements IIncomeInvoiceService {
+
+ private IIncomeInvoiceDao incomeInvoiceDao;
+ @Autowired
+ private ControlsLogDaoImpl controlsLogDaoimpl;
+ @Autowired
+ private IComparisonDao comparisonDao;
+ @Autowired
+ public void setIncomeInvoiceDao(IIncomeInvoiceDao dao) {
+ this.incomeInvoiceDao = dao;
+ this.dao = dao;
+ }
+ String cbUrl = "http://oapi.nanofintax.com/api/collect/uploadFinancialReport?accessToken=";
+ String dataUrl = "http://oapi.nanofintax.com/api/invoice_receive/fp/v1/query?accessToken=";
+ String tokenUrl = "http://oapi.nanofintax.com/api/getToken";
+ String accessKey = "6X3B526P5HqE6ums";
+ String accessSecret = "34e5fc32ac894a2ba2ade8c3852c7a0a";
+ String taxNo = "91330110MAC5FPUY2U";
+ Integer size = 50;
+ @Resource
+ private TaskExecutor taskExecutor;
+ /**
+ * @Author lvleigang
+ * @Description 全量发票数据
+ * @Date 4:28 下午 2025/4/16
+ * @param requestJson
+ * @return com.hzya.frame.web.entity.JsonResultEntity
+ **/
+ @Override
+ public JsonResultEntity getIncomeInvoiceData(JSONObject requestJson) {
+ //1、调用token
+ String access_token = getToken();
+ if (access_token == null) {
+ return BaseResult.getFailureMessageEntity("token获取失败");
+ }
+ Date date = new Date();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ String times = sdf.format(date);
+ //2、调用接口获取数据
+ Integer queryCursor = 1;
+ JSONArray datalist = new JSONArray();
+ sendBusinessData(datalist, access_token, queryCursor,times);
+
+ if(datalist != null && datalist.size() > 0){
+ for (int i = 0; i < datalist.size(); i++) {
+ JSONObject saveData = new JSONObject();
+ //3、对照数据
+ JSONObject jsonObject = datalist.getJSONObject(i);
+ JSONObject content = jsonObject.getJSONObject("content");
+
+ //发票号码
+ String fphm = jsonObject.getString("fphm");
+ if(fphm == null || "".equals(fphm) ){
+ continue;
+ }
+ saveData.put("fphm",fphm);
+ //判断是否有这个数据
+ List checkData = incomeInvoiceDao.queryData(saveData);
+ if(checkData != null && checkData.size() > 0){
+ continue;
+ }
+ saveData.put("id", String.valueOf(UUIDLong.longUUID()));
+ saveData.put("create_user_id", "c796fd9ba4c9f5ff3cc2fa41a040e443");
+ saveData.put("modify_user_id", "c796fd9ba4c9f5ff3cc2fa41a040e443");
+ saveData.put("org_id", "0");
+ saveData.put("create_time", new Date());
+ saveData.put("modify_time", new Date());
+ saveData.put("sts", "Y");
+ saveData.put("data_status", "Y");//新增状态
+ saveData.put("add_status", "0");//新增状态
+ saveData.put("update_status", "1");//修改状态
+ saveData.put("delete_status", "1");//删除状态
+ ComparisonEntity comparisonEntityRule = new ComparisonEntity();
+ comparisonEntityRule.setRulePrefix("FP");
+ comparisonEntityRule.setRuleMiddle("%Y-%m-%d");
+ comparisonEntityRule.setRuleSuffix(5);
+ comparisonEntityRule.setDbName("mdm_fp");
+ ComparisonEntity comparisonEntityRuleGz = comparisonDao.queryComparisonRule(comparisonEntityRule);
+ saveData.put("document_rule", comparisonEntityRuleGz.getDocumentRule());//单据规则
+ saveData.put("document_rule_num", comparisonEntityRuleGz.getDocumentRuleNum());//单据规则流水号
+
+ saveData.put("fphm",fphm);
+ saveData.put("fpdm",content.getString("fpdm"));
+ saveData.put("kprq",jsonObject.getString("kprq"));
+ saveData.put("xfsh",content.getString("xfsh"));
+ saveData.put("xfmc",content.getString("xfmc"));
+ saveData.put("gfsh",content.getString("gfsh"));
+ saveData.put("gfmc",content.getString("gfmc"));
+ saveData.put("hjje",content.getString("hjje"));
+ saveData.put("hjse",content.getString("hjse"));
+ saveData.put("jshj",content.getString("jshj"));
+ saveData.put("jym",content.getString("jym"));
+ saveData.put("xfdzdh",content.getString("xfdzdh"));
+ saveData.put("xfyhzh",content.getString("xfyhzh"));
+ saveData.put("gfdzdh",content.getString("gfdzdh"));
+ saveData.put("gfyhzh",content.getString("gfyhzh"));
+ saveData.put("mmq",content.getString("mmq"));
+ saveData.put("bz",content.getString("bz"));
+ saveData.put("jqbh",content.getString("jqbh"));
+ saveData.put("jdhm",content.getString("jdhm"));
+ saveData.put("kpr",content.getString("kpr"));
+ saveData.put("skr",content.getString("skr"));
+ saveData.put("fhr",content.getString("fhr"));
+ saveData.put("url",content.getString("url"));
+ saveData.put("ofdurl",content.getString("ofdUrl"));
+ saveData.put("xmlurl",content.getString("xmlUrl"));
+ saveData.put("htbh",content.getString("contraceNumber"));
+
+ JSONArray detaildata = content.getJSONArray("items");
+ if(detaildata != null && detaildata.size() > 0){
+ for (int i1 = 0; i1 < detaildata.size(); i1++) {
+ JSONObject saveDetailData = new JSONObject();
+
+ saveDetailData.put("id", String.valueOf(UUIDLong.longUUID()));
+ saveDetailData.put("formmain_id", saveData.getString("id"));
+ saveDetailData.put("data_status", "Y");//新增状态
+
+ saveDetailData.put("create_user_id", "c796fd9ba4c9f5ff3cc2fa41a040e443");
+ saveDetailData.put("modify_user_id", "c796fd9ba4c9f5ff3cc2fa41a040e443");
+ saveDetailData.put("org_id", "0");
+ saveDetailData.put("create_time", new Date());
+ saveDetailData.put("modify_time", new Date());
+ saveDetailData.put("sts", "Y");
+ saveDetailData.put("xh", detaildata.getJSONObject(i1).getString("xh"));
+ saveDetailData.put("ssflbm", detaildata.getJSONObject(i1).getString("ssflbm"));
+ saveDetailData.put("xmmc", detaildata.getJSONObject(i1).getString("xmmc"));
+ saveDetailData.put("ggxh", detaildata.getJSONObject(i1).getString("ggxh"));
+ saveDetailData.put("dw", detaildata.getJSONObject(i1).getString("dw"));
+ saveDetailData.put("sl", detaildata.getJSONObject(i1).getString("sl"));
+ saveDetailData.put("dj", detaildata.getJSONObject(i1).getString("dj"));
+ saveDetailData.put("je", detaildata.getJSONObject(i1).getString("je"));
+ saveDetailData.put("slv", detaildata.getJSONObject(i1).getString("slv"));
+ saveDetailData.put("se", detaildata.getJSONObject(i1).getString("se"));
+
+ incomeInvoiceDao.saveDetailData(saveDetailData);
+ }
+ }
+ incomeInvoiceDao.saveData(saveData);
+
+ //5、保存写入日志
+ ControlsLogEntity controlsLogEntity=new ControlsLogEntity();
+ controlsLogEntity.setId(UUIDUtils.getUUID());
+ controlsLogEntity.setFormmainId(saveData.getString("id"));
+ controlsLogEntity.setSourceName("数智中台");
+ controlsLogEntity.setCode("800004");
+ controlsLogEntity.setSourceData(jsonObject.toString());
+ controlsLogEntity.setOptionType("接口新增");
+ controlsLogEntity.setOptionName("数智中台");
+ controlsLogEntity.setDbName("mdm_fp_option_log");
+ controlsLogEntity.setDataType("1");
+ controlsLogEntity.setCreate_user_id("c796fd9ba4c9f5ff3cc2fa41a040e443");
+ controlsLogEntity.setModify_user_id("c796fd9ba4c9f5ff3cc2fa41a040e443");
+ controlsLogEntity.setOrg_id("0");
+ controlsLogEntity.setRemark("插件新增");
+ controlsLogDaoimpl.saveControlsLog(saveData.getString("id"), "数智中台", "800004", jsonObject.toJSONString(), "接口新增", "数智中台", "mdm_fp_option_log", "1");
+ }
+ }
+ return BaseResult.getSuccessMessageEntity("处理成功");
+ }
+
+
+ /**
+ * @Author lvleigang
+ * @Description 获取业务数据
+ * @Date 4:31 下午 2025/4/9
+ * @param datalist
+ * @param access_token
+ * @param queryCursor
+ * @param dataTime
+ * @return void
+ **/
+ private void sendBusinessData(JSONArray datalist, String access_token, Integer queryCursor, String dataTime) {
+ String url = dataUrl+access_token;
+ JSONObject dayabody = new JSONObject();
+ dayabody.put("accessKey",accessKey);
+ long timestamp = System.currentTimeMillis();
+ dayabody.put("timestamp",timestamp);
+ JSONObject queryParams = new JSONObject();
+ queryParams.put("page",queryCursor);
+ queryParams.put("size",size);
+ //queryParams.put("kprqq",dataTime);
+ //queryParams.put("kprqz",dataTime);
+ queryParams.put("taxNo",taxNo);
+ dayabody.put("queryParams",queryParams);
+ Map parametersMap = new HashMap<>();
+ parametersMap.put("accessKey",accessKey);
+ parametersMap.put("timestamp",timestamp);
+ String a = YzfSignUtil.signRequest(parametersMap,accessSecret);
+ dayabody.put("sign",a);
+ Map headers = new HashMap<>();
+ headers.put("Content-Type", "application/json; charset=utf-8");
+ String returndata = sendPost(url, headers, dayabody.toJSONString());
+
+ if (returndata != null && JSONObject.isValidObject(returndata)) {
+ JSONObject dataJson = JSONObject.parseObject(returndata);
+ if(dataJson != null && dataJson.getString("code") != null && "0".equals( dataJson.getString("code"))){
+ JSONObject data = dataJson.getJSONObject("result");
+ if(data != null ){
+ JSONArray businessList = data.getJSONArray("data");
+ if(data.getInteger("total") > queryCursor*size){
+ queryCursor = queryCursor+1;
+ sendBusinessData(datalist, access_token, queryCursor, dataTime);
+ }
+ if(businessList != null && businessList.size() > 0){
+ datalist.addAll(businessList);
+ }
+ }
+ }
+ }
+ }
+
+ private String getOAToken(String name) {
+ String url = "http://60.204.152.210/seeyon/rest/token";
+ Map headers = null;
+ String bodys = "{\"password\":\"a5ce21b8-91db-4cec-b3e3-3e44719655fd\",\"userName\":\"hzyaRest\",\"loginName\":\""+name+"\"}";
+ String tokenData = sendPost(url, headers, bodys);
+ String access_token = null;
+ if (tokenData != null && JSONObject.isValidObject(tokenData)) {
+ JSONObject tokendataJson = JSONObject.parseObject(tokenData);
+ if (tokendataJson != null && tokendataJson.getString("id") != null) {
+ access_token = tokendataJson.getString("id");
+ }
+ }
+ return access_token;
+ }
+ /**
+ * @Author lvleigang
+ * @Description 获取token
+ * @Date 4:18 下午 2025/4/9
+ * @param
+ * @return java.lang.String
+ **/
+ private String getToken() {
+ String url = tokenUrl;
+ JSONObject tokenJson = new JSONObject();
+ tokenJson.put("accessKey",accessKey);
+ tokenJson.put("accessSecret",accessSecret);
+ String bodys = tokenJson.toJSONString();
+ StringBuilder body = new StringBuilder();
+ SSLContext sslContext = null;
+ try {
+ sslContext = new SSLContextBuilder()
+ .loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
+ .build();
+ } catch (Exception e) {
+ return null;
+ }
+ CloseableHttpClient closeableHttpClient = HttpClients.custom()
+ .setSSLContext(sslContext)
+ .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .build();
+
+ HttpPost post = new HttpPost(url);
+ CloseableHttpResponse response = null;
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(6000).build();
+ post.setConfig(requestConfig);//设置请求参数【超时时间】
+ post.setHeader("Content-Type", "application/json; charset=utf-8");
+ try {
+ if (bodys != null && !"".equals(bodys)) {
+ ByteArrayEntity entity = new ByteArrayEntity(bodys.getBytes("UTF-8"));
+ entity.setContentType("application/json");
+ post.setEntity(entity);
+ }
+ response = closeableHttpClient.execute(post);
+
+ HttpEntity entity = response.getEntity();
+ body.append(EntityUtils.toString(entity, "UTF-8"));
+ } catch (Exception e) {
+ body.append(e.getMessage());
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ logger.info("token返回结果{}",body);
+ JSONObject bodyJson = JSONObject.parseObject(body.toString());
+ if(bodyJson.getString("code") == null || !"0".equals(bodyJson.getString("code"))){
+ return null;
+ }
+ JSONObject resultJson = bodyJson.getJSONObject("result");
+ if(resultJson == null){
+ return null;
+ }
+ if(resultJson.getString("accessToken") != null && !"".equals(resultJson.getString("accessToken"))){
+ return resultJson.getString("accessToken");
+ }
+ return null;
+ }
+
+ private String sendPost(String url, Map headers, String bodys) {
+ logger.info("url:"+url+"。bodys:"+bodys);
+
+ SSLContext sslContext = null;
+ try {
+ sslContext = new SSLContextBuilder()
+ .loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
+ .build();
+ } catch (Exception e) {
+
+ }
+ CloseableHttpClient closeableHttpClient = HttpClients.custom()
+ .setSSLContext(sslContext)
+ .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .build();
+ HttpPost post = new HttpPost(url);
+ CloseableHttpResponse response = null;
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build();
+ post.setConfig(requestConfig);//设置请求参数【超时时间】
+ if (headers != null && headers.size() > 0) {
+ for (String key : headers.keySet()) {
+ post.setHeader(key, headers.get(key));
+ }
+ }
+ StringBuilder body = new StringBuilder();
+ try {
+ if (bodys != null && !"".equals(bodys)) {
+ ByteArrayEntity entity = new ByteArrayEntity(bodys.getBytes("UTF-8"));
+ entity.setContentType("application/json");
+ post.setEntity(entity);
+ }
+ response = closeableHttpClient.execute(post);
+ HttpEntity entity = response.getEntity();
+ body.append(EntityUtils.toString(entity, "UTF-8"));
+ logger.info("返回结果:" + body);
+ } catch (Exception e) {
+ logger.error("请求错误:" + e.getMessage());
+ body = new StringBuilder();
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ logger.info("url:"+url+"。bodys:"+bodys+"。body"+body);
+
+ return body.toString();
+ }
+ private String sendGet(String url, Map headers) {
+ SSLContext sslContext = null;
+ try {
+ sslContext = new SSLContextBuilder()
+ .loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
+ .build();
+ } catch (Exception e) {
+
+ }
+ CloseableHttpClient closeableHttpClient = HttpClients.custom()
+ .setSSLContext(sslContext)
+ .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .build();
+ // HttpClient
+ HttpGet get = new HttpGet(url);
+ CloseableHttpResponse response = null;
+
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build();
+ get.setConfig(requestConfig);//设置请求参数【超时时间】
+ if (headers != null && headers.size() > 0) {
+ for (String key : headers.keySet()) {
+ get.setHeader(key, headers.get(key));
+ }
+ }
+ StringBuilder body = new StringBuilder();
+
+ try {
+ response = closeableHttpClient.execute(get);
+ HttpEntity entity = response.getEntity();
+ body.append(EntityUtils.toString(entity,"UTF-8"));
+ logger.info("返回结果:" + body);
+ } catch (Exception e) {
+ logger.error("请求错误:" + e.getMessage());
+ body.append(e.getMessage());
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return body.toString();
+ }
+
+
+ /**
+ * seeyon流程事件监听前置方法,绑定数据源
+ * @param entity
+ * @return
+ * @throws Exception
+ */
+ @Override
+ public SysExtensionApiEntity setData(SysExtensionApiEntity entity) throws Exception {
+ try {
+ JSONObject sendBody = new JSONObject();
+ String bodys = entity.getBodys();
+ Map headers = entity.getHeaders();
+ JSONObject jsonObject = JSONObject.parseObject(bodys);
+ String loginName = "hzya";
+ String dataXml = getXml(jsonObject);
+ //处理xml数据
+ String oaToken = getOAToken(loginName);
+ headers.put("token",oaToken);
+ sendBody.put("token",oaToken);
+ sendBody.put("loginName",loginName);
+ sendBody.put("dataXml",dataXml);
+ entity.setBodys(sendBody.toJSONString());
+ //修改明细表
+ if(jsonObject.getString("htbh") != null){
+ IncomeInvoiceEntity incomeInvoiceEntity = new IncomeInvoiceEntity();
+ incomeInvoiceEntity.setDataSourceCode("master");//todo
+ //incomeInvoiceEntity.setDataSourceCode("HT-OA");//todo
+ incomeInvoiceEntity.setField0003(jsonObject.getString("htbh"));//合同号
+ incomeInvoiceEntity.setField0127(jsonObject.getString("fpdm"));//发票代码
+ incomeInvoiceEntity.setField0128(jsonObject.getString("fphm"));//发票号码
+ incomeInvoiceEntity.setField0129(jsonObject.getString("jshj"));//发票总额
+ incomeInvoiceEntity.setField0130(jsonObject.getString("fpwj"));//发票文件 todo
+ List list = incomeInvoiceDao.queryOaZb(incomeInvoiceEntity);
+ if(list != null && list.size() == 1){
+ incomeInvoiceEntity.setFormmainId(list.get(0).getDataId());
+ }
+ List mxlist = incomeInvoiceDao.queryOaMx(incomeInvoiceEntity);
+ if(mxlist != null && mxlist.size() == 1){
+ incomeInvoiceEntity.setDataId(mxlist.get(0).getDataId());
+ incomeInvoiceDao.updateMx(incomeInvoiceEntity);
+ }
+ if(mxlist == null || mxlist.size() == 0){
+ incomeInvoiceEntity.setDataId(1);
+ incomeInvoiceDao.saveMx(incomeInvoiceEntity);
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return entity;
+ }
+
+
+
+ private String getXml(JSONObject jsonObject) {
+ StringBuffer stringBuffer = new StringBuffer();
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("fpdm") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("fphm") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("kprq") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("xfsh") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("xfmc") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("gfsh") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("gfmc") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("hjje") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("hjse") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("jshj") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("jym") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("xfdzdh") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("xfyhzh") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("gfdzdh") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("gfyhzh") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("bz") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("jqbh") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("jdhm") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("kpr") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("skr") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("fhr") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("htbm") != null?"":"");
+ stringBuffer.append("").append("");
+
+ stringBuffer.append("").append("");
+ stringBuffer.append(jsonObject.getString("fpwj") != null?"":"");
+ stringBuffer.append("").append("");
+
+
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+
+ JSONArray jsonArray = JSONArray.parseArray(jsonObject.getString("mdm_fp_detail"));
+ if(jsonArray != null&& jsonArray.size() > 0){
+ for (int i = 0; i < jsonArray.size(); i++) {
+ JSONObject detailObject = jsonArray.getJSONObject(i);
+ stringBuffer.append("");
+ stringBuffer.append("").append(detailObject.getString("xh") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("ssflbm") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("xmmc") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("ggxh") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("dw") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("sl") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("dj") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("je") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("slv") != null?"":"").append("");
+ stringBuffer.append("").append(detailObject.getString("se") != null?"":"").append("");
+ stringBuffer.append("
");
+ }
+ }
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+ stringBuffer.append("");
+
+ return stringBuffer.toString();
+ }
+
+
+ /**
+ * @Author lvleigang
+ * @Description 财报数据推送
+ * @Date 4:28 下午 2025/4/16
+ * @param requestJson
+ * @return com.hzya.frame.web.entity.JsonResultEntity
+ **/
+ @Override
+ public JsonResultEntity sendFinancialReportPlugin(JSONObject requestJson) {
+
+ logger.error("财报数据推送入参"+requestJson.toJSONString());
+ JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
+ JSONObject businessDataStr = jsonStr.getJSONObject("businessDataStr");
+ String eventType = jsonStr.getString("eventType");
+ switch (eventType) {
+ case "onProcessFinished"://流程结束事件,同步物料到U8C
+ if(businessDataStr.getString("dataType") == null){//数据类型
+ return BaseResult.getFailureMessageEntity("数据类型为空");
+ }
+ if(businessDataStr.getString("dataType").equals("1")){//科目余额
+
+ }
+ if(businessDataStr.getString("dataType").equals("2")){//财报
+ String ztbm = businessDataStr.getString("ztCode");//账套编码
+ String cjzq = businessDataStr.getString("period");//采集账期
+ String rwbm = businessDataStr.getString("taskNo");//任务编码
+ if(ztbm == null || "".equals(ztbm)){
+ return BaseResult.getFailureMessageEntity("账套编码为空");
+ }
+ if(cjzq == null || "".equals(cjzq)){
+ return BaseResult.getFailureMessageEntity("采集账期为空");
+ }
+ if(rwbm == null || "".equals(rwbm)){
+ return BaseResult.getFailureMessageEntity("任务编码为空");
+ }
+ taskExecutor.execute(() -> sendFinancialReport(ztbm,cjzq,rwbm));
+ return BaseResult.getSuccessMessageEntity("数据获取成功");
+ }
+ if(businessDataStr.getString("dataType").equals("3")){//进项发票
+ return BaseResult.getFailureMessageEntity("数据类型错误");
+ }
+ if(businessDataStr.getString("dataType").equals("4")){//销项发票
+ return BaseResult.getFailureMessageEntity("数据类型错误");
+ }
+ return BaseResult.getSuccessMessageEntity("推送数据成功");
+ default:
+ return BaseResult.getFailureMessageEntity("未匹配到流程监听事件!当前传入的eventType:" + eventType);
+ }
+
+
+
+ }
+
+
+ /**
+ * @Author lvleigang
+ * @Description
+ * @Date 3:18 下午 2025/4/24
+ * @param ztbm 账套编码
+ * @param cjzq 采集账期
+ * @param rwbm 任务编码
+ * @return com.hzya.frame.web.entity.JsonResultEntity
+ **/
+ private JsonResultEntity sendFinancialReport(String ztbm ,String cjzq,String rwbm) {
+ String access_token = getToken();
+ if (access_token == null) {
+ return BaseResult.getFailureMessageEntity("token获取失败");
+ }
+ String url = cbUrl+access_token;
+
+ Date date = null;
+ String qncjzq = null;
+ IncomeInvoiceEntity dyAloneId = null;
+ JSONObject dydata = null;
+ JSONObject qndata = null;
+ IncomeInvoiceEntity qnAloneId = null;
+
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
+ try {
+ date = sdf.parse(cjzq);
+ } catch (ParseException e) {
+ return BaseResult.getSuccessMessageEntity("采集账期格式错误");
+ }
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.add(Calendar.YEAR, -1);
+ Date qn = calendar.getTime();
+ qncjzq = sdf.format(qn);
+
+ //查询当月帐套组织
+ IncomeInvoiceEntity jnentity = new IncomeInvoiceEntity();
+ jnentity.setDataSourceCode("htBip");
+ jnentity.setSysData(cjzq);
+ jnentity.setOrgCode(ztbm);
+ List jnlist = incomeInvoiceDao.queryZtzz(jnentity);
+ if(jnlist != null && jnlist.size() == 1){
+ dyAloneId = jnlist.get(0);
+ }else {
+ return BaseResult.getSuccessMessageEntity("未查询到当月的财报数据,不推送");
+ }
+ //查询去年当帐套组织
+ IncomeInvoiceEntity qnentity = new IncomeInvoiceEntity();
+ qnentity.setDataSourceCode("htBip");
+ qnentity.setSysData(qncjzq);
+ qnentity.setOrgCode(ztbm);
+ List qnlist = incomeInvoiceDao.queryZtzz(qnentity);
+ if(qnlist != null && qnlist.size() == 1){
+ qnAloneId = qnlist.get(0);
+ }else {
+ logger.info("未查询到去年当期的财报数据");
+ }
+
+ //查询当月的财报数据
+ IncomeInvoiceEntity jnquerydata = new IncomeInvoiceEntity();
+ jnquerydata.setDataSourceCode("htBip");
+ jnquerydata.setAloneId(dyAloneId.getAloneId());
+ List dydataList = incomeInvoiceDao.queryByAloneId(jnquerydata);
+ if(dydataList != null && dydataList.size() == 1){
+ dydata = dydataList.get(0);
+ }else {
+ return BaseResult.getSuccessMessageEntity("未查询到当月的财报数据,不推送");
+ }
+ //查询去年当期的财报数据
+ if(qnAloneId != null){
+ //查找去年数据
+ IncomeInvoiceEntity qnquerydata = new IncomeInvoiceEntity();
+ qnquerydata.setDataSourceCode("htBip");
+ qnquerydata.setAloneId(qnAloneId.getAloneId());
+ List qndataList = incomeInvoiceDao.queryByAloneId(qnquerydata);
+ if(qndataList != null && qndataList.size() == 1){
+ qndata = qndataList.get(0);
+ }
+ }
+ //拼接数据
+ JSONObject sendData = new JSONObject();
+ sendData.put("accessKey",accessKey);
+ long timestamp = System.currentTimeMillis();
+ sendData.put("timestamp",timestamp);
+ sendData.put("taskNo",rwbm);
+ sendData.put("period",cjzq);
+
+ JSONArray reportList = new JSONArray();
+ JSONObject zcfzb = new JSONObject();//资产负债表1:期末余额 2:年初余额
+ zcfzb.put("period",cjzq);
+ zcfzb.put("reportType",1);
+ JSONArray reportSubjects1 = new JSONArray();
+ setDataToArray("货币资金",dydata.getString("AM10251"),dydata.getString("AM10250"),reportSubjects1);
+ setDataToArray("短期借款",dydata.getString("AM10249"),dydata.getString("AM10248"),reportSubjects1);
+ setDataToArray("交易性金融资产",dydata.getString("BMPQW10U"),dydata.getString("BMP81A2Z"),reportSubjects1);
+ setDataToArray("以公允价值计量且其变动计入当期损益的金融负债",dydata.getString("AM10227"),dydata.getString("AM10226"),reportSubjects1);
+ setDataToArray("应收票据",dydata.getString("AM10189"),dydata.getString("AM10188"),reportSubjects1);
+ setDataToArray("应付票据",dydata.getString("AM10187"),dydata.getString("AM10186"),reportSubjects1);
+ setDataToArray("应收账款",dydata.getString("AM10171"),dydata.getString("AM10170"),reportSubjects1);
+ setDataToArray("应付账款",dydata.getString("AM10169"),dydata.getString("AM10168"),reportSubjects1);
+ setDataToArray("减:坏账准备",dydata.getString("AM10153"),dydata.getString("AM10152"),reportSubjects1);
+ setDataToArray("预收款项",dydata.getString("AM10151"),dydata.getString("AM10150"),reportSubjects1);
+ setDataToArray("预付款项",dydata.getString("AM10135"),dydata.getString("AM10134"),reportSubjects1);
+ setDataToArray("合同负债",dydata.getString("AM10133"),dydata.getString("AM10132"),reportSubjects1);
+ setDataToArray("应收利息",dydata.getString("AM10117"),dydata.getString("AM10116"),reportSubjects1);
+ setDataToArray("应付职工薪酬",dydata.getString("AM10115"),dydata.getString("AM10114"),reportSubjects1);
+ setDataToArray("应收股利",dydata.getString("AM10099"),dydata.getString("AM10098"),reportSubjects1);
+ setDataToArray("应交税费",dydata.getString("AM10097"),dydata.getString("AM10096"),reportSubjects1);
+ setDataToArray("其他应收款",dydata.getString("AM10081"),dydata.getString("AM10080"),reportSubjects1);
+ setDataToArray("应付利息",dydata.getString("AM10079"),dydata.getString("AM10078"),reportSubjects1);
+ setDataToArray("减:坏账准备",dydata.getString("AM10063"),dydata.getString("AM10062"),reportSubjects1);
+ setDataToArray("应付股利",dydata.getString("AM10061"),dydata.getString("AM10060"),reportSubjects1);
+ setDataToArray("存货",dydata.getString("AM10048"),dydata.getString("AM10047"),reportSubjects1);
+ setDataToArray("其他应付款",dydata.getString("AM10046"),dydata.getString("AM10045"),reportSubjects1);
+ setDataToArray("合同资产",dydata.getString("AM10033"),dydata.getString("AM10032"),reportSubjects1);
+ setDataToArray("其他流动资产",dydata.getString("AM10348"),dydata.getString("AM10347"),reportSubjects1);
+ setDataToArray("长期借款",dydata.getString("AM10316"),dydata.getString("AM10315"),reportSubjects1);
+ setDataToArray("应付债券",dydata.getString("AM10301"),dydata.getString("AM10300"),reportSubjects1);
+ setDataToArray("债权投资",dydata.getString("AM10288"),dydata.getString("AM10287"),reportSubjects1);
+ setDataToArray("长期应收款",dydata.getString("AM10268"),dydata.getString("AM10266"),reportSubjects1);
+ setDataToArray("长期股权投资",dydata.getString("AM10246"),dydata.getString("AM10244"),reportSubjects1);
+ setDataToArray("租赁负债",dydata.getString("AM10242"),dydata.getString("AM10241"),reportSubjects1);
+ setDataToArray("长期应付款",dydata.getString("AM10220"),dydata.getString("AM10219"),reportSubjects1);
+ setDataToArray("其他非流动金融资产",dydata.getString("BMS13DPL"),dydata.getString("BM6TFKPL"),reportSubjects1);
+ setDataToArray("专项应付款",dydata.getString("AM10198"),dydata.getString("AM10197"),reportSubjects1);
+ setDataToArray("投资性房地产",dydata.getString("AM10224"),dydata.getString("AM10222"),reportSubjects1);
+ setDataToArray("预计负债",dydata.getString("AM10180"),dydata.getString("AM10179"),reportSubjects1);
+ setDataToArray("递延收益",dydata.getString("AM10162"),dydata.getString("AM10161"),reportSubjects1);
+ setDataToArray("递延所得税负债",dydata.getString("AM10144"),dydata.getString("AM10143"),reportSubjects1);
+ setDataToArray("固定资产",dydata.getString("AM10202"),dydata.getString("AM10200"),reportSubjects1);
+ setDataToArray("减:累计折旧",dydata.getString("AM10184"),dydata.getString("AM10182"),reportSubjects1);
+ setDataToArray("减:固定资产减值准备",dydata.getString("AM10166"),dydata.getString("AM10164"),reportSubjects1);
+ setDataToArray("在建工程",dydata.getString("AM10148"),dydata.getString("AM10146"),reportSubjects1);
+ setDataToArray("实收资本(或股本)",dydata.getString("AM10054"),dydata.getString("AM10053"),reportSubjects1);
+ setDataToArray("工程物资",dydata.getString("AM10130"),dydata.getString("AM10128"),reportSubjects1);
+ setDataToArray("固定资产清理",dydata.getString("AM10112"),dydata.getString("AM10110"),reportSubjects1);
+ setDataToArray("资本公积",dydata.getString("AM10354"),dydata.getString("AM10352"),reportSubjects1);
+ setDataToArray("使用权资产",dydata.getString("AM10058"),dydata.getString("AM10056"),reportSubjects1);
+ setDataToArray("减:库存股",dydata.getString("AM10339"),dydata.getString("AM10337"),reportSubjects1);
+ setDataToArray("减:累计折旧",dydata.getString("AM10043"),dydata.getString("AM10041"),reportSubjects1);
+ setDataToArray("减:使用权资产减值准备",dydata.getString("AM10028"),dydata.getString("AM10026"),reportSubjects1);
+ setDataToArray("盈余公积",dydata.getString("AM10309"),dydata.getString("AM10307"),reportSubjects1);
+ setDataToArray("无形资产",dydata.getString("AM10013"),dydata.getString("AM10011"),reportSubjects1);
+ setDataToArray("未分配利润",dydata.getString("AM10294"),dydata.getString("AM10292"),reportSubjects1);
+ setDataToArray("减:累计摊销",dydata.getString("CM10002"),dydata.getString("CM10000"),reportSubjects1);
+ setDataToArray("减:无形资产减值准备",dydata.getString("AM10342"),dydata.getString("AM10340"),reportSubjects1);
+ setDataToArray("开发支出",dydata.getString("AM10327"),dydata.getString("AM10325"),reportSubjects1);
+ setDataToArray("商誉",dydata.getString("AM10312"),dydata.getString("AM10310"),reportSubjects1);
+ setDataToArray("长期待摊费用",dydata.getString("AM10297"),dydata.getString("AM10295"),reportSubjects1);
+ setDataToArray("递延所得税资产",dydata.getString("AM10283"),dydata.getString("AM10281"),reportSubjects1);
+ setDataToArray("其他非流动资产",dydata.getString("AM10259"),dydata.getString("AM10257"),reportSubjects1);
+
+
+ zcfzb.put("reportSubjects",reportSubjects1);
+
+ JSONObject llb = new JSONObject();//利润表1:本年累计 2:上年累计
+ llb.put("period",cjzq);
+ llb.put("reportType",2);
+ JSONArray reportSubjects2 = new JSONArray();
+
+ setDataToArray("一、营业收入",dydata.getString("AM10267"),qndata.getString("AM10267"),reportSubjects2);
+ setDataToArray("其中:主营业务收入",dydata.getString("AM10245"),qndata.getString("AM10245"),reportSubjects2);
+ setDataToArray("其他业务收入",dydata.getString("AM10223"),qndata.getString("AM10223"),reportSubjects2);
+ setDataToArray("减:营业成本",dydata.getString("AM10201"),qndata.getString("AM10201"),reportSubjects2);
+ setDataToArray("其中:主营业务成本",dydata.getString("AM10183"),qndata.getString("AM10183"),reportSubjects2);
+ setDataToArray("其他业务成本",dydata.getString("AM10165"),qndata.getString("AM10165"),reportSubjects2);
+ setDataToArray("税金及附加",dydata.getString("AM10147"),qndata.getString("AM10147"),reportSubjects2);
+ setDataToArray("销售费用",dydata.getString("AM10129"),qndata.getString("AM10129"),reportSubjects2);
+ setDataToArray("管理费用",dydata.getString("AM10111"),qndata.getString("AM10111"),reportSubjects2);
+ setDataToArray("财务费用(收益以\"-\"号填列)",dydata.getString("AM10093"),qndata.getString("AM10093"),reportSubjects2);
+ setDataToArray("其中:利息费用",dydata.getString("AM10075"),qndata.getString("AM10075"),reportSubjects2);
+ setDataToArray("利息收入",dydata.getString("AM10057"),qndata.getString("AM10057"),reportSubjects2);
+ setDataToArray("研发费用",dydata.getString("AM10042"),qndata.getString("AM10042"),reportSubjects2);
+ setDataToArray("资产减值损失",dydata.getString("AM10027"),qndata.getString("AM10027"),reportSubjects2);
+ setDataToArray("信用减值损失",dydata.getString("AM10012"),qndata.getString("AM10012"),reportSubjects2);
+ setDataToArray("加:公允价值变动净收益(净损失以\"-\"号填列)",dydata.getString("CM10003"),qndata.getString("CM10003"),reportSubjects2);
+ setDataToArray("投资净收益(净损失以\"-\"号填列)",dydata.getString("AM10343"),qndata.getString("AM10343"),reportSubjects2);
+ setDataToArray("资产处置收益(净损失以\"-\"号填列)",dydata.getString("AM10328"),qndata.getString("AM10328"),reportSubjects2);
+ setDataToArray("其他收益",dydata.getString("AM10313"),qndata.getString("AM10313"),reportSubjects2);
+ setDataToArray("二、营业利润",dydata.getString("AM10298"),qndata.getString("AM10298"),reportSubjects2);
+ setDataToArray("加:营业外收入",dydata.getString("AM10282"),qndata.getString("AM10282"),reportSubjects2);
+ setDataToArray("减:营业外支出",dydata.getString("AM10258"),qndata.getString("AM10258"),reportSubjects2);
+ setDataToArray("三、利润总额(亏损总额以“-”号填列)",dydata.getString("AM10236"),qndata.getString("AM10236"),reportSubjects2);
+ setDataToArray("减:所得税费用",dydata.getString("AM10214"),qndata.getString("AM10214"),reportSubjects2);
+ setDataToArray("四、净利润(净亏损以“-”号填列)",dydata.getString("AM10193"),qndata.getString("AM10193"),reportSubjects2);
+
+ llb.put("reportSubjects",reportSubjects2);
+
+ JSONObject xjll = new JSONObject();//现金流量表1:本年累计 2:上年累计
+ xjll.put("period",cjzq);
+ xjll.put("reportType",3);
+ JSONArray reportSubjects3 = new JSONArray();
+ setDataToArray("销售商品、提供劳务收到的现金",dydata.getString("AM10240"),qndata.getString("AM10240"),reportSubjects3);
+ setDataToArray("收到的税费返还",dydata.getString("AM10218"),qndata.getString("AM10218"),reportSubjects3);
+ setDataToArray("收到的其他与经营活动有关的现金",dydata.getString("AM10196"),qndata.getString("AM10196"),reportSubjects3);
+ setDataToArray("现金收入小计",dydata.getString("AM10160"),qndata.getString("AM10160"),reportSubjects3);
+ setDataToArray("购买商品、接受劳务支付的现金",dydata.getString("AM10142"),qndata.getString("AM10142"),reportSubjects3);
+ setDataToArray("支付给职工以及为职工支付的现金",dydata.getString("AM10124"),qndata.getString("AM10124"),reportSubjects3);
+ setDataToArray("支付的各项税费",dydata.getString("AM10106"),qndata.getString("AM10106"),reportSubjects3);
+ setDataToArray("支付的其他与经营活动有关的现金",dydata.getString("AM10088"),qndata.getString("AM10088"),reportSubjects3);
+ setDataToArray("现金流出小计",dydata.getString("AM10052"),qndata.getString("AM10052"),reportSubjects3);
+ setDataToArray("经营活动产生的现金流量净额",dydata.getString("AM10022"),qndata.getString("AM10022"),reportSubjects3);
+ setDataToArray("收回投资所收到的现金",dydata.getString("AM10353"),qndata.getString("AM10353"),reportSubjects3);
+ setDataToArray("取得投资收益所收到的现金",dydata.getString("AM10338"),qndata.getString("AM10338"),reportSubjects3);
+ setDataToArray("处置固定资产、无形资产和其他长期资产所收回的现金净额",dydata.getString("AM10323"),qndata.getString("AM10323"),reportSubjects3);
+ setDataToArray("处置子公司及其他营业单位收到的现金净额",dydata.getString("AM10308"),qndata.getString("AM10308"),reportSubjects3);
+ setDataToArray("收到的其他与投资活动有关的现金",dydata.getString("AM10293"),qndata.getString("AM10293"),reportSubjects3);
+ setDataToArray("现金流入小计",dydata.getString("AM10277"),qndata.getString("AM10277"),reportSubjects3);
+ setDataToArray("购建固定资产、无形资产和其他长期资产所支付的现金",dydata.getString("AM10253"),qndata.getString("AM10253"),reportSubjects3);
+ setDataToArray("投资所支付的现金",dydata.getString("AM10231"),qndata.getString("AM10231"),reportSubjects3);
+ setDataToArray("取得子公司及其他营业单位收到的现金净额",dydata.getString("AM10209"),qndata.getString("AM10209"),reportSubjects3);
+ setDataToArray("其他与投资有关",dydata.getString("AM10191"),qndata.getString("AM10191"),reportSubjects3);
+ setDataToArray("现金流出小计",dydata.getString("AM10173"),qndata.getString("AM10173"),reportSubjects3);
+ setDataToArray("投资活动产生的现金流量净额",dydata.getString("AM10155"),qndata.getString("AM10155"),reportSubjects3);
+ setDataToArray("吸收投资所收到的现金",dydata.getString("AM10119"),qndata.getString("AM10119"),reportSubjects3);
+ setDataToArray("子公司吸收少数股东投资收到的现金",dydata.getString("AM10101"),qndata.getString("AM10101"),reportSubjects3);
+ setDataToArray("借贷所收到现金",dydata.getString("AM10083"),qndata.getString("AM10083"),reportSubjects3);
+ setDataToArray("发行债券收到的现金",dydata.getString("AM10065"),qndata.getString("AM10065"),reportSubjects3);
+ setDataToArray("收到的其他与筹资活动有关的现金",dydata.getString("AM10050"),qndata.getString("AM10050"),reportSubjects3);
+ setDataToArray("现金流入小计",dydata.getString("AM10035"),qndata.getString("AM10035"),reportSubjects3);
+ setDataToArray("偿还债务所支付的现金",dydata.getString("AM10020"),qndata.getString("AM10020"),reportSubjects3);
+ setDataToArray("分配股利、利润、偿付利息所支付的现金",dydata.getString("AM10005"),qndata.getString("AM10005"),reportSubjects3);
+ setDataToArray("支付的其他与筹资活动有关的现金",dydata.getString("AM10350"),qndata.getString("AM10350"),reportSubjects3);
+ setDataToArray("现金流出小计",dydata.getString("AM10335"),qndata.getString("AM10335"),reportSubjects3);
+ setDataToArray("筹资活动产生的现金流量净额",dydata.getString("AM10320"),qndata.getString("AM10320"),reportSubjects3);
+ setDataToArray("四、汇率变动对现金流量的影响",dydata.getString("AM10305"),qndata.getString("AM10305"),reportSubjects3);
+ setDataToArray("五、现金及现金等价物净增加额",dydata.getString("AM10290"),qndata.getString("AM10290"),reportSubjects3);
+
+ xjll.put("reportSubjects",reportSubjects3);
+
+ reportList.add(zcfzb);
+ reportList.add(llb);
+ reportList.add(xjll);
+
+ sendData.put("reportList",reportList);
+ String a = YzfSignUtil.signRequest(sendData,accessSecret);
+ sendData.put("sign",a);
+
+ Map headers = new HashMap<>();
+ headers.put("Content-Type", "application/json; charset=utf-8");
+ String returndata = sendPost(url, headers, sendData.toJSONString());
+
+ if (returndata != null && JSONObject.isValidObject(returndata)) {
+ JSONObject dataJson = JSONObject.parseObject(returndata);
+ if(dataJson != null && dataJson.getString("code") != null && "0".equals( dataJson.getString("code"))){
+ JSONObject data = dataJson.getJSONObject("result");
+ if(data != null ){
+ if(data != null && data.getString("resultCode") != null && "0".equals( data.getString("resultCode"))){
+ return BaseResult.getSuccessMessageEntity("执行成功");
+ }else {
+ return BaseResult.getFailureMessageEntity("发送失败:"+data.getString("message"));
+ }
+ }else {
+ return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
+ }
+ }else {
+ return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
+ }
+ }else {
+ return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
+ }
+ }
+
+ private void setDataToArray(String subjectName, String value,String value2, JSONArray reportSubjects) {
+ if(value != null && !"".equals(value)){
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("subjectName",subjectName);
+ jsonObject.put("value",new BigDecimal(value));
+ jsonObject.put("valueType",1);
+ reportSubjects.add(jsonObject);
+ }
+ if(value2 != null && !"".equals(value2)){
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("subjectName",subjectName);
+ jsonObject.put("value",new BigDecimal(value2));
+ jsonObject.put("valueType",2);
+ reportSubjects.add(jsonObject);
+ }
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java
index beb4c48e..f79b7098 100644
--- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java
@@ -470,9 +470,10 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
}
}
}else {//执行正常下发
-
+ logger.info("==========开始执行正常主数据下发=============");
//查询主数据
MdmModuleEntity queryMdmModuleEntity = new MdmModuleEntity();
+ queryMdmModuleEntity.setMdmCode(10050L);
queryMdmModuleEntity.setSts("Y");
List mdmModuleEntities = mdmModuleDao.queryBase(queryMdmModuleEntity);
if(mdmModuleEntities == null || mdmModuleEntities.size() == 0){
@@ -509,13 +510,17 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
queryFildRule.setRuleCode("service");
List mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
- //新增
- doAdd(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
- //修改
- doUpdate(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
- //删除
- doDelete(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
-
+ if(mdmModuleEntities.get(i).getMdmCode()!= 10045L){
+ //新增
+ doAdd(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+ //修改
+ doUpdate(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+ //删除
+ doDelete(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
+ }else{
+ logger.info("主数据编码为10045,已经在业务数据下发执行,主数据下发不执行");
+ continue;
+ }
}
}
@@ -739,7 +744,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
map1.put("tableName",mainDb);
//map1.put("dataStatus", "F");
map1.put("updateStatus", "0");
- map1.put("size", 50);
+ //map1.put("size", 50);
objects = mdmModuleDao.queryMdmSTs(map1);
objects = toLowerCaseKeys(objects);
@@ -827,6 +832,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
/** body */
String bodys = doObjects.get(i).toJSONString();
if(scriptEntity != null && scriptEntity.getId() != null ){
+ logger.info("=========开始执行正常主数据修改下发脚本,第一次==============");
groovy.put("code",scriptEntity.getScriptCode());
groovy.put("className",scriptEntity.getClassName());
groovy.put("name",scriptEntity.getScriptName());
@@ -854,6 +860,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
headers.putAll(header);
}
if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
+ logger.info("=========正常主数据修改开始执行登录接口==============");
//找到登陆接口
SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
if (null == loginApi) {
@@ -874,12 +881,15 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
continue;
}
JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
+ logger.info("=======主数据正常修改下发登录返回数据:{}========",attritube.toJSONString());
querys = getQuery(apiEntity,querys,attritube);
headers = getHeaders(apiEntity,headers,attritube);
bodys = getBodys(apiEntity,bodys,attritube);
}
//组装数据发送
+ logger.info("=========开始执行主业务修改数据下发脚本,第二次==============");
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
+ logger.info("=====主数据修改下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
if(jsonResultEntity.isFlag()){
//保存日志
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
@@ -911,7 +921,8 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
* @param mdmModuleDistributeEntities
* @return void
**/
- private void doAdd(String mdmId,Long mainCode,List mdmModuleDbEntities, List mdmModuleDistributeEntities,List mdmModuleDbFiledsRuleEntities,List mdmModuleDbFiledsEntities ) throws Exception {
+ private void
+ doAdd(String mdmId,Long mainCode,List mdmModuleDbEntities, List mdmModuleDistributeEntities,List mdmModuleDbFiledsRuleEntities,List mdmModuleDbFiledsEntities ) throws Exception {
//查询一千条数据
String mainDb = null;
List objects = new ArrayList<>();
@@ -927,7 +938,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
map1.put("tableName",mainDb);
//map1.put("dataStatus", "Y");
map1.put("addStatus", "0");
- map1.put("size", 50);
+ //map1.put("size", 50);
objects = mdmModuleDao.queryMdmSTs(map1);
objects = toLowerCaseKeys(objects);
@@ -999,6 +1010,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
mdmModuleSendLogEntity.setOptionType("1");
Integer num = mdmModuleSendLogDao.getCount(mdmModuleSendLogEntity);
if(num > 0){//已经新增过不发送
+ objects.get(i).put("sendsanfzt123",true);
continue;
}
getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
@@ -1029,6 +1041,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
/** body */
String bodys = doObjects.get(i).toJSONString();
if(scriptEntity != null && scriptEntity.getId() != null ){
+ logger.info("=========开始执行正常主数据新增下发脚本,第一次==============");
groovy.put("code",scriptEntity.getScriptCode());
groovy.put("className",scriptEntity.getClassName());
groovy.put("name",scriptEntity.getScriptName());
@@ -1056,6 +1069,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
headers.putAll(header);
}
if (SysEnum.NEED_LOGIN.getValue().equals(apiEntity.getNeedLogin())) {
+ logger.info("=========正常主数据新增开始执行登录接口==============");
//找到登陆接口
SysApplicationApiEntity loginApi = sysApplicationApiDao.get(apiEntity.getAuthenticationPort());
if (null == loginApi) {
@@ -1076,15 +1090,19 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
continue;
}
JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
+ logger.info("=======主数据正常新增下发登录返回数据:{}========",attritube.toJSONString());
querys = getQuery(apiEntity,querys,attritube);
headers = getHeaders(apiEntity,headers,attritube);
bodys = getBodys(apiEntity,bodys,attritube);
}
//组装数据发送
+ logger.info("=========开始执行主业务新增数据下发脚本,第二次==============");
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
+ logger.info("=====主数据新增下发返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
if(jsonResultEntity.isFlag()){
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
+ logger.info("=========开始执行主数据新增返回脚本==============");
JSONObject backScriptJson = new JSONObject();
backScriptJson.put("data", jsonResultEntity.getAttribute());
groovy.put("code", scriptEntity.getScriptCode()+"back");
@@ -1124,11 +1142,13 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
//保存日志
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
objects.get(i).put("sendsanfzt123",true);
+ logger.info("========主数据新增下发完成,日志保存为成功============");
continue;
}else {
//保存日志
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
objects.get(i).put("sendsanfzt123",false);
+ logger.info("========主数据新增下发完成,日志保存为失败============");
continue;
}
}
@@ -1136,7 +1156,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
//所有下发发送完成,修改数据状态
for (int i = 0; i < objects.size(); i++) {
- if(objects.get(i).getBoolean("sendsanfzt123")){
+ if(objects.get(i).getString("sendsanfzt123") != null && objects.get(i).getBoolean("sendsanfzt123")){
Map updateMap = new HashMap<>();
updateMap.put("tableName",mainDb);
//updateMap.put("dataStatus", "Y");
@@ -1490,4 +1510,4 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
}
return jsonObjects;
}
-}
+}
\ No newline at end of file
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/dao/IZjgjDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/dao/IZjgjDao.java
new file mode 100644
index 00000000..4dc50e3a
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/dao/IZjgjDao.java
@@ -0,0 +1,12 @@
+package com.hzya.frame.plugin.zxBank.dao;
+
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.plugin.zxBank.entity.ZjgjEntity;
+
+/**
+ * @Description 资金归集
+ * @Author xiangerlin
+ * @Date 2025/4/11 11:07
+ **/
+public interface IZjgjDao extends IBaseDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/dao/impl/ZjgjDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/dao/impl/ZjgjDaoImpl.java
new file mode 100644
index 00000000..71655a29
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/dao/impl/ZjgjDaoImpl.java
@@ -0,0 +1,15 @@
+package com.hzya.frame.plugin.zxBank.dao.impl;
+
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.plugin.zxBank.dao.IZjgjDao;
+import com.hzya.frame.plugin.zxBank.entity.ZjgjEntity;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Description 资金归集
+ * @Author xiangerlin
+ * @Date 2025/4/11 11:07
+ **/
+@Repository()
+public class ZjgjDaoImpl extends MybatisGenericDao implements IZjgjDao {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/entity/ZjgjEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/entity/ZjgjEntity.java
new file mode 100644
index 00000000..3df95f41
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/entity/ZjgjEntity.java
@@ -0,0 +1,11 @@
+package com.hzya.frame.plugin.zxBank.entity;
+
+import com.hzya.frame.web.entity.BaseEntity;
+
+/**
+ * @Description 资金归集
+ * @Author xiangerlin
+ * @Date 2025/4/11 11:04
+ **/
+public class ZjgjEntity extends BaseEntity {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/entity/ZjgjEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/entity/ZjgjEntity.xml
new file mode 100644
index 00000000..fc6e9287
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/entity/ZjgjEntity.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZjgjPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZjgjPluginInitializer.java
new file mode 100644
index 00000000..80ff4468
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZjgjPluginInitializer.java
@@ -0,0 +1,97 @@
+package com.hzya.frame.plugin.zxBank.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @Description 资金归集审批结果通知司库
+ * @Author xiangerlin
+ * @Date 2025/4/11 09:48
+ **/
+public class ZjgjPluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(getClass());
+ /***
+ * 插件初始化方法
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 10:48
+ * @Param []
+ * @return void
+ **/
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ /****
+ * 插件销毁方法
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ /****
+ * 插件的ID
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginId() {
+ return "ZjgjPluginInitializer";
+ }
+
+ /****
+ * 插件的名称
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginName() {
+ return "OA资金归集审批结果回传司库";
+ }
+
+ /****
+ * 插件的显示值
+ * @author 👻👻👻👻👻👻👻👻 gjh
+ * @date 2023-08-02 10:48
+ * @return void
+ **/
+ @Override
+ public String getPluginLabel() {
+ return "OA资金归集审批结果回传司库";
+ }
+
+ /***
+ * 插件类型 1、场景插件
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-02 14:01
+ * @Param []
+ * @return java.lang.String
+ **/
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+
+ /***
+ * 执行业务代码
+ * @Author 👻👻👻👻👻👻👻👻 gjh
+ * @Date 2023-08-07 11:20
+ * @param requestJson 执行业务代码的参数
+ * @return void
+ **/
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
+ logger.info("======开始执OA资金归集审批结果回传司库插件======");
+
+ return null;
+ }
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankDistributePluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankDistributePluginInitializer.java
index 7ace1f25..32edad78 100644
--- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankDistributePluginInitializer.java
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankDistributePluginInitializer.java
@@ -21,6 +21,7 @@ import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistribu
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
import com.hzya.frame.mdm.service.IMdmServiceCache;
+import com.hzya.frame.seeyon.zxbank.service.IZxBankService;
import com.hzya.frame.sys.sysenum.SysEnum;
import com.hzya.frame.sysnew.application.api.dao.ISysApplicationApiDao;
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
@@ -31,7 +32,6 @@ import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntit
import com.hzya.frame.sysnew.grovy.service.IGroovyIntegrationService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
-import com.hzya.frame.sysnew.zxbank.service.IZxBankService;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
@@ -474,6 +474,7 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
//查询主数据
MdmModuleEntity queryMdmModuleEntity = new MdmModuleEntity();
queryMdmModuleEntity.setSts("Y");
+ queryMdmModuleEntity.setMdmCode(Long.valueOf("10048"));
List mdmModuleEntities = mdmModuleDao.queryBase(queryMdmModuleEntity);
if(mdmModuleEntities == null || mdmModuleEntities.size() == 0){
return BaseResult.getSuccessMessageEntity("主数据未设置,不需要下发");
@@ -508,18 +509,12 @@ public class ZxBankDistributePluginInitializer extends PluginBaseEntity {
queryFildRule.setMdmId(mdmModuleEntities.get(i).getId());
queryFildRule.setRuleCode("service");
List mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
-
- if(mdmModuleEntities.get(i).getMdmCode()!= 10045L){
//新增
doAdd(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
//修改
doUpdate(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
//删除
doDelete(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
- }else{
- logger.info("主数据编码为10045,已经在业务数据下发执行,主数据下发不执行");
- continue;
- }
}
}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankElecPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankElecPluginInitializer.java
new file mode 100644
index 00000000..6c812a88
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankElecPluginInitializer.java
@@ -0,0 +1,57 @@
+package com.hzya.frame.plugin.zxBank.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.seeyon.zxbank.service.IZxBankService;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ZxBankElecPluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(ZxBankElecPluginInitializer.class);
+ @Autowired
+ private IZxBankService zxBankService;
+
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ @Override
+ public String getPluginId() {
+ return "ZxBankElecPluginInitializer";
+ }
+
+ @Override
+ public String getPluginName() {
+ return "ZxBankElecPluginInitializer插件";
+ }
+
+ @Override
+ public String getPluginLabel() {
+ return "ZxBankElecPluginInitializer";
+ }
+
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) {
+ try {
+ logger.info("======开始执行杭泰付款单查询电子回单并下载电子回单========");
+ return zxBankService.queryArchivesElec(requestJson);
+ }catch (Exception e){
+ logger.info("======执行杭泰付款单查询电子回单并下载电子回单失败:{}========",e.getMessage());
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankPluginInitializer.java
index 2eb03f95..65d0c3fc 100644
--- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankPluginInitializer.java
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankPluginInitializer.java
@@ -2,9 +2,7 @@ package com.hzya.frame.plugin.zxBank.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
-import com.hzya.frame.plugin.masterData.plugin.MdmPluginInitializer;
-import com.hzya.frame.sysnew.comparison.masterData.service.IMasterDataService;
-import com.hzya.frame.sysnew.zxbank.service.IZxBankService;
+import com.hzya.frame.seeyon.zxbank.service.IZxBankService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankResultPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankResultPluginInitializer.java
index 9a9c901a..399e1989 100644
--- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankResultPluginInitializer.java
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankResultPluginInitializer.java
@@ -2,7 +2,7 @@ package com.hzya.frame.plugin.zxBank.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
-import com.hzya.frame.sysnew.zxbank.service.IZxBankService;
+import com.hzya.frame.seeyon.zxbank.service.IZxBankService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/service/IZjgjService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/service/IZjgjService.java
new file mode 100644
index 00000000..a42a2557
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/service/IZjgjService.java
@@ -0,0 +1,12 @@
+package com.hzya.frame.plugin.zxBank.service;
+
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.plugin.zxBank.entity.ZjgjEntity;
+
+/**
+ * @Description 资金归集
+ * @Author xiangerlin
+ * @Date 2025/4/11 11:03
+ **/
+public interface IZjgjService extends IBaseService {
+}
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/service/impl/ZjgjServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/service/impl/ZjgjServiceImpl.java
new file mode 100644
index 00000000..a257f567
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/service/impl/ZjgjServiceImpl.java
@@ -0,0 +1,19 @@
+package com.hzya.frame.plugin.zxBank.service.impl;
+
+import com.hzya.frame.basedao.service.impl.BaseService;
+import com.hzya.frame.plugin.zxBank.entity.ZjgjEntity;
+import com.hzya.frame.plugin.zxBank.service.IZjgjService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description
+ * @Author xiangerlin
+ * @Date 2025/4/11 11:04
+ **/
+@Service
+public class ZjgjServiceImpl extends BaseService implements IZjgjService {
+ Logger logger = LogManager.getLogger(getClass());
+
+}
diff --git a/base-buildpackage/src/main/resources/application-dev.yml b/base-buildpackage/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..4121bb71
--- /dev/null
+++ b/base-buildpackage/src/main/resources/application-dev.yml
@@ -0,0 +1,42 @@
+#######################dev环境#######################
+logging:
+ #日志级别 指定目录级别
+ level:
+ root: warn
+ encodings: GBK
+ file:
+ # 日志保存路径
+ path: /home/webservice/zt/log
+spring:
+ datasource:
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
+ username: root
+ password: bd993088e8a7c3dc5f44441617f9b4bf
+ driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+savefile:
+ # 文件保存路径
+ path: /home/webservice/zt/file
+# path: D:\webservice\file
+# pluginpath: D:\webservice\plugin
+ pluginpath: /home/webservice/zt/plugin
+# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
+ tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
+cbs8:
+ appId: 1P4AGrpz
+ appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
+ url: https://cbs8-openapi-reprd.csuat.cmburl.cn
+ # 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
+ ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
+ # 这个私钥到时候上传到cbs,和下面到是同一对
+ #ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
+ ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
+ cbs_public_key: 0469146F06BF3B01236E84632441E826
+ #电子回单下载临时存放位置
+ elec_path: /Users/xiangerlin/Downloads/
+OA:
+ data_source_code: yc_oa
+zt:
+ url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
diff --git a/base-buildpackage/src/main/resources/application-ht.yml b/base-buildpackage/src/main/resources/application-ht.yml
index 9188fd1d..3f014426 100644
--- a/base-buildpackage/src/main/resources/application-ht.yml
+++ b/base-buildpackage/src/main/resources/application-ht.yml
@@ -6,15 +6,15 @@ logging:
encodings: UTF-8
file:
# 日志保存路径
- path: /home/webservice/zt/log
+ path: D:\yongansystem\serverV3\log\zs
spring:
datasource:
dynamic:
datasource:
master:
- url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter_ht?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
+ url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
- password: 62e4295b615a30dbf3b8ee96f41c820b
+ password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
@@ -39,4 +39,21 @@ cbs8:
OA:
data_source_code: yc_oa
zt:
- url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
\ No newline at end of file
+ url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
+file_oa:
+ url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterfacefileUpload
+#税务pdf附件下载存放路径
+invoice_pdf:
+ url: D:\yongansystem\invoice\pdf\
+#税务ofd附件下载存放路径
+invoice_ofd:
+ url: D:\yongansystem\invoice\ofd\
+zx:
+ # 生产用这个 这个是银行给的
+ privateKey: MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgOHOzaKWBWOAbslvtYtS8tcQiJ9W9DT2cGQM3KSgXpfygCgYIKoEcz1UBgi2hRANCAAQNPct0MHOuDrVJBIy0RI7JKx9/PTlFHZlkIJr0EqpC+b/+N+z3JKbCMZ/wcP1V36Q+DlfDJCY9Ai/Uk2PZ9ZaF
+ publicKey: MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEDT3LdDBzrg61SQSMtESOySsffz05RR2ZZCCa9BKqQvm//jfs9ySmwjGf8HD9Vd+kPg5XwyQmPQIv1JNj2fWWhQ==
+# 云帐房配置
+yzf:
+ accessKey: 6X3B526P5HqE6ums
+ accessSecret: 34e5fc32ac894a2ba2ade8c3852c7a0a
+ baseUrl: http://oapi.nanofintax.com
\ No newline at end of file
diff --git a/base-buildpackage/src/main/resources/application-httest.yml b/base-buildpackage/src/main/resources/application-httest.yml
new file mode 100644
index 00000000..e76f67c7
--- /dev/null
+++ b/base-buildpackage/src/main/resources/application-httest.yml
@@ -0,0 +1,46 @@
+#######################dev环境#######################
+logging:
+ #日志级别 指定目录级别
+ level:
+ root: INFO
+ encodings: UTF-8
+ file:
+ # 日志保存路径
+ path: D:\yongansystem\serverV3\log\test
+spring:
+ datasource:
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:mysql://127.0.0.1:3307/businesscenter_test?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
+ username: root
+ password: bd993088e8a7c3dc5f44441617f9b4bf
+ driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+savefile:
+ # 文件保存路径
+ path: /home/webservice/zt/file
+# path: D:\webservice\file
+# pluginpath: D:\webservice\plugin
+ pluginpath: /home/webservice/zt/plugin
+# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
+ tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
+cbs8:
+ appId: 1P4AGrpz
+ appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
+ url: https://cbs8-openapi-reprd.csuat.cmburl.cn
+ # 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
+ ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
+ # 这个私钥到时候上传到cbs,和下面到是同一对
+ #ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
+ ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
+ cbs_public_key: 0469146F06BF3B01236E84632441E826
+ #电子回单下载临时存放位置
+ elec_path: /Users/xiangerlin/Downloads/
+OA:
+ data_source_code: yc_oa
+zt:
+ url: http://127.0.0.1:10087/kangarooDataCenterV3/entranceController/externalCallInterface
+zx:
+ # 测试用这个 这个是银行给的
+ privateKey: MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgtzMo2o6THK3yLIm+83Ch/560+02l2hjjBSFGieWY/Z6gCgYIKoEcz1UBgi2hRANCAATKhwZX4P3XI8vYTKeCOLMVbanUNbaXjrIEZynshwdOzRVgzRQSiPNWo6OBBkAPvqE+2RS+5ABpS82DSlKl81z0
+ publicKey: MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEyocGV+D91yPL2EyngjizFW2p1DW2l46yBGcp7IcHTs0VYM0UEojzVqOjgQZAD76hPtkUvuQAaUvNg0pSpfNc9A==
\ No newline at end of file
diff --git a/base-buildpackage/src/main/resources/application-llg.yml b/base-buildpackage/src/main/resources/application-llg.yml
new file mode 100644
index 00000000..03cdf7ee
--- /dev/null
+++ b/base-buildpackage/src/main/resources/application-llg.yml
@@ -0,0 +1,82 @@
+#######################本地环境#######################
+logging:
+ #日志级别 指定目录级别
+ level:
+ root: info
+ encodings: UTF-8
+ file:
+ # 日志保存路径
+ path: /Users/apple/Desktop/log/local
+spring:
+ data:
+ mongodb:
+# host: 192.168.2.237
+# port: 27017
+# database: businesscenter
+# auto-index-creation: true
+# password: hzya1314
+# username: hzya
+ flyway:
+ # 启动flyway migration, 默认为true
+ enabled: false
+ datasource:
+ dynamic:
+ druid:
+ filters: stat,log4j2
+ datasource:
+ master:
+# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
+# username: hzyazt
+# password: 62e4295b615a30dbf3b8ee96f41c820b
+# driver-class-name: dm.jdbc.driver.DmDriver
+# type: com.alibaba.druid.pool.DruidDataSource
+ url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
+ username: root
+ password: bd993088e8a7c3dc5f44441617f9b4bf
+ driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
+# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
+# username: hzyazt
+# password: 62e4295b615a30dbf3b8ee96f41c820b
+# driver-class-name: dm.jdbc.driver.DmDriver
+savefile:
+ # 文件保存路径
+ path: /Users/apple/Desktop/log/local
+ tomcatpath: /Users/apple/Desktop/log/local
+ pluginpath: /Users/apple/Desktop/log/local
+zt:
+ url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
+cbs8:
+ appId: 1P4AGrpz
+ appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
+ url: https://cbs8-openapi-reprd.csuat.cmburl.cn
+ # 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
+ ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
+ # 这个私钥到时候上传到cbs,和下面到是同一对
+ #ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
+ ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
+ cbs_public_key: 0469146F06BF3B01236E84632441E826
+ #电子回单下载临时存放位置
+ elec_path: /Users/xiangerlin/Downloads/
+OA:
+ data_source_code: yc_oa
+server:
+ port: 10086
+
+# mysqldump -d mylm -hhzya.ufyct.com -p9096 -uroot -phzya1314 >%dirName%\table_view.sql
+
+
+database:
+ databaseName: businesscenter
+ host: 192.168.2.237
+ port: 3306
+ username: root
+ password: hzya@1314
+ filePase: /Users/apple/Desktop/log
+ fileName: data.sql
+#sftp:
+# host: 192.168.2.237
+# port: 9091
+# username: cs237
+# password: hzya@1314
+# filePase: /databaseBack
diff --git a/base-buildpackage/src/main/resources/application-xel.yml b/base-buildpackage/src/main/resources/application-xel.yml
new file mode 100644
index 00000000..32f34dbb
--- /dev/null
+++ b/base-buildpackage/src/main/resources/application-xel.yml
@@ -0,0 +1,43 @@
+#######################本地环境#######################
+logging:
+ #日志级别 指定目录级别
+ level:
+ root: info
+ encodings: UTF-8
+ file:
+# 日志保存路径
+ path: /Users/xiangerlin/work/app/logs/dev
+spring:
+ datasource:
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
+ username: root
+ password: bd993088e8a7c3dc5f44441617f9b4bf
+ driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+savefile:
+ # 文件保存路径
+ path: /Users/xiangerlin/work/app/file/dev
+ pluginpath: /Users/xiangerlin/work/app/file/dev
+ tomcatpath: /Users/xiangerlin/work/app/file/dev
+cbs8:
+ appId: 1P4AGrpz
+ appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
+ url: https://cbs8-openapi-reprd.csuat.cmburl.cn
+ # 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
+ ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
+ # 这个私钥到时候上传到cbs,和下面到是同一对
+ #ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
+ ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
+ cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
+ #电子回单下载临时存放位置
+ elec_path: /Users/xiangerlin/Downloads/
+OA:
+ data_source_code: yc-test
+zt:
+ url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
+yzf:
+ accessKey: 6X3B526P5HqE6ums
+ accessSecret: 34e5fc32ac894a2ba2ade8c3852c7a0a
+ baseUrl: http://oapi.nanofintax.com
diff --git a/base-buildpackage/src/main/resources/application.yml b/base-buildpackage/src/main/resources/application.yml
index b87e5bf7..a0bbeaae 100644
--- a/base-buildpackage/src/main/resources/application.yml
+++ b/base-buildpackage/src/main/resources/application.yml
@@ -1,5 +1,5 @@
server:
- port: 10086
+ port: 9999
servlet:
context-path: /kangarooDataCenterV3
localIP: 127.0.0.1
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/contract/pluginCfg.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/contract/pluginCfg.xml
new file mode 100644
index 00000000..6c8f8261
--- /dev/null
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/contract/pluginCfg.xml
@@ -0,0 +1,6 @@
+
+
+ContractAuditPluginInitializer
+ContractAuditPluginInitializer插件
+25033101
+
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/contract/spring/spring-buildpackage-plugin.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/contract/spring/spring-buildpackage-plugin.xml
new file mode 100644
index 00000000..aea3fc4b
--- /dev/null
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/contract/spring/spring-buildpackage-plugin.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/ht/spring/spring-buildpackage-plugin.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/ht/spring/spring-buildpackage-plugin.xml
index 53c83b62..6758f61b 100644
--- a/base-buildpackage/src/main/resources/cfgHome/plugin/ht/spring/spring-buildpackage-plugin.xml
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/ht/spring/spring-buildpackage-plugin.xml
@@ -1,6 +1,9 @@
-
+
+
+
+
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/pluginCfg.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/pluginCfg.xml
new file mode 100644
index 00000000..4fe837f2
--- /dev/null
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/pluginCfg.xml
@@ -0,0 +1,6 @@
+
+
+IncomeInvoicePlugin
+IncomeInvoicePlugin插件
+202404080001
+
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-dao.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-dao.xml
new file mode 100644
index 00000000..52a288d1
--- /dev/null
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-dao.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-plugin.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-plugin.xml
new file mode 100644
index 00000000..2c2856fe
--- /dev/null
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-plugin.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-service.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-service.xml
new file mode 100644
index 00000000..68ce3bce
--- /dev/null
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/incomeInvoiceData/spring/spring-buildpackage-service.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/zxBank/spring/spring-buildpackage-plugin.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/zxBank/spring/spring-buildpackage-plugin.xml
index ca361062..845017ce 100644
--- a/base-buildpackage/src/main/resources/cfgHome/plugin/zxBank/spring/spring-buildpackage-plugin.xml
+++ b/base-buildpackage/src/main/resources/cfgHome/plugin/zxBank/spring/spring-buildpackage-plugin.xml
@@ -2,4 +2,7 @@
+
+
+
diff --git a/base-buildpackage/src/test/java/com/hzya/frame/Test1.java b/base-buildpackage/src/test/java/com/hzya/frame/Test1.java
new file mode 100644
index 00000000..2dc1c8ee
--- /dev/null
+++ b/base-buildpackage/src/test/java/com/hzya/frame/Test1.java
@@ -0,0 +1,49 @@
+package com.hzya.frame;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.plugin.cinvoice.plugin.CInvoiceImportPluginInitializer;
+import com.hzya.frame.plugin.contract.plugin.ContractAuditPluginInitializer;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.junit.Test;
+
+import javax.annotation.Resource;
+
+/**
+ * @Description
+ * @Author xiangerlin
+ * @Date 2025/4/1 09:12
+ **/
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {WebappApplication.class})
+public class Test1 {
+
+
+ @Resource
+ private ContractAuditPluginInitializer contractPlugin;
+ @Resource
+ private CInvoiceImportPluginInitializer cInvoiceImportPluginInitializer;
+ @Test
+ public void contractAuditPluginTest(){
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("sourceCode","HT-OA");
+ try {
+ contractPlugin.executeBusiness(jsonObject);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ //发票批量导入
+ @Test
+ public void cinvoicePluginTest(){
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("sourceCode","HT-OA");
+ try {
+ cInvoiceImportPluginInitializer.executeBusiness(jsonObject);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java b/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java
index 825925b0..f801ee65 100644
--- a/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java
+++ b/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java
@@ -2,23 +2,34 @@ package com.hzya.frame;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.seeyon.util.YzfSignUtil;
+import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
import com.hzya.frame.util.AESUtil;
+import com.hzya.frame.web.entity.BaseResult;
import org.apache.http.HttpEntity;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
+import javax.net.ssl.SSLContext;
import java.io.IOException;
+import java.lang.reflect.Method;
+import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -36,7 +47,7 @@ public class temButtom {
@Test
public void test01() {
- String a = AESUtil.encrypt("hzya@1314");
+ String a = AESUtil.encrypt("hzya1314");
System.out.println(a);
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
System.out.println(b);
@@ -50,32 +61,31 @@ public class temButtom {
// task7803207f54ff047d6008dcce31c2628f 新增成功!
// 2024-10-24 2024-10-24
- String phone ="19357235324";
- String taskid ="task8b0c7ca72439bc9b0c1c89e8866c8275";
+ String phone = "19357235324";
+ String taskid = "task8b0c7ca72439bc9b0c1c89e8866c8275";
//token
Map headers = new HashMap<>();
- String token ="https://oapi.dingtalk.com/gettoken?appkey=dingxewtjaserj292ggu&appsecret=DuRw6EEEvhGXfr6Q8wN_x4025qKjrffIGCXF9KeCKKIID-LVSsR6_8KWMei6sug1";
- String body = sendGet(token,headers);
+ String token = "https://oapi.dingtalk.com/gettoken?appkey=dingxewtjaserj292ggu&appsecret=DuRw6EEEvhGXfr6Q8wN_x4025qKjrffIGCXF9KeCKKIID-LVSsR6_8KWMei6sug1";
+ String body = sendGet(token, headers);
JSONObject tokenobject = JSONObject.parseObject(body);
//钉钉id
headers = new HashMap<>();
//https://oapi.dingtalk.com/user/get_by_mobile?access_token=9abd3996cb103ba48dd8c69fea5473e7&mobile=15700100840
- String ddid ="https://oapi.dingtalk.com/user/get_by_mobile?access_token="+tokenobject.get("access_token")+"&mobile="+phone;
- String ddidbody = sendGet(ddid,headers);
+ String ddid = "https://oapi.dingtalk.com/user/get_by_mobile?access_token=" + tokenobject.get("access_token") + "&mobile=" + phone;
+ String ddidbody = sendGet(ddid, headers);
JSONObject ddidobject = JSONObject.parseObject(ddidbody);
//人员id
headers = new HashMap<>();
//https://oapi.dingtalk.com/user/get?userid=111336474727636213&access_token=3d21a6614fb037a98542a537336e8149
- String userid ="https://oapi.dingtalk.com/user/get?userid="+ddidobject.get("userid")+"&access_token="+tokenobject.get("access_token");
- String useridbody = sendGet(userid,headers);
+ String userid = "https://oapi.dingtalk.com/user/get?userid=" + ddidobject.get("userid") + "&access_token=" + tokenobject.get("access_token");
+ String useridbody = sendGet(userid, headers);
JSONObject useridobject = JSONObject.parseObject(useridbody);
-
CloseableHttpClient httpClient = HttpClients.createDefault();
- HttpPut httpPut = new HttpPut("https://api.dingtalk.com/v1.0/todo/users/"+useridobject.get("unionid")+"/tasks/"+taskid);
+ HttpPut httpPut = new HttpPut("https://api.dingtalk.com/v1.0/todo/users/" + useridobject.get("unionid") + "/tasks/" + taskid);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000).setConnectionRequestTimeout(35000).setSocketTimeout(60000).build();
httpPut.setConfig(requestConfig);
httpPut.setHeader("Content-type", "application/json");
@@ -122,7 +132,7 @@ public class temButtom {
response = closeableHttpClient.execute(get);
HttpEntity entity = response.getEntity();
- body.append(EntityUtils.toString(entity,"UTF-8"));
+ body.append(EntityUtils.toString(entity, "UTF-8"));
} catch (Exception e) {
body.append(e.getMessage());
} finally {
@@ -143,4 +153,154 @@ public class temButtom {
}
+ @Test
+ public void test0111() {
+ //请求token
+ String accessToken = getToken();
+ //请求分页查询全量进项发票
+ String data = getdata(accessToken);
+
+
+ }
+
+ @Test
+ public void youduTest(){
+ long timestamp = System.currentTimeMillis();
+ System.out.println("时间戳:"+timestamp);
+ Map parametersMap = new HashMap<>();
+ parametersMap.put("accessKey","6X3B526P5HqE6ums");
+ parametersMap.put("timestamp",timestamp);
+
+ String a = YzfSignUtil.signRequest(parametersMap,"34e5fc32ac894a2ba2ade8c3852c7a0a");
+ System.out.println("sign"+a);
+ }
+ private String getdata(String accessToken) {
+ String url = "http://oapi.nanofintax.com/api/invoice_receive/fp/v1/query?accessToken="+accessToken;
+ JSONObject dayabody = new JSONObject();
+ dayabody.put("accessKey","6X3B526P5HqE6ums");
+ long timestamp = System.currentTimeMillis();
+ dayabody.put("timestamp",timestamp);
+ JSONObject queryParams = new JSONObject();
+ queryParams.put("page",1);
+ queryParams.put("size",50);
+ //queryParams.put("kprqq","2025-04-06");
+ //queryParams.put("kprqz","2025-04-06");
+ queryParams.put("taxNo","91330110MAC5FPUY2U");
+ dayabody.put("queryParams",queryParams);
+ Map parametersMap = new HashMap<>();
+ parametersMap.put("accessKey","6X3B526P5HqE6ums");
+ parametersMap.put("timestamp",timestamp);
+
+ String a = YzfSignUtil.signRequest(parametersMap,"34e5fc32ac894a2ba2ade8c3852c7a0a");
+ dayabody.put("sign",a);
+
+ StringBuilder body = new StringBuilder();
+ SSLContext sslContext = null;
+ try {
+ sslContext = new SSLContextBuilder()
+ .loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
+ .build();
+ } catch (Exception e) {
+
+ }
+ CloseableHttpClient closeableHttpClient = HttpClients.custom()
+ .setSSLContext(sslContext)
+ .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .build();
+
+ HttpPost post = new HttpPost(url);
+ CloseableHttpResponse response = null;
+
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(6000).build();
+ post.setConfig(requestConfig);//设置请求参数【超时时间】
+ post.setHeader("Content-Type", "application/json; charset=utf-8");
+
+ try {
+ if (dayabody.toJSONString() != null && !"".equals(dayabody.toJSONString())) {
+ ByteArrayEntity entity = new ByteArrayEntity(dayabody.toJSONString().getBytes("UTF-8"));
+ entity.setContentType("application/json");
+ post.setEntity(entity);
+ }
+ response = closeableHttpClient.execute(post);
+
+ HttpEntity entity = response.getEntity();
+ body.append(EntityUtils.toString(entity, "UTF-8"));
+ } catch (Exception e) {
+ body.append(e.getMessage());
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ System.out.println("body"+body);
+
+ return body.toString();
+ }
+
+ private String getToken() {
+ String url = "http://oapi.nanofintax.com/api/getToken";
+ String bodys = "{\"accessKey\":\"6X3B526P5HqE6ums\",\"accessSecret\":\"34e5fc32ac894a2ba2ade8c3852c7a0a\"}";
+ StringBuilder body = new StringBuilder();
+ SSLContext sslContext = null;
+ try {
+ sslContext = new SSLContextBuilder()
+ .loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
+ .build();
+ } catch (Exception e) {
+
+ }
+ CloseableHttpClient closeableHttpClient = HttpClients.custom()
+ .setSSLContext(sslContext)
+ .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .build();
+
+ HttpPost post = new HttpPost(url);
+ CloseableHttpResponse response = null;
+
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(6000).build();
+ post.setConfig(requestConfig);//设置请求参数【超时时间】
+ post.setHeader("Content-Type", "application/json; charset=utf-8");
+
+ try {
+ if (bodys != null && !"".equals(bodys)) {
+ ByteArrayEntity entity = new ByteArrayEntity(bodys.getBytes("UTF-8"));
+ entity.setContentType("application/json");
+ post.setEntity(entity);
+ }
+ response = closeableHttpClient.execute(post);
+
+ HttpEntity entity = response.getEntity();
+ body.append(EntityUtils.toString(entity, "UTF-8"));
+ } catch (Exception e) {
+ body.append(e.getMessage());
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ System.out.println("body"+body);
+ String accessToken = JSONObject.parseObject(body.toString()).getJSONObject("result").getString("accessToken");
+
+ return accessToken;
+ }
}
diff --git a/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/ApplicationCache.java b/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/ApplicationCache.java
index 16daadce..e8482db9 100644
--- a/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/ApplicationCache.java
+++ b/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/ApplicationCache.java
@@ -64,6 +64,9 @@ public class ApplicationCache {
case "2": //
o = applicationApiMap.get(key);
break;
+ case "5": //
+ o = applicationApiMap.get(key);
+ break;
case "3": //
o = applicationApiAuthMap.get(key);
break;
@@ -96,6 +99,7 @@ public class ApplicationCache {
if(receiveApiList != null && receiveApiList.size() > 0){
for (int i = 0; i < receiveApiList.size(); i++) {
applicationApiMap.put("appId"+receiveApiList.get(i).getAppId()+"apiCode"+receiveApiList.get(i).getApiCode(), receiveApiList.get(i));
+ applicationApiMap.put("apiId"+receiveApiList.get(i).getId(), receiveApiList.get(i));
}
}
break;
diff --git a/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java b/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java
index ad9976a0..caf670cc 100644
--- a/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java
+++ b/base-service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java
@@ -3055,8 +3055,13 @@ public class SysApplicationServiceImpl extends BaseServicefw-ningbobank-->
-
-
-
-
-
+
+ com.hzya.frame
+ fw-oa
+ ${revision}
+
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/IInvoiceDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/IInvoiceDao.java
new file mode 100644
index 00000000..e8304591
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/IInvoiceDao.java
@@ -0,0 +1,72 @@
+package com.hzya.frame.seeyon.invoice.dao;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
+import com.hzya.frame.seeyon.invoice.entity.InvoiceEntity;
+
+import java.util.HashMap;
+import java.util.List;
+
+public interface IInvoiceDao extends IBaseDao {
+
+ /**
+ *
+ * @content 查询需要推送税务的数据
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-01 15:33
+ * **/
+ List> queryInvoice(String str , MdmModuleSourceEntity entity);
+
+ /**
+ *
+ * @content 查询申请单详情
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-07 14:05
+ * **/
+ List queryInvoiceResult(InvoiceEntity entity);
+
+ /**
+ *
+ * @content 更新推送标识
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-15 15:37
+ * **/
+ Integer updateInvoicePush(InvoiceEntity entity);
+
+ /**
+ *
+ * @content 更新pdf和ofd附件到OA
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-14 10:27
+ * **/
+ Integer updateInvoiceUrl(InvoiceEntity entity);
+
+ /**
+ *
+ * @content 更新发票代码,发票号码以及开票结果
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-14 16:35
+ * **/
+ Integer updateInvoiceResult(InvoiceEntity entity);
+
+ /**
+ *
+ * @content 进项发票推送结果查询(查询发票批量录入结果)
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-17 15:19
+ * **/
+ List queryInputInvoiceResult(InvoiceEntity entity);
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/IInvoiceDetailsDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/IInvoiceDetailsDao.java
new file mode 100644
index 00000000..8a61f896
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/IInvoiceDetailsDao.java
@@ -0,0 +1,20 @@
+package com.hzya.frame.seeyon.invoice.dao;
+
+import com.hzya.frame.basedao.dao.IBaseDao;
+import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
+import com.hzya.frame.seeyon.invoice.entity.InvoiceDetailsEntity;
+
+import java.util.HashMap;
+import java.util.List;
+
+public interface IInvoiceDetailsDao extends IBaseDao {
+ /**
+ *
+ * @content 查询需要推送税务的数据
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-01 15:33
+ * **/
+ List> queryInvoiceDetails(String str , MdmModuleSourceEntity entity);
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/impl/InvoiceDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/impl/InvoiceDaoImpl.java
new file mode 100644
index 00000000..1d189240
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/impl/InvoiceDaoImpl.java
@@ -0,0 +1,65 @@
+package com.hzya.frame.seeyon.invoice.dao.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.execsql.service.IExecSqlService;
+import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
+import com.hzya.frame.seeyon.invoice.dao.IInvoiceDao;
+import com.hzya.frame.seeyon.invoice.entity.InvoiceEntity;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import java.util.HashMap;
+import java.util.List;
+
+@Repository(value = "InvoiceDaoImpl")
+public class InvoiceDaoImpl extends MybatisGenericDao implements IInvoiceDao {
+ @Autowired
+ private IExecSqlService execSqlService;
+
+ private Logger logger = LogManager.getLogger(super.getClass());
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List> queryInvoice(String str, MdmModuleSourceEntity entity) {
+ try {
+ List> hashMaps = execSqlService.execSelectSql(str, "");
+ return hashMaps;
+ }catch (Exception e){
+ logger.info("没有需要推送税务的数据");
+ return null;
+ }
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryInvoiceResult(InvoiceEntity entity) {
+ return (List) super.selectList("queryInvoiceResult",entity);
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public Integer updateInvoicePush(InvoiceEntity entity) {
+ return super.update("updateInvoicePush",entity);
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public Integer updateInvoiceUrl(InvoiceEntity entity) {
+ return super.update("updateInvoiceUrl",entity);
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public Integer updateInvoiceResult(InvoiceEntity entity) {
+ return super.update("updateInvoiceResult",entity);
+ }
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List queryInputInvoiceResult(InvoiceEntity entity) {
+ return (List)super.selectList("queryInputInvoiceResult",entity);
+ }
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/impl/InvoiceDetailsDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/impl/InvoiceDetailsDaoImpl.java
new file mode 100644
index 00000000..55b1b481
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/dao/impl/InvoiceDetailsDaoImpl.java
@@ -0,0 +1,35 @@
+package com.hzya.frame.seeyon.invoice.dao.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.hzya.frame.basedao.dao.MybatisGenericDao;
+import com.hzya.frame.execsql.service.IExecSqlService;
+import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
+import com.hzya.frame.seeyon.invoice.dao.IInvoiceDetailsDao;
+import com.hzya.frame.seeyon.invoice.entity.InvoiceDetailsEntity;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import java.util.HashMap;
+import java.util.List;
+
+@Repository(value ="InvoiceDetailsDaoImpl")
+public class InvoiceDetailsDaoImpl extends MybatisGenericDao implements IInvoiceDetailsDao {
+ @Autowired
+ private IExecSqlService execSqlService;
+
+ private Logger logger = LogManager.getLogger(super.getClass());
+
+ @DS("#entity.dataSourceCode")
+ @Override
+ public List> queryInvoiceDetails(String str, MdmModuleSourceEntity entity) {
+ try {
+ List> hashMaps = execSqlService.execSelectSql(str, "");
+ return hashMaps;
+ }catch (Exception e){
+ logger.info("没有需要推送税务的明细数据");
+ return null;
+ }
+ }
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceDetailsEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceDetailsEntity.java
new file mode 100644
index 00000000..a7bc58fd
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceDetailsEntity.java
@@ -0,0 +1,141 @@
+package com.hzya.frame.seeyon.invoice.entity;
+
+import com.hzya.frame.web.entity.BaseEntity;
+
+public class InvoiceDetailsEntity extends BaseEntity {
+ private String item_no;//明细行编号
+ private String item_name;//商品名称
+ private String tax_cate_code;//税收分类编码,19位
+ private String spec;//规格型号
+ private String unit;//单位
+ private String quantity;//数量
+ private String unit_price;//单价
+ private String price;//金额
+ private String tax_rate;//税率
+ private String zero_flag;//零税率
+ private String tax;//税额
+ private String include_tax_tag;//含税标识
+ private String detail_type;//明细行性质
+ private String enjoy_preferential_flag;//是否享受优惠0 否1是
+ private String preferential_policy_type;//优惠政策类型
+
+ public String getItem_no() {
+ return item_no;
+ }
+
+ public void setItem_no(String item_no) {
+ this.item_no = item_no;
+ }
+
+ public String getItem_name() {
+ return item_name;
+ }
+
+ public void setItem_name(String item_name) {
+ this.item_name = item_name;
+ }
+
+ public String getTax_cate_code() {
+ return tax_cate_code;
+ }
+
+ public void setTax_cate_code(String tax_cate_code) {
+ this.tax_cate_code = tax_cate_code;
+ }
+
+ public String getSpec() {
+ return spec;
+ }
+
+ public void setSpec(String spec) {
+ this.spec = spec;
+ }
+
+ public String getUnit() {
+ return unit;
+ }
+
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
+
+ public String getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(String quantity) {
+ this.quantity = quantity;
+ }
+
+ public String getUnit_price() {
+ return unit_price;
+ }
+
+ public void setUnit_price(String unit_price) {
+ this.unit_price = unit_price;
+ }
+
+ public String getPrice() {
+ return price;
+ }
+
+ public void setPrice(String price) {
+ this.price = price;
+ }
+
+ public String getTax_rate() {
+ return tax_rate;
+ }
+
+ public void setTax_rate(String tax_rate) {
+ this.tax_rate = tax_rate;
+ }
+
+ public String getZero_flag() {
+ return zero_flag;
+ }
+
+ public void setZero_flag(String zero_flag) {
+ this.zero_flag = zero_flag;
+ }
+
+ public String getTax() {
+ return tax;
+ }
+
+ public void setTax(String tax) {
+ this.tax = tax;
+ }
+
+ public String getInclude_tax_tag() {
+ return include_tax_tag;
+ }
+
+ public void setInclude_tax_tag(String include_tax_tag) {
+ this.include_tax_tag = include_tax_tag;
+ }
+
+ public String getDetail_type() {
+ return detail_type;
+ }
+
+ public void setDetail_type(String detail_type) {
+ this.detail_type = detail_type;
+ }
+
+ public String getEnjoy_preferential_flag() {
+ return enjoy_preferential_flag;
+ }
+
+ public void setEnjoy_preferential_flag(String enjoy_preferential_flag) {
+ this.enjoy_preferential_flag = enjoy_preferential_flag;
+ }
+
+ public String getPreferential_policy_type() {
+ return preferential_policy_type;
+ }
+
+ public void setPreferential_policy_type(String preferential_policy_type) {
+ this.preferential_policy_type = preferential_policy_type;
+ }
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceDetailsEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceDetailsEntity.xml
new file mode 100644
index 00000000..4238f173
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceDetailsEntity.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceEntity.java
new file mode 100644
index 00000000..239b0659
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceEntity.java
@@ -0,0 +1,646 @@
+package com.hzya.frame.seeyon.invoice.entity;
+
+import com.hzya.frame.web.entity.BaseEntity;
+
+public class InvoiceEntity extends BaseEntity {
+ private String sfhc;// 是否红冲
+ private String xf;// 销方
+ private String access_key;// 申请开放平台分配的accessKey
+ private String sign;// 加密签名
+ private String timestamp;// 用户发起请求的时间
+ private String serial_number;// 请求唯一流水号
+ private String company_code;// 企业编码
+ private String seller_tax_no;// 企业纳税人识别号
+ private String template_id;// 模版ID,固定值:
+ private String business_no;// 业务单号
+ private String superior_business_no;// 上级业务单号
+ private String buyer_name;// 购买方名称
+ private String buyer_tax_no;// 购买方纳税人识别号
+ private String buyer_addr_phone;// 购买方地址、电话
+ private String buyer_bank_account;// 购买方开户行及账号
+ private String apply_person;// 申请人
+ private String apply_email_notice;// 是否邮件通知申请人 1 是0 否
+ private String buyer_email_notice;// 是否邮件通知购买方 1 是0 否
+ private String workcode;// 申请人工号
+ private String other_email;// 其他发票接收邮箱
+ private String buyer_contact;// 购买方发票邮寄接收联系人名称
+ private String buyer_mobile;// 购买方发票邮寄接收手机号
+ private String buyer_recv_address;// 购买方发票邮寄接收地址
+ private String application_remark;// 申请单其他说明
+ private String attachments;// 附件,文件Url地址列表
+ private String notify_url;// 回调通知地址
+ private String special_invoice_mark;// 特殊票种标识
+ private String seller_name;// 销售方名称
+ private String seller_addr_phone;// 销售方地址、电话
+ private String seller_bank_account;// 销售方银行账号
+ private String extend_fields;// 自定义扩展字段
+ private String invoice_type;// 发票种类示例值
+ private String is_person;// 是否自然人1是默认为否
+ private String levy_tax_type;// 征税方式
+ private String deduction;// 扣除额,差额征税时必填
+ private String remark;// 发票备注
+ private String place;// 地址
+ private String place_of_detail;// 详细地址
+ private String construction_project_name;// 建筑项目名称
+ private String kqysssxbgglbm;// 跨区域涉税事项报验管理編号
+ private String product_no;// 土地增值税项目编号
+ private String cross_distinct_city_flag;// 跨地(市)标志:是,否
+ private String certificate_of_title;// 产权证书/不动产权证号
+ private String area_unit;// 面积
+ private String start_date;// 租赁开始,格式yyyy-MM-dd
+ private String end_date;// 租赁结束,格式yyyy-MM-dd
+ private String original_seller_name;// 原开票企业-销售方名称
+ private String original_seller_tax_no;// 原开票企业-销售方纳税人识别号
+ private String applicant;// 申请方
+ private String deduction_status;// 抵扣状态
+ private String original_invoice_code;// 原发票代码
+ private String original_invoice_number;// 原发票号码
+ private String original_invoice_date;// 原发票开票日期
+ private String original_invoice_price;// 原发票不含税总金额
+ private String red_flush_reason;// 红冲原因
+ private String original_superior_business_no;// 原上级业务单号
+ private String red_letter_info_sheet_no;// 红字信息表编号
+ private String original_invoice_check_ode;// 原发票校验码
+ private String push_status_filed;// 推送标识字段
+ private String invoice_code_field;// 发票代码字段
+ private String invoice_number_field;// 发票号码字段
+ private String url_field;// 发票文件字段
+ private String result_status_field;// 开票结果字段
+ private String push_status;// 推送标识
+ private String invoice_code;// 发票代码
+ private String invoice_number;// 发票号码
+ private String url;// 发票文件
+ private String result_status;// 开票结果
+
+ private String summaryId;//
+ private String input_result_status_filed;//进项发票结果字段
+ private String input_result_status;//进项发票结果
+
+ public String getInput_result_status_filed() {
+ return input_result_status_filed;
+ }
+
+ public void setInput_result_status_filed(String input_result_status_filed) {
+ this.input_result_status_filed = input_result_status_filed;
+ }
+
+ public String getInput_result_status() {
+ return input_result_status;
+ }
+
+ public void setInput_result_status(String input_result_status) {
+ this.input_result_status = input_result_status;
+ }
+
+ public String getSummaryId() {
+ return summaryId;
+ }
+
+ public void setSummaryId(String summaryId) {
+ this.summaryId = summaryId;
+ }
+
+ public String getPush_status_filed() {
+ return push_status_filed;
+ }
+
+ public void setPush_status_filed(String push_status_filed) {
+ this.push_status_filed = push_status_filed;
+ }
+
+ public String getInvoice_code_field() {
+ return invoice_code_field;
+ }
+
+ public void setInvoice_code_field(String invoice_code_field) {
+ this.invoice_code_field = invoice_code_field;
+ }
+
+ public String getInvoice_number_field() {
+ return invoice_number_field;
+ }
+
+ public void setInvoice_number_field(String invoice_number_field) {
+ this.invoice_number_field = invoice_number_field;
+ }
+
+ public String getUrl_field() {
+ return url_field;
+ }
+
+ public void setUrl_field(String url_field) {
+ this.url_field = url_field;
+ }
+
+ public String getResult_status_field() {
+ return result_status_field;
+ }
+
+ public void setResult_status_field(String result_status_field) {
+ this.result_status_field = result_status_field;
+ }
+
+ public String getPush_status() {
+ return push_status;
+ }
+
+ public void setPush_status(String push_status) {
+ this.push_status = push_status;
+ }
+
+ public String getInvoice_code() {
+ return invoice_code;
+ }
+
+ public void setInvoice_code(String invoice_code) {
+ this.invoice_code = invoice_code;
+ }
+
+ public String getInvoice_number() {
+ return invoice_number;
+ }
+
+ public void setInvoice_number(String invoice_number) {
+ this.invoice_number = invoice_number;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getResult_status() {
+ return result_status;
+ }
+
+ public void setResult_status(String result_status) {
+ this.result_status = result_status;
+ }
+
+ public String getSfhc() {
+ return sfhc;
+ }
+
+ public void setSfhc(String sfhc) {
+ this.sfhc = sfhc;
+ }
+
+ public String getXf() {
+ return xf;
+ }
+
+ public void setXf(String xf) {
+ this.xf = xf;
+ }
+
+ public String getAccess_key() {
+ return access_key;
+ }
+
+ public void setAccess_key(String access_key) {
+ this.access_key = access_key;
+ }
+
+ public String getSign() {
+ return sign;
+ }
+
+ public void setSign(String sign) {
+ this.sign = sign;
+ }
+
+ public String getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(String timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ public String getSerial_number() {
+ return serial_number;
+ }
+
+ public void setSerial_number(String serial_number) {
+ this.serial_number = serial_number;
+ }
+
+ public String getCompany_code() {
+ return company_code;
+ }
+
+ public void setCompany_code(String company_code) {
+ this.company_code = company_code;
+ }
+
+ public String getSeller_tax_no() {
+ return seller_tax_no;
+ }
+
+ public void setSeller_tax_no(String seller_tax_no) {
+ this.seller_tax_no = seller_tax_no;
+ }
+
+ public String getTemplate_id() {
+ return template_id;
+ }
+
+ public void setTemplate_id(String template_id) {
+ this.template_id = template_id;
+ }
+
+ public String getBusiness_no() {
+ return business_no;
+ }
+
+ public void setBusiness_no(String business_no) {
+ this.business_no = business_no;
+ }
+
+ public String getSuperior_business_no() {
+ return superior_business_no;
+ }
+
+ public void setSuperior_business_no(String superior_business_no) {
+ this.superior_business_no = superior_business_no;
+ }
+
+ public String getBuyer_name() {
+ return buyer_name;
+ }
+
+ public void setBuyer_name(String buyer_name) {
+ this.buyer_name = buyer_name;
+ }
+
+ public String getBuyer_tax_no() {
+ return buyer_tax_no;
+ }
+
+ public void setBuyer_tax_no(String buyer_tax_no) {
+ this.buyer_tax_no = buyer_tax_no;
+ }
+
+ public String getBuyer_addr_phone() {
+ return buyer_addr_phone;
+ }
+
+ public void setBuyer_addr_phone(String buyer_addr_phone) {
+ this.buyer_addr_phone = buyer_addr_phone;
+ }
+
+ public String getBuyer_bank_account() {
+ return buyer_bank_account;
+ }
+
+ public void setBuyer_bank_account(String buyer_bank_account) {
+ this.buyer_bank_account = buyer_bank_account;
+ }
+
+ public String getApply_person() {
+ return apply_person;
+ }
+
+ public void setApply_person(String apply_person) {
+ this.apply_person = apply_person;
+ }
+
+ public String getApply_email_notice() {
+ return apply_email_notice;
+ }
+
+ public void setApply_email_notice(String apply_email_notice) {
+ this.apply_email_notice = apply_email_notice;
+ }
+
+ public String getBuyer_email_notice() {
+ return buyer_email_notice;
+ }
+
+ public void setBuyer_email_notice(String buyer_email_notice) {
+ this.buyer_email_notice = buyer_email_notice;
+ }
+
+ public String getWorkcode() {
+ return workcode;
+ }
+
+ public void setWorkcode(String workcode) {
+ this.workcode = workcode;
+ }
+
+ public String getOther_email() {
+ return other_email;
+ }
+
+ public void setOther_email(String other_email) {
+ this.other_email = other_email;
+ }
+
+ public String getBuyer_contact() {
+ return buyer_contact;
+ }
+
+ public void setBuyer_contact(String buyer_contact) {
+ this.buyer_contact = buyer_contact;
+ }
+
+ public String getBuyer_mobile() {
+ return buyer_mobile;
+ }
+
+ public void setBuyer_mobile(String buyer_mobile) {
+ this.buyer_mobile = buyer_mobile;
+ }
+
+ public String getBuyer_recv_address() {
+ return buyer_recv_address;
+ }
+
+ public void setBuyer_recv_address(String buyer_recv_address) {
+ this.buyer_recv_address = buyer_recv_address;
+ }
+
+ public String getApplication_remark() {
+ return application_remark;
+ }
+
+ public void setApplication_remark(String application_remark) {
+ this.application_remark = application_remark;
+ }
+
+ public String getAttachments() {
+ return attachments;
+ }
+
+ public void setAttachments(String attachments) {
+ this.attachments = attachments;
+ }
+
+ public String getNotify_url() {
+ return notify_url;
+ }
+
+ public void setNotify_url(String notify_url) {
+ this.notify_url = notify_url;
+ }
+
+ public String getSpecial_invoice_mark() {
+ return special_invoice_mark;
+ }
+
+ public void setSpecial_invoice_mark(String special_invoice_mark) {
+ this.special_invoice_mark = special_invoice_mark;
+ }
+
+ public String getSeller_name() {
+ return seller_name;
+ }
+
+ public void setSeller_name(String seller_name) {
+ this.seller_name = seller_name;
+ }
+
+ public String getSeller_addr_phone() {
+ return seller_addr_phone;
+ }
+
+ public void setSeller_addr_phone(String seller_addr_phone) {
+ this.seller_addr_phone = seller_addr_phone;
+ }
+
+ public String getSeller_bank_account() {
+ return seller_bank_account;
+ }
+
+ public void setSeller_bank_account(String seller_bank_account) {
+ this.seller_bank_account = seller_bank_account;
+ }
+
+ public String getExtend_fields() {
+ return extend_fields;
+ }
+
+ public void setExtend_fields(String extend_fields) {
+ this.extend_fields = extend_fields;
+ }
+
+ public String getInvoice_type() {
+ return invoice_type;
+ }
+
+ public void setInvoice_type(String invoice_type) {
+ this.invoice_type = invoice_type;
+ }
+
+ public String getIs_person() {
+ return is_person;
+ }
+
+ public void setIs_person(String is_person) {
+ this.is_person = is_person;
+ }
+
+ public String getLevy_tax_type() {
+ return levy_tax_type;
+ }
+
+ public void setLevy_tax_type(String levy_tax_type) {
+ this.levy_tax_type = levy_tax_type;
+ }
+
+ public String getDeduction() {
+ return deduction;
+ }
+
+ public void setDeduction(String deduction) {
+ this.deduction = deduction;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+
+ public String getPlace() {
+ return place;
+ }
+
+ public void setPlace(String place) {
+ this.place = place;
+ }
+
+ public String getPlace_of_detail() {
+ return place_of_detail;
+ }
+
+ public void setPlace_of_detail(String place_of_detail) {
+ this.place_of_detail = place_of_detail;
+ }
+
+ public String getConstruction_project_name() {
+ return construction_project_name;
+ }
+
+ public void setConstruction_project_name(String construction_project_name) {
+ this.construction_project_name = construction_project_name;
+ }
+
+ public String getKqysssxbgglbm() {
+ return kqysssxbgglbm;
+ }
+
+ public void setKqysssxbgglbm(String kqysssxbgglbm) {
+ this.kqysssxbgglbm = kqysssxbgglbm;
+ }
+
+ public String getProduct_no() {
+ return product_no;
+ }
+
+ public void setProduct_no(String product_no) {
+ this.product_no = product_no;
+ }
+
+ public String getCross_distinct_city_flag() {
+ return cross_distinct_city_flag;
+ }
+
+ public void setCross_distinct_city_flag(String cross_distinct_city_flag) {
+ this.cross_distinct_city_flag = cross_distinct_city_flag;
+ }
+
+ public String getCertificate_of_title() {
+ return certificate_of_title;
+ }
+
+ public void setCertificate_of_title(String certificate_of_title) {
+ this.certificate_of_title = certificate_of_title;
+ }
+
+ public String getArea_unit() {
+ return area_unit;
+ }
+
+ public void setArea_unit(String area_unit) {
+ this.area_unit = area_unit;
+ }
+
+ public String getStart_date() {
+ return start_date;
+ }
+
+ public void setStart_date(String start_date) {
+ this.start_date = start_date;
+ }
+
+ public String getEnd_date() {
+ return end_date;
+ }
+
+ public void setEnd_date(String end_date) {
+ this.end_date = end_date;
+ }
+
+ public String getOriginal_seller_name() {
+ return original_seller_name;
+ }
+
+ public void setOriginal_seller_name(String original_seller_name) {
+ this.original_seller_name = original_seller_name;
+ }
+
+ public String getOriginal_seller_tax_no() {
+ return original_seller_tax_no;
+ }
+
+ public void setOriginal_seller_tax_no(String original_seller_tax_no) {
+ this.original_seller_tax_no = original_seller_tax_no;
+ }
+
+ public String getApplicant() {
+ return applicant;
+ }
+
+ public void setApplicant(String applicant) {
+ this.applicant = applicant;
+ }
+
+ public String getDeduction_status() {
+ return deduction_status;
+ }
+
+ public void setDeduction_status(String deduction_status) {
+ this.deduction_status = deduction_status;
+ }
+
+ public String getOriginal_invoice_code() {
+ return original_invoice_code;
+ }
+
+ public void setOriginal_invoice_code(String original_invoice_code) {
+ this.original_invoice_code = original_invoice_code;
+ }
+
+ public String getOriginal_invoice_number() {
+ return original_invoice_number;
+ }
+
+ public void setOriginal_invoice_number(String original_invoice_number) {
+ this.original_invoice_number = original_invoice_number;
+ }
+
+ public String getOriginal_invoice_date() {
+ return original_invoice_date;
+ }
+
+ public void setOriginal_invoice_date(String original_invoice_date) {
+ this.original_invoice_date = original_invoice_date;
+ }
+
+ public String getOriginal_invoice_price() {
+ return original_invoice_price;
+ }
+
+ public void setOriginal_invoice_price(String original_invoice_price) {
+ this.original_invoice_price = original_invoice_price;
+ }
+
+ public String getRed_flush_reason() {
+ return red_flush_reason;
+ }
+
+ public void setRed_flush_reason(String red_flush_reason) {
+ this.red_flush_reason = red_flush_reason;
+ }
+
+ public String getOriginal_superior_business_no() {
+ return original_superior_business_no;
+ }
+
+ public void setOriginal_superior_business_no(String original_superior_business_no) {
+ this.original_superior_business_no = original_superior_business_no;
+ }
+
+ public String getRed_letter_info_sheet_no() {
+ return red_letter_info_sheet_no;
+ }
+
+ public void setRed_letter_info_sheet_no(String red_letter_info_sheet_no) {
+ this.red_letter_info_sheet_no = red_letter_info_sheet_no;
+ }
+
+ public String getOriginal_invoice_check_ode() {
+ return original_invoice_check_ode;
+ }
+
+ public void setOriginal_invoice_check_ode(String original_invoice_check_ode) {
+ this.original_invoice_check_ode = original_invoice_check_ode;
+ }
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceEntity.xml
new file mode 100644
index 00000000..10213540
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceEntity.xml
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *
+
+
+
+
+
+
+
+
+
+
+
+
+ update ${tabName} set ${url_field} =#{url} where id=#{id}
+
+
+
+
+ update formmain_0331 set field0206 =#{push_status} where id=#{id}
+
+
+
+
+ update ${tabName} set
+
+ ${input_result_status_filed} = #{input_result_status},
+ ${invoice_code_field} = #{invoice_code},
+ ${invoice_number_field} = #{invoice_number},
+ ${result_status_field} = #{result_status},
+
+ where id=#{id}
+
+
+
+
+
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceState.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceState.java
new file mode 100644
index 00000000..cf584ee3
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/entity/InvoiceState.java
@@ -0,0 +1,51 @@
+package com.hzya.frame.seeyon.invoice.entity;
+
+import com.hzya.frame.seeyon.zxbank.entity.PayState;
+
+public enum InvoiceState {
+ zero("0","申请单被关闭"),
+ one("1","申请单开票成功"),
+ two("2","申请单处理中"),
+ three("3","申请单开具异常"),
+ inputZero("0","进行中"),
+ inputOne("1","全部成功"),
+ inputTwo("2","部分失败"),
+ inputThree("3","全部失败");
+
+
+
+
+ private String type;
+ //值
+ private String value;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ InvoiceState(String type, String value){
+ this.type=type;
+ this.value=value;
+ }
+
+ public static String invoiceStateGetValue(String type){
+ for (InvoiceState invoiceState : InvoiceState.values()){
+ if(invoiceState.getType()==type||invoiceState.getType().equals(type)){
+ return invoiceState.getValue().toString();
+ }
+ }
+ return null;
+ }
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/IInvoiceService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/IInvoiceService.java
new file mode 100644
index 00000000..05d18405
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/IInvoiceService.java
@@ -0,0 +1,39 @@
+package com.hzya.frame.seeyon.invoice.service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.basedao.service.IBaseService;
+import com.hzya.frame.seeyon.invoice.entity.InvoiceEntity;
+import com.hzya.frame.web.entity.JsonResultEntity;
+
+public interface IInvoiceService extends IBaseService {
+
+ /**
+ *
+ * @content 查询需要推送税务的数据
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-01 15:25
+ * **/
+ JsonResultEntity queryArchives(JSONObject jsonObject);
+
+ /**
+ *
+ * @content 根据申请单查询开票结果
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-02 14:10
+ * **/
+ JsonResultEntity queryInvoiceResult(JSONObject json);
+
+ /**
+ *
+ * @content 进项发票推送结果查询(查询发票批量录入结果)
+ * @Param
+ * @Return
+ * @Author hecan
+ * @Date 2025-04-17 15:11
+ * **/
+ JsonResultEntity queryInputInvoiceResult(JSONObject json);
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/impl/InvoiceServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/impl/InvoiceServiceImpl.java
new file mode 100644
index 00000000..dfbdd22f
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/impl/InvoiceServiceImpl.java
@@ -0,0 +1,498 @@
+package com.hzya.frame.seeyon.invoice.service.impl;
+
+import cn.hutool.http.HttpRequest;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.basedao.service.impl.BaseService;
+import com.hzya.frame.mdm.mdmModuleSource.dao.impl.MdmModuleSourceDaoImpl;
+import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
+import com.hzya.frame.seeyon.dao.ICtpAttachmentDao;
+import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
+import com.hzya.frame.seeyon.invoice.dao.IInvoiceDao;
+import com.hzya.frame.seeyon.invoice.dao.IInvoiceDetailsDao;
+import com.hzya.frame.seeyon.invoice.entity.InvoiceEntity;
+import com.hzya.frame.seeyon.invoice.entity.InvoiceState;
+import com.hzya.frame.seeyon.invoice.service.IInvoiceService;
+import com.hzya.frame.seeyon.util.OARestUtil;
+import com.hzya.frame.seeyon.util.YzfSignUtil;
+import com.hzya.frame.seeyon.zxbank.entity.PayState;
+import com.hzya.frame.seeyon.zxbank.entity.ZxBankEntity;
+import com.hzya.frame.sysnew.comparison.service.impl.ComparisonServiceImpl;
+import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
+import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
+import com.hzya.frame.uuid.UUIDLong;
+import com.hzya.frame.uuid.UUIDUtils;
+import com.hzya.frame.web.entity.BaseResult;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import com.hzya.frame.web.exception.BaseSystemException;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.*;
+
+@Service(value = "InvoiceServiceImpl")
+public class InvoiceServiceImpl extends BaseService implements IInvoiceService {
+ @Autowired
+ private MdmModuleSourceDaoImpl mdmModuleSourceDaoImpl;
+
+ @Autowired
+ private IInvoiceDao invoiceDao;
+ @Autowired
+ private IInvoiceDetailsDao invoiceDetailsDao;
+
+ @Autowired
+ private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
+ @Autowired
+ private ComparisonServiceImpl comparisonServiceimpl;
+ @Autowired
+ private ICtpAttachmentDao ctpAttachmentDao;
+
+ @Value("${zt.url}")
+ private String url;
+
+ @Value("${invoice_pdf.url:}")
+ private String invoicePdfUrl;
+ @Value("${invoice_ofd.url:}")
+ private String invoiceOfdUrl;
+
+ @Override
+ public JsonResultEntity queryArchives(JSONObject json) {
+ JSONObject jsonObject = json.getJSONObject("jsonStr");
+ //根据插件分类查询主数据来源表
+ List list = mdmModuleSourceDaoImpl.MdmModuleSourceentityGroupByType();
+ if (CollectionUtils.isEmpty(list)) {
+ logger.info("没有类型为插件得数据,无法获取数据");
+ return BaseResult.getFailureMessageEntity("数据来源表无插件类型");
+ }
+ for (MdmModuleSourceEntity mdmModuleSourceEntity : list) {
+ String tableName = "";
+ List