Commit dc2fafaf0700a2430da1958ca683c031932cdc05
1 parent
52dcf623d3
Exists in
master
and in
6 other branches
大同初诊打印
Showing 3 changed files with 98 additions and 0 deletions
platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/BabyAmsMsgGenerateWorker.java
View file @
dc2fafa
| ... | ... | @@ -84,6 +84,7 @@ |
| 84 | 84 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 85 | 85 | babyQuery.setYn(YnEnums.YES.getId()); |
| 86 | 86 | babyQuery.setHospitalId(hospitalId); |
| 87 | + //babyQuery.setMphone("15230280694"); // 15027805358 17732261179 15930921847 13851409428 13175251837 | |
| 87 | 88 | |
| 88 | 89 | List buildType = new ArrayList(); |
| 89 | 90 | buildType.add(1); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
dc2fafa
| ... | ... | @@ -767,6 +767,18 @@ |
| 767 | 767 | return viewFacade.findPatientData(id); |
| 768 | 768 | } |
| 769 | 769 | |
| 770 | + /** | |
| 771 | + * 大同打印信息 | |
| 772 | + * @param id | |
| 773 | + * @return | |
| 774 | + */ | |
| 775 | + @RequestMapping(value = "/printPatientData", method = RequestMethod.GET) | |
| 776 | + @ResponseBody | |
| 777 | + @TokenRequired | |
| 778 | + public BaseObjectResponse printPatientData(@RequestParam("id") String id) { | |
| 779 | + return viewFacade.printPatientData(id); | |
| 780 | + } | |
| 781 | + | |
| 770 | 782 | |
| 771 | 783 | /** |
| 772 | 784 | * 查看产后复查 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
dc2fafa
| ... | ... | @@ -243,6 +243,32 @@ |
| 243 | 243 | return br; |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | + | |
| 247 | + | |
| 248 | + public BaseObjectResponse printPatientData(String id) { | |
| 249 | + | |
| 250 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 251 | + if (org.apache.commons.lang.StringUtils.isEmpty(id)) { | |
| 252 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 253 | + br.setErrormsg("id为空"); | |
| 254 | + return br; | |
| 255 | + } | |
| 256 | + | |
| 257 | + Patients data = patientsService.findOnePatientById(id); | |
| 258 | + if (data == null || data.getYn() == YnEnums.NO.getId()) { | |
| 259 | + br.setErrorcode(ErrorCodeConstants.NO_DATA); | |
| 260 | + br.setErrormsg("没有查询到数据"); | |
| 261 | + return br; | |
| 262 | + } | |
| 263 | + | |
| 264 | + Map<String, Object> map = getPrintPatientViewData(data, id); | |
| 265 | + //显示服务信息 | |
| 266 | + br.setData(map); | |
| 267 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 268 | + br.setErrormsg("成功"); | |
| 269 | + return br; | |
| 270 | + } | |
| 271 | + | |
| 246 | 272 | /** |
| 247 | 273 | * 查看信息 |
| 248 | 274 | * |
| ... | ... | @@ -357,6 +383,65 @@ |
| 357 | 383 | return data; |
| 358 | 384 | } |
| 359 | 385 | |
| 386 | + | |
| 387 | + public Map<String, Object> getPrintPatientViewData(Patients data, String id) { | |
| 388 | + Map<String, Object> map = new HashMap<>(); | |
| 389 | + | |
| 390 | + | |
| 391 | + map.put("id", data.getId()); | |
| 392 | + /* 孕妇基础数据 */ | |
| 393 | + map.put("username", data.getUsername()); | |
| 394 | + | |
| 395 | + map.put("birth", DateUtil.getyyyy_MM_dd(data.getBirth())); | |
| 396 | + map.put("age", UnitUtils.unitSplice(DateUtil.getAge(data.getBirth()), UnitConstants.SUI)); | |
| 397 | + | |
| 398 | + | |
| 399 | + /* 孕妇联系方式 */ | |
| 400 | +// map.put("residence", CommonsHelper.getResidence(data.getProvinceId(), data.getCityId(), | |
| 401 | +// data.getAreaId(), data.getStreetId(), data.getAddress(), basicConfigService)); | |
| 402 | + map.put("register", CommonsHelper.getResidence(data.getProvinceRegisterId(), data.getCityRegisterId(), | |
| 403 | + data.getAreaRegisterId(), data.getStreetRegisterId(), data.getAddressRegister(), basicConfigService)); | |
| 404 | +// map.put("postRest", CommonsHelper.getResidence(data.getProvincePostRestId(), data.getCityPostRestId(), | |
| 405 | +// data.getAreaPostRestId(), data.getStreetPostRestId(), data.getChildExtAddrs(), data.getAddressPostRest(), basicConfigService)); | |
| 406 | + map.put("pprofessionType", getBasicConfig(data.getPprofessionTypeId())); | |
| 407 | + map.put("hprofessionType", getBasicConfig(data.getHprofessionTypeId())); | |
| 408 | + /* 丈夫信息 */ | |
| 409 | + map.put("husbandName", data.getHusbandName()); | |
| 410 | + | |
| 411 | + map.put("husbandBirth", DateUtil.getyyyy_MM_dd(data.getHusbandBirth())); | |
| 412 | + map.put("husbandAge", DateUtil.getAge(data.getHusbandBirth())); | |
| 413 | + | |
| 414 | + map.put("hregister", CommonsHelper.getResidence(data.getHprovinceRegisterId(), data.getHcityRegisterId(), | |
| 415 | + data.getHareaRegisterId(), data.getHstreetRegisterId(), data.getHaddressRegister(), | |
| 416 | + basicConfigService)); | |
| 417 | + | |
| 418 | + map.put("LevelType",getBasicConfig(data.getLevelTypeId())); | |
| 419 | + map.put("marriageStatus",data.getMarriageStatus() == null ? "" : data.getMarriageStatus() == 1 ? "初婚" : (data.getMarriageStatus() == 2 ? "再婚" : "其他")); | |
| 420 | + map.put("marriageCheck",data.getMarriageCheck() == null ? "" : data.getMarriageCheck() == 1 ? "是" : "否"); | |
| 421 | + StringBuilder sb = new StringBuilder(); | |
| 422 | + if (data.getContraceptionType() != null && data.getContraceptionType().size() > 0) | |
| 423 | + { | |
| 424 | + | |
| 425 | + sb.append(data.getContraceptionType().get("wby") != null && data.getContraceptionType().get("wby") == true ? "未避孕 " : ""); | |
| 426 | + sb.append(data.getContraceptionType().get("kfby") != null && data.getContraceptionType().get("kfby") == true ? "口服避孕药 " : ""); | |
| 427 | + sb.append(data.getContraceptionType().get("byt") != null && data.getContraceptionType().get("byt") == true ? "避孕套 " : ""); | |
| 428 | + sb.append(data.getContraceptionType().get("bym") != null && data.getContraceptionType().get("bym") == true ? "避孕膜 " : ""); | |
| 429 | + sb.append(data.getContraceptionType().get("qt") != null && data.getContraceptionType().get("qt") == true ? data.getContraceptionOther()+" " : ""); | |
| 430 | + } | |
| 431 | + map.put("contraceptionType",sb.toString()); | |
| 432 | + map.put("hmarriageStatus",data.getHmarriageStatus() == null ? "" : data.getHmarriageStatus() == 1 ? "初婚" : (data.getHmarriageStatus() == 2 ? "再婚" : "其他")); | |
| 433 | + map.put("healthStatus",data.getHealthStatus()); | |
| 434 | + map.put("smoke",data.getSmoke() == null ? "" : data.getSmoke() == 1 ? "否" : "是"); | |
| 435 | + map.put("smokeNum",(data.getSmoke() != null && data.getSmoke() == 2) ? data.getSmokeNum() : ""); | |
| 436 | + map.put("drinkWine",data.getDrinkWine() == null ? "" : data.getDrinkWine() == 1 ? "偶尔" : (data.getDrinkWine() == 2 ? "经常" : "否")); | |
| 437 | + map.put("hLevelType",getBasicConfig(data.getHlevelTypeId())); | |
| 438 | + map.put("hmarriageAge",data.getHmarriageAge() == null ? "" : data.getHmarriageAge()); | |
| 439 | + map.put("pastHistory",data.getPastHistory() == null ? "" : data.getPastHistory()); | |
| 440 | + map.put("familyHistory",data.getFamilyHistory() == null ? "" : data.getFamilyHistory()); | |
| 441 | + map.put("other",data.getOther() == null ? "" :data.getOther()); | |
| 442 | + | |
| 443 | + return map; | |
| 444 | + } | |
| 360 | 445 | |
| 361 | 446 | public Map<String, Object> getPatientViewData(Patients data, String id) { |
| 362 | 447 | Map<String, Object> map = new HashMap<>(); |