Commit 77dbdb4a authored by guantiantian's avatar guantiantian

Merge branch 'dev' of…

Merge branch 'dev' of http://39.101.130.244:8000/zhangyusheng/YX_IDENT_beijing_auxiliary_YD into dev
parents febd932a 1cb6788d
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......@@ -9,16 +9,16 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yxproject</groupId>
<artifactId>start</artifactId>
<artifactId>start_yd</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>start</name>
<name>start_yd</name>
<description>Demo project for Spring Boot</description>
<properties>
<properties>
<java.version>1.8</java.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
......@@ -101,16 +101,28 @@
<artifactId>poi-ooxml</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</build>
</project>
......@@ -85,7 +85,7 @@ public class ExportXMLApi {
//区分邮寄证和大批证件类型
//大批证
if (cardTypeId == 0) {
if (cardTypeId == 0 || cardTypeId == 10) {
List list = new ArrayList();
List<PreproPersonDto> preproPersonEntityList = (List<PreproPersonDto>) map.get(cardTypeId);
Map<String, Object> mapFileId = new LinkedHashMap<>();
......@@ -140,7 +140,7 @@ public class ExportXMLApi {
List<PreproPersonDto> preproPersonEntityList1 = (List<PreproPersonDto>) list1;
List<FilesEntity> filesEntities = filesService.selectFilesEntityById(preproPersonEntityList1.get(0).getFileId().toString());
FilesEntity filesEntity = new FilesEntity();
if (preproPersonEntityList1.get(0).getCardTypeId() == 9) {
if (preproPersonEntityList1.get(0).getCardTypeId() == 9 || preproPersonEntityList1.get(0).getCardTypeId() == 11) {
filesEntity.setVersionCode("3.00");
filesEntity.setCreateTime(getCurrentDate2String("yyyyMMddhhmmss"));
filesEntity.setDwmc("北京市公安局人口管理总队证件管理大队");
......@@ -211,6 +211,10 @@ public class ExportXMLApi {
* @throws IOException 可能出现文件写入不成功
*/
private String createToMakePackageXML(List<PreproPersonDto> preproPersonEntities, FilesEntity filesEntity, String url) throws IOException,ParseException {
// 重新设置包名中的类型代码为0或9
long cardTypeTem = preproPersonEntities.get(0).getCardTypeId();
if (cardTypeTem == 10) cardTypeTem = 0;
if (cardTypeTem == 11) cardTypeTem = 9;
Document document = DocumentHelper.createDocument();
Element PACKAGE = DocumentHelper.createElement("PACKAGE");
document.setRootElement(PACKAGE);
......@@ -221,7 +225,12 @@ public class ExportXMLApi {
Element DWDM = PACKAGEHEAD.addElement("DWDM");
DWDM.setText(filesEntity.getDwdm());
Element DWMC = PACKAGEHEAD.addElement("DWMC");
// 判断是否为异地首申普 如果是则需要在单位名称上添加【北京市公安局】 异地首申邮寄不用加
if (preproPersonEntities.get(0).getCardTypeId() == 10) {
DWMC.setText("北京市公安局" + filesEntity.getDwmc());
} else {
DWMC.setText(filesEntity.getDwmc());
}
Element JLS = PACKAGEHEAD.addElement("JLS");
JLS.setText(preproPersonEntities.size() + "");
Element SCSJ = PACKAGEHEAD.addElement("SCSJ");
......@@ -235,11 +244,11 @@ public class ExportXMLApi {
long l = newFilesService.saveNewFiles(newFilesEntity);
String xml_seq = querySequenceSercive.selectSequenceNextValue("XML_SEQ");
String files_seq = autoGenericCode(xml_seq, 4);
newFilesEntity.setNewFileName("ZAGL_ZZJH_" + filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + preproPersonEntities.get(0).getCardTypeId() + files_seq);
newFilesEntity.setNewFileName("ZAGL_ZZJH_" + filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + cardTypeTem + files_seq);
newFilesService.updateNewFileName(newFilesEntity);
Element SJBBH = PACKAGEHEAD.addElement("SJBBH");
SJBBH.setText(filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + preproPersonEntities.get(0).getCardTypeId() + files_seq);
SJBBH.setText(filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + cardTypeTem + files_seq);
int NO = 1;
long cardType = 0;
for (PreproPersonDto preproPersonEntity : preproPersonEntities) {
......@@ -295,7 +304,8 @@ public class ExportXMLApi {
NO++;
preproPersonEntity.setNewFileId(newFilesEntity.getId());
cardType = preproPersonEntity.getCardTypeId();
if (cardType == 10) cardType = 0;
if (cardType == 11) cardType = 9;
//民族文字 sid=010210
if (preproPersonEntity.getSid().equals("010210")){
......
......@@ -44,11 +44,13 @@ import static com.yxproject.start.utils.YXStringUtils.stripNonDigits;
@RequestMapping("personPostApi")
public class PersonPostApi {
@Autowired
PersonPostService personPostService;
private final PersonPostService personPostService;
Logger logger = Logger.getLogger(PersonPostApi.class);
public PersonPostApi(PersonPostService personPostService) {
this.personPostService = personPostService;
}
/**
* 查询备注信息
......@@ -202,6 +204,8 @@ public class PersonPostApi {
jsonObject = JSONObject.fromObject(jsonStr);
String applicantName = jsonObject.getString("applicantName");
String orderNumber = jsonObject.getString("orderNumber");
String jmsfzslh = jsonObject.getString("jmsfzslh");
String idCard = jsonObject.getString("idCard");
String state = jsonObject.getString("state");
String district = jsonObject.getString("district");
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
......@@ -211,7 +215,8 @@ public class PersonPostApi {
String emailNo = jsonObject.getString("emailNo");
String notNull = jsonObject.getString("notNull");
String printDate = stripNonDigits(jsonObject.getString("printDate"));
count = personPostService.findPersonalDataCount(applicantName, orderNumber, state, district,latticeMouthInformation, jsonArray, startDate,endDate, emailNo, notNull,printDate);
Long gk = jsonObject.getLong("gk");
count = personPostService.findPersonalDataCount(applicantName, orderNumber, jmsfzslh, idCard, state, district,latticeMouthInformation, jsonArray, startDate,endDate, emailNo, notNull,printDate, gk);
} catch (Exception e) {
logger.error("个人邮寄信息:" + jsonObject);
logger.error("Exception 按条件查询个人邮寄信息异常", e);
......@@ -236,6 +241,8 @@ public class PersonPostApi {
jsonObject = JSONObject.fromObject(jsonStr);
String applicantName = jsonObject.getString("applicantName");
String orderNumber = jsonObject.getString("orderNumber");
String jmsfzslh = jsonObject.getString("jmsfzslh");
String idCard = jsonObject.getString("idCard");
String state = jsonObject.getString("state");
String district = jsonObject.getString("district");
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
......@@ -247,7 +254,8 @@ public class PersonPostApi {
String emailNo = jsonObject.getString("emailNo");
int notNull = Integer.parseInt((jsonObject.getString("notNull")));
String printDate = stripNonDigits(jsonObject.getString("printDate"));
list = personPostService.findPersonalData(applicantName, orderNumber, state,district, latticeMouthInformation, jsonArray, startDate, endDate, firstIndex, pageSize, emailNo, notNull,printDate);
Long gk = jsonObject.getLong("gk");
list = personPostService.findPersonalData(applicantName, orderNumber, jmsfzslh, idCard, state, district, latticeMouthInformation, jsonArray, startDate, endDate, firstIndex, pageSize, emailNo, notNull,printDate, gk);
} catch (Exception e) {
logger.error("个人邮寄信息:" + jsonObject);
logger.error("Exception 按条件查询个人邮寄信息异常", e);
......@@ -324,14 +332,14 @@ public class PersonPostApi {
@RequestMapping("download")
public void exportExcel(HttpServletRequest request, HttpServletResponse response,
@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, @RequestParam("hasPrinted") String hasPrinted,@RequestParam("district") String district,
@RequestParam("djx") List<String> djx, @RequestParam("gkxx") String gkxx, @RequestParam("ddh") String ddh, @RequestParam("notNull") String notNull,
@RequestParam("djx") List<String> djx, @RequestParam("gkxx") String gkxx, @RequestParam("ddh") String ddh, @RequestParam("notNull") String notNull,@RequestParam(value = "gk") Long gk,
@RequestParam("sequence") String sequence, @RequestParam("sqrxm") String sqrxm, @RequestParam("emailNo") String emailNo,@RequestParam("printDate") String printDate) throws Exception {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
JSONArray jsonArray = new JSONArray();
try {
jsonArray = JSONArray.fromObject(djx);
List<PersonPostEntity> list = personPostService.downLoadReportForm(request, response, sqrxm, ddh, hasPrinted,district, gkxx, jsonArray, replaceDate(startDate),replaceDate(endDate), emailNo,stripNonDigits(printDate),notNull);
List<PersonPostEntity> list = personPostService.downLoadReportForm(request, response, sqrxm, ddh, hasPrinted,district, gkxx, jsonArray, replaceDate(startDate),replaceDate(endDate), emailNo,stripNonDigits(printDate),notNull, gk);
exportExcel(request, response, list);
} catch (Exception e) {
logger.error("上传时间:" + startDate + endDate + "类型普证-0,邮寄-9:" + hasPrinted + "格口信息:" + gkxx + "订单号:" + ddh + "申请人姓名:" + sqrxm + "运单号码:" + emailNo);
......@@ -346,13 +354,18 @@ public class PersonPostApi {
public List<PersonPostEntity> findPersonalData(@RequestBody ReadCardDto readCardDto, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<PersonPostEntity> list = new ArrayList<PersonPostEntity>();
List<PersonPostEntity> list = new ArrayList<>();
try {
list = personPostService.getPostInfo(readCardDto);
} catch (Exception e) {
logger.error("身份证号:" + readCardDto.getIdCard() + "起始时间" + readCardDto.getStartDate() + "截止时间" + readCardDto.getEndDate());
logger.error("Exception 刷身份证查询邮寄单信息详情异常", e);
}
for (PersonPostEntity entity : list) {
if (entity.getLatticeMouthInformation().trim().equals("调用新一代接口批量获取四级分拣码失败")) {
entity.setLatticeMouthInformation("获取分拣码失败");
}
}
return list;
}
......@@ -510,7 +523,7 @@ public class PersonPostApi {
HSSFRow firstRow = sheet.createRow(0);
String[] rowTitle = {"订单号", "寄件人姓名", "寄件人电话2", "寄件人详细地址", "收件人姓名", "收件人手机号",
"收件人邮编", "邮件号", "内件性质", "重量", "长", "宽", "高", "收件人城市", "收件人区县", "收件人详细地址",
"回单标识", "回单运单号", "商品名称", "内件号", "内件名称"};
"回单标识", "回单运单号", "商品名称", "内件号", "内件名称", "特安标识"};
for (int i = 0; i < rowTitle.length; i++) {
HSSFCell cell = firstRow.createCell(i);
cell.setCellValue(rowTitle[i]);
......@@ -537,6 +550,7 @@ public class PersonPostApi {
sheet.setColumnWidth(18, (int) ((8.55 + 0.72) * 256));
sheet.setColumnWidth(19, (int) ((6.64 + 0.72) * 256));
sheet.setColumnWidth(20, (int) ((19.55 + 0.72) * 256));
sheet.setColumnWidth(21, (int) ((19.55 + 0.72) * 256));
for (int i = 0; i < records.size(); i++) {
HSSFRow row = sheet.createRow(i + 1);
PersonPostEntity personPostEntity = records.get(i);
......@@ -572,6 +586,8 @@ public class PersonPostApi {
// cell.setCellValue(personPostEntity.getBackWaybillNumber());
cell = row.createCell(20);
cell.setCellValue(personPostEntity.getLatticeMouthInformation());
cell = row.createCell(21);
cell.setCellValue(1);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日生产导出");
String fileName = simpleDateFormat.format(new Date()) + ".xls";
......@@ -622,10 +638,9 @@ public class PersonPostApi {
@RequestParam("strDate") String strDate, @RequestParam("endDate") String endDate) throws Exception {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
JSONArray jsonArray = new JSONArray();
try {
List<Map<String,Object>> list = personPostService.downloadUploadInfo(request, response, replaceDate(strDate),replaceDate(endDate));
String name=replaceDate(strDate)+"-"+replaceDate(endDate);
String name = replaceDate(strDate)+"-"+replaceDate(endDate);
exportUploadInfoExcel(request, response, list,name);
} catch (Exception e) {
logger.error("上传时间:" + strDate + endDate );
......@@ -635,7 +650,7 @@ public class PersonPostApi {
/**
* 创建报表
*/
private void exportUploadInfoExcel(HttpServletRequest request, HttpServletResponse response, List<Map<String,Object>> records,String name) throws Exception {
private void exportUploadInfoExcel(HttpServletRequest request, HttpServletResponse response, List<Map<String,Object>> records,String name) {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
......@@ -724,7 +739,8 @@ public class PersonPostApi {
@RequestMapping("downLoadInvalidOrder")
public void exportInvalidOrderExcel(HttpServletRequest request, HttpServletResponse response,
@RequestParam("beginDate") String beginDate,@RequestParam("endDate") String endDate) throws Exception {
@RequestParam("beginDate") String beginDate,@RequestParam("endDate") String endDate,
@RequestParam(defaultValue = "-1", name = "gk") Long gk) throws Exception {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
......@@ -842,6 +858,7 @@ public class PersonPostApi {
*/
@RequestMapping("getPostInfoAtMachine")
public List<PersonPostDto> getPostInfoAtMachine(@RequestBody ReadCardDto readCardDto) {
logger.debug("机器刷卡:"+ readCardDto.toString());
return personPostService.getPostInfoAtMachine(readCardDto);
}
......@@ -853,14 +870,17 @@ public class PersonPostApi {
*/
@RequestMapping("updatePrintDateAtMachine")
public Map<String, Object> updatePrintDateAtMachine(@RequestParam("id") int id) throws ParseException {
logger.debug("收到机打回馈:"+ id);
Map<String, Object> map = new HashMap<>();
if (personPostService.updatePrintDateAtMachine(id, new Date())){
map.put("code",200);
map.put("msg","打印状态更新成功!");
logger.debug("机打状态更新成功"+ id);
return map;
}else {
map.put("code",201);
map.put("msg","打印状态更新失败!");
logger.debug("机打状态更新失败"+ id);
return map;
}
}
......
......@@ -2,6 +2,7 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.*;
import com.yxproject.start.service.FileNameDicService;
import com.yxproject.start.service.GkDicService;
import com.yxproject.start.service.GreenPackageInformationService;
import com.yxproject.start.service.PersonPostService;
import com.yxproject.start.utils.ReadExcel;
......@@ -11,7 +12,6 @@ import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -38,15 +38,19 @@ import java.util.*;
@RequestMapping("ReadExcel")
public class ReadExcelApi {
@Autowired
PersonPostService personPostService;
@Autowired
FileNameDicService fileNameDicService;
@Autowired
GreenPackageInformationService greenPackageInformationService;
private final PersonPostService personPostService;
private final FileNameDicService fileNameDicService;
private final GreenPackageInformationService greenPackageInformationService;
private final GkDicService gkDicService;
Logger logger = Logger.getLogger(ReadExcelApi.class);
public ReadExcelApi(PersonPostService personPostService, FileNameDicService fileNameDicService, GreenPackageInformationService greenPackageInformationService, GkDicService gkDicService) {
this.personPostService = personPostService;
this.fileNameDicService = fileNameDicService;
this.greenPackageInformationService = greenPackageInformationService;
this.gkDicService = gkDicService;
}
/**
* 导入个人邮寄信息表
*/
......@@ -72,7 +76,7 @@ public class ReadExcelApi {
// 设置上传文件总量的最大值,最大值=同时上传的多个文件的大小的最大值的和,目前设置为4000MB
upload.setSizeMax(1024 * 1024 * 4000);
// 将普通属性存入map中,之后调用
Map<String, String> map = new HashMap<String, String>();
Map<String, String> map = new HashMap<>();
List<FileItem> list = null;
int post=0;
int backPost=0;
......@@ -117,9 +121,10 @@ public class ReadExcelApi {
fileNameDicEntity.setUploadDate(simpleDateFormat.format(new Date()));
fileNameDicEntity.setFormStartTime(replaceDate(startDate));
fileNameDicEntity.setFormDeadline(replaceDate(endDate));
fileNameDicEntity.setState((long) 0);
fileNameDicEntity.setState(0L);
fileNameDicService.saveFileNameDic(fileNameDicEntity);
//保存个人邮寄信息
Map<String, Long> gkMap = gkDicService.getGkDicMap();
List<PersonPostEntity> entityList = new ArrayList<>();
for (int i = 0; i < list1.size(); i++) {
PersonPostEntity personPostEntity = new PersonPostEntity();
......@@ -159,6 +164,7 @@ public class ReadExcelApi {
personPostEntity.setNatureOfTheInformation((String) list2.get(23));
personPostEntity.setFirstWhite(list2.get(24).toString().substring(5, 27));
personPostEntity.setFileId(fileNameDicEntity.getFileId());
personPostEntity.setGk(gkMap);
entityList.add(personPostEntity);
}
personPostService.savePersonPost(entityList);
......
......@@ -3,6 +3,7 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.entity.ReceiptListEntity;
import com.yxproject.start.service.ReceiptService;
import com.yxproject.start.utils.YdssUtils;
import net.sf.json.JSON;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
......@@ -160,6 +161,8 @@ public class ReceiptApi {
ReceiptListEntity receiptListEntity=new ReceiptListEntity();
Long card_type=Long.valueOf((BigDecimal) receiptListDate.get(i).get("CARD_TYPE") + "");
receiptListEntity.setCardTypeId(card_type);
String slh = receiptListDate.get(i).get("UPLOAD_NO").toString();
boolean ydss = YdssUtils.personIsYdss(slh);
//个人邮寄证,单位代码保存为北京市公安局
if(card_type == 9){
receiptListEntity.setPoliceCode("110001580800");
......@@ -170,16 +173,18 @@ public class ReceiptApi {
//个人邮寄分局代码使用110001名称使异地个人邮寄
//普通证通过制证包派出所单位代码获取分局
receiptListEntity.setFjdm(receiptListDate.get(0).get("FJDM").toString());
String fjmc=null;
String fjmc;
if (card_type == 9) {
receiptListEntity.setFjdm("110001");
fjmc = "北京市公安局";
if (ydss) receiptListEntity.setCardTypeId(11L);
} else if (card_type == 5) {
fjmc=receiptListDate.get(0).get("FJMC").toString()+"(港澳)";
} else if (card_type == 7) {
fjmc=receiptListDate.get(0).get("FJMC").toString()+"(台湾)";
}else {
fjmc=receiptListDate.get(0).get("FJMC").toString();
if (ydss) receiptListEntity.setCardTypeId(10L);
}
if ("null".equals(receiptListDate.get(i).get("OLD_CARD_TYPE") + "")){
......@@ -322,6 +327,12 @@ public class ReceiptApi {
//todo 校验大批证中是否存在邮寄证
receiptListEntity.setQrCode(acceptNo);//封签编号
receiptListEntity.setCardTypeId(Long.valueOf(cardType));//制证类型
boolean ydss = YdssUtils.personIsYdss(uploadNo);
if (ydss) {
if (receiptListEntity.getCardTypeId() == 9) receiptListEntity.setCardTypeId(11L);
if (receiptListEntity.getCardTypeId() == 8) receiptListEntity.setCardTypeId(10L);
}
if ("null".equals(oldCardType)){
}else{
......@@ -334,6 +345,7 @@ public class ReceiptApi {
//普通证通过制证包派出所单位代码获取分局
switch (cardType){
case "9":
case "11":
receiptListEntity.setPoliceCode("110001580800");
receiptListEntity.setFjdm("110001");
break;
......@@ -425,6 +437,12 @@ public class ReceiptApi {
case "9":
resultMap.get(i).put("FJMC", "异地速递");
break;
case "10":
resultMap.get(i).put("FJMC", "异地证(本市系统)普");
break;
case "11":
resultMap.get(i).put("FJMC", "异地证(本市系统)邮");
break;
}
}
......@@ -468,6 +486,12 @@ public class ReceiptApi {
case "9":
resultMap.get(i).put("FJMC", "异地速递");
break;
case "10":
resultMap.get(i).put("FJMC", "异地证(本市系统)普");
break;
case "11":
resultMap.get(i).put("FJMC", "异地证(本市系统)邮");
break;
}
//判断是否是特证
if (groupNo.length() == 10) {//受理号长度为10
......
......@@ -44,6 +44,8 @@ public class queryPreproPerson {
map.put("total", preproPersonEntityList.size());
int youSum = 0;
int puSum = 0;
int yidishoushenpuSum = 0; //异地首申普
int yidishoushenyouSum = 0; //异地首申邮
int invaildCount = 0;
for (Map<String, Object> map1 : preproPersonEntityList) {
if ("9".equals(map1.get("CARD_TYPE_ID") + "")) {
......@@ -51,6 +53,8 @@ public class queryPreproPerson {
} else if ("0".equals(map1.get("CARD_TYPE_ID") + "")) {
puSum++;
}
if ("10".equals(map1.get("CARD_TYPE_ID") + "")) yidishoushenpuSum++;
if ("11".equals(map1.get("CARD_TYPE_ID") + "")) yidishoushenyouSum++;
if ("0".equals(map1.get("IS_VALID") + "")) {
invaildCount++;
}
......@@ -58,6 +62,8 @@ public class queryPreproPerson {
map.put("list", preproPersonEntities);
map.put("youSum", youSum);
map.put("puSum", puSum);
map.put("ydsspuSum", yidishoushenpuSum);
map.put("ydssyouSum", yidishoushenyouSum);
map.put("invaildCount", invaildCount);
} catch (Exception e) {
logger.error("oldFile:" + uploadNo + "公民身份号码:" + IDCard + "包号:" + oldFile + "文件名:" + newFile + "签发机关:" + SSXQDM + "制证类型代码(9邮寄0大批):" + cardType + "是否有效(1有效,0无效):" + state + "上传时间:" + replaceDate(uploadDate1) + replaceDate(uploadDate2) + "页数:" + currPage + "条数:" + pageSize + "生成时间:" + downloadState);
......
package com.yxproject.start.entity;
import lombok.ToString;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
@ToString
@Entity
@Table(name = "FILES", schema = "YINGXIN", catalog = "")
public class FilesEntity {
......
package com.yxproject.start.entity;
import lombok.*;
import javax.persistence.*;
@Data
@Entity
@Table(name = "GK_DIC", schema = "YINGXIN", catalog = "")
public class GkDicEntity {
/**
* id
*/
@Id
@Column(name = "ID")
private Long id;
/**
* 省
*/
@Basic
@Column(name = "PROVINCE")
private String province;
/**
* 市
*/
@Basic
@Column(name = "CITY")
private String city;
/**
* 区县
*/
@Basic
@Column(name = "DISTRICT")
private String district;
/**
* 对应字母
*/
@Basic
@Column(name = "LETTER")
private String letter;
/**
* 机构名称
*/
@Basic
@Column(name = "NAME")
private String organName;
/**
* 对应编码
*/
@Basic
@Column(name = "CODE")
private String code;
/**
* 格口
*/
@Basic
@Column(name = "GK")
private Long gk;
}
package com.yxproject.start.entity;
import lombok.*;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
@Data
@Entity
@Table(name = "PERSON_POST", schema = "YX", catalog = "")
public class PersonPostEntity {
@Basic@Column(name = "WAYBILL_NUMBER")
private String waybillNumber;
@Basic@Column(name = "BACK_WAYBILL_NUMBER")
private String backWaybillNumber;
@Basic@Column(name = "ORDER_NUMBER")
private String orderNumber;
@Basic@Column(name = "CREATE_DATE")
private String createDate;
@Basic@Column(name = "OPENID")
private String openid;
@Basic@Column(name = "WC_PLAY_ORDER_NUMBER")
private String wcPlayOrderNumber;
@Basic@Column(name = "PLAY_STATE")
private String playState;
@Basic@Column(name = "ORDER_STATE")
private String orderState;
@Basic@Column(name = "APPLICANT_NAME")
private String applicantName;
@Basic@Column(name = "SENDER_NAME")
private String senderName;
@Basic@Column(name = "SENDER_PHONE")
private String senderPhone;
@Basic@Column(name = "SENDER_ADDRESS")
private String senderAddress;
@Basic@Column(name = "RECIPIENT_NAME")
private String recipientName;
@Basic@Column(name = "RECIPIENT_PHONE")
private String recipientPhone;
@Basic@Column(name = "RECIPIENT_ADDRESS")
private String recipientAddress;
@Basic@Column(name = "ORDER_BLANK_NUMBER")
private String orderBlankNumber;
@Basic@Column(name = "GET_TO_PROVINCE")
private String getToProvince;
@Basic@Column(name = "GET_TO_CITY")
private String getToCity;
@Basic@Column(name = "GET_TO_COUNTY")
private String getToCounty;
@Basic@Column(name = "BUSINESS_TYPE")
private String businessType;
@Basic@Column(name = "LATTICE_MOUTH_INFORMATION")
private String latticeMouthInformation;
@Basic@Column(name = "NATURE_OF_THE_INTERNAL")
private String natureOfTheInternal;
@Basic@Column(name = "NATURE_OF_THE_INFORMATION")
private String natureOfTheInformation;
@Basic@Column(name = "FIRST_WHITE")
private String firstWhite;
@Basic@Column(name = "ID_CARD")
private String idCard;
@Basic@Column(name = "ACCEPT_THE_MATTER")
private String acceptTheMatter;
@Basic@Column(name = "BEGIN_USEFUL_LIFE")
private String beginUsefulLife;
@Basic@Column(name = "VALID_PERIOD_END")
private String validPeriodEnd;
@Basic@Column(name = "NOTE")
private String note;
@Basic@Column(name = "STATE")
private Long state;
@Basic@Column(name = "UPLOAD_DATE")
private Time uploadDate;
@Basic@Column(name = "FILE_ID")
private Long fileId;
@Basic@Column(name = "ANALYSIS_DATE")
private Time analysisDate;
@Basic@Column(name = "PRINT_DATE")
private Date printDate;
@Basic@Column(name = "FORM_START_TIME")
private Time formStartTime;
@Basic@Column(name = "FORM_DEADLINE")
private Time formDeadline;
@Id@Column(name = "ID")
private long id;
@Basic@Column(name = "STATE1")
private Long state1;
@Basic@Column(name = "BIRTH_DATE")
private String birthDate;
@Basic@Column(name = "STATUS")
private String status;
@Basic
@Column(name = "WAYBILL_NUMBER")
public String getWaybillNumber() {
return waybillNumber;
}
public void setWaybillNumber(String waybillNumber) {
this.waybillNumber = waybillNumber;
}
@Basic
@Column(name = "BACK_WAYBILL_NUMBER")
public String getBackWaybillNumber() {
return backWaybillNumber;
}
public void setBackWaybillNumber(String backWaybillNumber) {
this.backWaybillNumber = backWaybillNumber;
}
@Basic
@Column(name = "ORDER_NUMBER")
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
@Basic
@Column(name = "CREATE_DATE")
public String getCreateDate() {
return createDate;
}
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
@Basic
@Column(name = "OPENID")
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
@Basic
@Column(name = "WC_PLAY_ORDER_NUMBER")
public String getWcPlayOrderNumber() {
return wcPlayOrderNumber;
}
public void setWcPlayOrderNumber(String wcPlayOrderNumber) {
this.wcPlayOrderNumber = wcPlayOrderNumber;
}
@Basic
@Column(name = "PLAY_STATE")
public String getPlayState() {
return playState;
}
public void setPlayState(String playState) {
this.playState = playState;
}
@Basic
@Column(name = "ORDER_STATE")
public String getOrderState() {
return orderState;
}
public void setOrderState(String orderState) {
this.orderState = orderState;
}
@Basic
@Column(name = "APPLICANT_NAME")
public String getApplicantName() {
return applicantName;
}
public void setApplicantName(String applicantName) {
this.applicantName = applicantName;
}
@Basic
@Column(name = "SENDER_NAME")
public String getSenderName() {
return senderName;
}
public void setSenderName(String senderName) {
this.senderName = senderName;
}
@Basic
@Column(name = "SENDER_PHONE")
public String getSenderPhone() {
return senderPhone;
}
public void setSenderPhone(String senderPhone) {
this.senderPhone = senderPhone;
}
@Basic
@Column(name = "SENDER_ADDRESS")
public String getSenderAddress() {
return senderAddress;
}
public void setSenderAddress(String senderAddress) {
this.senderAddress = senderAddress;
}
@Basic
@Column(name = "RECIPIENT_NAME")
public String getRecipientName() {
return recipientName;
}
public void setRecipientName(String recipientName) {
this.recipientName = recipientName;
}
@Basic
@Column(name = "RECIPIENT_PHONE")
public String getRecipientPhone() {
return recipientPhone;
}
public void setRecipientPhone(String recipientPhone) {
this.recipientPhone = recipientPhone;
}
@Basic
@Column(name = "RECIPIENT_ADDRESS")
public String getRecipientAddress() {
return recipientAddress;
}
public void setRecipientAddress(String recipientAddress) {
this.recipientAddress = recipientAddress;
}
@Basic
@Column(name = "ORDER_BLANK_NUMBER")
public String getOrderBlankNumber() {
return orderBlankNumber;
}
public void setOrderBlankNumber(String orderBlankNumber) {
this.orderBlankNumber = orderBlankNumber;
}
@Basic
@Column(name = "GET_TO_PROVINCE")
public String getGetToProvince() {
return getToProvince;
}
public void setGetToProvince(String getToProvince) {
this.getToProvince = getToProvince;
}
@Basic
@Column(name = "GET_TO_CITY")
public String getGetToCity() {
return getToCity;
}
public void setGetToCity(String getToCity) {
this.getToCity = getToCity;
}
@Basic
@Column(name = "GET_TO_COUNTY")
public String getGetToCounty() {
return getToCounty;
}
public void setGetToCounty(String getToCounty) {
this.getToCounty = getToCounty;
}
@Basic
@Column(name = "BUSINESS_TYPE")
public String getBusinessType() {
return businessType;
}
public void setBusinessType(String businessType) {
this.businessType = businessType;
}
@Basic
@Column(name = "LATTICE_MOUTH_INFORMATION")
public String getLatticeMouthInformation() {
return latticeMouthInformation;
}
public void setLatticeMouthInformation(String latticeMouthInformation) {
this.latticeMouthInformation = latticeMouthInformation;
@Basic@Column(name = "GK")
private Long gk;
/**
* 设置格口 0-5 截取excel中格口(010-010-B14-214)第三段 判断对应的格口序号
*
* @param gkMap 字典表中的格口map
*/
public void setGk(Map<String, Long> gkMap) {
this.gk = 0L;
String[] gkArray = latticeMouthInformation.split("-");
if (gkArray.length == 4) {
Long trueGk = gkMap.get(gkArray[2]);
if (trueGk != null) this.gk = trueGk;
}
@Basic
@Column(name = "NATURE_OF_THE_INTERNAL")
public String getNatureOfTheInternal() {
return natureOfTheInternal;
}
public void setNatureOfTheInternal(String natureOfTheInternal) {
this.natureOfTheInternal = natureOfTheInternal;
}
@Basic
@Column(name = "NATURE_OF_THE_INFORMATION")
public String getNatureOfTheInformation() {
return natureOfTheInformation;
}
public void setNatureOfTheInformation(String natureOfTheInformation) {
this.natureOfTheInformation = natureOfTheInformation;
}
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "FIRST_WHITE")
public String getFirstWhite() {
return firstWhite;
}
public void setFirstWhite(String firstWhite) {
this.firstWhite = firstWhite;
}
@Basic
@Column(name = "ID_CARD")
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
@Basic
@Column(name = "ACCEPT_THE_MATTER")
public String getAcceptTheMatter() {
return acceptTheMatter;
}
public void setAcceptTheMatter(String acceptTheMatter) {
this.acceptTheMatter = acceptTheMatter;
}
public void setValidPeriodEnd(String validPeriodEnd) {
this.validPeriodEnd = validPeriodEnd;
}
@Basic
@Column(name = "BEGIN_USEFUL_LIFE")
public String getBeginUsefulLife() {
return beginUsefulLife;
}
@Basic
@Column(name = "VALID_PERIOD_END")
public void setBeginUsefulLife(String beginUsefulLife) {
this.beginUsefulLife = beginUsefulLife;
}
public String getValidPeriodEnd() {
return validPeriodEnd;
}
@Basic
@Column(name = "NOTE")
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
@Basic
@Column(name = "STATE")
public Long getState() {
return state;
}
public void setState(Long state) {
this.state = state;
}
@Basic
@Column(name = "STATE1")
public Long getState1() {
return state1;
}
public void setState1(Long state1) {
this.state1 = state1;
}
@Basic
@Column(name = "UPLOAD_DATE")
public Time getUploadDate() {
return uploadDate;
}
public void setUploadDate(Time uploadDate) {
this.uploadDate = uploadDate;
}
@Basic
@Column(name = "FILE_ID")
public Long getFileId() {
return fileId;
}
public void setFileId(Long fileId) {
this.fileId = fileId;
}
@Basic
@Column(name = "ANALYSIS_DATE")
public Time getAnalysisDate() {
return analysisDate;
}
public void setAnalysisDate(Time analysisDate) {
this.analysisDate = analysisDate;
}
@Basic
@Column(name = "PRINT_DATE")
public Date getPrintDate() {
return printDate;
}
public void setPrintDate(Date printDate) {
this.printDate = printDate;
}
@Basic
@Column(name = "FORM_START_TIME")
public Time getFormStartTime() {
return formStartTime;
}
public void setFormStartTime(Time formStartTime) {
this.formStartTime = formStartTime;
}
@Basic
@Column(name = "FORM_DEADLINE")
public Time getFormDeadline() {
return formDeadline;
}
public void setFormDeadline(Time formDeadline) {
this.formDeadline = formDeadline;
}
@Basic
@Column(name = "BIRTH_DATE")
public String getBirthDate() {
return birthDate;
}
public void setBirthDate(String birthDate) {
this.birthDate = birthDate;
}
@Basic
@Column(name = "STATUS")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PersonPostEntity that = (PersonPostEntity) o;
return Objects.equals(waybillNumber, that.waybillNumber) &&
Objects.equals(backWaybillNumber, that.backWaybillNumber) &&
Objects.equals(orderNumber, that.orderNumber) &&
Objects.equals(createDate, that.createDate) &&
Objects.equals(openid, that.openid) &&
Objects.equals(wcPlayOrderNumber, that.wcPlayOrderNumber) &&
Objects.equals(playState, that.playState) &&
Objects.equals(orderState, that.orderState) &&
Objects.equals(applicantName, that.applicantName) &&
Objects.equals(senderName, that.senderName) &&
Objects.equals(senderPhone, that.senderPhone) &&
Objects.equals(senderAddress, that.senderAddress) &&
Objects.equals(recipientName, that.recipientName) &&
Objects.equals(recipientPhone, that.recipientPhone) &&
Objects.equals(recipientAddress, that.recipientAddress) &&
Objects.equals(orderBlankNumber, that.orderBlankNumber) &&
Objects.equals(getToProvince, that.getToProvince) &&
Objects.equals(getToCity, that.getToCity) &&
Objects.equals(getToCounty, that.getToCounty) &&
Objects.equals(businessType, that.businessType) &&
Objects.equals(latticeMouthInformation, that.latticeMouthInformation) &&
Objects.equals(natureOfTheInternal, that.natureOfTheInternal) &&
Objects.equals(natureOfTheInformation, that.natureOfTheInformation) &&
Objects.equals(firstWhite, that.firstWhite) &&
Objects.equals(idCard, that.idCard) &&
Objects.equals(acceptTheMatter, that.acceptTheMatter) &&
Objects.equals(beginUsefulLife, that.beginUsefulLife) &&
Objects.equals(validPeriodEnd, that.validPeriodEnd) &&
Objects.equals(note, that.note) &&
Objects.equals(state, that.state) &&
Objects.equals(state1, that.state1) &&
Objects.equals(uploadDate, that.uploadDate) &&
Objects.equals(fileId, that.fileId) &&
Objects.equals(analysisDate, that.analysisDate) &&
Objects.equals(printDate, that.printDate) &&
Objects.equals(formStartTime, that.formStartTime) &&
Objects.equals(id, that.id) &&
Objects.equals(birthDate, that.birthDate) &&
Objects.equals(status, that.status) &&
Objects.equals(formDeadline, that.formDeadline);
}
@Override
public int hashCode() {
return Objects.hash(waybillNumber, backWaybillNumber,id,state1, orderNumber, createDate, openid, wcPlayOrderNumber, playState, orderState, applicantName, senderName, senderPhone, senderAddress, recipientName, recipientPhone, recipientAddress, orderBlankNumber, getToProvince, getToCity, getToCounty, businessType, latticeMouthInformation, natureOfTheInternal, natureOfTheInformation, firstWhite, idCard, acceptTheMatter, beginUsefulLife, validPeriodEnd, note, state, uploadDate, fileId, analysisDate, printDate, formStartTime, formDeadline,birthDate,status);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.FileNameDicEntity;
import com.yxproject.start.entity.GATTrackEntity;
import com.yxproject.start.entity.GATTrackFileEntity;
import org.apache.ibatis.annotations.*;
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.GkDicEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface GkDicMapper {
@Select("SELECT * FROM GK_DIC")
List<GkDicEntity> findAll();
}
......@@ -40,7 +40,21 @@ public interface LogMapper {
//TODO XML的时间+post的file_id
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
// @Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
// "WHERE JMSFZSLH in (\n" +
// "SELECT PREPRO_PERSON.JMSFZSLH \n" +
// "FROM PERSON_POST \n" +
// "LEFT JOIN PREPRO_PERSON ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
// "LEFT JOIN FILES ON FILES.ID=PREPRO_PERSON.FILE_ID "+
// "WHERE (PERSON_POST.STATE1 = 3 OR PERSON_POST.STATE1 = 0) " +
// "AND PERSON_POST.BIRTH_DATE = PREPRO_PERSON.CSRQ " +
// "AND TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} )")
// public boolean changeCardTypeByPrintDate(@Param("printDate")String printDate);
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID = CASE " +
" WHEN CARD_TYPE_ID = 0 THEN 9 " +
" WHEN CARD_TYPE_ID = 10 THEN 11 " +
" ELSE CARD_TYPE_ID " +
" END \n" +
"WHERE JMSFZSLH in (\n" +
"SELECT PREPRO_PERSON.JMSFZSLH \n" +
"FROM PERSON_POST \n" +
......
......@@ -17,18 +17,18 @@ import java.util.Map;
@Mapper
public interface PersonPostMapper {
@Insert("insert into PERSON_POST " +
"( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,FILE_ID,STATE1,BIRTH_DATE) " +
"( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,FILE_ID,STATE1,BIRTH_DATE,GK) " +
"values " +
"(#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#{fileId},3,#{birthDate})")
"(#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#{fileId},3,#{birthDate},#{gk})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
public boolean savePersonPost(PersonPostEntity personPostEntity);
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} )")
public boolean updateIsPost(@Param("fileId")String fileId,@Param("creatTime") String creatTime);
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} AND STATE1=0")
public List<PersonPostEntity> findAllByIdCardAndStartDateAndEndDate(@Param("idCard") String idCard, @Param("startDate")String startDate, @Param("endDate")String endDate);
List<PersonPostEntity> findAllByIdCardAndStartDateAndEndDate(@Param("idCard") String idCard, @Param("startDate") String startDate, @Param("endDate") String endDate);
......@@ -42,8 +42,10 @@ public interface PersonPostMapper {
" 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='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER = TO_NUMBER(${emailNo}) </when>" +
" <when test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER = TO_NUMBER(${emailNo}) </when>" +
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=${orderNumber} </when>" +
" <when test='jmsfzslh!=\"\"'> and PERSON_POST.FIRST_WHITE=#{jmsfzslh} </when>" +
" <when test='idCard!=\"\"'> and PERSON_POST.ID_CARD=#{idCard} </when>" +
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>" +
" <if test='state== 1 '> and PERSON_POST.print_date is not null </if>" +
" <when test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </when>" +
......@@ -51,8 +53,11 @@ public interface PersonPostMapper {
" <if test='notNull== 1 '> and PERSON_POST.state1=1 </if>" +
" <if test='notNull== 0 '> and PERSON_POST.state1=0 </if>" +
" <if test='notNull== 3 '> and PERSON_POST.state1=3 </if>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=${latticeMouthInformation} </when>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty}) </when>" +
" <if test='GK== 0 '> and GK = 0 </if>" +
" <if test='GK== 1 '> and GK in (1,2,3,4) </if>" +
" <if test='GK== 5 '> and GK = 5</if>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} </when>" +
" <when test='printDate!=\"\"'> and to_char(PERSON_POST.print_Date,'yyyyMMdd') = ${printDate} </when>" +
"order by substr(PERSON_POST.first_white,-13) ) " +
......@@ -61,15 +66,15 @@ public interface PersonPostMapper {
"WHERE RN BETWEEN ${pageSize} AND ${firstIndex}" +
" order by rn " +
"</script>")
public List <PersonPostEntity> findAllPersonalData( @Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("state") String state,@Param("district") String district, @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 , @Param("printDate") String printDate);
List <PersonPostEntity> findAllPersonalData(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("jmsfzslh") String jmsfzslh, @Param("idCard") String idCard, @Param("state") String state, @Param("district") String district, @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, @Param("printDate") String printDate, @Param("GK") Long gk);
@Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where FIRST_WHITE=#{uploadId}")
public List<Map<String,Object>> selectNote(@Param("uploadId")String uploadId);
List<Map<String,Object>> selectNote(@Param("uploadId") String uploadId);
@Update("UPDATE PERSON_POST SET NOTE = #{note},STATE1 = 1 where FIRST_WHITE = #{uploadNo}")
public boolean addNote(@Param("uploadNo")String uploadNo,@Param("note")String note);
boolean addNote(@Param("uploadNo") String uploadNo, @Param("note") String note);
@Select("<script> " +
"SELECT COUNT(*) FROM PERSON_POST \n" +
......@@ -79,6 +84,8 @@ public interface PersonPostMapper {
" <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>" +
" <when test='jmsfzslh!=\"\"'> and PERSON_POST.FIRST_WHITE=#{jmsfzslh} </when>" +
" <when test='idCard!=\"\"'> and PERSON_POST.ID_CARD=#{idCard} </when>" +
" <when test='state== 0 '> and PERSON_POST.print_date is null </when>" +
" <when test='state== 1 '> and PERSON_POST.print_date is not null </when>" +
" <when test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </when>" +
......@@ -88,11 +95,14 @@ public interface PersonPostMapper {
" <if test='notNull== 3 '> and PERSON_POST.state1=3 </if>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </when>" +
" <if test='GK== 0 '> and GK = 0 </if>" +
" <if test='GK== 1 '> and GK in (1,2,3,4) </if>" +
" <if test='GK== 5 '> and GK = 5</if>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </when>" +
" <when test='printDate!=\"\"'> and to_char(PERSON_POST.print_Date,'yyyyMMdd')=${printDate} </when>" +
" order by PERSON_POST.id " +
"</script>")
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state, @Param("district") String district,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") String getToCounty,@Param("startDate") String startDate,@Param("endDate") String endDate, @Param("emailNo")String emailNo,@Param("notNull")String notNull,@Param("printDate")String printDate);
int findPersonalDataCount(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("jmsfzslh") String jmsfzslh, @Param("idCard") String idCard, @Param("state") String state, @Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") String getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("emailNo") String emailNo, @Param("notNull") String notNull, @Param("printDate") String printDate, @Param("GK") Long gk);
......@@ -105,27 +115,27 @@ public interface PersonPostMapper {
" <when test='latticeMouthInformation!=null'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <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 );
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);
@Delete("DELETE FROM PERSON_POST WHERE FILE_ID = #{fileId}")
public void deletePersonPostByFileId(@Param("fileId")String fileId);
void deletePersonPostByFileId(@Param("fileId") String fileId);
@Select("select * from PERSON_POST where id = #{id}")
public PersonPostEntity findPostInfoById(int id);
PersonPostEntity findPostInfoById(int id);
@Update("update PERSON_POST SET PRINT_DATE=#{printDateTime} where id=#{id}")
@Update("update PERSON_POST SET PRINT_DATE=#{printDateTime}, STATUS = 1 where id=#{id}")
void updateIsPrint(@Param("id") int id, @Param("printDateTime") Date printDateTime);
@Delete("DELETE FROM PERSON_POST WHERE FILE_ID = #{fileId} and PRINT_DATE IS NULL")
public void deleteNoPrintPersonPostByFileId(@Param("fileId")String fileId);
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) between ${startDate} and ${endDate}")
public int selectFileIdByImportDate( @Param("startDate") String startDate,@Param("endDate") String endDate );
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 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 );
int selectPersonalDataCountByImportDate(@Param("startDate") String startDate, @Param("endDate") String endDate);
@Select("<script> " +
......@@ -143,70 +153,135 @@ public interface PersonPostMapper {
" <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!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${str} ) </when>" +
" <if test='GK== 0 '> and GK = 0 </if>" +
" <if test='GK== 1 '> and GK in (1,2,3,4) </if>" +
" <if test='GK== 5 '> and GK = 5</if>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </when>" +
" <when test='printDate!=\"\"'> and to_char(PERSON_POST.print_Date,'yyyyMMdd')=${printDate} </when>" +
" <when test='notNull!=\"\"'> and PERSON_POST.state1=${notNull} </when>" +
" order by PERSON_POST.id " +
"</script>")
public List <PersonPostEntity> findAllPersonalDataNoPage( @Param("sqrxm") String sqrxm, @Param("ddh") String ddh, @Param("hasPrinted") String hasPrinted,@Param("district") String district,
@Param("gkxx") String gkxx, @Param("str") String str, @Param("startDate") String startDate,@Param("endDate") String endDate, @Param("emailNo") String emailNo,@Param("printDate") String printDate,@Param("notNull") String notNull );
List <PersonPostEntity> findAllPersonalDataNoPage(@Param("sqrxm") String sqrxm, @Param("ddh") String ddh, @Param("hasPrinted") String hasPrinted, @Param("district") String district,
@Param("gkxx") String gkxx, @Param("str") String str, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("emailNo") String emailNo, @Param("printDate") String printDate, @Param("notNull") String notNull, @Param("GK") Long gk);
@Select("SELECT distinct first_White,applicant_Name,recipient_Name,nature_Of_The_Information,ACCEPT_THE_MATTER " +
" FROM PERSON_POST WHERE STATE1 = 3 AND FIRST_WHITE IN (${uploadNo}) ")
public List<Map<String, Object>> checkPersonalPost(@Param("uploadNo") String uploadNo);
List<Map<String, Object>> checkPersonalPost(@Param("uploadNo") String uploadNo);
@Insert("INSERT INTO AUDLIT_FAILURE (UPLOAD_NO,UP_TIUME,REMARKS,NAME) VALUES (#{uploadNo},SYSDATE,#{remarks},#{name})")
public boolean cancelPostByAcceptNo(@Param("uploadNo")String uploadNo, @Param("remarks")String remarks, @Param("name")String name);
boolean cancelPostByAcceptNo(@Param("uploadNo") String uploadNo, @Param("remarks") String remarks, @Param("name") String name);
@Select("SELECT af.*,pp.APPLICANT_NAME,pp.NATURE_OF_THE_INFORMATION,pp.RECIPIENT_NAME,pp.RECIPIENT_ADDRESS,pp.RECIPIENT_PHONE,pp.ORDER_NUMBER,pp.BIRTH_DATE FROM AUDLIT_FAILURE af\n" +
"left join PERSON_POST pp \n" +
"on af.UPLOAD_NO=pp.FIRST_WHITE " +
"WHERE TO_CHAR(UP_TIUME,'yyyyMMdd') BETWEEN #{beginDate} AND #{endDate}" +
" order by af.ID")
public List<Map<String, Object>> selectCancelPost(@Param("beginDate")String beginDate,@Param("endDate") String endDate);
List<Map<String, Object>> selectCancelPost(@Param("beginDate") String beginDate, @Param("endDate") String endDate);
@Select("SELECT * FROM PERSON_POST WHERE FIRST_WHITE = #{acceptNo}")
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
@Select("select dataa.*,datab.typeid,datab.cstr from(\n" +
"select cd.COUNTYNAME,fi.DWDM DWDM,fi.dwmc,pp.CARD_TYPE_ID aa,count(pp.CARD_TYPE_ID) dd \n" +
"select cd.COUNTYNAME,fi.DWDM DWDM,case WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) ELSE fi.DWMC END as dwmc,0 aa,count(pp.CARD_TYPE_ID) dd \n" +
"from prepro_person pp\n" +
"left join files fi\n" +
"on pp.FILE_ID=fi.id \n" +
"left join COUNTY_DIC cd\n" +
"on substr(dwdm,0,6=cd.COUNTY_CODE\n" +
"on substr(dwdm,0,6)=cd.COUNTY_CODE\n" +
"where pp.YXQQSRQ BETWEEN #{strDate} AND #{endDate}\n" +
"and pp.CARD_TYPE_ID=0\n" +
"group by cd.COUNTYNAME,fi.DWDM,fi.dwmc,pp.CARD_TYPE_ID " +
"and pp.CARD_TYPE_ID in (0,10)\n" +
"group by cd.COUNTYNAME,fi.DWDM,case WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) ELSE fi.DWMC END " +
"order by fi.DWDM \n" +
") dataa\n" +
"left join\n" +
"(\n" +
"select cd.COUNTYNAME,fi.DWDM DWDM,fi.dwmc,pp.CARD_TYPE_ID typeid,count(pp.CARD_TYPE_ID) cstr \n" +
"select cd.COUNTYNAME,fi.DWDM DWDM,case WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) ELSE fi.DWMC END as dwmc,9 typeid,count(pp.CARD_TYPE_ID) cstr \n" +
"from prepro_person pp\n" +
"left join files fi\n" +
"on pp.FILE_ID=fi.id \n" +
"left join COUNTY_DIC cd\n" +
"on substr(dwdm,0,6=cd.COUNTY_CODE\n" +
"on substr(dwdm,0,6)=cd.COUNTY_CODE\n" +
"where pp.YXQQSRQ BETWEEN #{strDate} AND #{endDate}\n" +
"and pp.CARD_TYPE_ID=9\n" +
"group by cd.COUNTYNAME,fi.DWDM,fi.dwmc,pp.CARD_TYPE_ID ) datab\n" +
"on dataa.DWDM=datab.DWDM")
public List<Map<String,Object>> downloadUploadInfo(@Param("strDate")String strDate, @Param("endDate")String endDate);
"and pp.CARD_TYPE_ID in (9,11)\n" +
"group by cd.COUNTYNAME,fi.DWDM,case WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) ELSE fi.DWMC END ) datab\n" +
"on dataa.DWMC=datab.DWMC")
List<Map<String,Object>> downloadUploadInfo(@Param("strDate") String strDate, @Param("endDate") String endDate);
// @Select("SELECT "
// + "dataa.*, "
// + "datab.typeid, "
// + "datab.cstr "
// + "FROM "
// + "( "
// + " SELECT "
// + " cd.COUNTYNAME, "
// + " fi.DWDM DWDM, "
// + " CASE "
// + " WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) "
// + " ELSE fi.DWMC "
// + " END AS dwmc1, "
// + " pp.CARD_TYPE_ID aa, "
// + " COUNT(pp.CARD_TYPE_ID) dd "
// + " FROM "
// + " prepro_person pp "
// + " LEFT JOIN files fi ON pp.FILE_ID = fi.id "
// + " LEFT JOIN COUNTY_DIC cd ON SUBSTR(dwdm, 0, 6) = cd.COUNTY_CODE "
// + " WHERE "
// + " pp.YXQQSRQ BETWEEN '20231116' AND '20231116' AND "
// + " pp.CARD_TYPE_ID = 0 "
// + " GROUP BY "
// + " cd.COUNTYNAME, "
// + " fi.DWDM, "
// + " CASE "
// + " WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) "
// + " ELSE fi.DWMC "
// + " END, "
// + " pp.CARD_TYPE_ID "
// + " ORDER BY "
// + " fi.DWDM "
// + ") dataa "
// + "LEFT JOIN "
// + "( "
// + " SELECT "
// + " cd.COUNTYNAME, "
// + " fi.DWDM DWDM, "
// + " CASE "
// + " WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) "
// + " ELSE fi.DWMC "
// + " END AS dwmc1, "
// + " pp.CARD_TYPE_ID typeid, "
// + " COUNT(pp.CARD_TYPE_ID) cstr "
// + " FROM "
// + " prepro_person pp "
// + " LEFT JOIN files fi ON pp.FILE_ID = fi.id "
// + " LEFT JOIN COUNTY_DIC cd ON SUBSTR(dwdm, 0, 6) = cd.COUNTY_CODE "
// + " WHERE "
// + " pp.YXQQSRQ BETWEEN '20231116' AND '20231116' AND "
// + " pp.CARD_TYPE_ID = 9 "
// + " GROUP BY "
// + " cd.COUNTYNAME, "
// + " fi.DWDM, "
// + " CASE "
// + " WHEN SUBSTR(fi.DWMC, 1, 3) = '北京市' THEN SUBSTR(fi.DWMC, 7) "
// + " ELSE fi.DWMC "
// + " END, "
// + " pp.CARD_TYPE_ID "
// + ") datab ON dataa.DWDM = datab.DWDM")
// List<Map<String,Object>> downloadUploadInfo2(@Param("strDate")String strDate, @Param("endDate")String endDate);
@Select("select count(*) from PERSON_POST\n" +
" where FILE_ID <>#{fileID}\n" +
" and WAYBILL_NUMBER in \n" +
" (select WAYBILL_NUMBER from PERSON_POST\n" +
" where FILE_ID=#{fileID})")
public int findWaybillNumber( @Param("fileID") String fileID);
int findWaybillNumber(@Param("fileID") String fileID);
@Select("select count(*) from PERSON_POST\n" +
" where FILE_ID <>#{fileID}\n" +
" and BACK_WAYBILL_NUMBER in \n" +
" (select BACK_WAYBILL_NUMBER from PERSON_POST\n" +
" where FILE_ID=#{fileID})")
public int findBackWaybillNumber( @Param("fileID") String fileID);
int findBackWaybillNumber(@Param("fileID") String fileID);
@Select("<script> " +
"SELECT af.*,pp.APPLICANT_NAME,pp.NATURE_OF_THE_INFORMATION,pp.RECIPIENT_NAME,pp.RECIPIENT_ADDRESS,pp.RECIPIENT_PHONE,pp.ORDER_NUMBER,pp.BIRTH_DATE\n" +
......@@ -227,23 +302,34 @@ public interface PersonPostMapper {
" <when test='notNull!=\"\"'> and pp.state1=${notNull} </when>" +
" order by pp.ORDER_NUMBER " +
"</script>")
public List<Map<String,Object>> findAllPoarInvalidOrder( @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,@Param("printDate") String printDate,@Param("notNull") String notNull );
List<Map<String,Object>> findAllPoarInvalidOrder(@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, @Param("printDate") String printDate, @Param("notNull") String notNull);
@Insert("insert into GAT_TRACK " +
"(NO,UPLOAD_NO,ID_CARD,ID_NO,NAME,UPLOAD_UNIT,DATA_HOME_UNIT,DATA_HOME_UNIT_NAME,APPLY_REASON,STATUS,ERROR_TYPE,UPLOAD_TIME,CARD_ACCEPT_TIME,PHONE,FILE_ID) " +
"values " +
"(#{NO},#{UPLOAD_NO},#{ID_CARD},#{ID_NO},#{NAME},#{UPLOAD_UNIT},#{DATA_HOME_UNIT},#{DATA_HOME_UNIT_NAME},#{APPLY_REASON},#{STATUS},#{ERROR_TYPE},#{UPLOAD_TIME},#{CARD_ACCEPT_TIME},#{PHONE},#{FILE_ID})")
public boolean saveGATtr(GATTrackEntity gatTr);
boolean saveGATtr(GATTrackEntity gatTr);
@Select("SELECT ID,WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,RECIPIENT_NAME,RECIPIENT_PHONE," +
"RECIPIENT_ADDRESS,APPLICANT_NAME,PRINT_DATE,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS," +
"GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE," +
"LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION," +
"STATE FROM PERSON_POST WHERE ID_CARD=#{idCard} AND BEGIN_USEFUL_LIFE=#{startDate} AND VALID_PERIOD_END=#{endDate} AND STATE1=0")
public List<PersonPostDto> getPostInfoAtMachine(@Param("idCard") String idCard, @Param("startDate") String startDate, @Param("endDate") String endDate );
List<PersonPostDto> getPostInfoAtMachine(@Param("idCard") String idCard, @Param("startDate") String startDate, @Param("endDate") String endDate);
@Update("update PERSON_POST SET PRINT_DATE=#{printDateTime}, STATUS = 0 where id=#{id}")
void updatePrintDateAtMachine( @Param("id") int id, @Param("printDateTime") Date printDateTime );
@Select("SELECT * FROM PERSON_POST where TO_DATE(CREATE_DATE, 'yyyy-MM-dd HH24:mi:ss') between TO_DATE(#{start}, 'yyyy-MM-dd') and TO_DATE(#{end}, 'yyyy-MM-dd') and GK is null")
List<PersonPostEntity> findAllByCreateDate(@Param("start") String start,@Param("end") String end);
@Select("SELECT count(*) FROM PERSON_POST where TO_DATE(CREATE_DATE, 'yyyy-MM-dd HH24:mi:ss') between TO_DATE(#{start}, 'yyyy-MM-dd') and TO_DATE(#{end}, 'yyyy-MM-dd')")
Integer getAllCountByCreateDate(@Param("start") String start,@Param("end") String end);
@Select("SELECT ID FROM PERSON_POST where TO_DATE(CREATE_DATE, 'yyyy-MM-dd HH24:mi:ss') between TO_DATE(#{start}, 'yyyy-MM-dd') and TO_DATE(#{end}, 'yyyy-MM-dd')")
List<Integer> getIdByCreateDate(@Param("start") String start,@Param("end") String end);
@Update("UPDATE PERSON_POST SET GK = #{GK} where ID = #{id}")
boolean addGk( @Param("id") long id, @Param("GK") Long gk );
}
......@@ -15,9 +15,9 @@ public interface PreproPersonMapper {
/*导入XMl*/
@Insert("INSERT INTO PREPRO_PERSON (JMSFZSLH,GMSFHM,XM,XBDM,MZDM,CSRQ,SSXQDM,DZMC," +
"QFJG_GAJGMC,YXQQSRQ,YXQJZRQ,JMSFZSLYYDM,JMSFZZZLXDM,JMSFZLZFSDM,SJR_XM,SJR_LXDH,SJR_YZBM,SJR_TXDZ,SID,FILE_ID,TP_PATH," +
"XMMZWZ,XBMZWZ,MZMZWZ,ZZHYMZWZ,ZZHEMZWZ,ZZHSMZWZ,QFJGMZWZ)" +
"XMMZWZ,XBMZWZ,MZMZWZ,ZZHYMZWZ,ZZHEMZWZ,ZZHSMZWZ,QFJGMZWZ,CARD_TYPE_ID)" +
"VALUES(#{jmsfzslh},#{gmsfhm},#{xm},#{xbdm},#{mzdm},#{csrq},#{ssxqdm},#{dzmc},#{qfjgGajgmc},#{yxqqsrq},#{yxqjzrq},#{jmsfzslyydm},#{jmsfzzzlxdm},#{jmsfzlzfsdm},#{sjrXm},#{sjrLxdh},#{sjrYzbm}," +
"#{sjrTxdz},#{sid},#{fileId},#{tpPath},#{xmmzwz},#{xbmzwz},#{mzmzwz},#{zzhymzwz},#{zzhemzwz},#{zzhsmzwz},#{qfjgmzwz})")
"#{sjrTxdz},#{sid},#{fileId},#{tpPath},#{xmmzwz},#{xbmzwz},#{mzmzwz},#{zzhymzwz},#{zzhemzwz},#{zzhsmzwz},#{qfjgmzwz},#{cardTypeId})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean savePreproPersonEntity(PreproPersonDto preproPersonDto);
......
package com.yxproject.start.service;
import java.util.Map;
/**
* gk dic服务
*
* @author xcq
* @date 2023/06/02
*/
public interface GkDicService {
/**
* 获取格口信息的map
*
* @return {@link Map}<{@link String}, {@link Long}>
*/
public Map<String, Long> getGkDicMap();
}
......@@ -25,49 +25,49 @@ public interface PersonPostService {
* @param creatTime
* @return
*/
public boolean updateIsPost(String fileId,String creatTime);
boolean updateIsPost(String fileId, String creatTime);
public boolean savePersonPost(List<PersonPostEntity> personPostEntities);
boolean savePersonPost(List<PersonPostEntity> personPostEntities);
public List<PersonPostEntity> findPersonalData(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("district") String district,@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,String printDate);
List<PersonPostEntity> findPersonalData(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("jmsfzslh") String jmsfzslh, @Param("idCard") String idCard, String state, @Param("district") String district, @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, String printDate, Long gk);
public boolean deletePersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String starDate,String endDate);
boolean deletePersonalData(String applicantName, String orderNumber, String state, String latticeMouthInformation, List<String> getToCounty, String starDate, String endDate);
public boolean deletePersonalDataByImportDate(String startDate, String endDate);
boolean deletePersonalDataByImportDate(String startDate, String endDate);
public List<PersonPostEntity> getPostInfo(ReadCardDto readCardDto);
List<PersonPostEntity> getPostInfo(ReadCardDto readCardDto);
public boolean printPostList(int id, Date printDateTime);
boolean printPostList(int id, Date printDateTime);
public int findPersonalDataCount(String applicantName, String orderNumber, String state,String district, String latticeMouthInformation, List<String> getToCounty, String startDate,String endDate, String emailNo,String notNull,String printDate);
int findPersonalDataCount(String applicantName, String orderNumber, String jmsfzslh, String idCard, String state, String district, String latticeMouthInformation, List<String> getToCounty, String startDate, String endDate, String emailNo, String notNull, String printDate, Long gk);
public int findPersonalDataCountByImportDate(String starDate,String endDate);
int findPersonalDataCountByImportDate(String starDate, String endDate);
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted,String district, String gkxx, JSONArray jsonArray,String starDate,String endDate,String emailNo,String printDate,String notNull);
List<PersonPostEntity> downLoadReportForm(HttpServletRequest request, HttpServletResponse response, String sqrxm, String ddh, String hasPrinted, String district, String gkxx, JSONArray jsonArray, String starDate, String endDate, String emailNo, String printDate, String notNull, Long gk);
public Map<String,Object> selectNote(@Param("uploadId")String uploadId);
Map<String,Object> selectNote(@Param("uploadId") String uploadId);
public boolean addNote(@Param("uploadNo")String uploadNo,@Param("note")String note);
boolean addNote(@Param("uploadNo") String uploadNo, @Param("note") String note);
public List<Map<String, Object>> checkPersonalPost(String uploadNo);
List<Map<String, Object>> checkPersonalPost(String uploadNo);
public boolean cancelPostByAcceptNo(String uploadNo,String remarks,String name);
boolean cancelPostByAcceptNo(String uploadNo, String remarks, String name);
public List<Map<String,Object>> selectCancelPost(String beginDate,String endDate);
List<Map<String,Object>> selectCancelPost(String beginDate, String endDate);
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
public List<Map<String, Object>> downloadUploadInfo(HttpServletRequest request,HttpServletResponse response,String startDate,String endDate);
List<Map<String, Object>> downloadUploadInfo(HttpServletRequest request, HttpServletResponse response, String startDate, String endDate);
public int findWaybillNumber( @Param("fileID") String fileID);
int findWaybillNumber(@Param("fileID") String fileID);
public int findBackWaybillNumber( @Param("fileID") String fileID);
int findBackWaybillNumber(@Param("fileID") String fileID);
public List<Map<String,Object>> downLoadInvalidOrder(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray,String starDate,String endDate,String emailNo,String printDate,String notNull);
List<Map<String,Object>> downLoadInvalidOrder(HttpServletRequest request, HttpServletResponse response, String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String starDate, String endDate, String emailNo, String printDate, String notNull);
public boolean saveGATTrack(List<GATTrackEntity> gatTR);
boolean saveGATTrack(List<GATTrackEntity> gatTR);
public List<PersonPostDto> getPostInfoAtMachine(ReadCardDto readCardDto);
List<PersonPostDto> getPostInfoAtMachine(ReadCardDto readCardDto);
public boolean updatePrintDateAtMachine(int id, Date printDateTime);
boolean updatePrintDateAtMachine(int id, Date printDateTime);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GkDicEntity;
import com.yxproject.start.mapper.GkDicMapper;
import com.yxproject.start.service.GkDicService;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class GkDicServiceImpl implements GkDicService {
private final GkDicMapper gkDicMapper;
public GkDicServiceImpl(GkDicMapper gkDicMapper) {
this.gkDicMapper = gkDicMapper;
}
/**
* 获取格口信息的map
*
* @return {@link Map}<{@link String}, {@link Long}>
*/
@Override
public Map<String, Long> getGkDicMap() {
Map<String, Long> gkDicMap = new HashMap<>();
List<GkDicEntity> gkDicEntityList = gkDicMapper.findAll();
for (GkDicEntity gkDicEntity : gkDicEntityList) {
gkDicMap.put(gkDicEntity.getCode(), gkDicEntity.getGk());
}
return gkDicMap;
}
}
\ No newline at end of file
......@@ -92,6 +92,10 @@ public class ImportXmlServiceImpl implements ImportXmlService {
}
try {
preproPersonDto.setTpPath(url);
preproPersonDto.setCardTypeId(0L);
if (personIsYdss(preproPersonDto.getJmsfzslh())) {
preproPersonDto.setCardTypeId(10L);
}
boolean b = preproPersonMapper.savePreproPersonEntity(preproPersonDto);
if (!b){
logger.error(preproPersonDto.getFileId()+"存儲失敗!");
......@@ -117,4 +121,13 @@ public class ImportXmlServiceImpl implements ImportXmlService {
// return 2;
return filesMapper.selectFilesCount(importDate).size();
}
/**
* 从受理号判断是否为异地首申 受理号倒数第5位为9
* @param jmsfzslh 受理号
* @return true 是异地首申
*/
protected boolean personIsYdss(String jmsfzslh) {
return jmsfzslh.charAt(jmsfzslh.length() - 5) == '9';
}
}
......@@ -7,6 +7,7 @@ import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.mapper.FileNameDicMapper;
import com.yxproject.start.mapper.PersonPostMapper;
import com.yxproject.start.service.PersonPostService;
import lombok.extern.java.Log;
import net.sf.json.JSONArray;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -23,6 +24,7 @@ import java.util.Map;
* @auther zhangyusheng
* 2019/2/19 15:01
*/
@Log
@Service
public class PersonPostServiceImpl implements PersonPostService {
@Autowired
......@@ -54,19 +56,18 @@ public class PersonPostServiceImpl implements PersonPostService {
return true;
}
@Override
public List<PersonPostEntity> findPersonalData(String applicantName, String orderNumber, String state,String district, String latticeMouthInformation, List<String> getToCounty, String startDate, String endDate, String firstIndex, String pageSize, String emailNo, int notNull, String printDate) {
String str = "";
long firstIndexLong = Long.valueOf(firstIndex);
long pageSizeLong = Long.valueOf(pageSize);
public List<PersonPostEntity> findPersonalData(String applicantName, String orderNumber, String jmsfzslh, String idCard, String state,String district, String latticeMouthInformation, List<String> getToCounty, String startDate, String endDate, String firstIndex, String pageSize, String emailNo, int notNull, String printDate, Long gk) {
StringBuilder str = new StringBuilder();
long firstIndexLong = Long.parseLong(firstIndex);
long pageSizeLong = Long.parseLong(pageSize);
for (int i = 0; i < getToCounty.size(); i++) {
if (i == getToCounty.size() - 1) {
str += "'" + getToCounty.get(i) + "'";
str.append("'").append(getToCounty.get(i)).append("'");
} else {
str += "'" + getToCounty.get(i) + "',";
str.append("'").append(getToCounty.get(i)).append("',");
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalData(applicantName, orderNumber, state,district, latticeMouthInformation, str, startDate, endDate, firstIndexLong * pageSizeLong, (firstIndexLong - 1) * pageSizeLong + 1, emailNo, notNull, printDate);
return list;
return personPostMapper.findAllPersonalData(applicantName, orderNumber, jmsfzslh, idCard, state,district, latticeMouthInformation, str.toString(), startDate, endDate, firstIndexLong * pageSizeLong, (firstIndexLong - 1) * pageSizeLong + 1, emailNo, notNull, printDate, gk);
}
@Override
......@@ -98,17 +99,16 @@ public class PersonPostServiceImpl implements PersonPostService {
}
@Override
public int findPersonalDataCount(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("state") String state,@Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") List<String> getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, String emailNo, String notNull, String printDate) {
String str = "";
public int findPersonalDataCount(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("jmsfzslh") String jmsfzslh, @Param("idCard") String idCard, @Param("state") String state,@Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") List<String> getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, String emailNo, String notNull, String printDate, Long gk) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < getToCounty.size(); i++) {
if (i == getToCounty.size() - 1) {
str += "'" + getToCounty.get(i) + "'";
str.append("'").append(getToCounty.get(i)).append("'");
} else {
str += "'" + getToCounty.get(i) + "',";
str.append("'").append(getToCounty.get(i)).append("',");
}
}
int count = personPostMapper.findPersonalDataCount(applicantName, orderNumber, state, district,latticeMouthInformation, str, startDate, endDate, emailNo, notNull, printDate);
return count;
return personPostMapper.findPersonalDataCount(applicantName, orderNumber, jmsfzslh, idCard, state, district,latticeMouthInformation, str.toString(), startDate, endDate, emailNo, notNull, printDate, gk);
}
@Override
......@@ -118,18 +118,17 @@ public class PersonPostServiceImpl implements PersonPostService {
}
@Override
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request, HttpServletResponse response, String sqrxm, String ddh, String hasPrinted, String district,String gkxx, JSONArray jsonArray, String starDate, String endDate, String emailNo, String printDate, String notNull) {
String str = "";
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request, HttpServletResponse response, String sqrxm, String ddh, String hasPrinted, String district,String gkxx, JSONArray jsonArray, String starDate, String endDate, String emailNo, String printDate, String notNull, Long gk) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < jsonArray.size(); i++) {
if (i == jsonArray.size() - 1) {
str += "'" + jsonArray.get(i) + "'";
str.append("'").append(jsonArray.get(i)).append("'");
} else {
str += "'" + jsonArray.get(i) + "',";
str.append("'").append(jsonArray.get(i)).append("',");
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalDataNoPage(sqrxm, ddh, hasPrinted,district, gkxx, str, starDate, endDate, emailNo, printDate, notNull);
return list;
return personPostMapper.findAllPersonalDataNoPage(sqrxm, ddh, hasPrinted,district, gkxx, str.toString(), starDate, endDate, emailNo, printDate, notNull, gk);
}
@Override
......@@ -141,6 +140,7 @@ public class PersonPostServiceImpl implements PersonPostService {
@Override
public boolean addNote(String uploadNo, String note) {
personPostMapper.addNote(uploadNo, note);
log.info("取消订单成功。受理号:" +uploadNo + " 备注信息:" +note);
return true;
}
......@@ -150,9 +150,12 @@ public class PersonPostServiceImpl implements PersonPostService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean cancelPostByAcceptNo(String uploadNo, String remarks, String name) {
personPostMapper.cancelPostByAcceptNo(uploadNo, remarks, name);
personPostMapper.addNote(uploadNo, remarks);
System.out.println("cancelPostByAcceptNo: " + uploadNo + " | " + remarks + " | " + name);
System.out.println("addNote: " + uploadNo + " | " + remarks);
return true;
}
......@@ -170,6 +173,7 @@ public class PersonPostServiceImpl implements PersonPostService {
List<Map<String, Object>> list = personPostMapper.downloadUploadInfo(strDate, endDate);
return list;
}
@Override
public int findWaybillNumber(String fileID) {
int mum = personPostMapper.findWaybillNumber(fileID);
......
package com.yxproject.start.utils;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
......@@ -113,6 +114,14 @@ public class ReadExcel {
String columns8 = sheet.getCell(8,i).getContents();
String columns9 = sheet.getCell(9,i).getContents();
String columns10 = sheet.getCell(10,i).getContents();
if (sheet.getColumns() == 11) {
if (columns0.equals("")&&columns1.equals("")&&columns2.equals("")&&columns3.equals("")&&
columns4.equals("")&&columns5.equals("")&&columns6.equals("")&&columns7.equals("")&&
columns8.equals("")&&columns9.equals("")&&columns10.equals("")){
continue;
}
}
if (sheet.getColumns() != 11) {
String columns11 = sheet.getCell(11,i).getContents();
String columns12 = sheet.getCell(12,i).getContents();
String columns13 = sheet.getCell(13,i).getContents();
......@@ -124,6 +133,7 @@ public class ReadExcel {
columns13.equals("")&&columns14.equals("")&&columns15.equals("")){
continue;
}
}
// sheet.getColumns()返回该页的总列数
for (int j = 0; j < sheet.getColumns(); j++) {
String cellinfo = sheet.getCell(j, i).getContents();
......@@ -136,11 +146,7 @@ public class ReadExcel {
}
return outerList;
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (BiffException e) {
e.printStackTrace();
} catch (IOException e) {
} catch (BiffException | IOException e) {
e.printStackTrace();
}
return null;
......
package com.yxproject.start.utils;
public class YdssUtils {
/**
* 从受理号判断是否为异地首申 受理号倒数第5位为9
* @param jmsfzslh 受理号
* @return true 是异地首申
*/
public static boolean personIsYdss(String jmsfzslh) {
return jmsfzslh.charAt(jmsfzslh.length() - 5) == '9';
}
}
......@@ -112,7 +112,7 @@
(<span style="color:#0b93d5;">每页显示{{paginationConf.itemsPerPage}}条/共
{{paginationConf.totalItems}}条</span>)
<div class="pull-right">
<span style="color:#9f191f;"><span style="margin-right: 15px;">普通证:{{simpleCardCount}}</span><span style="margin-right: 15px;">邮寄证:{{postCardCount}}</span><span>禁用数:{{forbiddenCount}}</span></span>
<span style="color:#9f191f;"><span style="margin-right: 15px;">普通证:{{simpleCardCount}}</span><span style="margin-right: 15px;">邮寄证:{{postCardCount}}</span><span style="margin-right: 15px;">异地首申普:{{ydSsSimpleCount}}</span><span style="margin-right: 15px;">异地首申邮:{{ydSsPostCount}}</span><span style="margin-right: 15px;">禁用数:{{forbiddenCount}}</span></span>
</div>
</div>
<div class="box-info" style="padding: 7px; padding-top: 0px;">
......
......@@ -95,6 +95,8 @@ angular.module('AvatarCheck.cardProdPackage', ['ngRoute', 'AvatarCheck.http', 't
$scope.paginationConf.totalItems=data.total;
$scope.simpleCardCount = data.puSum;
$scope.postCardCount = data.youSum;
$scope.ydSsSimpleCount = data.ydsspuSum;
$scope.ydSsPostCount = data.ydssyouSum;
$scope.forbiddenCount= data.invaildCount;
$scope.packageData = data.list;
console.log(data)
......
......@@ -45,13 +45,13 @@ angular.module("AvatarCheck.dataCheckReport",['ngRoute', 'AvatarCheck.http'])
var date1 = $("#datepicker1").val();
var date2 = $("#datepicker2").val();
var cardType = $("#cardType").val();
if(cardType==''){
if(cardType===''){
cardType = -1;
}
if(date1=='{{choseDate}}'){
if(date1==='{{choseDate}}'){
date1=$filter("date")(new Date(), "yyyy-MM-dd")
}
if(date2=='{{choseDate}}'){
if(date2==='{{choseDate}}'){
date2=$filter("date")(new Date(), "yyyy-MM-dd")
}
HttpService.queryDataCheckReport(date1,date2,$scope.policeCode,$scope.policeName,cardType,function (data) {
......@@ -59,7 +59,7 @@ angular.module("AvatarCheck.dataCheckReport",['ngRoute', 'AvatarCheck.http'])
console.log($scope.dataCheckList);
})
};
if($rootScope.loginData.login==true){
if($rootScope.loginData.login===true){
getTypeList();
$scope.searchReportData();
}
......
......@@ -193,7 +193,7 @@
<table cellspacing="0" cellpadding="0" style="border-top:1px solid #000;border-collapse:collapse;height:30mm">
<tr>
<td style="width:38.5mm;font-size: 2mm;border-right:1px solid #000;">
<div style="font-size:8mm;position:absolute;top:102mm;left:3mm;width:36mm;">密码投递</div>
<div style="font-size:8mm;position:absolute;top:102mm;left:3mm;width:36mm;">特安邮件</div>
</td>
<td style="width:33.5mm;font-size: 2mm;">
<div style="position:absolute;top:94mm;left:40mm;width:29mm;">签收人:</div>
......
......@@ -84,7 +84,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}
item.show = !item.show;
$scope.json.id=item.ID;
$scope.json.policeName = item.GAJG_MC;
$scope.json.policeName = item.GAJG_MC.substring(6);
$scope.json.policeCode = item.POLICE_CODE;
$scope.json.count = item.FINISH_COUNT;
$scope.json.QR_CODE = item.QR_CODE;
......
......@@ -4,42 +4,53 @@
text-align: center;
vertical-align: middle !important;
}
.select2-search__field {
height: 30px;
}
.ul li {
cursor: pointer;
}
.page-list .pagination {
float: left;
}
.page-list .pagination span {
cursor: pointer;
}
.page-list .pagination .separate span {
cursor: default;
border-top: none;
border-bottom: none;
}
.page-list .pagination .separate span:hover {
background: none;
}
.page-list .page-total {
float: left;
margin: 25px 20px;
}
.page-list .page-total input,
.page-list .page-total select {
height: 26px;
border: 1px solid #ddd;
}
.page-list .page-total input {
width: 40px;
padding-left: 3px;
}
.page-list .page-total select {
width: 50px;
}
.page-list:after {
display: block;
clear: both;
......@@ -235,6 +246,24 @@
</td>
</tr>
<tr>
<td>受理号:</td>
<td>
<input
type="text"
class="form-control"
ng-model="jmsfzslh"
placeholder="居民身份证受理号"
/>
</td>
<td>身份证号:</td>
<td>
<input
type="text"
class="form-control"
ng-model="idCard"
placeholder="身份证号"
/>
</td>
<td colspan="2">
<div style="float: left">
<button
......@@ -301,7 +330,7 @@
</thead>
<tbody>
<tr ng-repeat="item in postData">
<td>{{$index+1}}</td>
<td>{{$index + 1}}</td>
<td>{{item.orderNumber}}</td>
<td>{{item.waybillNumber}} - {{item.backWaybillNumber}}</td>
<td>{{item.firstWhite}}</td>
......
......@@ -82,6 +82,16 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
}else{
json.orderNumber='';
}
if (angular.isDefined($scope.jmsfzslh)) {
json.jmsfzslh = $scope.jmsfzslh
}else {
json.jmsfzslh = '';
}
if (angular.isDefined($scope.idCard)) {
json.idCard = $scope.idCard
}else {
json.idCard = '';
}
if ($("#print").val() == '') {
json.state=-1;
}else {
......@@ -152,6 +162,16 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
}else{
json.orderNumber='';
}
if (angular.isDefined($scope.jmsfzslh)) {
json.jmsfzslh = $scope.jmsfzslh
}else {
json.jmsfzslh = '';
}
if (angular.isDefined($scope.idCard)) {
json.idCard = $scope.idCard
}else {
json.idCard = '';
}
if ($("#print").val() == '') {
json.state=-1;
}else {
......
package com.yxproject.start;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class StartApplicationTests {
@Test
public void contextLoads() {
}
}
//package com.yxproject.start;
//
//import com.yxproject.start.entity.PersonPostEntity;
//import com.yxproject.start.mapper.PersonPostMapper;
//import com.yxproject.start.service.GkDicService;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.util.List;
//import java.util.Map;
//
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class StartApplicationTests {
// @Autowired
// private PersonPostMapper mapper;
// @Autowired
// private GkDicService gkDicService;
// @Test
// public void contextLoads() {
// long startTime = System.currentTimeMillis();
// Map<String, Long> gkMap = gkDicService.getGkDicMap();
//// personPostEntity.setGk(gkMap);
//// System.out.println(mapper.getAllCountByCreateDate("2023-01-01", "2023-06-31"));
//// System.out.println(mapper.getIdByCreateDate("2023-01-01", "2023-01-31").size());
//// mapper.addGk(id, gk);
// List<PersonPostEntity> entities = mapper.findAllByCreateDate("2023-03-01", "2023-04-01");
// System.out.println(entities.size());
// int count = 0;
// for (PersonPostEntity entity : entities) {
// entity.setGk(gkMap);
// if (mapper.addGk(entity.getId(), entity.getGk())) count += 1;
// }
// System.out.println(count);
// System.out.println(System.currentTimeMillis() - startTime);
// }
//
//}
//
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