@@ -33,8 +33,8 @@ public interface CardDetailedListMapper {
*查询详单数据
*/
@Select("select DETAIL_RECEIPT_LIST.*,RECEIPT_LIST.state,PROD_TRACE_T.DOWNLOAD_DATE,PROD_TRACE_T.ELECTRIC_WRITE_DATE,PROD_TRACE_T.CHECK_DATE from DETAIL_RECEIPT_LIST \n"+
"left join PROD_CARD_T@PROD_LINK ON PROD_CARD_T.ID_NO=DETAIL_RECEIPT_LIST.CARD_ID\n"+
"LEFT JOIN PROD_TRACE_T@PROD_LINK ON PROD_TRACE_T.ACCEPT_NO = PROD_CARD_T.ACCEPT_NO\n"+
"left join PROD_CARD_T@PRODYD_LINK ON PROD_CARD_T.ID_NO=DETAIL_RECEIPT_LIST.CARD_ID\n"+
"LEFT JOIN PROD_TRACE_T@PRODYD_LINK ON PROD_TRACE_T.ACCEPT_NO = PROD_CARD_T.ACCEPT_NO\n"+
"left join RECEIPT_LIST on RECEIPT_LIST.id = DETAIL_RECEIPT_LIST.RECEIPT_ID\n"+
"where RECEIPT_ID in (select RECEIPT_ID from DETAIL_RECEIPT_LIST where CARD_ID =#{idCard} )")
@@ -131,7 +131,7 @@ public interface FailedCardMapper {
* 根据身份证号查询是否是特证
*/
@Select("select SPECIAL_CARD_ID from special_card \n"+
"left join prod_card_t@PROD_LINK ON PROD_CARD_T.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\n"+
"left join prod_card_t@PRODYD_LINK ON PROD_CARD_T.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\n"+
" WHERE PROD_CARD_T.ID_NO = #{id} or PROD_CARD_T.ACCEPT_NO=#{id}")
publicStringselectSpecialCard(Stringid);
...
...
@@ -139,7 +139,7 @@ public interface FailedCardMapper {
/**
* 根据特证表添加废证
*/
@Select("select SPECIAL_CARD.ACCEPT_NO,SPECIAL_CARD.TASK_ID,task.work_group FROM SPECIAL_CARD left join task on task.TASK_ID = special_card.TASK_ID LEFT JOIN prod_card_t@PROD_LINK ON PROD_CARD_T.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO"+
@Select("select SPECIAL_CARD.ACCEPT_NO,SPECIAL_CARD.TASK_ID,task.work_group FROM SPECIAL_CARD left join task on task.TASK_ID = special_card.TASK_ID LEFT JOIN prod_card_t@PRODYD_LINK ON PROD_CARD_T.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO"+
" WHERE PROD_CARD_T.ID_NO=#{id} or PROD_CARD_T.ACCEPT_NO=#{id}")
publicMap<String,Object>selectDataById(Stringid);
...
...
@@ -152,9 +152,18 @@ public interface FailedCardMapper {
"left join PROD_CARD_T@prodyd_link on failed_card.ACCEPT_NO = prod_card_t.ACCEPT_NO\n"+
"left join FAILED_CARD_REASON_DIC on failed_card.FAILED_CARD_REASON_ID = FAILED_CARD_REASON_DIC.FAILED_CARD_REASON_ID where name = #{name} and to_char(submit_date,'yyyyMMdd') = #{date}")
@Select("select subStr(ACCEPT_NO,0,8) as groupNo from prod_card_t@PROD_LINK where ID_NO=#{id} and prod_card_t.BEGIN_DATE= #{beginDate} and prod_card_t.EXPIRE_DATE = #{expireDate} ")
@Select("select subStr(ACCEPT_NO,0,8) as groupNo from prod_card_t@PRODYD_LINK where ID_NO=#{id} and prod_card_t.BEGIN_DATE= #{beginDate} and prod_card_t.EXPIRE_DATE = #{expireDate} ")
@Select("select id,CHECK_NAME ,GAJG_DM.GAJG_MC from receipt_list left join GAJG_DM on GAJG_DM.GAJG_DM = receipt_list.POLICE_CODE where QR_CODE=(select accept_no from prod_card_t@prod_link where id_no=#{id} and BEGIN_DATE= #{beginDate} and EXPIRE_DATE = #{expireDate} and receipt_date is null ) ")
@Select("select id,CHECK_NAME ,GAJG_DM.GAJG_MC from receipt_list left join GAJG_DM on GAJG_DM.GAJG_DM = receipt_list.POLICE_CODE where QR_CODE=(select accept_no from prod_card_t@prodYD_LINK where id_no=#{id} and BEGIN_DATE= #{beginDate} and EXPIRE_DATE = #{expireDate} and receipt_date is null ) ")
"WHERE (subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}) and prod_trace_t.accept_no not in (select special_card.accept_no from special_card ) ")
@@ -444,10 +441,10 @@ public interface TaskListMapper {
" where FAILED_CARD.state <= #{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR \n"+
" and accept_no not in (select accept_no from special_card )\n"+
" group by substr(accept_no,0,8) ) fc on fc.accept_no = group_no.group_no \n"+
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n"+
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO "+
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO "+
"left join PROD_GROUP_RELATION_T@PROD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n"+
"left join prod_trace_t@PRODYD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n"+
"left join prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO "+
"left join PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO "+
"left join PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n"+
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n"+
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO "+
"where task.TASK_STATE_ID = #{process} and task.work_group=#{workGroup}\n"+
...
...
@@ -480,10 +477,10 @@ public interface TaskListMapper {
" and accept_no not in (select accept_no from special_card ) \n"+
" group by substr(accept_no,0,8) ) fc \n"+
" on fc.group_no= group_no.group_no \n"+
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO \n"+
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO \n"+
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO \n"+
"left join PROD_GROUP_RELATION_T@PROD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n"+
"left join prod_trace_t@PRODYD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO \n"+
"left join prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO \n"+
"left join PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO \n"+
"left join PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n"+
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) \n"+
"left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO \n"+
"where task.TASK_STATE_ID = #{process} and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) \n"+
...
...
@@ -511,8 +508,8 @@ public interface TaskListMapper {
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n"+
"left join (select accept_no, nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR and accept_no not in (select accept_no from special_card ) \n"+
"group by accept_no ) fc on substr(fc.accept_no,0,8) = group_no.group_no \n"+
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n"+
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n"+
"left join prod_trace_t@PRODYD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n"+
"left join prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n"+
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\n" +
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO "+
"where task.TASK_STATE_ID = #{process}\n"+
...
...
@@ -686,13 +683,13 @@ public interface TaskListMapper {
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n"+
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n"+
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n"+
"left join prod_trace_t@PROD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\n"+
"left join prod_trace_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\n"+
"left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD \n"+
"where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n"+
" left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n"+
" left join prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n"+
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9) " +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) "+
"left join PROD_GROUP_RELATION_T@PROD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no "+
"left join PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) "+
"left join PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no "+
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) "+
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = special_card.accept_no "+
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.work_group=#{workGroup} and task.TASK_STATE_ID =#{process}\n"+
...
...
@@ -713,13 +710,13 @@ public interface TaskListMapper {
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n"+
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n"+
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n"+
"left join prod_trace_t@PROD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\n"+
"left join prod_trace_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\n"+
"left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD \n"+
"where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n"+
" left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n"+
" left join prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n"+
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9) " +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) "+
"left join PROD_GROUP_RELATION_T@PROD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n"+
"left join PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) "+
"left join PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n"+
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n"+
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = special_card.accept_no "+
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process}\n"+
...
...
@@ -744,11 +741,11 @@ public interface TaskListMapper {
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID \n"+
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE \n"+
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE \n"+
"left join prod_trace_t@PROD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO \n"+
"left join prod_trace_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO \n"+
"left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD \n"+
"where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR \n"+
"group by task_id ) fc on fc.TASK_ID = task.TASK_ID \n"+
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO \n"+
"left join prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO \n"+
"left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9) \n"+
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process} \n"+