This commit is contained in:
xiang2lin 2024-06-20 13:51:53 +08:00
parent 486ba7b0a8
commit f400392f14
3 changed files with 61 additions and 37 deletions

View File

@ -207,12 +207,9 @@
and receipt is null and personalFlag='0' and payResult = '支付成功'
</trim>
</select>
<!-- 查询推送状态为null的代表没有发送请求或者请求客户服务器没有返回的 采用==查询 -->
<!-- 查询待支付的 -->
<select id="PaymentEntity_list_base_unpaid" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
<!--select
<include refid="PaymentEntity_Base_Column_List"/>
from
v_hzya_oa_cbs-->
select v.* from (
-- 差旅费报销单
SELECT
formson_0210.id as oaId,
@ -236,44 +233,45 @@
formmain_0209.field0038 as cbsAbstract,
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount,
formson_0210.field0068 as revBankName,
'' as revAccountName,
'测试' as revAccountName,
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode,
item.showvalue as personalFlag,
'' as revBankType,
'OTH' as revBankType,
'10' as currency,
'' as busType,
'202' 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_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
) 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="finishedflag != null and finishedflag !='' "> and finishedflag = #{finishedflag} </if>
and 1=1
<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>

View File

@ -99,4 +99,10 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
}
}
}
//获取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>";
}
}

View File

@ -1,7 +1,9 @@
package com.hzya.frame.seeyon.cbs8.service.impl;
import cn.hutool.core.util.StrUtil;
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.IPaymentDao;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
@ -56,7 +58,12 @@ public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implem
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> querySuccess(PaymentEntity entity) throws Exception {
return null;
if (null == entity){
entity = new PaymentEntity();
}
entity.setPayResult(PayState.payStateGetValue("g"));
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base");
return list;
}
/**
@ -69,7 +76,8 @@ public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implem
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> queryElecIsNull(PaymentEntity entity) throws Exception {
return null;
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_elec_isnull");
return list;
}
/**
@ -83,7 +91,8 @@ public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implem
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> queryInPayment(PaymentEntity entity) throws Exception {
return null;
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_in_payment");
return list;
}
/**
@ -95,7 +104,13 @@ public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implem
@DS("#entity.dataSourceCode")
@Override
public void updatePayState(PaymentEntity entity) throws Exception {
if (null != entity
&& StrUtil.isNotEmpty(entity.getTableName())
&& StrUtil.isNotEmpty(entity.getOaId())
&& StrUtil.isNotEmpty(entity.getPayDateField())
&& StrUtil.isNotEmpty(entity.getPayResultField())){
paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_payState",entity);
}
}
/**
@ -107,6 +122,11 @@ public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implem
@DS("#entity.dataSourceCode")
@Override
public void updateElec(PaymentEntity entity) throws Exception {
if (null != entity
&& StrUtil.isNotEmpty(entity.getTableName())
&& StrUtil.isNotEmpty(entity.getOaId())
&& StrUtil.isNotEmpty(entity.getReceiptFiled())){
paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_electronic",entity);
}
}
}