Commit 2b8ffe95 authored by suichenguang's avatar suichenguang

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

# Conflicts:
#	src/main/java/com/yxproject/start/mapper/PreproPersonMapper.java
#	src/main/java/com/yxproject/start/service/PreproPersonService.java
#	src/main/java/com/yxproject/start/service/impl/PreproPersonServiceImpl.java
parents 428a17f7 90d7ec9c
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.service.PreproPersonService; import com.yxproject.start.service.PreproPersonService;
import com.yxproject.start.utils.ExportXml;
import org.apache.commons.lang.time.DateFormatUtils; import org.apache.commons.lang.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -12,7 +15,9 @@ import java.io.File; ...@@ -12,7 +15,9 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @auther zhangyusheng * @auther zhangyusheng
...@@ -29,15 +34,24 @@ public class ExportXMLApi { ...@@ -29,15 +34,24 @@ public class ExportXMLApi {
*/ */
@RequestMapping("printPostXmlData") @RequestMapping("printPostXmlData")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public byte[] printXmlData(@RequestParam("date") String date, HttpServletResponse response){ public byte[] printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard")String IDCard,@RequestParam("oldFile") String oldFile, @RequestParam("newFile")String newFile, @RequestParam("SSXQDM")String SSXQDM, @RequestParam("cardType")String cardType, @RequestParam("state")String state, @RequestParam("uploadDate")String uploadDate, HttpServletResponse response){
response.setContentType("application/x-download"); response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH"); String dateTime = DateFormatUtils.format(new Date(), "yyyyMMddHH");
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件 // //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null; String fout = null;
//TODO List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate);
// List<PersonPostAbnormalEntity> postAbnormalEntity = personPostService.getAllPersonPostAbnormalEntity(date); FilesEntity filesEntity = new FilesEntity();
// fout = ExportExcel.exportPersonPostAbnormalExcel(postAbnormalEntity); filesEntity.setVersionCode("3.00");
filesEntity.setDwdm("410600000000");
filesEntity.setDwmc("北京市公安局");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
filesEntity.setCreatTime(simpleDateFormat.format(new Date()));
try {
ExportXml.createToMakePackageXML(preproPersonEntities,filesEntity,"\\zhang\\");
} catch (IOException e) {
e.printStackTrace();
}
String outFile = dateTime + "制证数据包"; String outFile = dateTime + "制证数据包";
try { try {
FileInputStream fis = new FileInputStream(new File(fout)); FileInputStream fis = new FileInputStream(new File(fout));
......
package com.yxproject.start.api;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.service.PreproPersonService;
import com.yxproject.start.utils.YXJSONResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* @auther zhangyusheng
* 2019/3/1 13:34
*/
@RestController
@RequestMapping("queryPreproPerson")
public class queryPreproPerson {
@Autowired
private PreproPersonService preproPersonService;
/**
* 查询制证数据
*/
@RequestMapping("queryPreproPerson")
// @RequiresPermissions("userInfo.add")//权限管理;
public String printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard")String IDCard,@RequestParam("oldFile") String oldFile, @RequestParam("newFile")String newFile, @RequestParam("SSXQDM")String SSXQDM, @RequestParam("cardType")String cardType, @RequestParam("state")String state, @RequestParam("uploadDate")String uploadDate, HttpServletResponse response){
List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
response.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(preproPersonEntities);
return yxjsonResponse.toJSONString();
}
}
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.PreproPersonEntity;
import java.util.List;
/** /**
* @auther zhangyusheng * @auther zhangyusheng
* 2019/3/1 11:24 * 2019/3/1 11:24
...@@ -8,4 +12,5 @@ public interface PreproPersonService { ...@@ -8,4 +12,5 @@ public interface PreproPersonService {
public boolean uploadState(String acceptNo,String state); public boolean uploadState(String acceptNo,String state);
public List<PreproPersonEntity> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate);
} }
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.PreproPersonMapper; import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.PreproPersonService; import com.yxproject.start.service.PreproPersonService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @auther zhangyusheng * @auther zhangyusheng
* 2019/3/1 11:25 * 2019/3/1 11:25
...@@ -19,4 +22,9 @@ public class PreproPersonServiceImpl implements PreproPersonService { ...@@ -19,4 +22,9 @@ public class PreproPersonServiceImpl implements PreproPersonService {
preproPersonMapper.updateState(acceptNo,state); preproPersonMapper.updateState(acceptNo,state);
return true; return true;
} }
@Override
public List<PreproPersonEntity> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate) {
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate);
return preproPersonEntities;
}
} }
...@@ -85,7 +85,6 @@ public class ExportXml { ...@@ -85,7 +85,6 @@ public class ExportXml {
SJR_TXDZ.setText(replaceNullString(preproPersonEntity.getSjrTxdz())); SJR_TXDZ.setText(replaceNullString(preproPersonEntity.getSjrTxdz()));
} }
YXStringUtils.saveDom2File(document, url + "\\" + "ZAGL_ZZJH_" + ".xml"); YXStringUtils.saveDom2File(document, url + "\\" + "ZAGL_ZZJH_" + ".xml");
} }
/** /**
......
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