parent
49e216eb0c
commit
068c5a5972
|
@ -118,7 +118,9 @@ public class PayApplyPluginInitializer extends PluginBaseEntity {
|
|||
if (null != taskDetailEntity){
|
||||
//重试标记
|
||||
paymentEntity.setRetryFlag("1");
|
||||
paymentEntity.setReferenceNum(taskDetailEntity.getRootAppBill());
|
||||
//paymentEntity.setReferenceNum(taskDetailEntity.getRootAppBill());
|
||||
JSONObject rootAppPk = JSONObject.parseObject(taskDetailEntity.getRootAppPk());
|
||||
paymentEntity.setFormsonId(rootAppPk.getString("formsonId"));
|
||||
paymentEntity.setTaskDetailId(taskDetailId);
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("根据id:{},查不到记录",taskDetailId);
|
||||
|
|
|
@ -123,6 +123,7 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
|||
cbsLogEntity.setBill_code(Convert.toStr(entity.getReferenceNumNew(),entity.getReferenceNum()));
|
||||
cbsLogEntity.setTab_name_ch(entity.getBillName());
|
||||
cbsLogEntity.setTab_name_en(entity.getTableName());
|
||||
cbsLogEntity.setFormson_id(entity.getFormsonId());
|
||||
Boolean successed = payResponseDTO.getSuccessed();
|
||||
if (successed){
|
||||
cbsLogEntity.setPay_state(PayState.p.getValue());
|
||||
|
|
|
@ -103,7 +103,12 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
|||
String decryptRes = CBSUtil.decrypt(secretResByte);
|
||||
//6、记录系统日志
|
||||
IntegrationTaskLivingDetailsEntity logTask = new IntegrationTaskLivingDetailsEntity();
|
||||
logTask.setRootAppPk(sourceBody.getString("oaId"));
|
||||
String oaId = sourceBody.getString("oaId");
|
||||
String formsonId = sourceBody.getString("formsonId");
|
||||
JSONObject rootAppPk = new JSONObject();
|
||||
rootAppPk.put("oaId",oaId);
|
||||
rootAppPk.put("formsonId",formsonId);
|
||||
logTask.setRootAppPk(rootAppPk.toString());
|
||||
String ferenceNum = Convert.toStr(sourceBody.getString("referenceNumNew"), sourceBody.getString("referenceNum"));
|
||||
logTask.setRootAppBill(ferenceNum);
|
||||
logTask.setPluginId("CBS8PayApplyPlugin");
|
||||
|
|
|
@ -22,6 +22,8 @@ public class CbsLogEntity extends BaseEntity {
|
|||
private String id;
|
||||
//oa单据id
|
||||
private String oa_id;
|
||||
//oa子表id
|
||||
private String formson_id;
|
||||
//oa单据号
|
||||
private String bill_code;
|
||||
//英文表名
|
||||
|
@ -148,4 +150,12 @@ public class CbsLogEntity extends BaseEntity {
|
|||
public void setCbs_apply_code(String cbs_apply_code) {
|
||||
this.cbs_apply_code = cbs_apply_code;
|
||||
}
|
||||
|
||||
public String getFormson_id() {
|
||||
return formson_id;
|
||||
}
|
||||
|
||||
public void setFormson_id(String formson_id) {
|
||||
this.formson_id = formson_id;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<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" />
|
||||
<result property="formson_id" column="formson_id" />
|
||||
<result property="bill_code" column="bill_code" />
|
||||
<result property="tab_name_en" column="tab_name_en" />
|
||||
<result property="tab_name_ch" column="tab_name_ch" />
|
||||
|
@ -26,6 +27,7 @@
|
|||
field0005 as cbs_apply_code,
|
||||
field0006 as bill_code,
|
||||
field0007 as oa_id,
|
||||
field0020 as formson_id,
|
||||
field0008 as tab_name_ch,
|
||||
field0009 as tab_name_en,
|
||||
field0010 as pay_state,
|
||||
|
@ -47,6 +49,7 @@
|
|||
<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="formson_id != null and formson_id !='' "> and field0020 = #{formson_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>
|
||||
|
@ -69,6 +72,7 @@
|
|||
<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="formson_id != null and formson_id !='' "> and field0020 = #{formson_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>
|
||||
|
@ -85,6 +89,7 @@
|
|||
formmain_0232
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="oa_id != null and oa_id !='' "> field0007 = #{oa_id} </if>
|
||||
<if test="formson_id != null and formson_id !='' "> and field0020 = #{formson_id} </if>
|
||||
<if test="id != null and id !='' "> and id = #{id} </if>
|
||||
<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>
|
||||
|
|
|
@ -263,6 +263,7 @@
|
|||
field0070,-- 支付时间
|
||||
field0086-- 支付申请单号
|
||||
FROM formson_0222
|
||||
WHERE field0064 = '-5486592002512828355'-- 是否本次支付
|
||||
GROUP BY
|
||||
formmain_id,
|
||||
field0066,
|
||||
|
@ -300,6 +301,7 @@
|
|||
<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="formsonId != null and formsonId !='' ">and v.formsonId = #{formsonId} </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>
|
||||
|
@ -333,6 +335,7 @@
|
|||
<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="formsonId != null and formsonId !='' ">and v.formsonId = #{formsonId} </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>
|
||||
|
@ -367,6 +370,7 @@
|
|||
<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="formsonId != null and formsonId !='' ">and v.formsonId = #{formsonId} </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>
|
||||
|
@ -381,6 +385,7 @@
|
|||
and v.finishedflag = 1
|
||||
</if>
|
||||
</trim>
|
||||
order by v.oaId,v.sort
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -407,6 +412,7 @@
|
|||
<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="formsonId != null and formsonId !='' ">and v.formsonId = #{formsonId} </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>
|
||||
|
@ -418,6 +424,7 @@
|
|||
or v.payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败'))
|
||||
and v.personalFlag='0'
|
||||
</trim>
|
||||
order by v.oaId,v.sort
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
@ -82,13 +82,15 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
|
|||
String payee = StringUtil.nullConvert(cbsLogEntity.getPayee());
|
||||
String amount = StringUtil.nullConvert(cbsLogEntity.getAmount());
|
||||
String cbs_apply_code = StringUtil.nullConvert(cbsLogEntity.getCbs_apply_code());
|
||||
String formson_id = StringUtil.nullConvert(cbsLogEntity.getFormson_id());
|
||||
//根据oaid判断是否在日志表中存在,如果存在,则更新,如果不存在,则新增
|
||||
CbsLogEntity cbsLogEntityResend=new CbsLogEntity();
|
||||
cbsLogEntityResend.setOa_id(cbsLogEntity.getOa_id());
|
||||
cbsLogEntityResend.setFormson_id(cbsLogEntity.getFormson_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);
|
||||
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,formson_id);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000240007")
|
||||
.put("publicKey","ZJYAorA7JuRDfrVjywcx78BFcqlLwthgXNC65TXxxQMUHuxCe7eDIk+3zDUT+v578prj")//发送者
|
||||
|
@ -195,6 +197,6 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
|
|||
|
||||
//获取xml模板
|
||||
private String getXmlTemplate(){
|
||||
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>";
|
||||
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\"/><column id=\"field0020\" type=\"0\" name=\"OA子表id\" 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><column name=\"OA子表id\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue