Commit 752fd9b0 authored by liboyang's avatar liboyang

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

parents 365439ea 9dbf41e9
......@@ -17,15 +17,6 @@ import java.util.Map;
public class LogApi {
@Autowired
private LogService logService;
@RequestMapping("createAnalysisLog")
public boolean createAnalysisLog(HttpServletResponse response) {
return true;
}
/**
* 查询新包生成日志
* @param newFileName 新文件名
......@@ -70,13 +61,50 @@ public class LogApi {
* @return
*/
@RequestMapping("selectByAnalysisLog")
@Transactional(rollbackFor = Exception.class)
public List<Map<String,Object>> selectByAnalysisLog(@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){
List<Map<String,Object>> resultList = logService.selectAnalysisLog(fileName,analysisTime,Long.valueOf(currPage),Long.valueOf(pageSize));
List<Map<String,Object>> resultList = logService.selectAnalysisLog(fileName,replaceDate(analysisTime),Long.valueOf(currPage),Long.valueOf(pageSize));
return resultList;
}
/**
* 查询解析日志总数
* @param fileName
* @param analysisTime
* @return
*/
@RequestMapping("selectAnalysisLogCount")
public String selectAnalysisLogCount (@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime){
String total = logService.selectAnalysisLogCount(fileName,replaceDate(analysisTime));
return total;
}
/**
* 根据导入时间查询解析数据
* @param uploadName
* @return
*/
@RequestMapping("selectAnalysisData")
public List<Map<String,Object>> selectAnalysisData(@RequestParam("uploadName")String uploadName){
List<Map<String,Object>> resultList = logService.selectAnalysisData(replaceDate(uploadName));
return resultList;
}
/**
* 解析
* @param printDate
* @param latticeMouthInformation
* @return
*/
@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);
return true;
}
/**
* 去除字符串中中线
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyDicEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.*;
import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
......@@ -14,6 +13,34 @@ public interface LogMapper {
@Select("select distinct FILES.UPLOAD_DATE,PERSON_POST.LATTICE_MOUTH_INFORMATION,FILES.RECORD_NUMBER,FILE_NAME_DIC.FORM_START_TIME,FILE_NAME_DIC.FORM_DEADLINE\n" +
"from PREPRO_PERSON \n" +
"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.CREATE_TIME = #{uploadDate}" +
"AND FILE_NAME_DIC.STATE=0")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
"WHERE JMSFZSLH = (\n" +
"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" +
")")
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} ")
public boolean insertAnalysisDate(@Param("printDate")String printDate,@Param("latticeMouthInformation")String latticeMouthInformation);
@Select("<script> " +
"SELECT * FROM " +
......@@ -93,4 +120,22 @@ public interface LogMapper {
"</script>")
public String selectNewFileLogCount(@Param("newFileName") String newFileName, @Param("cardId") String cardId, @Param("createDate") String createDate,@Param("uploadCountyCode") String uploadCountyName);
@Select("<script> " +
"SELECT COUNT(*) FROM FILE_NAME_DIC \n" +
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
"LEFT JOIN FILES ON FILES.ID=FILE_NAME_DIC.FILE_ID " +
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = person_post.FIRST_WHITE " +
" where 1=1 " +
" <if test='fileName !=\"\"' >" +
" and NEW_FILES.NEW_FILE_NAME=#{fileName} " +
" </if>" +
" <if test='analysisTime != -1' >" +
" and NEW_FILES.DWDM=#{analysisTime}" +
" </if>" +
"group by FILE_NAME_DIC.FILE_NAME, FILE_NAME_DIC.FORM_START_TIME, " +
"FILE_NAME_DIC.FORM_DEADLINE, PERSON_POST.LATTICE_MOUTH_INFORMATION, " +
"FILE_NAME_DIC.ANALYSIS_DATE, FILES.RECORD_NUMBER" +
"</script>")
public String selectAnalysisLogCount(@Param("fileName")String fileName, @Param("analysisTime")String analysisTime);
}
......@@ -14,6 +14,13 @@ public interface LogService {
public List<Map<String,Object>> selectAnalysisLog(String fileName,String analysisDate,long currPage,long pageSize);
public String selectAnalysisLogCount(String fileName,String analysisDate);
public List<CountyDicEntity> getCountyList();
public List<Map<String,Object>> selectAnalysisData(String uploadDate);
public boolean changeCardType(String printDate,String latticeMouthInformation);
public boolean insertAnalysisDate(String printDate,String latticeMouthInformation);
}
......@@ -31,9 +31,32 @@ public class LogServiceImpl implements LogService {
return resultList;
}
@Override
public String selectAnalysisLogCount(String fileName, String analysisDate) {
String count= logMapper.selectAnalysisLogCount(fileName,analysisDate);
return count;
}
@Override
public List<CountyDicEntity> getCountyList() {
return logMapper.getCountyListData();
}
@Override
public List<Map<String, Object>> selectAnalysisData(String uploadDate) {
return logMapper.selectAnalysisData(uploadDate);
}
@Override
public boolean changeCardType(String printDate, String latticeMouthInformation) {
logMapper.changeCardType(printDate,latticeMouthInformation);
return true;
}
@Override
public boolean insertAnalysisDate(String printDate, String latticeMouthInformation) {
logMapper.insertAnalysisDate(printDate,latticeMouthInformation);
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