" from group_no left join task on group_no.task_id= task.TASK_ID\n"+
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\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 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 ) group by accept_no ) fc on substr(fc.accept_no,0,8) = group_no.group_no \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 ) group by accept_no ) fc on substr(fc.accept_no,0,8) = group_no.group_no \n"+
"where task.TASK_STATE_ID = #{process} order by group_no.GROUP_NO")
"where task.TASK_STATE_ID = #{process} "+
"group by '000000000', '000000000', task.submit_date, task.task_id, \n"+
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by group_no.GROUP_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by group_no.GROUP_NO")
" from group_no left join task on group_no.task_id= task.TASK_ID\n"+
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\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 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"+
"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"+
...
@@ -525,7 +534,7 @@ public interface TaskListMapper {
...
@@ -525,7 +534,7 @@ public interface TaskListMapper {
// "and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) " +
// "and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) " +
"group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE,\n"+
"group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE,\n"+
"nvl(fc.faileCount,0),'000000000','000000000',nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),task.work_group order by group_no.GROUP_NO")
"nvl(fc.faileCount,0),'000000000','000000000',nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),task.work_group,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by group_no.GROUP_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n"+
",decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) last_date 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 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 COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n"+
"left join prod_trace_t@PRODYD_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"+
...
@@ -734,7 +747,7 @@ public interface TaskListMapper {
...
@@ -734,7 +747,7 @@ public interface TaskListMapper {
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process}\n"+
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process}\n"+
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, \n"+
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, \n"+
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
",task.work_group,prod_card_t.id_no,prod_card_t.name order by SPECIAL_CARD.ACCEPT_NO")
",task.work_group,prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
",task.work_group,prod_card_t.id_no,prod_card_t.name order by SPECIAL_CARD.ACCEPT_NO")
",task.work_group,prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
",FAILED_CARD.work_group,prod_card_t.id_no,prod_card_t.name order by FAILED_CARD.FAILED_CARD_ID")
",FAILED_CARD.work_group,prod_card_t.id_no,prod_card_t.name,decode(ALLOT_DATE,null,decode(FINISH_DATE,null,decode(FAILED_CARD.POSITION_DATE,null,decode(PRINT_DATE,null,FAILED_CARD.SUBMIT_DATE,PRINT_DATE),FAILED_CARD.POSITION_DATE),FINISH_DATE),ALLOT_DATE) order by FAILED_CARD.FAILED_CARD_ID")