Commit 875afd8e22c999d0315324c08a09afe141c71a85

Authored by [wangbo]
1 parent 9d1c1dbed3

修改孕妇追访bug1

Showing 3 changed files with 129 additions and 10 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java View file @ 875afd8
... ... @@ -4140,6 +4140,7 @@
4140 4140  
4141 4141 /**
4142 4142 * 秦皇岛儿童诊断
  4143 + *
4143 4144 * @param fileName
4144 4145 */
4145 4146 public static void saveQhdbabyDiaginose(String fileName) {
... ... @@ -4199,6 +4200,128 @@
4199 4200 }
4200 4201  
4201 4202  
  4203 + /***
  4204 + * 秦皇岛孕妇体重定制报告内容
  4205 + * */
  4206 + public static void saveQhdWeight(String fileName) {
  4207 + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml");
  4208 + MongoTemplate mongoTemplate
  4209 + = (MongoTemplate) applicationContext.getBean("mongoTemplate");
  4210 + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray());
  4211 + File file = new File(fileName);
  4212 + Workbook wb = null;
  4213 + try {
  4214 + wb = Workbook.getWorkbook(file);
  4215 +
  4216 + Sheet s = wb.getSheet(0);
  4217 + System.out.println(s.getName() + " : ");
  4218 + int rows = s.getRows();
  4219 + if (rows > 0) {
  4220 + //遍历每行
  4221 + for (int i = 1; i < rows; i++) {
  4222 + System.out.println("rows=" + i);
  4223 + QhdWeightConfigModel qhd = new QhdWeightConfigModel();
  4224 +
  4225 + Cell[] cells = s.getRow(i);
  4226 + if (cells.length > 0) {
  4227 + //遍历每行中的每列
  4228 + for (int j = 0; j < cells.length; j++) {
  4229 + String str = cells[j].getContents().trim();
  4230 + if (StringUtils.isEmpty(str)) {
  4231 + continue;
  4232 + }
  4233 + switch (j) {
  4234 + case 0:
  4235 + qhd.setKcal(Integer.parseInt(str));
  4236 + continue;
  4237 + case 1:
  4238 + List<String> list1 = Arrays.asList(str.split("\n"));
  4239 + qhd.setEarlySuggests(list1);
  4240 + continue;
  4241 + case 2:
  4242 + List<String> list2 = Arrays.asList(str.split("\n"));
  4243 + qhd.setMiddleSuggests(list2);
  4244 + continue;
  4245 +
  4246 + case 3:
  4247 + List<String> list3 = Arrays.asList(str.split("\n"));
  4248 + qhd.setLaterSuggests(list3);
  4249 + continue;
  4250 + }
  4251 + }
  4252 +
  4253 + }
  4254 + mongoTemplate.save(qhd);
  4255 + }
  4256 + }
  4257 +
  4258 + Sheet s1 = wb.getSheet(1);
  4259 + System.out.println(s1.getName() + " : ");
  4260 + int rows1 = s1.getRows();
  4261 + if (rows1 > 0) {
  4262 + //遍历每行
  4263 + for (int i = 1; i < rows1; i++) {
  4264 + System.out.println("rows=" + i);
  4265 + QhdWeightConfigModel qhd = new QhdWeightConfigModel();
  4266 +
  4267 + Cell[] cells = s1.getRow(i);
  4268 + if (cells.length > 0) {
  4269 + //遍历每行中的每列
  4270 + for (int j = 0; j < cells.length; j++) {
  4271 + String str = cells[j].getContents().trim();
  4272 + if (StringUtils.isEmpty(str)) {
  4273 + continue;
  4274 + }
  4275 + switch (j) {
  4276 + case 0:
  4277 + qhd.setKcal(Integer.parseInt(str));
  4278 + continue;
  4279 + case 1:
  4280 + List<String> list1 = Arrays.asList(str.split("\n"));
  4281 + qhd.setBreakfast(list1);
  4282 + continue;
  4283 + case 2:
  4284 + List<String> list2 = Arrays.asList(str.split("\n"));
  4285 + qhd.setBreakfastAdd(list2);
  4286 + continue;
  4287 + case 3:
  4288 + List<String> list3 = Arrays.asList(str.split("\n"));
  4289 + qhd.setLunch(list3);
  4290 + continue;
  4291 + case 4:
  4292 + List<String> list4 = Arrays.asList(str.split("\n"));
  4293 + qhd.setLunchAdd(list4);
  4294 + continue;
  4295 + case 5:
  4296 + List<String> list5 = Arrays.asList(str.split("\n"));
  4297 + qhd.setDinner(list5);
  4298 + continue;
  4299 + case 6:
  4300 + List<String> list6 = Arrays.asList(str.split("\n"));
  4301 + qhd.setDinnerAdd(list6);
  4302 + continue;
  4303 + case 7:
  4304 + qhd.setPregnancy(Integer.parseInt(str));
  4305 + continue;
  4306 + }
  4307 +
  4308 + }
  4309 +
  4310 + }
  4311 + mongoTemplate.save(qhd);
  4312 + }
  4313 + }
  4314 +
  4315 +
  4316 + } catch (IOException e) {
  4317 + e.printStackTrace();
  4318 + } catch (BiffException e) {
  4319 + e.printStackTrace();
  4320 + }
  4321 +
  4322 + }
  4323 +
  4324 +
