Commit 2d6f7fff authored by dahai's avatar dahai

添加膜打印查询任务单 添加卸载数量

parent 6bfb214c
...@@ -321,6 +321,7 @@ public class AdminApi { ...@@ -321,6 +321,7 @@ public class AdminApi {
/** /**
* 添加角色 * 添加角色
*
* @param jsonStr * @param jsonStr
* @param resp * @param resp
* @return * @return
......
...@@ -22,11 +22,12 @@ public class CardDetailedListApi { ...@@ -22,11 +22,12 @@ public class CardDetailedListApi {
/** /**
* 按条件查询身份证详单 * 按条件查询身份证详单
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
@RequestMapping("findCardDetailedList") @RequestMapping("findCardDetailedList")
public List<CardDetailedListEntity> findCardDetailedList(String jsonStr){ public List<CardDetailedListEntity> findCardDetailedList(String jsonStr) {
JSONObject jsonObject = JSONObject.fromObject(jsonStr); JSONObject jsonObject = JSONObject.fromObject(jsonStr);
String applicantName = jsonObject.getString("applicantName"); String applicantName = jsonObject.getString("applicantName");
String orderNumber = jsonObject.getString("orderNumber"); String orderNumber = jsonObject.getString("orderNumber");
......
...@@ -2,6 +2,7 @@ package com.yxproject.start.api; ...@@ -2,6 +2,7 @@ package com.yxproject.start.api;
import java.io.*; import java.io.*;
import java.net.URLEncoder; import java.net.URLEncoder;
import com.yxproject.start.service.DetailReceiptListService; import com.yxproject.start.service.DetailReceiptListService;
import com.yxproject.start.service.ReceiptService; import com.yxproject.start.service.ReceiptService;
import com.yxproject.start.utils.ExportExcel; import com.yxproject.start.utils.ExportExcel;
...@@ -27,11 +28,12 @@ public class ExportExcelApi { ...@@ -27,11 +28,12 @@ public class ExportExcelApi {
private DetailReceiptListService detailReceiptListService; private DetailReceiptListService detailReceiptListService;
@Autowired @Autowired
private ReceiptService receiptService; private ReceiptService receiptService;
/** /**
* 导出公安网数据 * 导出公安网数据
*/ */
@RequestMapping("printExcelData") @RequestMapping("printExcelData")
public byte[] printExcelData(@RequestParam("date") String date, HttpServletResponse response){ public byte[] printExcelData(@RequestParam("date") String date, HttpServletResponse response) {
List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(replaceDate(date)); List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(replaceDate(date));
response.setContentType("application/x-download"); response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
...@@ -39,7 +41,7 @@ public class ExportExcelApi { ...@@ -39,7 +41,7 @@ public class ExportExcelApi {
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件 // //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null; String fout = null;
fout = ExportExcel.exportExcelDate(mapList); fout = ExportExcel.exportExcelDate(mapList);
String outFile = dateTime+"公安网信息表" ; String outFile = dateTime + "公安网信息表";
try { try {
FileInputStream fis = new FileInputStream(new File(fout)); FileInputStream fis = new FileInputStream(new File(fout));
byte[] b = new byte[fis.available()]; byte[] b = new byte[fis.available()];
...@@ -59,19 +61,19 @@ public class ExportExcelApi { ...@@ -59,19 +61,19 @@ public class ExportExcelApi {
* 导出交接单 * 导出交接单
*/ */
@RequestMapping("printReceiptExcelData") @RequestMapping("printReceiptExcelData")
public byte[] printReceiptExcelData(@RequestBody String list, HttpServletResponse response, HttpServletRequest request){ public byte[] printReceiptExcelData(@RequestBody String list, HttpServletResponse response, HttpServletRequest request) {
JSONObject jsonObject = JSONObject.fromObject(list); JSONObject jsonObject = JSONObject.fromObject(list);
JSONArray jsonArray = JSONArray.fromObject(jsonObject.get("list")); JSONArray jsonArray = JSONArray.fromObject(jsonObject.get("list"));
String date = jsonObject.get("date").toString(); String date = jsonObject.get("date").toString();
String type = jsonObject.get("type").toString(); String type = jsonObject.get("type").toString();
List<Map<String, Object>> mapList = receiptService.selectReceiptList(jsonArray,replaceDate(date),Long.valueOf(type)); List<Map<String, Object>> mapList = receiptService.selectReceiptList(jsonArray, replaceDate(date), Long.valueOf(type));
response.setContentType("application/x-download"); response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
String dateTime = DateFormatUtils.format(new Date(), "yyyy_MM_dd"); String dateTime = DateFormatUtils.format(new Date(), "yyyy_MM_dd");
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件 // //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null; String fout = null;
fout = ExportExcel.exportReceiptExcelDate(mapList); fout = ExportExcel.exportReceiptExcelDate(mapList);
String outFile = dateTime+"" ; String outFile = dateTime + "";
// //
// String agent = request.getHeader("User-Agent").toUpperCase(); //获得浏览器信息并转换为大写 // String agent = request.getHeader("User-Agent").toUpperCase(); //获得浏览器信息并转换为大写
// if (agent.indexOf("MSIE") > 0 || (agent.indexOf("GECKO")>0 && agent.indexOf("RV:11")>0)) { //IE浏览器和Edge浏览器 // if (agent.indexOf("MSIE") > 0 || (agent.indexOf("GECKO")>0 && agent.indexOf("RV:11")>0)) { //IE浏览器和Edge浏览器
...@@ -135,7 +137,7 @@ public class ExportExcelApi { ...@@ -135,7 +137,7 @@ public class ExportExcelApi {
fis.close(); fis.close();
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment;" + new String(outFile.getBytes(),"iso-8859-1") +".xls"); response.addHeader("Content-Disposition", "attachment;" + new String(outFile.getBytes(), "iso-8859-1") + ".xls");
return b; return b;
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
...@@ -150,15 +152,12 @@ public class ExportExcelApi { ...@@ -150,15 +152,12 @@ public class ExportExcelApi {
* 查询公安网数据 * 查询公安网数据
*/ */
@RequestMapping("selectExcelData") @RequestMapping("selectExcelData")
public List<Map<String,Object>> selectExcelData(@RequestParam("date")String date){ public List<Map<String, Object>> selectExcelData(@RequestParam("date") String date) {
List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(replaceDate(date)); List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(replaceDate(date));
return mapList; return mapList;
} }
/** /**
* 去除字符串中中线 * 去除字符串中中线
* *
...@@ -170,6 +169,4 @@ public class ExportExcelApi { ...@@ -170,6 +169,4 @@ public class ExportExcelApi {
} }
} }
...@@ -28,34 +28,36 @@ public class FailedCardApi { ...@@ -28,34 +28,36 @@ public class FailedCardApi {
@Autowired @Autowired
private FailedCardService failedCardService; private FailedCardService failedCardService;
@Autowired @Autowired
private TaskListService taskListService; private TaskListService taskListService;
/** /**
* 查询所有废证类型 * 查询所有废证类型
*
* @return * @return
*/ */
@RequestMapping("selectFailedCardDic") @RequestMapping("selectFailedCardDic")
public List<FailedCardReasonDicEntity> selectFailedCardDic(){ public List<FailedCardReasonDicEntity> selectFailedCardDic() {
List<FailedCardReasonDicEntity> resultList= failedCardService.selectFailedCardDic(); List<FailedCardReasonDicEntity> resultList = failedCardService.selectFailedCardDic();
return resultList; return resultList;
} }
/** /**
* 根据身份证号或受理号查询身份信息及组号 * 根据身份证号或受理号查询身份信息及组号
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
@RequestMapping("selectInfoByCardId") @RequestMapping("selectInfoByCardId")
public List<Map<String,Object>> selectInfoByCardId(@RequestBody String jsonStr){ public List<Map<String, Object>> selectInfoByCardId(@RequestBody String jsonStr) {
JSONArray jsonarray = JSONArray.fromObject(jsonStr); JSONArray jsonarray = JSONArray.fromObject(jsonStr);
List<Map<String,Object>> resultList=new ArrayList<>(); List<Map<String, Object>> resultList = new ArrayList<>();
for (Object o:jsonarray) { for (Object o : jsonarray) {
Map<String,Object> resultMap =failedCardService.selectInfoByCardId(o.toString()); Map<String, Object> resultMap = failedCardService.selectInfoByCardId(o.toString());
if (resultMap==null){ if (resultMap == null) {
resultMap = new LinkedHashMap<>(); resultMap = new LinkedHashMap<>();
resultMap.put("ID_NO",o.toString()); resultMap.put("ID_NO", o.toString());
resultMap.put("NAME","查无此人"); resultMap.put("NAME", "查无此人");
resultMap.put("SEX_NO","-1"); resultMap.put("SEX_NO", "-1");
} }
resultList.add(resultMap); resultList.add(resultMap);
} }
...@@ -64,22 +66,23 @@ public class FailedCardApi { ...@@ -64,22 +66,23 @@ public class FailedCardApi {
/** /**
* 添加废证 * 添加废证
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
@RequestMapping("insertFailedCard") @RequestMapping("insertFailedCard")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean insertFailedCard(@RequestBody String jsonStr){ public Boolean insertFailedCard(@RequestBody String jsonStr) {
JSONArray jsonarray = JSONArray.fromObject(jsonStr); JSONArray jsonarray = JSONArray.fromObject(jsonStr);
for (Object o : jsonarray) { for (Object o : jsonarray) {
JSONObject jsonObject = (JSONObject) o; JSONObject jsonObject = (JSONObject) o;
String result = failedCardService.selectSpecialCard(((JSONObject) o).getString("cardId")); String result = failedCardService.selectSpecialCard(((JSONObject) o).getString("cardId"));
Map<String,Object> idMap ; Map<String, Object> idMap;
//判断是否是特殊证件 //判断是否是特殊证件
if (result != null &&result!="") { if (result != null && result != "") {
idMap = failedCardService.selectDataById(jsonObject.getString("cardId")); idMap = failedCardService.selectDataById(jsonObject.getString("cardId"));
} else { } else {
idMap = failedCardService.selectCountIdByCardId(jsonObject.getString("cardId")); idMap = failedCardService.selectCountIdByCardId(jsonObject.getString("cardId"));
} }
int initiator = Integer.parseInt(jsonObject.getString("initiator")) - 1; int initiator = Integer.parseInt(jsonObject.getString("initiator")) - 1;
failedCardService.insertFailedCard(jsonObject.getString("failedCardReasonId"), idMap.get("ACCEPT_NO").toString(), idMap.get("TASK_ID").toString(), String.valueOf(initiator), jsonObject.getString("note")); failedCardService.insertFailedCard(jsonObject.getString("failedCardReasonId"), idMap.get("ACCEPT_NO").toString(), idMap.get("TASK_ID").toString(), String.valueOf(initiator), jsonObject.getString("note"));
...@@ -87,74 +90,66 @@ public class FailedCardApi { ...@@ -87,74 +90,66 @@ public class FailedCardApi {
return true; return true;
} }
// /**
// * 查询所有废证类型
// * @return
// */
// @RequestMapping("selectRemainingCardDic")
// public List<String> selectRemainingCardDic(){
// List<String> resultList= failedCardService.selectFailedCardDic();
// return resultList;
// }
/** /**
* 生成余证(每个余证生成一个任务单) * 生成余证(每个余证生成一个任务单)
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
//TODO 多张余证可以生成一张任务单 判断是否是同一个countyCode //TODO 多张余证可以生成一张任务单 判断是否是同一个countyCode
@RequestMapping("insertRemaining") @RequestMapping("insertRemaining")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean insertRemaining(@RequestBody String jsonStr){ public Boolean insertRemaining(@RequestBody String jsonStr) {
JSONObject jsonObject = JSONObject.fromObject(jsonStr); JSONObject jsonObject = JSONObject.fromObject(jsonStr);
JSONArray jsonarray = JSONArray.fromObject(jsonObject.get("list")); JSONArray jsonarray = JSONArray.fromObject(jsonObject.get("list"));
String name =jsonObject.get("name").toString(); String name = jsonObject.get("name").toString();
TaskEntity taskEntity = new TaskEntity(); TaskEntity taskEntity = new TaskEntity();
for (int i=0;i<jsonarray.size();i++) { for (int i = 0; i < jsonarray.size(); i++) {
/*查询生成任务单需要的数据*/ /*查询生成任务单需要的数据*/
Map<String,Object> resultMap= failedCardService.selectTaskListDate((String) jsonarray.get(i)); Map<String, Object> resultMap = failedCardService.selectTaskListDate((String) jsonarray.get(i));
String countyCode = resultMap.get("COUNTY_CODE").toString(); String countyCode = resultMap.get("COUNTY_CODE").toString();
Long cardType = Long.valueOf((BigDecimal) resultMap.get("CARD_TYPE")+""); Long cardType = Long.valueOf((BigDecimal) resultMap.get("CARD_TYPE") + "");
String acceptNo = (String) resultMap.get("ACCEPT_NO"); String acceptNo = (String) resultMap.get("ACCEPT_NO");
taskEntity.setCountyCode(countyCode); taskEntity.setCountyCode(countyCode);
taskEntity.setCardType(cardType); taskEntity.setCardType(cardType);
taskEntity.setTaskStateId((long) 1); taskEntity.setTaskStateId((long) 1);
taskEntity.setSubmitName(name); taskEntity.setSubmitName(name);
/*特证数+1*/ /*特证数+1*/
failedCardService.specialCardAdd(acceptNo); failedCardService.specialCardAdd(acceptNo);
/*生成新任务单*/ /*生成新任务单*/
taskListService.saveTask(taskEntity); taskListService.saveTask(taskEntity);
/*特证表添加特证*/ /*特证表添加特证*/
SpecialCardEntity specialCardEntity = new SpecialCardEntity() ; SpecialCardEntity specialCardEntity = new SpecialCardEntity();
specialCardEntity.setAcceptNo(acceptNo); specialCardEntity.setAcceptNo(acceptNo);
specialCardEntity.setInitiator(name); specialCardEntity.setInitiator(name);
specialCardEntity.setTaskId(taskEntity.getTaskId()); specialCardEntity.setTaskId(taskEntity.getTaskId());
specialCardEntity.setGroupNo(acceptNo.substring(0,8)); specialCardEntity.setGroupNo(acceptNo.substring(0, 8));
failedCardService.addSpecialCard(specialCardEntity); failedCardService.addSpecialCard(specialCardEntity);
} }
return true; return true;
} }
/** /**
* 查询所有证件类型 * 查询所有证件类型
*
* @return List * @return List
*/ */
@RequestMapping("selectCardType") @RequestMapping("selectCardType")
public List<String> selectCardType(){ public List<String> selectCardType() {
List<String> result= failedCardService.selectCardType(); List<String> result = failedCardService.selectCardType();
return result; return result;
} }
/** /**
* 生成历史回迁证 * 生成历史回迁证
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
@RequestMapping("insertBackCard") @RequestMapping("insertBackCard")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean insertBackCard(@RequestBody String jsonStr){ public boolean insertBackCard(@RequestBody String jsonStr) {
try { try {
JSONArray jsonarray = JSONArray.fromObject(jsonStr); JSONArray jsonarray = JSONArray.fromObject(jsonStr);
TaskEntity taskEntity = new TaskEntity(); TaskEntity taskEntity = new TaskEntity();
......
...@@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -124,11 +124,6 @@ public class ReceiptApi { ...@@ -124,11 +124,6 @@ public class ReceiptApi {
} else { } else {
//已生成交接单 //已生成交接单
} }
// //查询有几个特证
// int specialCardCount = receiptService.selectSpecialCard(receiptListDate.get(i).get("GROUP_NO").toString());
// //减去特证个数
// int finishCount = receiptService.selectCount(receiptListDate.get(i).get("GROUP_NO").toString()) - specialCardCount;
// receiptService.updateFinishCount(receiptListDate.get(i).get("GROUP_NO").toString(), finishCount);
} }
} }
return true; return true;
......
...@@ -13,14 +13,13 @@ import java.util.List; ...@@ -13,14 +13,13 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
*搜索框查询 * 搜索框查询
*/ */
@RestController @RestController
@RequestMapping("specialCardInfo") @RequestMapping("specialCardInfo")
public class SelectApi { public class SelectApi {
/** /**
* 根据 组号8、受理号10、身份证号18、任务单号11查询 * 根据 组号8、受理号10、身份证号18、任务单号11查询
*
*/ */
@Autowired @Autowired
private SelectSerialNumberService selectSerialNumberService; private SelectSerialNumberService selectSerialNumberService;
...@@ -28,8 +27,8 @@ public class SelectApi { ...@@ -28,8 +27,8 @@ public class SelectApi {
private GroupNoService groupNoService; private GroupNoService groupNoService;
@RequestMapping(value = "selectByCard") @RequestMapping(value = "selectByCard")
public Map<String,Object> selectByCard(@RequestParam("id") String id){ public Map<String, Object> selectByCard(@RequestParam("id") String id) {
Map<String,Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
if (id.length() == 11) { if (id.length() == 11) {
List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByWorkOrderFromYX(id); List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByWorkOrderFromYX(id);
List<Map<String, Object>> ACCdata = new ArrayList<>(); List<Map<String, Object>> ACCdata = new ArrayList<>();
...@@ -48,9 +47,9 @@ public class SelectApi { ...@@ -48,9 +47,9 @@ public class SelectApi {
//查询是否是特证,如果是,返回新的任务单信息 //查询是否是特证,如果是,返回新的任务单信息
List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByAcceptNoOrCardIdFromTaskList2(id); List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByAcceptNoOrCardIdFromTaskList2(id);
if (workOrderData.size()!=0){ if (workOrderData.size() != 0) {
resultMap.put("workOrderData", workOrderData); resultMap.put("workOrderData", workOrderData);
}else { } else {
List<Map<String, Object>> workOrderData2 = selectSerialNumberService.selectByAcceptNoOrCardIdFromTaskList(id); List<Map<String, Object>> workOrderData2 = selectSerialNumberService.selectByAcceptNoOrCardIdFromTaskList(id);
resultMap.put("workOrderData", workOrderData2); resultMap.put("workOrderData", workOrderData2);
} }
......
...@@ -89,6 +89,7 @@ public class TaskListApi { ...@@ -89,6 +89,7 @@ public class TaskListApi {
* taskId 任务单ID * taskId 任务单ID
* name 下发人姓名 * name 下发人姓名
* process 下发人所在工序 * process 下发人所在工序
*
* @return * @return
*/ */
@RequestMapping("updateState") @RequestMapping("updateState")
...@@ -99,7 +100,7 @@ public class TaskListApi { ...@@ -99,7 +100,7 @@ public class TaskListApi {
String process = jsonObject.get("process").toString(); String process = jsonObject.get("process").toString();
String name = jsonObject.get("name").toString(); String name = jsonObject.get("name").toString();
List<String> list = (List<String>) jsonArray; List<String> list = (List<String>) jsonArray;
return taskListService.updateState(failedList,list, process, name); return taskListService.updateState(failedList, list, process, name);
} }
/** /**
...@@ -109,6 +110,7 @@ public class TaskListApi { ...@@ -109,6 +110,7 @@ public class TaskListApi {
* name 打印转出人姓名 * name 打印转出人姓名
* process 打印转出人所在工序 * process 打印转出人所在工序
* printer 打印机编号 * printer 打印机编号
*
* @return * @return
*/ */
@RequestMapping("updateState2") @RequestMapping("updateState2")
...@@ -120,14 +122,15 @@ public class TaskListApi { ...@@ -120,14 +122,15 @@ public class TaskListApi {
String name = jsonObject.get("name").toString(); String name = jsonObject.get("name").toString();
String printer = jsonObject.get("printer").toString(); String printer = jsonObject.get("printer").toString();
List<String> list = (List<String>) jsonArray; List<String> list = (List<String>) jsonArray;
return taskListService.updateState2(failedList,list, process, name,Long.valueOf(printer)); return taskListService.updateState2(failedList, list, process, name, Long.valueOf(printer));
} }
/** /**
* 查询任务单详情 * 查询任务单详情
* (受理库) * (受理库)
*(创建) * (创建)
*
* @param process 工序 * @param process 工序
* @param date 查询时间 * @param date 查询时间
* @param resp * @param resp
...@@ -143,6 +146,7 @@ public class TaskListApi { ...@@ -143,6 +146,7 @@ public class TaskListApi {
/** /**
* 查询组号列表详情 * 查询组号列表详情
* 受理库 * 受理库
*
* @param date 查询时间 * @param date 查询时间
* @param typeCode 制证类型 * @param typeCode 制证类型
* @param countyCode 区县代码 * @param countyCode 区县代码
...@@ -159,7 +163,8 @@ public class TaskListApi { ...@@ -159,7 +163,8 @@ public class TaskListApi {
/** /**
* 查询任务单详情 * 查询任务单详情
* (辅助库) * (辅助库)
*(下发、数据核验、膜打印) * (下发、数据核验、膜打印)
*
* @param process 工序 * @param process 工序
* @param resp * @param resp
* @return * @return
...@@ -173,7 +178,8 @@ public class TaskListApi { ...@@ -173,7 +178,8 @@ public class TaskListApi {
/** /**
* 查询任务单详情 * 查询任务单详情
* (辅助库) * (辅助库)
*(预订位、平压) * (预订位、平压)
*
* @param process 工序 * @param process 工序
* @param resp * @param resp
* @return * @return
...@@ -187,7 +193,8 @@ public class TaskListApi { ...@@ -187,7 +193,8 @@ public class TaskListApi {
/** /**
* 查询任务单详情 * 查询任务单详情
* (辅助库、制证库) * (辅助库、制证库)
*(电写入、分拣) * (电写入、分拣)
*
* @param process 工序 * @param process 工序
* @param resp * @param resp
* @return * @return
...@@ -199,18 +206,18 @@ public class TaskListApi { ...@@ -199,18 +206,18 @@ public class TaskListApi {
} }
/** /**
* 查询任务单详情(历史) * 查询任务单详情(历史)
* (辅助库) * (辅助库)
*(创建、下发、数据核验、预订位、平压、冲切) * (创建、下发、数据核验、预订位、平压、冲切)
*
* @param process 工序 * @param process 工序
* @param resp * @param resp
* @return * @return
*/ */
@RequestMapping("queryHistoryTaskAtAuxiliary") @RequestMapping("queryHistoryTaskAtAuxiliary")
public List<Object> queryHistoryTaskAtAuxiliary(@RequestParam("process") String process,@RequestParam("date") String date, HttpServletResponse resp) { public List<Object> queryHistoryTaskAtAuxiliary(@RequestParam("process") String process, @RequestParam("date") String date, HttpServletResponse resp) {
List<Object> objects = taskListService.selectHistoryTaskAtAuxiliary(Long.valueOf(process) ,replaceDate(date)); List<Object> objects = taskListService.selectHistoryTaskAtAuxiliary(Long.valueOf(process), replaceDate(date));
return objects; return objects;
} }
...@@ -218,7 +225,8 @@ public class TaskListApi { ...@@ -218,7 +225,8 @@ public class TaskListApi {
/** /**
* 查询任务单详情(历史) * 查询任务单详情(历史)
* (辅助库) * (辅助库)
*(分拣) * (分拣)
*
* @param resp * @param resp
* @return * @return
*/ */
...@@ -241,7 +249,7 @@ public class TaskListApi { ...@@ -241,7 +249,7 @@ public class TaskListApi {
*/ */
@RequestMapping("createTask") @RequestMapping("createTask")
@Transactional @Transactional
public Map<String,Object> queryByCountyAtACCU(@RequestBody String str, HttpServletResponse resp) { public Map<String, Object> queryByCountyAtACCU(@RequestBody String str, HttpServletResponse resp) {
System.out.println(str); System.out.println(str);
JSONObject jsonObject = JSONObject.fromObject(str); JSONObject jsonObject = JSONObject.fromObject(str);
String date = jsonObject.getString("date"); String date = jsonObject.getString("date");
...@@ -249,12 +257,12 @@ public class TaskListApi { ...@@ -249,12 +257,12 @@ public class TaskListApi {
JSONArray jsonCounty = jsonObject.getJSONArray("countyList"); JSONArray jsonCounty = jsonObject.getJSONArray("countyList");
JSONArray jsonGroup = jsonObject.getJSONArray("groupList"); JSONArray jsonGroup = jsonObject.getJSONArray("groupList");
List<Map<String, Object>> countyList = (List<Map<String, Object>>) jsonCounty; List<Map<String, Object>> countyList = (List<Map<String, Object>>) jsonCounty;
if (countyList.size()>0){ if (countyList.size() > 0) {
//正常生成区县任务单 //正常生成区县任务单
for (Map<String, Object> map : countyList) { for (Map<String, Object> map : countyList) {
String typeCode = map.get("typeCode").toString(); String typeCode = map.get("typeCode").toString();
String countyCode = map.get("countyCode").toString(); String countyCode = map.get("countyCode").toString();
List<Map<String,Object>> objects = taskListService.selectGroupAtACCU(replaceDate(date), typeCode, countyCode); List<Map<String, Object>> objects = taskListService.selectGroupAtACCU(replaceDate(date), typeCode, countyCode);
boolean b = taskListService.saveTask(objects, name, 0 + ""); boolean b = taskListService.saveTask(objects, name, 0 + "");
} }
} }
...@@ -265,16 +273,16 @@ public class TaskListApi { ...@@ -265,16 +273,16 @@ public class TaskListApi {
String groupNo = ""; String groupNo = "";
for (int i = 0; i < groupList.size(); i++) { for (int i = 0; i < groupList.size(); i++) {
if (i != groupList.size() - 1) { if (i != groupList.size() - 1) {
groupNo = ""+groupNo + groupList.get(i) + ","; groupNo = "" + groupNo + groupList.get(i) + ",";
} else { } else {
groupNo = ""+groupNo + groupList.get(i) + ""; groupNo = "" + groupNo + groupList.get(i) + "";
} }
} }
List<Map<String,Object>> objects = taskListService.selectGroupAtACCU(groupNo); List<Map<String, Object>> objects = taskListService.selectGroupAtACCU(groupNo);
boolean b = taskListService.saveTask(objects, name, 0 + ""); boolean b = taskListService.saveTask(objects, name, 0 + "");
} }
Map<String,Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("msg","成功生成任务单"); map.put("msg", "成功生成任务单");
return map; return map;
} }
...@@ -291,7 +299,7 @@ public class TaskListApi { ...@@ -291,7 +299,7 @@ public class TaskListApi {
*/ */
@RequestMapping("createFastTask") @RequestMapping("createFastTask")
@Transactional @Transactional
public Map<String,Object> createFastTask(@RequestBody String object, HttpServletResponse resp) { public Map<String, Object> createFastTask(@RequestBody String object, HttpServletResponse resp) {
//todo 添加没有解析进去受理库情况 //todo 添加没有解析进去受理库情况
JSONObject jsonObject = JSONObject.fromObject(object); JSONObject jsonObject = JSONObject.fromObject(object);
String acceptNo = jsonObject.getString("acceptNo"); String acceptNo = jsonObject.getString("acceptNo");
...@@ -302,7 +310,7 @@ public class TaskListApi { ...@@ -302,7 +310,7 @@ public class TaskListApi {
countyCode = "000000"; countyCode = "000000";
} }
//查询快证是否存在受理库 //查询快证是否存在受理库
List<Map<String,Object>> objects = taskListService.selectFastCardAtACCU(acceptNo.substring(0, 8)); List<Map<String, Object>> objects = taskListService.selectFastCardAtACCU(acceptNo.substring(0, 8));
//存在受理库 //存在受理库
if (objects.size() == 1) { if (objects.size() == 1) {
taskListService.saveFastTask(objects, name, acceptNo, Long.valueOf(cardType)); taskListService.saveFastTask(objects, name, acceptNo, Long.valueOf(cardType));
...@@ -342,8 +350,8 @@ public class TaskListApi { ...@@ -342,8 +350,8 @@ public class TaskListApi {
} }
} }
} }
Map<String,Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("msg","成功添加快证任务单"); map.put("msg", "成功添加快证任务单");
return map; return map;
} }
...@@ -357,14 +365,14 @@ public class TaskListApi { ...@@ -357,14 +365,14 @@ public class TaskListApi {
*/ */
@RequestMapping("addBackCard") @RequestMapping("addBackCard")
@Transactional @Transactional
public Map<String,Object> addBackCard(@RequestBody String object, HttpServletResponse resp) { public Map<String, Object> addBackCard(@RequestBody String object, HttpServletResponse resp) {
JSONObject jsonObject = JSONObject.fromObject(object); JSONObject jsonObject = JSONObject.fromObject(object);
String acceptNo = jsonObject.getString("acceptNo"); String acceptNo = jsonObject.getString("acceptNo");
String taskId = jsonObject.getString("taskId"); String taskId = jsonObject.getString("taskId");
String name = jsonObject.getString("name"); String name = jsonObject.getString("name");
List<Map<String,Object>> objects = preproPersonService.selectUploadNoByAcceptNo(acceptNo); List<Map<String, Object>> objects = preproPersonService.selectUploadNoByAcceptNo(acceptNo);
if (objects.size()>0){ if (objects.size() > 0) {
for (Map<String,Object> map :objects){ for (Map<String, Object> map : objects) {
PreproPersonEntity preproPersonEntity = new PreproPersonEntity(); PreproPersonEntity preproPersonEntity = new PreproPersonEntity();
preproPersonEntity.setJmsfzslh(map.get("UPLOAD_NO").toString()); preproPersonEntity.setJmsfzslh(map.get("UPLOAD_NO").toString());
preproPersonEntity.setIsValid(0); preproPersonEntity.setIsValid(0);
...@@ -387,8 +395,8 @@ public class TaskListApi { ...@@ -387,8 +395,8 @@ public class TaskListApi {
specialCardEntity.setTaskId(Long.valueOf(taskId)); specialCardEntity.setTaskId(Long.valueOf(taskId));
specialCardService.saveSpecialCard(specialCardEntity); specialCardService.saveSpecialCard(specialCardEntity);
} }
Map<String,Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("msg","成功添加退证"); map.put("msg", "成功添加退证");
return map; return map;
} }
...@@ -504,8 +512,6 @@ public class TaskListApi { ...@@ -504,8 +512,6 @@ public class TaskListApi {
// } // }
/** /**
* 去除字符串中中线 * 去除字符串中中线
* *
...@@ -517,10 +523,4 @@ public class TaskListApi { ...@@ -517,10 +523,4 @@ public class TaskListApi {
} }
} }
...@@ -430,6 +430,36 @@ public interface TaskListMapper { ...@@ -430,6 +430,36 @@ public interface TaskListMapper {
"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") "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_common2(@Param("process") long process,@Param("process2") long process2); public List<Map<String,Object>> selectByCountyAtAuxiliary_common2(@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);
/** /**
* 任务单查询 * 任务单查询
* 辅助库 快证 * 辅助库 快证
...@@ -618,6 +648,32 @@ public interface TaskListMapper { ...@@ -618,6 +648,32 @@ public interface TaskListMapper {
"order by SPECIAL_CARD.ACCEPT_NO") "order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast3(@Param("process") long process,@Param("process2") long process2); public List<Map<String,Object>> selectByCountyAtAuxiliary_fast3(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
* 辅助库、制证库 快证 电写入
* @param process 工序
* @return
*/
@Select("select DISTINCT 0 finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,\n" +
"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,task.submit_date, \n" +
"SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT, \n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount \n" +
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID \n" +
"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 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" +
"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" +
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process} \n" +
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,0 \n" +
"order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast4(@Param("process") long process,@Param("process2") long process2);
/** /**
...@@ -909,7 +965,36 @@ public interface TaskListMapper { ...@@ -909,7 +965,36 @@ public interface TaskListMapper {
/** /**
* 任务单查询 * 任务单查询
* 辅助库、制证库 余证 * 辅助库、制证库 余证 膜打印
* @param process 工序
* @return
*/
@Select("select DISTINCT 0 finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,\n" +
"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,task.submit_date, \n" +
"SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT, \n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount \n" +
"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 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" +
"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" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID =#{process} \n" +
"group by task.submit_date, SPECIAL_CARD.task_id, '余证', '99', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,0 \n" +
"order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind4(@Param("process") long process,@Param("process2") long process2);
/**
* 任务单查询
* 辅助库、制证库 废证
* @param process 工序 * @param process 工序
* @return * @return
*/ */
...@@ -931,6 +1016,30 @@ public interface TaskListMapper { ...@@ -931,6 +1016,30 @@ public interface TaskListMapper {
public List<Map<String,Object>> selectByCountyAtAuxiliary_failed2(@Param("process") long process); public List<Map<String,Object>> selectByCountyAtAuxiliary_failed2(@Param("process") long process);
/**
* 任务单查询
* 辅助库、制证库 废证 膜打印
* @param process 工序
* @return
*/
@Select("select DISTINCT 0 finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,\n" +
"substr(prod_card_t.upload_no,0,9) police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.DOWNLOAD_NO,null,0,1)) DOWNLOAD_count,\n" +
"task.submit_date,FAILED_CARD.failed_card_id task_id,'废证' CARD_TYPE,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"FAILED_CARD.ACCEPT_NO group_No, 0 faileCount\n" +
"from FAILED_CARD left join task on FAILED_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 prod_trace_t@PROD_LINK on prod_trace_t.ACCEPT_NO = FAILED_CARD.ACCEPT_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" +
"where FAILED_CARD.STATE =#{process} and FAILED_CARD.STATE!=FAILED_CARD.INITIATOR \n" +
"group by 0, substr(prod_card_t.upload_no,0,9), GAJG_DM.GAJG_MC, task.submit_date, FAILED_CARD.failed_card_id, \n" +
"'废证', '100', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, FAILED_CARD.ACCEPT_NO, 0\n" +
"order by FAILED_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_failed3(@Param("process") long process);
/** /**
*按时间、区、派出所查询受理库数据 *按时间、区、派出所查询受理库数据
......
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