Commit 4e8332d07be8f38808f6113186f3c13d0377c858

Authored by [wangbo]
1 parent 1b21d6b377

儿保检查页面呈现

Showing 4 changed files with 224 additions and 4 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyCheckService.java View file @ 4e8332d
... ... @@ -56,6 +56,15 @@
56 56 return babyCheckDao.queryBabyCheckRecord(query.addOrder(Sort.Direction.DESC,"created"));
57 57 }
58 58  
  59 + public List<BabyCheckModel> queryBabyCheckListRecord(BabyCheckModelQuery babyQuery) {
  60 + MongoQuery query = babyQuery.convertToQuery();
  61 + if (StringUtils.isNotEmpty(babyQuery.getNeed())) {
  62 + babyQuery.mysqlBuild(babyCheckDao.queryBabyCheckCount(babyQuery.convertToQuery()));
  63 + query.start(babyQuery.getOffset()).end(babyQuery.getLimit());
  64 + }
  65 + return babyCheckDao.queryBabyCheckRecord(query.addOrder(Sort.Direction.ASC,"created"));
  66 + }
  67 +
59 68 public List<BabyCheckModel> queryBabyCheckRecord(BabyCheckModelQuery query,String sortkey,Sort.Direction sort) {
60 69 return babyCheckDao.queryBabyCheckRecord(query.convertToQuery().addOrder(sort, sortkey));
61 70 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java View file @ 4e8332d
... ... @@ -925,9 +925,13 @@
925 925  
926 926 }
927 927  
928   - /***
929   - * 检查报告
930   - * */
  928 + /**
  929 + * 检查报表
  930 + *
  931 + * @param antex
  932 + * @param request
  933 + * @return
  934 + */
931 935 @RequestMapping(value = "/checkReport", method = RequestMethod.GET)
932 936 @ResponseBody
933 937 @TokenRequired
... ... @@ -938,6 +942,18 @@
938 942  
939 943 }
940 944  
  945 + /**
  946 + * 儿童检查列表详情
  947 + *
  948 + * @param id
  949 + * @return
  950 + */
  951 + @RequestMapping(value = "/getBabyCheckList/{id}", method = RequestMethod.GET)
  952 + @ResponseBody
  953 + @TokenRequired
  954 + public BaseObjectResponse getBabyCheckList(@PathVariable("id") String id) {
  955 + return viewFacade.getCheckList(id);
  956 + }
941 957  
942 958 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 4e8332d
... ... @@ -4227,7 +4227,6 @@
4227 4227 if (checkModels != null && checkModels.size() > 0) {
4228 4228 BabyCheckModel checkModel = checkModels.get(0);
4229 4229  
4230   -
4231 4230 BabyModelQuery babyQuery = new BabyModelQuery();
4232 4231 babyQuery.setId(checkModel.getBuildId());
4233 4232 babyQuery.setYn(YnEnums.YES.getId());
... ... @@ -6214,5 +6213,45 @@
6214 6213 }
6215 6214 return new BaseObjectResponse().setData(data).setErrorcode(0).setErrormsg("成功");
6216 6215 }
  6216 +
  6217 +
  6218 + public BaseObjectResponse getCheckList(String id) {
  6219 + BaseObjectResponse br = new BaseObjectResponse();
  6220 + BabyCheckModelQuery babyCheckModel = new BabyCheckModelQuery();
  6221 + babyCheckModel.setBuildId(id);
  6222 + babyCheckModel.setYn(YnEnums.YES.getId());
  6223 + babyCheckModel.setSort("created asc");
  6224 + List<BabyCheckListResult> checkListResults = new ArrayList<>();
  6225 + List<BabyCheckModel> babyCheckList = babyCheckService.queryBabyCheckListRecord(babyCheckModel);
  6226 + if (CollectionUtils.isNotEmpty(babyCheckList)) {
  6227 + for (BabyCheckModel babyCheck : babyCheckList) {
  6228 + checkListResults.add(getBabyCheckListResult(babyCheck));
  6229 + }
  6230 + }
  6231 + br.setData(checkListResults);
  6232 + br.setErrorcode(ErrorCodeConstants.SUCCESS);
  6233 + br.setErrormsg("成功");
  6234 + return br;
  6235 + }
  6236 +
  6237 + private BabyCheckListResult getBabyCheckListResult(BabyCheckModel checkModel) {
  6238 + BabyCheckListResult result = new BabyCheckListResult();
  6239 + if (null != checkModel) {
  6240 + result.setCheckDate(DateUtil.getyyyy_MM_dd(checkModel.getCheckDate()));
  6241 + result.setMonthAge(DateUtil.getBabyMonthAge(checkModel.getBirth(), checkModel.getCheckDate()));
  6242 + result.setWeight(StringUtils.isNotEmpty(checkModel.getWeight()) ? checkModel.getWeight() + "kg,评价:" + checkModel.getWeightEvaluate() : "");
  6243 + result.setHeight(StringUtils.isNotEmpty(checkModel.getHeight()) ? checkModel.getHeight() + "cm,评价:" + checkModel.getHeightEvaluate() : "");
  6244 + result.setWeightOrHeight(checkModel.getHeightWeight());
  6245 + result.setPhysiqueInfo(checkModel.getWeightEvaluate());
  6246 + result.setHeadCircumference(checkModel.getHead());
  6247 + result.setXhdb(checkModel.getHemoglobin());
  6248 + result.setOtherCheck(JsonUtil.obj2JsonString(checkModel.getFaceColor()));
  6249 + result.setCheckHospital(StringUtils.isNotEmpty(checkModel.getHospitalId()) ? organizationService.getOrganization(Integer.valueOf(checkModel.getHospitalId())).getName() : "");
  6250 + result.setCheckDoctor(StringUtils.isNotEmpty(checkModel.getCheckDoctor()) ? usersService.getUsers(Integer.valueOf(checkModel.getCheckDoctor())).getName() : "");
  6251 + result.setNextCheckTime(DateUtil.getyyyy_MM_dd(checkModel.getNextDate()));
  6252 + }
  6253 + return result;
  6254 + }
  6255 +
