Commit dc184f4e authored by suichenguang's avatar suichenguang

解析更改

parent 5e09595b
......@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.xml.crypto.Data;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
......@@ -112,18 +113,20 @@ public class LogApi {
logService.insertAnalysisDate(df.format(new Date()),fileId);
//查询XML文件信息
List<Map<String,Object>> resultList = logService.selectFileIdByUploadDate(printDate);
System.out.println("00000000000000000000"+resultList.toString());
//查询Excel文件信息
Map<String, Object> resultMap = logService.selectFileNameDic(fileId);
List<Map<String,Object>> result = new ArrayList<>();
for (int i=0; i<resultList.size();i++){
String fileName= (String) resultList.get(i).get("FILE_NAME");
String fileName=(BigDecimal)(resultList.get(i).get("ID"))+"";
//查询证件类型计数
Map<String,Object>countMap= logService.selectCountByCardType((String) resultList.get(i).get("ID"));
Map<String,Object>countMap= logService.selectCountByCardType( (BigDecimal)(resultList.get(i).get("ID"))+"");
resultMap.put("fileName",fileName);
resultMap.put("commonCount",countMap.get("pusum"));
resultMap.put("postCount",countMap.get("yousum"));
result.set(i,resultMap);
logService.insertIntoAnalysis(fileId,fileName,String.valueOf(countMap.get("common")),String.valueOf(countMap.get("post")));
resultMap.put("commonCount",countMap.get("PUSUM"));
resultMap.put("postCount",countMap.get("YOUSUM"));
result.add(resultMap);
logService.insertIntoAnalysis(fileId,fileName,String.valueOf(countMap.get("PUSUM")),String.valueOf(countMap.get("YOUSUM")));
}
return true;
}
......
......@@ -149,7 +149,7 @@ public interface LogMapper {
@Select("select SOURCE_FILE_NAME,id,RECORD_NUMBER from files where to_char(UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{uploadDate}")
public List<Map<String,Object>> selectFileIdByUploadDate(@Param("uploadDate")String uploadDate);
@Select("select FORM_START_TIME,FORM_DEADLINE,FILE_NAME,ANALYSIS_DATE")
@Select("select FORM_START_TIME,FORM_DEADLINE,FILE_NAME,ANALYSIS_DATE from FILE_NAME_DIC where FILE_ID=#{fileId}")
public Map<String,Object> selectFileNameDic(@Param("fileId")String fileId);
@Select("select sum(pu) pusum,sum(you) yousum from (select decode(CARD_TYPE_ID,0,l,0) pu,decode(CARD_TYPE_ID,9,l,0) you from (select count(CARD_TYPE_ID) as l,CARD_TYPE_ID from PREPRO_PERSON where file_id =#{fileId} group by CARD_TYPE_ID))\n ")
......
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