Commit b021ff25 authored by liuxinben's avatar liuxinben

1) 导入格口文件添加未定状态;

2)	解析制证数据包按所有的未定状态的格口数据进行解析;
3)	更新邮寄单详情,将格口的未定状态改为1取消邮寄;
parent 94c92f3f
......@@ -218,6 +218,8 @@ public class LogApi {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
//更新xml数据中的证件类型和格口文件解析状态
logService.changeCardTypeByPrintDate(getCurrentDate2String("yyyyMMddhhmmss"),printDate);
//查询XML文件信息
List <Map <String, Object>> resultList=logService.selectFileIdByUploadDate(printDate);
//查询身份数据
......@@ -249,7 +251,7 @@ public class LogApi {
}
}
//更新格口文件解析状态
logService.updateGKState(gkId);
// logService.updateGKState(gkId);
//生成解析日志
logService.insertIntoAnalysis(gkId, xmlId, postCount, String.valueOf(commonCount));
}
......
......@@ -39,11 +39,26 @@ public interface LogMapper {
public boolean changeCardType(@Param("printDate")String printDate,@Param("fileId")String fileId);
//TODO XML的时间+post的file_id
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
"WHERE JMSFZSLH in (\n" +
"SELECT PREPRO_PERSON.JMSFZSLH \n" +
"FROM PREPRO_PERSON \n" +
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"LEFT JOIN FILES ON FILES.ID=PREPRO_PERSON.FILE_ID "+
" WHERE TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} )")
public boolean changeCardTypeByPrintDate(@Param("printDate")String printDate);
@Update(" update FILE_NAME_DIC set FILE_NAME_DIC.ANALYSIS_DATE = #{printDate} where file_id=#{fileId} ")
public boolean insertAnalysisDate(@Param("printDate")String printDate,@Param("fileId")String fileId);
@Update(" update FILE_NAME_DIC set FILE_NAME_DIC.ANALYSIS_DATE = #{analysisDate},STATE = 1 " +
" where file_id IN (SELECT PERSON_POST.file_id FROM PERSON_POST " +
" LEFT JOIN PREPRO_PERSON ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH " +
" LEFT JOIN FILES ON FILES.ID=PREPRO_PERSON.FILE_ID " +
" WHERE TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} ) ")
public boolean insertAnalysisDateByPrintDate(@Param("analysisDate")String analysisDate,@Param("printDate")String printDate);
/**
* 生成解析表
* @param fileDic
......
......@@ -26,6 +26,7 @@ public interface LogService {
public boolean insertAnalysisDate(String printDate,String fileId);
public boolean changeCardTypeByPrintDate(String analysisDate, String printDate);
public boolean deleteFilesData(@Param("id")String id);
......
......@@ -72,6 +72,13 @@ public class LogServiceImpl implements LogService {
return true;
}
@Override
public boolean changeCardTypeByPrintDate(String analysisDate, String printDate) {
logMapper.changeCardTypeByPrintDate(printDate);
logMapper.insertAnalysisDateByPrintDate(analysisDate,printDate);
return true;
}
@Override
public boolean insertAnalysisDate(String printDate,String fileId) {
logMapper.insertAnalysisDate(printDate,fileId);
......
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