Commit 8f860029 authored by liboyang's avatar liboyang

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

parents c07dca64 f2385af1
......@@ -20,7 +20,7 @@ import java.util.List;
import java.util.Map;
/**
* 添加废证
* 废证接口
*/
@RestController
@RequestMapping("FailedCardApi")
......@@ -175,7 +175,7 @@ public class FailedCardApi {
JSONObject jsonObject = (JSONObject) jsonarray.get(i);
//查询生成任务单需要的数据
Map<String, Object> dataMap = failedCardService.selectTaskListById(jsonObject.getString("idCard"));
//TODO 会报空指针异常
// TODO 会报空指针异常
String countyCode = dataMap.get("COUNTY_CODE").toString();
Long cardType = (Long) dataMap.get("CARD_TYPE_ID");
taskEntity.setCountyCode(countyCode);
......
......@@ -40,8 +40,8 @@ public class InfoManagementApi {
* @param beginFileId 开始包号
* @param endFileId 结束包号
* @param gajgMc 派出所代码
* @param beginDate
* @param endDate
* @param beginDate 开始时间
* @param endDate 结束时间
* @return
*/
@RequestMapping("selectCount")
......
......@@ -48,10 +48,10 @@ public class LogApi {
/**
* 查询新包生成日志总数
* @param newFileName
* @param cardId
* @param createDate
* @param uploadCountyCode
* @param newFileName 新包名称
* @param cardId 身份证号
* @param createDate 生成日期
* @param uploadCountyCode 上传地市
* @return total
*
*/
......@@ -64,8 +64,8 @@ public class LogApi {
/**
* 查询解析日志
* @param fileName
* @param analysisTime
* @param fileName 文件名称
* @param analysisTime 解析时间
* @return resultList
*/
@RequestMapping("selectByAnalysisLog")
......@@ -77,8 +77,8 @@ public class LogApi {
/**
* 查询解析日志总数
* @param fileName
* @param analysisTime
* @param fileName 文件名称
* @param analysisTime 解析时间
* @return total
*/
@RequestMapping("selectAnalysisLogCount")
......
......@@ -171,14 +171,12 @@ public class ReadExcelApi {
* @param analysisState 解析状态
* @param currPage 当前页
* @param pageSize 每页数量
* @param resp
* @return
*/
@RequestMapping("queryPersonPost")
public String queryPersonPost(@RequestParam("fileName") String fileName,@RequestParam("analysisState") String analysisState,@RequestParam("uploadDate") String uploadDate, @RequestParam("currPage") String currPage,@RequestParam("pageSize") String pageSize, HttpServletResponse resp) {
public String queryPersonPost(@RequestParam("fileName") String fileName,@RequestParam("analysisState") String analysisState,@RequestParam("uploadDate") String uploadDate, @RequestParam("currPage") String currPage,@RequestParam("pageSize") String pageSize) {
List<FileNameDicEntity> fileNameDicEntities = fileNameDicService.queryFileNameDic(replaceDate(uploadDate),replaceNullString(fileName), Long.valueOf(analysisState), Long.valueOf(currPage), Long.valueOf(pageSize));
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(fileNameDicEntities);
return yxjsonResponse.toJSONString();
}
......@@ -187,14 +185,12 @@ public class ReadExcelApi {
* 查询个人邮寄解析信息总数量
* @param fileName 文件名称
* @param analysisState 解析状态
* @param resp
* @return
*/
@RequestMapping("queryPersonPostCount")
public String queryPersonPostCount(@RequestParam("fileName") String fileName,@RequestParam("analysisState") String analysisState,@RequestParam("uploadDate") String uploadDate, HttpServletResponse resp) {
public String queryPersonPostCount(@RequestParam("fileName") String fileName,@RequestParam("analysisState") String analysisState,@RequestParam("uploadDate") String uploadDate) {
int i = fileNameDicService.queryFileNameDicCount(replaceDate(uploadDate),replaceNullString(fileName), Long.valueOf(analysisState));
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(i+"");
return yxjsonResponse.toJSONString();
}
......
......@@ -7,7 +7,6 @@ import com.yxproject.start.service.ImportXmlService;
import com.yxproject.start.utils.IDCardFactory;
import com.yxproject.start.utils.YXJSONResponse;
import com.yxproject.start.utils.YXStringUtils;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.dom4j.DocumentException;
......@@ -63,8 +62,6 @@ public class ReadXmlApi {
// 设置上传文件总量的最大值,最大值=同时上传的多个文件的大小的最大值的和,目前设置为4000MB
upload.setSizeMax(1024 * 1024 * 4000);
// 将普通属性存入map中,之后调用
Map<String, String> map = new HashMap<String, String>();
List<FileItem> list = null;
Date date = new Date();
try {
//将当前上下文初始化给 CommonsMutipartResolver (多部分解析器)
......
package com.yxproject.start.api;
import com.yxproject.start.service.DataAuditingService;
import com.yxproject.start.service.ReceiptService;
import com.yxproject.start.service.TaskListService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -23,6 +23,8 @@ public class ReportApi {
private TaskListService taskListService;
@Autowired
private DataAuditingService dataAuditingService;
@Autowired
private ReceiptService receiptService;
/**
* 查询报表
......@@ -32,10 +34,9 @@ public class ReportApi {
* @return
*/
@RequestMapping("queryDataAuditingReport")
public JSONObject queryDataAuditingReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate) {
List<Map<String, Object>> mapList = dataAuditingService.selectDataAuditingReport(startDate, endDate);
JSONObject resultJson = JSONObject.fromObject(mapList);
return resultJson;
public List<Map<String, Object>> queryDataAuditingReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate) {
List<Map<String, Object>> mapList = dataAuditingService.selectDataAuditingReport(replaceDate(startDate), replaceDate(endDate));
return mapList;
}
/**
......@@ -46,10 +47,9 @@ public class ReportApi {
* @return
*/
@RequestMapping("queryFilmPrintReport")
public JSONObject queryFilmPrintReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate) {
List<Map<String, Object>> mapList = dataAuditingService.selectDataAuditingReport(startDate, endDate);
JSONObject resultJson = JSONObject.fromObject(mapList);
return resultJson;
public List<Map<String, Object>> queryFilmPrintReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate) {
List<Map<String, Object>> mapList = taskListService.selectFilmReport(replaceDate(startDate), replaceDate(endDate));
return mapList;
}
/**
......@@ -61,10 +61,9 @@ public class ReportApi {
* @return
*/
@RequestMapping("queryWorkGroupReport")
public JSONObject queryWorkGroupReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate,@RequestParam(value = "workGroup") String workGroup) {
List<Map<String, Object>> mapList = dataAuditingService.selectDataAuditingReport(startDate, endDate);
JSONObject resultJson = JSONObject.fromObject(mapList);
return resultJson;
public List<Map<String, Object>> queryWorkGroupReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate,@RequestParam(value = "workGroup") String workGroup) {
List<Map<String, Object>> mapList = taskListService.selectWorkGroupReport(replaceDate(startDate), replaceDate(endDate),workGroup);
return mapList;
}
/**
......@@ -72,13 +71,13 @@ public class ReportApi {
* 分拣
* @param startDate 开始时间
* @param endDate 结束时间
* @param name 分拣人员
* @return
*/
@RequestMapping("querySortingReport")
public JSONObject querySortingReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate) {
List<Map<String, Object>> mapList = dataAuditingService.selectDataAuditingReport(startDate, endDate);
JSONObject resultJson = JSONObject.fromObject(mapList);
return resultJson;
public List<Map<String, Object>> querySortingReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate,@RequestParam(value = "name") String name) {
List<Map<String, Object>> mapList = receiptService.selectReceiptReport(replaceDate(startDate), replaceDate(endDate), name);
return mapList;
}
/**
......@@ -89,11 +88,22 @@ public class ReportApi {
* @return
*/
@RequestMapping("queryQualityCheckReport")
public JSONObject queryQualityCheckReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate) {
public List<Map<String, Object>> queryQualityCheckReport(@RequestParam(value = "startDate") String startDate,@RequestParam(value = "endDate") String endDate) {
//todo
List<Map<String, Object>> mapList = dataAuditingService.selectDataAuditingReport(startDate, endDate);
JSONObject resultJson = JSONObject.fromObject(mapList);
return resultJson;
return mapList;
}
/**
* 去除字符串中中线
*
* @param str
* @return
*/
private String replaceDate(String str) {
return str.replace("-", "");
}
}
......@@ -24,7 +24,6 @@ public class SpecialCardApi {
* @param groupNo 组号
* @return
*/
@RequestMapping("selectSpecialCard")
public List<Map> updateState2(@RequestParam("groupNo") String groupNo) {
return specialCardService.selectSpecialCardByGroupNo(groupNo);
......
......@@ -56,37 +56,37 @@ public class TaskListApi {
// JSONObject resultJson = JSONObject.fromObject(resultList);
// return resultJson;
// }
/**
* 查询以派出所为单位的制证数量
* 受理库
*
* @param submitDate
* @param countyCode
* @return
*/
@RequestMapping("selectByGajg")
public JSONObject selectByGajg(@RequestParam(value = "submitDate") String submitDate, @RequestParam(value = "countyCode") String countyCode) {
List<CountGajgEntity> resultList = taskListService.selectByGajg(submitDate, countyCode);
JSONObject resultJson = JSONObject.fromObject(resultList);
return resultJson;
}
/**
* 生成任务单
* 受理库
*
* @param submitDate
* @param countyCode
* @param Gajg
* @return
*/
@RequestMapping("createTaskList")
public boolean createTaskList(@RequestParam(value = "submitDate") String submitDate, @RequestParam(value = "countyCode") String countyCode, @RequestParam(value = "Gajg") String Gajg) {
List<TaskListEntity> resultList = taskListService.selectACCU(submitDate, countyCode, Gajg);
taskListService.createTaskList(resultList);
return true;
}
//
// /**
// * 查询以派出所为单位的制证数量
// * 受理库
// *
// * @param submitDate
// * @param countyCode
// * @return
// */
// @RequestMapping("selectByGajg")
// public JSONObject selectByGajg(@RequestParam(value = "submitDate") String submitDate, @RequestParam(value = "countyCode") String countyCode) {
// List<CountGajgEntity> resultList = taskListService.selectByGajg(submitDate, countyCode);
// JSONObject resultJson = JSONObject.fromObject(resultList);
// return resultJson;
// }
//
// /**
// * 生成任务单
// * 受理库
// *
// * @param submitDate
// * @param countyCode
// * @param Gajg
// * @return
// */
// @RequestMapping("createTaskList")
// public boolean createTaskList(@RequestParam(value = "submitDate") String submitDate, @RequestParam(value = "countyCode") String countyCode, @RequestParam(value = "Gajg") String Gajg) {
// List<TaskListEntity> resultList = taskListService.selectACCU(submitDate, countyCode, Gajg);
// taskListService.createTaskList(resultList);
// return true;
// }
/**
* 更改任务单状态
......
......@@ -197,7 +197,6 @@ public interface ReceiptMapper {
public List<Map<String,Object>> selectReceiptDate(@Param("date") String date,@Param("string") String string,@Param("type") long type);
@Select("select DETAIL_RECEIPT_LIST.* , GAJG_DM.GAJG_MC from DETAIL_RECEIPT_LIST LEFT JOIN GAJG_DM ON GAJG_DM.GAJG_DM =DETAIL_RECEIPT_LIST.POLICE_CODE where ACCEPT_NO=#{acceptNo} or card_id=#{acceptNo}")
@Options(useGeneratedKeys=true, keyProperty="gajg_mc", keyColumn="GAJG_MC")
public DetailReceiptListEntity selectDetailByAcceptNo(@Param("acceptNo") String acceptNo);
......@@ -214,7 +213,11 @@ public interface ReceiptMapper {
@Update("update RECEIPT_LIST set IS_PRINT = 1 where to_char(CHECK_DATE,'yyyyMMdd') = ${date} and RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_ID=${type}")
public boolean updateReceiptDate(@Param("date") String date,@Param("string") String string,@Param("type") long type);
@Select("select RECEIPT_LIST.POLICE_CODE,sum(RECEIPT_LIST.FINISH_COUNT),GAJG_DM.GAJG_MC from RECEIPT_LIST \n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"where CHECK_NAME = #{name} and to_char(CHECK_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" +
"group by RECEIPT_LIST.POLICE_CODE, GAJG_DM.GAJG_MC")
public List<Map<String,Object>> selectReceiptReport(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("name") String name);
......
......@@ -15,19 +15,6 @@ import java.util.Map;
@Mapper
public interface TaskListMapper {
// /**
// * 区县计数查询
// * 受理库
// * @param submitDate
// * @return
// */
// @Select(" SELECT coun.COUNTYNAME,substr(act.upload_no,0,6),count(*) as count FROM ACC_CARD_T@ACCU_LINK act ,count()" +
// " LEFT JOIN ACC_GROUP_T@ACCU_LINK agt on substr(act.accept_no,0,8) = agt.group_no " +
// " LEFT JOIN COUNTY_DIC coun on substr(act.upload_no,0,6) = coun.county_code " +
// " WHERE agt.group_no not in (select GROUP_NO.group_no from GROUP_NO) " +
// " and to_char(IMPORT_TIME,'yyyymmdd') = #{submitDate} " +
// " GROUP by coun.COUNTYNAME,substr(act.upload_no,0,6)")
// public List<CountCountyEntity> selectByCounty(@Param("submitDate") String submitDate);
/**
* 任务单查询
......@@ -528,36 +515,6 @@ public interface TaskListMapper {
public List<Map<String,Object>> selectByCountyAtAuxiliary_common3(@Param("process") long process,@Param("process2") long process2);
// /**
// * 任务单查询
// * 辅助库、制证库 大批证
// * @param process 工序
// * @return
// */
// @Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9) police_code ,GAJG_DM.GAJG_MC,\n" +
// "sum(decode(prod_trace_t.DOWNLOAD_NO,null,0,1)) DOWNLOAD_count,\n" +
// "task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\n" +
// "CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
// "COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
// "group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, nvl(fc.faileCount,0) faileCount\n" +
// "from group_no left join task on group_no.task_id= task.TASK_ID\n" +
// "left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" +
// "left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
// "left join (select accept_no, nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR and accept_no not in (select accept_no from special_card ) \n" +
// "group by accept_no ) fc on substr(fc.accept_no,0,8) = group_no.group_no \n" +
// "left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n" +
// "left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n" +
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\n" +
// " left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO " +
// "where task.TASK_STATE_ID = #{process}\n" +
// "and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE,\n" +
// "COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \n" +
// "nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by group_no.GROUP_NO")
// public List<Map<String,Object>> selectByCountyAtAuxiliary_common3(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
* 辅助库 快证
......@@ -1505,6 +1462,38 @@ public interface TaskListMapper {
"where to_char(ISSUED_DATE,'yyyyMMdd') = to_char(sysdate,'yyyyMMdd'))")
public List<Map<String,Object>> getPrintOutCount();
@Select("SELECT CARD_TYPE,CARD_TYPE_ID,SUM(valid_count) valid_count, failed_count,PRINT_OUT_DATE FROM (select CARD_TYPE_DIC.CARD_TYPE,CARD_TYPE_DIC.CARD_TYPE_ID,decode(group_no.valid_count,null,1,GROUP_NO.VALID_COUNT) valid_count ,\n" +
"failed_info.failed_count,to_char(PRINT_OUT_DATE,'yyyyMMdd') PRINT_OUT_DATE\n" +
"from task \n" +
"left join GROUP_NO on task.TASK_ID = GROUP_NO.TASK_ID\n" +
"left join SPECIAL_CARD 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 (\n" +
" select to_char(PRINT_DATE,'yyyyMMdd') printDate ,count(FAILED_CARD_id) failed_count \n" +
" from FAILED_CARD GROUP BY to_char(PRINT_DATE,'yyyyMMdd')\n" +
" ) failed_info on failed_info.printDate = to_char(PRINT_OUT_DATE,'yyyyMMdd')\n" +
"where to_char(PRINT_OUT_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" +
"group by task.task_id, task.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE, failed_info.failed_count, CARD_TYPE_DIC.CARD_TYPE_ID, \n" +
"decode(group_no.valid_count,null,1,GROUP_NO.VALID_COUNT), to_char(PRINT_OUT_DATE,'yyyyMMdd')) \n" +
"group by CARD_TYPE, CARD_TYPE_ID, failed_count, PRINT_OUT_DATE")
public List<Map<String, Object>> selectFilmReport(@Param("startDate")String startDate,@Param("endDate") String endDate);
@Select("SELECT CARD_TYPE,CARD_TYPE_ID,SUM(valid_count) valid_count , failed_count,PUNCHING_DATE FROM (select CARD_TYPE_DIC.CARD_TYPE,CARD_TYPE_DIC.CARD_TYPE_ID,decode(group_no.valid_count,null,1,GROUP_NO.VALID_COUNT) valid_count ,\n" +
"failed_info.failed_count,to_char(PUNCHING_DATE,'yyyyMMdd') PUNCHING_DATE\n" +
"from task \n" +
"left join GROUP_NO on task.TASK_ID = GROUP_NO.TASK_ID\n" +
"left join SPECIAL_CARD 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 (\n" +
" select to_char(ALLOT_DATE,'yyyyMMdd') printDate ,count(FAILED_CARD_id) failed_count \n" +
" from FAILED_CARD where FAILED_CARD.WORK_GROUP = #{workGroup} GROUP BY to_char(ALLOT_DATE,'yyyyMMdd')\n" +
" ) failed_info on failed_info.printDate = to_char(PUNCHING_DATE,'yyyyMMdd')\n" +
"where to_char(PUNCHING_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} and task.WORK_GROUP = #{workGroup}\n" +
"group by task.task_id, task.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE, failed_info.failed_count, CARD_TYPE_DIC.CARD_TYPE_ID, \n" +
"decode(group_no.valid_count,null,1,GROUP_NO.VALID_COUNT), to_char(PUNCHING_DATE,'yyyyMMdd')) \n" +
"group by CARD_TYPE, CARD_TYPE_ID, failed_count, PUNCHING_DATE")
public List<Map<String, Object>> selectWorkGroupReport(@Param("startDate")String startDate,@Param("endDate") String endDate,@Param("workGroup") String workGroup);
......
......@@ -73,4 +73,6 @@ public interface ReceiptService {
public Map<String,Object> selectCountTimeT( String groupNo);
public List<Map<String,Object>> selectReceiptReport( String startDate,String endDate,String name);
}
......@@ -13,14 +13,8 @@ import java.util.Map;
public interface TaskListService {
// public List<CountCountyEntity> selectByCounty(String submitDate);
public List<CountGajgEntity> selectByGajg(String submitDate,String countyCode);
public List<TaskListEntity> selectACCU(String submitDate,String countyCode,String Gajg);
public boolean createTaskList(List<TaskListEntity> resultMap);
public boolean updateState(List<String> failedlist,List<String> list,String process,String name);
public boolean updateState1(List<String> failedlist,List<String> list,String process,String name,String workGroup);
......@@ -102,4 +96,8 @@ public interface TaskListService {
public List<Map<String,Object>> getPrintOutCount();
public List<Map<String,Object>> selectFilmReport(String startDate,String endDate);
public List<Map<String,Object>> selectWorkGroupReport(String startDate,String endDate,String workGroup);
}
......@@ -210,6 +210,11 @@ public class ReceiptServiceImpl implements ReceiptService {
return receiptMapper.queryPoliceName(policeCode);
}
@Override
public List<Map<String, Object>> selectReceiptReport(String startDate, String endDate, String name) {
return receiptMapper.selectReceiptReport(startDate, endDate, name);
}
private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
Map<String, Object> typeMap = new LinkedHashMap<>();
for (Map o : maplist) {
......
......@@ -9,10 +9,12 @@ 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.*;
@Service
......@@ -26,18 +28,6 @@ public class TaskListServiceImpl implements TaskListService {
@Autowired
private FailedCardService failedCardService;
// @Override
// public List<CountCountyEntity> selectByCounty(String submitDate) {
// List<CountCountyEntity> resultList = taskListMapper.selectByCounty(submitDate);
// return resultList;
// }
@Override
public List<CountGajgEntity> selectByGajg(String submitDate, String countyCode) {
// List <CountGajgEntity> resultList= taskListMapper.selectByGajg(submitDate,countyCode);
// return resultList;
return null;
}
@Override
public List<TaskListEntity> selectACCU(String submitDate, String countyCode, String Gajg) {
......@@ -45,12 +35,6 @@ public class TaskListServiceImpl implements TaskListService {
return resultList;
}
@Override
public boolean createTaskList(List<TaskListEntity> resultList) {
// taskListMapper.createTaskList(resultList);
return true;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateState(List<String> failedList,List<String> list, String process, String name) {
......@@ -716,6 +700,154 @@ 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")+"");
dateList.add(map);
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);
}
}
List<Map<String,Object>> list = new ArrayList<>();
int failedCount = 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")+"")){
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")+"")){
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")+"")){
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
jun+=valid_count;
datemap.put("jun",valid_count);
}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 {
}
}
}
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);
list.add(datemap);
return list;
}
/**
* 查询工作组报表
* @param startDate 开始时间
* @param endDate 结束时间
* @param workGroup 工作组
* @return
*/
@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")+"");
dateList.add(map);
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);
}
}
List<Map<String,Object>> list = new ArrayList<>();
int failedCount = 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")+"")){
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")+"")){
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")+"")){
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
jun+=valid_count;
datemap.put("jun",valid_count);
}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 {
}
}
}
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);
list.add(datemap);
return list;
}
@Override
public List<CardTypeDicEntity> getTypeList() {
return taskListMapper.selectTypeList();
......
......@@ -7,7 +7,6 @@ import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import java.text.SimpleDateFormat;
import java.util.*;
public class IDCardFactory {
......
<div class="content row">
<div class="col-md-12" style="margin-top:20px;">
<div class="row">
<!-- /.col -->
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header">
<strong>数据报表</strong>
<div class="box-tools pull-right">
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate" id="datepicker" readonly/>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchHistory()">查询历史</button>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;" ng-click="doSearchReceitp()">查询</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<div ng-if="receitpData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;" >
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in receitpData track by $index">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;">
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
</ul>
</div>
<div ng-repeat="type in receitpData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<div class="mailbox-messages">
<table class="table table-hover postTable">
<thead>
<tr>
<th><input type="checkbox" class="checkAll" ng-click="checkAll($event)"></th>
<th>NO.</th>
<th>派出所代码</th>
<th>派出所名称</th>
<th>证件数量</th>
<th>复核时间</th>
<th>复核人姓名</th>
</tr>
</thead>
<tbody ng-repeat="item in type.countyList">
<tr style="background-color: #eee">
<td><input type="checkbox" class="checkAllPolice" value="{{item.policeList}}" ng-click="checkAllPolice($event,item.countyCode)"></td>
<td></td>
<td>{{item.countyCode}}</td>
<td style="color: #3c8dbc">{{item.countyName}}</td>
<td>{{item.countyValidCount}}</td>
<td></td>
<td></td>
</tr>
<tr ng-repeat="police in item.policeList">
<td></td>
<td>{{police.ID}}</td>
<td>{{police.GAJG_DM}}</td>
<td>{{police.GAJG_MC}}</td>
<td>{{police.FINISH_COUNT}}</td>
<td>{{police.CHECK_DATE | date:'yyyy-MM-dd hh:mm:ss'}}</td>
<td>{{police.CHECK_NAME}}</td>
</tr>
</tbody>
</table>
<!-- /.table -->
</div>
<!-- /.table -->
<div class="box-footer" ng-if="receitpData.length>0">
<div class="pull-right" style="margin-left: 10px;">
<button class="btn btn-primary" ng-click="printReceitp(type.typeCode)">打印交接单</button>
<button class="btn btn-primary" ng-click="downloadGAinfo()">下载公安网反馈信息</button>
</div>
</div>
</div>
</div>
<div ng-if="receitpData.length==0">
<h4>暂无数据</h4>
</div>
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
</div>
<!-- /. box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</div>
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