Commit 2001da8a authored by suichenguang's avatar suichenguang

解析更改2.0

parent 9b7e3d3c
...@@ -101,14 +101,16 @@ public class LogApi { ...@@ -101,14 +101,16 @@ public class LogApi {
/** /**
* 解析 * 解析
* @param printDate * @param printDate
* @param latticeMouthInformation * @param fileId
* @return true * @return true
*/ */
@RequestMapping("analysis") @RequestMapping("analysis")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean analysis(@RequestParam("printDate")String printDate,@RequestParam("latticeMouthInformation")String latticeMouthInformation){ public boolean analysis(@RequestParam("printDate")String printDate,@RequestParam("fileId")String fileId){
logService.changeCardType(printDate,latticeMouthInformation); logService.changeCardType(printDate,fileId);
logService.insertAnalysisDate(printDate,latticeMouthInformation); SimpleDateFormat df = new SimpleDateFormat("yyyy-mm-dd hh24:mi:ss");
df.format(new Date());
logService.insertAnalysisDate(df.format(new Date()));
return true; return true;
} }
......
...@@ -17,7 +17,7 @@ public interface LogMapper { ...@@ -17,7 +17,7 @@ public interface LogMapper {
"file_name_dic.FORM_START_TIME,file_name_dic.FORM_DEADLINE\n" + "file_name_dic.FORM_START_TIME,file_name_dic.FORM_DEADLINE\n" +
"from file_name_dic \n" + "from file_name_dic \n" +
"left join PERSON_POST on PERSON_POST.FILE_ID=file_name_dic.FILE_ID\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) = #{uploadDate} 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\n" +
"\n") "\n")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate); public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
...@@ -29,17 +29,13 @@ public interface LogMapper { ...@@ -29,17 +29,13 @@ public interface LogMapper {
"FROM PREPRO_PERSON \n" + "FROM PREPRO_PERSON \n" +
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" + "LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"LEFT JOIN FILES ON FILES.ID=PREPRO_PERSON.FILE_ID"+ "LEFT JOIN FILES ON FILES.ID=PREPRO_PERSON.FILE_ID"+
"WHERE TO_CHAR(PREPRO_PERSON.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation}\n" + "WHERE TO_CHAR(PREPRO_PERSON.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} AND PERSON_POST.file_id=#{fileId}\n" +
")") ")")
public boolean changeCardType(@Param("printDate")String printDate,@Param("latticeMouthInformation")String latticeMouthInformation); public boolean changeCardType(@Param("printDate")String printDate,@Param("fileId")String fileId);
@Insert("INSERT INTO FILE_NAME_DIC ( FILE_NAME_DIC.ANALYSIS_DATE\n" + @Insert("INSERT INTO FILE_NAME_DIC ( TO_CHAR(FILE_NAME_DIC.ANALYSIS_DATE,'yyyy-mm-dd hh24:mi:ss')) VALUES (#{printDate}) ")
") SELECT FILE_NAME_DIC.ANALYSIS_DATE \n" + public boolean insertAnalysisDate(@Param("printDate")String printDate);
"FROM FILE_NAME_DIC\n" +
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID = PERSON_POST.FILE_ID\n" +
"WHERE TO_CHAR(PERSON_POST.PRINT_DATE=#{printDate},'yyyy-mm-dd hh24:mi:ss') AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} ")
public boolean insertAnalysisDate(@Param("printDate")String printDate,@Param("latticeMouthInformation")String latticeMouthInformation);
@Select("<script> " + @Select("<script> " +
......
...@@ -22,7 +22,7 @@ public interface LogService { ...@@ -22,7 +22,7 @@ public interface LogService {
public boolean changeCardType(String printDate,String latticeMouthInformation); public boolean changeCardType(String printDate,String latticeMouthInformation);
public boolean insertAnalysisDate(String printDate,String latticeMouthInformation); public boolean insertAnalysisDate(String printDate);
public boolean deleteFilesData(@Param("id")String id); public boolean deleteFilesData(@Param("id")String id);
......
...@@ -51,14 +51,14 @@ public class LogServiceImpl implements LogService { ...@@ -51,14 +51,14 @@ public class LogServiceImpl implements LogService {
} }
@Override @Override
public boolean changeCardType(String printDate, String latticeMouthInformation) { public boolean changeCardType(String printDate, String fileId) {
logMapper.changeCardType(printDate,latticeMouthInformation); logMapper.changeCardType(printDate,fileId);
return true; return true;
} }
@Override @Override
public boolean insertAnalysisDate(String printDate, String latticeMouthInformation) { public boolean insertAnalysisDate(String printDate) {
logMapper.insertAnalysisDate(printDate,latticeMouthInformation); logMapper.insertAnalysisDate(printDate);
return true; return true;
} }
......
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