Commit 660514b6 authored by liboyang's avatar liboyang

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

parents 255793b6 f306b1a1
......@@ -214,12 +214,12 @@ public class DeliveredApi {
@RequestMapping("queryDeliveredReport")
// @RequiresPermissions("userInfo.add")//权限管理;
@Transactional(rollbackFor = Exception.class)
public List<Map<String, Object>> queryDeliveredReport(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, HttpServletRequest requ) {
public List<Map<String, Object>> queryDeliveredReport(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate,@RequestParam("type") int reportType, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<Map<String, Object>> report = new ArrayList<>();
try {
report = deliveredService.selectDeliveredReport(replaceDate(startDate), replaceDate(endDate));
report = deliveredService.selectDeliveredReport(replaceDate(startDate), replaceDate(endDate),reportType);
} catch (Exception e) {
logger.error("运单寄出开始时间:" + startDate + "运单寄出结束时间:" + endDate);
logger.error("Exception 登记投递失败信息异常", e);
......@@ -237,10 +237,10 @@ public class DeliveredApi {
@RequestMapping("queryDeliveredByImportDate")
// @RequiresPermissions("userInfo.add")//权限管理;
@Transactional(rollbackFor = Exception.class)
public List<DeliveredImportDicEntity> queryDeliveredByImportDate(@RequestParam("date") String date, HttpServletRequest requ) {
public List<Map<String,Object>> queryDeliveredByImportDate(@RequestParam("date") String date, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<DeliveredImportDicEntity> deliveredImportDicEntities = new ArrayList<DeliveredImportDicEntity>();
List<Map<String,Object>> deliveredImportDicEntities = new ArrayList<>();
try {
deliveredImportDicEntities = deliveredService.selectDeliveredByImportDate(replaceDate(date));
} catch (Exception e) {
......@@ -294,16 +294,16 @@ public class DeliveredApi {
deliveredService.updateDeliveredFailedInfo(cardId,name);
//查询出对应详单信息
List<DetailReceiptListEntity> detailReceiptListEntityList = detailReceiptListService.selectDetailReceiptListEntityByCardId(cardId);
if (detailReceiptListEntityList.size() > 0) {
if (detailReceiptListEntityList.size()>0) {
//生成新的交接单信息
ReceiptListEntity receiptListEntity = new ReceiptListEntity();
DetailReceiptListEntity detailReceiptListEntity = detailReceiptListEntityList.get(0);
receiptListEntity.setPoliceCode(detailReceiptListEntity.getUploadNo().substring(0, 9));
receiptListEntity.setPoliceCode(detailReceiptListEntity.getUploadNo().substring(0,9));
receiptListEntity.setQrCode(detailReceiptListEntity.getAcceptNo());
receiptListEntity.setFinishCount((long) 1);
receiptListEntity.setState((long) 1);
receiptListEntity.setFinishCount((long)1);
receiptListEntity.setState((long)0);
receiptListEntity.setCheckName(name);
receiptListEntity.setCardTypeId((long) 0);
receiptListEntity.setCardTypeId((long)0);
long id = receiptService.saveReceiptList(receiptListEntity);
//更改对应的详单信息
detailReceiptListService.updateDetailReceiptList(detailReceiptListEntity, id);
......
......@@ -24,6 +24,9 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import static com.yxproject.start.utils.YXStringUtils.getCurrentDate2String;
import static com.yxproject.start.utils.YXStringUtils.inputStream2byte;
@RestController
@RequestMapping("exportExcel")
public class ExportExcelApi {
......@@ -45,25 +48,14 @@ public class ExportExcelApi {
JSONArray jsonArray = JSONArray.fromObject(jsonObject.get("list"));
String isHistory = jsonObject.get("isHistory").toString();
String name = jsonObject.get("name").toString();
List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(jsonArray, name, isHistory);
List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(jsonArray, name,isHistory);
response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8");
String dateTime = DateFormatUtils.format(new Date(), "yyyy-MM-dd");
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null;
fout = ExportExcel.exportExcelDate(mapList);
String outFile = dateTime + "公安网信息表";
//使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = ExportExcel.exportExcelDate(mapList);
try {
FileInputStream fis = new FileInputStream(new File(fout));
byte[] b = new byte[fis.available()];
fis.read(b);
fis.close();
response.addHeader("Content-Disposition", "attachment;filename=" + outFile + ".xls");
return b;
} catch (FileNotFoundException e) {
e.printStackTrace();
logger.error("导出文件名:" + fout);
logger.error("FileNotFoundException 导出公安网数据未找到异常", e);
response.addHeader("Content-Disposition", "attachment;filename=" + getCurrentDate2String("yyyy-MM-dd") + "公安网信息表" + ".xls");
return inputStream2byte(fout);
} catch (IOException e) {
e.printStackTrace();
logger.error("导出文件名:" + fout);
......@@ -88,29 +80,6 @@ public class ExportExcelApi {
type = jsonObject.get("type").toString();
jsonArray = JSONArray.fromObject(jsonObject.get("list"));
map = receiptService.selectReceiptList(jsonArray, Long.valueOf(type));
// response.setContentType("application/x-download");
// response.setCharacterEncoding("UTF-8");
// String dateTime = DateFormatUtils.format(new Date(), "yyyy_MM_dd");
//// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
// String fout = null;
// fout = ExportExcel.exportReceiptExcelDate(mapList);
// String outFile = dateTime + "";
//
// try {
// FileInputStream fis = new FileInputStream(new File(fout));
// byte[] b = new byte[fis.available()];
// fis.read(b);
// fis.close();
// response.setCharacterEncoding("utf-8");
// response.setContentType("application/octet-stream");
// response.addHeader("Content-Disposition", "attachment;" + new String(outFile.getBytes(), "iso-8859-1") + ".xls");
// return b;
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// }
// return null;
} catch (Exception e) {
e.printStackTrace();
logger.error("异常参数:" + jsonObject);
......@@ -120,16 +89,6 @@ public class ExportExcelApi {
}
// /**
// * 查询公安网数据
// */
// @RequestMapping("selectExcelData")
// public List<Map<String, Object>> selectExcelData(@RequestParam("date") String date) {
// List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(replaceDate(date));
// return mapList;
// }
/**
* 去除字符串中中线
*
......
......@@ -41,8 +41,7 @@ public class GreenPackageInformationApi {
*/
@RequestMapping("deleteGreenPackageInformationFile")
public boolean deleteGreenPackageInformationFileEntity(@RequestParam("id") String id) {
boolean b = greenPackageInformationService.deleteGreenPackageInformationFileEntity(id);
return b;
return greenPackageInformationService.deleteGreenPackageInformationFileEntity(id);
}
/**
......
......@@ -18,6 +18,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("LogApi")
public class LogApi {
......@@ -151,6 +152,14 @@ public class LogApi {
return resultList;
}
/**
* 检查xml不匹配信息
*/
@RequestMapping("checkAcppetNo")
public List<Map<String, Object>> checkAcppetNo(@RequestParam("importDate") String uploadDate) {
return logService.checkAcppetNo(replaceDate(uploadDate));
}
/**
* 解析
......@@ -225,6 +234,17 @@ public class LogApi {
return true;
}
/**
* 根据格口文件置空 person_post身份证号
*
* @param fileId
* @return true
*/
@RequestMapping("updateNullIdDate")
public boolean updateNullIdDate(@RequestParam("fileId") String fileId) {
return logService.updateNullIdDate(fileId);
}
/**
* 去除字符串中中线
......
......@@ -69,31 +69,6 @@ public class MaterialManagementApi {
return result;
}
// /**
// * 删除膜耗材数据
// * @param id
// * @return
// */
// @RequestMapping("deleteFilm")
// public boolean deleteFilm(@Param("id")String id){
// boolean result = materialManagementService.insertFilm(totalCount, plasticFilmType, note,name,Long.valueOf(state));
// return result;
// }
//
// /**
// * 删除卡体耗材数据
// * @param cardType
// * @param totalCount
// * @param note
// * @return
// */
// @RequestMapping("deleteCardBody")
// public boolean deleteCardBody(@Param("cardType")String cardType,@Param("totalCount")String totalCount,@Param("note")String note, @Param("name")String name, @Param("cardBodyType")String cardBodyType,@Param("state")String state){
// boolean result = materialManagementService.insertCardBody(cardType, totalCount, note,name,cardBodyType,Long.valueOf(state));
// return result;
// }
/**
* 查询卡机统计数据
*
......
......@@ -115,10 +115,11 @@ public class PersonPostApi {
String state = jsonObject.getString("state");
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
JSONArray jsonArray = (JSONArray) jsonObject.get("getToCounty");
String uploadDate = replaceDate(jsonObject.getString("uploadDate"));
String startDate = replaceDate(jsonObject.getString("startDate"));
String endDate = replaceDate(jsonObject.getString("endDate"));
String emailNo = jsonObject.getString("emailNo");
String notNull = jsonObject.getString("notNull");
count = personPostService.findPersonalDataCount(applicantName, orderNumber, state, latticeMouthInformation, jsonArray, uploadDate, emailNo, notNull);
count = personPostService.findPersonalDataCount(applicantName, orderNumber, state, latticeMouthInformation, jsonArray, startDate,endDate, emailNo, notNull);
} catch (Exception e) {
logger.error("个人邮寄信息:" + jsonObject);
logger.error("Exception 按条件查询个人邮寄信息异常", e);
......@@ -146,12 +147,13 @@ public class PersonPostApi {
String state = jsonObject.getString("state");
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
JSONArray jsonArray = (JSONArray) jsonObject.get("getToCounty");
String uploadDate = replaceDate(jsonObject.getString("uploadDate"));
String startDate = replaceDate(jsonObject.getString("startDate"));
String endDate = replaceDate(jsonObject.getString("endDate"));
String firstIndex = jsonObject.getString("firstIndex");
String pageSize = jsonObject.getString("pageSize");
String emailNo = jsonObject.getString("emailNo");
int notNull = Integer.parseInt((jsonObject.getString("notNull")));
list = personPostService.findPersonalData(applicantName, orderNumber, state, latticeMouthInformation, jsonArray, uploadDate, firstIndex, pageSize, emailNo, notNull);
list = personPostService.findPersonalData(applicantName, orderNumber, state, latticeMouthInformation, jsonArray, startDate, endDate, firstIndex, pageSize, emailNo, notNull);
} catch (Exception e) {
logger.error("个人邮寄信息:" + jsonObject);
logger.error("Exception 按条件查询个人邮寄信息异常", e);
......@@ -177,8 +179,9 @@ public class PersonPostApi {
String state = jsonObject.getString("state");
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
JSONArray jsonArray = (JSONArray) jsonObject.get("getToCounty");
String uploadDate = jsonObject.getString("uploadDate");
personPostService.deletePersonalData(applicantName, orderNumber, state, latticeMouthInformation, jsonArray, uploadDate);
String startDate = replaceDate(jsonObject.getString("startDate"));
String endDate = replaceDate(jsonObject.getString("endDate"));
personPostService.deletePersonalData(applicantName, orderNumber, state, latticeMouthInformation, jsonArray, startDate, endDate);
} catch (Exception e) {
logger.error("个人邮寄信息:" + jsonObject);
logger.error("Exception 按条件删除个人邮寄信息异常", e);
......@@ -189,17 +192,16 @@ public class PersonPostApi {
/**
* 根据导入日期删除未打印的邮政信息
*
* @param importDate
* @return
*/
@RequestMapping("recordsHaveNotPrinted")
public boolean deletePersonalDataByImportDate(@RequestParam("importDate") String importDate, HttpServletRequest requ) {
public boolean deletePersonalDataByImportDate(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
personPostService.deletePersonalDataByImportDate(replaceDate(importDate));
personPostService.deletePersonalDataByImportDate(replaceDate(startDate), replaceDate(endDate));
} catch (Exception e) {
logger.error("导入日期:" + importDate);
logger.error("导入日期:" + startDate + endDate );
logger.error("Exception 根据导入日期删除未打印的邮政信息异常", e);
}
return true;
......@@ -209,18 +211,17 @@ public class PersonPostApi {
/**
* 根据导入日期删除未打印的邮政信息数量
*
* @param importDate
* @return
*/
@RequestMapping("findPersonalDataCountByImportDate")
public int findPersonalDataCountByImportDate(@RequestParam("importDate") String importDate, HttpServletRequest requ) {
public int findPersonalDataCountByImportDate(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
int count = 0;
try {
count = personPostService.findPersonalDataCountByImportDate(replaceDate(importDate));
count = personPostService.findPersonalDataCountByImportDate(replaceDate(startDate), replaceDate(endDate));
} catch (Exception e) {
logger.error("导入日期:" + importDate);
logger.error("导入日期:" + startDate + endDate );
logger.error("Exception 根据导入日期删除未打印的邮政信息数量异常", e);
}
return count;
......@@ -228,7 +229,7 @@ public class PersonPostApi {
@RequestMapping("download")
public void exportExcel(HttpServletRequest request, HttpServletResponse response,
@RequestParam("uploadDate") String uploadDate, @RequestParam("hasPrinted") String hasPrinted,
@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, @RequestParam("hasPrinted") String hasPrinted,
@RequestParam("djx") List<String> djx, @RequestParam("gkxx") String gkxx, @RequestParam("ddh") String ddh,
@RequestParam("sequence") String sequence, @RequestParam("sqrxm") String sqrxm, @RequestParam("emailNo") String emailNo) throws Exception {
String remoteAddr = request.getRemoteAddr();
......@@ -236,10 +237,10 @@ public class PersonPostApi {
JSONArray jsonArray = new JSONArray();
try {
jsonArray = JSONArray.fromObject(djx);
List<PersonPostEntity> list = personPostService.downLoadReportForm(request, response, sqrxm, ddh, hasPrinted, gkxx, jsonArray, replaceDate(uploadDate), emailNo);
List<PersonPostEntity> list = personPostService.downLoadReportForm(request, response, sqrxm, ddh, hasPrinted, gkxx, jsonArray, replaceDate(startDate),replaceDate(endDate), emailNo);
exportExcel(request, response, list);
} catch (Exception e) {
logger.error("上传时间:" + uploadDate + "类型普证-0,邮寄-9:" + hasPrinted + "格口信息:" + gkxx + "订单号:" + ddh + "申请人姓名:" + sqrxm + "运单号码:" + emailNo);
logger.error("上传时间:" + startDate + endDate + "类型普证-0,邮寄-9:" + hasPrinted + "格口信息:" + gkxx + "订单号:" + ddh + "申请人姓名:" + sqrxm + "运单号码:" + emailNo);
logger.error("Exception 下载Excel异常", e);
}
}
......
package com.yxproject.start.api;
import com.yxproject.start.entity.FileNameDicEntity;
import com.yxproject.start.entity.GreenPackageInformationEntity;
import com.yxproject.start.entity.GreenPackageInformationFileEntity;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.service.FileNameDicService;
import com.yxproject.start.service.GreenPackageInformationService;
import com.yxproject.start.service.PersonPostService;
import com.yxproject.start.utils.ReadExcel;
import com.yxproject.start.utils.YXJSONResponse;
......@@ -30,6 +33,7 @@ import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* 导入Excel文件
*/
......@@ -41,6 +45,8 @@ public class ReadExcelApi {
PersonPostService personPostService;
@Autowired
FileNameDicService fileNameDicService;
@Autowired
GreenPackageInformationService greenPackageInformationService;
Logger logger = Logger.getLogger(ReadExcelApi.class);
......@@ -178,6 +184,111 @@ public class ReadExcelApi {
return true;
}
/**
* 导入普证绿包快递单号信息表
* @param issueDate 订单发出日期
* @param resp
* @param requ
* @return
*/
@RequestMapping("ReadGreenPackageInformation")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> readGreenPackageInformation(@RequestParam("issueDate") String issueDate,@RequestParam("name") String name,HttpServletResponse resp, HttpServletRequest requ) {
YXJSONResponse yxresp = new YXJSONResponse();
String filename = "";
DiskFileItemFactory factory = new DiskFileItemFactory();
// 设置缓冲区的大小为100KB,如果不指定,那么缓冲区的大小默认是10KB
factory.setSizeThreshold(1024 * 100);
ServletFileUpload upload = new ServletFileUpload(factory);
upload.setHeaderEncoding("UTF-8");
// 设置上传单个文件的大小的最大值,目前是设置为1024*1024*10字节,也就是10MB
upload.setFileSizeMax(1024 * 1024 * 10);
// 设置上传文件总量的最大值,最大值=同时上传的多个文件的大小的最大值的和,目前设置为4000MB
upload.setSizeMax(1024 * 1024 * 4000);
// 将普通属性存入map中,之后调用
Map<String, Object> map = new HashMap<String, Object>();
List<Object> list = new ArrayList<>();
try {
//将当前上下文初始化给 CommonsMutipartResolver (多部分解析器)
CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(
requ.getServletContext());
// 判断是否是多数据段提交格式
if (multipartResolver.isMultipart(requ)) {
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) requ;
Iterator<String> iter = multiRequest.getFileNames();
while (iter.hasNext()) {
List<MultipartFile> fileRows = multiRequest.getFiles(iter.next().toString());
for (MultipartFile item :fileRows){
try {
// 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件
// 得到上传的文件名称
filename = item.getOriginalFilename();
try {
// 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件
// 得到上传的文件名称
filename = item.getOriginalFilename();
File file = null;
try {
file = File.createTempFile("prefix", "_" + item.getOriginalFilename());
item.transferTo(file);
} catch (IOException e) {
e.printStackTrace();
logger.error("", e);
}
ReadExcel readExcel = new ReadExcel();
List list1 = readExcel.readExcel(file);
GreenPackageInformationFileEntity greenPackageInformationFileEntity = new GreenPackageInformationFileEntity();
greenPackageInformationFileEntity.setFileName(filename);
greenPackageInformationFileEntity.setImportName(name);
long greenPackageInformationFileId = greenPackageInformationService.saveGreenPackageInformationFile(greenPackageInformationFileEntity);
int success = 0;
int failed = 0;
//导入绿包信息表
for (int i = 1; i < list1.size(); i++) {
List o = (List) list1.get(i);
//判断导入信息是否有误
GreenPackageInformationEntity greenPackageInformationEntity = new GreenPackageInformationEntity();
greenPackageInformationEntity.setPoliceName(o.get(1).toString());
greenPackageInformationEntity.setWaybillNumber(o.get(0).toString());
greenPackageInformationEntity.setReceiptDate(replaceDate(issueDate));
greenPackageInformationEntity.setFileId(greenPackageInformationFileId);
boolean b = greenPackageInformationService.saveGreenPackageInformation(greenPackageInformationEntity);
if(b){
success++;
}else {
failed++;
list.add(o.get(1).toString());
}
}
map.put("success",success);
map.put("failed",failed);
map.put("list",list);
return map;
} catch (Exception e) {
e.printStackTrace();
logger.error("", e);
yxresp.outPutError("Exception", "上传文件时发生错误,非法XML文件:" + filename);
continue;
}
} catch (Exception e) {
e.printStackTrace();
logger.error("", e);
yxresp.outPutError("FileUploadException", "文件上载发生异常:" + e.getMessage());
}
}
}
}
}catch (Exception e){
logger.error("Exception 导入个人邮寄信息表异常", e);
}
return map;
}
/**
* 查询个人邮寄解析信息
*
......
......@@ -41,12 +41,12 @@ public class ReportApi {
* @return
*/
@RequestMapping("queryDataAuditingReport")
public List<Map<String, Object>> queryDataAuditingReport(@RequestParam(value = "startDate") String startDate, @RequestParam(value = "endDate") String endDate, @RequestParam(value = "policeName") String policeName, @RequestParam(value = "policeCode") String policeCode, HttpServletRequest requ) {
public List<Map<String, Object>> queryDataAuditingReport(@RequestParam(value = "startDate") String startDate, @RequestParam(value = "endDate") String endDate, @RequestParam(value = "policeName") String policeName, @RequestParam(value = "policeCode") String policeCode,@RequestParam(value = "typeCode") String typeCode, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<Map<String, Object>> mapList = new ArrayList<>();
try {
mapList = dataAuditingService.selectDataAuditingReport(replaceDate(startDate), replaceDate(endDate), policeName, policeCode);
mapList = dataAuditingService.selectDataAuditingReport(replaceDate(startDate), replaceDate(endDate), policeName, policeCode,typeCode);
} catch (Exception e) {
logger.error("开始时间:" + startDate + "结束时间:" + endDate + "公安机关名称:" + policeName + "公安机关代码:" + policeCode);
logger.error("Exception 查询数据核验报表异常", e);
......
......@@ -34,6 +34,8 @@ public class TaskListApi {
private PreproPersonService preproPersonService;
@Autowired
private ReceiptService receiptService;
@Autowired
private FailedCardService failedCardService;
Logger logger = Logger.getLogger(TaskListApi.class);
......@@ -155,6 +157,17 @@ public class TaskListApi {
return objects;
}
/**
* 查询缺保存的任务单详情
* (受理库)
* (创建)
* @return
*/
@RequestMapping("queryByCounty")
public List<Object> queryByCounty(@RequestParam("groupNo1") String groupNo1,@RequestParam("groupNo2") String groupNo2) {
return taskListService.selectByCounty(groupNo1,groupNo2);
}
/**
* 查询组号列表详情
* 受理库
......@@ -464,13 +477,22 @@ public class TaskListApi {
@RequestMapping("createRedoTask")
@Transactional
public Map<String, Object> createRedoTask(@RequestBody String object) {
// JSONObject jsonObject = JSONObject.fromObject(object);
JSONArray jsonArray = JSONArray.fromObject(object);
Map<String, Object> map = new LinkedHashMap<>();
JSONArray jsonArray = new JSONArray();
jsonArray = JSONArray.fromObject(object);
for (Object o : jsonArray) {
JSONObject jsonObject = JSONObject.fromObject(o);
String acceptNo = jsonObject.getString("acceptNo");
String name = jsonObject.getString("name");
String note = jsonObject.getString("note");
String result = failedCardService.selectSpecialCard(acceptNo);
Map<String, Object> idMap;
//判断是否是特殊证件
if (result != null && result != "") {
idMap = failedCardService.selectDataById(acceptNo);
} else {
idMap = failedCardService.selectCountIdByCardId(acceptNo);
}
String name = jsonObject.getString("name");
//添加重做返回证任务单
TaskEntity taskEntity = new TaskEntity();
taskEntity.setCardType((long) 2);
......@@ -480,15 +502,13 @@ public class TaskListApi {
taskEntity.setNote(note);
taskListService.saveTask(taskEntity);
GroupNoEntity groupNoEntity = new GroupNoEntity();
groupNoEntity.setGroupNo(acceptNo);
groupNoEntity.setGroupNo(idMap.get("ACCEPT_NO").toString());
groupNoEntity.setInvalidCount((long) 0);
groupNoEntity.setValidCount((long) 1);
groupNoEntity.setSpecialCardCount((long) 0);
groupNoEntity.setTaskId(taskEntity.getTaskId());
groupNoService.saveGroupNo(groupNoEntity);
}
Map<String, Object> map = new LinkedHashMap<>();
map.put("msg", "成功添加重做返回证任务单");
return map;
}
......
package com.yxproject.start.api;
import com.yxproject.start.service.UtilService;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* Created by Administrator on 2019/6/18.
*/
@RestController
@RequestMapping("UtilApi")
public class UtilApi {
@Autowired
UtilService utilService;
Logger logger= Logger.getLogger(UtilApi.class);
/**
* 更新受理库导入时间
* @return
*/
@RequestMapping("updateImportTime")
public boolean updateImportTime(HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
utilService.updateImportTime();
}catch (Exception e){
logger.error("Exception 更新受理库导入时间异常", e);
}
return true;
}
/**
* 更新受理库处理标志
* @return
*/
@RequestMapping("updateDealFlag")
public boolean updateDealFlag(@RequestParam("dealFlag") String dealFlag, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
utilService.updateDealFlag(dealFlag);
}catch (Exception e){
logger.error("处理标志:" + dealFlag);
logger.error("Exception 更新受理库处理标志异常", e);
}
return true;
}
}
......@@ -32,15 +32,15 @@ public class queryPreproPerson {
*/
@RequestMapping("queryPreproPerson")
// @RequiresPermissions("userInfo.add")//权限管理;
public Map<String, Object> printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard") String IDCard, @RequestParam("oldFile") String oldFile, @RequestParam("newFile") String newFile, @RequestParam("SSXQDM") String SSXQDM, @RequestParam("cardType") String cardType, @RequestParam("state") String state, @RequestParam("uploadDate") String uploadDate, @RequestParam("currPage") String currPage, @RequestParam("pageSize") String pageSize, @RequestParam("downloadState") String downloadState, HttpServletResponse response, HttpServletRequest requ) {
public Map<String, Object> printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard") String IDCard, @RequestParam("oldFile") String oldFile, @RequestParam("newFile") String newFile, @RequestParam("SSXQDM") String SSXQDM, @RequestParam("cardType") String cardType, @RequestParam("state") String state, @RequestParam("uploadDate1") String uploadDate1, @RequestParam("uploadDate2") String uploadDate2,@RequestParam("currPage") String currPage, @RequestParam("pageSize") String pageSize, @RequestParam("downloadState") String downloadState, HttpServletResponse response, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
Map<String, Object> map = null;
try {
map = new LinkedHashMap<>();
List<Map<String, Object>> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate), currPage, pageSize, downloadState);
List<Map<String, Object>> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate1), replaceDate(uploadDate2), currPage, pageSize, downloadState);
//todo
List<Map<String, Object>> preproPersonEntityList = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate), downloadState);
List<Map<String, Object>> preproPersonEntityList = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate1), replaceDate(uploadDate2),downloadState);
map.put("total", preproPersonEntityList.size());
int youSum = 0;
int puSum = 0;
......@@ -60,7 +60,7 @@ public class queryPreproPerson {
map.put("puSum", puSum);
map.put("invaildCount", invaildCount);
} catch (Exception e) {
logger.error("oldFile:" + uploadNo + "公民身份号码:" + IDCard + "包号:" + oldFile + "文件名:" + newFile + "签发机关:" + SSXQDM + "制证类型代码(9邮寄0大批):" + cardType + "是否有效(1有效,0无效):" + state + "上传时间:" + uploadDate + "页数:" + currPage + "条数:" + pageSize + "生成时间:" + downloadState);
logger.error("oldFile:" + uploadNo + "公民身份号码:" + IDCard + "包号:" + oldFile + "文件名:" + newFile + "签发机关:" + SSXQDM + "制证类型代码(9邮寄0大批):" + cardType + "是否有效(1有效,0无效):" + state + "上传时间:" + replaceDate(uploadDate1) + replaceDate(uploadDate2) + "页数:" + currPage + "条数:" + pageSize + "生成时间:" + downloadState);
logger.error("Exception 查询制证数据异常", e);
}
return map;
......@@ -94,20 +94,18 @@ public class queryPreproPerson {
*/
@RequestMapping("queryPreproPersonCount")
// @RequiresPermissions("userInfo.add")//权限管理;
public Map<String, Object> queryPreproPersonCount(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard") String IDCard, @RequestParam("oldFile") String oldFile, @RequestParam("newFile") String newFile, @RequestParam("SSXQDM") String SSXQDM, @RequestParam("cardType") String cardType, @RequestParam("state") String state, @RequestParam("uploadDate") String uploadDate, @RequestParam("downloadState") String downloadState, HttpServletResponse response, HttpServletRequest requ) {
public int queryPreproPersonCount(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard") String IDCard, @RequestParam("oldFile") String oldFile, @RequestParam("newFile") String newFile, @RequestParam("SSXQDM") String SSXQDM, @RequestParam("cardType") String cardType, @RequestParam("state") String state, @RequestParam("uploadDate1") String uploadDate1, @RequestParam("uploadDate2") String uploadDate2, @RequestParam("downloadState") String downloadState, HttpServletResponse response, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
Map<String, Object> map = null;
int preproPersonEntityList = 0;
try {
map = new LinkedHashMap<>();
//todo
List<Map<String, Object>> preproPersonEntityList = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate), downloadState);
map.put("total", preproPersonEntityList.size());
preproPersonEntityList = preproPersonService.selectPreproPersonCount(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate1), replaceDate(uploadDate2), downloadState);
} catch (Exception e) {
logger.error("oldFile:" + uploadNo + "公民身份号码:" + IDCard + "包号:" + oldFile + "文件名:" + newFile + "签发机关:" + SSXQDM + "制证类型代码(9邮寄0大批):" + cardType + "是否有效(1有效,0无效):" + state + "上传时间:" + uploadDate + "页数:" + "生成时间:" + downloadState);
logger.error("oldFile:" + uploadNo + "公民身份号码:" + IDCard + "包号:" + oldFile + "文件名:" + newFile + "签发机关:" + SSXQDM + "制证类型代码(9邮寄0大批):" + cardType + "是否有效(1有效,0无效):" + state + "上传时间:" + uploadDate1 + uploadDate2 + "页数:" + "生成时间:" + downloadState);
logger.error("Exception 查询制证数据总数异常", e);
}
return map;
return preproPersonEntityList;
}
/**
......
......@@ -20,8 +20,8 @@ public interface CardDetailedListMapper {
/**
* 生成身份证详单
*/
@Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,POLICE_CODE,CARD_ID,NAME)VALUES(#{uploadNo},#{policeCode},#{cardId},#{name})")
public boolean saveCardDetailedList(@Param("uploadNo") String uploadNo, @Param("policeCode") String policeCode, @Param("cardId") String cardId, @Param("name") String name);
// @Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,POLICE_CODE,CARD_ID,NAME)VALUES(#{uploadNo},#{policeCode},#{cardId},#{name})")
// public boolean saveCardDetailedList(@Param("uploadNo") String uploadNo, @Param("policeCode") String policeCode, @Param("cardId") String cardId, @Param("name") String name);
/**
* 查询详单数据
......
......@@ -33,24 +33,25 @@ public interface DataAuditingMapper {
public List<Map<String, Object>> selectDataAuditingEntity(@Param("groupNo") String groupNo);
@Select("<script>" +
"select nvl(DIC.unit_name,'000000000') GAJG_MC,DATA_AUDITING.POLICE_SUBSTATION,\n" +
"sum(DATA_AUDITING.VALID_COUNT) VALID_COUNT, sum(DATA_AUDITING.INVALID_COUNT) inVALID_COUNT,\n" +
"to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') SUBMIT_DATE,CARD_TYPE_DIC.CARD_TYPE, \n" +
"CARD_TYPE_DIC.CARD_TYPE_ID, 1-(sum(DATA_AUDITING.VALID_COUNT)/(sum(DATA_AUDITING.VALID_COUNT)+sum(DATA_AUDITING.inVALID_COUNT))) Failure_rate\n" +
"from DATA_AUDITING left join TASK on TASK.TASK_ID = DATA_AUDITING.TASK_ID left join CARD_TYPE_DIC \n" +
"on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE\n" +
"left join DIC_UPLOAD_UNIT_t@ACCuYD_LINK DIC\n" +
"on substr(DIC.upload_unit_no,1,9) = substr(DATA_AUDITING.POLICE_SUBSTATION,1,9) \n" +
"select nvl(GAJG_DM.GAJG_MC,'000000000') GAJG_MC,DATA_AUDITING.POLICE_SUBSTATION,sum(DATA_AUDITING.VALID_COUNT) VALID_COUNT,\n" +
"sum(DATA_AUDITING.INVALID_COUNT) inVALID_COUNT,to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') SUBMIT_DATE,CARD_TYPE_DIC.CARD_TYPE,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,1-(sum(DATA_AUDITING.VALID_COUNT)/(sum(DATA_AUDITING.VALID_COUNT)+sum(DATA_AUDITING.inVALID_COUNT))) Failure_rate from DATA_AUDITING \n" +
"left join TASK on TASK.TASK_ID = DATA_AUDITING.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE " +
"left join GAJG_DM on GAJG_DM.GAJG_DM = DATA_AUDITING.POLICE_SUBSTATION\n" +
"where 1=1 " +
" <if test = 'policeName != null' >" +
" and DIC.unit_name like ${policeName}" +
" and GAJG_DM.GAJG_MC like ${policeName}"+
"</if>\n" +
" <if test = 'policeCode != null' >" +
" and DATA_AUDITING.POLICE_SUBSTATION like ${policeCode}" +
" and DATA_AUDITING.POLICE_SUBSTATION like ${policeCode}"+
"</if> " +
" <if test = 'typeCode != -1' >" +
" and TASK.CARD_TYPE = ${typeCode}"+
"</if> " +
" and to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') BETWEEN ${startDate} and ${endDate} \n" +
"group by nvl(DIC.unit_name,'000000000'),DATA_AUDITING.POLICE_SUBSTATION, to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd'), CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"group by nvl(GAJG_DM.GAJG_MC,'000000000'),DATA_AUDITING.POLICE_SUBSTATION, to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd'), CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"order by DATA_AUDITING.POLICE_SUBSTATION" +
"</script>")
public List<Map<String, Object>> selectDataAuditingReport(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("policeName") String policeName, @Param("policeCode") String policeCode);
public List<Map<String, Object>> selectDataAuditingReport(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("policeName") String policeName, @Param("policeCode") String policeCode,@Param("typeCode")String typeCode);
}
......@@ -20,18 +20,56 @@ public interface DeliveredInfoMapper {
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "ID")
public boolean saveDeliveredInfo(DeliveredInfoEntity deliveredInfoEntity);
@Select("select to_char(PRINT_DATE,'yyyyMMdd') PRINT_DATE ,count(PERSON_POST.WAYBILL_NUMBER) post_Count,\n" +
"sum(decode(DELIVERED_INFO.WAYBILL_NUMBER,null,0,1)) DELIVERED_count,\n" +
"sum(decode(DELIVERED_FAILED_INFO.WAYBILL_NUMBER,null,0,1)) DELIVERED_FAILED_count from PERSON_POST \n" +
@Select("<script>" +
"<if test = 'reportType == 0 ' >" +
"select to_char(PRINT_DATE,'yyyyMMdd') PRINT_DATE ,count(PERSON_POST.WAYBILL_NUMBER) post_Count,\n" +
"sum(decode(DELIVERED_INFO.deal_state,1,1,0)) DELIVERED_count,\n" +
"sum(decode(DELIVERED_INFO.deal_state,0,1,0)) DELIVERED_FAILED_count,\n" +
"'0' REPORT_TYPE \n" +
"from PERSON_POST \n" +
"left join DELIVERED_INFO on PERSON_POST.WAYBILL_NUMBER = DELIVERED_INFO.WAYBILL_NUMBER\n" +
"left join DELIVERED_FAILED_INFO on PERSON_POST.WAYBILL_NUMBER = DELIVERED_FAILED_INFO.WAYBILL_NUMBER\n" +
"where to_char(PRINT_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" +
"group by to_char(PRINT_DATE,'yyyyMMdd')")
public List<Map<String, Object>> selectReport(@Param("startDate") String startDate, @Param("endDate") String endDate);
@Select("select * from DELIVERED_IMPORT_DIC where TO_CHAR(IMPORT_DATE,'yyyyMMdd') = #{date} ")
public List<DeliveredImportDicEntity> selectDeliveredByImportDate(@Param("date") String date);
"where 1=1\n" +
"and to_char(PRINT_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" +
"group by to_char(PRINT_DATE,'yyyyMMdd')" +
"</if>\n" +
"<if test = 'reportType == 1' >" +
"select RECEIPT_DATE PRINT_DATE ,\n" +
"count(GREEN_PACKAGE_INFORMATION.WAYBILL_NUMBER) post_Count, sum(decode(DELIVERED_INFO.deal_state,1,1,0)) DELIVERED_count, \n" +
"sum(decode(DELIVERED_INFO.deal_state,0,1,0)) DELIVERED_FAILED_count, \n" +
"'1' REPORT_TYPE \n" +
"from GREEN_PACKAGE_INFORMATION \n" +
"left join DELIVERED_INFO on GREEN_PACKAGE_INFORMATION.WAYBILL_NUMBER = DELIVERED_INFO.WAYBILL_NUMBER \n" +
"where 1=1 and RECEIPT_DATE BETWEEN #{startDate} and #{endDate} group by RECEIPT_DATE" +
"</if>\n" +
" <if test = 'reportType == -1' >" +
"select to_char(PRINT_DATE,'yyyyMMdd') PRINT_DATE ,count(PERSON_POST.WAYBILL_NUMBER) post_Count,\n" +
"sum(decode(DELIVERED_INFO.deal_state,1,1,0)) DELIVERED_count,\n" +
"sum(decode(DELIVERED_INFO.deal_state,0,1,0)) DELIVERED_FAILED_count, \n" +
"'0' REPORT_TYPE \n" +
"from PERSON_POST \n" +
"left join DELIVERED_INFO on PERSON_POST.WAYBILL_NUMBER = DELIVERED_INFO.WAYBILL_NUMBER\n" +
"where 1=1\n" +
"and to_char(PRINT_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" +
"group by to_char(PRINT_DATE,'yyyyMMdd')" +
" UNION all\n" +
"select RECEIPT_DATE PRINT_DATE ,\n" +
"count(GREEN_PACKAGE_INFORMATION.WAYBILL_NUMBER) post_Count, sum(decode(DELIVERED_INFO.deal_state,1,1,0)) DELIVERED_count, \n" +
"sum(decode(DELIVERED_INFO.deal_state,0,1,0)) DELIVERED_FAILED_count, \n" +
"'1' REPORT_TYPE \n" +
"from GREEN_PACKAGE_INFORMATION \n" +
"left join DELIVERED_INFO on GREEN_PACKAGE_INFORMATION.WAYBILL_NUMBER = DELIVERED_INFO.WAYBILL_NUMBER \n" +
"where 1=1 and RECEIPT_DATE BETWEEN #{startDate} and #{endDate} group by RECEIPT_DATE" +
"</if> " +
"</script>")
public List<Map<String, Object>> selectReport(@Param("startDate") String startDate, @Param("endDate") String endDate,@Param("reportType")int reportType);
@Select("select FILE_NAME,IMPORT_DATE,IMPORT_NAME,DELIVERED_INFO.FILE_ID,sum(decode(DELIVERED_INFO.DEAL_STATE,1,1,0)) delive,\n" +
"sum(decode(DELIVERED_INFO.DEAL_STATE,0,1,0)) undelice \n" +
"from DELIVERED_IMPORT_DIC \n" +
"left join DELIVERED_INFO on DELIVERED_INFO.FILE_ID = DELIVERED_IMPORT_DIC.ID " +
"where TO_CHAR(IMPORT_DATE,'yyyyMMdd') = #{date} " +
"group by FILE_NAME,IMPORT_DATE,IMPORT_NAME,DELIVERED_INFO.FILE_ID order by to_char(import_date,'yyyy-mm-dd')")
public List<Map<String,Object>> selectDeliveredByImportDate(@Param("date") String date);
@Select("select DELIVERED_FAILED_INFO.*,DELIVERED_FAILED_REASON.REASON from DELIVERED_FAILED_INFO\n" +
"left join DELIVERED_FAILED_REASON on DELIVERED_FAILED_REASON.ID = DELIVERED_FAILED_INFO.BACK_REASON\n" +
......@@ -50,10 +88,15 @@ public interface DeliveredInfoMapper {
@Select("select * from DELIVERED_FAILED_REASON ")
public List<DeliveredFailedReasonEntity> selectDeliveredFailedType();
@Select("select to_char(PRINT_DATE,'yyyyMMdd') PRINT_DATE ,DELIVERED_INFO.WAYBILL_NUMBER\n" +
@Select("select PERSON_POST.WAYBILL_NUMBER , to_date(PRINT_DATE,'yyyy-MM-dd hh24:mi:ss') PRINT_DATE\n" +
"from PERSON_POST \n" +
"left join DELIVERED_INFO on PERSON_POST.WAYBILL_NUMBER = DELIVERED_INFO.WAYBILL_NUMBER\n" +
"where to_char(PRINT_DATE,'yyyyMMdd') in (${date}) and DELIVERED_INFO.DEAL_STATE =0")
"where to_char(PRINT_DATE,'yyyyMMdd') in (${date}) and DELIVERED_INFO.DEAL_STATE is NULL\n" +
"UNION all\n" +
"select GREEN_PACKAGE_INFORMATION.WAYBILL_NUMBER ,to_date(RECEIPT_DATE,'yyyy-MM-dd hh24:mi:ss') PRINT_DATE\n" +
"from GREEN_PACKAGE_INFORMATION \n" +
"left join DELIVERED_INFO on GREEN_PACKAGE_INFORMATION.WAYBILL_NUMBER = DELIVERED_INFO.WAYBILL_NUMBER \n" +
"where RECEIPT_DATE in (${date})")
public List<Map<String,Object>> selectDeliverData(@Param("date")String date);
@Select("select * from DETAIL_RECEIPT_LIST left join PERSON_POST on PERSON_POST.ID_CARD = DETAIL_RECEIPT_LIST.CARD_ID where PERSON_POST.BACK_WAYBILL_NUMBER = #{waybillNumber} and DETAIL_RECEIPT_LIST.CARD_ID = #{cardId} ")
......
......@@ -47,7 +47,7 @@ public interface FileNameDicMapper {
"<if test='uploadDate !=\"\" ' >" +
" and substr(UPLOAD_DATE,0,8) =#{uploadDate}" +
"</if>" +
"<if test='fileName != null ' >" +
"<if test='fileName != \"\" ' >" +
" and FILE_NAME =#{fileName}" +
"</if>" +
" </where>" +
......@@ -70,7 +70,7 @@ public interface FileNameDicMapper {
"<if test='uploadDate !=\"\"' >" +
" and substr(UPLOAD_DATE,0,8) = #{uploadDate}" +
"</if>" +
"<if test='fileName != null ' >" +
"<if test='fileName != \"\" ' >" +
" and FILE_NAME = #{fileName}" +
"</if> </where> </script>")
public List<FileNameDicEntity> queryFileNameDicCount(@Param("uploadDate") String uploadDate, @Param("fileName") String fileName, @Param("analysisState") long analysisState);
......
......@@ -11,14 +11,21 @@ public interface LogMapper {
@Select("select file_name_dic.upload_date,file_name_dic.FILE_NAME,file_name_dic.FILE_ID,count(*) as count,\n" +
"file_name_dic.FORM_START_TIME,file_name_dic.FORM_DEADLINE\n" +
"file_name_dic.FORM_START_TIME,file_name_dic.FORM_DEADLINE,file_name_dic.STATE \n" +
"from file_name_dic \n" +
"left join PERSON_POST on PERSON_POST.FILE_ID=file_name_dic.FILE_ID\n" +
"where subStr(file_name_dic.upload_date,0,8) =subStr( #{uploadDate},0,8) group by file_name_dic.upload_date, file_name_dic.FILE_ID,file_name_dic.FILE_NAME, file_name_dic.FORM_START_TIME, file_name_dic.FORM_DEADLINE\n" +
"where subStr(file_name_dic.upload_date,0,8) =subStr( #{uploadDate},0,8) group by file_name_dic.upload_date, file_name_dic.FILE_ID,file_name_dic.FILE_NAME, file_name_dic.FORM_START_TIME, file_name_dic.FORM_DEADLINE,file_name_dic.STATE\n" +
"\n")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
@Select("SELECT p.JMSFZSLH acceptNo,f.SOURCE_FILE_NAME fileName,p.XM name,p.GMSFHM cardId,f.DWMC filePoliceCode,g.GAJG_MC acceptPoliceCode\n" +
"FROM PREPRO_PERSON p " +
"LEFT JOIN FILES f ON p.FILE_ID = f.ID " +
"LEFT JOIN GAJG_DM g ON substr(p.JMSFZSLH,0,9) = g.GAJG_DM \n" +
"where TO_CHAR(f.UPLOAD_DATE,'yyyyMMddhh24miss') = #{uploadDate} " +
"and g.GAJG_MC != f.DWMC"
)
public List<Map<String,Object>> checkAcppetNo(@Param("uploadDate") String uploadDate);
//TODO XML的时间+post的file_id
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
......@@ -167,9 +174,9 @@ public interface LogMapper {
//查询身份数据
@Select("select distinct PREPRO_PERSON.JMSFZSLH, PREPRO_PERSON.GMSFHM,PREPRO_PERSON.YXQQSRQ,PREPRO_PERSON.YXQJZRQ,PREPRO_PERSON.SSXQDM FROM PREPRO_PERSON " +
"LEFT JOIN ANALYSIS ON ANALYSIS.FILE_ID = PREPRO_PERSON.FILE_ID " +
"LEFT JOIN PERSON_POST ON ANALYSIS.FILE_DIC_ID =PERSON_POST.FILE_ID " +
@Select("select DISTINCT PREPRO_PERSON.JMSFZSLH, PREPRO_PERSON.GMSFHM,PREPRO_PERSON.YXQQSRQ,PREPRO_PERSON.YXQJZRQ,PREPRO_PERSON.SSXQDM \n" +
"FROM PREPRO_PERSON LEFT JOIN PERSON_POST \n" +
"ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH \n" +
"WHERE PERSON_POST.FILE_ID=#{fileId}")
public List<Map<String,Object>> selectIdData(@Param("fileId")String fileId);
......@@ -186,16 +193,8 @@ public interface LogMapper {
@Update("update FILE_NAME_DIC set STATE = 1 WHERE FILE_ID =#{fileId} ")
public boolean changeFileState(@Param("fileId") String fileId);
//置空Person_post身份证号
@Update("UPDATE PERSON_POST SET ID_CARD=NULL where PERSON_POST.FILE_ID=#{fileId}")
public boolean updateNullIdDate(@Param("fileId")String fileId);
}
......@@ -22,7 +22,7 @@ public interface PersonPostMapper {
public boolean savePersonPost(PersonPostEntity personPostEntity);
@Update("update prepro_person p set IS_POST=9 where p.JMSFZSLH in ( select p.JMSFZSLH from prepro_person p left join files files on p.file_id=files.ID \n" +
"where JMSFZSLH in(select FIRST_WHITE from person_post where FILE_ID=#{fileId}) and files.CREAT_TIME=#{creatTime} );")
"where JMSFZSLH in(select FIRST_WHITE from person_post where FILE_ID=#{fileId}) and files.CREAT_TIME=#{creatTime} )")
public boolean updateIsPost(@Param("fileId")String fileId,@Param("creatTime") String creatTime);
@Select("SELECT * FROM PERSON_POST WHERE ID_CARD=#{idCard} AND BEGIN_USEFUL_LIFE=#{startDate} AND VALID_PERIOD_END=#{endDate}")
......@@ -39,7 +39,7 @@ public interface PersonPostMapper {
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
" left join PREPRO_PERSON on PERSON_POST.first_white = prepro_person.jmsfzslh " +
" WHERE 1=1" +
" <when test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = ${applicantName} </when>" +
" <when test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
"<when test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER = TO_NUMBER(${emailNo}) </when>" +
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=${orderNumber} </when>" +
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>" +
......@@ -47,14 +47,14 @@ public interface PersonPostMapper {
" <if test='notNull== 1 '> and PREPRO_PERSON.JMSFZSLH is not null </if>" +
" <if test='notNull== 0 '> and PREPRO_PERSON.JMSFZSLH is null </if>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=${latticeMouthInformation} </when>" +
" <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </when>" +
" <when test='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8)=${uploadDate} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty}) </when>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} </when>" +
"order by PERSON_POST.id ) " +
"A" +
")" +
"WHERE RN BETWEEN ${pageSize} AND ${firstIndex}" +
"</script>")
public List<PersonPostEntity> findAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,@Param("getToCounty")String getToCounty,@Param("uploadDate")String uploadDate,@Param("firstIndex")long firstIndex,@Param("pageSize")long pageSize,@Param("emailNo")String emailNo,@Param("notNull")int notNull);
public List <PersonPostEntity> findAllPersonalData( @Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("state") String state, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") String getToCounty, @Param("startDate") String startDate,@Param("endDate") String endDate, @Param("firstIndex") long firstIndex, @Param("pageSize") long pageSize, @Param("emailNo") String emailNo, @Param("notNull") int notNull );
@Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where ID=#{id}")
......@@ -77,10 +77,10 @@ public interface PersonPostMapper {
" <if test='notNull== 1 '> and PREPRO_PERSON.JMSFZSLH is not null </if>" +
" <if test='notNull== 0 '> and PREPRO_PERSON.JMSFZSLH is null </if>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( #{getToCounty} ) </when>" +
" <when test='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8)=#{uploadDate} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </when>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </when>" +
"</script>")
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") String getToCounty,@Param("uploadDate") String uploadDate,@Param("emailNo")String emailNo,@Param("notNull")String notNull);
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") String getToCounty,@Param("startDate") String startDate,@Param("endDate") String endDate, @Param("emailNo")String emailNo,@Param("notNull")String notNull);
......@@ -91,9 +91,9 @@ public interface PersonPostMapper {
" <when test='state!= null '> and PERSON_POST.STATE=#{state} </when>" +
" <when test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER = #{emailNo} </when>" +
" <when test='latticeMouthInformation!=null'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( #{getToCounty}) </when>" +
" <when test='uploadDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE=#{uploadDate} </when>")
public boolean deleteAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty ,@Param("uploadDate")String uploadDate);
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( #{getToCounty}) </when>" +
" <when test='startDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE between #{startDate} and #{endDate} </when>")
public boolean deleteAllPersonalData( @Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("state") String state, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") List <String> getToCounty, @Param("startDate") String startDate,@Param("endDate") String endDate );
......@@ -109,11 +109,11 @@ public interface PersonPostMapper {
@Delete("DELETE FROM PERSON_POST WHERE FILE_ID = #{fileId} and PRINT_DATE IS NULL")
public void deleteNoPrintPersonPostByFileId(@Param("fileId")String fileId);
@Select("SELECT distinct FILE_NAME_DIC.FILE_ID FROM FILE_NAME_DIC right join person_post on person_post.file_id =FILE_NAME_DIC.FILE_ID WHERE substr(UPLOAD_DATE,0,8)=#{date}")
public int selectFileIdByImportDate(@Param("date")String date);
@Select("SELECT distinct FILE_NAME_DIC.FILE_ID FROM FILE_NAME_DIC right join person_post on person_post.file_id =FILE_NAME_DIC.FILE_ID WHERE substr(UPLOAD_DATE,0,8) between ${startDate} and ${endDate}")
public int selectFileIdByImportDate( @Param("startDate") String startDate,@Param("endDate") String endDate );
@Select("SELECT count(*) FROM FILE_NAME_DIC a LEFT JOIN PERSON_POST b on a.FILE_ID=b.FILE_ID WHERE substr(a.UPLOAD_DATE,0,8)=#{date} AND b.PRINT_DATE IS NULL")
public int selectPersonalDataCountByImportDate(@Param("date")String date);
@Select("SELECT count(*) FROM FILE_NAME_DIC a LEFT JOIN PERSON_POST b on a.FILE_ID=b.FILE_ID WHERE b.PRINT_DATE IS NULL AND substr(a.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} ")
public int selectPersonalDataCountByImportDate( @Param("startDate") String startDate,@Param("endDate") String endDate );
@Select("<script> " +
......@@ -123,12 +123,14 @@ public interface PersonPostMapper {
" WHERE 1=1" +
" <when test='sqrxm!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{sqrxm} </when>" +
" <when test='ddh!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{ddh} </when>" +
" <when test='hasPrinted!=\"\"'> and PERSON_POST.STATE=#{hasPrinted} </when>" +
// " <when test='hasPrinted!=\"\"'> and PERSON_POST.STATE=#{hasPrinted} </when>" +
" <when test='hasPrinted== 0 '> and PERSON_POST.print_date is null </when>" +
" <when test='hasPrinted== 1 '> and PERSON_POST.print_date is not null </when>" +
" <when test='gkxx!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{gkxx} </when>" +
" <when test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER=TO_NUMBER(#{emailNo}) </when>" +
" <when test='str!=null'> and PERSON_POST.GET_TO_COUNTY in ( #{str} ) </when>" +
" <when test='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8)=#{uploadDate} </when>"+
" <when test='str!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${str} ) </when>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </when>" +
"</script>")
public List<PersonPostEntity> findAllPersonalDataNoPage(@Param("sqrxm") String sqrxm, @Param("ddh")String ddh, @Param("hasPrinted")String hasPrinted,
@Param("gkxx")String gkxx, @Param("str")String str, @Param("uploadDate")String uploadDate,@Param("emailNo")String emailNo);
public List <PersonPostEntity> findAllPersonalDataNoPage( @Param("sqrxm") String sqrxm, @Param("ddh") String ddh, @Param("hasPrinted") String hasPrinted,
@Param("gkxx") String gkxx, @Param("str") String str, @Param("startDate") String startDate,@Param("endDate") String endDate, @Param("emailNo") String emailNo );
}
......@@ -25,7 +25,7 @@ public interface PreproPersonMapper {
/*按条件查询制证数据*/
@Select({"<script> select * from (select a.*,rownum rn from(select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,IS_VALID,PREPRO_PERSON.ID,SOURCE_FILE_NAME,NEW_FILE_NAME from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.new_FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " +
@Select({"<script> select * from (select a.*,rownum rn from(select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,IS_VALID,PREPRO_PERSON.ID,SOURCE_FILE_NAME,NEW_FILE_NAME,files.dwdm,files.dwmc from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.new_FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " +
"<where> " +
" 1=1" +
"<if test='uploadNo != null '>" +
......@@ -41,7 +41,7 @@ public interface PreproPersonMapper {
"and NEW_FILES.NEW_FILE_NAME = #{newFile}"+
" </if> "+
" <if test='SSXQDM != null '> "+
"and PREPRO_PERSON.SSXQDM =#{SSXQDM}"+
"and files.DWDM =#{SSXQDM}"+
" </if>"+
" <if test='cardType != null '>"+
" and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}"+
......@@ -55,14 +55,15 @@ public interface PreproPersonMapper {
" <if test='downloadState == 0 '>"+
" and PREPRO_PERSON.NEW_FILE_ID is null"+
" </if> "+
" <if test='uploadDate != null '>"+
" and to_char(UPLOAD_DATE,'yyyyMMdd') = #{uploadDate}"+
" <if test='uploadDate1 != null '>"+
" and to_char(UPLOAD_DATE,'yyyyMMdd') between #{uploadDate1} and #{uploadDate2}"+
" </if> </where>"+
" order by JMSFZSLH ) a ) where rn between #{minNum} and #{maxNum} </script>"})
public List<Map<String,Object>> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate, @Param("minNum") long minNum, @Param("maxNum") long maxNum,@Param("downloadState")String downloadState);
public List<Map<String,Object>> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate1") String uploadDate1, @Param("uploadDate2") String uploadDate2, @Param("minNum") long minNum, @Param("maxNum") long maxNum,@Param("downloadState")String downloadState);
/*按条件查询制证数据*/
@Select({"<script> select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,FILES.ID,IS_VALID,SOURCE_FILE_NAME,NEW_FILE_NAME from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.new_FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " +
@Select({"<script> " +
"select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,FILES.ID,IS_VALID,SOURCE_FILE_NAME,NEW_FILE_NAME from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.new_FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " +
"<where> " +
" 1=1" +
"<if test='uploadNo != null '>" +
......@@ -78,7 +79,7 @@ public interface PreproPersonMapper {
"and NEW_FILES.NEW_FILE_NAME = #{newFile}"+
" </if> "+
" <if test='SSXQDM != null '> "+
"and PREPRO_PERSON.SSXQDM =#{SSXQDM}"+
"and files.DWDM =#{SSXQDM}"+
" </if>"+
" <if test='cardType != null '>"+
" and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}"+
......@@ -86,8 +87,8 @@ public interface PreproPersonMapper {
" <if test='state != -1 '>"+
" and PREPRO_PERSON.is_valid = #{state}"+
" </if> "+
" <if test='uploadDate != null '>"+
" and to_char(UPLOAD_DATE,'yyyyMMdd') = #{uploadDate}"+
" <if test='uploadDate1 != null '>"+
" and to_char(UPLOAD_DATE,'yyyyMMdd') between #{uploadDate1} and #{uploadDate2} "+
" </if> " +
" <if test='downloadState == 1 '>"+
" and PREPRO_PERSON.NEW_FILE_ID is not null"+
......@@ -97,7 +98,7 @@ public interface PreproPersonMapper {
" </if> "+
" </where> order by JMSFZSLH"+
" </script>"})
public List<Map<String,Object>> selectPreproPerson1(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate,@Param("downloadState") String downloadState);
public List<Map<String,Object>> selectPreproPerson1(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate1") String uploadDate1,@Param("uploadDate2") String uploadDate2,@Param("downloadState") String downloadState);
......@@ -141,6 +142,45 @@ public interface PreproPersonMapper {
public List<PreproPersonEntity> selectPreproPersonCount(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate,@Param("downloadState") String downloadState);
/*按条件查询制证数据*/
@Select({"<script> " +
"select COUNT(ROWNUM) total from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.new_FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " +
"<where> " +
" 1=1" +
"<if test='uploadNo != null '>" +
"and PREPRO_PERSON.JMSFZSLH = #{uploadNo}" +
"</if>" +
" <if test='IDCard != null '> "+
"and GMSFHM = #{IDCard} "+
"</if> "+
" <if test='oldFile != null '> "+
"and files.SOURCE_FILE_NAME =#{oldFile} "+
" </if> "+
" <if test='newFile != null '> "+
"and NEW_FILES.NEW_FILE_NAME = #{newFile}"+
" </if> "+
" <if test='SSXQDM != null '> "+
"and files.DWDM =#{SSXQDM}"+
" </if>"+
" <if test='cardType != null '>"+
" and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}"+
" </if> "+
" <if test='state != -1 '>"+
" and PREPRO_PERSON.is_valid = #{state}"+
" </if> "+
" <if test='uploadDate1 != null '>"+
" and to_char(UPLOAD_DATE,'yyyyMMdd') between #{uploadDate1} and #{uploadDate2} "+
" </if> " +
" <if test='downloadState == 1 '>"+
" and PREPRO_PERSON.NEW_FILE_ID is not null"+
" </if> "+
" <if test='downloadState == 0 '>"+
" and PREPRO_PERSON.NEW_FILE_ID is null"+
" </if> "+
" </where> order by JMSFZSLH"+
" </script>"})
public int selectPreproPersonTotal(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate1") String uploadDate1,@Param("uploadDate2") String uploadDate2,@Param("downloadState") String downloadState);
/*修改标记制证数据状态*/
@Update("UPDATE PREPRO_PERSON SET STATE = #{state} WHERE JMSFZSLH=#{acceptNo}")
public boolean updateState(@Param("state") String state, @Param("acceptNo") String acceptNo);
......
......@@ -72,6 +72,7 @@ public interface ReceiptMapper {
") </script>")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public long saveReceiptList(ReceiptListEntity receiptListEntity);
//根据身份证号查询交接单详单信息
@Select("select prod_card_t.upload_no," +
"PROD_CARD_T.ACCEPT_NO," +
......@@ -137,7 +138,7 @@ public interface ReceiptMapper {
"RECEIPT_LIST.QR_CODE,RECEIPT_LIST.RECEIPT_DATE,RECEIPT_LIST.FINISH_COUNT,GAJG_DM.GAJG_MC\n" +
"from detail_receipt_list left join RECEIPT_LIST on detail_receipt_list.RECEIPT_ID = RECEIPT_LIST.id\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"where receipt_id= #{receiptId}")
"where receipt_id= #{receiptId} order by detail_receipt_list.ACCEPT_NO")
public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId);
//根据传入的交接单ID和复核人ID插入复核人、复核时间、更改状态
......@@ -150,7 +151,7 @@ public interface ReceiptMapper {
//根据传入的交接单ID和复核人ID插入复核人、复核时间
@Update("update receipt_list set \n" +
"RECEIPT_DATE = sysdate \n" +
"RECEIPT_DATE = sysdate ,IS_PRINT=1 \n" +
"where id=#{receiptId}")
public boolean updateReceiptDateByReceiptId(@Param("receiptId") String receiptId);
......@@ -198,10 +199,11 @@ public interface ReceiptMapper {
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
" where is_print =0 and CHECK_DATE is not null " +
"<if test ='startDate != null'> " +
" where CHECK_DATE is not null and RECEIPT_LIST.IS_PRINT = 0 " +
"<if test ='startDate != \"\"'> " +
"and to_char(CHECK_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} " +
"</if>" +
" ORDER BY RECEIPT_LIST.POLICE_CODE" +
"</script> " +
"")
public List<Map<String,Object>> selectReceiptDateByCheckDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
......@@ -214,18 +216,20 @@ public interface ReceiptMapper {
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
" where to_char(RECEIPT_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} ")
" where to_char(RECEIPT_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} order by RECEIPT_LIST.id ")
public List<Map<String,Object>> selectReceiptDateByReceiptDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
@Select("select RECEIPT_LIST.id,RECEIPT_LIST.QR_CODE,RECEIPT_LIST.RECEIPT_DATE,RECEIPT_LIST.POLICE_CODE,decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID) CARD_TYPE_ID,\n" +
@Select("<script>" +
"select RECEIPT_LIST.id,RECEIPT_LIST.QR_CODE,to_char(RECEIPT_LIST.RECEIPT_DATE,'yyyy-MM-dd') RECEIPT_DATE,RECEIPT_LIST.POLICE_CODE,decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID) CARD_TYPE_ID,\n" +
"RECEIPT_LIST.FINISH_COUNT,GAJG_DM.GAJG_DM,GAJG_DM.GAJG_MC,to_char(CHECK_DATE,'yyyyMMdd') CHECK_DATE,RECEIPT_LIST.CHECK_NAME\n" +
",CARD_TYPE_DIC.CARD_TYPE,COUNTY_DIC.COUNTY_CODE ,COUNTY_DIC.COUNTYNAME from RECEIPT_LIST \n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
" where RECEIPT_LIST.id in (${string}) order by RECEIPT_LIST.QR_CODE ")
" where RECEIPT_LIST.id in (${string}) order by RECEIPT_LIST.id " +
"</script>")
public List<Map<String,Object>> selectReceiptDate(@Param("string") String string);
@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}")
......
......@@ -31,6 +31,16 @@ public interface TaskListMapper {
"order by ACC_GROUP_T.group_no")
public List<Map<String,Object>> selectByCountyAtACCU(@Param("submitDate") String submitDate);
@Select("select DISTINCT CARD_TYPE_DIC.*, PROD_GROUP_T.* ,'000000' COUNTY_CODE,'0000' COUNTYNAME,'3' DEAL_FLAG, '00000000' USER_CODE from PROD_CARD_T@PRODYD_LINK \n" +
"left join PROD_GROUP_T@PRODYD_LINK on substr(prod_card_t.accept_no,0,8) = prod_GROUP_T.group_no\n" +
"left join PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_RELATION_T.group_no =PROD_GROUP_T.group_no\n" +
"left join CARD_TYPE_DIC on decode(substr(ORIGINAL_NO,3,2),'99',6,substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"where \n" +
"PROD_GROUP_T.group_no not in (select group_no from group_no)\n" +
"and PROD_GROUP_T.GROUP_NO BETWEEN #{groupNo1} AND #{groupNo2}\n"+
"order by PROD_GROUP_T.group_no")
public List<Map<String,Object>> selectByCounty(@Param("groupNo1") String groupNo1,@Param("groupNo2") String groupNo2);
/**
* 组号列表查询
* 受理库
......@@ -1573,10 +1583,10 @@ public interface TaskListMapper {
"left join PROD_CARD_T@prodyd_link on SPECIAL_CARD.ACCEPT_NO = prod_card_t.ACCEPT_NO " +
"left join task on task.task_id =SPECIAL_CARD.task_id " +
"left join TASK_STATE_DIC ON TASK_STATE_DIC.TASK_STATE_ID = task.TASK_STATE_ID\n" +
"where to_char(SPECIAL_CARD.FILL_IN_DATE,'yyyyMMdd') = #{date} \n" +
"where to_char(SPECIAL_CARD.FILL_IN_DATE,'yyyyMMdd') = ${date} \n" +
"and SPECIAL_CARD.SPECIAL_TYPE=1 and SPECIAL_CARD.INITIATOR =#{name} " +
"order by SPECIAL_CARD.accept_no")
public List<Map<String, Object>> selectRemainderCardInfo(String date, String name);
public List<Map<String, Object>> selectRemainderCardInfo(@Param("date")String date, @Param("name")String name);
@Update("update failed_card set work_group = ${workGroup} where failed_card_ID = ${taskId}")
public boolean updateFailedCardWorkGroup(@Param("taskId")String taskId,@Param("workGroup") long workGroup);
......
package com.yxproject.start.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
* Created by Administrator on 2019/6/18.
*/
@Mapper
public interface UtilMapper {
/**
* 更新受理库导入时间
*/
@Update("UPDATE ACC_GROUP_T@ACCU_LINK SET IMPORT_TIME = SYSDATE")
public boolean updateImportTime();
/**
* 更新受理库处理标志
*/
@Update("UPDATE ACC_GROUP_T@ACCU_LINK SET SUBMIT_DATE = SYSDATE, DEAL_FLAG = #{dealFlag}")
public boolean updateDealFlag(String dealFlag);
}
......@@ -17,7 +17,7 @@ public interface CardDetailedListService {
public List<DetailReceiptListEntity> findCardDetailedListByIdCard(String idCard);
public List<Map<String,Object>> findAllCardDetailedListByIdCard(String idCard);
public boolean saveCardDetailedList(String uploadNo,String policeCode,String cardId,String name);
// public boolean saveCardDetailedList(String uploadNo,String policeCode,String cardId,String name);
}
......@@ -13,5 +13,4 @@ import java.util.Map;
public interface DataAuditingService {
public boolean saveDataAuditingList(List<DataAuditingEntity> dataAuditingEntityList);
public List<Map<String,Object>> selectDataAuditingList(String groupNo);
public List<Map<String,Object>> selectDataAuditingReport(String startDate,String endDate,String policeName,String policeCode);
}
public List<Map<String,Object>> selectDataAuditingReport(String startDate,String endDate,String policeName,String policeCode,String typeCode);}
......@@ -16,8 +16,8 @@ public interface DeliveredService {
public boolean saveDeliveredImportDic(DeliveredImportDicEntity deliveredImportDicEntity);
public boolean saveDeliveredInfoList(List<DeliveredInfoEntity> deliveredInfoEntityList);
public boolean saveDeliveredFailedInfoList(List<DeliveredFailedInfoEntity> deliveredFailedInfoEntities);
public List<Map<String,Object>> selectDeliveredReport(String startDate,String endDate);
public List<DeliveredImportDicEntity> selectDeliveredByImportDate(String date);
public List<Map<String,Object>> selectDeliveredReport(String startDate,String endDate, int reportType);
public List<Map<String,Object>> selectDeliveredByImportDate(String date);
public List<Map<String,Object>> selectDeliveredFailedByRegisterDate(String startDate,String endDate);
public boolean deleteDeliveredByFileId(long filedID);
public boolean deleteDeliveredFailedById(long id);
......
......@@ -10,11 +10,11 @@ import java.util.List;
* 2019/6/18 14:48
*/
public interface GreenPackageInformationService {
public boolean saveGreenPackageInformation(GreenPackageInformationEntity greenPackageInformationEntity);
public boolean saveGreenPackageInformation( GreenPackageInformationEntity greenPackageInformationEntity );
public long saveGreenPackageInformationFile(GreenPackageInformationFileEntity greenPackageInformationFileEntity);
public long saveGreenPackageInformationFile( GreenPackageInformationFileEntity greenPackageInformationFileEntity );
public List<GreenPackageInformationFileEntity> selectGreenPackageInformationFileEntity(String startDate, String endDate, String name);
public List<GreenPackageInformationFileEntity> selectGreenPackageInformationFileEntity( String startDate, String endDate, String name );
public boolean deleteGreenPackageInformationFileEntity(String id);
public boolean deleteGreenPackageInformationFileEntity( String id );
}
......@@ -20,6 +20,8 @@ public interface LogService {
public List<Map<String,Object>> selectAnalysisData(String uploadDate);
public List<Map<String,Object>> checkAcppetNo(String uploadDate);
public boolean changeCardType(String printDate,String latticeMouthInformation);
public boolean insertAnalysisDate(String printDate,String fileId);
......@@ -47,4 +49,6 @@ public interface LogService {
public boolean insertIdData(String cardId, String issuing,String beginDate,String endDate,String firstWhite );
public boolean updateNullIdDate(String fileId );
}
......@@ -28,21 +28,21 @@ public interface PersonPostService {
public boolean savePersonPost(List<PersonPostEntity> personPostEntities);
public List<PersonPostEntity> findPersonalData(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("uploadDate") String uploadDate,@Param("firstIndex") String firstIndex,@Param("pageSize") String pageSize, String emailNo,int notNull);
public List<PersonPostEntity> findPersonalData(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("firstIndex") String firstIndex,@Param("pageSize") String pageSize, String emailNo,int notNull);
public boolean deletePersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String uploadDate);
public boolean deletePersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String starDate,String endDate);
public boolean deletePersonalDataByImportDate(String date);
public boolean deletePersonalDataByImportDate(String startDate, String endDate);
public List<PersonPostEntity> getPostInfo(ReadCardDto readCardDto);
public boolean printPostList(int id, Date printDateTime);
public int findPersonalDataCount(String applicantName, String orderNumber, String state, String latticeMouthInformation, List<String> getToCounty, String uploadDate, String emailNo,String notNull);
public int findPersonalDataCount(String applicantName, String orderNumber, String state, String latticeMouthInformation, List<String> getToCounty, String startDate,String endDate, String emailNo,String notNull);
public int findPersonalDataCountByImportDate(String importDate);
public int findPersonalDataCountByImportDate(String starDate,String endDate);
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String uploadDate,String emailNo);
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray,String starDate,String endDate,String emailNo);
public Map<String,Object> selectNote(@Param("id")int id);
......
......@@ -17,13 +17,15 @@ public interface PreproPersonService {
public boolean updatePreproPersonIsValid(PreproPersonEntity preproPersonEntity);
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String currPage,String pageSize,String downloadState);
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String currPage,String pageSize,String downloadState);
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String downloadState);
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String downloadState);
public List<PreproPersonEntity> selectAllPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String downloadState);
public List<PreproPersonEntity> selectPreproPersonCount(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String downloadState);
public int selectPreproPersonCount(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String downloadState);
public boolean updatePreproPerson_NewFileName(List<PreproPersonEntity> preproPersonEntities);
}
......@@ -13,7 +13,7 @@ import java.util.Map;
public interface TaskListService {
public List<TaskListEntity> selectACCU(String submitDate,String countyCode,String Gajg);
// public List<TaskListEntity> selectACCU(String submitDate,String countyCode,String Gajg);
public boolean updateState(List<String> failedlist,List<String> list,String process,String name);
......@@ -23,6 +23,8 @@ public interface TaskListService {
public List<Object> selectByCountyAtACCU(String date);
public List<Object> selectByCounty(String groupNo1,String groupNo2);
public Map<String ,Object> selectByGroupNoAtACCU(String date, String typeCode, String countyCode,long currPage, long pageSize);
public List<Object> selectByCountyAtAuxiliary(long process);
......
package com.yxproject.start.service;
/**
* Created by Administrator on 2019/6/18.
*/
public interface UtilService {
public boolean updateImportTime();
public boolean updateDealFlag( String dealFlag );
}
......@@ -31,9 +31,9 @@ public class CardDetailedListServiceImpl implements CardDetailedListService {
}
@Override
public boolean saveCardDetailedList(String uploadNo, String policeCode, String cardId, String name) {
cardDetailedListMapper.saveCardDetailedList(uploadNo, policeCode, cardId, name);
return true;
}
// @Override
// public boolean saveCardDetailedList(String uploadNo, String policeCode, String cardId, String name) {
// cardDetailedListMapper.saveCardDetailedList(uploadNo, policeCode, cardId, name);
// return true;
// }
}
......@@ -36,7 +36,7 @@ public class DataAuditingServiceImpl implements DataAuditingService {
}
@Override
public List<Map<String, Object>> selectDataAuditingReport(String startDate, String endDate, String policeName, String policeCode) {
public List<Map<String, Object>> selectDataAuditingReport(String startDate, String endDate, String policeName, String policeCode,String typeCode) {
if ("".equals(policeName)) {
policeName = null;
} else {
......@@ -47,7 +47,7 @@ public class DataAuditingServiceImpl implements DataAuditingService {
} else {
policeCode = "'" + policeCode + "%'";
}
List<Map<String, Object>> maps = dataAuditingMapper.selectDataAuditingReport("'" + startDate + "'", "'" + endDate + "'", policeName, policeCode);
List<Map<String, Object>> maps = dataAuditingMapper.selectDataAuditingReport("'" + startDate + "'", "'" + endDate + "'", policeName, policeCode,typeCode);
Map<String, Object> sumMap = new LinkedHashMap<>();
int validCount = 0;
int invalidCount = 0;
......
......@@ -56,13 +56,13 @@ public class DeliveredServiceImpl implements DeliveredService {
}
@Override
public List<Map<String, Object>> selectDeliveredReport(String startDate, String endDate) {
List<Map<String, Object>> mapList = deliveredInfoMapper.selectReport(startDate, endDate);
public List<Map<String, Object>> selectDeliveredReport(String startDate, String endDate, int reportType) {
List<Map<String, Object>> mapList = deliveredInfoMapper.selectReport(startDate, endDate, reportType);
return mapList;
}
@Override
public List<DeliveredImportDicEntity>selectDeliveredByImportDate(String date) {
public List<Map<String,Object>>selectDeliveredByImportDate(String date) {
return deliveredInfoMapper.selectDeliveredByImportDate(date);
}
......
......@@ -29,7 +29,6 @@ public class DetailReceiptListServiceImpl implements DetailReceiptListService {
}
}
// str+=")";
if ("0".equals(isHistory)) {
detailReceiptListMapper.updateReceiptListEntityByCardId(str, name);
}
......
......@@ -54,6 +54,11 @@ public class LogServiceImpl implements LogService {
return logMapper.selectAnalysisData(uploadDate);
}
@Override
public List<Map<String,Object>> checkAcppetNo( String uploadDate){
return logMapper.checkAcppetNo(uploadDate);
}
@Override
public boolean changeCardType(String printDate, String fileId) {
logMapper.changeCardType(printDate,fileId);
......@@ -131,4 +136,10 @@ public class LogServiceImpl implements LogService {
logMapper.insertIdData(cardId,issuing,beginDate,endDate,firstWhite);
return true;
}
@Override
public boolean updateNullIdDate(String fileId){
logMapper.updateNullIdDate(fileId);
return true;
}
}
......@@ -55,8 +55,8 @@ public class PersonPostServiceImpl implements PersonPostService {
return true;
}
@Override
public List<PersonPostEntity> findPersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String uploadDate,String firstIndex,String pageSize,String emailNo,int notNull){
String str = null;
public List<PersonPostEntity> findPersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String startDate,String endDate,String firstIndex,String pageSize,String emailNo,int notNull){
String str = "";
long firstIndexLong= Long.valueOf(firstIndex);
long pageSizeLong = Long.valueOf(pageSize);
for (int i = 0;i<getToCounty.size();i++){
......@@ -66,21 +66,20 @@ public class PersonPostServiceImpl implements PersonPostService {
str+="'"+getToCounty.get(i)+"',";
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalData(applicantName,orderNumber,state,latticeMouthInformation,str,uploadDate,firstIndexLong * pageSizeLong,(firstIndexLong - 1) * pageSizeLong + 1,emailNo,notNull);
System.out.println("数据:"+list);
List<PersonPostEntity> list = personPostMapper.findAllPersonalData(applicantName,orderNumber,state,latticeMouthInformation,str,startDate,endDate,firstIndexLong * pageSizeLong,(firstIndexLong - 1) * pageSizeLong + 1,emailNo,notNull);
return list;
}
@Override
public boolean deletePersonalData(String applicantName, String orderNumber, String state, String latticeMouthInformation, List<String> getToCounty, String uploadDate) {
personPostMapper.deleteAllPersonalData(applicantName,orderNumber,state,latticeMouthInformation,getToCounty,uploadDate);
public boolean deletePersonalData(String applicantName, String orderNumber, String state, String latticeMouthInformation, List<String> getToCounty, String starDate,String endDate) {
personPostMapper.deleteAllPersonalData(applicantName,orderNumber,state,latticeMouthInformation,getToCounty,starDate,endDate);
return true;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deletePersonalDataByImportDate(String date) {
int id = personPostMapper.selectFileIdByImportDate(date);
public boolean deletePersonalDataByImportDate(String startDate, String endDate) {
int id = personPostMapper.selectFileIdByImportDate(startDate,endDate);
personPostMapper.deleteNoPrintPersonPostByFileId(id+"");
return true;
}
......@@ -100,8 +99,8 @@ public class PersonPostServiceImpl implements PersonPostService {
}
@Override
public int findPersonalDataCount(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("uploadDate") String uploadDate,String emailNo,String notNull) {
String str = null;
public int findPersonalDataCount(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("startDate") String startDate,@Param("endDate") String endDate,String emailNo,String notNull) {
String str = "";
for (int i = 0;i<getToCounty.size();i++){
if (i==getToCounty.size()-1){
str+="'"+getToCounty.get(i)+"'";
......@@ -109,19 +108,19 @@ public class PersonPostServiceImpl implements PersonPostService {
str+="'"+getToCounty.get(i)+"',";
}
}
int count=personPostMapper.findPersonalDataCount(applicantName,orderNumber,state,latticeMouthInformation,str,uploadDate,emailNo,notNull);
int count=personPostMapper.findPersonalDataCount(applicantName,orderNumber,state,latticeMouthInformation,str,startDate,endDate,emailNo,notNull);
return count;
}
@Override
public int findPersonalDataCountByImportDate(String importDate) {
int count = personPostMapper.selectPersonalDataCountByImportDate(importDate);
public int findPersonalDataCountByImportDate(String starDate,String endDate) {
int count = personPostMapper.selectPersonalDataCountByImportDate(starDate,endDate);
return count;
}
@Override
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String uploadDate,String emailNo) {
String str = null;
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String starDate,String endDate,String emailNo) {
String str = "";
for (int i = 0;i<jsonArray.size();i++){
if (i==jsonArray.size()-1){
str+="'"+jsonArray.get(i)+"'";
......@@ -129,7 +128,8 @@ public class PersonPostServiceImpl implements PersonPostService {
str+="'"+jsonArray.get(i)+"',";
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalDataNoPage(sqrxm,ddh,hasPrinted,gkxx,str,uploadDate,emailNo);
List<PersonPostEntity> list = personPostMapper.findAllPersonalDataNoPage(sqrxm,ddh,hasPrinted,gkxx,str,starDate,endDate,emailNo);
return list;
}
......
......@@ -26,21 +26,21 @@ public class PreproPersonServiceImpl implements PreproPersonService {
/**
* 分页查询制证数据详细信息
* @param uploadNo
* @param IDCard
* @param oldFile
* @param newFile
* @param uploadNo 上传受理号
* @param IDCard 身份证号
* @param oldFile 原文件名
* @param newFile 新文件名
* @param SSXQDM
* @param cardType
* @param state
* @param uploadDate
* @param uploadDate1
* @param currPage
* @param pageSize
* @return
*/
@Override
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String currPage,String pageSize,String downloadState) {
List<Map<String, Object>> mapList = preproPersonMapper.selectPreproPerson(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate), (Long.valueOf(currPage) - 1) * Long.valueOf(pageSize) + 1, Long.valueOf(currPage) * Long.valueOf(pageSize),downloadState);
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String currPage,String pageSize,String downloadState) {
List<Map<String, Object>> mapList = preproPersonMapper.selectPreproPerson(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate1),replace(uploadDate2), (Long.valueOf(currPage) - 1) * Long.valueOf(pageSize) + 1, Long.valueOf(currPage) * Long.valueOf(pageSize),downloadState);
return mapList;
}
......@@ -53,12 +53,12 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @param SSXQDM
* @param cardType
* @param state
* @param uploadDate
* @param uploadDate1
* @return
*/
@Override
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String downloadState) {
List<Map<String, Object>> mapList = preproPersonMapper.selectPreproPerson1(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate),downloadState);
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String downloadState) {
List<Map<String, Object>> mapList = preproPersonMapper.selectPreproPerson1(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate1), replace(uploadDate2),downloadState);
return mapList;
}
......@@ -94,9 +94,9 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @return
*/
@Override
public List<PreproPersonEntity> selectPreproPersonCount(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String downloadState) {
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPersonCount(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate),downloadState);
return preproPersonEntities;
public int selectPreproPersonCount(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String downloadState) {
int mapList = preproPersonMapper.selectPreproPersonTotal(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate1), replace(uploadDate2),downloadState);
return mapList;
}
/**
......
......@@ -32,11 +32,11 @@ public class TaskListServiceImpl implements TaskListService {
private DataAuditingMapper dataAuditingMapper;
@Override
public List<TaskListEntity> selectACCU(String submitDate, String countyCode, String Gajg) {
List<TaskListEntity> resultList = taskListMapper.selectACCU(submitDate, countyCode, Gajg);
return resultList;
}
// @Override
// public List<TaskListEntity> selectACCU(String submitDate, String countyCode, String Gajg) {
// List<TaskListEntity> resultList = taskListMapper.selectACCU(submitDate, countyCode, Gajg);
// return resultList;
// }
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -246,6 +246,129 @@ public class TaskListServiceImpl implements TaskListService {
return typeList;
}
/**
* 查询缺保存的任务单详情
* 制证库
* @return
*/
@Override
public List selectByCounty(String groupNo1,String groupNo2){
List<Map<String, Object>> maps = taskListMapper.selectByCounty(groupNo1,groupNo2);
Map<String, Object> typeMap = new LinkedHashMap<>();
//将查询出结果 按制证类型分成 Map
for (Map o : maps) {
// 组合JSON
if (typeMap != null && typeMap.containsKey(o.get("CARD_TYPE") + "")) {
List<Map<String, Object>> mapList = (List<Map<String, Object>>) typeMap.get(o.get("CARD_TYPE") + "");
mapList.add(o);
typeMap.put(o.get("CARD_TYPE") + "", mapList);
} else {
List<Map<String, Object>> mapList = new ArrayList<>();
mapList.add(o);
typeMap.put(o.get("CARD_TYPE") + "", mapList);
}
}
//将已按制证分好的Map 再次细化分为区县Map
for (String type : typeMap.keySet()) {
List<Map<String, Object>> mapList = (List<Map<String, Object>>) typeMap.get(type);
Map<String, Object> typemap = new LinkedHashMap<>();
int i = 0;
for (Map<String, Object> o : mapList) {
if (typemap.containsKey(i + "")) {
List<Map<String, Object>> maplist = (List<Map<String, Object>>) typemap.get(i + "");
if (maplist.size() >= 30) {
i++;
List<Map<String, Object>> maplist1 = new ArrayList<>();
maplist1.add(o);
typemap.put(i + "", maplist1);
continue;
} else {
maplist.add(o);
typemap.put(i + "", maplist);
continue;
}
} else {
List<Map<String, Object>> maplist = new ArrayList<>();
maplist.add(o);
typemap.put(i + "", maplist);
continue;
}
}
typeMap.put(type, typemap);
}
List<Map<String, Object>> typeList = new ArrayList<>();
for (String type : typeMap.keySet()) {
Map<String, Object> mapType = new LinkedHashMap<>();
int typeSum = 0;
String typeName = null;
List<Map<String, Object>> countyList = new ArrayList<>();
Map<String, List<Map<String, Object>>> mapList = (Map<String, List<Map<String, Object>>>) typeMap.get(type);
int num = 0;
for (String county : mapList.keySet()) {
Map<String, Object> countyMapGroup = new LinkedHashMap<>();
int validCount = 0;
int invalidCount = 0;
String countyName = null;
Object submitDate = null;
long dealFlag = 3;
List<Map<String, Object>> countyMapList = mapList.get(county);
for (Map<String, Object> countyMap : countyMapList) {
submitDate = countyMap.get("SUBMIT_DATE");
countyName = countyMap.get("COUNTYNAME") + "";
typeName = countyMap.get("CARD_TYPE_ID") + "";
if (Long.valueOf(countyMap.get("DEAL_FLAG") + "") < dealFlag) {
dealFlag = Long.valueOf(countyMap.get("DEAL_FLAG") + "");
} else {
}
typeSum += Integer.valueOf(countyMap.get("VALID_COUNT") + "");
validCount += Integer.valueOf(countyMap.get("VALID_COUNT") + "");
invalidCount += Integer.valueOf(countyMap.get("INVALID_COUNT") + "");
}
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + ""));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
}
countyMapGroup.put("countyCode", county);
countyMapGroup.put("dealFlag", dealFlag);
countyMapGroup.put("groupList", countyMapList);
countyMapGroup.put("saveDate", submitDate);
num++;
countyMapGroup.put("id", num);
countyMapGroup.put("countyName", countyName);
countyMapGroup.put("countyValidCount", validCount);
countyMapGroup.put("countyInvalidCount", invalidCount);
countyList.add(countyMapGroup);
}
mapType.put("typeCode", typeName);
mapType.put("typeSum", typeSum);
mapType.put("typeName", type);
mapType.put("countyList", countyList);
typeList.add(mapType);
}
return typeList;
}
/**
* 查询组号列表详情
* 受理库
......@@ -1201,6 +1324,42 @@ public class TaskListServiceImpl implements TaskListService {
return "";
}
private String createGroupNoMiss(List<String> c, List<String> nsList) {
try {
String groupNo = "";
c.add(nsList.get(0));
for (int i = 0; i < nsList.size() - 1; ++i) {
String t = nsList.get(i);
String n = nsList.get(i + 1);
String l = String.valueOf(Integer.parseInt(t.substring(1,8))+1);
String m = n.substring(1,8);
if (l.equals(m)) {
c.add(nsList.get(i + 1));
} else {
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
}
c.clear();
c.add(nsList.get(i + 1));
}
}
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
}
return groupNo;
} catch (Exception e) {
}
return "";
}
private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
Map<String, Object> typeMap = new LinkedHashMap<>();
......
package com.yxproject.start.service.impl;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.UtilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by Administrator on 2019/6/18.
*/
@Service
public class UtilServiceImpl implements UtilService {
@Autowired
private UtilMapper utilMapper;
@Override
public boolean updateImportTime () {
utilMapper.updateImportTime();
return true;
}
@Override
public boolean updateDealFlag(String dealFlag) {
utilMapper.updateDealFlag(dealFlag);
return true;
}
}
......@@ -7,6 +7,8 @@ import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by zhangdahui on 2017/8/23.
......@@ -36,6 +38,11 @@ public class YXStringUtils {
return str;
}
public static String getCurrentDate2String(String pattern) {
SimpleDateFormat dt = new SimpleDateFormat(pattern);
return dt.format(new Date());
}
public static String inputStream2String(InputStream is) {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
......@@ -95,14 +102,12 @@ public class YXStringUtils {
return encoder.encode(data);
}
public static byte[] inputStream2byte(InputStream inStream) throws IOException {
ByteArrayOutputStream swapStream = new ByteArrayOutputStream();
byte[] buff = new byte[100];
int rc;
while ((rc = inStream.read(buff, 0, 100)) > 0) {
swapStream.write(buff, 0, rc);
}
return swapStream.toByteArray();
public static byte[] inputStream2byte(String filename) throws IOException,FileNotFoundException {
FileInputStream fis = new FileInputStream(new File(filename));
byte[] b = new byte[fis.available()];
fis.read(b);
fis.close();
return b;
}
public static void saveDom2File(Document document, String filepath) throws IOException {
......
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