4202 4325 public static void Test(String fileName) {
4203 4326 ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml");
4204 4327 MongoTemplate mongoTemplate
4205 4328  
4206 4329  
4207 4330  
... ... @@ -4565,15 +4688,10 @@
4565 4688 // weightMange("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls");
4566 4689 // weightFood("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls");
4567 4690 // bloodSugar("F:\\血糖报告\\血糖报告\\血糖报告基础数据格式(2).xls");
4568   -
4569 4691 // zcet("D:\\doc\\高血压报告20180813模板.xls");
4570 4692 // zcet("D:\\doc\\1.xls",false);
4571   -
4572 4693 // addBabyBmiHealthConfig("F:\\儿童营养报告\\婴幼儿bmi.xls");
4573   -
4574 4694 // babyConfig("F:\\儿童营养报告\\儿童营养报告模板.xls");
4575   -
4576   -
4577 4695 //babyNutritionConfig("F:\\儿童营养报告\\婴幼儿体重与营养管理报告内容及规则\\儿童膳食报告文章2.xls");
4578 4696 //xyPresentation("E:\\血压报告.xls");
4579 4697 //weightReport("E:\\体重营养报告10.xls");
4580 4698  
4581 4699  
... ... @@ -4582,12 +4700,11 @@
4582 4700 // weightReport("E:\\体重营养报告10.xls");
4583 4701 // saveCdgwOrg("F:\\承德工位\\cdorg.xls");
4584 4702 // saveCdgwOrgJwhRe("F:\\承德工位\\承德卫生机构与居委会对应关系表.xls");
4585   -
4586 4703 //saveCdgwOrg("F:\\承德工位\\qhdorg.xls");
4587 4704 //babyReport("G:\\儿童膳食报告.xls");
  4705 + // saveQhdbabyDiaginose("F:\\承德工位\\秦皇岛儿童诊断 - 副本.xls");
4588 4706  
4589   - //
4590   - saveQhdbabyDiaginose("F:\\承德工位\\秦皇岛儿童诊断 - 副本.xls");
  4707 + saveQhdWeight("F:\\text.xls");
4591 4708 }
4592 4709  
4593 4710 }
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ 875afd8
... ... @@ -1332,6 +1332,8 @@
1332 1332 downRecord.setHospitalId(getHospitalId());
1333 1333 downRecord.setSource(getId());
1334 1334 downRecord.setStatus(1);
  1335 + downRecord.setAppointmentDate(new Date());
  1336 + downRecord.setStop("0");
1335 1337 downRecord.setTrackType(TrackDownDateEnums.C.getId());
1336 1338 return downRecord;
1337 1339 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 875afd8
... ... @@ -442,8 +442,8 @@
442 442 if (CollectionUtils.isNotEmpty(residentsArchiveModelList)) {
443 443 ResidentsArchiveModel residentsArchiveModel = new ResidentsArchiveModel();
444 444 residentsArchiveModel.setPregnantBuild("1");
445   - residentsArchiveModel.setFollowupTime(new Date());
446   - residentsArchiveModel.setStop("0");
  445 + /* residentsArchiveModel.setFollowupTime(new Date());
  446 + residentsArchiveModel.setStop("0");*/
447 447 ResidentsArchiveModel archiveModel = residentsArchiveModelList.get(0);
448 448 residentsArchiveService.updateResident(residentsArchiveModel, archiveModel.getId());
449 449 }