Commit f3583d35 authored by suichenguang's avatar suichenguang

excel添加更改备注

parent 163f95c8
...@@ -114,7 +114,15 @@ public class LogApi { ...@@ -114,7 +114,15 @@ public class LogApi {
List<Map<String,Object>> resultList = logService.selectFileIdByUploadDate(printDate); List<Map<String,Object>> resultList = logService.selectFileIdByUploadDate(printDate);
//查询Excel文件信息 //查询Excel文件信息
Map<String, Object> resultMap = logService.selectFileNameDic(fileId); Map<String, Object> resultMap = logService.selectFileNameDic(fileId);
//更改解析状态
logService.changeFileState(fileId); logService.changeFileState(fileId);
//查询身份数据
List<Map<String, Object>> dataList = logService.selectIdData(fileId);
System.out.println("0000000000000000000000000000000000"+dataList);
//将身份数据插入到邮寄表中
for (int i=0;i<dataList.size();i++){
logService.insertIdData((String) dataList.get(i).get("GMSFHM"),(String) dataList.get(i).get("SSXQDM"),(String) dataList.get(i).get("YXQQSRQ"),(String) dataList.get(i).get("YXQJZRQ"), (String) dataList.get(i).get("JMSFZSLH"));
}
List<Map<String,Object>> result = new ArrayList<>(); List<Map<String,Object>> result = new ArrayList<>();
for (int i=0; i<resultList.size();i++){ for (int i=0; i<resultList.size();i++){
String fileName=(BigDecimal)(resultList.get(i).get("ID"))+""; String fileName=(BigDecimal)(resultList.get(i).get("ID"))+"";
...@@ -124,6 +132,7 @@ public class LogApi { ...@@ -124,6 +132,7 @@ public class LogApi {
resultMap.put("commonCount",countMap.get("PUSUM")); resultMap.put("commonCount",countMap.get("PUSUM"));
resultMap.put("postCount",countMap.get("YOUSUM")); resultMap.put("postCount",countMap.get("YOUSUM"));
result.add(resultMap); result.add(resultMap);
//生成解析表
logService.insertIntoAnalysis(fileId,fileName,String.valueOf(countMap.get("PUSUM")),String.valueOf(countMap.get("YOUSUM"))); logService.insertIntoAnalysis(fileId,fileName,String.valueOf(countMap.get("PUSUM")),String.valueOf(countMap.get("YOUSUM")));
} }
return true; return true;
......
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyDicEntity; import com.yxproject.start.entity.CountyDicEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.omg.CORBA.PUBLIC_MEMBER;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -32,9 +33,19 @@ public interface LogMapper { ...@@ -32,9 +33,19 @@ public interface LogMapper {
public boolean changeCardType(@Param("printDate")String printDate,@Param("fileId")String fileId); public boolean changeCardType(@Param("printDate")String printDate,@Param("fileId")String fileId);
@Update(" update FILE_NAME_DIC set FILE_NAME_DIC.ANALYSIS_DATE = #{printDate} where file_id=#{fileId} ") @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); public boolean insertAnalysisDate(@Param("printDate")String printDate,@Param("fileId")String fileId);
/**
* 生成解析表
* @param fileDic
* @param fileId
* @param commonCardCount
* @param postCardCount
* @return
*/
@Insert("INSERT INTO ANALYSIS (FILE_DIC_ID,FILE_ID,COMMON_CARD_COUNT,POST_CARD_COUNT) VALUES (#{fileDic},#{fileId},#{commonCardCount},#{postCardCount})") @Insert("INSERT INTO ANALYSIS (FILE_DIC_ID,FILE_ID,COMMON_CARD_COUNT,POST_CARD_COUNT) VALUES (#{fileDic},#{fileId},#{commonCardCount},#{postCardCount})")
public boolean insertIntoAnalysis(@Param("fileDic")String fileDic,@Param("fileId")String fileId,@Param("commonCardCount")String commonCardCount,@Param("postCardCount")String postCardCount); public boolean insertIntoAnalysis(@Param("fileDic")String fileDic,@Param("fileId")String fileId,@Param("commonCardCount")String commonCardCount,@Param("postCardCount")String postCardCount);
...@@ -156,6 +167,19 @@ public interface LogMapper { ...@@ -156,6 +167,19 @@ public interface LogMapper {
public Map<String,Object> selectCountByCardType(@Param("fileId")String fileId); public Map<String,Object> selectCountByCardType(@Param("fileId")String fileId);
//查询身份数据
@Select("select PREPRO_PERSON.JMSFZSLH, PREPRO_PERSON.GMSFHM,PREPRO_PERSON.YXQQSRQ,PREPRO_PERSON.YXQJZRQ,PREPRO_PERSON.SSXQDM FROM PREPRO_PERSON " +
"LEFT JOIN ANALYSIS ON ANALYSIS.FILE_ID = PREPRO_PERSON.FILE_ID " +
"LEFT JOIN PERSON_POST ON ANALYSIS.FILE_DIC_ID =PERSON_POST.FILE_ID " +
"WHERE PERSON_POST.FILE_ID=#{fileId}")
public List<Map<String,Object>> selectIdData(@Param("fileId")String fileId);
//身份数据插入person_post
@Update("UPDATE PERSON_POST SET ID_CARD=#{cardId},ACCEPT_THE_MATTER=#{issuing},BEGIN_USEFUL_LIFE=#{beginDate},VALID_PERIOD_END=#{endDate} where PERSON_POST.FIRST_WHITE=#{firstWhite}")
public boolean insertIdData(@Param("cardId")String cardId,@Param("issuing") String issuing,@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("firstWhite")String firstWhite );
/** /**
* 解析时更改Excel文件状态 * 解析时更改Excel文件状态
* @param fileId * @param fileId
......
...@@ -42,4 +42,9 @@ public interface LogService { ...@@ -42,4 +42,9 @@ public interface LogService {
public String selectByFileName(@Param("fileName")String fileName); public String selectByFileName(@Param("fileName")String fileName);
public boolean changeFileState(@Param("fileId") String fileId); public boolean changeFileState(@Param("fileId") String fileId);
public List<Map<String,Object>> selectIdData(@Param("fileId")String fileId);
public boolean insertIdData(String cardId, String issuing,String beginDate,String endDate,String firstWhite );
} }
...@@ -119,4 +119,16 @@ public class LogServiceImpl implements LogService { ...@@ -119,4 +119,16 @@ public class LogServiceImpl implements LogService {
logMapper.changeFileState(fileId); logMapper.changeFileState(fileId);
return false; return false;
} }
@Override
public List<Map<String, Object>> selectIdData(String fileId) {
List<Map<String, Object>> resultList = logMapper.selectIdData(fileId);
return resultList;
}
@Override
public boolean insertIdData(String cardId, String issuing, String beginDate, String endDate,String firstWhite) {
logMapper.insertIdData(cardId,issuing,beginDate,endDate,firstWhite);
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