cbs
This commit is contained in:
parent
4d6c7f5d03
commit
f779db543c
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.seeyon.cbs8.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
|
||||
|
||||
/**
|
||||
* @Description cbs交易明细 oa底表
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/24 11:10
|
||||
**/
|
||||
public interface ITransactionDetailDao extends IBaseDao<TransactionDetailEntity,String> {
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.seeyon.cbs8.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.seeyon.cbs8.dao.IPaymentDao;
|
||||
import com.hzya.frame.seeyon.cbs8.dao.ITransactionDetailDao;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/24 11:10
|
||||
**/
|
||||
@Repository("OATransactionDetailDaoImpl")
|
||||
public class TransactionDetailDaoImpl extends MybatisGenericDao<TransactionDetailEntity,String> implements ITransactionDetailDao {
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
<mapper namespace="com.hzya.frame.seeyon.cbs8.dao.impl.CbsLogDaoImpl">
|
||||
<resultMap id="get-CbsLogEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
<result property="id" column="id" />
|
||||
<result property="oa_id" column="oa_id" />
|
||||
|
@ -20,60 +20,61 @@
|
|||
|
||||
<sql id="CbsLogEntity_Base_Column_List">
|
||||
id,
|
||||
field0001 as oa_id,
|
||||
field0002 as bill_code,
|
||||
field0003 as tab_name_en,
|
||||
field0004 as tab_name_ch,
|
||||
field0005 as pay_state,
|
||||
field0006 as message,
|
||||
field0007 as apply_state,
|
||||
field0008 as successed,
|
||||
field0009 as title,
|
||||
field0010 as pay_company,
|
||||
field0011 as payee,
|
||||
field0012 as amount,
|
||||
field0013 as cbs_apply_code
|
||||
field0002 as title,
|
||||
field0003 as pay_company,
|
||||
field0004 as payee,
|
||||
field0005 as cbs_apply_code,
|
||||
field0006 as bill_code,
|
||||
field0007 as oa_id,
|
||||
field0008 as tab_name_ch,
|
||||
field0009 as tab_name_en,
|
||||
field0010 as pay_state,
|
||||
field0011 as message,
|
||||
field0012 as apply_state,
|
||||
field0014 as successed
|
||||
</sql>
|
||||
|
||||
<!-- 查询推送失败,用户手动发起请求 采用==查询 -->
|
||||
<select id="CbsLogEntity_list_base" resultMap="get-CbsLogEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
<select id="entity_list_base" resultMap="get-CbsLogEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
select
|
||||
<include refid="CbsLogEntity_Base_Column_List"/>
|
||||
from
|
||||
formmain_1283
|
||||
formmain_0232
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="oa_id != null and oa_id !='' "> field0001 = #{oa_id} </if>
|
||||
<if test="id != null and id !='' "> and id = #{id} </if>
|
||||
<if test="bill_code != null and bill_code !='' "> and field0002 = #{bill_code} </if>
|
||||
<if test="tab_name_en != null and tab_name_en !='' "> and field0003 = #{tab_name_en} </if>
|
||||
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0004 = #{tab_name_ch} </if>
|
||||
<if test="pay_state != null and pay_state !='' "> and field0005 = #{pay_state} </if>
|
||||
<if test="message != null and message !='' "> and field0006 = #{message} </if>
|
||||
<if test="apply_state != null and apply_state !='' "> and field0007 = #{apply_state} </if>
|
||||
<if test="successed != null and successed !='' "> and field0008 = #{successed} </if>
|
||||
<if test="title != null and title !='' "> field0002 = #{title} </if>
|
||||
<if test="pay_company != null and pay_company !='' "> and field0003 = #{pay_company} </if>
|
||||
<if test="payee != null and payee !='' "> and field0004 = #{payee} </if>
|
||||
<if test="cbs_apply_code != null and cbs_apply_code !='' "> and field0005 = #{cbs_apply_code} </if>
|
||||
<if test="bill_code != null and bill_code !='' "> and field0006 = #{bill_code} </if>
|
||||
<if test="oa_id != null and oa_id !='' "> and field0007 = #{oa_id} </if>
|
||||
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0008 = #{tab_name_ch} </if>
|
||||
<if test="tab_name_en != null and tab_name_en !='' "> and field0009 = #{tab_name_en} </if>
|
||||
<if test="pay_state != null and pay_state !='' "> and field0010 = #{pay_state} </if>
|
||||
<if test="message != null and message !='' "> and field0011 = #{message} </if>
|
||||
<if test="apply_state != null and apply_state !='' "> and field0012 = #{apply_state} </if>
|
||||
<if test="successed != null and successed !='' "> and field0014 = #{successed} </if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="CbsLogEntity_list_like" resultMap="get-CbsLogEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
<select id="entity_list_like" resultMap="get-CbsLogEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
select
|
||||
<include refid="CbsLogEntity_Base_Column_List"/>
|
||||
from
|
||||
formmain_1283
|
||||
formmain_0232
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="oa_id != null and oa_id !='' "> field0001 = #{oa_id} </if>
|
||||
<if test="title != null and title !='' "> field0002 = #{title} </if>
|
||||
<if test="id != null and id !='' "> and id = #{id} </if>
|
||||
<if test="bill_code != null and bill_code !='' "> and field0002 like '${bill_code}%' </if>
|
||||
<if test="tab_name_en != null and tab_name_en !='' "> and field0003 like '${tab_name_en}%' </if>
|
||||
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0004 like '${tab_name_ch}%' </if>
|
||||
<if test="pay_state != null and pay_state !='' "> and field0005 like '${pay_state}%' </if>
|
||||
<if test="message != null and message !='' "> and field0006 like '${message}%' </if>
|
||||
<if test="apply_state != null and apply_state !='' "> and field0007 like '${apply_state}%' </if>
|
||||
<if test="successed != null and successed !='' "> and field0008 = #{successed} </if>
|
||||
<if test="title != null and title !='' "> and field0009 like '${title}%' </if>
|
||||
<if test="pay_company != null and pay_company !='' "> and field0010 like '${pay_company}%' </if>
|
||||
<if test="payee != null and payee !='' "> and field0011 like '${payee}%' </if>
|
||||
<if test="amount != null and amount !='' "> and field0012 like '${amount}%' </if>
|
||||
<if test="cbs_apply_code != null and cbs_apply_code !='' "> and field0013 like '${cbs_apply_code}%' </if>
|
||||
<if test="pay_company != null and pay_company !='' "> and field0003 like '${pay_company}%' </if>
|
||||
<if test="payee != null and payee !='' "> and field0004 like '${payee}%' </if>
|
||||
<if test="cbs_apply_code != null and cbs_apply_code !='' "> and field0005 like '${cbs_apply_code}%' </if>
|
||||
<if test="bill_code != null and bill_code !='' "> and field0006 like '${bill_code}%' </if>
|
||||
<if test="oa_id != null and oa_id !='' "> and field0007 = #{oa_id} </if>
|
||||
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0008 like '${tab_name_ch}%' </if>
|
||||
<if test="tab_name_en != null and tab_name_en !='' "> and field0009 like '${tab_name_en}%' </if>
|
||||
<if test="pay_state != null and pay_state !='' "> and field0010 like '${pay_state}%' </if>
|
||||
<if test="message != null and message !='' "> and field0011 like '${message}%' </if>
|
||||
<if test="apply_state != null and apply_state !='' "> and field0012 like '${apply_state}%' </if>
|
||||
<if test="successed != null and successed !='' "> and field0014 like '${successed}%' </if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
@ -81,31 +82,31 @@
|
|||
select
|
||||
<include refid="CbsLogEntity_Base_Column_List"/>
|
||||
from
|
||||
formmain_1283
|
||||
formmain_0232
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="oa_id != null and oa_id !='' "> field0001 = #{oa_id} </if>
|
||||
<if test="oa_id != null and oa_id !='' "> field0007 = #{oa_id} </if>
|
||||
<if test="id != null and id !='' "> and id = #{id} </if>
|
||||
<if test="bill_code != null and bill_code !='' "> and field0002 = #{bill_code} </if>
|
||||
<if test="tab_name_en != null and tab_name_en !='' "> and field0003 = #{tab_name_en} </if>
|
||||
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0004 = #{tab_name_ch} </if>
|
||||
<if test="pay_state != null and pay_state !='' "> and field0005 = #{pay_state} </if>
|
||||
<if test="message != null and message !='' "> and field0006 = #{message} </if>
|
||||
<if test="apply_state != null and apply_state !='' "> and field0007 = #{apply_state} </if>
|
||||
<if test="successed != null and successed !='' "> and field0008 = #{successed} </if>
|
||||
and (field0005='支付中'
|
||||
or field0005 not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败','推送失败','网银支付',''))
|
||||
<if test="bill_code != null and bill_code !='' "> and field0006 = #{bill_code} </if>
|
||||
<if test="tab_name_en != null and tab_name_en !='' "> and field0008 = #{tab_name_en} </if>
|
||||
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0009 = #{tab_name_ch} </if>
|
||||
<if test="pay_state != null and pay_state !='' "> and field0010 = #{pay_state} </if>
|
||||
<if test="message != null and message !='' "> and field0011 = #{message} </if>
|
||||
<if test="apply_state != null and apply_state !='' "> and field0012 = #{apply_state} </if>
|
||||
<if test="successed != null and successed !='' "> and field0014 = #{successed} </if>
|
||||
and (field0010='支付中'
|
||||
or field0010 not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败','推送失败'))
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!--修改视图支付状态-->
|
||||
<update id="CbsLogEntity_update" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
update formmain_1283 set
|
||||
<update id="entity_update" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
|
||||
update formmain_0232 set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="pay_state != null and pay_state !='' ">field0005 =#{pay_state},</if>
|
||||
field0006 =#{message},
|
||||
<if test="apply_state != null and apply_state !='' ">field0007 =#{apply_state},</if>
|
||||
<if test="successed != null and successed !='' ">field0008 =#{successed}</if>
|
||||
<if test="pay_state != null and pay_state !='' ">field0010 =#{pay_state},</if>
|
||||
field0011 =#{message},
|
||||
<if test="apply_state != null and apply_state !='' ">field0012 =#{apply_state},</if>
|
||||
<if test="successed != null and successed !='' ">field0014 =#{successed}</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
@ -105,74 +105,34 @@
|
|||
left join ORG_UNIT unit on unit.id =formmain_0209.field0002
|
||||
</sql>
|
||||
<!-- 采用==查询 -->
|
||||
<select id="PaymentEntity_list_base" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
||||
<!-- select
|
||||
<include refid="PaymentEntity_Base_Column_List"/>
|
||||
from
|
||||
v_hzya_oa_cbs_all-->
|
||||
-- 差旅费报销单
|
||||
SELECT
|
||||
formson_0210.id as oaId, -- 主表id
|
||||
'formson_0210' as tableName, -- 表名
|
||||
COL_SUMMARY.SUBJECT as title, -- 单据标题
|
||||
unit.name as payCompany, -- 付款公司
|
||||
'差旅费报销单' as billName,
|
||||
'field0072' as payResultField, -- 支付结果字段
|
||||
'field0073' as payDateField, -- 打款日期字段
|
||||
'' as receiptFiled,-- 电子回单字段
|
||||
COL_SUMMARY.id as summaryId,
|
||||
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号
|
||||
formmain_0209.START_DATE as startDate, -- 单据日期
|
||||
formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态
|
||||
formson_0210.field0073 as payDate, -- 打款日期
|
||||
formson_0210.field0072 as payResult, -- 支付结果
|
||||
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户
|
||||
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行
|
||||
formson_0210.field0031 as amount, -- 金额
|
||||
formmain_0209.field0038 as purpose, -- 用途
|
||||
formmain_0209.field0038 as cbsAbstract, -- 摘要
|
||||
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户
|
||||
formson_0210.field0068 as revBankName, -- 收款开户行
|
||||
'' as revAccountName, -- 收款人
|
||||
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号
|
||||
item.showvalue as personalFlag,-- 公私标记
|
||||
'' as revBankType,-- 收款银行类型
|
||||
'10' as currency,-- 币种
|
||||
'' as busType,-- 业务类型
|
||||
'' as receipt -- 电子回单
|
||||
from
|
||||
formson_0210
|
||||
LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id
|
||||
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0209.id
|
||||
LEFT JOIN CTP_AFFAIR ON CTP_AFFAIR.object_id = COL_SUMMARY.id
|
||||
left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070
|
||||
left join ORG_UNIT unit on unit.id =formmain_0209.field0002
|
||||
-- left join V_USER_VIEW_ALL us on us.staffid=formmain_0209.field0024
|
||||
WHERE 1=1
|
||||
-- and formson_0210.field0031>0
|
||||
and CTP_AFFAIR.node_name = '发起者' and CTP_AFFAIR.COMPLETE_TIME is null and CTP_AFFAIR.STATE = 3
|
||||
<select id="entity_list_base" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
||||
select v.* from (
|
||||
<include refid="base_sql"/>
|
||||
) v
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
|
||||
<if test="busType != null and busType !='' "> and busType = #{busType} </if>
|
||||
<if test="amount != null and amount !='' ">and amount = #{amount} </if>
|
||||
<if test="currency != null and currency !='' "> and currency = #{currency} </if>
|
||||
<if test="payAccount != null and payAccount !='' ">and payAccount = #{payAccount} </if>
|
||||
<if test="revAccount != null and revAccount !='' "> and revAccount = #{revAccount} </if>
|
||||
<if test="revAccountName != null and revAccountName !='' "> and revAccountName = #{revAccountName} </if>
|
||||
<if test="revBankType != null and revBankType !='' "> and revBankType = #{revBankType} </if>
|
||||
<if test="revBankName != null and revBankName !='' ">and revBankName = #{revBankName} </if>
|
||||
<if test="cnapsCode != null and cnapsCode !='' ">and cnapsCode = #{cnapsCode} </if>
|
||||
<if test="purpose != null and purpose !='' "> and purpose = #{purpose} </if>
|
||||
<if test="personalFlag != null and personalFlag !='' ">and personalFlag = #{personalFlag} </if>
|
||||
<if test="tableName != null and tableName !='' "> and tableName = #{tableName} </if>
|
||||
<if test="oaId != null and oaId !='' ">and oaId = #{oaId} </if>
|
||||
<if test="payCompany != null and payCompany !='' "> and payCompany = #{payCompany} </if>
|
||||
<if test="payCompanyCode != null and payCompanyCode !='' "> and payCompanyCode = #{payCompanyCode} </if>
|
||||
<if test="title != null and title !='' "> and title = #{title} </if>
|
||||
<if test="billName != null and billName !='' "> and billName = #{billName} </if>
|
||||
<if test="payResult != null and payResult !='' ">and payResult = #{payResult} </if>
|
||||
<if test="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
|
||||
<if test="payType != null and payType !='' "> and payType = #{payType} </if>
|
||||
<if test="referenceNum != null and referenceNum !='' "> v.referenceNum = #{referenceNum} </if>
|
||||
<if test="busType != null and busType !='' "> and v.busType = #{busType} </if>
|
||||
<if test="amount != null and amount !='' ">and v.amount = #{amount} </if>
|
||||
<if test="currency != null and currency !='' "> and v.currency = #{currency} </if>
|
||||
<if test="payAccount != null and payAccount !='' ">and v.payAccount = #{payAccount} </if>
|
||||
<if test="revAccount != null and revAccount !='' "> and v.revAccount = #{revAccount} </if>
|
||||
<if test="revAccountName != null and revAccountName !='' "> and v.revAccountName = #{revAccountName} </if>
|
||||
<if test="revBankType != null and revBankType !='' "> and v.revBankType = #{revBankType} </if>
|
||||
<if test="revBankName != null and revBankName !='' ">and v.revBankName = #{revBankName} </if>
|
||||
<if test="cnapsCode != null and cnapsCode !='' ">and v.cnapsCode = #{cnapsCode} </if>
|
||||
<if test="purpose != null and purpose !='' "> and v.purpose = #{purpose} </if>
|
||||
<if test="personalFlag != null and personalFlag !='' ">and v.personalFlag = #{personalFlag} </if>
|
||||
<if test="tableName != null and tableName !='' "> and v.tableName = #{tableName} </if>
|
||||
<if test="oaId != null and oaId !='' ">and v.oaId = #{oaId} </if>
|
||||
<if test="payCompany != null and payCompany !='' "> and v.payCompany = #{payCompany} </if>
|
||||
<if test="payCompanyCode != null and payCompanyCode !='' "> and v.payCompanyCode = #{payCompanyCode} </if>
|
||||
<if test="title != null and title !='' "> and v.title = #{title} </if>
|
||||
<if test="billName != null and billName !='' "> and v.billName = #{billName} </if>
|
||||
<if test="payResult != null and payResult !='' ">and v.payResult = #{payResult} </if>
|
||||
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
|
||||
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
|
||||
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
|
||||
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -0,0 +1,155 @@
|
|||
package com.hzya.frame.seeyon.cbs8.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @Description cbs交易明细日志OA底表
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/24 10:49
|
||||
**/
|
||||
public class TransactionDetailEntity extends BaseEntity {
|
||||
private String id;//id
|
||||
private String accountNo;//银行账号
|
||||
private String accountName;//户名
|
||||
private String openBank;//开户行名称
|
||||
private String bankType;//我方银行类型
|
||||
private String bankTransactionDate;//交易日期
|
||||
private String transactionSerialNumber;//交易流水号
|
||||
private String bankSerialNumber;//银行流水号
|
||||
private String currency;//币种
|
||||
private String incurredAmount;//发生额
|
||||
private String purpose;//用途
|
||||
private String digest;//摘要
|
||||
private String oppositeAccount;//对方账号
|
||||
private String oppositeName;//对方户名
|
||||
private String oppositeOpeningBank;//对方开户行
|
||||
|
||||
private String remark;//备注
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAccountNo() {
|
||||
return accountNo;
|
||||
}
|
||||
|
||||
public void setAccountNo(String accountNo) {
|
||||
this.accountNo = accountNo;
|
||||
}
|
||||
|
||||
public String getAccountName() {
|
||||
return accountName;
|
||||
}
|
||||
|
||||
public void setAccountName(String accountName) {
|
||||
this.accountName = accountName;
|
||||
}
|
||||
|
||||
public String getOpenBank() {
|
||||
return openBank;
|
||||
}
|
||||
|
||||
public void setOpenBank(String openBank) {
|
||||
this.openBank = openBank;
|
||||
}
|
||||
|
||||
public String getBankTransactionDate() {
|
||||
return bankTransactionDate;
|
||||
}
|
||||
|
||||
public void setBankTransactionDate(String bankTransactionDate) {
|
||||
this.bankTransactionDate = bankTransactionDate;
|
||||
}
|
||||
|
||||
public String getTransactionSerialNumber() {
|
||||
return transactionSerialNumber;
|
||||
}
|
||||
|
||||
public void setTransactionSerialNumber(String transactionSerialNumber) {
|
||||
this.transactionSerialNumber = transactionSerialNumber;
|
||||
}
|
||||
|
||||
public String getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
public void setCurrency(String currency) {
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
public String getIncurredAmount() {
|
||||
return incurredAmount;
|
||||
}
|
||||
|
||||
public void setIncurredAmount(String incurredAmount) {
|
||||
this.incurredAmount = incurredAmount;
|
||||
}
|
||||
|
||||
public String getPurpose() {
|
||||
return purpose;
|
||||
}
|
||||
|
||||
public void setPurpose(String purpose) {
|
||||
this.purpose = purpose;
|
||||
}
|
||||
|
||||
public String getDigest() {
|
||||
return digest;
|
||||
}
|
||||
|
||||
public void setDigest(String digest) {
|
||||
this.digest = digest;
|
||||
}
|
||||
|
||||
public String getOppositeAccount() {
|
||||
return oppositeAccount;
|
||||
}
|
||||
|
||||
public void setOppositeAccount(String oppositeAccount) {
|
||||
this.oppositeAccount = oppositeAccount;
|
||||
}
|
||||
|
||||
public String getOppositeName() {
|
||||
return oppositeName;
|
||||
}
|
||||
|
||||
public void setOppositeName(String oppositeName) {
|
||||
this.oppositeName = oppositeName;
|
||||
}
|
||||
|
||||
public String getOppositeOpeningBank() {
|
||||
return oppositeOpeningBank;
|
||||
}
|
||||
|
||||
public void setOppositeOpeningBank(String oppositeOpeningBank) {
|
||||
this.oppositeOpeningBank = oppositeOpeningBank;
|
||||
}
|
||||
|
||||
public String getBankType() {
|
||||
return bankType;
|
||||
}
|
||||
|
||||
public void setBankType(String bankType) {
|
||||
this.bankType = bankType;
|
||||
}
|
||||
|
||||
public String getBankSerialNumber() {
|
||||
return bankSerialNumber;
|
||||
}
|
||||
|
||||
public void setBankSerialNumber(String bankSerialNumber) {
|
||||
this.bankSerialNumber = bankSerialNumber;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
|
||||
<resultMap id="get-TransactionDetailEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
|
||||
<result property="id" column="id" />
|
||||
<result property="accountNo" column="accountNo" />
|
||||
<result property="accountName" column="accountName" />
|
||||
<result property="openBank" column="openBank" />
|
||||
<result property="bankType" column="bankType" />
|
||||
<result property="bankTransactionDate" column="bankTransactionDate" />
|
||||
<result property="transactionSerialNumber" column="transactionSerialNumber" />
|
||||
<result property="currency" column="currency" />
|
||||
<result property="incurredAmount" column="incurredAmount" />
|
||||
<result property="purpose" column="purpose" />
|
||||
<result property="digest" column="digest" />
|
||||
<result property="oppositeAccount" column="oppositeAccount" />
|
||||
<result property="oppositeName" column="oppositeName" />
|
||||
<result property="oppositeOpeningBank" column="oppositeOpeningBank" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="TransactionDetailEntity_Base_Column_List">
|
||||
id,
|
||||
field0001 as accountNo,
|
||||
field0002 as accountName,
|
||||
field0003 as openBank,
|
||||
field0004 as bankType,
|
||||
field0005 as transactionSerialNumber,
|
||||
field0006 as bankTransactionDate,
|
||||
field0007 as bankSerialNumber,
|
||||
field0008 as currency,
|
||||
field0009 as incurredAmount,
|
||||
field0010 as purpose,
|
||||
field0011 as digest,
|
||||
field0012 as oppositeAccount,
|
||||
field0013 as oppositeName,
|
||||
field0014 as oppositeOpeningBank,
|
||||
field0015 as remark
|
||||
</sql>
|
||||
|
||||
<!-- 采用==查询 -->
|
||||
<select id="TransactionDetailEntity_list_base" resultMap="get-TransactionDetailEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
|
||||
select
|
||||
<include refid="TransactionDetailEntity_Base_Column_List"/>
|
||||
from
|
||||
formmain_0233
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id !='' ">id = #{id} </if>
|
||||
<if test="accountNo != null and accountNo !='' "> and field0001 = #{accountNo} </if>
|
||||
<if test="accountName != null and accountName !='' "> and field0002 = #{accountName} </if>
|
||||
<if test="openBank != null and openBank !='' "> and field0003 = #{openBank} </if>
|
||||
<if test="bankType != null and bankType !='' "> and field0004 = #{bankType} </if>
|
||||
<if test="transactionSerialNumber != null and transactionSerialNumber !='' "> and field0005 = #{transactionSerialNumber} </if>
|
||||
<if test="bankTransactionDate != null and bankTransactionDate !='' "> and field0006 = #{bankTransactionDate} </if>
|
||||
<if test="bankSerialNumber != null and bankSerialNumber !='' "> and field0007 = #{bankSerialNumber} </if>
|
||||
<if test="currency != null and currency !='' "> and field0008 = #{currency} </if>
|
||||
<if test="incurredAmount != null and incurredAmount !='' "> and field0009 = #{incurredAmount} </if>
|
||||
<if test="purpose != null and purpose !='' "> and field0010 = #{purpose} </if>
|
||||
<if test="digest != null and digest !='' "> and field0011 = #{digest} </if>
|
||||
<if test="oppositeAccount != null and oppositeAccount !='' "> and field0012 = #{oppositeAccount} </if>
|
||||
<if test="oppositeName != null and oppositeName !='' "> and field0013 = #{oppositeName} </if>
|
||||
<if test="oppositeOpeningBank != null and oppositeOpeningBank !='' "> and field0014 = #{oppositeOpeningBank} </if>
|
||||
<if test="remark != null and remark !='' "> and field0015 = #{remark} </if>
|
||||
</trim>
|
||||
</select>
|
||||
<!-- 只查询交易流水号-->
|
||||
<select id="TransactionDetailEntity_list_serialNumber" resultMap="get-TransactionDetailEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
|
||||
select
|
||||
field0005 as transactionSerialNumber
|
||||
from
|
||||
formmain_0233
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id !='' ">id = #{id} </if>
|
||||
<if test="accountNo != null and accountNo !='' "> and field0001 = #{accountNo} </if>
|
||||
<if test="accountName != null and accountName !='' "> and field0002 = #{accountName} </if>
|
||||
<if test="openBank != null and openBank !='' "> and field0003 = #{openBank} </if>
|
||||
<if test="bankType != null and bankType !='' "> and field0004 = #{bankType} </if>
|
||||
<if test="transactionSerialNumber != null and transactionSerialNumber !='' "> and field0005 = #{transactionSerialNumber} </if>
|
||||
<if test="bankTransactionDate != null and bankTransactionDate !='' "> and field0006 = #{bankTransactionDate} </if>
|
||||
<if test="bankSerialNumber != null and bankSerialNumber !='' "> and field0007 = #{bankSerialNumber} </if>
|
||||
<if test="currency != null and currency !='' "> and field0008 = #{currency} </if>
|
||||
<if test="incurredAmount != null and incurredAmount !='' "> and field0009 = #{incurredAmount} </if>
|
||||
<if test="purpose != null and purpose !='' "> and field0010 = #{purpose} </if>
|
||||
<if test="digest != null and digest !='' "> and field0011 = #{digest} </if>
|
||||
<if test="oppositeAccount != null and oppositeAccount !='' "> and field0012 = #{oppositeAccount} </if>
|
||||
<if test="oppositeName != null and oppositeName !='' "> and field0013 = #{oppositeName} </if>
|
||||
<if test="oppositeOpeningBank != null and oppositeOpeningBank !='' "> and field0014 = #{oppositeOpeningBank} </if>
|
||||
<if test="remark != null and remark !='' "> and field0015 = #{remark} </if>
|
||||
</trim>
|
||||
</select>
|
||||
</mapper>
|
|
@ -3,6 +3,7 @@ package com.hzya.frame.seeyon.cbs8.service;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,4 +37,17 @@ public interface ICbsLogService extends IBaseService<CbsLogEntity,String> {
|
|||
* @param jsonObject
|
||||
*/
|
||||
void resend(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 获取token
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
SysExtensionApiEntity getTokenExt(SysExtensionApiEntity entity);
|
||||
|
||||
/**
|
||||
* 更新日志
|
||||
* @param logEntity
|
||||
*/
|
||||
void updateLog(CbsLogEntity logEntity);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.seeyon.cbs8.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description cbs交易明细 OA底表
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/24 11:07
|
||||
**/
|
||||
public interface ITransactionDetailService extends IBaseService<TransactionDetailEntity,String> {
|
||||
|
||||
|
||||
/**
|
||||
* 只返回交易流水号
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
List<TransactionDetailEntity> querySerialNumber(TransactionDetailEntity entity);
|
||||
|
||||
/**
|
||||
* 保存交易明细,通过rest接口的方式
|
||||
* @param entity
|
||||
* @throws Exception
|
||||
*/
|
||||
void restSave(TransactionDetailEntity entity);
|
||||
}
|
|
@ -1,38 +1,53 @@
|
|||
package com.hzya.frame.seeyon.cbs8.service.impl;
|
||||
|
||||
import cn.hutool.core.map.MapBuilder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.cbs8.util.PayState;
|
||||
import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.service.ICbsLogService;
|
||||
import com.hzya.frame.seeyon.util.RestUtil;
|
||||
import com.hzya.frame.stringutil.StringUtil;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description cbs8支付日志
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/14 17:22
|
||||
**/
|
||||
@Service()
|
||||
@Service(value = "CbsLogServiceImpl")
|
||||
public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implements ICbsLogService {
|
||||
|
||||
|
||||
Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private ICbsLogDao cbsLogDao;
|
||||
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
@Autowired
|
||||
public void setCbsLogDao(ICbsLogDao cbsLogDao) {
|
||||
this.cbsLogDao = cbsLogDao;
|
||||
this.dao = cbsLogDao;
|
||||
}
|
||||
@Autowired
|
||||
private RestUtil restUtil;
|
||||
|
||||
/**
|
||||
* 查询支付中的数据
|
||||
|
@ -40,6 +55,7 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
|
|||
* @param logEntity
|
||||
* @return
|
||||
*/
|
||||
@DS("#logEntity.dataSourceCode")
|
||||
@Override
|
||||
public List<CbsLogEntity> queryInPayment(CbsLogEntity logEntity) {
|
||||
List<CbsLogEntity> logList = cbsLogDao.queryList(logEntity, "CbsLogEntity_list_base_in_payment");
|
||||
|
@ -49,11 +65,59 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
|
|||
/**
|
||||
* 保存日志,通过rest接口的形式
|
||||
*
|
||||
* @param logEntity
|
||||
* @param cbsLogEntity
|
||||
*/
|
||||
@Override
|
||||
public void saveLog(CbsLogEntity logEntity) {
|
||||
|
||||
public void saveLog(CbsLogEntity cbsLogEntity) {
|
||||
String oa_id = StringUtil.nullConvert(cbsLogEntity.getOa_id());
|
||||
String bill_code = StringUtil.nullConvert(cbsLogEntity.getBill_code());
|
||||
String tab_name_en = StringUtil.nullConvert(cbsLogEntity.getTab_name_en());
|
||||
String tab_name_ch = StringUtil.nullConvert(cbsLogEntity.getTab_name_ch());
|
||||
String pay_state = StringUtil.nullConvert(cbsLogEntity.getPay_state());
|
||||
String message = StringUtil.nullConvert(cbsLogEntity.getMessage());
|
||||
String apply_state = StringUtil.nullConvert(cbsLogEntity.getApply_state());
|
||||
String successed = StringUtil.nullConvert(cbsLogEntity.getSuccessed());
|
||||
String title = StringUtil.nullConvert(cbsLogEntity.getTitle());
|
||||
String pay_company = StringUtil.nullConvert(cbsLogEntity.getPay_company());
|
||||
String payee = StringUtil.nullConvert(cbsLogEntity.getPayee());
|
||||
String amount = StringUtil.nullConvert(cbsLogEntity.getAmount());
|
||||
String cbs_apply_code = StringUtil.nullConvert(cbsLogEntity.getCbs_apply_code());
|
||||
//根据oaid判断是否在日志表中存在,如果存在,则更新,如果不存在,则新增
|
||||
CbsLogEntity cbsLogEntityResend=new CbsLogEntity();
|
||||
cbsLogEntityResend.setOa_id(cbsLogEntity.getOa_id());
|
||||
cbsLogEntityResend.setDataSourceCode(oa_data_source_code);
|
||||
List<CbsLogEntity> queryList = query(cbsLogEntityResend);
|
||||
if(CollectionUtils.isEmpty(queryList)){
|
||||
String data = StrUtil.format(getXmlTemplate(),title,pay_company,payee,amount,cbs_apply_code,bill_code,oa_id,tab_name_ch,tab_name_en,pay_state,message,apply_state,successed);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000240007")
|
||||
.put("publicKey","ZJYAorA7JuRDfrVjywcx78BFcqlLwthgXNC65TXxxQMUHuxCe7eDIk+3zDUT+v578prj")//发送者
|
||||
.put("secretKey","a54vt9Wx7gdBig+4JCkZ/lISIIL2m4ZEyZkXtW0uQVBDHS+V4SVgT6xhNblacri/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//发送者
|
||||
.put("appId","800024")
|
||||
.build();
|
||||
JSONObject paramsTemplate = new JSONObject();
|
||||
paramsTemplate.put("loginName", "hzya_rest");
|
||||
paramsTemplate.put("dataXml", data);
|
||||
String params = JSONObject.toJSONString(paramsTemplate);
|
||||
logger.info("保存支付申请日志到OA底表请求参数:{}",params);
|
||||
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(params).timeout(60000).execute().body();
|
||||
logger.info("保存支付申请日志到OA底表响应参数:{}",body);
|
||||
}else{
|
||||
for (CbsLogEntity logEntity : queryList) {
|
||||
logEntity.setPay_state(pay_state);
|
||||
logEntity.setMessage(message);
|
||||
logEntity.setApply_state(apply_state);
|
||||
logEntity.setSuccessed(successed);
|
||||
logEntity.setBill_code(cbsLogEntity.getBill_code());
|
||||
logEntity.setDataSourceCode(oa_data_source_code);
|
||||
try {
|
||||
update(logEntity);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.error("更新");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,9 +164,36 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取token
|
||||
*
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysExtensionApiEntity getTokenExt(SysExtensionApiEntity entity) {
|
||||
String token = restUtil.getToken("hzya_rest", "8000240000");
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
if (null == headers){
|
||||
headers = new HashMap<>();
|
||||
}
|
||||
headers.put("token",token);
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新日志
|
||||
*
|
||||
* @param logEntity
|
||||
*/
|
||||
@DS("#logEntity.dataSourceCode")
|
||||
@Override
|
||||
public void updateLog(CbsLogEntity logEntity) {
|
||||
cbsLogDao.update(logEntity);
|
||||
}
|
||||
|
||||
//获取xml模板
|
||||
private String getXmlTemplate(){
|
||||
// return "<forms version=\"2.1\"><formExport><summary id=\"859338107516044243\" name=\"formmain_1283\"/><definitions><column id=\"field0001\" type=\"0\" name=\"单据ID\" isNullable=\"false\" length=\"100\"/><column id=\"field0002\" type=\"0\" name=\"单据编号\" isNullable=\"false\" length=\"100\"/><column id=\"field0003\" type=\"0\" name=\"英文表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0004\" type=\"0\" name=\"中文表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0005\" type=\"0\" name=\"支付状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"0\" name=\"支付信息\" isNullable=\"false\" length=\"100\"/><column id=\"field0007\" type=\"0\" name=\"支付申请状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"成功标记\" isNullable=\"false\" length=\"100\"/></definitions><values><column name=\"单据ID\"><value><![CDATA[{}]]></value></column><column name=\"单据编号\"><value><![CDATA[{}]]></value></column><column name=\"英文表名\"><value><![CDATA[{}]]></value></column><column name=\"中文表名\"><value><![CDATA[{}]]></value></column><column name=\"支付状态\"><value><![CDATA[{}]]></value></column><column name=\"支付信息\"><value><![CDATA[{}]]></value></column><column name=\"支付申请状态\"><value><![CDATA[{}]]></value></column><column name=\"成功标记\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
|
||||
return "<forms version=\"2.1\"><formExport><summary id=\"859338107516044243\" name=\"formmain_1283\"/><definitions><column id=\"field0001\" type=\"0\" name=\"单据ID\" isNullable=\"false\" length=\"100\"/><column id=\"field0002\" type=\"0\" name=\"单据编号\" isNullable=\"false\" length=\"100\"/><column id=\"field0003\" type=\"0\" name=\"英文表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0004\" type=\"0\" name=\"中文表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0005\" type=\"0\" name=\"支付状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"0\" name=\"支付信息\" isNullable=\"false\" length=\"100\"/><column id=\"field0007\" type=\"0\" name=\"支付申请状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"成功标记\" isNullable=\"false\" length=\"100\"/><column id=\"field0009\" type=\"0\" name=\"流程标题\" isNullable=\"false\" length=\"255\"/><column id=\"field0010\" type=\"0\" name=\"请款主体\" isNullable=\"false\" length=\"100\"/><column id=\"field0011\" type=\"0\" name=\"收款对象\" isNullable=\"false\" length=\"100\"/><column id=\"field0012\" type=\"4\" name=\"金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0013\" type=\"0\" name=\"CBS支付申请单号\" isNullable=\"false\" length=\"100\"/></definitions><values><column name=\"单据ID\"><value><![CDATA[{}]]></value></column><column name=\"单据编号\"><value><![CDATA[{}]]></value></column><column name=\"英文表名\"><value><![CDATA[{}]]></value></column><column name=\"中文表名\"><value><![CDATA[{}]]></value></column><column name=\"支付状态\"><value><![CDATA[{}]]></value></column><column name=\"支付信息\"><value><![CDATA[{}]]></value></column><column name=\"支付申请状态\"><value><![CDATA[{}]]></value></column><column name=\"成功标记\"><value><![CDATA[{}]]></value></column><column name=\"流程标题\"><value><![CDATA[{}]]></value></column><column name=\"请款主体\"><value><![CDATA[{}]]></value></column><column name=\"收款对象\"><value><![CDATA[{}]]></value></column><column name=\"金额\"><value><![CDATA[{}]]></value></column><column name=\"CBS支付申请单号\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
|
||||
return "<forms version=\"2.1\"><formExport><summary id=\"9195604394844442459\" name=\"formmain_0232\"/><definitions><column id=\"field0002\" type=\"0\" name=\"流程标题\" isNullable=\"false\" length=\"100\"/><column id=\"field0003\" type=\"0\" name=\"付款主体公司\" isNullable=\"false\" length=\"100\"/><column id=\"field0004\" type=\"0\" name=\"收款人\" isNullable=\"false\" length=\"100\"/><column id=\"field0019\" type=\"4\" name=\"金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0005\" type=\"0\" name=\"CBS支付申请单号\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"0\" name=\"OA单据编号\" isNullable=\"false\" length=\"100\"/><column id=\"field0007\" type=\"0\" name=\"OA单据ID\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"OA中文表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0009\" type=\"0\" name=\"OA数据库表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0010\" type=\"0\" name=\"支付状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0011\" type=\"0\" name=\"支付信息\" isNullable=\"false\" length=\"100\"/><column id=\"field0012\" type=\"0\" name=\"支付申请状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0014\" type=\"0\" name=\"成功标记\" isNullable=\"false\" length=\"100\"/></definitions><values><column name=\"流程标题\"><value><![CDATA[{}]]></value></column><column name=\"付款主体公司\"><value><![CDATA[{}]]></value></column><column name=\"收款人\"><value><![CDATA[{}]]></value></column><column name=\"金额\"><value><![CDATA[{}]]></value></column><column name=\"CBS支付申请单号\"><value><![CDATA[{}]]></value></column><column name=\"OA单据编号\"><value><![CDATA[{}]]></value></column><column name=\"OA单据ID\"><value><![CDATA[{}]]></value></column><column name=\"OA中文表名\"><value><![CDATA[{}]]></value></column><column name=\"OA数据库表名\"><value><![CDATA[{}]]></value></column><column name=\"支付状态\"><value><![CDATA[{}]]></value></column><column name=\"支付信息\"><value><![CDATA[{}]]></value></column><column name=\"支付申请状态\"><value><![CDATA[{}]]></value></column><column name=\"成功标记\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,19 @@ public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implem
|
|||
this.paymentDao = paymentDao;
|
||||
this.dao = paymentDao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<PaymentEntity> query(PaymentEntity entity) {
|
||||
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.entity_list_base");
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待支付的数据 需要推送到CBS的
|
||||
* 如果需要查询流程状态已结束的 需要调用方设置finishedflag=1
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
package com.hzya.frame.seeyon.cbs8.service.impl;
|
||||
|
||||
import cn.hutool.core.map.MapBuilder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.seeyon.cbs8.dao.ITransactionDetailDao;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
|
||||
import com.hzya.frame.seeyon.cbs8.service.ITransactionDetailService;
|
||||
import com.hzya.frame.stringutil.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/24 11:08
|
||||
**/
|
||||
@Service(value = "OATransactionDetailServiceImpl")
|
||||
public class TransactionDetailServiceImpl extends BaseService<TransactionDetailEntity,String> implements ITransactionDetailService {
|
||||
|
||||
private ITransactionDetailDao transactionDetailDao;
|
||||
|
||||
@Autowired
|
||||
public void setTransactionDetailDao(ITransactionDetailDao dao) {
|
||||
this.transactionDetailDao = dao;
|
||||
this.dao=dao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 只返回交易流水号
|
||||
*
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TransactionDetailEntity> querySerialNumber(TransactionDetailEntity entity) {
|
||||
List<TransactionDetailEntity> list = transactionDetailDao.queryList(entity, "TransactionDetailEntity_list_serialNumber");;
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存交易明细,通过rest接口的方式
|
||||
*
|
||||
* @param entity
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void restSave(TransactionDetailEntity entity) {
|
||||
String field0001= StringUtil.nullConvert(entity.getAccountNo());//我方银行账号
|
||||
String field0002=StringUtil.nullConvert(entity.getAccountName());//我方户名
|
||||
String field0003=StringUtil.nullConvert(entity.getOpenBank());//我方开户行
|
||||
String field0004=StringUtil.nullConvert(entity.getBankType());//我方银行类型
|
||||
String field0005=StringUtil.nullConvert(entity.getTransactionSerialNumber());//交易流水号
|
||||
String field0006=StringUtil.nullConvert(entity.getBankTransactionDate());//交易日期
|
||||
String field0007=StringUtil.nullConvert(entity.getBankSerialNumber());//银行流水号
|
||||
String field0008=StringUtil.nullConvert(entity.getCurrency());//币种
|
||||
String field0009=StringUtil.nullConvert(entity.getIncurredAmount());//收款金额
|
||||
String field0010=StringUtil.nullConvert(entity.getPurpose());//用途
|
||||
String field0011=StringUtil.nullConvert(entity.getDigest());//摘要
|
||||
String field0012=StringUtil.nullConvert(entity.getOppositeAccount());//对方账号
|
||||
String field0013=StringUtil.nullConvert(entity.getOppositeName());//对方户名
|
||||
String field0014=StringUtil.nullConvert(entity.getOppositeOpeningBank());//对方开户行
|
||||
String field0015=StringUtil.nullConvert(entity.getRemark());//备注
|
||||
String data = String.format(getXmlTemplate(),field0001,field0002,field0003,field0004,field0005,field0006,field0007,field0008,field0009,field0010,field0011,field0012,field0013,field0014,field0015);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000240006")
|
||||
.put("publicKey","ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId","800024")
|
||||
.build();
|
||||
String params = JSON.toJSONString(data);
|
||||
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(params).timeout(60000).execute().body();
|
||||
logger.info("保存交易明细到OA底表响应参数",body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无流程表单模版
|
||||
* transaction 交易明细
|
||||
* payApply 支付申请日志
|
||||
* @return
|
||||
*/
|
||||
private String getXmlTemplate(){
|
||||
return "<forms version=\"2.1\"><formExport><summary id=\"-6287716442449165745\" name=\"formmain_0233\"/><definitions><column id=\"field0001\" type=\"0\" name=\"我方银行账户\" isNullable=\"false\" length=\"100\"/><column id=\"field0002\" type=\"0\" name=\"我方户名\" isNullable=\"false\" length=\"100\"/><column id=\"field0003\" type=\"0\" name=\"我方开户行\" isNullable=\"false\" length=\"100\"/><column id=\"field0004\" type=\"0\" name=\"我方银行类型\" isNullable=\"false\" length=\"100\"/><column id=\"field0005\" type=\"0\" name=\"交易流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"3\" name=\"交易日期\" isNullable=\"false\" length=\"255\"/><column id=\"field0007\" type=\"0\" name=\"银行流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"币种\" isNullable=\"false\" length=\"100\"/><column id=\"field0009\" type=\"4\" name=\"收款金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0010\" type=\"0\" name=\"用途\" isNullable=\"false\" length=\"800\"/><column id=\"field0011\" type=\"0\" name=\"摘要\" isNullable=\"false\" length=\"256\"/><column id=\"field0012\" type=\"0\" name=\"对方账号\" isNullable=\"false\" length=\"100\"/><column id=\"field0013\" type=\"0\" name=\"对方户名\" isNullable=\"false\" length=\"100\"/><column id=\"field0014\" type=\"0\" name=\"对方开户行\" isNullable=\"false\" length=\"100\"/><column id=\"field0015\" type=\"0\" name=\"备注\" isNullable=\"false\" length=\"800\"/></definitions><values><column name=\"我方银行账户\"><value><![CDATA[{}]]></value></column><column name=\"我方户名\"><value><![CDATA[{}]]></value></column><column name=\"我方开户行\"><value><![CDATA[{}]]></value></column><column name=\"我方银行类型\"><value><![CDATA[{}]]></value></column><column name=\"交易流水号\"><value><![CDATA[{}]]></value></column><column name=\"交易日期\"><value><![CDATA[{}]]></value></column><column name=\"银行流水号\"><value><![CDATA[{}]]></value></column><column name=\"币种\"><value><![CDATA[{}]]></value></column><column name=\"收款金额\"><value><![CDATA[{}]]></value></column><column name=\"用途\"><value><![CDATA[{}]]></value></column><column name=\"摘要\"><value><![CDATA[{}]]></value></column><column name=\"对方账号\"><value><![CDATA[{}]]></value></column><column name=\"对方户名\"><value><![CDATA[{}]]></value></column><column name=\"对方开户行\"><value><![CDATA[{}]]></value></column><column name=\"备注\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue