Commit 343e0e43e3bdeb919d2ffed4849d702acf34959c

Authored by wtt
1 parent 7657a8c063

update

Showing 11 changed files with 190 additions and 8 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java View file @ 343e0e4
... ... @@ -173,6 +173,8 @@
173 173  
174 174 //血红蛋白
175 175 private String hemoglobin;
  176 + //血常规检查状态 null | 1是未检查,2是检查
  177 + private String hCheckStatus;
176 178  
177 179 //白细胞计数
178 180 private String whiteCell;
... ... @@ -310,6 +312,7 @@
310 312 **/
311 313 //辅助检查状态(1检查/null是历史数据,2未检查)
312 314 private String jcz;
  315 +
313 316 //尿碘
314 317 public String nd;
315 318 /*****乙肝五项***/
... ... @@ -1443,6 +1446,14 @@
1443 1446  
1444 1447 public String getYlSelect() {
1445 1448 return ylSelect;
  1449 + }
  1450 +
  1451 + public String gethCheckStatus() {
  1452 + return hCheckStatus;
  1453 + }
  1454 +
  1455 + public void sethCheckStatus(String hCheckStatus) {
  1456 + this.hCheckStatus = hCheckStatus;
1446 1457 }
1447 1458  
1448 1459 public void setYlSelect(String ylSelect) {
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 343e0e4
... ... @@ -286,6 +286,8 @@
286 286 private Date fmDateStart;
287 287 private Date fmDateEnd;
288 288 private Date nextCheckTime;
  289 + private boolean nextCheckTimeNe;
  290 + private boolean nextCheckTimeIs;
289 291 private Date isNextCheckTime;
290 292 private Date nextCheckTimeStart;
291 293 private Date nextCheckTimeEnd;
... ... @@ -1211,6 +1213,12 @@
1211 1213 if (null != nextCheckTime) {
1212 1214 condition = condition.and("nextCheckTime", nextCheckTime, MongoOper.NE);
1213 1215 }
  1216 + if (nextCheckTimeNe) {
  1217 + condition = condition.and("nextCheckTime", null, MongoOper.NE);
  1218 + }
  1219 + if (nextCheckTimeIs ) {
  1220 + condition = condition.and("nextCheckTime", null, MongoOper.IS);
  1221 + }
1214 1222  
1215 1223 if (null != isNextCheckTime) {
1216 1224 condition = condition.and("nextCheckTime", isNextCheckTime, MongoOper.IS);
... ... @@ -2229,6 +2237,22 @@
2229 2237  
2230 2238 public Integer gethScoreStart() {
2231 2239 return hScoreStart;
  2240 + }
  2241 +
  2242 + public boolean isNextCheckTimeNe() {
  2243 + return nextCheckTimeNe;
  2244 + }
  2245 +
  2246 + public void setNextCheckTimeNe(boolean nextCheckTimeNe) {
  2247 + this.nextCheckTimeNe = nextCheckTimeNe;
  2248 + }
  2249 +
  2250 + public boolean isNextCheckTimeIs() {
  2251 + return nextCheckTimeIs;
  2252 + }
  2253 +
  2254 + public void setNextCheckTimeIs(boolean nextCheckTimeIs) {
  2255 + this.nextCheckTimeIs = nextCheckTimeIs;
2232 2256 }
2233 2257  
2234 2258 public void sethScoreStart(Integer hScoreStart) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 343e0e4
... ... @@ -247,6 +247,7 @@
247 247 model.setJcz(request.getJcz());//辅助检查状态(1检查/null是历史数据,2未检查)
248 248 model.setCszt(request.getCszt());//经皮疸红素加已测、未测(1已测/null是历史数据,2未测)
249 249 model.setSlscx(JsonUtil.obj2JsonString(request.getSlscx()));//视力筛查项(select 1正常、 2异常:qtText自己填写)
  250 + model.sethCheckStatus(request.gethCheckStatus()); //血常规检查状态 null | 1是未检查,2是检查
250 251  
251 252 model.setHeightEvaluateStandard(request.getHeightEvaluateStandard());
252 253 model.setHeadEvaluateStandard(request.getHeadEvaluateStandard());
... ... @@ -1331,6 +1332,22 @@
1331 1332 base.setYn(model.getYn());
1332 1333 base.setDataStatus(model.getDataStatus());
1333 1334 base.setmHighRiskReason(mongoUtil.findColor(model.getmHighRiskReason()));
  1335 + if(CollectionUtils.isNotEmpty(model.getHighRiskInfo())){
  1336 + List <Map> highRiskInfos = basicConfigFacade.queryBaseInfoByMap(model.getHighRiskInfo());
  1337 + for (Map h : highRiskInfos) {
  1338 + h.put("color", "risk_yellow");
  1339 + }
  1340 + base.setHighRiskInfo(highRiskInfos);//儿童高危详情
  1341 + }
  1342 +
  1343 + if(CollectionUtils.isNotEmpty(model.getWeakSonInfo())){
  1344 + List <Map> weakSonInfos = basicConfigFacade.queryBaseInfoByMap(model.getWeakSonInfo());
  1345 + for (Map w : weakSonInfos) {
  1346 + w.put("color", "risk_yellow");
  1347 + }
  1348 + base.setWeakSonInfo(weakSonInfos);//体弱儿详情
  1349 + }
  1350 +
1334 1351 base.setBabyLastHighRisk(getBabyLastHighRisk(model.getPid()));
1335 1352 base.setId(id);
1336 1353 base.setSex(model.getSex());
... ... @@ -1805,6 +1822,7 @@
1805 1822 model.setCszt(checkModel.getCszt());
1806 1823 //视力筛查项(select 1正常、 2异常:qtText自己填写)
1807 1824 model.setSlscx(checkModel.getSlscx());
  1825 + model.sethCheckStatus(checkModel.gethCheckStatus());//血常规检查状态 null | 1是未检查,2是检查
1808 1826  
1809 1827 /*秦皇岛儿保检查使用*/
1810 1828 model.setBim(checkModel.getBim());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ 343e0e4
... ... @@ -44,6 +44,7 @@
44 44  
45 45 import javax.servlet.http.HttpServletResponse;
46 46 import java.io.OutputStream;
  47 +import java.text.SimpleDateFormat;
47 48 import java.util.*;
48 49 import java.util.concurrent.Future;
49 50 import java.util.concurrent.TimeUnit;
50 51  
... ... @@ -664,10 +665,31 @@
664 665 //查询符合条件的孕妇
665 666 StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital);
666 667 stopWatch.start();
667   - System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString());
668   - List<Patients> patientses = patientsService.queryPatientBySort(patientsQuery, riskPatientsQueryRequest.getSort(), riskPatientsQueryRequest.getOrder());
669   - stopWatch.stop();
  668 + //滦平实现 下次预约时间升序方式,但是空默认在最前特两次查询组合在一起实现
  669 + List <Patients> patientses = new ArrayList <>();
  670 + if("lp".equals(riskPatientsQueryRequest.getHstart())){
  671 + if(patientsQuery.getNextCheckTimeStart()!=null || patientsQuery.getNextCheckTimeEnd()!=null){
  672 + //下次检查时间非空,不用考虑空排序在前面问题
  673 + patientses = patientsService.queryPatientBySort(patientsQuery, riskPatientsQueryRequest.getSort(), riskPatientsQueryRequest.getOrder());
  674 + }else {
  675 + //下次检查时间空,先获取有检查数据
  676 + patientsQuery.setNextCheckTimeNe(true);
  677 + List <Patients> patients1 = patientsService.queryPatientBySort(patientsQuery, riskPatientsQueryRequest.getSort(), riskPatientsQueryRequest.getOrder());
  678 + if(CollectionUtils.isNotEmpty(patients1)){
  679 + patientses = patients1;
  680 + }
  681 + //在获取没有有检查数据
  682 + patientsQuery.setNextCheckTimeIs(true);
  683 + patientsQuery.setNextCheckTimeNe(false);
  684 + List <Patients> patientsesm = patientsService.queryPatientBySort(patientsQuery, riskPatientsQueryRequest.getSort(), riskPatientsQueryRequest.getOrder());
  685 + patientses.addAll(patientsesm);
  686 + }
670 687  
  688 + }else {
  689 + //以前逻辑
  690 + patientses = patientsService.queryPatientBySort(patientsQuery, riskPatientsQueryRequest.getSort(), riskPatientsQueryRequest.getOrder());
  691 + }
  692 + stopWatch.stop();
