From fc2512bfa9eb2900d0bd381bc43200210447cc5b Mon Sep 17 00:00:00 2001 From: hecan <1718492867@qq.com> Date: Fri, 23 May 2025 14:08:48 +0800 Subject: [PATCH] =?UTF-8?q?NCC=E4=BB=98=E6=AC=BE=E5=8D=95=E4=BC=A0?= =?UTF-8?q?=E9=80=92OA=E4=BB=A5=E5=8F=8AOA=E4=BB=98=E6=AC=BE=E5=8D=95?= =?UTF-8?q?=E6=8E=A8=E9=80=81CBS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/oa/payment/dao/IPaymentDao.java | 39 + .../oa/payment/dao/IPaymentDetailsDao.java | 18 + .../oa/payment/dao/impl/PaymentDaoImpl.java | 28 + .../dao/impl/PaymentDetailsDaoImpl.java | 16 + .../payment/entity/PaymentDetailsEntity.java | 1402 +++++++++++++++++ .../payment/entity/PaymentDetailsEntity.xml | 168 ++ .../oa/payment/entity/PaymentEntity.java | 1098 +++++++++++++ .../oa/payment/entity/PaymentEntity.xml | 153 ++ .../CbsResultToOAPluginInitializer.java | 145 ++ .../OAApprovedToCbsPluginInitializer.java | 155 ++ .../plugin/PaymentToOAPluginInitializer.java | 222 +++ .../oa/payment/service/IPaymentService.java | 7 + .../service/impl/PaymentServiceImpl.java | 8 + .../cfgHome/plugin/oa/payment/pluginCfg.xml | 6 + .../spring/spring-buildpackage-dao.xml | 6 + .../spring/spring-buildpackage-plugin.xml | 7 + .../spring/spring-buildpackage-service.xml | 5 + 17 files changed, 3483 insertions(+) create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDao.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDetailsDao.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDaoImpl.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDetailsDaoImpl.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.xml create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.xml create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/CbsResultToOAPluginInitializer.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/OAApprovedToCbsPluginInitializer.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/PaymentToOAPluginInitializer.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/IPaymentService.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/impl/PaymentServiceImpl.java create mode 100644 base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/pluginCfg.xml create mode 100644 base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-dao.xml create mode 100644 base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-plugin.xml create mode 100644 base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-service.xml diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDao.java new file mode 100644 index 00000000..223f3442 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDao.java @@ -0,0 +1,39 @@ +package com.hzya.frame.plugin.oa.payment.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.plugin.oa.payment.entity.PaymentEntity; + +import java.util.List; + +public interface IPaymentDao extends IBaseDao { + + /** + * 查询OA审批完成的单据传递CBS + * @content + * @Param + * @Return + * @Author hecan + * @Date 2025-05-22 10:03 + * **/ + List queryPaymentOAToCbs(PaymentEntity entity); + + /** + * + * @content 查询OA需要查询支付状态的数据 + * @Param + * @Return + * @Author hecan + * @Date 2025-05-22 11:33 + * **/ + List queryPaymentOAResult(PaymentEntity entity); + + /** + * + * @content 更新OA支付结果 + * @Param + * @Return + * @Author hecan + * @Date 2025-05-23 11:44 + * **/ + Integer updatePaymentOAResult(PaymentEntity entity); +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDetailsDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDetailsDao.java new file mode 100644 index 00000000..aaf24d3b --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/IPaymentDetailsDao.java @@ -0,0 +1,18 @@ +package com.hzya.frame.plugin.oa.payment.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.plugin.oa.payment.entity.PaymentDetailsEntity; + +import java.util.List; + +public interface IPaymentDetailsDao extends IBaseDao { + /** + * + * @content 查询OA付款单明细数据 + * @Param + * @Return + * @Author hecan + * @Date 2025-05-23 10:37 + * **/ + List queryPaymentDetails(PaymentDetailsEntity entity); +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDaoImpl.java new file mode 100644 index 00000000..0c7b763c --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDaoImpl.java @@ -0,0 +1,28 @@ +package com.hzya.frame.plugin.oa.payment.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.plugin.oa.payment.dao.IPaymentDao; +import com.hzya.frame.plugin.oa.payment.entity.PaymentEntity; + +import java.util.List; + +public class PaymentDaoImpl extends MybatisGenericDao implements IPaymentDao { + @DS("#entity.dataSourceCode") + @Override + public List queryPaymentOAToCbs(PaymentEntity entity) { + return (List) super.selectList("queryPaymentOAToCbs",entity); + } + + @DS("#entity.dataSourceCode") + @Override + public List queryPaymentOAResult(PaymentEntity entity) { + return (List) super.selectList("queryPaymentOAResult",entity); + } + + @DS("#entity.dataSourceCode") + @Override + public Integer updatePaymentOAResult(PaymentEntity entity) { + return super.update("updatePaymentOAResult",entity); + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDetailsDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDetailsDaoImpl.java new file mode 100644 index 00000000..05621d63 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/dao/impl/PaymentDetailsDaoImpl.java @@ -0,0 +1,16 @@ +package com.hzya.frame.plugin.oa.payment.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.plugin.oa.payment.dao.IPaymentDetailsDao; +import com.hzya.frame.plugin.oa.payment.entity.PaymentDetailsEntity; + +import java.util.List; + +public class PaymentDetailsDaoImpl extends MybatisGenericDao implements IPaymentDetailsDao { + @DS("#entity.dataSourceCode") + @Override + public List queryPaymentDetails(PaymentDetailsEntity entity) { + return (List) super.selectList("queryPaymentDetails",entity); + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.java new file mode 100644 index 00000000..c5264a34 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.java @@ -0,0 +1,1402 @@ +package com.hzya.frame.plugin.oa.payment.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +public class PaymentDetailsEntity extends BaseEntity { + private String pkPayitem;//付款单行标识 + private String settOrg;// 结算财务组织 + private String pkOrg;// 付款财务组织 + private String pkFiorg;// 财务组织 + private String pkPcorg;// 利润中心 + private String puOrg;// 业务组织 + private String puOrgV;//业务组织版本主键 + private String settOrgV;// 结算财务组织版本主键 + private String pkPcorgV;// 利润中心版本主键 + private String pkOrgV;// 付款财务组织版本主键 + private String pkfiorgv;// 财务组织版本主键 + private String pupsndoc;// 业务人员 + private String puDeptid;// 业务部门 + private String puDeptidV;// 业务部门版本 + private String prepay;// 付款性质 + private String material;// 物料 + private String supplier;// 供应商 + private String postunit;// 报价计量单位 + private String postpricenotax;// 报价单位无税单价 + private String postquantity;// 报价单位数量 + private String postprice;// 报价单位含税单价 + private String checkdirection;// 票据方向 + private String coordflag;// 单据协同状态 + private String equipmentcode;// 设备编码 + private String productline ;//产品线 + private String cashitem;// 现金流量项目 + private String payflag;// 支付状态 + private String bankrollprojet;// 资金计划项目 + private String pausetransact ;//挂起标志 + private String billdate;// 单据日期 + private String payman;// 支付人 + private String paydate;// 支付日期 + private String pkGroup;// 所属集团 + private String pkBilltype;// 单据类型编码 + private String billclass;// 单据大类 + private String pkTradetype ;//付款类型code + private String pkTradetypeid;// 付款类型 + private String busidate;// 起算日期 + private String pkSubjcode;// 收支项目 + private String billno;// 单据号 + private String objtype;// 往来对象 + private String rowno;// 单据分录号 + private String rowtype;// 行类型 + private String direction;// 方向 + private String checktype;// 票据类型 + private String pkSsitem;// 事项审批单 + private String scomment ;//摘要 + private String subjcode;// 科目 + private String pkCurrtype ;//币种 + private String rate;// 组织本币汇率 + private String pkDeptid ;//部门 + private String pkDeptidV;// 部 门 + private String pkPsndoc;// 业务员 + private String moneyDe;// 借方原币金额 + private String localMoneyDe;// 组织本币金额(借方) + private String quantityDe;// 借方数量 + private String quantityCr ;//贷方数量 + private String moneyBal ;//原币余额 + private String localMoneyBal;// 组织本币余额 + private String quantityBal;// 数量余额 + private String localTaxDe;// 税额 + private String notaxDe;// 借方原币无税金额 + private String localNotaxDe;// 组织本币无税金额(借方) + private String price ;//单价 + private String taxprice ;//含税单价 + private String taxrate ;//税率 + private String taxnum;// 税号 + private String pkBalatype;// 结算方式 + private String topBillid;// 上层单据主键 + private String topItemid ;//上层单据行主键 + private String topBilltype;// 上层单据类型 + private String topChangets;// 上层单据主表ts + private String topTradetype;// 上层交易类型 + private String srcTradetype;// 源头交易类型 + private String srcBilltype;// 源头单据类型 + private String srcBillid;// 源头单据主键 + private String srcItemid;// 源头单据行主键 + private String pkPayterm;//付款协议 + private String topTermch;// 来源付款协议行 + private String checkno ;//票据号 + private String payaccount;// 付款银行账户 + private String recaccount;// 收款银行账户 + private String cashaccount ;//现金账户 + private String ordercubasdoc;// 订单供应商 + private String innerorderno;// 调拨订单号 + private String assetpactno;// 资产合同号 + private String contractno;// 合同号 + private String freecust;// 散户 + private String facard;// 固定资产卡片号 + private String purchaseorder;// 订单号 + private String invoiceno;// 发票号 + private String outstoreno;// 出库单号 + private String checkelement ;//责任核算要素 + private String grouprate ;//集团本币汇率 + private String globalrate;// 全局本币汇率 + private String groupdebit;// 集团本币金额(借方) + private String globaldebit;// 全局本币金额(借方) + private String groupbalance ;//集团本币余额 + private String globalbalance;// 全局本币余额 + private String groupnotaxDe;// 集团本币无税金额(借方) + private String globalnotaxDe;// 全局本币无税金额(借方) + private String occupationmny ;//预占用核销原币余额 + private String bankrelatedCode;// 对账标识码 + private String project;// 项目 + private String projectTask;// 项目任务 + private String commpaytype ;//承付类型 + private String commpaystatus;// 承付状态 + private String refuseReason;// 拒付理由 + private String agentreceiveprimal;// 托收原币金额 + private String agentreceivelocal;// 托收组织本币 + private String groupagentreceivelocal;// 托收集团本币 + private String globalagentreceivelocal ;//托收全局本币 + private String commpayer ;//承付人 + private String isrefused;// 是否被拒付 + private String localPrice;// 本币单价 + private String localTaxprice;// 本币含税单价 + private String confernum;// 内部交易结算号 + private String costcenter;// 成本中心 + private String customer;// 客户 + private String payreason;// 支付原因 + private String pkPaybill ;//付款单标识 + private String materialSrc;// 原始物料 + private String settlemoney ;//应付金额 + private String settlecurr ;//应付币种 + private String isdiscount;// 是否抵扣金额 + private String comment;// 摘要c + private String pkRecpaytype;// 付款业务类型 + private String isurgent;// 紧急 + private String transerial ;//银行流水号 + private String sendcountryid;// 发货国 + private String vatcode ;//VAT注册码 + private String taxcodeid;// 税码 + private String taxtype ;//扣税类别 + private String buysellflag;// 购销类型 + private String nosubtaxrate;// 不可抵扣税率 + private String nosubtax ;//不可抵扣税额 + private String vendorvatcode ;//供应商VAT注册码 + private String directCheckno ;//直联电票 + private String topChangeitemts ;//上层单据子表ts + private String pkRatetype ;//组织汇率类型 + private String ratedate ;//组织汇率来源日期 + private String customerV ;//客户版本 + private String ordercubasdocV ;//订单供应商版本 + private String supplierV ;//供应商版本 + private String def10;// 自定义项10 + private String def9 ;//自定义项9 + private String def8 ;//自定义项8 + private String def7;// 自定义项7 + private String def6 ;//自定义项6 + private String def5;// 自定义项5 + private String def4 ;//自定义项4 + private String def3 ;//自定义项3 + private String def2 ;//自定义项2 + private String def1;// 自定义项1 + private String formmainId;// OA主表id + + + public String getFormmainId() { + return formmainId; + } + + public void setFormmainId(String formmainId) { + this.formmainId = formmainId; + } + + public String getPkPayitem() { + return pkPayitem; + } + + public void setPkPayitem(String pkPayitem) { + this.pkPayitem = pkPayitem; + } + + public String getSettOrg() { + return settOrg; + } + + public void setSettOrg(String settOrg) { + this.settOrg = settOrg; + } + + public String getPkOrg() { + return pkOrg; + } + + public void setPkOrg(String pkOrg) { + this.pkOrg = pkOrg; + } + + public String getPkFiorg() { + return pkFiorg; + } + + public void setPkFiorg(String pkFiorg) { + this.pkFiorg = pkFiorg; + } + + public String getPkPcorg() { + return pkPcorg; + } + + public void setPkPcorg(String pkPcorg) { + this.pkPcorg = pkPcorg; + } + + public String getPuOrg() { + return puOrg; + } + + public void setPuOrg(String puOrg) { + this.puOrg = puOrg; + } + + public String getPuOrgV() { + return puOrgV; + } + + public void setPuOrgV(String puOrgV) { + this.puOrgV = puOrgV; + } + + public String getSettOrgV() { + return settOrgV; + } + + public void setSettOrgV(String settOrgV) { + this.settOrgV = settOrgV; + } + + public String getPkPcorgV() { + return pkPcorgV; + } + + public void setPkPcorgV(String pkPcorgV) { + this.pkPcorgV = pkPcorgV; + } + + public String getPkOrgV() { + return pkOrgV; + } + + public void setPkOrgV(String pkOrgV) { + this.pkOrgV = pkOrgV; + } + + public String getPkfiorgv() { + return pkfiorgv; + } + + public void setPkfiorgv(String pkfiorgv) { + this.pkfiorgv = pkfiorgv; + } + + public String getPupsndoc() { + return pupsndoc; + } + + public void setPupsndoc(String pupsndoc) { + this.pupsndoc = pupsndoc; + } + + public String getPuDeptid() { + return puDeptid; + } + + public void setPuDeptid(String puDeptid) { + this.puDeptid = puDeptid; + } + + public String getPuDeptidV() { + return puDeptidV; + } + + public void setPuDeptidV(String puDeptidV) { + this.puDeptidV = puDeptidV; + } + + public String getPrepay() { + return prepay; + } + + public void setPrepay(String prepay) { + this.prepay = prepay; + } + + public String getMaterial() { + return material; + } + + public void setMaterial(String material) { + this.material = material; + } + + public String getSupplier() { + return supplier; + } + + public void setSupplier(String supplier) { + this.supplier = supplier; + } + + public String getPostunit() { + return postunit; + } + + public void setPostunit(String postunit) { + this.postunit = postunit; + } + + public String getPostpricenotax() { + return postpricenotax; + } + + public void setPostpricenotax(String postpricenotax) { + this.postpricenotax = postpricenotax; + } + + public String getPostquantity() { + return postquantity; + } + + public void setPostquantity(String postquantity) { + this.postquantity = postquantity; + } + + public String getPostprice() { + return postprice; + } + + public void setPostprice(String postprice) { + this.postprice = postprice; + } + + public String getCheckdirection() { + return checkdirection; + } + + public void setCheckdirection(String checkdirection) { + this.checkdirection = checkdirection; + } + + public String getCoordflag() { + return coordflag; + } + + public void setCoordflag(String coordflag) { + this.coordflag = coordflag; + } + + public String getEquipmentcode() { + return equipmentcode; + } + + public void setEquipmentcode(String equipmentcode) { + this.equipmentcode = equipmentcode; + } + + public String getProductline() { + return productline; + } + + public void setProductline(String productline) { + this.productline = productline; + } + + public String getCashitem() { + return cashitem; + } + + public void setCashitem(String cashitem) { + this.cashitem = cashitem; + } + + public String getPayflag() { + return payflag; + } + + public void setPayflag(String payflag) { + this.payflag = payflag; + } + + public String getBankrollprojet() { + return bankrollprojet; + } + + public void setBankrollprojet(String bankrollprojet) { + this.bankrollprojet = bankrollprojet; + } + + public String getPausetransact() { + return pausetransact; + } + + public void setPausetransact(String pausetransact) { + this.pausetransact = pausetransact; + } + + public String getBilldate() { + return billdate; + } + + public void setBilldate(String billdate) { + this.billdate = billdate; + } + + public String getPayman() { + return payman; + } + + public void setPayman(String payman) { + this.payman = payman; + } + + public String getPaydate() { + return paydate; + } + + public void setPaydate(String paydate) { + this.paydate = paydate; + } + + public String getPkGroup() { + return pkGroup; + } + + public void setPkGroup(String pkGroup) { + this.pkGroup = pkGroup; + } + + public String getPkBilltype() { + return pkBilltype; + } + + public void setPkBilltype(String pkBilltype) { + this.pkBilltype = pkBilltype; + } + + public String getBillclass() { + return billclass; + } + + public void setBillclass(String billclass) { + this.billclass = billclass; + } + + public String getPkTradetype() { + return pkTradetype; + } + + public void setPkTradetype(String pkTradetype) { + this.pkTradetype = pkTradetype; + } + + public String getPkTradetypeid() { + return pkTradetypeid; + } + + public void setPkTradetypeid(String pkTradetypeid) { + this.pkTradetypeid = pkTradetypeid; + } + + public String getBusidate() { + return busidate; + } + + public void setBusidate(String busidate) { + this.busidate = busidate; + } + + public String getPkSubjcode() { + return pkSubjcode; + } + + public void setPkSubjcode(String pkSubjcode) { + this.pkSubjcode = pkSubjcode; + } + + public String getBillno() { + return billno; + } + + public void setBillno(String billno) { + this.billno = billno; + } + + public String getObjtype() { + return objtype; + } + + public void setObjtype(String objtype) { + this.objtype = objtype; + } + + public String getRowno() { + return rowno; + } + + public void setRowno(String rowno) { + this.rowno = rowno; + } + + public String getRowtype() { + return rowtype; + } + + public void setRowtype(String rowtype) { + this.rowtype = rowtype; + } + + public String getDirection() { + return direction; + } + + public void setDirection(String direction) { + this.direction = direction; + } + + public String getChecktype() { + return checktype; + } + + public void setChecktype(String checktype) { + this.checktype = checktype; + } + + public String getPkSsitem() { + return pkSsitem; + } + + public void setPkSsitem(String pkSsitem) { + this.pkSsitem = pkSsitem; + } + + public String getScomment() { + return scomment; + } + + public void setScomment(String scomment) { + this.scomment = scomment; + } + + public String getSubjcode() { + return subjcode; + } + + public void setSubjcode(String subjcode) { + this.subjcode = subjcode; + } + + public String getPkCurrtype() { + return pkCurrtype; + } + + public void setPkCurrtype(String pkCurrtype) { + this.pkCurrtype = pkCurrtype; + } + + public String getRate() { + return rate; + } + + public void setRate(String rate) { + this.rate = rate; + } + + public String getPkDeptid() { + return pkDeptid; + } + + public void setPkDeptid(String pkDeptid) { + this.pkDeptid = pkDeptid; + } + + public String getPkDeptidV() { + return pkDeptidV; + } + + public void setPkDeptidV(String pkDeptidV) { + this.pkDeptidV = pkDeptidV; + } + + public String getPkPsndoc() { + return pkPsndoc; + } + + public void setPkPsndoc(String pkPsndoc) { + this.pkPsndoc = pkPsndoc; + } + + public String getMoneyDe() { + return moneyDe; + } + + public void setMoneyDe(String moneyDe) { + this.moneyDe = moneyDe; + } + + public String getLocalMoneyDe() { + return localMoneyDe; + } + + public void setLocalMoneyDe(String localMoneyDe) { + this.localMoneyDe = localMoneyDe; + } + + public String getQuantityDe() { + return quantityDe; + } + + public void setQuantityDe(String quantityDe) { + this.quantityDe = quantityDe; + } + + public String getQuantityCr() { + return quantityCr; + } + + public void setQuantityCr(String quantityCr) { + this.quantityCr = quantityCr; + } + + public String getMoneyBal() { + return moneyBal; + } + + public void setMoneyBal(String moneyBal) { + this.moneyBal = moneyBal; + } + + public String getLocalMoneyBal() { + return localMoneyBal; + } + + public void setLocalMoneyBal(String localMoneyBal) { + this.localMoneyBal = localMoneyBal; + } + + public String getQuantityBal() { + return quantityBal; + } + + public void setQuantityBal(String quantityBal) { + this.quantityBal = quantityBal; + } + + public String getLocalTaxDe() { + return localTaxDe; + } + + public void setLocalTaxDe(String localTaxDe) { + this.localTaxDe = localTaxDe; + } + + public String getNotaxDe() { + return notaxDe; + } + + public void setNotaxDe(String notaxDe) { + this.notaxDe = notaxDe; + } + + public String getLocalNotaxDe() { + return localNotaxDe; + } + + public void setLocalNotaxDe(String localNotaxDe) { + this.localNotaxDe = localNotaxDe; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getTaxprice() { + return taxprice; + } + + public void setTaxprice(String taxprice) { + this.taxprice = taxprice; + } + + public String getTaxrate() { + return taxrate; + } + + public void setTaxrate(String taxrate) { + this.taxrate = taxrate; + } + + public String getTaxnum() { + return taxnum; + } + + public void setTaxnum(String taxnum) { + this.taxnum = taxnum; + } + + public String getPkBalatype() { + return pkBalatype; + } + + public void setPkBalatype(String pkBalatype) { + this.pkBalatype = pkBalatype; + } + + public String getTopBillid() { + return topBillid; + } + + public void setTopBillid(String topBillid) { + this.topBillid = topBillid; + } + + public String getTopItemid() { + return topItemid; + } + + public void setTopItemid(String topItemid) { + this.topItemid = topItemid; + } + + public String getTopBilltype() { + return topBilltype; + } + + public void setTopBilltype(String topBilltype) { + this.topBilltype = topBilltype; + } + + public String getTopChangets() { + return topChangets; + } + + public void setTopChangets(String topChangets) { + this.topChangets = topChangets; + } + + public String getTopTradetype() { + return topTradetype; + } + + public void setTopTradetype(String topTradetype) { + this.topTradetype = topTradetype; + } + + public String getSrcTradetype() { + return srcTradetype; + } + + public void setSrcTradetype(String srcTradetype) { + this.srcTradetype = srcTradetype; + } + + public String getSrcBilltype() { + return srcBilltype; + } + + public void setSrcBilltype(String srcBilltype) { + this.srcBilltype = srcBilltype; + } + + public String getSrcBillid() { + return srcBillid; + } + + public void setSrcBillid(String srcBillid) { + this.srcBillid = srcBillid; + } + + public String getSrcItemid() { + return srcItemid; + } + + public void setSrcItemid(String srcItemid) { + this.srcItemid = srcItemid; + } + + public String getPkPayterm() { + return pkPayterm; + } + + public void setPkPayterm(String pkPayterm) { + this.pkPayterm = pkPayterm; + } + + public String getTopTermch() { + return topTermch; + } + + public void setTopTermch(String topTermch) { + this.topTermch = topTermch; + } + + public String getCheckno() { + return checkno; + } + + public void setCheckno(String checkno) { + this.checkno = checkno; + } + + public String getPayaccount() { + return payaccount; + } + + public void setPayaccount(String payaccount) { + this.payaccount = payaccount; + } + + public String getRecaccount() { + return recaccount; + } + + public void setRecaccount(String recaccount) { + this.recaccount = recaccount; + } + + public String getCashaccount() { + return cashaccount; + } + + public void setCashaccount(String cashaccount) { + this.cashaccount = cashaccount; + } + + public String getOrdercubasdoc() { + return ordercubasdoc; + } + + public void setOrdercubasdoc(String ordercubasdoc) { + this.ordercubasdoc = ordercubasdoc; + } + + public String getInnerorderno() { + return innerorderno; + } + + public void setInnerorderno(String innerorderno) { + this.innerorderno = innerorderno; + } + + public String getAssetpactno() { + return assetpactno; + } + + public void setAssetpactno(String assetpactno) { + this.assetpactno = assetpactno; + } + + public String getContractno() { + return contractno; + } + + public void setContractno(String contractno) { + this.contractno = contractno; + } + + public String getFreecust() { + return freecust; + } + + public void setFreecust(String freecust) { + this.freecust = freecust; + } + + public String getFacard() { + return facard; + } + + public void setFacard(String facard) { + this.facard = facard; + } + + public String getPurchaseorder() { + return purchaseorder; + } + + public void setPurchaseorder(String purchaseorder) { + this.purchaseorder = purchaseorder; + } + + public String getInvoiceno() { + return invoiceno; + } + + public void setInvoiceno(String invoiceno) { + this.invoiceno = invoiceno; + } + + public String getOutstoreno() { + return outstoreno; + } + + public void setOutstoreno(String outstoreno) { + this.outstoreno = outstoreno; + } + + public String getCheckelement() { + return checkelement; + } + + public void setCheckelement(String checkelement) { + this.checkelement = checkelement; + } + + public String getGrouprate() { + return grouprate; + } + + public void setGrouprate(String grouprate) { + this.grouprate = grouprate; + } + + public String getGlobalrate() { + return globalrate; + } + + public void setGlobalrate(String globalrate) { + this.globalrate = globalrate; + } + + public String getGroupdebit() { + return groupdebit; + } + + public void setGroupdebit(String groupdebit) { + this.groupdebit = groupdebit; + } + + public String getGlobaldebit() { + return globaldebit; + } + + public void setGlobaldebit(String globaldebit) { + this.globaldebit = globaldebit; + } + + public String getGroupbalance() { + return groupbalance; + } + + public void setGroupbalance(String groupbalance) { + this.groupbalance = groupbalance; + } + + public String getGlobalbalance() { + return globalbalance; + } + + public void setGlobalbalance(String globalbalance) { + this.globalbalance = globalbalance; + } + + public String getGroupnotaxDe() { + return groupnotaxDe; + } + + public void setGroupnotaxDe(String groupnotaxDe) { + this.groupnotaxDe = groupnotaxDe; + } + + public String getGlobalnotaxDe() { + return globalnotaxDe; + } + + public void setGlobalnotaxDe(String globalnotaxDe) { + this.globalnotaxDe = globalnotaxDe; + } + + public String getOccupationmny() { + return occupationmny; + } + + public void setOccupationmny(String occupationmny) { + this.occupationmny = occupationmny; + } + + public String getBankrelatedCode() { + return bankrelatedCode; + } + + public void setBankrelatedCode(String bankrelatedCode) { + this.bankrelatedCode = bankrelatedCode; + } + + public String getProject() { + return project; + } + + public void setProject(String project) { + this.project = project; + } + + public String getProjectTask() { + return projectTask; + } + + public void setProjectTask(String projectTask) { + this.projectTask = projectTask; + } + + public String getCommpaytype() { + return commpaytype; + } + + public void setCommpaytype(String commpaytype) { + this.commpaytype = commpaytype; + } + + public String getCommpaystatus() { + return commpaystatus; + } + + public void setCommpaystatus(String commpaystatus) { + this.commpaystatus = commpaystatus; + } + + public String getRefuseReason() { + return refuseReason; + } + + public void setRefuseReason(String refuseReason) { + this.refuseReason = refuseReason; + } + + public String getAgentreceiveprimal() { + return agentreceiveprimal; + } + + public void setAgentreceiveprimal(String agentreceiveprimal) { + this.agentreceiveprimal = agentreceiveprimal; + } + + public String getAgentreceivelocal() { + return agentreceivelocal; + } + + public void setAgentreceivelocal(String agentreceivelocal) { + this.agentreceivelocal = agentreceivelocal; + } + + public String getGroupagentreceivelocal() { + return groupagentreceivelocal; + } + + public void setGroupagentreceivelocal(String groupagentreceivelocal) { + this.groupagentreceivelocal = groupagentreceivelocal; + } + + public String getGlobalagentreceivelocal() { + return globalagentreceivelocal; + } + + public void setGlobalagentreceivelocal(String globalagentreceivelocal) { + this.globalagentreceivelocal = globalagentreceivelocal; + } + + public String getCommpayer() { + return commpayer; + } + + public void setCommpayer(String commpayer) { + this.commpayer = commpayer; + } + + public String getIsrefused() { + return isrefused; + } + + public void setIsrefused(String isrefused) { + this.isrefused = isrefused; + } + + public String getLocalPrice() { + return localPrice; + } + + public void setLocalPrice(String localPrice) { + this.localPrice = localPrice; + } + + public String getLocalTaxprice() { + return localTaxprice; + } + + public void setLocalTaxprice(String localTaxprice) { + this.localTaxprice = localTaxprice; + } + + public String getConfernum() { + return confernum; + } + + public void setConfernum(String confernum) { + this.confernum = confernum; + } + + public String getCostcenter() { + return costcenter; + } + + public void setCostcenter(String costcenter) { + this.costcenter = costcenter; + } + + public String getCustomer() { + return customer; + } + + public void setCustomer(String customer) { + this.customer = customer; + } + + public String getPayreason() { + return payreason; + } + + public void setPayreason(String payreason) { + this.payreason = payreason; + } + + public String getPkPaybill() { + return pkPaybill; + } + + public void setPkPaybill(String pkPaybill) { + this.pkPaybill = pkPaybill; + } + + public String getMaterialSrc() { + return materialSrc; + } + + public void setMaterialSrc(String materialSrc) { + this.materialSrc = materialSrc; + } + + public String getSettlemoney() { + return settlemoney; + } + + public void setSettlemoney(String settlemoney) { + this.settlemoney = settlemoney; + } + + public String getSettlecurr() { + return settlecurr; + } + + public void setSettlecurr(String settlecurr) { + this.settlecurr = settlecurr; + } + + public String getIsdiscount() { + return isdiscount; + } + + public void setIsdiscount(String isdiscount) { + this.isdiscount = isdiscount; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getPkRecpaytype() { + return pkRecpaytype; + } + + public void setPkRecpaytype(String pkRecpaytype) { + this.pkRecpaytype = pkRecpaytype; + } + + public String getIsurgent() { + return isurgent; + } + + public void setIsurgent(String isurgent) { + this.isurgent = isurgent; + } + + public String getTranserial() { + return transerial; + } + + public void setTranserial(String transerial) { + this.transerial = transerial; + } + + public String getSendcountryid() { + return sendcountryid; + } + + public void setSendcountryid(String sendcountryid) { + this.sendcountryid = sendcountryid; + } + + public String getVatcode() { + return vatcode; + } + + public void setVatcode(String vatcode) { + this.vatcode = vatcode; + } + + public String getTaxcodeid() { + return taxcodeid; + } + + public void setTaxcodeid(String taxcodeid) { + this.taxcodeid = taxcodeid; + } + + public String getTaxtype() { + return taxtype; + } + + public void setTaxtype(String taxtype) { + this.taxtype = taxtype; + } + + public String getBuysellflag() { + return buysellflag; + } + + public void setBuysellflag(String buysellflag) { + this.buysellflag = buysellflag; + } + + public String getNosubtaxrate() { + return nosubtaxrate; + } + + public void setNosubtaxrate(String nosubtaxrate) { + this.nosubtaxrate = nosubtaxrate; + } + + public String getNosubtax() { + return nosubtax; + } + + public void setNosubtax(String nosubtax) { + this.nosubtax = nosubtax; + } + + public String getVendorvatcode() { + return vendorvatcode; + } + + public void setVendorvatcode(String vendorvatcode) { + this.vendorvatcode = vendorvatcode; + } + + public String getDirectCheckno() { + return directCheckno; + } + + public void setDirectCheckno(String directCheckno) { + this.directCheckno = directCheckno; + } + + public String getTopChangeitemts() { + return topChangeitemts; + } + + public void setTopChangeitemts(String topChangeitemts) { + this.topChangeitemts = topChangeitemts; + } + + public String getPkRatetype() { + return pkRatetype; + } + + public void setPkRatetype(String pkRatetype) { + this.pkRatetype = pkRatetype; + } + + public String getRatedate() { + return ratedate; + } + + public void setRatedate(String ratedate) { + this.ratedate = ratedate; + } + + public String getCustomerV() { + return customerV; + } + + public void setCustomerV(String customerV) { + this.customerV = customerV; + } + + public String getOrdercubasdocV() { + return ordercubasdocV; + } + + public void setOrdercubasdocV(String ordercubasdocV) { + this.ordercubasdocV = ordercubasdocV; + } + + public String getSupplierV() { + return supplierV; + } + + public void setSupplierV(String supplierV) { + this.supplierV = supplierV; + } + + public String getDef10() { + return def10; + } + + public void setDef10(String def10) { + this.def10 = def10; + } + + public String getDef9() { + return def9; + } + + public void setDef9(String def9) { + this.def9 = def9; + } + + public String getDef8() { + return def8; + } + + public void setDef8(String def8) { + this.def8 = def8; + } + + public String getDef7() { + return def7; + } + + public void setDef7(String def7) { + this.def7 = def7; + } + + public String getDef6() { + return def6; + } + + public void setDef6(String def6) { + this.def6 = def6; + } + + public String getDef5() { + return def5; + } + + public void setDef5(String def5) { + this.def5 = def5; + } + + public String getDef4() { + return def4; + } + + public void setDef4(String def4) { + this.def4 = def4; + } + + public String getDef3() { + return def3; + } + + public void setDef3(String def3) { + this.def3 = def3; + } + + public String getDef2() { + return def2; + } + + public void setDef2(String def2) { + this.def2 = def2; + } + + public String getDef1() { + return def1; + } + + public void setDef1(String def1) { + this.def1 = def1; + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.xml new file mode 100644 index 00000000..1df04d35 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentDetailsEntity.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + ,pk_payitem as pkPayitem + ,sett_org as settOrg + ,pk_org as pkOrg + ,pk_fiorg as pkFiorg + ,pu_org as puOrg + ,pu_psndoc as puPsndoc + ,pu_deptid as puDeptid + ,prepay as prepay + ,material as material + ,supplier as supplier + ,checkdirection as checkdirection + ,payflag as payflag + ,pausetransact as pausetransact + ,billdate as billdate + ,payman as payman + ,paydate as paydate + ,pk_billtype as pkBilltype + ,billclass as billclass + ,pk_tradetype as pkTradetype + ,billno as billno + ,objtype as objtype + ,rowno as rowno + ,rowtype as rowtype + ,direction as direction + ,checktype as checktype + ,scomment as scomment + ,pk_currtype as pkcurrtype + ,rate as rate + ,pk_deptid as pkDeptid + ,pk_psndoc as pkPsndoc + ,money_de as moneyDe + ,local_money_de as localMoneyDe + ,quantity_bal as quantityBal + ,local_tax_de as localTaxDe + ,price as price + ,taxprice as taxprice + ,taxrate as taxrate + ,taxnum as taxnum + ,pk_balatype as pkBalatype + ,top_billid as topBillid + ,top_itemid as topItemid + ,checkno as checkno + ,payaccount as payaccount + ,recaccount as recaccount + ,cashaccount as cashaccount + ,contractno as contractno + ,purchaseorder as purchaseorder + ,invoiceno as invoiceno + ,outstoreno as outstoreno + ,project as project + ,groupnotax_de as groupnotaxDe + ,globalnotax_de as globalnotaxDe + ,commpaytype as commpaytype + ,commpaystatus as commpaystatus + ,customer as customer + ,payreason as payreason + ,pk_paybill as pkPaybill + ,comment as comment + ,pk_recpaytype as pkRecpaytype + ,taxcodeid as taxcodeid + ,taxtype as taxtype + ,buysellflag as buysellflag + ,direct_checkno as directCheckno + ,direct_checkno as directCheckno + + + + + + + + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.java new file mode 100644 index 00000000..6409318f --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.java @@ -0,0 +1,1098 @@ +package com.hzya.frame.plugin.oa.payment.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +public class PaymentEntity extends BaseEntity { + private String pkPaybill;//付款单标识 + private String pkPcorg;//利润中心 + private String pkFiorg;//财务组织 + private String pkOrg;//付款财务组织 + private String settOrg;//结算财务组织 + private String puOrg;//业务组织 + private String puOrgV;//业务组织版本主键 + private String pkFiorgV;//财务组织版本主键 + private String pkPcorgV;//利润中心版本主键 + private String pkOrgV;//付款财务组织版本主键 + private String settOrgV;//结算财务组织版本主键 + private String isreded;//是否红冲过 + private String outbusitype;//外系统业务类型 + private String payman;//支付人 + private String paydate;//支付日期 + private String isonlinepay;//是否网上支付 + private String officialprintuser;//正式打印人 + private String officialprintdate;//正式打印日期 + private String settlenum;//结算号 + private String pkGroup;//所属集团 + private String pkBilltype;//单据类型编码 + private String ismandatepay;//提交资金组织结算 + private String custdelegate;//代垫单位 + private String pkCorp;//单位编码 + private String pkTradetype;//付款类型code + private String pkTradetypeid;//付款类型 + private String billclass;//单据大类 + private String accessorynum;//附件张数 + private String subjcode;//科目 + private String isflowbill;//是否流程单据 + private String confirmuser;//单据确认人 + private String isinit;//期初标志 + private String billno;//单据号 + private String billdate;//单据日期 + private String syscode;//单据所属系统 + private String srcSyscode;//单据来源系统 + private String billstatus;//单据状态 + private String billmaker;//制单人 + private String approver;//审核人 + private String approvedate;//审核时间 + private String signuser;//签字确认人 + private String signyear;//签字确认年度 + private String signperiod;//签字确认期间 + private String signdate;//签字确认日期 + private String pkBusitype;//业务流程 + private String money;//原币金额 + private String localMoney;//组织本币金额 + private String billyear;//单据会计年度 + private String billperiod;//单据会计期间 + private String scomment;//摘要 + private String settleflag;//结算状态 + private String settletype;//结算类型 + private String effectstatus;//生效状态 + private String effectuser;//生效人 + private String effectdate;//生效日期 + + + private String lastapproveid;//最终审批人 + private String bodys;//付款单行 + private String grouplocal;//集团本币金额 + private String globallocal;//全局本币金额 + private String rate;//组织本币汇率 + private String grouprate;//集团本币汇率 + private String globalrate;//全局本币汇率 + private String checkelement;//责任核算要素 + private String puDeptid;//业务部门 + private String puDeptidV;//业务部门版本 + private String puPsndoc;//业务人员 + private String cashitem;//现金流量项目 + private String bankrollprojet;//资金计划项目 + private String pkDeptid;//部门 + private String pkDeptidV;//部 门 + private String pkPsndoc;//业务员 + private String supplier;//供应商 + private String pkCurrtype;//币种 + private String pkSubjcode;//收支项目 + private String pkBalatype;//结算方式 + private String objtype;//往来对象 + private String payaccount;//付款银行账户 + private String recaccount;//收款银行账户 + private String cashaccount;//现金账户 + private String coordflag;//单据协同标志 + private String busidate;//起算日期 + private String isforce;//承付 + private String commpaybegindate;//承付开始日期 + private String commpayenddate;//承付截止日期 + private String approvestatus;//审批状态 + private String approvedated;//审核日期 + private String isfromindependent;//是否独立结算信息 + private String customer;//客户 + private String expectdealdate;//期望处理日 + private String invoiceno;//发票号 + private String consignagreement;//托收协议号 + private String creditorreference;//债权人参考号 + private String sddreversalflag;//直接借记退回标记 + private String reversalreason;//退回原因 + private String ailurereason;//失败原因 + private String payreason;//支付原因 + private String creditrefstd;//贷方引用信息标准 + private String isurgent;//紧急 + private String isrefund;//是否退款 + private String rececountryid;//收货国 + private String taxcountryid;//报税国 + private String sagaFrozen;//冻结状态 + private String pkRatetype;//组织汇率类型 + private String ratedate;//组织汇率来源日期 + private String customerV;//客户版本 + private String supplierV;//供应商版本 + private String def10;//自定义项10 + private String def9;//自定义项9 + private String def8;//自定义项8 + private String def7;//自定义项7 + private String def6;//自定义项6 + private String def5;//自定义项5 + private String def4;//自定义项4 + private String def3;//自定义项3 + private String def2;//自定义项2 + private String modifiedtime;//最后修改时间 + private String creationtime;//创建时间 + private String creator;//创建人 + private String modifier;//最后修改人 + + private String oaResult;//OA支付结果 + private String oaPushStatus;//OA推送状态 + + public String getOaResult() { + return oaResult; + } + + public void setOaResult(String oaResult) { + this.oaResult = oaResult; + } + + public String getOaPushStatus() { + return oaPushStatus; + } + + public void setOaPushStatus(String oaPushStatus) { + this.oaPushStatus = oaPushStatus; + } + + public String getPkPaybill() { + return pkPaybill; + } + + public void setPkPaybill(String pkPaybill) { + this.pkPaybill = pkPaybill; + } + + public String getPkPcorg() { + return pkPcorg; + } + + public void setPkPcorg(String pkPcorg) { + this.pkPcorg = pkPcorg; + } + + public String getPkFiorg() { + return pkFiorg; + } + + public void setPkFiorg(String pkFiorg) { + this.pkFiorg = pkFiorg; + } + + public String getPkOrg() { + return pkOrg; + } + + public void setPkOrg(String pkOrg) { + this.pkOrg = pkOrg; + } + + public String getSettOrg() { + return settOrg; + } + + public void setSettOrg(String settOrg) { + this.settOrg = settOrg; + } + + public String getPuOrg() { + return puOrg; + } + + public void setPuOrg(String puOrg) { + this.puOrg = puOrg; + } + + public String getPuOrgV() { + return puOrgV; + } + + public void setPuOrgV(String puOrgV) { + this.puOrgV = puOrgV; + } + + public String getPkFiorgV() { + return pkFiorgV; + } + + public void setPkFiorgV(String pkFiorgV) { + this.pkFiorgV = pkFiorgV; + } + + public String getPkPcorgV() { + return pkPcorgV; + } + + public void setPkPcorgV(String pkPcorgV) { + this.pkPcorgV = pkPcorgV; + } + + public String getPkOrgV() { + return pkOrgV; + } + + public void setPkOrgV(String pkOrgV) { + this.pkOrgV = pkOrgV; + } + + public String getSettOrgV() { + return settOrgV; + } + + public void setSettOrgV(String settOrgV) { + this.settOrgV = settOrgV; + } + + public String getIsreded() { + return isreded; + } + + public void setIsreded(String isreded) { + this.isreded = isreded; + } + + public String getOutbusitype() { + return outbusitype; + } + + public void setOutbusitype(String outbusitype) { + this.outbusitype = outbusitype; + } + + public String getPayman() { + return payman; + } + + public void setPayman(String payman) { + this.payman = payman; + } + + public String getPaydate() { + return paydate; + } + + public void setPaydate(String paydate) { + this.paydate = paydate; + } + + public String getIsonlinepay() { + return isonlinepay; + } + + public void setIsonlinepay(String isonlinepay) { + this.isonlinepay = isonlinepay; + } + + public String getOfficialprintuser() { + return officialprintuser; + } + + public void setOfficialprintuser(String officialprintuser) { + this.officialprintuser = officialprintuser; + } + + public String getOfficialprintdate() { + return officialprintdate; + } + + public void setOfficialprintdate(String officialprintdate) { + this.officialprintdate = officialprintdate; + } + + public String getSettlenum() { + return settlenum; + } + + public void setSettlenum(String settlenum) { + this.settlenum = settlenum; + } + + public String getPkGroup() { + return pkGroup; + } + + public void setPkGroup(String pkGroup) { + this.pkGroup = pkGroup; + } + + public String getPkBilltype() { + return pkBilltype; + } + + public void setPkBilltype(String pkBilltype) { + this.pkBilltype = pkBilltype; + } + + public String getIsmandatepay() { + return ismandatepay; + } + + public void setIsmandatepay(String ismandatepay) { + this.ismandatepay = ismandatepay; + } + + public String getCustdelegate() { + return custdelegate; + } + + public void setCustdelegate(String custdelegate) { + this.custdelegate = custdelegate; + } + + public String getPkCorp() { + return pkCorp; + } + + public void setPkCorp(String pkCorp) { + this.pkCorp = pkCorp; + } + + public String getPkTradetype() { + return pkTradetype; + } + + public void setPkTradetype(String pkTradetype) { + this.pkTradetype = pkTradetype; + } + + public String getPkTradetypeid() { + return pkTradetypeid; + } + + public void setPkTradetypeid(String pkTradetypeid) { + this.pkTradetypeid = pkTradetypeid; + } + + public String getBillclass() { + return billclass; + } + + public void setBillclass(String billclass) { + this.billclass = billclass; + } + + public String getAccessorynum() { + return accessorynum; + } + + public void setAccessorynum(String accessorynum) { + this.accessorynum = accessorynum; + } + + public String getSubjcode() { + return subjcode; + } + + public void setSubjcode(String subjcode) { + this.subjcode = subjcode; + } + + public String getIsflowbill() { + return isflowbill; + } + + public void setIsflowbill(String isflowbill) { + this.isflowbill = isflowbill; + } + + public String getConfirmuser() { + return confirmuser; + } + + public void setConfirmuser(String confirmuser) { + this.confirmuser = confirmuser; + } + + public String getIsinit() { + return isinit; + } + + public void setIsinit(String isinit) { + this.isinit = isinit; + } + + public String getBillno() { + return billno; + } + + public void setBillno(String billno) { + this.billno = billno; + } + + public String getBilldate() { + return billdate; + } + + public void setBilldate(String billdate) { + this.billdate = billdate; + } + + public String getSyscode() { + return syscode; + } + + public void setSyscode(String syscode) { + this.syscode = syscode; + } + + public String getSrcSyscode() { + return srcSyscode; + } + + public void setSrcSyscode(String srcSyscode) { + this.srcSyscode = srcSyscode; + } + + public String getBillstatus() { + return billstatus; + } + + public void setBillstatus(String billstatus) { + this.billstatus = billstatus; + } + + public String getBillmaker() { + return billmaker; + } + + public void setBillmaker(String billmaker) { + this.billmaker = billmaker; + } + + public String getApprover() { + return approver; + } + + public void setApprover(String approver) { + this.approver = approver; + } + + public String getApprovedate() { + return approvedate; + } + + public void setApprovedate(String approvedate) { + this.approvedate = approvedate; + } + + public String getSignuser() { + return signuser; + } + + public void setSignuser(String signuser) { + this.signuser = signuser; + } + + public String getSignyear() { + return signyear; + } + + public void setSignyear(String signyear) { + this.signyear = signyear; + } + + public String getSignperiod() { + return signperiod; + } + + public void setSignperiod(String signperiod) { + this.signperiod = signperiod; + } + + public String getSigndate() { + return signdate; + } + + public void setSigndate(String signdate) { + this.signdate = signdate; + } + + public String getPkBusitype() { + return pkBusitype; + } + + public void setPkBusitype(String pkBusitype) { + this.pkBusitype = pkBusitype; + } + + public String getMoney() { + return money; + } + + public void setMoney(String money) { + this.money = money; + } + + public String getLocalMoney() { + return localMoney; + } + + public void setLocalMoney(String localMoney) { + this.localMoney = localMoney; + } + + public String getBillyear() { + return billyear; + } + + public void setBillyear(String billyear) { + this.billyear = billyear; + } + + public String getBillperiod() { + return billperiod; + } + + public void setBillperiod(String billperiod) { + this.billperiod = billperiod; + } + + public String getScomment() { + return scomment; + } + + public void setScomment(String scomment) { + this.scomment = scomment; + } + + public String getSettleflag() { + return settleflag; + } + + public void setSettleflag(String settleflag) { + this.settleflag = settleflag; + } + + public String getSettletype() { + return settletype; + } + + public void setSettletype(String settletype) { + this.settletype = settletype; + } + + public String getEffectstatus() { + return effectstatus; + } + + public void setEffectstatus(String effectstatus) { + this.effectstatus = effectstatus; + } + + public String getEffectuser() { + return effectuser; + } + + public void setEffectuser(String effectuser) { + this.effectuser = effectuser; + } + + public String getEffectdate() { + return effectdate; + } + + public void setEffectdate(String effectdate) { + this.effectdate = effectdate; + } + + public String getLastapproveid() { + return lastapproveid; + } + + public void setLastapproveid(String lastapproveid) { + this.lastapproveid = lastapproveid; + } + + public String getBodys() { + return bodys; + } + + public void setBodys(String bodys) { + this.bodys = bodys; + } + + public String getGrouplocal() { + return grouplocal; + } + + public void setGrouplocal(String grouplocal) { + this.grouplocal = grouplocal; + } + + public String getGloballocal() { + return globallocal; + } + + public void setGloballocal(String globallocal) { + this.globallocal = globallocal; + } + + public String getRate() { + return rate; + } + + public void setRate(String rate) { + this.rate = rate; + } + + public String getGrouprate() { + return grouprate; + } + + public void setGrouprate(String grouprate) { + this.grouprate = grouprate; + } + + public String getGlobalrate() { + return globalrate; + } + + public void setGlobalrate(String globalrate) { + this.globalrate = globalrate; + } + + public String getCheckelement() { + return checkelement; + } + + public void setCheckelement(String checkelement) { + this.checkelement = checkelement; + } + + public String getPuDeptid() { + return puDeptid; + } + + public void setPuDeptid(String puDeptid) { + this.puDeptid = puDeptid; + } + + public String getPuDeptidV() { + return puDeptidV; + } + + public void setPuDeptidV(String puDeptidV) { + this.puDeptidV = puDeptidV; + } + + public String getPuPsndoc() { + return puPsndoc; + } + + public void setPuPsndoc(String puPsndoc) { + this.puPsndoc = puPsndoc; + } + + public String getCashitem() { + return cashitem; + } + + public void setCashitem(String cashitem) { + this.cashitem = cashitem; + } + + public String getBankrollprojet() { + return bankrollprojet; + } + + public void setBankrollprojet(String bankrollprojet) { + this.bankrollprojet = bankrollprojet; + } + + public String getPkDeptid() { + return pkDeptid; + } + + public void setPkDeptid(String pkDeptid) { + this.pkDeptid = pkDeptid; + } + + public String getPkDeptidV() { + return pkDeptidV; + } + + public void setPkDeptidV(String pkDeptidV) { + this.pkDeptidV = pkDeptidV; + } + + public String getPkPsndoc() { + return pkPsndoc; + } + + public void setPkPsndoc(String pkPsndoc) { + this.pkPsndoc = pkPsndoc; + } + + public String getSupplier() { + return supplier; + } + + public void setSupplier(String supplier) { + this.supplier = supplier; + } + + public String getPkCurrtype() { + return pkCurrtype; + } + + public void setPkCurrtype(String pkCurrtype) { + this.pkCurrtype = pkCurrtype; + } + + public String getPkSubjcode() { + return pkSubjcode; + } + + public void setPkSubjcode(String pkSubjcode) { + this.pkSubjcode = pkSubjcode; + } + + public String getPkBalatype() { + return pkBalatype; + } + + public void setPkBalatype(String pkBalatype) { + this.pkBalatype = pkBalatype; + } + + public String getObjtype() { + return objtype; + } + + public void setObjtype(String objtype) { + this.objtype = objtype; + } + + public String getPayaccount() { + return payaccount; + } + + public void setPayaccount(String payaccount) { + this.payaccount = payaccount; + } + + public String getRecaccount() { + return recaccount; + } + + public void setRecaccount(String recaccount) { + this.recaccount = recaccount; + } + + public String getCashaccount() { + return cashaccount; + } + + public void setCashaccount(String cashaccount) { + this.cashaccount = cashaccount; + } + + public String getCoordflag() { + return coordflag; + } + + public void setCoordflag(String coordflag) { + this.coordflag = coordflag; + } + + public String getBusidate() { + return busidate; + } + + public void setBusidate(String busidate) { + this.busidate = busidate; + } + + public String getIsforce() { + return isforce; + } + + public void setIsforce(String isforce) { + this.isforce = isforce; + } + + public String getCommpaybegindate() { + return commpaybegindate; + } + + public void setCommpaybegindate(String commpaybegindate) { + this.commpaybegindate = commpaybegindate; + } + + public String getCommpayenddate() { + return commpayenddate; + } + + public void setCommpayenddate(String commpayenddate) { + this.commpayenddate = commpayenddate; + } + + public String getApprovestatus() { + return approvestatus; + } + + public void setApprovestatus(String approvestatus) { + this.approvestatus = approvestatus; + } + + public String getApprovedated() { + return approvedated; + } + + public void setApprovedated(String approvedated) { + this.approvedated = approvedated; + } + + public String getIsfromindependent() { + return isfromindependent; + } + + public void setIsfromindependent(String isfromindependent) { + this.isfromindependent = isfromindependent; + } + + public String getCustomer() { + return customer; + } + + public void setCustomer(String customer) { + this.customer = customer; + } + + public String getExpectdealdate() { + return expectdealdate; + } + + public void setExpectdealdate(String expectdealdate) { + this.expectdealdate = expectdealdate; + } + + public String getInvoiceno() { + return invoiceno; + } + + public void setInvoiceno(String invoiceno) { + this.invoiceno = invoiceno; + } + + public String getConsignagreement() { + return consignagreement; + } + + public void setConsignagreement(String consignagreement) { + this.consignagreement = consignagreement; + } + + public String getCreditorreference() { + return creditorreference; + } + + public void setCreditorreference(String creditorreference) { + this.creditorreference = creditorreference; + } + + public String getSddreversalflag() { + return sddreversalflag; + } + + public void setSddreversalflag(String sddreversalflag) { + this.sddreversalflag = sddreversalflag; + } + + public String getReversalreason() { + return reversalreason; + } + + public void setReversalreason(String reversalreason) { + this.reversalreason = reversalreason; + } + + public String getAilurereason() { + return ailurereason; + } + + public void setAilurereason(String ailurereason) { + this.ailurereason = ailurereason; + } + + public String getPayreason() { + return payreason; + } + + public void setPayreason(String payreason) { + this.payreason = payreason; + } + + public String getCreditrefstd() { + return creditrefstd; + } + + public void setCreditrefstd(String creditrefstd) { + this.creditrefstd = creditrefstd; + } + + public String getIsurgent() { + return isurgent; + } + + public void setIsurgent(String isurgent) { + this.isurgent = isurgent; + } + + public String getIsrefund() { + return isrefund; + } + + public void setIsrefund(String isrefund) { + this.isrefund = isrefund; + } + + public String getRececountryid() { + return rececountryid; + } + + public void setRececountryid(String rececountryid) { + this.rececountryid = rececountryid; + } + + public String getTaxcountryid() { + return taxcountryid; + } + + public void setTaxcountryid(String taxcountryid) { + this.taxcountryid = taxcountryid; + } + + public String getSagaFrozen() { + return sagaFrozen; + } + + public void setSagaFrozen(String sagaFrozen) { + this.sagaFrozen = sagaFrozen; + } + + public String getPkRatetype() { + return pkRatetype; + } + + public void setPkRatetype(String pkRatetype) { + this.pkRatetype = pkRatetype; + } + + public String getRatedate() { + return ratedate; + } + + public void setRatedate(String ratedate) { + this.ratedate = ratedate; + } + + public String getCustomerV() { + return customerV; + } + + public void setCustomerV(String customerV) { + this.customerV = customerV; + } + + public String getSupplierV() { + return supplierV; + } + + public void setSupplierV(String supplierV) { + this.supplierV = supplierV; + } + + public String getDef10() { + return def10; + } + + public void setDef10(String def10) { + this.def10 = def10; + } + + public String getDef9() { + return def9; + } + + public void setDef9(String def9) { + this.def9 = def9; + } + + public String getDef8() { + return def8; + } + + public void setDef8(String def8) { + this.def8 = def8; + } + + public String getDef7() { + return def7; + } + + public void setDef7(String def7) { + this.def7 = def7; + } + + public String getDef6() { + return def6; + } + + public void setDef6(String def6) { + this.def6 = def6; + } + + public String getDef5() { + return def5; + } + + public void setDef5(String def5) { + this.def5 = def5; + } + + public String getDef4() { + return def4; + } + + public void setDef4(String def4) { + this.def4 = def4; + } + + public String getDef3() { + return def3; + } + + public void setDef3(String def3) { + this.def3 = def3; + } + + public String getDef2() { + return def2; + } + + public void setDef2(String def2) { + this.def2 = def2; + } + + public String getModifiedtime() { + return modifiedtime; + } + + public void setModifiedtime(String modifiedtime) { + this.modifiedtime = modifiedtime; + } + + public String getCreationtime() { + return creationtime; + } + + public void setCreationtime(String creationtime) { + this.creationtime = creationtime; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getModifier() { + return modifier; + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.xml new file mode 100644 index 00000000..8aa114cb --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/entity/PaymentEntity.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + pk_org as pkOrg + ,isreded as isreded + ,pk_paybill as pkPaybill + ,pk_fiorg as pkFiorg + ,pu_org as puOrg + ,pk_group as pkGroup + ,pk_billtype as pkBilltype + ,pk_corp as pkCorp + ,pk_tradetype as pkTradetype + ,billclass as billclass + ,pk_tradetypeid as pkTradetypeid + ,billno as billno + ,billdate as billdate + ,syscode as syscode + ,src_syscode as srcSyscode + ,billstatus as billstatus + ,billmaker as billmaker + ,approver as approver + ,approvedate as approvedate + ,pk_busitype as pkBusitype + ,money as money + ,local_money as localMoney + ,scomment as scomment + ,settleflag as settleflag + ,settletype as settletype + ,effectstatus as effectstatus + ,pu_deptid as puDeptid + ,pu_psndoc as puPsndoc + ,pk_deptid as pkDeptid + ,pk_psndoc as pkPsndoc + ,supplier as supplier + ,pk_currtype as pkCurrtype + ,pk_subjcode as pkSubjcode + ,pk_balatype as pkBalatype + ,objtype as objtype + ,payaccount as payaccount + ,recaccount as recaccount + ,cashaccount as cashaccount + ,approvestatus as approvestatus + ,customer as customer + ,invoiceno as invoiceno + ,reversalreason as reversalreason + ,failurereason as failurereason + ,payreason as payreason + ,modifiedtime as modifiedtime + ,creationtime as creationtime + ,creator as creator + ,modifier as modifier + + + + + + + + + + + + + + update formmain_0260 set xxx =#{oaResult} where id=#{id} + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/CbsResultToOAPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/CbsResultToOAPluginInitializer.java new file mode 100644 index 00000000..f5fd2665 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/CbsResultToOAPluginInitializer.java @@ -0,0 +1,145 @@ +package com.hzya.frame.plugin.oa.payment.plugin; + +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.oa.payment.dao.IPaymentDao; +import com.hzya.frame.plugin.oa.payment.dao.IPaymentDetailsDao; +import com.hzya.frame.plugin.oa.payment.entity.PaymentDetailsEntity; +import com.hzya.frame.plugin.oa.payment.entity.PaymentEntity; +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.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; + +import java.util.Date; +import java.util.List; + +public class CbsResultToOAPluginInitializer extends PluginBaseEntity { + Logger logger = LoggerFactory.getLogger(CbsResultToOAPluginInitializer.class); + + @Autowired + private IPaymentDao paymentDao; + @Autowired + private IPaymentDetailsDao paymentDetailsDao; + + @Value("${zt.url}") + private String url; + + @Autowired + private IIntegrationTaskLivingDetailsService taskLivingDetailsService; + + + @Override + public void initialize() { + logger.info(getPluginLabel() + "執行初始化方法initialize()"); + } + + @Override + public void destroy() { + logger.info(getPluginLabel() + "執行銷毀方法destroy()"); + } + + @Override + public String getPluginId() { + return "CbsResultToOAPluginInitializer"; + } + + @Override + public String getPluginName() { + return "CBS支付结果回写OA"; + } + + @Override + public String getPluginLabel() { + return "CbsResultToOAPluginInitializer"; + } + + @Override + public String getPluginType() { + return "1"; + } + @Override + public JsonResultEntity executeBusiness(JSONObject requestJson) { + try { + logger.info("======开始执行CBS支付结果回写OA========"); + //重试方法 + if (null != requestJson) { + //如果这个id不为空,说明是重试的 + String id = requestJson.getString("integration_task_living_details_id"); + //执行重新发送 + PaymentEntity paymentEntity = new PaymentEntity(); + paymentEntity.setDataSourceCode(""); + if (StrUtil.isNotEmpty(id)) { + paymentEntity.setId(id); + } + //查询没有支付成功的数据 + List paymentEntities = paymentDao.queryPaymentOAResult(paymentEntity); + if(paymentEntities == null || paymentEntities.size() == 0){ + logger.info("=====OA中没有需要查询支付状态的数据=========="); + return BaseResult.getSuccessMessageEntity("查询成功"); + } + for (PaymentEntity payment : paymentEntities) { + payment.setDataSourceCode(""); + JSONObject jsonObject=new JSONObject(); + + + String result = HttpRequest.post(url). + header("appId", ""). + header("apiCode", ""). + header("publicKey", "ZJYAQ/VtQ66PqKXlV0EowrrlKkhBHYgS/Zk39Q5ezIQne51Ce7eDIk+3zDUT+v578prj"). + header("secretKey", "iLLk424Bmzknbu+ROeJoiVDMYY5EFXtbZY/aU13HmVYIiQrIw9c0Ag4ipxbfpUqqj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA="). + body(jsonObject.toString()). + execute(). + body(); + logger.info("========CBS支付结果回写OA的返回参数为:{}=========",result); + JSONObject resultJson = JSONObject.parseObject(result); + if(!resultJson.getBoolean("flag")){ + JSONObject attribute = resultJson.getJSONObject("attribute"); + if("".equals(attribute.getString(""))){ + //修改oa付款单支付状态 + payment.setOaResult(""); + paymentDao.updatePaymentOAResult(payment); + } + } + } + } + }catch(Exception e){ + logger.info("======执行CBS支付结果回写OA失败:{}========", e.getMessage()); + e.printStackTrace(); + } + return BaseResult.getFailureMessageEntity("CBS支付结果回写OA执行失败"); + } + + private void saveTaskLivingDetails(String rootAppPk,String rootAppBill,String rootAppNewData,String newTransmitInfo,boolean flag) { + try { + 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"); + integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk); + integrationTaskLivingDetailsEntity.setRootAppBill(rootAppBill); + integrationTaskLivingDetailsEntity.setPluginId("CbsResultToOAPluginInitializer"); + integrationTaskLivingDetailsEntity.setRootAppNewData(rootAppNewData); + integrationTaskLivingDetailsEntity.setNewTransmitInfo(newTransmitInfo); + if(flag){ + taskLivingDetailsService.saveLogToSuccess(integrationTaskLivingDetailsEntity); + }else { + taskLivingDetailsService.saveLogToFail(integrationTaskLivingDetailsEntity); + } + }catch (Exception e){ + logger.info("保存日志到集成任务日志明细中失败:{}",e.getMessage()); + } + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/OAApprovedToCbsPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/OAApprovedToCbsPluginInitializer.java new file mode 100644 index 00000000..9a9bb8c7 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/OAApprovedToCbsPluginInitializer.java @@ -0,0 +1,155 @@ +package com.hzya.frame.plugin.oa.payment.plugin; + +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.oa.payment.dao.IPaymentDao; +import com.hzya.frame.plugin.oa.payment.dao.IPaymentDetailsDao; +import com.hzya.frame.plugin.oa.payment.entity.PaymentDetailsEntity; +import com.hzya.frame.plugin.oa.payment.entity.PaymentEntity; +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.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; + +import java.util.Date; +import java.util.List; + +public class OAApprovedToCbsPluginInitializer extends PluginBaseEntity { + Logger logger = LoggerFactory.getLogger(PaymentToOAPluginInitializer.class); + + @Autowired + private IPaymentDao paymentDao; + @Autowired + private IPaymentDetailsDao paymentDetailsDao; + + @Value("${zt.url}") + private String url; + + @Autowired + private IIntegrationTaskLivingDetailsService taskLivingDetailsService; + + + @Override + public void initialize() { + logger.info(getPluginLabel() + "執行初始化方法initialize()"); + } + + @Override + public void destroy() { + logger.info(getPluginLabel() + "執行銷毀方法destroy()"); + } + + @Override + public String getPluginId() { + return "OAApprovedToCbsPluginInitializer"; + } + + @Override + public String getPluginName() { + return "OA已审批单据传递CBS"; + } + + @Override + public String getPluginLabel() { + return "OAApprovedToCbsPluginInitializer"; + } + + @Override + public String getPluginType() { + return "1"; + } + @Override + public JsonResultEntity executeBusiness(JSONObject requestJson) { + try { + logger.info("======开始执行OA审批完成单据推送CBS========"); + //重试方法 + if (null != requestJson) { + //如果这个id不为空,说明是重试的 + String id = requestJson.getString("integration_task_living_details_id"); + //执行重新发送 + PaymentEntity paymentEntity = new PaymentEntity(); + paymentEntity.setDataSourceCode(""); + if (StrUtil.isNotEmpty(id)) { + paymentEntity.setId(id); + } + //查询OA审批完成单据推送CBS的数据 + List paymentEntities = paymentDao.queryPaymentOAToCbs(paymentEntity); + if(paymentEntities == null || paymentEntities.size() == 0){ + logger.info("=====OA中没有已审批完成需要推送CBS的单据=========="); + return BaseResult.getSuccessMessageEntity("查询成功"); + } + for (PaymentEntity payment : paymentEntities) { + JSONObject jsonObject=new JSONObject(); + + //查询OA明细数据 + PaymentDetailsEntity paymentDetailsEntity=new PaymentDetailsEntity(); + paymentDetailsEntity.setDataSourceCode(""); + paymentDetailsEntity.setFormmainId(payment.getId()); + List paymentDetailsEntities = paymentDetailsDao.queryPaymentDetails(paymentDetailsEntity); + if(paymentDetailsEntities == null || paymentDetailsEntities.size() == 0){ + logger.info("=====没有需要从OA传递CBS的明细数据=========="); + }else{ + for (PaymentDetailsEntity detailsEntity : paymentDetailsEntities) { + + } + } + + + String result = HttpRequest.post(url). + header("appId", ""). + header("apiCode", ""). + header("publicKey", "ZJYAQ/VtQ66PqKXlV0EowrrlKkhBHYgS/Zk39Q5ezIQne51Ce7eDIk+3zDUT+v578prj"). + header("secretKey", "iLLk424Bmzknbu+ROeJoiVDMYY5EFXtbZY/aU13HmVYIiQrIw9c0Ag4ipxbfpUqqj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA="). + body(jsonObject.toString()). + execute(). + body(); + logger.info("========OA审批完成单据推送CBS的返回参数为:{}=========",result); + JSONObject resultJson = JSONObject.parseObject(result); + if(!resultJson.getBoolean("flag")){ + JSONObject attribute = resultJson.getJSONObject("attribute"); + if("".equals(attribute.getString(""))){ + //修改oa付款单推送状态 + } + } + } + } + }catch(Exception e){ + logger.info("======执行OA审批完成单据推送CBS失败:{}========", e.getMessage()); + e.printStackTrace(); + } + return BaseResult.getFailureMessageEntity("OA审批完成单据推送CBS执行失败"); + } + + private void saveTaskLivingDetails(String rootAppPk,String rootAppBill,String rootAppNewData,String newTransmitInfo,boolean flag) { + try { + 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"); + integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk); + integrationTaskLivingDetailsEntity.setRootAppBill(rootAppBill); + integrationTaskLivingDetailsEntity.setPluginId("OAApprovedToCbsPluginInitializer"); + integrationTaskLivingDetailsEntity.setRootAppNewData(rootAppNewData); + integrationTaskLivingDetailsEntity.setNewTransmitInfo(newTransmitInfo); + if(flag){ + taskLivingDetailsService.saveLogToSuccess(integrationTaskLivingDetailsEntity); + }else { + taskLivingDetailsService.saveLogToFail(integrationTaskLivingDetailsEntity); + } + }catch (Exception e){ + logger.info("保存日志到集成任务日志明细中失败:{}",e.getMessage()); + } + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/PaymentToOAPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/PaymentToOAPluginInitializer.java new file mode 100644 index 00000000..22d06e54 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/plugin/PaymentToOAPluginInitializer.java @@ -0,0 +1,222 @@ +package com.hzya.frame.plugin.oa.payment.plugin; + +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.base.PluginBaseEntity; +import com.hzya.frame.plugin.oa.payment.dao.IPaymentDao; +import com.hzya.frame.plugin.oa.payment.dao.IPaymentDetailsDao; +import com.hzya.frame.plugin.oa.payment.entity.PaymentDetailsEntity; +import com.hzya.frame.plugin.oa.payment.entity.PaymentEntity; +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.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PaymentToOAPluginInitializer extends PluginBaseEntity { + Logger logger = LoggerFactory.getLogger(PaymentToOAPluginInitializer.class); + + @Autowired + private IPaymentDao paymentDao; + @Autowired + private IPaymentDetailsDao paymentDetailsDao; + + @Value("${zt.url}") + private String url; + + @Autowired + private IIntegrationTaskLivingDetailsService taskLivingDetailsService; + + + @Override + public void initialize() { + logger.info(getPluginLabel() + "執行初始化方法initialize()"); + } + + @Override + public void destroy() { + logger.info(getPluginLabel() + "執行銷毀方法destroy()"); + } + + @Override + public String getPluginId() { + return "PaymentToOAPluginInitializer"; + } + + @Override + public String getPluginName() { + return "NCC付款单传递OA"; + } + + @Override + public String getPluginLabel() { + return "PaymentToOAPluginInitializer"; + } + + @Override + public String getPluginType() { + return "1"; + } + @Override + public JsonResultEntity executeBusiness(JSONObject requestJson) { + try { + logger.info("======开始执行NCC付款单传递OA========"); + //重试方法 + if (null != requestJson) { + //如果这个id不为空,说明是重试的 + String id = requestJson.getString("integration_task_living_details_id"); + //执行重新发送 + PaymentEntity paymentEntity = new PaymentEntity(); + paymentEntity.setDataSourceCode(""); + if (StrUtil.isNotEmpty(id)) { + paymentEntity.setId(id); + } + //查询ncc需要传递OA的数据 + List paymentEntities = paymentDao.query(paymentEntity); + if(paymentEntities == null || paymentEntities.size() == 0){ + logger.info("=====没有需要从NCC传递到OA的付款单=========="); + return BaseResult.getSuccessMessageEntity("查询成功"); + } + for (PaymentEntity payment : paymentEntities) { + JSONObject jsonObject=new JSONObject(); + JSONObject jsonMain=new JSONObject(); + JSONArray jsonArray=new JSONArray(); + jsonObject.put("应付财务组织",payment.getPkOrg()); + jsonObject.put("红冲标志",payment.getIsreded()); + jsonObject.put("付款类型",payment.getPkTradetypeid()); + jsonObject.put("单据编号",payment.getBillno()); + jsonObject.put("单据日期",payment.getBilldate()); + jsonObject.put("单据状态",payment.getBillstatus()); + jsonObject.put("发起人",payment.getBillmaker()); + jsonObject.put("业务流程",payment.getPkBusitype()); + jsonObject.put("原币金额",payment.getMoney()); + jsonObject.put("组织本币金额",payment.getLocalMoney()); + jsonObject.put("生效状态",payment.getEffectstatus()); + jsonObject.put("部门",payment.getPkDeptid()); + jsonObject.put("业务员",payment.getPkPsndoc()); + jsonObject.put("供应商",payment.getSupplier()); + jsonObject.put("币种",payment.getPkCurrtype()); + jsonObject.put("收支项目",payment.getPkSubjcode()); + jsonObject.put("结算方式",payment.getPkBalatype()); + jsonObject.put("往来对象",payment.getObjtype()); + jsonObject.put("付款银行账户",payment.getPayaccount()); + jsonObject.put("收款银行账户",payment.getRecaccount()); + jsonObject.put("现金账户",payment.getCashaccount()); + jsonObject.put("审批状态",payment.getApprovestatus()); + jsonObject.put("客户",payment.getCustomer()); + jsonMain.put("formmain_0260",jsonObject); + PaymentDetailsEntity paymentDetailsEntity=new PaymentDetailsEntity(); + paymentDetailsEntity.setDataSourceCode(""); + paymentDetailsEntity.setTopBillid(payment.getPkPaybill()); + //查询NCC付款单明细 + List paymentDetailsEntities = paymentDetailsDao.query(paymentDetailsEntity); + if(paymentDetailsEntities == null || paymentDetailsEntities.size() == 0){ + logger.info("=====没有需要从NCC传递到OA的付款单明细数据=========="); + }else{ + for (PaymentDetailsEntity detailsEntity : paymentDetailsEntities) { + JSONObject jsonDetails=new JSONObject(); + jsonDetails.put("付款性质",detailsEntity.getPrepay()); + jsonDetails.put("物料",detailsEntity.getMaterial()); + jsonDetails.put("供应商-明细表",detailsEntity.getSupplier()); + jsonDetails.put("挂起标志",detailsEntity.getPausetransact()); + jsonDetails.put("往来对象-明细表",detailsEntity.getObjtype()); + jsonDetails.put("票据类型",detailsEntity.getChecktype()); + jsonDetails.put("摘要",detailsEntity.getScomment()); + jsonDetails.put("币种-明细表",detailsEntity.getPkCurrtype()); + jsonDetails.put("组织本币汇率-明细表",detailsEntity.getRate()); + jsonDetails.put("部门-明细表",detailsEntity.getPkDeptid()); + jsonDetails.put("业务员-明细表",detailsEntity.getPkPsndoc()); + jsonDetails.put("借方原币金额",detailsEntity.getMoneyDe()); + jsonDetails.put("组织本币金额-借方",detailsEntity.getLocalMoneyDe()); + jsonDetails.put("借方原币无税金额",detailsEntity.getNotaxDe()); + jsonDetails.put("税率",detailsEntity.getTaxrate()); + jsonDetails.put("结算方式-明细表",detailsEntity.getPkBalatype()); + jsonDetails.put("票据号",detailsEntity.getCheckno()); + jsonDetails.put("付款银行账户-明细表",detailsEntity.getPayaccount()); + jsonDetails.put("收款银行账户-明细表",detailsEntity.getRecaccount()); + jsonDetails.put("现金账户-明细表",detailsEntity.getCashaccount()); + jsonDetails.put("集团本币无税金额-借方",detailsEntity.getGroupnotaxDe()); + jsonDetails.put("全局本币无税金额-借方",detailsEntity.getGlobalnotaxDe()); + jsonDetails.put("客户-明细表",detailsEntity.getCustomer()); + jsonDetails.put("付款业务类型",detailsEntity.getPkRecpaytype()); + jsonDetails.put("税码",detailsEntity.getTaxcodeid()); + jsonDetails.put("直联电票",detailsEntity.getDirectCheckno()); + jsonArray.add(jsonDetails); + } + } + jsonMain.put("formson_0261",jsonArray); + Map map = new HashMap(); + map.put("appName", "collaboration"); + Map data1 = new HashMap(); + data1.put("templateCode", "formmain_0260"); + data1.put("draft", "1"); + data1.put("data", jsonMain); + map.put("data", data1); + logger.info("========NCC付款单传递OA的请求参数为:{}=========",map); + //发送数据 + String result = HttpRequest.post(url). + header("appId", "800064"). + header("apiCode", "8000640000"). + header("publicKey", "ZJYAQ/VtQ66PqKXlV0EowrrlKkhBHYgS/Zk39Q5ezIQne51Ce7eDIk+3zDUT+v578prj"). + header("secretKey", "iLLk424Bmzknbu+ROeJoiVDMYY5EFXtbZY/aU13HmVYIiQrIw9c0Ag4ipxbfpUqqj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA="). + body(map.toString()). + execute(). + body(); + logger.info("========NCC付款单传递OA的返回参数为:{}=========",result); + JSONObject resultJson = JSONObject.parseObject(result); + if(!resultJson.getBoolean("flag")){ + JSONObject attribute = resultJson.getJSONObject("attribute"); + if("0".equals(attribute.getString("code"))){ + //修改NCC付款单推送状态 + } + } + } + logger.info("=======NCC付款单传递OA执行成功======="); + return BaseResult.getSuccessMessageEntity("NCC付款单传递OA执行成功"); + } + }catch (Exception e){ + logger.info("======执行NCC付款单传递OA失败:{}========", e.getMessage()); + e.printStackTrace(); + } + return BaseResult.getFailureMessageEntity("NCC付款单传递OA执行失败"); + } + + + private void saveTaskLivingDetails(String rootAppPk,String rootAppBill,String rootAppNewData,String newTransmitInfo,boolean flag) { + try { + 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"); + integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk); + integrationTaskLivingDetailsEntity.setRootAppBill(rootAppBill); + integrationTaskLivingDetailsEntity.setPluginId("PaymentToOAPluginInitializer"); + integrationTaskLivingDetailsEntity.setRootAppNewData(rootAppNewData); + integrationTaskLivingDetailsEntity.setNewTransmitInfo(newTransmitInfo); + if(flag){ + taskLivingDetailsService.saveLogToSuccess(integrationTaskLivingDetailsEntity); + }else { + taskLivingDetailsService.saveLogToFail(integrationTaskLivingDetailsEntity); + } + }catch (Exception e){ + logger.info("保存日志到集成任务日志明细中失败:{}",e.getMessage()); + } + } + +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/IPaymentService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/IPaymentService.java new file mode 100644 index 00000000..d9a56218 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/IPaymentService.java @@ -0,0 +1,7 @@ +package com.hzya.frame.plugin.oa.payment.service; + +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.plugin.payment.entity.PaymentEntity; + +public interface IPaymentService extends IBaseService { +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/impl/PaymentServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/impl/PaymentServiceImpl.java new file mode 100644 index 00000000..20b2408b --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/oa/payment/service/impl/PaymentServiceImpl.java @@ -0,0 +1,8 @@ +package com.hzya.frame.plugin.oa.payment.service.impl; + +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.plugin.payment.entity.PaymentEntity; +import com.hzya.frame.plugin.payment.service.IPaymentService; + +public class PaymentServiceImpl extends BaseService implements IPaymentService { +} diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/pluginCfg.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/pluginCfg.xml new file mode 100644 index 00000000..294b6b5e --- /dev/null +++ b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/pluginCfg.xml @@ -0,0 +1,6 @@ + + +JHOAPlugin +建辉OA插件 +202505230001 + diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-dao.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-dao.xml new file mode 100644 index 00000000..e5afe641 --- /dev/null +++ b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-dao.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-plugin.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-plugin.xml new file mode 100644 index 00000000..5b9d1b9f --- /dev/null +++ b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-plugin.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-service.xml b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-service.xml new file mode 100644 index 00000000..dc366931 --- /dev/null +++ b/base-buildpackage/src/main/resources/cfgHome/plugin/oa/payment/spring/spring-buildpackage-service.xml @@ -0,0 +1,5 @@ + + + + +