Commit 70f3cdbb authored by ad's avatar ad

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

parents 2595600e 28b7f30b
...@@ -476,7 +476,7 @@ public interface TaskListMapper { ...@@ -476,7 +476,7 @@ public interface TaskListMapper {
"left join (\n" + "left join (\n" +
" select substr(accept_no,0,8) group_no, sum(decode(accept_no,null,0,1)) faileCount \n" + " select substr(accept_no,0,8) group_no, sum(decode(accept_no,null,0,1)) faileCount \n" +
" from FAILED_CARD \n" + " from FAILED_CARD \n" +
" where FAILED_CARD.state <4 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" + " and accept_no not in (select accept_no from special_card ) \n" +
" group by substr(accept_no,0,8) ) fc \n" + " group by substr(accept_no,0,8) ) fc \n" +
" on fc.group_no= group_no.group_no \n" + " on fc.group_no= group_no.group_no \n" +
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.*; 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.entity.TaskList.TaskListEntity;
import com.yxproject.start.mapper.GroupNoMapper; import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.SpecialCardMapper; import com.yxproject.start.mapper.SpecialCardMapper;
import com.yxproject.start.mapper.TaskListMapper; import com.yxproject.start.mapper.TaskListMapper;
import com.yxproject.start.service.FailedCardService; import com.yxproject.start.service.FailedCardService;
import com.yxproject.start.service.TaskListService; import com.yxproject.start.service.TaskListService;
import org.apache.commons.collections.ArrayStack;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Service @Service
public class TaskListServiceImpl implements TaskListService { public class TaskListServiceImpl implements TaskListService {
...@@ -37,12 +37,12 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -37,12 +37,12 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @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) { for (String taskId : list) {
switch (process) { switch (process) {
case "3": case "3":
taskListMapper.updateState3(taskId, process, name); taskListMapper.updateState3(taskId, process, name);
taskListMapper.updateState4(taskId, (Long.valueOf(process)+2)+"", name); taskListMapper.updateState4(taskId, (Long.valueOf(process) + 2) + "", name);
break; break;
case "4": case "4":
taskListMapper.updateState4(taskId, process, name); taskListMapper.updateState4(taskId, process, name);
...@@ -61,18 +61,18 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -61,18 +61,18 @@ public class TaskListServiceImpl implements TaskListService {
} }
} }
for (String failedId :failedList){ for (String failedId : failedList) {
FailedCardEntity failedCardEntity = new FailedCardEntity(); FailedCardEntity failedCardEntity = new FailedCardEntity();
failedCardEntity.setFailedCardId(Long.valueOf(failedId)); failedCardEntity.setFailedCardId(Long.valueOf(failedId));
switch (process){ switch (process) {
case "2": case "2":
failedCardEntity.setState((long)1); failedCardEntity.setState((long) 1);
break; break;
case "3": case "3":
failedCardEntity.setState((long)4); failedCardEntity.setState((long) 4);
break; break;
case "6": case "6":
failedCardEntity.setState((long)5); failedCardEntity.setState((long) 5);
break; break;
} }
failedCardService.updateFailedCardState(failedCardEntity); failedCardService.updateFailedCardState(failedCardEntity);
...@@ -82,39 +82,37 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -82,39 +82,37 @@ public class TaskListServiceImpl implements TaskListService {
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @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) { for (String taskId : list) {
taskListMapper.updateState1(taskId, process, name,workGroup); taskListMapper.updateState1(taskId, process, name, workGroup);
} }
return true; return true;
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean updateState2(List<String> failedlist,List<String> list, String process, String name) { public boolean updateState2(List<String> failedlist, List<String> list, String process, String name) {
if ("2".equals(process)){ if ("2".equals(process)) {
for (String taskId : list) { for (String taskId : list) {
taskListMapper.updateState2(taskId, process, name); taskListMapper.updateState2(taskId, process, name);
} }
}else { } else {
for (String taskId : list) { for (String taskId : list) {
taskListMapper.updateState2(taskId, process, name); taskListMapper.updateState2(taskId, process, name);
} }
for (String taskId : list) { 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 failedCardEntity = new FailedCardEntity();
failedCardEntity.setFailedCardId(Long.valueOf(failedId)); failedCardEntity.setFailedCardId(Long.valueOf(failedId));
failedCardEntity.setState((long)1); failedCardEntity.setState((long) 1);
failedCardService.updateFailedCardState(failedCardEntity); failedCardService.updateFailedCardState(failedCardEntity);
} }
return true; return true;
...@@ -135,7 +133,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -135,7 +133,7 @@ public class TaskListServiceImpl implements TaskListService {
for (Map o : maps) { for (Map o : maps) {
// 组合JSON // 组合JSON
if (typeMap != null && typeMap.containsKey(o.get("CARD_TYPE") + "")) { 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); mapList.add(o);
typeMap.put(o.get("CARD_TYPE") + "", mapList); typeMap.put(o.get("CARD_TYPE") + "", mapList);
} else { } else {
...@@ -148,26 +146,26 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -148,26 +146,26 @@ public class TaskListServiceImpl implements TaskListService {
for (String type : typeMap.keySet()) { for (String type : typeMap.keySet()) {
List<Map<String, Object>> mapList = (List<Map<String, Object>>) typeMap.get(type); List<Map<String, Object>> mapList = (List<Map<String, Object>>) typeMap.get(type);
Map<String, Object> typemap = new LinkedHashMap<>(); Map<String, Object> typemap = new LinkedHashMap<>();
int i =0; int i = 0;
for (Map<String, Object> o : mapList) { for (Map<String, Object> o : mapList) {
if (typemap.containsKey(i+"")){ if (typemap.containsKey(i + "")) {
List<Map<String, Object>> maplist = (List<Map<String, Object>>)typemap.get(i+""); List<Map<String, Object>> maplist = (List<Map<String, Object>>) typemap.get(i + "");
if (maplist.size()>=30){ if (maplist.size() >= 30) {
i++; i++;
List<Map<String, Object>> maplist1 = new ArrayList<>(); List<Map<String, Object>> maplist1 = new ArrayList<>();
maplist1.add(o); maplist1.add(o);
typemap.put(i+"", maplist1); typemap.put(i + "", maplist1);
continue; continue;
}else { } else {
maplist.add(o); maplist.add(o);
typemap.put(i+"", maplist); typemap.put(i + "", maplist);
continue; continue;
} }
}else { } else {
List<Map<String, Object>> maplist = new ArrayList<>(); List<Map<String, Object>> maplist = new ArrayList<>();
maplist.add(o); maplist.add(o);
typemap.put(i+"", maplist); typemap.put(i + "", maplist);
continue; continue;
} }
} }
...@@ -180,7 +178,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -180,7 +178,7 @@ public class TaskListServiceImpl implements TaskListService {
String typeName = null; String typeName = null;
List<Map<String, Object>> countyList = new ArrayList<>(); List<Map<String, Object>> countyList = new ArrayList<>();
Map<String, List<Map<String, Object>>> mapList = (Map<String, List<Map<String, Object>>>) typeMap.get(type); 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()) { for (String county : mapList.keySet()) {
Map<String, Object> countyMapGroup = new LinkedHashMap<>(); Map<String, Object> countyMapGroup = new LinkedHashMap<>();
int validCount = 0; int validCount = 0;
...@@ -193,9 +191,9 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -193,9 +191,9 @@ public class TaskListServiceImpl implements TaskListService {
submitDate = countyMap.get("SUBMIT_DATE"); submitDate = countyMap.get("SUBMIT_DATE");
countyName = countyMap.get("COUNTYNAME") + ""; countyName = countyMap.get("COUNTYNAME") + "";
typeName = countyMap.get("CARD_TYPE_ID") + ""; 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") + ""); dealFlag = Long.valueOf(countyMap.get("DEAL_FLAG") + "");
}else { } else {
} }
typeSum += Integer.valueOf(countyMap.get("VALID_COUNT") + ""); typeSum += Integer.valueOf(countyMap.get("VALID_COUNT") + "");
...@@ -229,7 +227,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -229,7 +227,7 @@ public class TaskListServiceImpl implements TaskListService {
countyMapGroup.put("groupList", countyMapList); countyMapGroup.put("groupList", countyMapList);
countyMapGroup.put("saveDate", submitDate); countyMapGroup.put("saveDate", submitDate);
num++; num++;
countyMapGroup.put("id",num); countyMapGroup.put("id", num);
countyMapGroup.put("countyName", countyName); countyMapGroup.put("countyName", countyName);
countyMapGroup.put("countyValidCount", validCount); countyMapGroup.put("countyValidCount", validCount);
countyMapGroup.put("countyInvalidCount", invalidCount); countyMapGroup.put("countyInvalidCount", invalidCount);
...@@ -278,27 +276,27 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -278,27 +276,27 @@ public class TaskListServiceImpl implements TaskListService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public List<Object> selectByCountyAtAuxiliary(long process) { public List<Object> selectByCountyAtAuxiliary(long process) {
List list = new ArrayList(); 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 = formateMap(mapList_common);
list.addAll(formateMap(mapList_fast)); list.addAll(formateMap(mapList_fast));
list.addAll(formateMap(mapList_remaind)); 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 = formateMap5(mapList_common);
list.addAll(formateMap5(mapList_fast)); list.addAll(formateMap5(mapList_fast));
list.addAll(formateMap5(mapList_remaind)); list.addAll(formateMap5(mapList_remaind));
...@@ -318,15 +316,15 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -318,15 +316,15 @@ public class TaskListServiceImpl implements TaskListService {
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @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<Map<String, Object>> list = new ArrayList<>();
list = formateMap(mapList_common); list = formateMap(mapList_common);
...@@ -354,7 +352,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -354,7 +352,7 @@ public class TaskListServiceImpl implements TaskListService {
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @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<>(); List<Map<String, Object>> list = new ArrayList<>();
//电写入 //电写入
// if (process==4){ // if (process==4){
...@@ -375,13 +373,13 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -375,13 +373,13 @@ public class TaskListServiceImpl implements TaskListService {
// }else { // }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 = formateMap2(mapList_common);
list.addAll(formateMap2(mapList_fast)); list.addAll(formateMap2(mapList_fast));
...@@ -425,13 +423,13 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -425,13 +423,13 @@ public class TaskListServiceImpl implements TaskListService {
// }else { // }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 = formateMap2(mapList_common);
list.addAll(formateMap2(mapList_fast)); list.addAll(formateMap2(mapList_fast));
...@@ -454,7 +452,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -454,7 +452,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return * @return
*/ */
@Override @Override
public List selectHistoryTaskAtAuxiliary(long process, String date,String workGroup) { public List selectHistoryTaskAtAuxiliary(long process, String date, String workGroup) {
int pro = (int) process; int pro = (int) process;
List<Map<String, Object>> mapList = new ArrayList<>(); List<Map<String, Object>> mapList = new ArrayList<>();
switch (pro) { switch (pro) {
...@@ -484,17 +482,17 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -484,17 +482,17 @@ public class TaskListServiceImpl implements TaskListService {
//查询历史任务单 废证 //查询历史任务单 废证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed2(date)); mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed2(date));
break; break;
case 3: // case 3:
//查询历史任务单 大批证 // //查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common3(date); // mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common3(date);
//查询历史任务单 快证 // //查询历史任务单 快证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast3(date)); // mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_fast3(date));
//查询历史任务单 余证 // //查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind3(date)); // mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind3(date));
//查询历史任务单 废证 // //查询历史任务单 废证
// mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed3(date)); //// mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed3(date));
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date,workGroup)); // mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date, workGroup));
break; // break;
case 4: case 4:
//查询历史任务单 大批证 //查询历史任务单 大批证
mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common4(date); mapList = taskListMapper.selectHistoryTaskAtAuxiliary_common4(date);
...@@ -503,18 +501,18 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -503,18 +501,18 @@ public class TaskListServiceImpl implements TaskListService {
//查询历史任务单 余证 //查询历史任务单 余证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind4(date)); mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_remaind4(date));
//查询历史任务单 废证 //查询历史任务单 废证
mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date,workGroup)); mapList.addAll(taskListMapper.selectHistoryTaskAtAuxiliary_failed4(date, workGroup));
break; 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; break;
default: default:
break; break;
...@@ -559,7 +557,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -559,7 +557,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return * @return
*/ */
@Override @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); return taskListMapper.selectGroupAtACCUByCountyCode(date, typeCode, countyCode);
} }
...@@ -571,7 +569,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -571,7 +569,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return * @return
*/ */
@Override @Override
public List<Map<String,Object>> selectGroupAtACCU(String groupNo) { public List<Map<String, Object>> selectGroupAtACCU(String groupNo) {
return groupNoMapper.selectGroupAtACCUByGroupNo(groupNo); return groupNoMapper.selectGroupAtACCUByGroupNo(groupNo);
} }
...@@ -595,7 +593,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -595,7 +593,7 @@ public class TaskListServiceImpl implements TaskListService {
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @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); Map<String, Object> stringObjectMap = list.get(0);
TaskEntity taskEntity = new TaskEntity(); TaskEntity taskEntity = new TaskEntity();
taskEntity.setCardType(Long.valueOf(stringObjectMap.get("CARD_TYPE_ID") + "")); taskEntity.setCardType(Long.valueOf(stringObjectMap.get("CARD_TYPE_ID") + ""));
...@@ -704,75 +702,76 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -704,75 +702,76 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
public List<Map<String, Object>> selectFilmReport(String startDate, String endDate) { public List<Map<String, Object>> selectFilmReport(String startDate, String endDate) {
List<Map<String, Object>> mapList = taskListMapper.selectFilmReport(startDate, endDate); List<Map<String, Object>> mapList = taskListMapper.selectFilmReport(startDate, endDate);
Map<String,Object> dateMap = new LinkedHashMap<>(); Map<String, Object> dateMap = new LinkedHashMap<>();
for (Map<String,Object> map :mapList){ for (Map<String, Object> map : mapList) {
if (dateMap.containsKey(map.get("PRINT_OUT_DATE")+"")){ if (dateMap.containsKey(map.get("PRINT_OUT_DATE") + "")) {
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(map.get("PRINT_OUT_DATE")+""); List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(map.get("PRINT_OUT_DATE") + "");
dateList.add(map); dateList.add(map);
dateMap.put(map.get("PRINT_OUT_DATE")+"",dateList); dateMap.put(map.get("PRINT_OUT_DATE") + "", dateList);
}else{ } else {
List<Map<String,Object>> dateList = new ArrayList(); List<Map<String, Object>> dateList = new ArrayList();
dateList.add(map); 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 failedCount = 0;
int pu =0; int pu = 0;
int kuai=0; int kuai = 0;
int jun =0; int jun = 0;
int you = 0; int you = 0;
for (String date :dateMap.keySet()){ for (String date : dateMap.keySet()) {
Map<String,Object> datemap=new LinkedHashMap<>(); Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date",date); datemap.put("date", date);
datemap.put("pu",0); datemap.put("pu", 0);
datemap.put("you",0); datemap.put("you", 0);
datemap.put("kuai",0); datemap.put("kuai", 0);
datemap.put("jun",0); datemap.put("jun", 0);
datemap.put("fei",0); datemap.put("fei", 0);
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(date); List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(date);
if (dateList!= null){ if (dateList != null) {
for (Map<String,Object> map :dateList){ for (Map<String, Object> map : dateList) {
datemap.put("fei",(map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()) ); datemap.put("fei", (map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()));
if ("0".equals(map.get("CARD_TYPE_ID")+"")){ if ("0".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
pu+=valid_count; pu += valid_count;
datemap.put("pu",valid_count); datemap.put("pu", valid_count);
}else if ("1".equals(map.get("CARD_TYPE_ID")+"")){ } else if ("1".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
kuai+=valid_count; kuai += valid_count;
datemap.put("kuai",valid_count); datemap.put("kuai", valid_count);
}else if ("6".equals(map.get("CARD_TYPE_ID")+"")){ } else if ("6".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
jun+=valid_count; jun += valid_count;
datemap.put("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(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
you+=valid_count; you += valid_count;
datemap.put("you",valid_count); datemap.put("you", valid_count);
}else { } else {
} }
} }
} }
failedCount+=Integer.valueOf(datemap.get("fei")+""); failedCount += Integer.valueOf(datemap.get("fei") + "");
list.add(datemap); list.add(datemap);
} }
Map<String,Object> datemap=new LinkedHashMap<>(); Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date","合计"); datemap.put("date", "合计");
datemap.put("pu",pu); datemap.put("pu", pu);
datemap.put("you",you); datemap.put("you", you);
datemap.put("kuai",kuai); datemap.put("kuai", kuai);
datemap.put("jun",jun); datemap.put("jun", jun);
datemap.put("fei",failedCount); datemap.put("fei", failedCount);
list.add(datemap); list.add(datemap);
return list; return list;
} }
/** /**
* 查询工作组报表 * 查询工作组报表
*
* @param startDate 开始时间 * @param startDate 开始时间
* @param endDate 结束时间 * @param endDate 结束时间
* @param workGroup 工作组 * @param workGroup 工作组
...@@ -781,69 +780,69 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -781,69 +780,69 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
public List<Map<String, Object>> selectWorkGroupReport(String startDate, String endDate, String workGroup) { public List<Map<String, Object>> selectWorkGroupReport(String startDate, String endDate, String workGroup) {
List<Map<String, Object>> mapList = taskListMapper.selectWorkGroupReport(startDate, endDate, workGroup); List<Map<String, Object>> mapList = taskListMapper.selectWorkGroupReport(startDate, endDate, workGroup);
Map<String,Object> dateMap = new LinkedHashMap<>(); Map<String, Object> dateMap = new LinkedHashMap<>();
for (Map<String,Object> map :mapList){ for (Map<String, Object> map : mapList) {
if (dateMap.containsKey(map.get("PUNCHING_DATE")+"")){ if (dateMap.containsKey(map.get("PUNCHING_DATE") + "")) {
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(map.get("PUNCHING_DATE")+""); List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(map.get("PUNCHING_DATE") + "");
dateList.add(map); dateList.add(map);
dateMap.put(map.get("PUNCHING_DATE")+"",dateList); dateMap.put(map.get("PUNCHING_DATE") + "", dateList);
}else{ } else {
List<Map<String,Object>> dateList = new ArrayList(); List<Map<String, Object>> dateList = new ArrayList();
dateList.add(map); 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 failedCount = 0;
int pu =0; int pu = 0;
int kuai=0; int kuai = 0;
int jun =0; int jun = 0;
int you = 0; int you = 0;
for (String date :dateMap.keySet()){ for (String date : dateMap.keySet()) {
Map<String,Object> datemap=new LinkedHashMap<>(); Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date",date); datemap.put("date", date);
datemap.put("pu",0); datemap.put("pu", 0);
datemap.put("you",0); datemap.put("you", 0);
datemap.put("kuai",0); datemap.put("kuai", 0);
datemap.put("jun",0); datemap.put("jun", 0);
datemap.put("fei",0); datemap.put("fei", 0);
List<Map<String,Object>> dateList=(List<Map<String,Object>>)dateMap.get(date); List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(date);
if (dateList!= null){ if (dateList != null) {
for (Map<String,Object> map :dateList){ for (Map<String, Object> map : dateList) {
datemap.put("fei",(map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()) ); datemap.put("fei", (map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()));
if ("0".equals(map.get("CARD_TYPE_ID")+"")){ if ("0".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
pu+=valid_count; pu += valid_count;
datemap.put("pu",valid_count); datemap.put("pu", valid_count);
}else if ("1".equals(map.get("CARD_TYPE_ID")+"")){ } else if ("1".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
kuai+=valid_count; kuai += valid_count;
datemap.put("kuai",valid_count); datemap.put("kuai", valid_count);
}else if ("6".equals(map.get("CARD_TYPE_ID")+"")){ } else if ("6".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
jun+=valid_count; jun += valid_count;
datemap.put("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(); long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
you+=valid_count; you += valid_count;
datemap.put("you",valid_count); datemap.put("you", valid_count);
}else { } else {
} }
} }
} }
failedCount+=Integer.valueOf(datemap.get("fei")+""); failedCount += Integer.valueOf(datemap.get("fei") + "");
list.add(datemap); list.add(datemap);
} }
Map<String,Object> datemap=new LinkedHashMap<>(); Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date","合计"); datemap.put("date", "合计");
datemap.put("pu",pu); datemap.put("pu", pu);
datemap.put("you",you); datemap.put("you", you);
datemap.put("kuai",kuai); datemap.put("kuai", kuai);
datemap.put("jun",jun); datemap.put("jun", jun);
datemap.put("fei",failedCount); datemap.put("fei", failedCount);
list.add(datemap); list.add(datemap);
return list; return list;
} }
...@@ -855,43 +854,43 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -855,43 +854,43 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
public String selectCountSubmit(String date) { public String selectCountSubmit(String date) {
String count1= taskListMapper.selectCountSubmit(date); String count1 = taskListMapper.selectCountSubmit(date);
return count1; return count1;
} }
@Override @Override
public String selectCountSubmit2(String date) { public String selectCountSubmit2(String date) {
String count2= taskListMapper.selectCountSubmit2(date); String count2 = taskListMapper.selectCountSubmit2(date);
return count2; return count2;
} }
@Override @Override
public String selectCountIssue(String date) { public String selectCountIssue(String date) {
String count1= taskListMapper.selectCountIssue(date); String count1 = taskListMapper.selectCountIssue(date);
return count1; return count1;
} }
@Override @Override
public String selectCountIssue2(String date) { public String selectCountIssue2(String date) {
String count2=taskListMapper.selectCountIssue2(date); String count2 = taskListMapper.selectCountIssue2(date);
return count2; return count2;
} }
@Override @Override
public String selectCountPrintOut(String date) { public String selectCountPrintOut(String date) {
String count1=taskListMapper.selectCountPrintOut(date); String count1 = taskListMapper.selectCountPrintOut(date);
return count1; return count1;
} }
@Override @Override
public String selectCountPrintOut2(String date) { public String selectCountPrintOut2(String date) {
String count2=taskListMapper.selectCountPrintOut2(date); String count2 = taskListMapper.selectCountPrintOut2(date);
return count2; return count2;
} }
@Override @Override
public String selectCountPosition(String date) { public String selectCountPosition(String date) {
String count1=taskListMapper.selectCountPosition(date); String count1 = taskListMapper.selectCountPosition(date);
return count1; return count1;
} }
...@@ -903,13 +902,13 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -903,13 +902,13 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
public String selectCountConcora(String date) { public String selectCountConcora(String date) {
String count1=taskListMapper.selectCountConcora(date); String count1 = taskListMapper.selectCountConcora(date);
return count1; return count1;
} }
@Override @Override
public String selectCountConcora2(String date) { public String selectCountConcora2(String date) {
String count2=taskListMapper.selectCountConcora2(date); String count2 = taskListMapper.selectCountConcora2(date);
return null; return null;
} }
...@@ -921,31 +920,31 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -921,31 +920,31 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
public String selectCountPunching2(String date) { public String selectCountPunching2(String date) {
String count2=taskListMapper.selectCountPunching2(date); String count2 = taskListMapper.selectCountPunching2(date);
return count2; return count2;
} }
@Override @Override
public String selectCountSorting(String date) { public String selectCountSorting(String date) {
String count1=taskListMapper.selectCountSorting(date); String count1 = taskListMapper.selectCountSorting(date);
return count1; return count1;
} }
@Override @Override
public String selectCountSorting2(String date) { public String selectCountSorting2(String date) {
String count2=taskListMapper.selectCountSorting2(date); String count2 = taskListMapper.selectCountSorting2(date);
return count2; return count2;
} }
@Override @Override
public String selectCountQuality(String date) { public String selectCountQuality(String date) {
String count1=taskListMapper.selectCountQuality(date); String count1 = taskListMapper.selectCountQuality(date);
return count1; return count1;
} }
@Override @Override
public String selectCountQuality2(String date) { public String selectCountQuality2(String date) {
String count2= taskListMapper.selectCountQuality2(date); String count2 = taskListMapper.selectCountQuality2(date);
return count2; return count2;
} }
...@@ -994,7 +993,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -994,7 +993,7 @@ public class TaskListServiceImpl implements TaskListService {
for (Map o : maplist) { for (Map o : maplist) {
// 组合JSON // 组合JSON
if (typeMap != null & typeMap.containsKey(o.get("CARD_TYPE") + "")) { 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); mapList.add(o);
typeMap.put(o.get("CARD_TYPE") + "", mapList); typeMap.put(o.get("CARD_TYPE") + "", mapList);
} else { } else {
...@@ -1151,11 +1150,11 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -1151,11 +1150,11 @@ public class TaskListServiceImpl implements TaskListService {
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") + "");
//工位类型总数减去废证数 //工位类型总数减去废证数
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") + ""); validCount += Integer.valueOf(countyMap.get("VALID_COUNT") + "");
invalidCount += Integer.valueOf(countyMap.get("INVALID_COUNT") + ""); invalidCount += Integer.valueOf(countyMap.get("INVALID_COUNT") + "");
specialCount += Integer.valueOf(countyMap.get("SPECIAL_CARD_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") + ""); eWriteCount += Integer.valueOf(countyMap.get("E_WRITER_COUNT") + "");
recheckCount += Integer.valueOf(countyMap.get("FINISH_COUNT") + ""); recheckCount += Integer.valueOf(countyMap.get("FINISH_COUNT") + "");
checkCount += Integer.valueOf(countyMap.get("CHECK_COUNT") + ""); checkCount += Integer.valueOf(countyMap.get("CHECK_COUNT") + "");
...@@ -1406,7 +1405,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -1406,7 +1405,7 @@ public class TaskListServiceImpl implements TaskListService {
countyMapGroup.put("countyName", countyName); countyMapGroup.put("countyName", countyName);
countyMapGroup.put("countyValidCount", validCount); countyMapGroup.put("countyValidCount", validCount);
countyMapGroup.put("countyInvalidCount", invalidCount); countyMapGroup.put("countyInvalidCount", invalidCount);
countyMapGroup.put("workGroup",workGroup); countyMapGroup.put("workGroup", workGroup);
countyList.add(countyMapGroup); countyList.add(countyMapGroup);
} }
mapType.put("typeCode", typeName); mapType.put("typeCode", typeName);
...@@ -1507,7 +1506,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -1507,7 +1506,7 @@ public class TaskListServiceImpl implements TaskListService {
countyMapGroup.put("countyName", countyName); countyMapGroup.put("countyName", countyName);
countyMapGroup.put("countyValidCount", validCount); countyMapGroup.put("countyValidCount", validCount);
countyMapGroup.put("countyInvalidCount", invalidCount); countyMapGroup.put("countyInvalidCount", invalidCount);
countyMapGroup.put("recheckCount",recheckCount); countyMapGroup.put("recheckCount", recheckCount);
countyList.add(countyMapGroup); countyList.add(countyMapGroup);
} }
mapType.put("typeCode", typeName); mapType.put("typeCode", typeName);
......
...@@ -959,8 +959,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -959,8 +959,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
url: "../exportExcel/printReceiptExcelData", url: "../exportExcel/printReceiptExcelData",
data: body, data: body,
headers: {'Content-Type': 'application/json'} headers: {'Content-Type': 'application/json'}
// transformRequest: angular.identity,
// responseType:'arraybuffer'
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
}) })
......
<div class="content row"> <div class="content row">
<div class="col-md-12" style="margin-top:20px;"> <div class="col-md-12" style="margin-top:20px;">
<div class="row"> <div class="row">
<!-- /.col --> <!-- /.col -->
...@@ -147,4 +147,87 @@ ...@@ -147,4 +147,87 @@
</div> </div>
</div> </div>
</div> </div>
<div id="divPrint">
<div class="title" style="text-align: center;">
北京市公安局证件制作管理中心交接岗位<br />
身份证交接单</div>
<div>交接日期:{{receitpDataToPrint.date}}</div>
<div>送至:</div>
<table cellpadding="0" cellspacing="0" border="1" style="text-align: center;">
<thead>
<tr>
<th width="60">
序号
</th>
<th width="130">
身份证受理组号
</th>
<th colspan="2">
身份证所属派出所名称
</th>
<th width="80">
数量
</th>
<th width="145">
备注
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in receitpDataToPrint.list">
<td width="60">
{{$index+1}}
</td>
<td width="130">
{{item.QR_CODE}}
</td>
<td colspan="2" style="text-align: left;">
异地居民身份证{{item.COUNTYNAME}}{{item.GAJG_MC}}
</td>
<td width="80">
{{item.FINISH_COUNT}}
</td>
<td width="145">
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2" class="center">
合计
</td>
<td colspan="2">
</td>
<td class="center">
{{receitpDataToPrint.total}}
</td>
<td>
</td>
</tr>
<tr>
<td colspan="3" style="height: 110px;">
<div class="sign">
交付人(签字):</div>
<br />
<br />
<br />
<br />
<div class="signdate">
日期:</div>
</td>
<td colspan="3" style="height: 110px;">
<div class="sign">
接收人(签字):</div>
<br />
<br />
<br />
<br />
<div class="signdate">
日期:</div>
</td>
</tr>
</tfoot>
</table>
</div>
...@@ -117,7 +117,7 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -117,7 +117,7 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
} }
} }
} }
var iRadioValue=1;
$scope.printReceitp = function(typeCode) { $scope.printReceitp = function(typeCode) {
var startDate=$('#datepicker1').val(); var startDate=$('#datepicker1').val();
var endDate=$('#datepicker2').val(); var endDate=$('#datepicker2').val();
...@@ -135,14 +135,37 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -135,14 +135,37 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
} }
console.log(json) console.log(json)
HttpService.printReceitpData(json,function (data) { HttpService.printReceitpData(json,function (data) {
console.log(data) $scope.receitpDataToPrint = data;
// var blob = new Blob([data], {type: "application/vnd.ms-excel"}); $timeout(function () {
// var a = document.createElement("a"); var LODOP = getLodop();
// document.body.appendChild(a); LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", "");
// a.href = URL.createObjectURL(blob); //初始化
// // a.download = fileName; LODOP.PRINT_INIT("打印交接单");
// a.click(); LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
LODOP.ADD_PRINT_TEXT(10, 0, "100%", 20, "北京市公安局证件制作管理中心交接岗位");
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.ADD_PRINT_TEXT(35, 0, "100%", 20, "身份证交接单");
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.ADD_PRINT_TEXT(70, 30, "100%", 20, "交接日期:"+$scope.receitpDataToPrint.date);
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 1);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
LODOP.ADD_PRINT_TEXT(90, 30, "100%", 20, "送至:");
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 1);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
LODOP.ADD_PRINT_TABLE(110, 3, 740, "100%", document.getElementById("divPrint").innerHTML);
LODOP.SET_PRINT_STYLEA(0, "HOrient", 2);
LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
LODOP.PREVIEW();
// LODOP.PRINT();
})
}) })
} }
}); });
\ No newline at end of file
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<table class="table table-hover postTable"> <table class="table table-hover postTable">
<thead> <thead>
<tr> <tr>
<th ng-if="2">打印日期</th> <th ng-if="state==2">打印日期</th>
<th ng-if="3">预定位日期</th> <th ng-if="state==3">预定位日期</th>
<th>大批证</th> <th>大批证</th>
<th>邮寄证</th> <th>邮寄证</th>
<th>军人证</th> <th>军人证</th>
......
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