671 693 logger.info(stopWatch.toString());
672 694 List data = new ArrayList<QuanChanResult>();
673 695 if (CollectionUtils.isNotEmpty(patientses)) {
... ... @@ -708,7 +730,33 @@
708 730 // }
709 731 return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(patientsQuery.getPageInfo());
710 732 }
711   -
  733 + /**
  734 + * list排序(按照日期升序)
  735 + *
  736 + * @param list
  737 + */
  738 + private static void ListSort(List<Patients> list) {
  739 + Collections.sort(list, new Comparator<Patients>() {
  740 + @Override
  741 + public int compare(Patients o1, Patients o2) {
  742 + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
  743 + try {
  744 +// Date dt1 = format.parse(o1.getNextCheckTime());
  745 +// Date dt2 = format.parse(o2.getNextCheckTime());
  746 + if (o1.getNextCheckTime().getTime() > o2.getNextCheckTime().getTime()) {
  747 + return 1;
  748 + } else if (o1.getNextCheckTime().getTime() < o2.getNextCheckTime().getTime()) {
  749 + return -1;
  750 + } else {
  751 + return 0;
  752 + }
  753 + } catch (Exception e) {
  754 + e.printStackTrace();
  755 + }
  756 + return 0;
  757 + }
  758 + });
  759 + }
