package com.supwisdom.dlpay.api.dao;
-import com.supwisdom.dlpay.api.domain.TPersondtl;
import com.supwisdom.dlpay.api.domain.TTransactionChkdtl;
import com.supwisdom.dlpay.framework.data.CountAmountBean;
import com.supwisdom.dlpay.framework.data.ExistBean;
@Query("from TTransactionChkdtl t where t.chkfileId=?1 and t.chkresult='uncheck' order by t.recordno ")
List<TTransactionChkdtl> getUncheckTransactionChkdtls(String chkfileId);
- @Query("select count(t.id) as existed from TTransactionChkdtl t where t.chkfileId=?1 and t.chkresult='uncheck' ")
- ExistBean getUncheckCount(String chkfileId);
+ @Query("select count(t.id) as existed from TTransactionChkdtl t where t.chkfileId=?1 and t.chkresult=?2 ")
+ ExistBean getCountByChkresult(String chkfileId, String chkresult);
@Query(value = "select t.refno from TB_PERSONDTL t left join TB_TRANSACTION_CHKDTL a on t.REFNO=a.OTHER_REFNO and a.CHKFILE_ID=:chkfileId " +
" where t.ACCDATE=:accdate and t.SOURCETYPE=:sourcetype and t.status='success' and a.id is null order by t.refno ", nativeQuery = true)
List<String> findLocalMoreDtls(@Param("accdate") String accdate, @Param("sourcetype") String sourcetype, @Param("chkfileId") String chkfileId);
+ @Query("select count(t.id) as existed from TTransactionChkdtl t where t.chkfileId=?1 and t.chkresult<>'equal' and t.chkresult<>'nocharge' ")
+ ExistBean getErrorCount(String chkfileId);
+
+ @Query("from TTransactionChkdtl t where t.chkresult='nocharge' and t.resolved<>'equal' and t.chkfileId=?1 order by t.recordno ")
+ List<TTransactionChkdtl> getNeedRepairChkdtls(String chkfileId);
+
+ @Query("select count(t.id) as existed from TTransactionChkdtl t where t.chkfileId=?1 and t.and t.resolved<>'equal' ")
+ ExistBean getChkdtlNotEqualCount(String chkfileId);
}
* */
public static final String CHKFILE_STATUS_INIT = "init"; //初始化
public static final String CHKFILE_STATUS_UNCHECK = "uncheck"; //待对账
- public static final String CHKFILE_STATUS_finish = "finish"; //对账完成
- public static final String CHKFILE_STATUS_ERROR = "error"; //对账异常
+ public static final String CHKFILE_STATUS_CHECKOUT = "checkout"; //校对完成
+ public static final String CHKFILE_STATUS_FINISH = "finish"; //对账完成
+ public static final String CHKFILE_STATUS_ERROR = "error"; //保存数据异常
/**
* 对账文件结果状态
public static final String CHKFILE_RESULT_NONE = "none"; //未对账 -
public static final String CHKFILE_RESULT_EQUAL = "equal"; //对账一致,平
public static final String CHKFILE_RESULT_UNEQUAL = "unequal"; //对账不一致,不平
+ public static final String CHKFILE_RESULT_ERROR = "error"; //对账明细有异常
/**
* 对账明细状态
public static final String CHKDTL_CHKRESULT_NOCHARGE = "nocharge"; //支付未记账
public static final String CHKDTL_CHKRESULT_DIFF = "diff"; //金额不相等
public static final String CHKDTL_CHKRESULT_ERROR = "error"; //记账日期或支付方式错误
+ public static final String CHKDTL_CHKRESULT_SURPLUS = "surplus"; //本地多余成功流水
/**
* 对账明细解决状态
* */
+ public static final String CHKDTL_RESOLVED_NONE = "none"; //已处理
public static final String CHKDTL_RESOLVED_ADD ="add"; //补账
- public static final String CHKDTL_RESOLVED_PROCESSED = "processed"; //已处理
public static final String CHKDTL_RESOLVED_FAIL = "fail"; //补账失败
public static final String CHKDTL_RESOLVED_EQUAL = "equal"; //一致,相等
public static final String CHKDTL_RESOLVED_HANGUP="hangup"; //挂起