Commit 244a1ccd authored by dahai's avatar dahai

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

parents c2a6ae81 7fd4b2db
......@@ -93,6 +93,7 @@ public class LogApi {
*/
@RequestMapping("selectAnalysisData")
public List<Map<String,Object>> selectAnalysisData(@RequestParam("uploadDate")String uploadDate){
System.out.println("1111111111111111111111"+uploadDate);
List<Map<String,Object>> resultList = logService.selectAnalysisData(uploadDate);
return resultList;
}
......@@ -106,8 +107,8 @@ public class LogApi {
@RequestMapping("analysis")
@Transactional(rollbackFor = Exception.class)
public boolean analysis(@RequestParam("printDate")String printDate,@RequestParam("latticeMouthInformation")String latticeMouthInformation){
logService.changeCardType(replaceDate(printDate),latticeMouthInformation);
logService.insertAnalysisDate(replaceDate(printDate),latticeMouthInformation);
logService.changeCardType(printDate,latticeMouthInformation);
logService.insertAnalysisDate(printDate,latticeMouthInformation);
return true;
}
......@@ -123,8 +124,12 @@ public class LogApi {
List<String> idList =logService.selectId(uploadTime);
for (int i=0;i<idList.size();i++){
logService.deleteFilesData(idList.get(i));
}
for (int i=0;i<idList.size();i++){
logService.deleteFile(idList.get(i));
}
return true;
}
......
......@@ -18,7 +18,7 @@ public interface LogMapper {
"left join FILES on PREPRO_PERSON.FILE_ID =FILES.ID\n" +
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID\n" +
"where FILES.ID =#{uploadDate}" +
"where TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss') =#{uploadDate}" +
"")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
......@@ -28,15 +28,16 @@ public interface LogMapper {
"SELECT PREPRO_PERSON.JMSFZSLH \n" +
"FROM PREPRO_PERSON \n" +
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"WHERE PERSON_POST.PRINT_DATE =#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation}\n" +
"WHERE TO_CHAR(PERSON_POST.PRINT_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation}\n" +
")")
public boolean changeCardType(@Param("printDate")String printDate,@Param("latticeMouthInformation")String latticeMouthInformation);
@Insert("INSERT INTO FILE_NAME_DIC ( FILE_NAME_DIC.ANALYSIS_DATE\n" +
") SELECT FILE_NAME_DIC.ANALYSIS_DATE \n" +
"FROM FILE_NAME_DIC\n" +
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID = PERSON_POST.FILE_ID\n" +
"WHERE PERSON_POST.PRINT_DATE=#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} ")
"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);
......@@ -139,11 +140,11 @@ public interface LogMapper {
@Select("select id from files where TO_CHAR(UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss') = #{uploadTime}")
public List<String> selectId(@Param("uploadTime")String uploadTime);
@Delete("delete from PREPRO_PERSON where PREPRO_PERSON.sid = #{id}")
public boolean deleteFilesData(@Param("uploadTime")String id);
@Delete("delete from PREPRO_PERSON where PREPRO_PERSON.file_id = #{id}")
public boolean deleteFilesData(@Param("id")String id);
@Delete("delete from files where id=#{id}")
public boolean deleteFile(@Param("uploadTime")String id);
public boolean deleteFile(@Param("id")String id);
......
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