Commit 9f3af45ebdfaf3d7360e3c27c85ea8893e836f14
1 parent
6be0e2b9f5
Exists in
master
and in
6 other branches
滦平-指导意见模板添加
Showing 3 changed files with 47 additions and 1 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/Guidelines.java
View file @
9f3af45
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/GuideLineController.java
View file @
9f3af45
| ... | ... | @@ -54,5 +54,27 @@ |
| 54 | 54 | } |
| 55 | 55 | return stringBuilder.toString(); |
| 56 | 56 | } |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 滦平定制指导意见 | |
| 60 | + * @param guideQuery | |
| 61 | + * @return | |
| 62 | + */ | |
| 63 | + @ResponseBody | |
| 64 | + @RequestMapping(method = RequestMethod.GET,value = "/lpGuide") | |
| 65 | + public String lpGuide(GuideQuery guideQuery) { | |
| 66 | + GuidelinesQuery guidelinesQuery=new GuidelinesQuery(); | |
| 67 | + guidelinesQuery.setType(guideQuery.getType()); | |
| 68 | + guidelinesQuery.setMaxStart(guideQuery.getNum()); | |
| 69 | + guidelinesQuery.setMinEnd(guideQuery.getNum()); | |
| 70 | + List<Guidelines> list = guidelinesService.queryGuidelines(guidelinesQuery); | |
| 71 | + StringBuilder stringBuilder=new StringBuilder(128); | |
| 72 | + if(CollectionUtils.isNotEmpty(list)){ | |
| 73 | + for(Guidelines guidelines:list){ | |
| 74 | + stringBuilder.append(guidelines.getContent()).append("\r\n"); | |
| 75 | + } | |
| 76 | + } | |
| 77 | + return stringBuilder.toString(); | |
| 78 | + } | |
| 57 | 79 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
9f3af45
| ... | ... | @@ -4973,5 +4973,29 @@ |
| 4973 | 4973 | // public void testa() { |
| 4974 | 4974 | // //lhxfyService.uploadingProvinceTask("2100001605", DateUtil.parseYMD("2021-12-09"), DateUtil.parseYMD("2021-12-10")); |
| 4975 | 4975 | // } |
| 4976 | + @RequestMapping(value = "/test/Guidelines", method = RequestMethod.GET) | |
| 4977 | + @ResponseBody | |
| 4978 | + public void testGuidelines() { | |
| 4979 | + try { | |
| 4980 | + List<String> list = FileUtils.readLines(new File("E:\\temp\\儿童指导意见.csv"),"GBK"); | |
| 4981 | + int i = 0; | |
| 4982 | + for (String line : list) { | |
| 4983 | + i++; | |
| 4984 | + String[] array = line.split(","); | |
| 4985 | + if (array.length == 2) { | |
| 4986 | + Guidelines guidelines = new Guidelines(); | |
| 4987 | + guidelines.setYn(YnEnums.YES.getId()); | |
| 4988 | + guidelines.setContent(array[1]); | |
| 4989 | + guidelines.setType(4); | |
| 4990 | + guidelines.setStart(Integer.valueOf(array[0])); | |
| 4991 | + guidelines.setEnd(guidelines.getStart()); | |
| 4992 | + System.out.println(i + " == " + JsonUtil.obj2JsonString(guidelines)); | |
| 4993 | + mongoTemplate.save(guidelines); | |
| 4994 | + } | |
| 4995 | + } | |
| 4996 | + } catch (IOException e) { | |
| 4997 | + e.printStackTrace(); | |
| 4998 | + } | |
| 4999 | + } | |
| 4976 | 5000 | } |