Commit ededa357 authored by dahai's avatar dahai

修改上传时间格式

parent ab61c05e
...@@ -100,8 +100,8 @@ public class ReadExcelApi { ...@@ -100,8 +100,8 @@ public class ReadExcelApi {
FileNameDicEntity fileNameDicEntity = new FileNameDicEntity(); FileNameDicEntity fileNameDicEntity = new FileNameDicEntity();
fileNameDicEntity.setFileName(filename); fileNameDicEntity.setFileName(filename);
fileNameDicEntity.setUploadDate(new Date()); fileNameDicEntity.setUploadDate(new Date());
fileNameDicEntity.setFormStartTime(startDate); fileNameDicEntity.setFormStartTime(replaceDate(startDate));
fileNameDicEntity.setFormDeadline(endDate); fileNameDicEntity.setFormDeadline(replaceDate(endDate));
long l = fileNameDicService.saveFileNameDic(fileNameDicEntity); long l = fileNameDicService.saveFileNameDic(fileNameDicEntity);
//保存个人邮寄信息 //保存个人邮寄信息
List<PersonPostEntity> entityList = new ArrayList<>(); List<PersonPostEntity> entityList = new ArrayList<>();
...@@ -182,4 +182,8 @@ public class ReadExcelApi { ...@@ -182,4 +182,8 @@ public class ReadExcelApi {
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
private String replaceDate(String str){
return str.replace("-","");
}
} }
\ No newline at end of file
...@@ -133,11 +133,15 @@ public class ReadXmlApi { ...@@ -133,11 +133,15 @@ public class ReadXmlApi {
*/ */
@RequestMapping("queryPersonXMLCount") @RequestMapping("queryPersonXMLCount")
public String queryPersonXMLCount(@RequestParam("importDate") String importDate, @RequestParam("state") String state, HttpServletResponse resp) { public String queryPersonXMLCount(@RequestParam("importDate") String importDate, @RequestParam("state") String state, HttpServletResponse resp) {
List<CountDataEntity> countDataEntities = importXmlService.queryPersonXmlCount(importDate, Long.valueOf(state)); List<CountDataEntity> countDataEntities = importXmlService.queryPersonXmlCount(replaceDate(importDate), Long.valueOf(state));
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countDataEntities); yxjsonResponse.outPutSuccess(countDataEntities);
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
private String replaceDate(String str){
return str.replace("-","");
}
} }
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