Commit 0e997d71 authored by dahai's avatar dahai

push

parent f7fed07e
......@@ -569,11 +569,11 @@ public interface TaskListMapper {
/**
* 任务单查询
* 辅助库、制证库 快证
* 辅助库、制证库 快证 分拣
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9) police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount\n" +
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
......@@ -591,6 +591,35 @@ public interface TaskListMapper {
"nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast2(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
* 辅助库、制证库 快证 电写入
* @param process 工序
* @return
*/
@Select("select DISTINCT 0 finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,\n" +
"substr(prod_card_t.upload_no,0,9) police_code ,GAJG_DM.GAJG_MC,\n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, \n" +
"SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT, \n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount \n" +
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD \n" +
"where FAILED_CARD.state <=#{process2} 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 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" +
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,0 \n" +
"order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast3(@Param("process") long process,@Param("process2") long process2);
/**
* 循环单查询
* 辅助库 余证
......@@ -833,7 +862,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9) police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount\n" +
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
......@@ -851,6 +880,32 @@ public interface TaskListMapper {
"nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind2(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
* 辅助库、制证库 余证
* @param process 工序
* @return
*/
@Select("select DISTINCT 0 finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,\n" +
"substr(prod_card_t.upload_no,0,9) police_code ,GAJG_DM.GAJG_MC,\n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, \n" +
"SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT, \n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount \n" +
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD \n" +
"where FAILED_CARD.state <=#{process2} 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 GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9) \n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID =#{process} \n" +
"group by task.submit_date, SPECIAL_CARD.task_id, '余证', '99', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,0 \n" +
"order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind3(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
......
......@@ -320,7 +320,7 @@ public class TaskListServiceImpl implements TaskListService {
/**
* 查询任务单详情
* 辅助库、制证库
* (分拣)
* (电写入 分拣)
*
* @param process 查询工序
* @return
......@@ -328,19 +328,38 @@ public class TaskListServiceImpl implements TaskListService {
@Override
@Transactional(rollbackFor = Exception.class)
public List selectByCountyAtAuxiliary3(long process) {
//查询普通组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common2(process,process-1);
//查询快证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast2(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind2(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed2(process-1);
List<Map<String, Object>> list = new ArrayList<>();
list = formateMap2(mapList_common);
list.addAll(formateMap2(mapList_fast));
list.addAll(formateMap2(mapList_remaind));
list.addAll(formateMap2(mapList_failed));
if (process==4){
//查询普通组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common2(process,process-1);
//查询快证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast3(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind3(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed2(process-1);
list = formateMap2(mapList_common);
list.addAll(formateMap2(mapList_fast));
list.addAll(formateMap2(mapList_remaind));
list.addAll(formateMap2(mapList_failed));
}else {
//查询普通组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common2(process,process-1);
//查询快证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast2(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind2(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed2(process-1);
list = formateMap2(mapList_common);
list.addAll(formateMap2(mapList_fast));
list.addAll(formateMap2(mapList_remaind));
list.addAll(formateMap2(mapList_failed));
}
return list;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment