Merge branch 'fw-oa' of http://ufidahz.com.cn:9015/hzya/kangarooDataCenterV3 into ht
# Conflicts: # fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/IPayBillDao.java # fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/impl/PayBillDaoImpl.java # fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.java # fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.xml # fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/IPayBillService.java # fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/impl/PayBillServiceImpl.java # fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/impl/RecBillServiceImpl.java # fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeYonInterFace.java # fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java # fw-oa/src/main/java/com/hzya/frame/seeyon/util/OABipUtil.java
This commit is contained in:
commit
21722c1b73
|
@ -54,11 +54,11 @@
|
|||
<!-- <artifactId>fw-ningbobank</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-oa</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>fw-oa</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-u8</artifactId>-->
|
||||
|
|
|
@ -30,29 +30,4 @@ public interface IPayBillDao {
|
|||
*/
|
||||
|
||||
int updateState(PayBillEntity pay);
|
||||
/**
|
||||
*
|
||||
* @content 获取保证金付款单数据
|
||||
* @author laborer
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-01-07 9:44
|
||||
*
|
||||
*/
|
||||
|
||||
List<PayBillEntity> getMarginPayment(PayBillEntity entity);
|
||||
/**
|
||||
*
|
||||
* @content 获取保证金付款单详情数据
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-01-07 10:44
|
||||
*
|
||||
*/
|
||||
|
||||
List<PayBillEntity> getOaEngineerPayDetails(PayBillEntity details);
|
||||
|
||||
List<PayBillEntity> getReceived(PayBillEntity entity);
|
||||
|
||||
List<PayBillEntity> getReceivedDetails(PayBillEntity details);
|
||||
}
|
||||
|
|
|
@ -24,29 +24,9 @@ public class PayBillDaoImpl extends MybatisGenericDao implements IPayBillDao {
|
|||
public List<PayBillEntity> getOaEngineerPay(PayBillEntity entity) {
|
||||
return super.selectList("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_list_base",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@DS("#pay.dataSourceCode")
|
||||
@Override
|
||||
public int updateState(PayBillEntity entity) {
|
||||
return super.update("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_update",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<PayBillEntity> getMarginPayment(PayBillEntity entity) {
|
||||
return super.selectList("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_list_base_margin",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<PayBillEntity> getOaEngineerPayDetails(PayBillEntity entity) {
|
||||
return super.selectList("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_list_base_margin_details",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<PayBillEntity> getReceived(PayBillEntity entity) {
|
||||
return super.selectList("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_list_base_received",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<PayBillEntity> getReceivedDetails(PayBillEntity entity) {
|
||||
return super.selectList("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_list_base_received_details",entity);
|
||||
public int updateState(PayBillEntity pay) {
|
||||
return super.update("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_update",pay);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,411 +14,12 @@ import java.util.Map;
|
|||
*/
|
||||
|
||||
public class PayBillEntity extends BaseEntity {
|
||||
private String c_bill_type;//单据类型
|
||||
private String formCode;//单据号
|
||||
private String receiptDetailsId;//BIP到款明细主键
|
||||
private String repaymentDate;//还款日期
|
||||
private String repaymentType;//还款类型
|
||||
private String repaymentAmount;//还款金额
|
||||
private String recType;//还款类型
|
||||
private String orgCode;//组织编码
|
||||
private String deptCode;//部门编码
|
||||
private String fklxName;//付款类型
|
||||
private String zffsName;//支付方式
|
||||
private String firstSubject;//科目编码
|
||||
private String bzjProjectName;//保证金项目名称
|
||||
private String expirationDate;//投标保证金到期日
|
||||
private String deptCode2;//归属部门编码
|
||||
private String isCustomer;//是否运营商客户
|
||||
private String applyAmount;//申请金额
|
||||
private String checkedAmount;//财务核实金额
|
||||
private String comments;//说明
|
||||
private String creator;//制单人
|
||||
private String supplierCode;//供应商编码
|
||||
private String openBank;//开户银行
|
||||
private String bankAccount;//银行账号
|
||||
private String dkAmount;//打款金额
|
||||
private String dkTime;//打款时间
|
||||
private String isDydj;//是否打印本单据
|
||||
private String fieldName;//
|
||||
private String tableName;//
|
||||
private String formmain_id;//
|
||||
private String customerAddress;//客户地址
|
||||
private String linkMan;//联系人
|
||||
private String bhBeneficiary;//保函受益人
|
||||
private String beneficiaryPhone;//受益人电话
|
||||
private String beneficiaryAddress;//受益人地址
|
||||
private String projectNumber;//工程项目合同/标书号码
|
||||
private String projectAmount;//工程项目合同/标书总金额
|
||||
private String bhIndate;//保函有效期
|
||||
private String bhReceiver;//保函收件人
|
||||
private String contactType;//联系方式
|
||||
private String contactAddress;//联系地址
|
||||
private String bhProjectName;//保函项目名称
|
||||
private String lastBhDate;//最晚取得保函日期
|
||||
private String notes;//备注
|
||||
private String isBh;//是否取得保函原件
|
||||
private String contactNumber;//联系电话
|
||||
|
||||
public String getContactNumber() {
|
||||
return contactNumber;
|
||||
}
|
||||
|
||||
public void setContactNumber(String contactNumber) {
|
||||
this.contactNumber = contactNumber;
|
||||
}
|
||||
|
||||
public String getCustomerAddress() {
|
||||
return customerAddress;
|
||||
}
|
||||
|
||||
public void setCustomerAddress(String customerAddress) {
|
||||
this.customerAddress = customerAddress;
|
||||
}
|
||||
|
||||
public String getLinkMan() {
|
||||
return linkMan;
|
||||
}
|
||||
|
||||
public void setLinkMan(String linkMan) {
|
||||
this.linkMan = linkMan;
|
||||
}
|
||||
|
||||
public String getBhBeneficiary() {
|
||||
return bhBeneficiary;
|
||||
}
|
||||
|
||||
public void setBhBeneficiary(String bhBeneficiary) {
|
||||
this.bhBeneficiary = bhBeneficiary;
|
||||
}
|
||||
|
||||
public String getBeneficiaryPhone() {
|
||||
return beneficiaryPhone;
|
||||
}
|
||||
|
||||
public void setBeneficiaryPhone(String beneficiaryPhone) {
|
||||
this.beneficiaryPhone = beneficiaryPhone;
|
||||
}
|
||||
|
||||
public String getBeneficiaryAddress() {
|
||||
return beneficiaryAddress;
|
||||
}
|
||||
|
||||
public void setBeneficiaryAddress(String beneficiaryAddress) {
|
||||
this.beneficiaryAddress = beneficiaryAddress;
|
||||
}
|
||||
|
||||
public String getProjectNumber() {
|
||||
return projectNumber;
|
||||
}
|
||||
|
||||
public void setProjectNumber(String projectNumber) {
|
||||
this.projectNumber = projectNumber;
|
||||
}
|
||||
|
||||
public String getProjectAmount() {
|
||||
return projectAmount;
|
||||
}
|
||||
|
||||
public void setProjectAmount(String projectAmount) {
|
||||
this.projectAmount = projectAmount;
|
||||
}
|
||||
|
||||
public String getBhIndate() {
|
||||
return bhIndate;
|
||||
}
|
||||
|
||||
public void setBhIndate(String bhIndate) {
|
||||
this.bhIndate = bhIndate;
|
||||
}
|
||||
|
||||
public String getBhReceiver() {
|
||||
return bhReceiver;
|
||||
}
|
||||
|
||||
public void setBhReceiver(String bhReceiver) {
|
||||
this.bhReceiver = bhReceiver;
|
||||
}
|
||||
|
||||
public String getContactType() {
|
||||
return contactType;
|
||||
}
|
||||
|
||||
public void setContactType(String contactType) {
|
||||
this.contactType = contactType;
|
||||
}
|
||||
|
||||
public String getContactAddress() {
|
||||
return contactAddress;
|
||||
}
|
||||
|
||||
public void setContactAddress(String contactAddress) {
|
||||
this.contactAddress = contactAddress;
|
||||
}
|
||||
|
||||
public String getBhProjectName() {
|
||||
return bhProjectName;
|
||||
}
|
||||
|
||||
public void setBhProjectName(String bhProjectName) {
|
||||
this.bhProjectName = bhProjectName;
|
||||
}
|
||||
|
||||
public String getLastBhDate() {
|
||||
return lastBhDate;
|
||||
}
|
||||
|
||||
public void setLastBhDate(String lastBhDate) {
|
||||
this.lastBhDate = lastBhDate;
|
||||
}
|
||||
|
||||
public String getNotes() {
|
||||
return notes;
|
||||
}
|
||||
|
||||
public void setNotes(String notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
public String getIsBh() {
|
||||
return isBh;
|
||||
}
|
||||
|
||||
public void setIsBh(String isBh) {
|
||||
this.isBh = isBh;
|
||||
}
|
||||
|
||||
public String getRecType() {
|
||||
return recType;
|
||||
}
|
||||
|
||||
public void setRecType(String recType) {
|
||||
this.recType = recType;
|
||||
}
|
||||
|
||||
public String getReceiptDetailsId() {
|
||||
return receiptDetailsId;
|
||||
}
|
||||
|
||||
public void setReceiptDetailsId(String receiptDetailsId) {
|
||||
this.receiptDetailsId = receiptDetailsId;
|
||||
}
|
||||
|
||||
public String getRepaymentDate() {
|
||||
return repaymentDate;
|
||||
}
|
||||
|
||||
public void setRepaymentDate(String repaymentDate) {
|
||||
this.repaymentDate = repaymentDate;
|
||||
}
|
||||
|
||||
public String getRepaymentType() {
|
||||
return repaymentType;
|
||||
}
|
||||
|
||||
public void setRepaymentType(String repaymentType) {
|
||||
this.repaymentType = repaymentType;
|
||||
}
|
||||
|
||||
public String getRepaymentAmount() {
|
||||
return repaymentAmount;
|
||||
}
|
||||
|
||||
public void setRepaymentAmount(String repaymentAmount) {
|
||||
this.repaymentAmount = repaymentAmount;
|
||||
}
|
||||
|
||||
public String getFormmain_id() {
|
||||
return formmain_id;
|
||||
}
|
||||
|
||||
public void setFormmain_id(String formmain_id) {
|
||||
this.formmain_id = formmain_id;
|
||||
}
|
||||
|
||||
public String getC_bill_type() {
|
||||
return c_bill_type;
|
||||
}
|
||||
|
||||
public void setC_bill_type(String c_bill_type) {
|
||||
this.c_bill_type = c_bill_type;
|
||||
}
|
||||
|
||||
public String getFormCode() {
|
||||
return formCode;
|
||||
}
|
||||
|
||||
public void setFormCode(String formCode) {
|
||||
this.formCode = formCode;
|
||||
}
|
||||
|
||||
public String getOrgCode() {
|
||||
return orgCode;
|
||||
}
|
||||
|
||||
public void setOrgCode(String orgCode) {
|
||||
this.orgCode = orgCode;
|
||||
}
|
||||
|
||||
public String getDeptCode() {
|
||||
return deptCode;
|
||||
}
|
||||
|
||||
public void setDeptCode(String deptCode) {
|
||||
this.deptCode = deptCode;
|
||||
}
|
||||
|
||||
public String getFklxName() {
|
||||
return fklxName;
|
||||
}
|
||||
|
||||
public void setFklxName(String fklxName) {
|
||||
this.fklxName = fklxName;
|
||||
}
|
||||
|
||||
public String getZffsName() {
|
||||
return zffsName;
|
||||
}
|
||||
|
||||
public void setZffsName(String zffsName) {
|
||||
this.zffsName = zffsName;
|
||||
}
|
||||
|
||||
public String getFirstSubject() {
|
||||
return firstSubject;
|
||||
}
|
||||
|
||||
public void setFirstSubject(String firstSubject) {
|
||||
this.firstSubject = firstSubject;
|
||||
}
|
||||
|
||||
public String getBzjProjectName() {
|
||||
return bzjProjectName;
|
||||
}
|
||||
|
||||
public void setBzjProjectName(String bzjProjectName) {
|
||||
this.bzjProjectName = bzjProjectName;
|
||||
}
|
||||
|
||||
public String getExpirationDate() {
|
||||
return expirationDate;
|
||||
}
|
||||
|
||||
public void setExpirationDate(String expirationDate) {
|
||||
this.expirationDate = expirationDate;
|
||||
}
|
||||
|
||||
public String getDeptCode2() {
|
||||
return deptCode2;
|
||||
}
|
||||
|
||||
public void setDeptCode2(String deptCode2) {
|
||||
this.deptCode2 = deptCode2;
|
||||
}
|
||||
|
||||
public String getIsCustomer() {
|
||||
return isCustomer;
|
||||
}
|
||||
|
||||
public void setIsCustomer(String isCustomer) {
|
||||
this.isCustomer = isCustomer;
|
||||
}
|
||||
|
||||
public String getApplyAmount() {
|
||||
return applyAmount;
|
||||
}
|
||||
|
||||
public void setApplyAmount(String applyAmount) {
|
||||
this.applyAmount = applyAmount;
|
||||
}
|
||||
|
||||
public String getCheckedAmount() {
|
||||
return checkedAmount;
|
||||
}
|
||||
|
||||
public void setCheckedAmount(String checkedAmount) {
|
||||
this.checkedAmount = checkedAmount;
|
||||
}
|
||||
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getSupplierCode() {
|
||||
return supplierCode;
|
||||
}
|
||||
|
||||
public void setSupplierCode(String supplierCode) {
|
||||
this.supplierCode = supplierCode;
|
||||
}
|
||||
|
||||
public String getOpenBank() {
|
||||
return openBank;
|
||||
}
|
||||
|
||||
public void setOpenBank(String openBank) {
|
||||
this.openBank = openBank;
|
||||
}
|
||||
|
||||
public String getBankAccount() {
|
||||
return bankAccount;
|
||||
}
|
||||
|
||||
public void setBankAccount(String bankAccount) {
|
||||
this.bankAccount = bankAccount;
|
||||
}
|
||||
|
||||
public String getDkAmount() {
|
||||
return dkAmount;
|
||||
}
|
||||
|
||||
public void setDkAmount(String dkAmount) {
|
||||
this.dkAmount = dkAmount;
|
||||
}
|
||||
|
||||
public String getDkTime() {
|
||||
return dkTime;
|
||||
}
|
||||
|
||||
public void setDkTime(String dkTime) {
|
||||
this.dkTime = dkTime;
|
||||
}
|
||||
|
||||
public String getIsDydj() {
|
||||
return isDydj;
|
||||
}
|
||||
|
||||
public void setIsDydj(String isDydj) {
|
||||
this.isDydj = isDydj;
|
||||
}
|
||||
|
||||
private List<PayBillEntity>payBillDetailsEntityList;
|
||||
|
||||
public List<PayBillEntity> getPayBillDetailsEntityList() {
|
||||
return payBillDetailsEntityList;
|
||||
}
|
||||
|
||||
public void setPayBillDetailsEntityList(List<PayBillEntity> payBillDetailsEntityList) {
|
||||
this.payBillDetailsEntityList = payBillDetailsEntityList;
|
||||
}
|
||||
|
||||
private String billDate;//付款日期
|
||||
private String primalMoney;//付款金额信息
|
||||
private String pkOppaccount;//付款银行信息
|
||||
private String pkSupplier;//供应商信息
|
||||
|
||||
private String tableName;//表名称
|
||||
private String fieldName;//字段名称
|
||||
private String state;//推送状态
|
||||
private String pkOrg;//组织
|
||||
private String pkCustomer;//客户
|
||||
|
|
|
@ -11,54 +11,6 @@
|
|||
<result property="tableName" column="table_name" jdbcType="VARCHAR"/>
|
||||
<result property="fieldName" column="field_name" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="c_bill_type" column="c_bill_type" jdbcType="VARCHAR"/>
|
||||
<result property="formCode" column="formCode" jdbcType="VARCHAR"/>
|
||||
<result property="receiptDetailsId" column="receiptDetailsId" jdbcType="VARCHAR"/>
|
||||
<result property="repaymentDate" column="repaymentDate" jdbcType="VARCHAR"/>
|
||||
<result property="repaymentType" column="repaymentType" jdbcType="VARCHAR"/>
|
||||
<result property="repaymentAmount" column="repaymentAmount" jdbcType="VARCHAR"/>
|
||||
<result property="orgCode" column="orgCode" jdbcType="VARCHAR"/>
|
||||
<result property="deptCode" column="deptCode" jdbcType="VARCHAR"/>
|
||||
<result property="fklxName" column="fklxName" jdbcType="VARCHAR"/>
|
||||
<result property="zffsName" column="zffsName" jdbcType="VARCHAR"/>
|
||||
<result property="firstSubject" column="firstSubject" jdbcType="VARCHAR"/>
|
||||
<result property="bzjProjectName" column="bzjProjectName" jdbcType="VARCHAR"/>
|
||||
<result property="expirationDate" column="expirationDate" jdbcType="VARCHAR"/>
|
||||
<result property="deptCode2" column="deptCode2" jdbcType="VARCHAR"/>
|
||||
<result property="isCustomer" column="isCustomer" jdbcType="VARCHAR"/>
|
||||
<result property="applyAmount" column="applyAmount" jdbcType="VARCHAR"/>
|
||||
<result property="checkedAmount" column="checkedAmount" jdbcType="VARCHAR"/>
|
||||
<result property="comments" column="comments" jdbcType="VARCHAR"/>
|
||||
<result property="creator" column="creator" jdbcType="VARCHAR"/>
|
||||
<result property="supplierCode" column="supplierCode" jdbcType="VARCHAR"/>
|
||||
<result property="openBank" column="openBank" jdbcType="VARCHAR"/>
|
||||
<result property="bankAccount" column="bankAccount" jdbcType="VARCHAR"/>
|
||||
<result property="dkAmount" column="dkAmount" jdbcType="VARCHAR"/>
|
||||
<result property="dkTime" column="dkTime" jdbcType="VARCHAR"/>
|
||||
<result property="isDydj" column="isDydj" jdbcType="VARCHAR"/>
|
||||
<result property="fieldName" column="fieldName" jdbcType="VARCHAR"/>
|
||||
<result property="tableName" column="tableName" jdbcType="VARCHAR"/>
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="formmain_id" column="formmain_id" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="customerAddress" column="customerAddress" jdbcType="VARCHAR"/>
|
||||
<result property="linkMan" column="linkMan" jdbcType="VARCHAR"/>
|
||||
<result property="bhBeneficiary" column="bhBeneficiary" jdbcType="VARCHAR"/>
|
||||
<result property="beneficiaryPhone" column="beneficiaryPhone" jdbcType="VARCHAR"/>
|
||||
<result property="beneficiaryAddress" column="beneficiaryAddress" jdbcType="VARCHAR"/>
|
||||
<result property="projectNumber" column="projectNumber" jdbcType="VARCHAR"/>
|
||||
<result property="projectAmount" column="projectAmount" jdbcType="VARCHAR"/>
|
||||
<result property="bhIndate" column="bhIndate" jdbcType="VARCHAR"/>
|
||||
<result property="bhReceiver" column="bhReceiver" jdbcType="VARCHAR"/>
|
||||
<result property="contactType" column="contactType" jdbcType="VARCHAR"/>
|
||||
<result property="contactAddress" column="contactAddress" jdbcType="VARCHAR"/>
|
||||
<result property="bhProjectName" column="bhProjectName" jdbcType="VARCHAR"/>
|
||||
<result property="lastBhDate" column="lastBhDate" jdbcType="VARCHAR"/>
|
||||
<result property="notes" column="notes" jdbcType="VARCHAR"/>
|
||||
<result property="isBh" column="isBh" jdbcType="VARCHAR"/>
|
||||
<result property="contactNumber" column="contactNumber" jdbcType="VARCHAR"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<!--工程项目查询-->
|
||||
|
@ -99,67 +51,12 @@
|
|||
LEFT JOIN formson_0223 body ON main.id = body.formmain_id
|
||||
WHERE field0053 IS NOT NULL and field0058 is null
|
||||
</select>
|
||||
<!--工程项目查询-->
|
||||
<select id="PayBillEntity_list_base_margin" resultMap="get-PayBillEntity-result" parameterType="com.hzya.frame.seeyon.paybill.entity.PayBillEntity">
|
||||
|
||||
SELECT * FROM v_hzya_formmain_11031
|
||||
|
||||
</select>
|
||||
|
||||
<!--工程项目查询-->
|
||||
<select id="PayBillEntity_list_base_margin_details" resultMap="get-PayBillEntity-result" parameterType="com.hzya.frame.seeyon.paybill.entity.PayBillEntity">
|
||||
|
||||
SELECT
|
||||
formmain_id,
|
||||
field0118 AS projectCode,
|
||||
field0119 AS projectName,
|
||||
field0120 AS wdContact,
|
||||
field0121 AS buildCost ,
|
||||
addre.EXT_ATTR_2 AS deptCode
|
||||
FROM formson_11032
|
||||
LEFT JOIN ORG_UNIT unit ON field0122 = unit.id
|
||||
LEFT JOIN ADDRESSBOOK addre ON unit.id = addre.MEMBER_ID
|
||||
WHERE field0118 IS NOT NULL
|
||||
and formmain_id = #{id}
|
||||
|
||||
|
||||
</select>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="PayBillEntity_update" parameterType="com.hzya.frame.seeyon.paybill.entity.PayBillEntity">
|
||||
update ${tableName} set ${fieldName} = #{state} where id = #{id}
|
||||
</update>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="PayBillEntity_update_margin" parameterType="com.hzya.frame.seeyon.paybill.entity.PayBillEntity">
|
||||
<update id="PayBillEntity_update" parameterType = "java.util.Map" >
|
||||
update ${tableName} set ${fieldName} = #{state} where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--工程项目查询-->
|
||||
<select id="PayBillEntity_list_base_received" resultMap="get-PayBillEntity-result" parameterType="com.hzya.frame.seeyon.paybill.entity.PayBillEntity">
|
||||
|
||||
SELECT * FROM v_hzya_formmain_11031_update
|
||||
|
||||
</select>
|
||||
|
||||
<!--工程项目查询-->
|
||||
<select id="PayBillEntity_list_base_received_details" resultMap="get-PayBillEntity-result" parameterType="com.hzya.frame.seeyon.paybill.entity.PayBillEntity">
|
||||
|
||||
SELECT
|
||||
formmain_id,
|
||||
field0118 AS projectCode,
|
||||
field0119 AS projectName,
|
||||
field0120 AS wdContact,
|
||||
field0121 AS buildCost ,
|
||||
addre.EXT_ATTR_2 AS deptCode
|
||||
FROM formson_11032
|
||||
LEFT JOIN ORG_UNIT unit ON field0122 = unit.id
|
||||
LEFT JOIN ADDRESSBOOK addre ON unit.id = addre.MEMBER_ID
|
||||
WHERE field0118 IS NOT NULL
|
||||
and formmain_id = #{id}
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -25,27 +25,5 @@ public interface IPayBillService extends IBaseService<PaymentEntity,String> {
|
|||
*
|
||||
*/
|
||||
JsonResultEntity sendEngineerPayBillToBip(JSONObject requestJson);
|
||||
/**
|
||||
*
|
||||
* @content 推送保证金付款到BIP
|
||||
* @param requestJson
|
||||
* @return JsonResultEntity
|
||||
* @author laborer
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-01-07 9:39
|
||||
*
|
||||
*/
|
||||
|
||||
JsonResultEntity sendMarginPaymentToBip(JSONObject requestJson);
|
||||
/**
|
||||
*
|
||||
* @content 保证金付流程结束更新付款状态
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-01-08 10:18
|
||||
*
|
||||
*/
|
||||
|
||||
JsonResultEntity sendReceivedToBip(JSONObject requestJson);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.hzya.frame.seeyon.paybill.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
@ -45,228 +43,32 @@ public class PayBillServiceImpl extends BaseService<PaymentEntity,String> implem
|
|||
*/
|
||||
@Override
|
||||
public JsonResultEntity sendEngineerPayBillToBip(JSONObject requestJson) {
|
||||
// PayBillEntity entity = new PayBillEntity();
|
||||
// requestJson.put("db_code","OA");
|
||||
// entity.setDataSourceCode(requestJson.getString("db_code"));
|
||||
// List<PayBillEntity>payBillEntityList = payBillDao.getOaEngineerPay(entity);
|
||||
// if(CollectionUtils.isNotEmpty(payBillEntityList)){
|
||||
// for(PayBillEntity pay : payBillEntityList){
|
||||
// PayBillEntity details = new PayBillEntity();
|
||||
// List<PayBillEntity>payDetailsList = payBillDao.getOaEngineerPayDetails(details);
|
||||
//
|
||||
// String token = OABipUtil.getBipToken("yonyou","8000230000");
|
||||
// JSONObject main = bindingAdd(pay);
|
||||
// logger.info("工程付款单调用中台生成BIP付款结算单推送报文{}",main.toString());
|
||||
// String result = OABipUtil.sendOATOBipEsb(main.toString(),"8000230014",token);
|
||||
// logger.info("工程付款单调用中台生成BIP付款结算单返回结果{}",result);
|
||||
// JSONObject resultObj = JSON.parseObject(result);
|
||||
// boolean flag = resultObj.getBoolean("success");
|
||||
// if(flag){
|
||||
// pay.setState("Y");
|
||||
// }else{
|
||||
// pay.setState("N");
|
||||
// }
|
||||
// pay.setDataSourceCode(requestJson.getString("db_code"));
|
||||
// payBillDao.updateState(pay);
|
||||
// // todo 后续在写吧(没字段等OA开了外网在创建),修改推送状态,避免再次查询
|
||||
// }
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity sendMarginPaymentToBip(JSONObject requestJson) {
|
||||
PayBillEntity entity = new PayBillEntity();
|
||||
requestJson.put("db_code","SW-OA");
|
||||
requestJson.put("db_code","OA");
|
||||
entity.setDataSourceCode(requestJson.getString("db_code"));
|
||||
List<PayBillEntity>payBillEntityList = payBillDao.getMarginPayment(entity);
|
||||
List<PayBillEntity>payBillEntityList = payBillDao.getOaEngineerPay(entity);
|
||||
if(CollectionUtils.isNotEmpty(payBillEntityList)){
|
||||
for(PayBillEntity pay : payBillEntityList){
|
||||
String datasourceCode = requestJson.getString("db_code");
|
||||
System.out.println("更新时的数据源编码为"+datasourceCode);
|
||||
logger.info("更新时的数据源编码为"+datasourceCode);
|
||||
pay.setDataSourceCode(datasourceCode);
|
||||
try {
|
||||
// PayBillEntity details = new PayBillEntity();
|
||||
// details.setFormmain_id(pay.getId());
|
||||
// details.setDataSourceCode(requestJson.getString("db_code"));
|
||||
// List<PayBillEntity>payDetailsList = payBillDao.getOaEngineerPayDetails(details);
|
||||
String token = OABipUtil.getBipToken("yonyou","8000500003");
|
||||
// pay.setPayBillDetailsEntityList(payDetailsList);
|
||||
JSONObject main = bindingMarginAdd(pay);
|
||||
logger.info("保证金原始报文{}",JSON.toJSONString(pay));
|
||||
logger.info("保证金付款申请单推送BIP报文{}",main.toString());
|
||||
String result = OABipUtil.sendOATOBipEsb(main.toString(),"8000500007",token);
|
||||
logger.info("保证金付款申请单推送BIP报文返回结果{}",result);
|
||||
String token = OABipUtil.getBipToken("yonyou","8000230000");
|
||||
JSONObject main = bindingAdd(pay);
|
||||
logger.info("工程付款单调用中台生成BIP付款结算单推送报文{}",main.toString());
|
||||
String result = OABipUtil.sendU9cTOBipEsb(main.toString(),"8000230014",token);
|
||||
logger.info("工程付款单调用中台生成BIP付款结算单返回结果{}",result);
|
||||
JSONObject resultObj = JSON.parseObject(result);
|
||||
String resultFlag = resultObj.getString("Result");
|
||||
if("success".equals(resultFlag)){
|
||||
boolean flag = resultObj.getBoolean("success");
|
||||
if(flag){
|
||||
pay.setState("Y");
|
||||
}else{
|
||||
pay.setState("N");
|
||||
}
|
||||
|
||||
payBillDao.updateState(pay);
|
||||
} catch (Exception e) {
|
||||
pay.setState("N");
|
||||
payBillDao.updateState(pay);
|
||||
logger.error("保证金同步BIP保证金付款失败,请联系管理员:{}",e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity sendReceivedToBip(JSONObject requestJson) {
|
||||
PayBillEntity entity = new PayBillEntity();
|
||||
requestJson.put("db_code","SW-OA");
|
||||
entity.setDataSourceCode(requestJson.getString("db_code"));
|
||||
List<PayBillEntity>payBillEntityList = payBillDao.getReceived(entity);
|
||||
if(CollectionUtils.isNotEmpty(payBillEntityList)){
|
||||
for(PayBillEntity pay : payBillEntityList){
|
||||
pay.setDataSourceCode(requestJson.getString("db_code"));
|
||||
try {
|
||||
boolean flag = true;
|
||||
StringBuffer sb = new StringBuffer();
|
||||
// PayBillEntity details = new PayBillEntity();
|
||||
// details.setFormmain_id(pay.getId());
|
||||
// details.setDataSourceCode(requestJson.getString("db_code"));
|
||||
// List<PayBillEntity>payDetailsList = payBillDao.getReceivedDetails(details);
|
||||
String token = OABipUtil.getBipToken("yonyou","8000500003");
|
||||
// pay.setPayBillDetailsEntityList(payDetailsList);
|
||||
//组装更新保证金还款信息
|
||||
JSONObject main = bindingReceivedAdd(pay);
|
||||
logger.info("保证金付款申请单-还款推送BIP报文{}",main.toString());
|
||||
String result = OABipUtil.sendOATOBipEsb(main.toString(),"8000500015",token);
|
||||
logger.info("保证金付款申请单-还款推送BIP报文返回结果{}",result);
|
||||
JSONObject resultObj = JSON.parseObject(result);
|
||||
flag = resultObj.getBoolean("Result");
|
||||
if(!flag){
|
||||
sb.append("更新保证金还款信息失败:错误原因"+resultObj.getString("Message")+pay.getReceiptDetailsId() +" ");
|
||||
pay.setState("N");
|
||||
}else{
|
||||
pay.setState("Y");
|
||||
}
|
||||
|
||||
//不单独更新数据到表中了,记录日志用
|
||||
logger.info("保证金流程结束事件出错"+sb.toString());
|
||||
payBillDao.updateState(pay);
|
||||
} catch (Exception e) {
|
||||
pay.setState("N");
|
||||
payBillDao.updateState(pay);
|
||||
logger.info("保证金流程结束事件出错,请联系管理员:"+e);
|
||||
logger.info("保证金流程结束事件出错,请联系管理员1:"+e.getMessage());
|
||||
|
||||
}
|
||||
// todo 后续在写吧(没字段等OA开了外网在创建),修改推送状态,避免再次查询
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// private JSONObject bindingReceivedRLAdd(PayBillEntity pay) {
|
||||
// JSONObject head = new JSONObject();
|
||||
// head.put("c_bill_type","F9");//单据类型 保证金付款申请单固定F9
|
||||
// head.put("formCode",pay.getFormCode());//单据号
|
||||
// head.put("receiptDetailsId","");//BIP到款明细主键
|
||||
// head.put("repaymentDate","");//还款日期
|
||||
// head.put("repaymentType","");//还款类型
|
||||
// head.put("repaymentAmount","");//还款金额
|
||||
// return head;
|
||||
// }
|
||||
|
||||
private JSONObject bindingReceivedAdd(PayBillEntity pay) {
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("c_bill_type",pay.getC_bill_type());//单据类型 保证金付款申请单固定F9
|
||||
head.put("formCode",pay.getFormCode());//单据号
|
||||
head.put("receiptDetailsId",pay.getReceiptDetailsId());//BIP到款明细主键
|
||||
String repaymentDate = pay.getRepaymentDate();
|
||||
if(StrUtil.isNotEmpty(repaymentDate)){
|
||||
head.put("repaymentDate",DateUtil.format(DateUtil.parse(repaymentDate), "yyyy-MM-dd HH:mm:ss"));//还款日期
|
||||
}
|
||||
head.put("repaymentType",pay.getRepaymentType());//还款类型
|
||||
head.put("repaymentAmount",pay.getRepaymentAmount());//还款金额
|
||||
return head;
|
||||
}
|
||||
|
||||
private JSONObject bindingMarginAdd(PayBillEntity pay) {
|
||||
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("c_bill_type","F9");//单据类型 保证金付款申请单固定F9
|
||||
head.put("formCode",pay.getFormCode());//单据号(NC有重复校验)
|
||||
head.put("orgCode",pay.getOrgCode());//公司编码
|
||||
head.put("deptCode",pay.getDeptCode());//事业部大类编码
|
||||
head.put("fklxName",pay.getFklxName());//付款类型
|
||||
head.put("zffsName",pay.getZffsName());//支付方式
|
||||
head.put("firstSubject",pay.getFirstSubject());//一级科目
|
||||
head.put("bzjProjectName",pay.getBzjProjectName());//保证金项目名称
|
||||
String expirationDate= pay.getExpirationDate();
|
||||
if(StrUtil.isNotEmpty(expirationDate)){
|
||||
head.put("expirationDate",DateUtil.format(DateUtil.parse(expirationDate), "yyyy-MM-dd"));//投标保证金到期日
|
||||
}
|
||||
|
||||
head.put("deptCode2",pay.getDeptCode2());//归属部门编码
|
||||
head.put("isCustomer","Y");//是否运营商客户
|
||||
head.put("applyAmount",pay.getApplyAmount());//申请金额
|
||||
head.put("checkedAmount",pay.getCheckedAmount());//财务核实金额
|
||||
head.put("comments",pay.getComments());//说明
|
||||
head.put("creator",pay.getCreator());//制单人
|
||||
head.put("supplierCode",pay.getSupplierCode());//供应商编码
|
||||
head.put("openBank",pay.getOpenBank());//开户银行
|
||||
head.put("bankAccount",pay.getBankAccount());//银行账号
|
||||
head.put("customerAddress",pay.getCustomerAddress());//客户地址
|
||||
head.put("linkMan",pay.getLinkMan());//联系人
|
||||
head.put("contactNumber",pay.getContactNumber());//联系电话
|
||||
|
||||
head.put("bhBeneficiary",pay.getBhBeneficiary());//保函受益人
|
||||
head.put("beneficiaryPhone",pay.getBeneficiaryPhone());//受益人电话
|
||||
head.put("beneficiaryAddress",pay.getBeneficiaryAddress());//受益人地址
|
||||
head.put("projectNumber",pay.getProjectNumber());//工程项目合同/标书号码
|
||||
head.put("projectAmount",pay.getProjectAmount());//工程项目合同/标书总金额
|
||||
String bhIndate = pay.getBhIndate();
|
||||
if(StrUtil.isNotEmpty(bhIndate)){
|
||||
head.put("bhIndate",DateUtil.format(DateUtil.parse(bhIndate), "yyyy-MM-dd"));//保函有效期
|
||||
}
|
||||
head.put("bhReceiver",pay.getBhReceiver());//保函收件人
|
||||
head.put("contactType",pay.getContactType());//联系方式
|
||||
head.put("contactAddress",pay.getContactAddress());//联系地址
|
||||
head.put("bhProjectName",pay.getBhProjectName());//保函项目名称
|
||||
|
||||
String lastBhDate = pay.getLastBhDate();
|
||||
if(StrUtil.isNotEmpty(lastBhDate)){
|
||||
head.put("lastBhDate",DateUtil.format(DateUtil.parse(lastBhDate), "yyyy-MM-dd"));//最晚取得保函日期
|
||||
}
|
||||
head.put("notes",pay.getNotes());//备注
|
||||
head.put("isBh",pay.getIsBh());//是否取得保函原件
|
||||
|
||||
head.put("dkAmount",pay.getDkAmount());//打款金额
|
||||
String dkTime = pay.getDkTime();
|
||||
if(StrUtil.isNotEmpty(dkTime)){
|
||||
head.put("dkTime", DateUtil.format(DateUtil.parse(dkTime), "yyyy-MM-dd HH:mm:ss"));//打款时间
|
||||
}
|
||||
|
||||
head.put("isDydj","Y");//是否打印本单据
|
||||
|
||||
//处理明细数据,按照明细付款 多个明细生成多个付款结算单
|
||||
JSONArray detailsArr = new JSONArray();
|
||||
// List<PayBillEntity>detailsList = pay.getPayBillDetailsEntityList();
|
||||
// if(CollectionUtils.isNotEmpty(detailsList)){
|
||||
// detailsList.forEach(detail->{
|
||||
// JSONObject body = new JSONObject();
|
||||
// body.put("projectCode","");//项目编码
|
||||
// body.put("projectName","");//项目名称
|
||||
// body.put("wdContact","");//未定合同号
|
||||
// body.put("buildCost","");//工程造价
|
||||
// body.put("deptCode","");//承担部门编码
|
||||
// detailsArr.add(body);
|
||||
// });
|
||||
// }
|
||||
head.put("xmDetail",detailsArr);//明细数据
|
||||
head.put("hkDetail",detailsArr);//明细数据
|
||||
return head;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private JSONObject bindingAdd(PayBillEntity pay) {
|
||||
JSONObject head = new JSONObject();
|
||||
|
|
|
@ -42,29 +42,29 @@ public class RecBillServiceImpl extends BaseService<PaymentEntity,String> implem
|
|||
*/
|
||||
@Override
|
||||
public JsonResultEntity sendRecBillToBip(JSONObject requestJson) {
|
||||
// RecBillEntity entity = new RecBillEntity();
|
||||
// requestJson.put("db_code","OA");
|
||||
// entity.setDataSourceCode(requestJson.getString("db_code"));
|
||||
// List<RecBillEntity>payBillEntityList = payBillDao.getOaRecBill(entity);
|
||||
// if(CollectionUtils.isNotEmpty(payBillEntityList)){
|
||||
// for(RecBillEntity pay : payBillEntityList){
|
||||
// String token = OABipUtil.getBipToken("yonyou","8000230000");
|
||||
// JSONObject main = bindingAdd(pay);
|
||||
// logger.info("银行流水收款信息数据{}",main.toString());
|
||||
// String result = OABipUtil.sendU9cTOBipEsb(main.toString(),"8000230016",token);
|
||||
// logger.info("银行流水收款信息数据{}",result);
|
||||
// JSONObject resultObj = JSON.parseObject(result);
|
||||
// boolean flag = resultObj.getBoolean("success");
|
||||
// if(flag){
|
||||
// pay.setState("Y");
|
||||
// }else{
|
||||
// pay.setState("N");
|
||||
// }
|
||||
// pay.setDataSourceCode(requestJson.getString("db_code"));
|
||||
// payBillDao.updateState(pay);
|
||||
// // todo 后续在写吧(没字段等OA开了外网在创建),修改推送状态,避免再次查询
|
||||
// }
|
||||
// }
|
||||
RecBillEntity entity = new RecBillEntity();
|
||||
requestJson.put("db_code","OA");
|
||||
entity.setDataSourceCode(requestJson.getString("db_code"));
|
||||
List<RecBillEntity>payBillEntityList = payBillDao.getOaRecBill(entity);
|
||||
if(CollectionUtils.isNotEmpty(payBillEntityList)){
|
||||
for(RecBillEntity pay : payBillEntityList){
|
||||
String token = OABipUtil.getBipToken("yonyou","8000230000");
|
||||
JSONObject main = bindingAdd(pay);
|
||||
logger.info("银行流水收款信息数据{}",main.toString());
|
||||
String result = OABipUtil.sendU9cTOBipEsb(main.toString(),"8000230016",token);
|
||||
logger.info("银行流水收款信息数据{}",result);
|
||||
JSONObject resultObj = JSON.parseObject(result);
|
||||
boolean flag = resultObj.getBoolean("success");
|
||||
if(flag){
|
||||
pay.setState("Y");
|
||||
}else{
|
||||
pay.setState("N");
|
||||
}
|
||||
pay.setDataSourceCode(requestJson.getString("db_code"));
|
||||
payBillDao.updateState(pay);
|
||||
// todo 后续在写吧(没字段等OA开了外网在创建),修改推送状态,避免再次查询
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.hzya.frame.web.entity.JsonResultEntity;
|
|||
|
||||
/**
|
||||
* 致远OA接口类
|
||||
*
|
||||
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||
* @version 1.0
|
||||
* @content
|
||||
|
@ -24,7 +25,6 @@ public interface ISeeYonInterFace {
|
|||
JsonResultEntity thirdInterfaceSend(JSONObject requestData);
|
||||
|
||||
|
||||
|
||||
/***
|
||||
* @Content: 提供给OA的标准接口方法,包含参数 entity 为OA 的data信息, , eventType 为事件类型
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
|
@ -59,26 +59,36 @@ public interface ISeeYonInterFace {
|
|||
|
||||
/**
|
||||
* seeyon流程事件监听前置方法,绑定数据源
|
||||
*
|
||||
* @param sysExtensionApi
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
SysExtensionApiEntity colEventPre(SysExtensionApiEntity sysExtensionApi)throws Exception;
|
||||
SysExtensionApiEntity colEventPre(SysExtensionApiEntity sysExtensionApi) throws Exception;
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听
|
||||
*
|
||||
* @param jsonObject
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
JsonResultEntity colEventListener(JSONObject jsonObject)throws Exception;
|
||||
JsonResultEntity colEventListener(JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听后置方法,调用三方接口
|
||||
*
|
||||
* @param jsonStr
|
||||
* @param formAppId
|
||||
* @param eventType
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
String colEventPost(String jsonStr,String formAppId,String eventType)throws Exception;
|
||||
JsonResultEntity colEventPost(String jsonStr, String formAppId, String eventType) throws Exception;
|
||||
|
||||
|
||||
JsonResultEntity chengeBody(JSONObject jsonObject) throws Exception;
|
||||
|
||||
SysExtensionApiEntity chengeBodySetPlug(SysExtensionApiEntity entity);
|
||||
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@ package com.hzya.frame.seeyon.service.impl;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.map.MapBuilder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
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.seeyon.dao.ISeeYonInterFaceDao;
|
||||
import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity;
|
||||
import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity;
|
||||
|
@ -19,6 +19,7 @@ import com.hzya.frame.sysnew.application.database.dao.ISysApplicationDatabaseDao
|
|||
import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity;
|
||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
|
@ -28,6 +29,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -50,14 +52,30 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
private static final String sendUrl = "http://60.204.152.210/seeyon/";
|
||||
//速网esb地址
|
||||
private static final String baseUrl = "http://hzya.ufyct.com:9067/kangarooDataCenter/entranceController/externalCallInterface";
|
||||
@Resource
|
||||
private ISysApplicationDatabaseDao sysApplicationDatabaseDao;
|
||||
@Autowired
|
||||
private ISysApplicationApiService sysApplicationApiService;
|
||||
/**
|
||||
* 定义所支持的事件静态代码块
|
||||
*/
|
||||
private static final StringBuffer eventTypeBuffer = new StringBuffer();
|
||||
//基础档案类型
|
||||
private final String ARCHIVESTYPE = "archives";
|
||||
//流程表单类型
|
||||
private final String FLOWTYPE = "flow";
|
||||
//创建基础档案
|
||||
private final String CREATEARCHIVES = "create";
|
||||
//更新基础档案
|
||||
private final String UPDATEARCHIVES = "update";
|
||||
//创建基础档案
|
||||
private final String CREATEARCHIVESURL = "rest/form/import/";
|
||||
//创建基础档案
|
||||
private final String UPDATEARCHIVESURL = "rest/form/update";
|
||||
@Resource
|
||||
private ISysApplicationDatabaseDao sysApplicationDatabaseDao;
|
||||
@Autowired
|
||||
private ISysApplicationApiService sysApplicationApiService;
|
||||
@Resource
|
||||
private ISeeYonInterFaceDao seeYonInterFaceDao;
|
||||
//上一次同步时间
|
||||
private final String LAST_SYNCHRONISED_TIME = "";
|
||||
|
||||
{
|
||||
eventTypeBuffer.append("发起前事件 onBeforeStart ,");
|
||||
|
@ -75,24 +93,6 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
eventTypeBuffer.append("取回事件 onTakeBack,");
|
||||
}
|
||||
|
||||
//基础档案类型
|
||||
private final String ARCHIVESTYPE = "archives";
|
||||
//流程表单类型
|
||||
private final String FLOWTYPE = "flow";
|
||||
//创建基础档案
|
||||
private final String CREATEARCHIVES = "create";
|
||||
//更新基础档案
|
||||
private final String UPDATEARCHIVES = "update";
|
||||
//创建基础档案
|
||||
private final String CREATEARCHIVESURL = "rest/form/import/";
|
||||
//创建基础档案
|
||||
private final String UPDATEARCHIVESURL = "rest/form/update";
|
||||
@Resource
|
||||
private ISeeYonInterFaceDao seeYonInterFaceDao;
|
||||
|
||||
|
||||
//上一次同步时间
|
||||
private String LAST_SYNCHRONISED_TIME = "";
|
||||
/****
|
||||
* @Content:发起无流程表单接口实现
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
|
@ -100,7 +100,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
* @Param [templateCode 模版编码, sendLoginName 发送人登录帐号 ,xmlData ]
|
||||
* @return java.lang.Integer
|
||||
**/
|
||||
public static JsonResultEntity saveNoProcess(String templateCode , String interfaceUrl,String sendLoginName, String xmlData) {
|
||||
public static JsonResultEntity saveNoProcess(String templateCode, String interfaceUrl, String sendLoginName, String xmlData) {
|
||||
String token = getToken(RESTUSERNAME, RESTPASSWORD, sendLoginName);
|
||||
Map res = new HashMap();
|
||||
res.put("loginName", sendLoginName);
|
||||
|
@ -119,7 +119,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
res.put("token", token);
|
||||
res.put("moduleId", moduleId);
|
||||
res.put("templateCode", templateCode);
|
||||
logger.info("更新无流程表单参数:{}",JSON.toJSONString(res));
|
||||
logger.info("更新无流程表单参数:{}", JSON.toJSONString(res));
|
||||
String result = HttpRequest.put(sendUrl + interfaceUrl).header("token", token).body(JSON.toJSONString(res)).execute().body();
|
||||
logger.info("更新无流程表单执行结果:" + result);
|
||||
return BaseResult.getFailureMessageEntity("执行成功", result);
|
||||
|
@ -185,7 +185,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
List<JSONObject> attributeArray = JSON.parseArray(attributeArrayStr, JSONObject.class);
|
||||
JsonResultEntity result = null;
|
||||
if (ARCHIVESTYPE.equalsIgnoreCase(type)) {
|
||||
switch (templateCode){
|
||||
switch (templateCode) {
|
||||
//预留的
|
||||
case "abc123":
|
||||
break;
|
||||
|
@ -198,13 +198,13 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
|
||||
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSeeYonPlugInInterfaceEntrance(JSONObject requestData){
|
||||
public JsonResultEntity thirdInterfaceSeeYonPlugInInterfaceEntrance(JSONObject requestData) {
|
||||
String jsonStr = requestData.getString("jsonStr");
|
||||
JSONObject jsonObject = requestData.getJSONObject("jsonStr");
|
||||
OAWorkflowEventDataEntity entity = JSON.parseObject(jsonStr,OAWorkflowEventDataEntity.class);
|
||||
logger.info("监听OA事件入参:"+jsonObject.toJSONString());
|
||||
OAWorkflowEventDataEntity entity = JSON.parseObject(jsonStr, OAWorkflowEventDataEntity.class);
|
||||
logger.info("监听OA事件入参:" + jsonObject.toJSONString());
|
||||
JSONObject formBeanData = jsonObject.getJSONObject("businessDataStr");
|
||||
String eventType = jsonObject.getString("eventType") ;
|
||||
String eventType = jsonObject.getString("eventType");
|
||||
/** 流程ID*/
|
||||
String summaryId = entity.getSummaryId();
|
||||
/** 节点ID*/
|
||||
|
@ -223,73 +223,74 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
//formApp 最好过滤一下
|
||||
|
||||
|
||||
String result = null;
|
||||
JsonResultEntity result = null;
|
||||
try {
|
||||
//流程事件处理
|
||||
result = colEventPost(jsonStr, formApp, eventType);
|
||||
}catch (Exception e){
|
||||
return BaseResult.getFailureMessageEntity("传递失败",e.getMessage());
|
||||
}
|
||||
try {
|
||||
/** 根据事件类型处理相关事件*/
|
||||
switch (eventType) {
|
||||
/** 发起前事件*/
|
||||
case "onBeforeStart":
|
||||
break;
|
||||
/** 发起事件*/
|
||||
case "onStart":
|
||||
//流程发起 新增grpu8单据
|
||||
break;
|
||||
/** 终止前事件*/
|
||||
case "onBeforeStop":
|
||||
break;
|
||||
/** 终止事件*/
|
||||
case "onStop":
|
||||
//流程终止,更新grpu8单据
|
||||
break;
|
||||
/** 撤销前事件*/
|
||||
case "onBeforeCancel":
|
||||
break;
|
||||
/** 撤销事件*/
|
||||
case "onCancel":
|
||||
//流程撤销,更新grpu8单据
|
||||
break;
|
||||
/** 结束事件*/
|
||||
case "onProcessFinished":
|
||||
break;
|
||||
/** 处理前事件*/
|
||||
case "onBeforeFinishWorkitem":
|
||||
/** 根据form处理相关业务表单的数据*/
|
||||
switch (formApp) {
|
||||
case "abc123":
|
||||
break;
|
||||
default:
|
||||
return BaseResult.getFailureMessageEntity("未匹配到表单!当前formID:" + formApp, "");
|
||||
}
|
||||
break;
|
||||
/** 处理事件*/
|
||||
case "onFinishWorkitem":
|
||||
break;
|
||||
/** 回退前事件*/
|
||||
case "onBeforeStepBack":
|
||||
break;
|
||||
/** 回退事件*/
|
||||
case "onStepBack":
|
||||
break;
|
||||
/** 取回前事件*/
|
||||
case "onBeforeTakeBack":
|
||||
break;
|
||||
/** 取回事件*/
|
||||
case "onTakeBack":
|
||||
break;
|
||||
default:
|
||||
// throw new RuntimeException("传入了非法事件类型!请参照:" + eventTypeBuffer.toString());
|
||||
return BaseResult.getFailureMessageEntity("传入了非法事件类型!请参照:" + eventTypeBuffer.toString(), "", "");
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("传递成功", result);
|
||||
}catch (Exception e){
|
||||
return BaseResult.getFailureMessageEntity("传递失败",e.getMessage());
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("传递失败", e.getMessage());
|
||||
}
|
||||
return result;
|
||||
// try {
|
||||
// /** 根据事件类型处理相关事件*/
|
||||
// switch (eventType) {
|
||||
// /** 发起前事件*/
|
||||
// case "onBeforeStart":
|
||||
// break;
|
||||
// /** 发起事件*/
|
||||
// case "onStart":
|
||||
// //流程发起 新增grpu8单据
|
||||
// break;
|
||||
// /** 终止前事件*/
|
||||
// case "onBeforeStop":
|
||||
// break;
|
||||
// /** 终止事件*/
|
||||
// case "onStop":
|
||||
// //流程终止,更新grpu8单据
|
||||
// break;
|
||||
// /** 撤销前事件*/
|
||||
// case "onBeforeCancel":
|
||||
// break;
|
||||
// /** 撤销事件*/
|
||||
// case "onCancel":
|
||||
// //流程撤销,更新grpu8单据
|
||||
// break;
|
||||
// /** 结束事件*/
|
||||
// case "onProcessFinished":
|
||||
// break;
|
||||
// /** 处理前事件*/
|
||||
// case "onBeforeFinishWorkitem":
|
||||
// /** 根据form处理相关业务表单的数据*/
|
||||
// switch (formApp) {
|
||||
// case "abc123":
|
||||
// break;
|
||||
// default:
|
||||
// return BaseResult.getFailureMessageEntity("未匹配到表单!当前formID:" + formApp, "");
|
||||
// }
|
||||
// break;
|
||||
// /** 处理事件*/
|
||||
// case "onFinishWorkitem":
|
||||
// break;
|
||||
// /** 回退前事件*/
|
||||
// case "onBeforeStepBack":
|
||||
// break;
|
||||
// /** 回退事件*/
|
||||
// case "onStepBack":
|
||||
// break;
|
||||
// /** 取回前事件*/
|
||||
// case "onBeforeTakeBack":
|
||||
// break;
|
||||
// /** 取回事件*/
|
||||
// case "onTakeBack":
|
||||
// break;
|
||||
// default:
|
||||
//// throw new RuntimeException("传入了非法事件类型!请参照:" + eventTypeBuffer.toString());
|
||||
// return BaseResult.getFailureMessageEntity("传入了非法事件类型!请参照:" + eventTypeBuffer.toString(), "", "");
|
||||
// }
|
||||
// return BaseResult.getSuccessMessageEntity("传递成功", result);
|
||||
// }catch (Exception e){
|
||||
// return BaseResult.getFailureMessageEntity("传递失败",e.getMessage());
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -297,7 +298,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
public JsonResultEntity thirdInterfaceSeeYonDefinitionRePush(JSONObject jsonObject) throws Exception {
|
||||
JSONObject requestData = jsonObject.getJSONObject("jsonStr");
|
||||
JSONArray resultEntityArray = new JSONArray();
|
||||
if(null == requestData){
|
||||
if (null == requestData) {
|
||||
throw new BaseSystemException("参数传递错误需要jsonStr!");
|
||||
}
|
||||
//表单模版ID
|
||||
|
@ -308,24 +309,24 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
String dataSourceCode = requestData.getString("dataSourceCode");
|
||||
//主表ID集合 formMainIds
|
||||
JSONArray formMainIds = requestData.getJSONArray("formMainIds");
|
||||
if(StrUtil.isEmpty(eventType)){
|
||||
if (StrUtil.isEmpty(eventType)) {
|
||||
throw new BaseSystemException("需要传递eventType 参照致远OA事件!");
|
||||
}
|
||||
if(StrUtil.isEmpty(formAppId)){
|
||||
if (StrUtil.isEmpty(formAppId)) {
|
||||
throw new BaseSystemException("需要传递formAppId 参照致远OA 表 CAP_FORM_DEFINITION!");
|
||||
}
|
||||
if(StrUtil.isEmpty(dataSourceCode)){
|
||||
if (StrUtil.isEmpty(dataSourceCode)) {
|
||||
throw new BaseSystemException("需要传递dataSourceCode 参照中台表 sys_data_source!");
|
||||
}
|
||||
if(null == formMainIds || formMainIds.size() == 0){
|
||||
if (null == formMainIds || formMainIds.size() == 0) {
|
||||
throw new BaseSystemException("需要传递业务主表数据id集合,不允许全量推送!");
|
||||
}
|
||||
|
||||
SeeYonInterFaceEntity seeYonInterFaceEntity = new SeeYonInterFaceEntity();
|
||||
BeanUtil.copyProperties(requestData,seeYonInterFaceEntity);
|
||||
BeanUtil.copyProperties(requestData, seeYonInterFaceEntity);
|
||||
List<SeeYonInterFaceEntity> seeYonInterFaceEntityList = seeYonInterFaceDao.queryDefinitionInfo(seeYonInterFaceEntity);
|
||||
if(null != seeYonInterFaceEntityList && seeYonInterFaceEntityList.size() >0){
|
||||
for(SeeYonInterFaceEntity interFaceEntity : seeYonInterFaceEntityList){
|
||||
if (null != seeYonInterFaceEntityList && seeYonInterFaceEntityList.size() > 0) {
|
||||
for (SeeYonInterFaceEntity interFaceEntity : seeYonInterFaceEntityList) {
|
||||
String field_info = interFaceEntity.getField_info();
|
||||
JSONObject infoJson = JSON.parseObject(field_info);
|
||||
//获取主表信息
|
||||
|
@ -338,7 +339,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
/** 设置主表查询条件*/
|
||||
interFaceEntity.setTabName(formMainTableName);
|
||||
interFaceEntity.setDataSourceCode(dataSourceCode);
|
||||
interFaceEntity.setFormMainIds( formMainIds.toJavaList(String.class) );
|
||||
interFaceEntity.setFormMainIds(formMainIds.toJavaList(String.class));
|
||||
|
||||
List<Map<String, Object>> forMainList = seeYonInterFaceDao.queryDefinitionData(interFaceEntity);
|
||||
for (Map<String, Object> forMainRow : forMainList) {
|
||||
|
@ -350,11 +351,11 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
String forMainId = String.valueOf(forMainRow.get("ID"));
|
||||
//组装主表数据
|
||||
for (Map.Entry<String, Object> entry : forMainRow.entrySet()) {
|
||||
formMainObj.put(entry.getKey().toLowerCase(),entry.getValue());
|
||||
formMainObj.put(entry.getKey().toLowerCase(), entry.getValue());
|
||||
}
|
||||
//组装明细表数据
|
||||
if(null != formSons && formSons.size() > 0){
|
||||
for(Object formSon : formSons){
|
||||
if (null != formSons && formSons.size() > 0) {
|
||||
for (Object formSon : formSons) {
|
||||
JSONObject son = JSON.parseObject(JSON.toJSONString(formSon));
|
||||
//明细数据
|
||||
String sonTableName = son.getString("tableName");
|
||||
|
@ -368,38 +369,38 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
//组装明细数据
|
||||
JSONObject forSonJson = new JSONObject();
|
||||
for (Map.Entry<String, Object> entry : forSons.entrySet()) {
|
||||
forSonJson.put(entry.getKey().toLowerCase(),entry.getValue());
|
||||
forSonJson.put(entry.getKey().toLowerCase(), entry.getValue());
|
||||
}
|
||||
jsonArray.add(forSonJson);
|
||||
}
|
||||
//设置明细表数据
|
||||
seeYonBean.put(sonTableName,jsonArray);
|
||||
seeYonBean.put(sonTableName, jsonArray);
|
||||
}
|
||||
}
|
||||
|
||||
seeYonBean.put(formMainTableName,formMainObj);
|
||||
seeYonBean.put(formMainTableName, formMainObj);
|
||||
JSONObject rePushRequestData = new JSONObject();
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("formApp",formAppId);
|
||||
object.put("eventType",eventType);
|
||||
object.put("businessDataStr",seeYonBean.toJSONString());
|
||||
object.put("affairId","");
|
||||
object.put("summaryId",requestData.getString("summaryId"));
|
||||
object.put("currentActivityId","");
|
||||
object.put("id",forMainId);
|
||||
object.put("hzyaExtData",requestData.getJSONObject("hzyaExtData"));
|
||||
logger.info("Method:thirdInterfaceSeeYonDefinitionRePush 组装seeYonBean DATA: {}",seeYonBean.toJSONString());
|
||||
object.put("formApp", formAppId);
|
||||
object.put("eventType", eventType);
|
||||
object.put("businessDataStr", seeYonBean.toJSONString());
|
||||
object.put("affairId", "");
|
||||
object.put("summaryId", requestData.getString("summaryId"));
|
||||
object.put("currentActivityId", "");
|
||||
object.put("id", forMainId);
|
||||
object.put("hzyaExtData", requestData.getJSONObject("hzyaExtData"));
|
||||
logger.info("Method:thirdInterfaceSeeYonDefinitionRePush 组装seeYonBean DATA: {}", seeYonBean.toJSONString());
|
||||
|
||||
rePushRequestData.put("jsonStr",object);
|
||||
rePushRequestData.put("jsonStr", object);
|
||||
|
||||
|
||||
JsonResultEntity resultEntity = thirdInterfaceSeeYonPlugInInterfaceEntrance(rePushRequestData);
|
||||
if(null != resultEntity){
|
||||
if (null != resultEntity) {
|
||||
resultEntityArray.add(resultEntity.getAttribute());
|
||||
}else{
|
||||
} else {
|
||||
JSONObject jsonResultEntity = new JSONObject();
|
||||
jsonResultEntity.put("msg","从新推送失败");
|
||||
jsonResultEntity.put("id",forMainId);
|
||||
jsonResultEntity.put("msg", "从新推送失败");
|
||||
jsonResultEntity.put("id", forMainId);
|
||||
resultEntityArray.add(jsonResultEntity);
|
||||
|
||||
}
|
||||
|
@ -407,11 +408,12 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
}
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("从新推送执行结束",resultEntityArray);
|
||||
return BaseResult.getSuccessMessageEntity("从新推送执行结束", resultEntityArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听前置方法,绑定数据源
|
||||
*
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
|
@ -426,10 +428,10 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
|
||||
sysApplicationDatabaseEntity.setDataSourceCode("master");
|
||||
List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
|
||||
if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
|
||||
if (sysDataSourceEntities != null && sysDataSourceEntities.size() > 0) {
|
||||
String parm = entity.getBodys();
|
||||
JSONObject jsonObject = JSONObject.parseObject(parm);
|
||||
jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
|
||||
jsonObject.put("dataSourceCode", sysDataSourceEntities.get(0).getSourceCode());
|
||||
entity.setBodys(jsonObject.toJSONString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -448,24 +450,24 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
@Override
|
||||
public JsonResultEntity colEventListener(JSONObject jsonObject) throws Exception {
|
||||
try {
|
||||
if (null != jsonObject && StrUtil.isNotEmpty(jsonObject.getString("jsonStr"))){
|
||||
if (null != jsonObject && StrUtil.isNotEmpty(jsonObject.getString("jsonStr"))) {
|
||||
SeeYonInterFaceEntity entity = jsonObject.getJSONObject("jsonStr").toJavaObject(SeeYonInterFaceEntity.class);
|
||||
JSONObject requestData = new JSONObject();
|
||||
//表单模版ID
|
||||
requestData.put("formAppId", entity.getFormAppId());
|
||||
//事件事件类型
|
||||
requestData.put("eventType",entity.getEventType());
|
||||
requestData.put("eventType", entity.getEventType());
|
||||
//数据源编码
|
||||
requestData.put("dataSourceCode",entity.getDataSourceCode());
|
||||
requestData.put("formMainIds",entity.getFormMainIds());
|
||||
requestData.put("summaryId",entity.getSummaryId());
|
||||
requestData.put("dataSourceCode", entity.getDataSourceCode());
|
||||
requestData.put("formMainIds", entity.getFormMainIds());
|
||||
requestData.put("summaryId", entity.getSummaryId());
|
||||
JSONObject jsonStr = new JSONObject();
|
||||
jsonStr.put("jsonStr",requestData);
|
||||
jsonStr.put("jsonStr", requestData);
|
||||
thirdInterfaceSeeYonDefinitionRePush(jsonStr);
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("流程事件通知接口出错:{}",e);
|
||||
return BaseResult.getSuccessMessageEntity("失败",e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("流程事件通知接口出错:{}", e);
|
||||
return BaseResult.getSuccessMessageEntity("失败", e.getMessage());
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("成功");
|
||||
}
|
||||
|
@ -480,28 +482,101 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public String colEventPost(String jsonStr, String formAppId, String eventType) throws Exception {
|
||||
if (StrUtil.isNotEmpty(jsonStr) && StrUtil.isNotEmpty(formAppId) && StrUtil.isNotEmpty(eventType)){
|
||||
public JsonResultEntity colEventPost(String jsonStr, String formAppId, String eventType) throws Exception {
|
||||
if (StrUtil.isNotEmpty(jsonStr) && StrUtil.isNotEmpty(formAppId) && StrUtil.isNotEmpty(eventType)) {
|
||||
SysApplicationApiEntity sysApplicationApiEntity = new SysApplicationApiEntity();
|
||||
sysApplicationApiEntity.setHeaderIn(formAppId+"_"+eventType);
|
||||
sysApplicationApiEntity.setHeaderIn(formAppId + "_" + eventType);
|
||||
List<SysApplicationApiEntity> applist = sysApplicationApiService.queryLike(sysApplicationApiEntity);
|
||||
if (CollectionUtil.isNotEmpty(applist)){
|
||||
if (applist.size() > 1){
|
||||
throw new BaseSystemException("根据formID:" + formAppId+"查询出多条数据");
|
||||
if (CollectionUtil.isNotEmpty(applist)) {
|
||||
if (applist.size() > 1) {
|
||||
throw new BaseSystemException("根据formID:" + formAppId + "查询出多条数据");
|
||||
}
|
||||
if (applist.size() == 0 ) {
|
||||
throw new BaseSystemException("根据formID:" + formAppId + "eventType:"+eventType+"未查询到API配置");
|
||||
}
|
||||
SysApplicationApiEntity sysApp = applist.get(0);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", String.valueOf(sysApp.getApiCode()))
|
||||
//这里用中台做为发送方
|
||||
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId",String.valueOf(sysApp.getAppCode()))
|
||||
.build();
|
||||
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(jsonStr).timeout(60000).execute().body();
|
||||
logger.info("调用中台返回的参数:{}",body);
|
||||
return body;
|
||||
JSONArray headerArray = JSONArray.parseArray(sysApp.getHeaderIn());
|
||||
if (null != headerArray && headerArray.size() > 0) {
|
||||
String plugId = null;
|
||||
for (int i = 0; i < headerArray.size(); i++) {
|
||||
JSONObject querys = headerArray.getJSONObject(i);
|
||||
//query 只有基本类型,不用循环判断下级
|
||||
//判断参数是否有值
|
||||
//获取对象下面的层级数据
|
||||
String parameterName = querys.getString("parameterName");
|
||||
if (null != parameterName && "plugId".equals(parameterName)) {
|
||||
plugId = querys.getString("example");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (null == plugId) {
|
||||
throw new BaseSystemException("根据formID:" + formAppId + "未获取到head参数");
|
||||
} else {
|
||||
PluginBaseEntity pluginBaseEntity = null;
|
||||
JsonResultEntity result;
|
||||
pluginBaseEntity = PluginUtils.getPluginsById(plugId);
|
||||
if (null == pluginBaseEntity) {
|
||||
throw new BaseSystemException("根据ID获取插件错误!请传入正确的 pluginId");
|
||||
} else {
|
||||
//执行业务逻辑代码
|
||||
JSONObject reqJson = new JSONObject();
|
||||
reqJson.put("jsonStr",jsonStr);
|
||||
reqJson.put("formAppId",formAppId);
|
||||
reqJson.put("eventType",eventType);
|
||||
result = pluginBaseEntity.executeBusiness(reqJson);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
throw new BaseSystemException("根据formID:" + formAppId + "未获取到head参数");
|
||||
}
|
||||
|
||||
|
||||
// Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
// .put("apiCode", String.valueOf(sysApp.getApiCode()))
|
||||
// //这里用中台做为发送方
|
||||
// .put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
|
||||
// .put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
// .put("appId",String.valueOf(sysApp.getAppCode()))
|
||||
// .build();
|
||||
// String body = HttpRequest.post("http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(jsonStr).timeout(60000).execute().body();
|
||||
// logger.info("调用中台返回的参数:{}",body);
|
||||
// return body;
|
||||
}
|
||||
}else{
|
||||
// StrUtil.isNotEmpty(jsonStr) && StrUtil.isNotEmpty(formAppId) && StrUtil.isNotEmpty(eventType)
|
||||
logger.info("jsonStr,formAppId,eventType为空!执行错误"+jsonStr+formAppId+eventType);
|
||||
throw new BaseSystemException("jsonStr,formAppId,eventType为空!执行错误");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity chengeBody(JSONObject object) throws Exception {
|
||||
JSONObject jsonstr = object.getJSONObject("jsonStr");
|
||||
PluginBaseEntity pluginBaseEntity = null;
|
||||
JsonResultEntity result;
|
||||
String pluginId = jsonstr.getString("plugId");
|
||||
pluginBaseEntity = PluginUtils.getPluginsById(pluginId);
|
||||
if (null == pluginBaseEntity) {
|
||||
throw new BaseSystemException("根据ID获取插件错误!请传入正确的 pluginId");
|
||||
} else {
|
||||
//执行业务逻辑代码
|
||||
result = pluginBaseEntity.executeBusiness(object);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysExtensionApiEntity chengeBodySetPlug(SysExtensionApiEntity entity) {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
JSONObject jsonObject = JSONObject.parseObject(entity.getBodys());
|
||||
jsonObject.put("plugId", headers.get("plugId"));
|
||||
entity.setBodys(jsonObject.toJSONString());
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -21,15 +21,15 @@ public class OABipUtil {
|
|||
*
|
||||
*/
|
||||
|
||||
public static String sendOATOBipEsb(String parm, String apiCode,String token){
|
||||
String baseUrl = "http://127.0.0.1:9011/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
public static String sendU9cTOBipEsb(String parm, String apiCode,String token){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800050")//头信息,多个头信息多次调用此方法即可
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("access_token", token)//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYAM2YFEIsIaI1e4wMagkS2Q7SFgGk0RvsPhEES45m/OVFCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "lR6+uf94mvNMclAB43oIwmhJSMDzQaViTkfXLeNvmGdpLfbFiUvbgbU+p43zO25Zj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
|
@ -40,13 +40,13 @@ public class OABipUtil {
|
|||
return null;
|
||||
}
|
||||
public static String getBipToken(String userCode, String apiCode){
|
||||
String baseUrl = "http://127.0.0.1:9011/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800050")//头信息,多个头信息多次调用此方法即可
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
// .header("usercode", userCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYAM2YFEIsIaI1e4wMagkS2Q7SFgGk0RvsPhEES45m/OVFCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "lR6+uf94mvNMclAB43oIwmhJSMDzQaViTkfXLeNvmGdpLfbFiUvbgbU+p43zO25Zj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.header("usercode", userCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body("")//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
|
|
Loading…
Reference in New Issue