712 760 /**
713 761 * 查询双胎全部孕妇管理
714 762 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 343e0e4
... ... @@ -5441,6 +5441,7 @@
5441 5441 model.setCszt(checkModel.getCszt());
5442 5442 //视力筛查项(select 1正常、 2异常:qtText自己填写)
5443 5443 model.setSlscx(checkModel.getSlscx());
  5444 + model.sethCheckStatus(checkModel.gethCheckStatus());//血常规检查状态 null | 1是未检查,2是检查
5444 5445  
5445 5446 /*秦皇岛儿保检查使用*/
5446 5447 model.setBim(checkModel.getBim());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyCheckRequest.java View file @ 343e0e4
... ... @@ -194,6 +194,9 @@
194 194 private String heartAction;
195 195 //血常规:血红蛋白
196 196 private String hemoglobin;
  197 + //血常规检查状态 null | 1是未检查,2是检查
  198 + private String hCheckStatus;
  199 +
197 200 //血常规:血红蛋白券
198 201 private String hemoglobinCoupon;
199 202 //血常规:白细胞计数
... ... @@ -586,6 +589,14 @@
586 589  
587 590 public void setMovementIA(String movementIA) {
588 591 this.movementIA = movementIA;
  592 + }
  593 +
  594 + public String gethCheckStatus() {
  595 + return hCheckStatus;
  596 + }
  597 +
  598 + public void sethCheckStatus(String hCheckStatus) {
  599 + this.hCheckStatus = hCheckStatus;
589 600 }
590 601  
591 602 public String getMovementDQ() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java View file @ 343e0e4
... ... @@ -15,6 +15,9 @@
15 15 */
16 16 @Form
17 17 public class RiskPatientsQueryRequest extends BasePageQueryRequest {
  18 + //判断定制机构 lp滦平
  19 + private String hstart;
  20 +
18 21 @FormParam
19 22 //孕妇名字
20 23 private String name;
... ... @@ -240,7 +243,8 @@
240 243 SORT_MODIFIED("1", "modified"),//按更新时间排
241 244 SORT_BUILD_DATE("2", "bookbuildingDate"),//按建档时间排
242 245 SORT_DUE_TIME("3", "lastMenses"),//按孕产期排
243   - SORT_DUE_DETE("4", "lastMenses");//按当前孕周排
  246 + SORT_DUE_DETE("4", "lastMenses"),//按当前孕周排
  247 + SORT_DUE_DATE("5", "nextCheckTime");//下次产检时间
244 248  
245 249 private SortEnum(String id, String sort) {
246 250 this.id = id
... ... @@ -631,6 +635,14 @@
631 635  
632 636 public Integer getEndHScore() {
633 637 return endHScore;
  638 + }
  639 +
  640 + public String getHstart() {
  641 + return hstart;
  642 + }
  643 +
  644 + public void setHstart(String hstart) {
  645 + this.hstart = hstart;
634 646 }
635 647  
636 648 public void setEndHScore(Integer endHScore) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBasicResult.java View file @ 343e0e4
... ... @@ -7,7 +7,8 @@
7 7 * Created by Administrator on 2016/6/20.
8 8 */
9 9 public class BabyBasicResult {
10   -
  10 + private List <Map> highRiskInfo;//儿童高危详情
  11 + private List <Map> weakSonInfo;//体弱儿详情
11 12 private List<Map<String, Object>> mHighRiskReason;
12 13  
13 14 public List<Map<String, Object>> getmHighRiskReason() {
... ... @@ -188,6 +189,22 @@
188 189  
189 190 public String getCorrectValue() {
190 191 return correctValue;
  192 + }
  193 +
  194 + public List <Map> getHighRiskInfo() {
  195 + return highRiskInfo;
  196 + }
  197 +
  198 + public void setHighRiskInfo(List <Map> highRiskInfo) {
  199 + this.highRiskInfo = highRiskInfo;
  200 + }
  201 +
  202 + public List <Map> getWeakSonInfo() {
  203 + return weakSonInfo;
  204 + }
  205 +
  206 + public void setWeakSonInfo(List <Map> weakSonInfo) {
  207 + this.weakSonInfo = weakSonInfo;
191 208 }
192 209  
193 210 public void setCorrectValue(String correctValue) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckPageResult.java View file @ 343e0e4
... ... @@ -373,7 +373,8 @@
373 373  
374 374 //血红蛋白
375 375 private String hemoglobin;
376   -
  376 + //血常规检查状态 null | 1是未检查,2是检查
  377 + private String hCheckStatus;
377 378 //白细胞
378 379 private String whiteCell;
379 380  
... ... @@ -2126,6 +2127,14 @@
2126 2127  
2127 2128 public void setUrineAcetone(String urineAcetone) {
2128 2129 this.urineAcetone = urineAcetone;
  2130 + }
  2131 +
  2132 + public String gethCheckStatus() {
  2133 + return hCheckStatus;
  2134 + }
  2135 +
  2136 + public void sethCheckStatus(String hCheckStatus) {
  2137 + this.hCheckStatus = hCheckStatus;
2129 2138 }
2130 2139  
2131 2140 public String getHematuria() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckResult.java View file @ 343e0e4
... ... @@ -304,7 +304,8 @@
304 304  
305 305 //血红蛋白
306 306 private String hemoglobin;
307   -
  307 + //血常规检查状态 null | 1是未检查,2是检查
  308 + private String hCheckStatus;
308 309 //白细胞
309 310 private String whiteCell;
310 311  
... ... @@ -1607,6 +1608,14 @@
1607 1608  
1608 1609 public String getHeight() {
1609 1610 return height;
  1611 + }
  1612 +
  1613 + public String gethCheckStatus() {
  1614 + return hCheckStatus;
  1615 + }
  1616 +
  1617 + public void sethCheckStatus(String hCheckStatus) {
  1618 + this.hCheckStatus = hCheckStatus;
1610 1619 }
1611 1620  
1612 1621 public void setHeight(String height) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyChooseResult.java View file @ 343e0e4
1 1 package com.lyms.platform.operate.web.result;
2 2  
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
3 6 /**
4 7 * Created by Administrator on 2016/6/21.
5 8 */
... ... @@ -14,6 +17,25 @@
14 17 private String hospitalId;
15 18 private String hospitalName;
16 19 private String blNo;
  20 + private List <Map> highRiskInfo;//儿童高危详情
  21 + private List <Map> weakSonInfo;//体弱儿详情
  22 +
  23 +
  24 + public List <Map> getHighRiskInfo() {
  25 + return highRiskInfo;
  26 + }
  27 +
  28 + public void setHighRiskInfo(List <Map> highRiskInfo) {
  29 + this.highRiskInfo = highRiskInfo;
  30 + }
  31 +
  32 + public List <Map> getWeakSonInfo() {
  33 + return weakSonInfo;
  34 + }
  35 +
  36 + public void setWeakSonInfo(List <Map> weakSonInfo) {
  37 + this.weakSonInfo = weakSonInfo;
  38 + }
17 39  
18 40 public String getTureMonthAge() {
19 41 return tureMonthAge;