Commit 4f703127 authored by dahai's avatar dahai

push

parent c9e3a442
...@@ -161,20 +161,25 @@ public interface TaskListMapper { ...@@ -161,20 +161,25 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @return
*/ */
@Select("select DISTINCT sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count, task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\n" + @Select("select DISTINCT 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,\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" + "CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\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" + "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" + "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 task_id, nvl(count(*),0) faileCount from FAILED_CARD group by task_id ) fc \n" + "left join (select task_id, nvl(count(*),0) faileCount from FAILED_CARD \n" +
"group by task_id ) fc \n" +
"on fc.TASK_ID = task.TASK_ID\n" + "on fc.TASK_ID = task.TASK_ID\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_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n" +
"where task.TASK_STATE_ID = #{process} \n" + "left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\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" + "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\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" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \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) order by group_no.GROUP_NO") "nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common2(@Param("process") long process); public List<Map<String,Object>> selectByCountyAtAuxiliary_common2(@Param("process") long process);
/** /**
...@@ -198,7 +203,7 @@ public interface TaskListMapper { ...@@ -198,7 +203,7 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @return
*/ */
@Select("select DISTINCT 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 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" + "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" + "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" + "from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
...@@ -207,10 +212,12 @@ public interface TaskListMapper { ...@@ -207,10 +212,12 @@ public interface TaskListMapper {
"left join prod_trace_t@PROD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\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" + "left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD \n" +
"group by task_id ) fc on fc.TASK_ID = task.TASK_ID\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) " +
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process}\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, \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" + "COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0) order by SPECIAL_CARD.ACCEPT_NO") "nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast2(@Param("process") long process); public List<Map<String,Object>> selectByCountyAtAuxiliary_fast2(@Param("process") long process);
/** /**
...@@ -234,7 +241,7 @@ public interface TaskListMapper { ...@@ -234,7 +241,7 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @return
*/ */
@Select("select DISTINCT 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 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" + "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" + "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" + "from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
...@@ -243,10 +250,12 @@ public interface TaskListMapper { ...@@ -243,10 +250,12 @@ public interface TaskListMapper {
"left join prod_trace_t@PROD_LINK on prod_trace_t.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO\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" + "left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD \n" +
"group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n" + "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} " + "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)" +
" where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process} " +
"group by task.submit_date, SPECIAL_CARD.task_id, '余证', '1', COUNTY_DIC.COUNTY_CODE, \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" + "COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0) order by SPECIAL_CARD.ACCEPT_NO") "nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind2(@Param("process") long process); public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind2(@Param("process") long process);
......
...@@ -614,14 +614,15 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -614,14 +614,15 @@ public class TaskListServiceImpl implements TaskListService {
int specialCount=0; int specialCount=0;
int eWriteCount=0; int eWriteCount=0;
int faileCount=0; int faileCount=0;
String countyName =null; int policeCount =0;
String countyCode =null;
Object submitDate = null; Object submitDate = null;
String policeCode =null;
String policeName = null;
List<Map<String, Object>> countyMapList = mapList.get(taskId); List<Map<String, Object>> countyMapList = mapList.get(taskId);
for (Map<String,Object> countyMap:countyMapList){ for (Map<String,Object> countyMap:countyMapList){
submitDate = countyMap.get("SUBMIT_DATE"); submitDate = countyMap.get("SUBMIT_DATE");
countyCode = countyMap.get("COUNTY_CODE")+""; policeCode = countyMap.get("POLICE_CODE")+"";
countyName = countyMap.get("COUNTYNAME")+""; policeName = countyMap.get("GAMC")+"";
typeName = countyMap.get("CARD_TYPE_ID") + ""; typeName = countyMap.get("CARD_TYPE_ID") + "";
typeSum+=Integer.valueOf(countyMap.get("VALID_COUNT") + ""); typeSum+=Integer.valueOf(countyMap.get("VALID_COUNT") + "");
typeSum-=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + ""); typeSum-=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
...@@ -630,6 +631,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -630,6 +631,7 @@ public class TaskListServiceImpl implements TaskListService {
specialCount+=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + ""); specialCount+=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
faileCount+=Integer.valueOf(countyMap.get("FAILECOUNT") + ""); faileCount+=Integer.valueOf(countyMap.get("FAILECOUNT") + "");
eWriteCount+=Integer.valueOf(countyMap.get("E_WRITER_COUNT") + ""); eWriteCount+=Integer.valueOf(countyMap.get("E_WRITER_COUNT") + "");
policeCount+=Integer.valueOf(countyMap.get("POLICE_COUNT") + "");
} }
if (countyMapList.size()==1){ if (countyMapList.size()==1){
countyMapGroup.put("groupNum",countyMapList.get(0).get("GROUP_NO")); countyMapGroup.put("groupNum",countyMapList.get(0).get("GROUP_NO"));
...@@ -654,20 +656,21 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -654,20 +656,21 @@ public class TaskListServiceImpl implements TaskListService {
} }
countyMapGroup.put("faileCount",faileCount); countyMapGroup.put("faileCount",faileCount);
countyMapGroup.put("specialCount",specialCount); countyMapGroup.put("specialCount",specialCount);
countyMapGroup.put("countyCode",countyCode); countyMapGroup.put("policeCode",policeCode);
countyMapGroup.put("taskId",taskId); countyMapGroup.put("taskId",taskId);
countyMapGroup.put("groupList",countyMapList); countyMapGroup.put("groupList",countyMapList);
countyMapGroup.put("saveDate",submitDate); countyMapGroup.put("saveDate",submitDate);
countyMapGroup.put("countyName",countyName); countyMapGroup.put("policeName",policeName);
countyMapGroup.put("eWriteCount",eWriteCount); countyMapGroup.put("eWriteCount",eWriteCount);
countyMapGroup.put("countyValidCount",validCount); countyMapGroup.put("countyValidCount",validCount);
countyMapGroup.put("countyInvalidCount",invalidCount); countyMapGroup.put("countyInvalidCount",invalidCount);
countyMapGroup.put("policeCount",policeCount);
countyList.add(countyMapGroup); countyList.add(countyMapGroup);
} }
mapType.put("typeCode",typeName); mapType.put("typeCode",typeName);
mapType.put("typeSum",typeSum ); mapType.put("typeSum",typeSum );
mapType.put("typeName", type); mapType.put("typeName", type);
mapType.put("countyList",countyList); mapType.put("policeList",countyList);
typeList.add(mapType); typeList.add(mapType);
} }
return typeList; 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