@@ -137,7 +138,7 @@ public interface FailedCardMapper {
...
@@ -137,7 +138,7 @@ public interface FailedCardMapper {
/**
/**
* 根据特证表添加废证
* 根据特证表添加废证
*/
*/
@Select("select SPECIAL_CARD.ACCEPT_NO,SPECIAL_CARD.TASK_ID FROM SPECIAL_CARD 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@PROD_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}")
" WHERE PROD_CARD_T.ID_NO=#{id} or PROD_CARD_T.ACCEPT_NO=#{id}")
"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 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 <=#{process2} 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} and task.work_group = #{workGroup} order by group_no.GROUP_NO")
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n"+
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID = #{process} and task.work_group = #{workGroup} order by SPECIAL_CARD.ACCEPT_NO")
@@ -719,9 +751,25 @@ public interface TaskListMapper {
...
@@ -719,9 +751,25 @@ public interface TaskListMapper {
"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 task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n"+
"left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n"+
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID = #{process} order by SPECIAL_CARD.ACCEPT_NO")
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID = #{process} and task.work_group = #{workGroup} order by SPECIAL_CARD.ACCEPT_NO")
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n"+
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID = #{process} order by SPECIAL_CARD.ACCEPT_NO")
@@ -733,8 +781,8 @@ public interface TaskListMapper {
...
@@ -733,8 +781,8 @@ public interface TaskListMapper {
"0 faileCount from FAILED_CARD left join task on FAILED_CARD.task_id= task.TASK_ID\n"+
"0 faileCount from FAILED_CARD left join task on FAILED_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"+
"where FAILED_CARD.state =#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR order by FAILED_CARD.ACCEPT_NO")
"where FAILED_CARD.state =#{process2} and FAILED_CARD.work_group = #{workGroup} and FAILED_CARD.state != FAILED_CARD.INITIATOR order by FAILED_CARD.ACCEPT_NO")