Commit 389638fd authored by dahai's avatar dahai

添加创建、下发、预订位、平压冲切查询历史任务单API

parent bdbc8f36
......@@ -159,20 +159,136 @@ public interface TaskListMapper {
/**
* 任务单查询历史
* 辅助库 大批证
* @param process 工序
* @param date 查询时间
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
// "task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"CARD_TYPE_DIC.CARD_TYPE ,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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" +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where 1= 1 and to_char(SUBMIT_DATE,'yyyyMMdd')= #{date}\n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common0(@Param("date")String date );
/**
* 任务单查询历史
* 辅助库 大批证
* @param date 查询时间
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
"task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"CARD_TYPE_DIC.CARD_TYPE ,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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" +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where 1= 1 and to_char(ISSUED_DATE,'yyyyMMdd')= #{date}\n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common1(@Param("date")String date );
/**
* 任务单查询历史
* 辅助库 大批证
* @param date 查询时间
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
"task.ISSUED_DATE,task.ISSUED_NAME,task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,\n" +
// "task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"CARD_TYPE_DIC.CARD_TYPE ,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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" +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where 1= 1 and to_char(PRINT_OUT_DATE,'yyyyMMdd')= #{date}\n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common2(@Param("date")String date );
/**
* 任务单查询历史
* 辅助库 大批证
* @param date 查询时间
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
"task.ISSUED_DATE,task.ISSUED_NAME,task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,\n" +
// "task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"CARD_TYPE_DIC.CARD_TYPE ,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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" +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where 1= 1 and to_char(POSITION_DATE,'yyyyMMdd')= #{date}\n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common3(@Param("date")String date );
/**
* 任务单查询历史
* 辅助库 大批证
* @param date 查询时间
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
"task.ISSUED_DATE,task.ISSUED_NAME,ask.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
"task.CONCORA_CRUSH_NAME,"+
// TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"CARD_TYPE_DIC.CARD_TYPE ,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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" +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where 1= 1 and to_char(ISSUED_DATE,'yyyyMMdd')= #{date}\n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common4(@Param("date")String date );
/**
* 任务单查询历史
* 辅助库 大批证
* @param date 查询时间
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
"task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
"task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME,CARD_TYPE_DIC.CARD_TYPE ,\n" +
"task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"CARD_TYPE_DIC.CARD_TYPE ,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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" +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where 1=1 #{date}\n" +
"where 1= 1 and to_char(ISSUED_DATE,'yyyyMMdd')= #{date}\n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common(@Param("process") long process,@Param("date")String date );
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common5(@Param("date")String date );
// /**
// * 任务单查询历史
// * 辅助库 大批证
// * @param date 查询时间
// * @return
// */
// @Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
//// "task.ISSUED_DATE,task.ISSUED_NAME,\n" +
//// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
//// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
// "CARD_TYPE_DIC.CARD_TYPE ,\n" +
// "CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
// "group_no.SPECIAL_CARD_COUNT,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" +
// " left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
// "where 1= 1 and to_char(ISSUED_DATE,'yyyyMMdd')= #{date}\n" +
// "order by group_no.GROUP_NO")
// public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_common6(@Param("date")String date );
/**
......@@ -221,34 +337,124 @@ public interface TaskListMapper {
/**
* 任务单查询历史
* 辅助库 快证
* @param process 工序
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
// "task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
" '快证' CARD_TYPE ,\n" +
" '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =2" +
" and SUBMIT_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast0(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 快证
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
" '快证' CARD_TYPE ,\n" +
" '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =2" +
" and ISSUED_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast1(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 快证
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME," +
// "task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
" '快证' CARD_TYPE ,\n" +
" '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =2" +
" and PRINT_OUT_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast2(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 快证
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME," +
// "task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
" '快证' CARD_TYPE ,\n" +
" '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =2" +
" and POSITION_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast3(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 快证
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
"task.CONCORA_CRUSH_NAME," +
// "TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
" '快证' CARD_TYPE ,\n" +
" '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =2" +
" and CONCORA_CRUSH_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast4(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 快证
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
"task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME, '快证' CARD_TYPE ,\n" +
" '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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 " +
" '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =2" +
" <if test='#{process}==1 '> "+
"and ISSUED_DATE =#{date}"+
" </if>" +
" <if test='2 ==#{process}'> "+
"and PRINT_OUT_DATE =#{date}"+
" </if>" +
" <if test='3==#{process} '> "+
"and POSITION_DATE =#{date}"+
" </if>" +
" <if test='4 ==#{process}'> "+
"and CONCORA_CRUSH_DATE =#{date}"+
" </if>" +
" <if test='5==#{process} '> "+
"and PUNCHING_DATE =#{date}"+
" </if>" +
" order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast(@Param("process") long process,@Param("date") String date);
" and PUNCHING_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast5(@Param("date") String date);
// /**
// * 任务单查询历史
// * 辅助库 快证
// * @return
// */
// @Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME, '快证' CARD_TYPE ,\n" +
// " '1' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
// "group_no.SPECIAL_CARD_COUNT,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 " +
// "left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
// "where SPECIAL_CARD.SPECIAL_TYPE =2" +
// " and SUBMIT_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
// public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_fast(@Param("date") String date);
......@@ -291,6 +497,100 @@ public interface TaskListMapper {
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID = #{process} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind(@Param("process") long process);
/**
* 任务单查询历史
* 辅助库 余证
* @param process 工序
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME," +
// "task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"'余证' CARD_TYPE ,\n" +
"'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 " +
" and SUBMIT_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind0(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 余证
* @param process 工序
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"'余证' CARD_TYPE ,\n" +
"'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 " +
" and ISSUED_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind1(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 余证
* @param process 工序
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME," +
// "task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"'余证' CARD_TYPE ,\n" +
"'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 " +
" and PRINT_OUT_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind2(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 余证
* @param process 工序
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME," +
// "task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"'余证' CARD_TYPE ,\n" +
"'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 " +
" and POSITION_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind3(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 余证
* @param process 工序
* @return
*/
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
"task.CONCORA_CRUSH_NAME," +
// "TASK.PUNCHING_DATE,TASK.PUNCHING_NAME," +
"'余证' CARD_TYPE ,\n" +
"'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 " +
" and CONCORA_CRUSH_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind4(@Param("date") String date);
/**
* 任务单查询历史
* 辅助库 余证
......@@ -300,28 +600,31 @@ public interface TaskListMapper {
@Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
"task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME,'余证' CARD_TYPE ,\n" +
"'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,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" +
"'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO GROUP_NO from special_card \n" +
"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 " +
" left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 " +
" <if test='1 ==#{process} '> "+
"and ISSUED_DATE =#{date}"+
" </if>" +
" <if test='2 ==#{process}'> "+
"and PRINT_OUT_DATE =#{date}"+
" </if>" +
" <if test='3==#{process} '> "+
"and POSITION_DATE =#{date}"+
" </if>" +
" <if test='4 ==#{process}'> "+
"and CONCORA_CRUSH_DATE =#{date}"+
" </if>" +
" <if test='5==#{process} '> "+
"and PUNCHING_DATE =#{date}"+
" </if>" +
" order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind(@Param("process") long process ,@Param("date") String date);
" and PUNCHING_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind5(@Param("date") String date);
// /**
// * 任务单查询历史
// * 辅助库 余证
// * @param process 工序
// * @return
// */
// @Select("select task.task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
// "task.PRINT_OUT_DATE,task.PRINT_OUT_NAME,task.POSITION_DATE,task.POSITION_NAME,task.CONCORA_CRUSH_DATE,\n" +
// "task.CONCORA_CRUSH_NAME,TASK.PUNCHING_DATE,TASK.PUNCHING_NAME,'余证' CARD_TYPE ,\n" +
// "'99' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
// "group_no.SPECIAL_CARD_COUNT,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" +
// " left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
// "where SPECIAL_CARD.SPECIAL_TYPE =1 " +
// " and SUBMIT_DATE =#{date} order by SPECIAL_CARD.ACCEPT_NO")
// public List<Map<String,Object>> selectHistoryTaskAtAuxiliary_remaind(@Param("process") long process ,@Param("date") String date);
/**
* 任务单查询
......
......@@ -29,7 +29,7 @@ public interface TaskListService {
public List<Object> selectByCountyAtAuxiliary(long process);
public List<Object> selectHistoryTaskAtAuxiliary(long process,String date);
public List selectHistoryTaskAtAuxiliary(long process,String date);
public Map selectByCountyAtAuxiliary2(long process);
......
......@@ -301,36 +301,66 @@ public class TaskListServiceImpl implements TaskListService {
* @return
*/
@Override
public List<Object> selectHistoryTaskAtAuxiliary(long process, String date) {
String str = "and ";
public List selectHistoryTaskAtAuxiliary(long process, String date) {
String str = "";
int pro = (int)process;
List<Map<String,Object>> mapList = new ArrayList<>();
switch (pro){
case 0:
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common0( date);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast0(str));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind0(str));
break;
case 1:
str =str +" to_char(ISSUED_DATE,'yyyyMMdd')= '"+date+"'";
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common1( date);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast1(str));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind1(str));
break;
case 2:
str =str +" to_char(PRINT_OUT_DATE,'yyyyMMdd')= '"+date+"'";
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common2( date);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast2(str));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind2(str));
break;
case 3:
str =str +" to_char(POSITION_DATE,'yyyyMMdd')= '"+date+"'";
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common3( date);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast3(str));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind3(str));
break;
case 4:
str =str +" to_char(CONCORA_CRUSH_DATE,'yyyyMMdd')= '"+date+"'";
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common4( date);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast4(str));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind4(str));
break;
case 5:
str =str +" to_char(PUNCHING_DATE,'yyyyMMdd')= '"+date+"'";
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common5( date);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast5(str));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind5(str));
break;
default:
break;
}
List<Map<String, Object>> mapList1 = formateMap3(mapList);
//查询历史任务单 大批证
List<Map<String, Object>> mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common(process, str);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast(process,str));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind(process,str));
return null;
return mapList1;
}
/**
......@@ -717,4 +747,102 @@ public class TaskListServiceImpl implements TaskListService {
return typeList;
}
private List<Map<String,Object>> formateMap3(List<Map<String, Object>> maplist){
Map<String,Object> typeMap = new LinkedHashMap<>();
for (Map o :maplist){
// 组合JSON
if (typeMap!=null&typeMap.containsKey(o.get("CARD_TYPE")+"")){
List<Map<String,Object>> mapList= (List<Map<String,Object>>)typeMap.get(o.get("CARD_TYPE"));
mapList.add(o);
typeMap.put(o.get("CARD_TYPE")+"",mapList);
}else {
List<Map<String,Object>> mapList = new ArrayList<>();
mapList.add(o);
typeMap.put(o.get("CARD_TYPE")+"",mapList);
}
}
//将已按制证分好的Map 再次细化分为任务单Map
for (String type:typeMap.keySet()){
List<Map<String,Object>> mapList = (List<Map<String,Object>>)typeMap.get(type);
Map<String,Object> typemap = new LinkedHashMap<>();
for (Map<String,Object> o:mapList){
if (typemap!=null&&typemap.containsKey(o.get("TASK_ID")+"")){
List<Map<String,Object>> maplist_county= (List<Map<String,Object>>)typemap.get(o.get("TASK_ID")+"");
maplist_county.add(o);
typemap.put(o.get("TASK_ID")+"",maplist_county);
}else {
List<Map<String,Object>> maplist_county = new ArrayList<>();
maplist_county.add(o);
typemap.put(o.get("TASK_ID")+"",maplist_county);
}
}
typeMap.put(type,typemap);
}
List<Map<String,Object>> typeList = new ArrayList<>();
for (String type:typeMap.keySet()){
Map<String,Object> mapType = new LinkedHashMap<>();
int typeSum =0;
String typeName=null;
List<Map<String,Object>> countyList = new ArrayList<>();
Map<String,List<Map<String, Object>>> mapList = (Map<String,List<Map<String, Object>>>)typeMap.get(type);
for (String taskId:mapList.keySet()){
Map<String,Object> countyMapGroup= new LinkedHashMap<>();
int validCount =0;
int invalidCount =0;
int specialCount=0;
String countyName =null;
String countyCode =null;
Object submitDate = null;
List<Map<String, Object>> countyMapList = mapList.get(taskId);
for (Map<String,Object> countyMap:countyMapList){
submitDate = countyMap.get("SUBMIT_DATE");
countyCode = countyMap.get("COUNTY_CODE")+"";
countyName = countyMap.get("COUNTYNAME")+"";
typeName = countyMap.get("CARD_TYPE_ID") + "";
typeSum+=Integer.valueOf(countyMap.get("VALID_COUNT") + "");
typeSum-=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
validCount+=Integer.valueOf(countyMap.get("VALID_COUNT") + "");
invalidCount+=Integer.valueOf(countyMap.get("INVALID_COUNT") + "");
specialCount+=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
}
if (countyMapList.size()==1){
countyMapGroup.put("groupNum",countyMapList.get(0).get("GROUP_NO"));
}else {
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if (((( countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(Integer.parseInt(((( countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, ((( countyMapList.get(i)).get("GROUP_NO")) + "").length())));
}
} else {
if (((( countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(Integer.parseInt(((( countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum",createGroupNo(c, nsList));
}
countyMapGroup.put("specialCount",specialCount);
countyMapGroup.put("countyCode",countyCode);
countyMapGroup.put("taskId",taskId);
countyMapGroup.put("policeList",countyMapList);
countyMapGroup.put("saveDate",submitDate);
countyMapGroup.put("countyName",countyName);
countyMapGroup.put("countyValidCount",validCount);
countyMapGroup.put("countyInvalidCount",invalidCount);
countyList.add(countyMapGroup);
}
mapType.put("typeCode",typeName);
mapType.put("typeSum",typeSum );
mapType.put("typeName", type);
mapType.put("countyList",countyList);
typeList.add(mapType);
}
return typeList;
}
}
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