6217 6256 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckListResult.java View file @ 4e8332d
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +/**
  4 + * Created by Administrator on 2019/9/6.
  5 + */
  6 +public class BabyCheckListResult {
  7 + private Integer id;
  8 + //检查日期
  9 + private String checkDate;
  10 + //月龄
  11 + private String monthAge;
  12 + //体重
  13 + private String weight;
  14 + //身高
  15 + private String height;
  16 + //体重或身长 平台页面的身长体重
  17 + private String weightOrHeight;
  18 + //体格发育评价
  19 + private String physiqueInfo;
  20 + //头围
  21 + private String headCircumference;
  22 + //血红蛋白
  23 + private String xhdb;
  24 + //其他检查
  25 + private String otherCheck;
  26 + //检查医院
  27 + private String checkHospital;
  28 + //检查医生
  29 + private String checkDoctor;
  30 + //下次检查日期
  31 + private String nextCheckTime;
  32 +
  33 + public Integer getId() {
  34 + return id;
  35 + }
  36 +
  37 + public void setId(Integer id) {
  38 + this.id = id;
  39 + }
  40 +
  41 + public String getCheckDate() {
  42 + return checkDate;
  43 + }
  44 +
  45 + public void setCheckDate(String checkDate) {
  46 + this.checkDate = checkDate;
  47 + }
  48 +
  49 + public String getMonthAge() {
  50 + return monthAge;
  51 + }
  52 +
  53 + public void setMonthAge(String monthAge) {
  54 + this.monthAge = monthAge;
  55 + }
  56 +
  57 + public String getWeight() {
  58 + return weight;
  59 + }
  60 +
  61 + public void setWeight(String weight) {
  62 + this.weight = weight;
  63 + }
  64 +
  65 + public String getHeight() {
  66 + return height;
  67 + }
  68 +
  69 + public void setHeight(String height) {
  70 + this.height = height;
  71 + }
  72 +
  73 + public String getWeightOrHeight() {
  74 + return weightOrHeight;
  75 + }
  76 +
  77 + public void setWeightOrHeight(String weightOrHeight) {
  78 + this.weightOrHeight = weightOrHeight;
  79 + }
  80 +
  81 + public String getPhysiqueInfo() {
  82 + return physiqueInfo;
  83 + }
  84 +
  85 + public void setPhysiqueInfo(String physiqueInfo) {
  86 + this.physiqueInfo = physiqueInfo;
  87 + }
  88 +
  89 + public String getHeadCircumference() {
  90 + return headCircumference;
  91 + }
  92 +
  93 + public void setHeadCircumference(String headCircumference) {
  94 + this.headCircumference = headCircumference;
  95 + }
  96 +
  97 + public String getXhdb() {
  98 + return xhdb;
  99 + }
  100 +
  101 + public void setXhdb(String xhdb) {
  102 + this.xhdb = xhdb;
  103 + }
  104 +
  105 + public String getOtherCheck() {
  106 + return otherCheck;
  107 + }
  108 +
  109 + public void setOtherCheck(String otherCheck) {
  110 + this.otherCheck = otherCheck;
  111 + }
  112 +
  113 + public String getCheckHospital() {
  114 + return checkHospital;
  115 + }
  116 +
  117 + public void setCheckHospital(String checkHospital) {
  118 + this.checkHospital = checkHospital;
  119 + }
  120 +
  121 + public String getCheckDoctor() {
  122 + return checkDoctor;
  123 + }
  124 +
  125 + public void setCheckDoctor(String checkDoctor) {
  126 + this.checkDoctor = checkDoctor;
  127 + }
  128 +
  129 + public String getNextCheckTime() {
  130 + return nextCheckTime;
  131 + }
  132 +
  133 + public void setNextCheckTime(String nextCheckTime) {
  134 + this.nextCheckTime = nextCheckTime;
  135 + }
  136 +
  137 +
  138 + @Override
  139 + public String toString() {
  140 + return "BabyCheckListResult{" +
  141 + "id=" + id +
  142 + ", checkDate='" + checkDate + '\'' +
  143 + ", monthAge='" + monthAge + '\'' +
  144 + ", weight='" + weight + '\'' +
  145 + ", height='" + height + '\'' +
  146 + ", weightOrHeight='" + weightOrHeight + '\'' +
  147 + ", physiqueInfo='" + physiqueInfo + '\'' +
  148 + ", headCircumference='" + headCircumference + '\'' +
  149 + ", xhdb='" + xhdb + '\'' +
  150 + ", otherCheck='" + otherCheck + '\'' +
  151 + ", checkHospital='" + checkHospital + '\'' +
  152 + ", checkDoctor='" + checkDoctor + '\'' +
  153 + ", nextCheckTime='" + nextCheckTime + '\'' +
  154 + '}';
  155 + }
  156 +}