Commit 95991ced authored by dahai's avatar dahai

push

parent 2f48bfc8
...@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -45,8 +46,11 @@ public class ExportXMLApi { ...@@ -45,8 +46,11 @@ public class ExportXMLApi {
String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH"); String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH");
//使用Servlet实现文件下载的时候,避免浏览器自动打开文件 //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null; String fout = null;
List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate); //todo 更改查询条件
List<PreproPersonEntity> preproPersonEntities = new ArrayList<>();
// List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate);
if (preproPersonEntities.size()>0){ if (preproPersonEntities.size()>0){
//todo 查询制证数据包信息
FilesEntity filesEntity = new FilesEntity(); FilesEntity filesEntity = new FilesEntity();
filesEntity.setVersionCode("3.00"); filesEntity.setVersionCode("3.00");
filesEntity.setDwdm("410600000000"); filesEntity.setDwdm("410600000000");
......
...@@ -87,8 +87,6 @@ public class ReadExcelApi { ...@@ -87,8 +87,6 @@ public class ReadExcelApi {
// 如果fileitem中封装的是上传文件 // 如果fileitem中封装的是上传文件
// 得到上传的文件名称 // 得到上传的文件名称
filename = item.getOriginalFilename(); filename = item.getOriginalFilename();
System.out.println(item.getName()); // 为上传的key值
System.out.println(item.getOriginalFilename()); // 上传的真实文件的文件名
File file = null; File file = null;
try { try {
file = File.createTempFile("prefix", "_" + item.getOriginalFilename()); file = File.createTempFile("prefix", "_" + item.getOriginalFilename());
......
...@@ -39,9 +39,9 @@ public class queryPreproPerson { ...@@ -39,9 +39,9 @@ public class queryPreproPerson {
/** /**
* 更新制证数据是否有效 * 更新制证数据是否有效
*/ */
@RequestMapping("queryPreproPerson") @RequestMapping("updatePreproPerson")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public Map<String,Object> printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("isValid")String isValid, HttpServletResponse response){ public Map<String,Object> updatePreproPerson(@RequestParam("uploadNo") String uploadNo, @RequestParam("isValid")String isValid, HttpServletResponse response){
PreproPersonEntity preproPersonEntity = new PreproPersonEntity(); PreproPersonEntity preproPersonEntity = new PreproPersonEntity();
preproPersonEntity.setJmsfzslh(uploadNo); preproPersonEntity.setJmsfzslh(uploadNo);
preproPersonEntity.setIsValid(Long.valueOf(isValid)); preproPersonEntity.setIsValid(Long.valueOf(isValid));
......
...@@ -25,36 +25,34 @@ public interface PreproPersonMapper { ...@@ -25,36 +25,34 @@ public interface PreproPersonMapper {
/*按条件查询制证数据*/ /*按条件查询制证数据*/
@Select({"<script>" + @Select("select * from (select a.*,rownum rn from(select * from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID " +
"select * from (select a.*,rownum rn from(select * from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID " + "where " +
"<where> " +
" 1=1" + " 1=1" +
"<if test='uploadNo != null '>" + "<if test='uploadNo != null '>" +
"and PREPRO_PERSON.JMSFZSLH = #{uploadNo}" + "and PREPRO_PERSON.JMSFZSLH = #{uploadNo}" +
"</if>" + "</if>" +
" <if test='IDCard != null '> ", " <if test='IDCard != null '> "+
"and GMSFHM = #{IDCard} ", "and GMSFHM = #{IDCard} "+
"</if> ", "</if> "+
" <if test='oldFile != null '> ", " <if test='oldFile != null '> "+
"and files.SOURCE_FILE_NAME =#{oldFile} ", "and files.SOURCE_FILE_NAME =#{oldFile} "+
" </if> ", " </if> "+
" <if test='newFile != null'> ", " <if test='newFile != null'> "+
"and NEW_FILES.NEW_FILE_NAME = #{newFile}", "and NEW_FILES.NEW_FILE_NAME = #{newFile}"+
" </if> ", " </if> "+
" <if test='SSXQDM != null '> ", " <if test='SSXQDM != null '> "+
"and PREPRO_PERSON.SSXQDM =#{SSXQDM}", "and PREPRO_PERSON.SSXQDM =#{SSXQDM}"+
" </if>", " </if>"+
" <if test='cardType != null '>", " <if test='cardType != null '>"+
" and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}", " and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}"+
" </if> ", " </if> "+
" <if test='state != null'>", " <if test='state != null'>"+
" and PREPRO_PERSON.state = #{state}", " and PREPRO_PERSON.state = #{state}"+
" </if> ", " </if> "+
" <if test='uploadDate != null '>", " <if test='uploadDate != null '>"+
" and files.CREAT_TIME = #{uploadDate}", " and files.CREAT_TIME = #{uploadDate}"+
" </if> ", " </if> "+
"</where>" + ") a ) where rn between #{minNum} and #{maxNum} ")
") a ) where rn between #{minNum} and #{maxNum} </script>"})
public List<PreproPersonEntity> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate, @Param("minNum") long minNum, @Param("maxNum") long maxNum); public List<PreproPersonEntity> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate, @Param("minNum") long minNum, @Param("maxNum") long maxNum);
/*按条件查询制证数据*/ /*按条件查询制证数据*/
@Select({"<script>" + @Select({"<script>" +
......
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