Commit cf3462ff authored by dahai's avatar dahai

修改查询任务单详情

parent 781fb0dc
......@@ -200,7 +200,7 @@ public class TaskListApi {
/**
* 查询任务单详情
* (辅助库、制证库)
* (电写入、分拣
* (电写入)
*
* @param process 工序
* @param resp
......@@ -212,6 +212,22 @@ public class TaskListApi {
return objects;
}
/**
* 查询任务单详情
* (辅助库、制证库)
* (分拣)
*
* @param process 工序
* @param resp
* @return
*/
@RequestMapping("queryByCountyAtAuxiliaryState4")
public List<Object> queryByCountyAtAuxiliaryState4(@RequestParam("process") String process) {
List<Object> objects = taskListService.selectByCountyAtAuxiliary4(Long.valueOf(process) - 1);
return objects;
}
/**
* 查询任务单详情(历史)
......
......@@ -456,6 +456,34 @@ public interface TaskListMapper {
public List<Map<String,Object>> selectByCountyAtAuxiliary_common2(@Param("process") long process,@Param("process2") long process2,@Param("workGroup") long workGroup);
/**
* 任务单查询
* 辅助库、制证库 大批证
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(*) police_Count,'000000000' police_code ,'000000000' GAJG_MC,\n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,\n" +
"task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, nvl(fc.faileCount,0) faileCount\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 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 ) \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 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" +
"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" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \n" +
"nvl(fc.faileCount,0),'000000000','000000000',nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common5(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
* 辅助库、制证库 大批证
......@@ -690,6 +718,30 @@ 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("workGroup") long workGroup);
/**
* 任务单查询
* 辅助库、制证库 快证 分拣
* @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" +
"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 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) " +
" 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" +
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"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_fast5(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
......@@ -1021,6 +1073,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("workGroup") long workGroup);
/**
* 任务单查询
* 辅助库、制证库 余证
* @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" +
"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 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)" +
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = special_card.accept_no " +
" where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID =#{process} " +
"group by task.submit_date, SPECIAL_CARD.task_id, '余证', '99', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"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_remaind5(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
* 辅助库、制证库 余证 电写入
......@@ -1100,6 +1178,29 @@ public interface TaskListMapper {
"order by FAILED_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_failed2(@Param("process") long process,@Param("workGroup") long workGroup);
/**
* 任务单查询
* 辅助库、制证库 废证
* @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,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,\n" +
"task.submit_date,FAILED_CARD.failed_card_id task_id,'废证' CARD_TYPE,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"FAILED_CARD.ACCEPT_NO group_No, 0 faileCount\n" +
"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 COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"left join prod_trace_t@PROD_LINK on prod_trace_t.ACCEPT_NO = FAILED_CARD.ACCEPT_NO\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 FAILED_CARD.STATE =#{process} and FAILED_CARD.STATE!=FAILED_CARD.INITIATOR \n" +
"group by 0, substr(prod_card_t.upload_no,0,9), GAJG_DM.GAJG_MC, task.submit_date, FAILED_CARD.failed_card_id, \n" +
"'废证', '100', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, FAILED_CARD.ACCEPT_NO, 0\n" +
"order by FAILED_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_failed5(@Param("process") long process);
/**
* 任务单查询
......
......@@ -41,6 +41,8 @@ public interface TaskListService {
public List<Object> selectByCountyAtAuxiliary3(long process,String workGroup);
public List<Object> selectByCountyAtAuxiliary4(long process);
public List<Map<String,Object>> selectGroupAtACCU(String date,String typeCode,String countyCode);
public List<Map<String,Object>> selectGroupAtACCU(String groupNo);
......
......@@ -375,22 +375,22 @@ public class TaskListServiceImpl implements TaskListService {
public List selectByCountyAtAuxiliary3(long process,String workGroup) {
List<Map<String, Object>> list = new ArrayList<>();
//电写入
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);
// 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));
//
// list = formateMap2(mapList_common);
// list.addAll(formateMap2(mapList_fast));
// list.addAll(formateMap2(mapList_remaind));
// list.addAll(formateMap2(mapList_failed));
}else {
// }else {
//分拣任务单
//查询普通组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common2(process,process-1, Long.valueOf(workGroup));
......@@ -405,13 +405,62 @@ public class TaskListServiceImpl implements TaskListService {
list.addAll(formateMap2(mapList_fast));
list.addAll(formateMap2(mapList_remaind));
list.addAll(formateMap2(mapList_failed));
}
// }
return list;
}
/**
* 查询任务单详情
* 辅助库、制证库
* (电写入 分拣)
*
* @param process 查询工序
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public List selectByCountyAtAuxiliary4(long process) {
List<Map<String, Object>> list = new ArrayList<>();
//电写入
// 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_common5(process,process-1);
//查询快证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast5(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind5(process,process-1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed5(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