Commit 95991ced authored by dahai's avatar dahai

push

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