@Select("select DETAIL_RECEIPT_LIST.* , GAJG_DM.GAJG_MC from DETAIL_RECEIPT_LIST LEFT JOIN GAJG_DM ON GAJG_DM.GAJG_DM =DETAIL_RECEIPT_LIST.POLICE_CODE where ACCEPT_NO=#{acceptNo} or card_id=#{acceptNo}")
@Select("select DETAIL_RECEIPT_LIST.* , GAJG_DM.GAJG_MC from DETAIL_RECEIPT_LIST LEFT JOIN GAJG_DM ON GAJG_DM.GAJG_DM =DETAIL_RECEIPT_LIST.POLICE_CODE where ACCEPT_NO=#{acceptNo} or card_id=#{acceptNo}")
@@ -240,11 +238,10 @@ public interface ReceiptMapper {
...
@@ -240,11 +238,10 @@ public interface ReceiptMapper {
/**
/**
* 更新交接单是否已打印
* 更新交接单是否已打印
* @param string 查询派出所代码
* @param string 查询派出所代码
* @param type 制证类型
* @return
* @return
*/
*/
@Update("update RECEIPT_LIST set IS_PRINT = 1,RECEIPT_DATE = sysdate where RECEIPT_LIST.id in (${string}) and CARD_TYPE_ID=${type} and receipt_date is null")
@Update("update RECEIPT_LIST set IS_PRINT = 1,RECEIPT_DATE = sysdate where RECEIPT_LIST.id in (${string}) and receipt_date is null")
@@ -247,7 +247,9 @@ public interface TaskListMapper {
...
@@ -247,7 +247,9 @@ public interface TaskListMapper {
"from group_no left join task on group_no.task_id= task.TASK_ID\n"+
"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 "+
@@ -447,7 +449,8 @@ public interface TaskListMapper {
...
@@ -447,7 +449,8 @@ public interface TaskListMapper {
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\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 "+
" 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"+
"where task.TASK_STATE_ID = #{process} and task.work_group=#{workGroup}\n"+
"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"+
// "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"+
"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) order by group_no.GROUP_NO")
@@ -512,7 +516,8 @@ public interface TaskListMapper {
...
@@ -512,7 +516,8 @@ public interface TaskListMapper {
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\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 "+
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO "+
"where task.TASK_STATE_ID = #{process}\n"+
"where task.TASK_STATE_ID = #{process}\n"+
"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"+
// "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"+
"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 order by group_no.GROUP_NO")
@@ -1549,12 +1554,13 @@ public interface TaskListMapper {
...
@@ -1549,12 +1554,13 @@ public interface TaskListMapper {
/**
/**
* 查询重做返回登记证件
* 查询重做返回登记证件
* @param date 查询登记时间
* @param startDate 查询登记起始时间
* @param endDate 查询登记结束时间
* @return
* @return
*/
*/
@Select("select * from task left join group_no on task.task_id = group_no.task_id"+
@Select("select * from task left join group_no on task.task_id = group_no.task_id"+
" left join TASK_STATE_DIC on task.TASK_STATE_ID=TASK_STATE_DIC.TASK_STATE_ID where card_type = 2 and to_char(submit_date,'yyyyMMdd') = #{date} order by task.task_id")
" left join TASK_STATE_DIC on task.TASK_STATE_ID=TASK_STATE_DIC.TASK_STATE_ID where card_type = 2 and to_char(submit_date,'yyyyMMdd') between #{startDate} and #{endDate} order by task.task_id")