Commit 914545a03d264de756cb1b45b37f7379c8dc4a89
1 parent
7a5c123f19
Exists in
master
and in
6 other branches
儿童诊断
Showing 4 changed files with 87 additions and 1 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
914545a
| ... | ... | @@ -4137,6 +4137,68 @@ |
| 4137 | 4137 | |
| 4138 | 4138 | } |
| 4139 | 4139 | |
| 4140 | + | |
| 4141 | + /** | |
| 4142 | + * 秦皇岛儿童诊断 | |
| 4143 | + * @param fileName | |
| 4144 | + */ | |
| 4145 | + public static void saveQhdbabyDiaginose(String fileName) { | |
| 4146 | + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); | |
| 4147 | + MongoTemplate mongoTemplate | |
| 4148 | + = (MongoTemplate) applicationContext.getBean("mongoTemplate"); | |
| 4149 | + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); | |
| 4150 | + File file = new File(fileName); | |
| 4151 | + Workbook wb = null; | |
| 4152 | + try { | |
| 4153 | + wb = Workbook.getWorkbook(file); | |
| 4154 | + | |
| 4155 | + Sheet s = wb.getSheet(0); | |
| 4156 | + System.out.println(s.getName() + " : "); | |
| 4157 | + int rows = s.getRows(); | |
| 4158 | + if (rows > 0) { | |
| 4159 | + //遍历每行 | |
| 4160 | + for (int i = 1; i < rows; i++) { | |
| 4161 | + System.out.println("rows=" + i); | |
| 4162 | + BasicConfig model = new BasicConfig(); | |
| 4163 | + model.setTypeId("5d00b45d99325a21f94d3ec4"); | |
| 4164 | + model.setParentId("5d00b45d99325a21f94d3ec4"); | |
| 4165 | + model.setEnable(1); | |
| 4166 | + model.setYn(1); | |
| 4167 | + model.setModifiedDate(new Date().getTime()); | |
| 4168 | + Cell[] cells = s.getRow(i); | |
| 4169 | + if (cells.length > 0) { | |
| 4170 | + //遍历每行中的每列 | |
| 4171 | + for (int j = 0; j < cells.length; j++) { | |
| 4172 | + String str = cells[j].getContents().trim(); | |
| 4173 | + if (StringUtils.isEmpty(str)) { | |
| 4174 | + continue; | |
| 4175 | + } | |
| 4176 | + switch (j) { | |
| 4177 | + case 0: | |
| 4178 | + model.setCode(str); | |
| 4179 | + continue; | |
| 4180 | + case 1: | |
| 4181 | + model.setName(str); | |
| 4182 | + continue; | |
| 4183 | + case 2: | |
| 4184 | + model.setWeight(Integer.parseInt(str)); | |
| 4185 | + } | |
| 4186 | + } | |
| 4187 | + | |
| 4188 | + } | |
| 4189 | + mongoTemplate.save(model); | |
| 4190 | + } | |
| 4191 | + } | |
| 4192 | + | |
| 4193 | + } catch (IOException e) { | |
| 4194 | + e.printStackTrace(); | |
| 4195 | + } catch (BiffException e) { | |
| 4196 | + e.printStackTrace(); | |
| 4197 | + } | |
| 4198 | + | |
| 4199 | + } | |
| 4200 | + | |
| 4201 | + | |
| 4140 | 4202 | public static void Test(String fileName) { |
| 4141 | 4203 | ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); |
| 4142 | 4204 | MongoTemplate mongoTemplate |
| ... | ... | @@ -4522,7 +4584,10 @@ |
| 4522 | 4584 | // saveCdgwOrgJwhRe("F:\\承德工位\\承德卫生机构与居委会对应关系表.xls"); |
| 4523 | 4585 | |
| 4524 | 4586 | //saveCdgwOrg("F:\\承德工位\\qhdorg.xls"); |
| 4525 | - babyReport("G:\\儿童膳食报告.xls"); | |
| 4587 | + //babyReport("G:\\儿童膳食报告.xls"); | |
| 4588 | + | |
| 4589 | + // | |
| 4590 | + saveQhdbabyDiaginose("F:\\承德工位\\秦皇岛儿童诊断 - 副本.xls"); | |
| 4526 | 4591 | } |
| 4527 | 4592 | |
| 4528 | 4593 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
View file @
914545a
| ... | ... | @@ -154,6 +154,17 @@ |
| 154 | 154 | return basicConfigFacade.getBaseConfigByType(type); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | + | |
| 158 | + /** | |
| 159 | + * 获取秦皇岛儿童诊断 | |
| 160 | + * @return | |
| 161 | + */ | |
| 162 | + @RequestMapping(method = RequestMethod.GET, value = "/getQhdBabyDiagnosis") | |
| 163 | + @ResponseBody | |
| 164 | + public BaseObjectResponse getQhdBabyDiagnosis() { | |
| 165 | + return basicConfigFacade.getQhdBabyDiagnosis(); | |
| 166 | + } | |
| 167 | + | |
| 157 | 168 | /** |
| 158 | 169 | * 获取高危因素 |
| 159 | 170 | * |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
914545a
| ... | ... | @@ -538,5 +538,14 @@ |
| 538 | 538 | basicConfigByArea(bs); |
| 539 | 539 | } |
| 540 | 540 | } |
| 541 | + | |
| 542 | + public BaseObjectResponse getQhdBabyDiagnosis() { | |
| 543 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 544 | + basicConfigQuery.setYn(YnEnums.YES.getId()); | |
| 545 | + basicConfigQuery.setParentId("5d00b45d99325a21f94d3ec4"); | |
| 546 | + List<BasicConfig> data = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 547 | + return new BaseObjectResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 548 | + | |
| 549 | + } | |
| 541 | 550 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
View file @
914545a
| ... | ... | @@ -59,6 +59,7 @@ |
| 59 | 59 | urls.put("area-changyi-api.healthbaby.com.cn:12356","昌邑"); |
| 60 | 60 | urls.put("area-xtrm-api.healthbaby.com.cn:12356","邢台人民医院系统"); |
| 61 | 61 | urls.put("area-zhuchengrenmin-api.healthbaby.com.cn:12356","诸城人民医院"); |
| 62 | + urls.put("area-hengshui-api.healthbaby.com.cn:8787","衡水区域"); | |
| 62 | 63 | } |
| 63 | 64 | |
| 64 | 65 | @Autowired |