Commit 9384363b authored by liuxinben's avatar liuxinben

解析时添加日志打印

parent c9d14d74
...@@ -221,15 +221,20 @@ public class LogApi { ...@@ -221,15 +221,20 @@ public class LogApi {
String remoteAddr = requ.getRemoteAddr(); String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr); MDC.put("ip", remoteAddr);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:MM:ss");
//通过上传受理号更新制证数据类型 //通过上传受理号更新制证数据类型
//通过上传受理号和出生日期更新邮寄订单 //通过上传受理号和出生日期更新邮寄订单
try { try {
logger.info("开始查询XML、Excel、身份数据信息----->"+sdf.format(new Date()));
//更新xml数据中的证件类型和格口文件解析状态 //更新xml数据中的证件类型和格口文件解析状态
logService.changeCardTypeByPrintDate(getCurrentDate2String("yyyyMMddhhmmss"),printDate); logService.changeCardTypeByPrintDate(getCurrentDate2String("yyyyMMddhhmmss"),printDate);
//查询XML文件信息 //查询XML文件信息
List <Map <String, Object>> resultList=logService.selectFileIdByUploadDate(printDate); List <Map <String, Object>> resultList=logService.selectFileIdByUploadDate(printDate);
//查询身份数据 //查询身份数据
List <Map <String, Object>> dataList=logService.selectPersonPostUnanalysis(printDate); List <Map <String, Object>> dataList=logService.selectPersonPostUnanalysis(printDate);
logger.info("结束查询XML、Excel、身份数据信息----->"+sdf.format(new Date()));
logger.info("开始查询出生日期不合法订单修改备注----->"+sdf.format(new Date()));
//添加受理号匹配,出生日期不匹配订单 //添加受理号匹配,出生日期不匹配订单
List <Map <String, Object>> invalidList=logService.selectInvalidPersonPost(printDate); List <Map <String, Object>> invalidList=logService.selectInvalidPersonPost(printDate);
for (int i = 0; i < invalidList.size(); i++) { for (int i = 0; i < invalidList.size(); i++) {
...@@ -239,7 +244,9 @@ public class LogApi { ...@@ -239,7 +244,9 @@ public class LogApi {
String name="system"; String name="system";
personPostService.cancelPostByAcceptNo(uploadNo,note,name); personPostService.cancelPostByAcceptNo(uploadNo,note,name);
} }
logger.info("结束查询出生日期不合法订单修改备注----->"+sdf.format(new Date()));
logger.info("开始将身份数据插入到邮寄表中----->"+sdf.format(new Date()));
//todo 获取所有的已解析的文件id //todo 获取所有的已解析的文件id
List <Map <String, Object>> analysusList = new ArrayList<>(); List <Map <String, Object>> analysusList = new ArrayList<>();
//将身份数据插入到邮寄表中 //将身份数据插入到邮寄表中
...@@ -253,6 +260,9 @@ public class LogApi { ...@@ -253,6 +260,9 @@ public class LogApi {
analysusList.add(map); analysusList.add(map);
} }
} }
logger.info("结束将身份数据插入到邮寄表中----->"+sdf.format(new Date()));
logger.info("开始生成解析表----->"+sdf.format(new Date()));
for (Map<String,Object> map : analysusList){ for (Map<String,Object> map : analysusList){
String xmlId = map.get("xmlId").toString(); String xmlId = map.get("xmlId").toString();
String gkId = map.get("gkId").toString(); String gkId = map.get("gkId").toString();
...@@ -270,6 +280,7 @@ public class LogApi { ...@@ -270,6 +280,7 @@ public class LogApi {
// logService.updateGKState(gkId); // logService.updateGKState(gkId);
//生成解析日志 //生成解析日志
logService.insertIntoAnalysis(gkId, xmlId, postCount, String.valueOf(commonCount),getCurrentDate2String("yyyyMMddhhmmss")); logService.insertIntoAnalysis(gkId, xmlId, postCount, String.valueOf(commonCount),getCurrentDate2String("yyyyMMddhhmmss"));
logger.info("结束生成解析表----->"+sdf.format(new Date()));
} }
}catch (Exception e){ }catch (Exception e){
logger.error("导入时间:" + printDate); logger.error("导入时间:" + printDate);
......
#更新日志
2022/12/29
异地系统解析制证数据时,添加校验最新的excel格口文件是否被解析
2022/12/30
异地系统解析时,添加日志步骤打印
\ No newline at end of file
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