Commit 28b7f30b authored by liboyang's avatar liboyang

Merge remote-tracking branch 'origin/dev' into dev

parents 9cd3a377 b5dd5406
......@@ -235,7 +235,7 @@ public interface TaskListMapper {
"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 ) 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 on substr(fc.accept_no,0,8) = group_no.group_no \n" +
"where task.TASK_STATE_ID = #{process} order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common(@Param("process") long process,@Param("process2") long process2);
......@@ -251,7 +251,7 @@ public interface TaskListMapper {
"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 ) 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 on substr(fc.accept_no,0,8) = group_no.group_no \n" +
"where task.TASK_STATE_ID = #{process} and task.work_group = #{workGroup} order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common4(@Param("process") long process,@Param("process2") long process2,@Param("workGroup") long workGroup);
......@@ -440,8 +440,10 @@ public interface TaskListMapper {
"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 (select substr(accept_no,0,8) accept_no, nvl(sum(decode(accept_no,null,0,1)),0) faileCount from FAILED_CARD \n" +
" where FAILED_CARD.state <= #{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR \n" +
" and accept_no not in (select accept_no from special_card )\n" +
" group by substr(accept_no,0,8) ) fc on fc.accept_no = 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 " +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO " +
......@@ -474,7 +476,7 @@ public interface TaskListMapper {
"left join (\n" +
" select substr(accept_no,0,8) group_no, sum(decode(accept_no,null,0,1)) faileCount \n" +
" from FAILED_CARD \n" +
" where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR \n" +
" where FAILED_CARD.state <=4 and FAILED_CARD.state != FAILED_CARD.INITIATOR \n" +
" and accept_no not in (select accept_no from special_card ) \n" +
" group by substr(accept_no,0,8) ) fc \n" +
" on fc.group_no= group_no.group_no \n" +
......@@ -507,7 +509,7 @@ public interface TaskListMapper {
",task.work_group 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" +
"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 ) \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" +
......@@ -531,7 +533,7 @@ public interface TaskListMapper {
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD 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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR 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} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast(@Param("process") long process,@Param("process2") long process2);
......@@ -546,7 +548,7 @@ public interface TaskListMapper {
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD 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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR 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} and task.work_group = #{workGroup} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast9(@Param("process") long process,@Param("process2") long process2,@Param("workGroup") long workGroup);
......@@ -686,7 +688,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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 PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
......@@ -713,7 +715,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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 PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
......@@ -744,7 +746,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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" +
......@@ -770,7 +772,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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" +
......@@ -792,7 +794,7 @@ public interface TaskListMapper {
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD 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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID = #{process} and task.work_group = #{workGroup} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind9(@Param("process") long process,@Param("process2") long process2,@Param("workGroup") long workGroup);
......@@ -807,7 +809,7 @@ public interface TaskListMapper {
"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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD 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 (select task_id,nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <4 and FAILED_CARD.state != FAILED_CARD.INITIATOR group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n" +
"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("process2") long process2);
......@@ -1063,7 +1065,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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 PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
......@@ -1091,7 +1093,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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 PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
......@@ -1122,7 +1124,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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" +
......@@ -1149,7 +1151,7 @@ public interface TaskListMapper {
"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" +
"where FAILED_CARD.state <4 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" +
......
......@@ -17,7 +17,7 @@ public interface ReceiptService {
public boolean createDetailedList(String UPLOAD_NO,String ACCEPT_NO,String NAME,String CARD_ID,String GAJG_DM,long RECEIPT_ID,String SEX,String signGovt);
public int selectSpecialCard(String GROUP_NO);
// public int selectSpecialCard(String GROUP_NO);
public List<Map<String,Object>> selectByGroupNo(String groupNo);
......@@ -25,7 +25,7 @@ public interface ReceiptService {
public List<Map<String,Object>>selectReceiptListOfSpecialCard (String name);
public Map<String,Object> selectReceiptList(String id);
// public Map<String,Object> selectReceiptList(String id);
public List<Map<String,Object>> selectDetailList(String receiptId);
......@@ -39,7 +39,7 @@ public interface ReceiptService {
public int selectCount(String GROUP_NO);
public boolean updateFinishCount(String GROUP_NO,int count);
// public boolean updateFinishCount(String GROUP_NO,int count);
public List<Map<String,Object>> queryPoliceName(String policeCode);
......
......@@ -41,11 +41,11 @@ public class ReceiptServiceImpl implements ReceiptService {
return true;
}
@Override
public int selectSpecialCard(String GROUP_NO) {
int count = receiptMapper.selectSpecialCard(GROUP_NO);
return count;
}
// @Override
// public int selectSpecialCard(String GROUP_NO) {
// int count = receiptMapper.selectSpecialCard(GROUP_NO);
// return count;
// }
......@@ -67,11 +67,11 @@ public class ReceiptServiceImpl implements ReceiptService {
return resultList;
}
@Override
public Map<String, Object> selectReceiptList(String id) {
Map<String, Object> resultMap = receiptMapper.selectReceiptList(id);
return resultMap;
}
// @Override
// public Map<String, Object> selectReceiptList(String id) {
// Map<String, Object> resultMap = receiptMapper.selectReceiptList(id);
// return resultMap;
// }
@Override
public List<Map<String, Object>> selectDetailList(String receiptId) {
......@@ -96,11 +96,11 @@ public class ReceiptServiceImpl implements ReceiptService {
return count;
}
@Override
public boolean updateFinishCount(String GROUP_NO, int count) {
receiptMapper.updateFinishCount(GROUP_NO,count);
return true;
}
// @Override
// public boolean updateFinishCount(String GROUP_NO, int count) {
// receiptMapper.updateFinishCount(GROUP_NO,count);
// return true;
// }
@Override
public List<Map<String, Object>> selectCountById(String id,String beginDate,String expireDate) {
......
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.*;
import com.yxproject.start.entity.TaskList.CountCountyEntity;
import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.SpecialCardMapper;
import com.yxproject.start.mapper.TaskListMapper;
import com.yxproject.start.service.FailedCardService;
import com.yxproject.start.service.TaskListService;
import org.apache.commons.collections.ArrayStack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Service
public class TaskListServiceImpl implements TaskListService {
......@@ -37,12 +37,12 @@ public class TaskListServiceImpl implements TaskListService {
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateState(List<String> failedList,List<String> list, String process, String name) {
public boolean updateState(List<String> failedList, List<String> list, String process, String name) {
for (String taskId : list) {
switch (process) {
case "3":
taskListMapper.updateState3(taskId, process, name);
taskListMapper.updateState4(taskId, (Long.valueOf(process)+2)+"", name);
taskListMapper.updateState4(taskId, (Long.valueOf(process) + 2) + "", name);
break;
case "4":
taskListMapper.updateState4(taskId, process, name);
......@@ -61,18 +61,18 @@ public class TaskListServiceImpl implements TaskListService {
}
}
for (String failedId :failedList){
for (String failedId : failedList) {
FailedCardEntity failedCardEntity = new FailedCardEntity();
failedCardEntity.setFailedCardId(Long.valueOf(failedId));
switch (process){
switch (process) {
case "2":
failedCardEntity.setState((long)1);
failedCardEntity.setState((long) 1);
break;
case "3":
failedCardEntity.setState((long)4);
failedCardEntity.setState((long) 4);
break;
case "6":
failedCardEntity.setState((long)5);
failedCardEntity.setState((long) 5);
break;
}
failedCardService.updateFailedCardState(failedCardEntity);
......@@ -82,39 +82,37 @@ public class TaskListServiceImpl implements TaskListService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateState1(List<String> failedList,List<String> list, String process, String name,String workGroup) {
public boolean updateState1(List<String> failedList, List<String> list, String process, String name, String workGroup) {
for (String taskId : list) {
taskListMapper.updateState1(taskId, process, name,workGroup);
taskListMapper.updateState1(taskId, process, name, workGroup);
}
return true;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateState2(List<String> failedlist,List<String> list, String process, String name) {
if ("2".equals(process)){
public boolean updateState2(List<String> failedlist, List<String> list, String process, String name) {
if ("2".equals(process)) {
for (String taskId : list) {
taskListMapper.updateState2(taskId, process, name);
}
}else {
} else {
for (String taskId : list) {
taskListMapper.updateState2(taskId, process, name);
}
for (String taskId : list) {
taskListMapper.updateState2(taskId, (Long.valueOf(process)+2)+"", name);
taskListMapper.updateState2(taskId, (Long.valueOf(process) + 2) + "", name);
}
}
for (String failedId :failedlist){
for (String failedId : failedlist) {
FailedCardEntity failedCardEntity = new FailedCardEntity();
failedCardEntity.setFailedCardId(Long.valueOf(failedId));
failedCardEntity.setState((long)1);
failedCardEntity.setState((long) 1);
failedCardService.updateFailedCardState(failedCardEntity);
}
return true;
......@@ -135,7 +133,7 @@ public class TaskListServiceImpl implements TaskListService {
for (Map o : maps) {
// 组合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")+"");
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 {
......@@ -148,26 +146,26 @@ public class TaskListServiceImpl implements TaskListService {
for (String type : typeMap.keySet()) {
List<Map<String, Object>> mapList = (List<Map<String, Object>>) typeMap.get(type);
Map<String, Object> typemap = new LinkedHashMap<>();
int i =0;
int i = 0;
for (Map<String, Object> o : mapList) {
if (typemap.containsKey(i+"")){
List<Map<String, Object>> maplist = (List<Map<String, Object>>)typemap.get(i+"");
if (maplist.size()>=30){
if (typemap.containsKey(i + "")) {
List<Map<String, Object>> maplist = (List<Map<String, Object>>) typemap.get(i + "");
if (maplist.size() >= 30) {
i++;
List<Map<String, Object>> maplist1 = new ArrayList<>();
maplist1.add(o);
typemap.put(i+"", maplist1);
typemap.put(i + "", maplist1);
continue;
}else {
} else {
maplist.add(o);
typemap.put(i+"", maplist);
typemap.put(i + "", maplist);
continue;
}
}else {
} else {
List<Map<String, Object>> maplist = new ArrayList<>();
maplist.add(o);
typemap.put(i+"", maplist);
typemap.put(i + "", maplist);
continue;
}
}
......@@ -180,7 +178,7 @@ public class TaskListServiceImpl implements TaskListService {
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);
int num =0;
int num = 0;
for (String county : mapList.keySet()) {
Map<String, Object> countyMapGroup = new LinkedHashMap<>();
int validCount = 0;
......@@ -193,9 +191,9 @@ public class TaskListServiceImpl implements TaskListService {
submitDate = countyMap.get("SUBMIT_DATE");
countyName = countyMap.get("COUNTYNAME") + "";
typeName = countyMap.get("CARD_TYPE_ID") + "";
if (Long.valueOf(countyMap.get("DEAL_FLAG") + "")<dealFlag){
if (Long.valueOf(countyMap.get("DEAL_FLAG") + "") < dealFlag) {
dealFlag = Long.valueOf(countyMap.get("DEAL_FLAG") + "");
}else {
} else {
}
typeSum += Integer.valueOf(countyMap.get("VALID_COUNT") + "");
......@@ -229,7 +227,7 @@ public class TaskListServiceImpl implements TaskListService {
countyMapGroup.put("groupList", countyMapList);
countyMapGroup.put("saveDate", submitDate);
num++;
countyMapGroup.put("id",num);
countyMapGroup.put("id", num);
countyMapGroup.put("countyName", countyName);
countyMapGroup.put("countyValidCount", validCount);
countyMapGroup.put("countyInvalidCount", invalidCount);
......@@ -278,27 +276,27 @@ public class TaskListServiceImpl implements TaskListService {
@Transactional(rollbackFor = Exception.class)
public List<Object> selectByCountyAtAuxiliary(long process) {
List list = new ArrayList();
if(process==0){
if (process == 0) {
//查询下发状态下的任务单
//查询普通组号列表 在辅助库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common(process,process-2);
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common(process, process - 2);
//查询快证组号列表 在辅助库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast(process,process-2);
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast(process, process - 2);
//查询余证组号列表 在辅助库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind(process,process-2);
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind(process, process - 2);
list = formateMap(mapList_common);
list.addAll(formateMap(mapList_fast));
list.addAll(formateMap(mapList_remaind));
}else {
} else {
//查询膜打印状态下的任务单详情
//查询普通组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common3(process,process-1);
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common3(process, process - 1);
//查询快证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast4(process,process-1);
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast4(process, process - 1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind4(process,process-1);
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind4(process, process - 1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed3(process-1);
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed3(process - 1);
list = formateMap5(mapList_common);
list.addAll(formateMap5(mapList_fast));
list.addAll(formateMap5(mapList_remaind));
......@@ -318,15 +316,15 @@ public class TaskListServiceImpl implements TaskListService {
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Map selectByCountyAtAuxiliary2(long process,String workGroup) {
public Map selectByCountyAtAuxiliary2(long process, String workGroup) {
//查询普通组号列表 在辅助库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common4(process-1,process-1,Long.valueOf(workGroup));
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common4(process - 1, process - 1, Long.valueOf(workGroup));
//查询快证组号列表 在辅助库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast9(process-1,process-1,Long.valueOf(workGroup));
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast9(process - 1, process - 1, Long.valueOf(workGroup));
//查询余证组号列表 在辅助库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind9(process-1,process-1,Long.valueOf(workGroup));
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind9(process - 1, process - 1, Long.valueOf(workGroup));
//查询废证组号列表 在辅助库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed4(process-2,Long.valueOf(workGroup));
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed4(process - 2, Long.valueOf(workGroup));
List<Map<String, Object>> list = new ArrayList<>();
list = formateMap(mapList_common);
......@@ -354,7 +352,7 @@ public class TaskListServiceImpl implements TaskListService {
*/
@Override
@Transactional(rollbackFor = Exception.class)
public List selectByCountyAtAuxiliary3(long process,String workGroup) {
public List selectByCountyAtAuxiliary3(long process, String workGroup) {
List<Map<String, Object>> list = new ArrayList<>();
//电写入
// if (process==4){
......@@ -375,13 +373,13 @@ public class TaskListServiceImpl implements TaskListService {
// }else {
//分拣任务单
//查询普通组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common2(process,process-1, Long.valueOf(workGroup));
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common2(process, process - 1, Long.valueOf(workGroup));
//查询快证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast2(process,process-1, Long.valueOf(workGroup));
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast2(process, process - 1, Long.valueOf(workGroup));
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind2(process,process-1, Long.valueOf(workGroup));
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind2(process, process - 1, Long.valueOf(workGroup));
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed2(process-1, Long.valueOf(workGroup));
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed2(process - 1, Long.valueOf(workGroup));
list = formateMap2(mapList_common);
list.addAll(formateMap2(mapList_fast));
......@@ -425,13 +423,13 @@ public class TaskListServiceImpl implements TaskListService {
// }else {
//分拣任务单
//查询普通组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common5(process,process-1);
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_fast = taskListMapper.selectByCountyAtAuxiliary_fast5(process, process - 1);
//查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind5(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<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed5(process - 1);
list = formateMap2(mapList_common);
list.addAll(formateMap2(mapList_fast));
......@@ -454,7 +452,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return
*/
@Override
public List selectHistoryTaskAtAuxiliary(long process, String date,String workGroup) {
public List selectHistoryTaskAtAuxiliary(long process, String date, String workGroup) {
int pro = (int) process;
List<Map<String, Object>> mapList = new ArrayList<>();
switch (pro) {
......@@ -484,17 +482,17 @@ public class TaskListServiceImpl implements TaskListService {
//查询历史任务单 废证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed2(date));
break;
case 3:
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common3(date);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast3(date));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind3(date));
//查询历史任务单 废证
// mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed3(date));
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date,workGroup));
break;
// case 3:
// //查询历史任务单 大批证
// mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common3(date);
// //查询历史任务单 快证
// mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast3(date));
// //查询历史任务单 余证
// mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind3(date));
// //查询历史任务单 废证
//// mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed3(date));
// mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date, workGroup));
// break;
case 4:
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common4(date);
......@@ -503,18 +501,18 @@ public class TaskListServiceImpl implements TaskListService {
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind4(date));
//查询历史任务单 废证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date,workGroup));
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date, workGroup));
break;
case 5:
case 3:
//查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common5(date,workGroup);
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common5(date, workGroup);
//查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast5(date,workGroup));
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast5(date, workGroup));
//查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind5(date,workGroup));
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind5(date, workGroup));
//查询历史任务单 废证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed5(date,workGroup));
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed5(date, workGroup));
break;
default:
break;
......@@ -559,7 +557,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return
*/
@Override
public List<Map<String,Object>> selectGroupAtACCU(String date, String typeCode, String countyCode) {
public List<Map<String, Object>> selectGroupAtACCU(String date, String typeCode, String countyCode) {
return taskListMapper.selectGroupAtACCUByCountyCode(date, typeCode, countyCode);
}
......@@ -571,7 +569,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return
*/
@Override
public List<Map<String,Object>> selectGroupAtACCU(String groupNo) {
public List<Map<String, Object>> selectGroupAtACCU(String groupNo) {
return groupNoMapper.selectGroupAtACCUByGroupNo(groupNo);
}
......@@ -595,7 +593,7 @@ public class TaskListServiceImpl implements TaskListService {
*/
@Override
@Transactional(rollbackFor = Exception.class)
public boolean saveTask(List<Map<String,Object>> list, String submitName, String process) {
public boolean saveTask(List<Map<String, Object>> list, String submitName, String process) {
Map<String, Object> stringObjectMap = list.get(0);
TaskEntity taskEntity = new TaskEntity();
taskEntity.setCardType(Long.valueOf(stringObjectMap.get("CARD_TYPE_ID") + ""));
......@@ -704,75 +702,76 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public List<Map<String, Object>> selectFilmReport(String startDate, String endDate) {
List<Map<String, Object>> mapList = taskListMapper.selectFilmReport(startDate, endDate);
Map<String,Object> dateMap = new LinkedHashMap<>();
for (Map<String,Object> map :mapList){
if (dateMap.containsKey(map.get("PRINT_OUT_DATE")+"")){
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(map.get("PRINT_OUT_DATE")+"");
Map<String, Object> dateMap = new LinkedHashMap<>();
for (Map<String, Object> map : mapList) {
if (dateMap.containsKey(map.get("PRINT_OUT_DATE") + "")) {
List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(map.get("PRINT_OUT_DATE") + "");
dateList.add(map);
dateMap.put(map.get("PRINT_OUT_DATE")+"",dateList);
}else{
List<Map<String,Object>> dateList = new ArrayList();
dateMap.put(map.get("PRINT_OUT_DATE") + "", dateList);
} else {
List<Map<String, Object>> dateList = new ArrayList();
dateList.add(map);
dateMap.put(map.get("PRINT_OUT_DATE")+"",dateList);
dateMap.put(map.get("PRINT_OUT_DATE") + "", dateList);
}
}
List<Map<String,Object>> list = new ArrayList<>();
List<Map<String, Object>> list = new ArrayList<>();
int failedCount = 0;
int pu =0;
int kuai=0;
int jun =0;
int pu = 0;
int kuai = 0;
int jun = 0;
int you = 0;
for (String date :dateMap.keySet()){
Map<String,Object> datemap=new LinkedHashMap<>();
datemap.put("date",date);
datemap.put("pu",0);
datemap.put("you",0);
datemap.put("kuai",0);
datemap.put("jun",0);
datemap.put("fei",0);
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(date);
if (dateList!= null){
for (Map<String,Object> map :dateList){
datemap.put("fei",(map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()) );
if ("0".equals(map.get("CARD_TYPE_ID")+"")){
for (String date : dateMap.keySet()) {
Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date", date);
datemap.put("pu", 0);
datemap.put("you", 0);
datemap.put("kuai", 0);
datemap.put("jun", 0);
datemap.put("fei", 0);
List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(date);
if (dateList != null) {
for (Map<String, Object> map : dateList) {
datemap.put("fei", (map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()));
if ("0".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
pu+=valid_count;
datemap.put("pu",valid_count);
}else if ("1".equals(map.get("CARD_TYPE_ID")+"")){
pu += valid_count;
datemap.put("pu", valid_count);
} else if ("1".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
kuai+=valid_count;
datemap.put("kuai",valid_count);
}else if ("6".equals(map.get("CARD_TYPE_ID")+"")){
kuai += valid_count;
datemap.put("kuai", valid_count);
} else if ("6".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
jun+=valid_count;
datemap.put("jun",valid_count);
jun += valid_count;
datemap.put("jun", valid_count);
}else if ("9".equals(map.get("CARD_TYPE_ID")+"")){
} else if ("9".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
you+=valid_count;
datemap.put("you",valid_count);
}else {
you += valid_count;
datemap.put("you", valid_count);
} else {
}
}
}
failedCount+=Integer.valueOf(datemap.get("fei")+"");
failedCount += Integer.valueOf(datemap.get("fei") + "");
list.add(datemap);
}
Map<String,Object> datemap=new LinkedHashMap<>();
datemap.put("date","合计");
datemap.put("pu",pu);
datemap.put("you",you);
datemap.put("kuai",kuai);
datemap.put("jun",jun);
datemap.put("fei",failedCount);
Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date", "合计");
datemap.put("pu", pu);
datemap.put("you", you);
datemap.put("kuai", kuai);
datemap.put("jun", jun);
datemap.put("fei", failedCount);
list.add(datemap);
return list;
}
/**
* 查询工作组报表
*
* @param startDate 开始时间
* @param endDate 结束时间
* @param workGroup 工作组
......@@ -781,69 +780,69 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public List<Map<String, Object>> selectWorkGroupReport(String startDate, String endDate, String workGroup) {
List<Map<String, Object>> mapList = taskListMapper.selectWorkGroupReport(startDate, endDate, workGroup);
Map<String,Object> dateMap = new LinkedHashMap<>();
for (Map<String,Object> map :mapList){
if (dateMap.containsKey(map.get("PUNCHING_DATE")+"")){
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(map.get("PUNCHING_DATE")+"");
Map<String, Object> dateMap = new LinkedHashMap<>();
for (Map<String, Object> map : mapList) {
if (dateMap.containsKey(map.get("PUNCHING_DATE") + "")) {
List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(map.get("PUNCHING_DATE") + "");
dateList.add(map);
dateMap.put(map.get("PUNCHING_DATE")+"",dateList);
}else{
List<Map<String,Object>> dateList = new ArrayList();
dateMap.put(map.get("PUNCHING_DATE") + "", dateList);
} else {
List<Map<String, Object>> dateList = new ArrayList();
dateList.add(map);
dateMap.put(map.get("PUNCHING_DATE")+"",dateList);
dateMap.put(map.get("PUNCHING_DATE") + "", dateList);
}
}
List<Map<String,Object>> list = new ArrayList<>();
List<Map<String, Object>> list = new ArrayList<>();
int failedCount = 0;
int pu =0;
int kuai=0;
int jun =0;
int pu = 0;
int kuai = 0;
int jun = 0;
int you = 0;
for (String date :dateMap.keySet()){
Map<String,Object> datemap=new LinkedHashMap<>();
datemap.put("date",date);
datemap.put("pu",0);
datemap.put("you",0);
datemap.put("kuai",0);
datemap.put("jun",0);
datemap.put("fei",0);
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(date);
if (dateList!= null){
for (Map<String,Object> map :dateList){
datemap.put("fei",(map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()) );
if ("0".equals(map.get("CARD_TYPE_ID")+"")){
for (String date : dateMap.keySet()) {
Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date", date);
datemap.put("pu", 0);
datemap.put("you", 0);
datemap.put("kuai", 0);
datemap.put("jun", 0);
datemap.put("fei", 0);
List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(date);
if (dateList != null) {
for (Map<String, Object> map : dateList) {
datemap.put("fei", (map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()));
if ("0".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
pu+=valid_count;
datemap.put("pu",valid_count);
}else if ("1".equals(map.get("CARD_TYPE_ID")+"")){
pu += valid_count;
datemap.put("pu", valid_count);
} else if ("1".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
kuai+=valid_count;
datemap.put("kuai",valid_count);
}else if ("6".equals(map.get("CARD_TYPE_ID")+"")){
kuai += valid_count;
datemap.put("kuai", valid_count);
} else if ("6".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
jun+=valid_count;
datemap.put("jun",valid_count);
jun += valid_count;
datemap.put("jun", valid_count);
}else if ("9".equals(map.get("CARD_TYPE_ID")+"")){
} else if ("9".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
you+=valid_count;
datemap.put("you",valid_count);
}else {
you += valid_count;
datemap.put("you", valid_count);
} else {
}
}
}
failedCount+=Integer.valueOf(datemap.get("fei")+"");
failedCount += Integer.valueOf(datemap.get("fei") + "");
list.add(datemap);
}
Map<String,Object> datemap=new LinkedHashMap<>();
datemap.put("date","合计");
datemap.put("pu",pu);
datemap.put("you",you);
datemap.put("kuai",kuai);
datemap.put("jun",jun);
datemap.put("fei",failedCount);
Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date", "合计");
datemap.put("pu", pu);
datemap.put("you", you);
datemap.put("kuai", kuai);
datemap.put("jun", jun);
datemap.put("fei", failedCount);
list.add(datemap);
return list;
}
......@@ -855,43 +854,43 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public String selectCountSubmit(String date) {
String count1= taskListMapper.selectCountSubmit(date);
String count1 = taskListMapper.selectCountSubmit(date);
return count1;
}
@Override
public String selectCountSubmit2(String date) {
String count2= taskListMapper.selectCountSubmit2(date);
String count2 = taskListMapper.selectCountSubmit2(date);
return count2;
}
@Override
public String selectCountIssue(String date) {
String count1= taskListMapper.selectCountIssue(date);
String count1 = taskListMapper.selectCountIssue(date);
return count1;
}
@Override
public String selectCountIssue2(String date) {
String count2=taskListMapper.selectCountIssue2(date);
String count2 = taskListMapper.selectCountIssue2(date);
return count2;
}
@Override
public String selectCountPrintOut(String date) {
String count1=taskListMapper.selectCountPrintOut(date);
String count1 = taskListMapper.selectCountPrintOut(date);
return count1;
}
@Override
public String selectCountPrintOut2(String date) {
String count2=taskListMapper.selectCountPrintOut2(date);
String count2 = taskListMapper.selectCountPrintOut2(date);
return count2;
}
@Override
public String selectCountPosition(String date) {
String count1=taskListMapper.selectCountPosition(date);
String count1 = taskListMapper.selectCountPosition(date);
return count1;
}
......@@ -903,13 +902,13 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public String selectCountConcora(String date) {
String count1=taskListMapper.selectCountConcora(date);
String count1 = taskListMapper.selectCountConcora(date);
return count1;
}
@Override
public String selectCountConcora2(String date) {
String count2=taskListMapper.selectCountConcora2(date);
String count2 = taskListMapper.selectCountConcora2(date);
return null;
}
......@@ -921,31 +920,31 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public String selectCountPunching2(String date) {
String count2=taskListMapper.selectCountPunching2(date);
String count2 = taskListMapper.selectCountPunching2(date);
return count2;
}
@Override
public String selectCountSorting(String date) {
String count1=taskListMapper.selectCountSorting(date);
String count1 = taskListMapper.selectCountSorting(date);
return count1;
}
@Override
public String selectCountSorting2(String date) {
String count2=taskListMapper.selectCountSorting2(date);
String count2 = taskListMapper.selectCountSorting2(date);
return count2;
}
@Override
public String selectCountQuality(String date) {
String count1=taskListMapper.selectCountQuality(date);
String count1 = taskListMapper.selectCountQuality(date);
return count1;
}
@Override
public String selectCountQuality2(String date) {
String count2= taskListMapper.selectCountQuality2(date);
String count2 = taskListMapper.selectCountQuality2(date);
return count2;
}
......@@ -994,7 +993,7 @@ public class TaskListServiceImpl implements TaskListService {
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")+"");
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 {
......@@ -1151,11 +1150,11 @@ public class TaskListServiceImpl implements TaskListService {
typeSum += Integer.valueOf(countyMap.get("VALID_COUNT") + "");
typeSum -= Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
//工位类型总数减去废证数
typeSum -= Integer.valueOf((("null".equals(countyMap.get("FAILECOUNT")+"")?"0":countyMap.get("FAILECOUNT")+"")));
typeSum -= Integer.valueOf((("null".equals(countyMap.get("FAILECOUNT") + "") ? "0" : countyMap.get("FAILECOUNT") + "")));
validCount += Integer.valueOf(countyMap.get("VALID_COUNT") + "");
invalidCount += Integer.valueOf(countyMap.get("INVALID_COUNT") + "");
specialCount += Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
faileCount += Integer.valueOf((("null".equals(countyMap.get("FAILECOUNT")+"")?"0":countyMap.get("FAILECOUNT")+"")));
faileCount += Integer.valueOf((("null".equals(countyMap.get("FAILECOUNT") + "") ? "0" : countyMap.get("FAILECOUNT") + "")));
eWriteCount += Integer.valueOf(countyMap.get("E_WRITER_COUNT") + "");
recheckCount += Integer.valueOf(countyMap.get("FINISH_COUNT") + "");
checkCount += Integer.valueOf(countyMap.get("CHECK_COUNT") + "");
......@@ -1406,7 +1405,7 @@ public class TaskListServiceImpl implements TaskListService {
countyMapGroup.put("countyName", countyName);
countyMapGroup.put("countyValidCount", validCount);
countyMapGroup.put("countyInvalidCount", invalidCount);
countyMapGroup.put("workGroup",workGroup);
countyMapGroup.put("workGroup", workGroup);
countyList.add(countyMapGroup);
}
mapType.put("typeCode", typeName);
......@@ -1507,7 +1506,7 @@ public class TaskListServiceImpl implements TaskListService {
countyMapGroup.put("countyName", countyName);
countyMapGroup.put("countyValidCount", validCount);
countyMapGroup.put("countyInvalidCount", invalidCount);
countyMapGroup.put("recheckCount",recheckCount);
countyMapGroup.put("recheckCount", recheckCount);
countyList.add(countyMapGroup);
}
mapType.put("typeCode", typeName);
......
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