Commit 33b0c027c60ab17be5e9859153d18d897c0fe119
1 parent
0d6658a3f2
Exists in
master
and in
1 other branch
修改转诊
Showing 8 changed files with 106 additions and 19 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/SieveService.java
- platform-common/src/main/java/com/lyms/platform/common/enums/SieveStatusEnums.java
- platform-dal/src/main/java/com/lyms/platform/pojo/SieveModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CqSieveQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
33b0c02
| ... | ... | @@ -106,7 +106,7 @@ |
| 106 | 106 | */ |
| 107 | 107 | public void addSieveJob() { |
| 108 | 108 | //查询出满足15+3 20+6的孕妇 |
| 109 | - Date endDate = DateUtil.addDay(new Date(), -108); | |
| 109 | + Date endDate = DateUtil.addDay(new Date(), -105); | |
| 110 | 110 | Date start = DateUtil.addDay(new Date(), -146); |
| 111 | 111 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 112 | 112 | patientsQuery.setLastMensesEnd(endDate); |
| ... | ... | @@ -234,7 +234,7 @@ |
| 234 | 234 | if (null != patients && null != patients.getLastMenses()) { |
| 235 | 235 | int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); |
| 236 | 236 | //判断是否在区间 |
| 237 | - if (days >= 108 && days <= 146) { | |
| 237 | + if (days >= 105 && days <= 146) { | |
| 238 | 238 | SieveQuery sieveQuery = new SieveQuery(); |
| 239 | 239 | sieveQuery.setYn(YnEnums.YES.getId()); |
| 240 | 240 | sieveQuery.setParentId(patients.getId()); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/SieveService.java
View file @
33b0c02
| ... | ... | @@ -58,8 +58,9 @@ |
| 58 | 58 | iSieveDao.addChanQianSieve(sieveModel); |
| 59 | 59 | } |
| 60 | 60 | public void update(MongoQuery mongoQuery, SieveResultModel sieveResultModel) { |
| 61 | - iSieveDao.update(mongoQuery,sieveResultModel); | |
| 61 | + iSieveDao.update(mongoQuery, sieveResultModel); | |
| 62 | 62 | } |
| 63 | + | |
| 63 | 64 | public List<SieveModel> queryList(SieveQuery sieveQuery) { |
| 64 | 65 | MongoQuery mongoQuery = sieveQuery.convertToQuery(); |
| 65 | 66 | if (StringUtils.isNotEmpty(sieveQuery.getNeed())) { |
| ... | ... | @@ -69,6 +70,14 @@ |
| 69 | 70 | return iSieveDao.queryList(mongoQuery.addOrder(Sort.Direction.DESC, "modified")); |
| 70 | 71 | } |
| 71 | 72 | |
| 73 | + public List<SieveModel> queryList1(SieveQuery sieveQuery,String filed) { | |
| 74 | + MongoQuery mongoQuery = sieveQuery.convertToQuery(); | |
| 75 | + if (StringUtils.isNotEmpty(sieveQuery.getNeed())) { | |
| 76 | + sieveQuery.mysqlBuild((int)iSieveDao.count(sieveQuery.convertToQuery())); | |
| 77 | + mongoQuery.start(sieveQuery.getOffset()).end(sieveQuery.getLimit()); | |
| 78 | + } | |
| 79 | + return iSieveDao.queryList(mongoQuery.addOrder(Sort.Direction.ASC, filed)); | |
| 80 | + } | |
| 72 | 81 | /** |
| 73 | 82 | * 根据id删除数据 |
| 74 | 83 | * |
platform-common/src/main/java/com/lyms/platform/common/enums/SieveStatusEnums.java
View file @
33b0c02
| 1 | 1 | package com.lyms.platform.common.enums; |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * | |
| 5 | 4 | * 产筛状态 |
| 6 | - * | |
| 5 | + * <p/> | |
| 7 | 6 | * Created by Administrator on 2016/7/6 0006. |
| 8 | 7 | */ |
| 9 | 8 | public enum SieveStatusEnums { |
| 10 | -// 1 待产筛 2 产筛中 3 完成产筛 4 完成产诊 | |
| 11 | - O("待产筛",1), | |
| 12 | - O1("产筛中",2), | |
| 13 | - O2("完成产筛",3), | |
| 14 | - O3("完成产诊",4), | |
| 15 | - ; | |
| 16 | - private SieveStatusEnums(String name,Integer id){ | |
| 17 | - this.name=name; | |
| 18 | - this.id=id; | |
| 9 | + // 1 待产筛 2 产筛中 3 完成产筛 4 完成产诊 | |
| 10 | + O("待产筛", 1), | |
| 11 | + O1("产筛中", 2), | |
| 12 | + O2("已产筛", 3), | |
| 13 | + O3("已诊断", 4),; | |
| 14 | + | |
| 15 | + private SieveStatusEnums(String name, Integer id) { | |
| 16 | + this.name = name; | |
| 17 | + this.id = id; | |
| 19 | 18 | } |
| 19 | + | |
| 20 | 20 | private String name; |
| 21 | 21 | private Integer id; |
| 22 | 22 | |
| 23 | 23 | public Integer getId() { |
| 24 | 24 | return id; |
| 25 | + } | |
| 26 | + | |
| 27 | + public static String getStrById(Integer id) { | |
| 28 | + if (null == id) { | |
| 29 | + return null; | |
| 30 | + } | |
| 31 | + for (SieveStatusEnums statusEnums : values()) { | |
| 32 | + if (id == statusEnums.getId()) { | |
| 33 | + return statusEnums.getName(); | |
| 34 | + } | |
| 35 | + } | |
| 36 | + return null; | |
| 25 | 37 | } |
| 26 | 38 | |
| 27 | 39 | public void setId(Integer id) { |
platform-dal/src/main/java/com/lyms/platform/pojo/SieveModel.java
View file @
33b0c02
| ... | ... | @@ -51,10 +51,28 @@ |
| 51 | 51 | private String from; |
| 52 | 52 | //申请产筛时间 |
| 53 | 53 | private Date applyDate; |
| 54 | + private String csRemarkTypeId; | |
| 55 | + private String detail; | |
| 54 | 56 | |
| 55 | 57 | private Date created; |
| 56 | 58 | private Date modified; |
| 57 | 59 | private Integer yn; |
| 60 | + | |
| 61 | + public String getCsRemarkTypeId() { | |
| 62 | + return csRemarkTypeId; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setCsRemarkTypeId(String csRemarkTypeId) { | |
| 66 | + this.csRemarkTypeId = csRemarkTypeId; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public String getDetail() { | |
| 70 | + return detail; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setDetail(String detail) { | |
| 74 | + this.detail = detail; | |
| 75 | + } | |
| 58 | 76 | |
| 59 | 77 | public Date getApplyDate() { |
| 60 | 78 | return applyDate; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
33b0c02
| ... | ... | @@ -10,9 +10,7 @@ |
| 10 | 10 | import com.lyms.platform.common.result.BaseListResponse; |
| 11 | 11 | import com.lyms.platform.common.result.BaseResponse; |
| 12 | 12 | import com.lyms.platform.common.utils.*; |
| 13 | -import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; | |
| 14 | -import com.lyms.platform.operate.web.request.MessageListRequest; | |
| 15 | -import com.lyms.platform.operate.web.request.MessageRequest; | |
| 13 | +import com.lyms.platform.operate.web.request.*; | |
| 16 | 14 | import com.lyms.platform.operate.web.result.*; |
| 17 | 15 | import com.lyms.platform.operate.web.utils.JdbcUtil; |
| 18 | 16 | import com.lyms.platform.operate.web.utils.MessageCenterService; |
| ... | ... | @@ -32,7 +30,6 @@ |
| 32 | 30 | |
| 33 | 31 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 34 | 32 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 35 | -import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; | |
| 36 | 33 | |
| 37 | 34 | import javax.servlet.http.HttpServletResponse; |
| 38 | 35 | import java.io.OutputStream; |
| ... | ... | @@ -1379,6 +1376,13 @@ |
| 1379 | 1376 | { |
| 1380 | 1377 | logger.error(e +"",e); |
| 1381 | 1378 | } |
| 1379 | + } | |
| 1380 | + | |
| 1381 | + public BaseListResponse queryBookBuild(BookBuildManagerQueryRequest bookBuildManagerQueryRequest){ | |
| 1382 | + PatientsQuery patientsQuery1=new PatientsQuery(); | |
| 1383 | + patientsQuery1.setYn(YnEnums.YES.getId()); | |
| 1384 | + yunBookbuildingService.queryPregnantWithQuery(patientsQuery1); | |
| 1385 | + return new BaseListResponse(); | |
| 1382 | 1386 | } |
| 1383 | 1387 | |
| 1384 | 1388 | public BaseResponse findPatientById(String parentId,Integer userId){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
33b0c02
| ... | ... | @@ -188,6 +188,13 @@ |
| 188 | 188 | if (null != cqSieveQueryRequest.getDueWeekEnd()) { |
| 189 | 189 | sieveQuery.setDueWeekEnd(7 * Integer.valueOf(cqSieveQueryRequest.getDueWeekEnd()) + 6); |
| 190 | 190 | } |
| 191 | + if(null!=cqSieveQueryRequest.getcDueWeekStart()){ | |
| 192 | + sieveQuery.setLastMensesEnd(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(cqSieveQueryRequest.getcDueWeekStart()*7))); | |
| 193 | + } | |
| 194 | + if(null!=cqSieveQueryRequest.getcDueWeekEnd()){ | |
| 195 | + sieveQuery.setLastMensesStart(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(cqSieveQueryRequest.getcDueWeekEnd()*7)-6)); | |
| 196 | + } | |
| 197 | + | |
| 191 | 198 | sieveQuery.setZtfx(cqSieveQueryRequest.getZtfx()); |
| 192 | 199 | sieveQuery.setStatus(cqSieveQueryRequest.getIsNotify()); |
| 193 | 200 | sieveQuery.setPage(cqSieveQueryRequest.getPage()); |
| ... | ... | @@ -196,7 +203,7 @@ |
| 196 | 203 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 197 | 204 | sieveQuery.setHospitalId(hospitalId); |
| 198 | 205 | //查询产筛list |
| 199 | - List<SieveModel> list = sieveService.queryList(sieveQuery); | |
| 206 | + List<SieveModel> list = sieveService.queryList1(sieveQuery,"status"); | |
| 200 | 207 | List<SieveListResult> data = new ArrayList<>(); |
| 201 | 208 | if (CollectionUtils.isNotEmpty(list)) { |
| 202 | 209 | for (SieveModel sieveModel : list) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CqSieveQueryRequest.java
View file @
33b0c02
| ... | ... | @@ -40,6 +40,29 @@ |
| 40 | 40 | @FormParam |
| 41 | 41 | private Integer status; |
| 42 | 42 | |
| 43 | + //当前孕周开始 | |
| 44 | + @FormParam | |
| 45 | + private Integer cDueWeekStart; | |
| 46 | + //当前孕周结束 | |
| 47 | + @FormParam | |
| 48 | + private Integer cDueWeekEnd; | |
| 49 | + | |
| 50 | + public Integer getcDueWeekStart() { | |
| 51 | + return cDueWeekStart; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setcDueWeekStart(Integer cDueWeekStart) { | |
| 55 | + this.cDueWeekStart = cDueWeekStart; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public Integer getcDueWeekEnd() { | |
| 59 | + return cDueWeekEnd; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setcDueWeekEnd(Integer cDueWeekEnd) { | |
| 63 | + this.cDueWeekEnd = cDueWeekEnd; | |
| 64 | + } | |
| 65 | + | |
| 43 | 66 | public Integer getStatus() { |
| 44 | 67 | return status; |
| 45 | 68 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
View file @
33b0c02
| ... | ... | @@ -78,7 +78,20 @@ |
| 78 | 78 | //妊娠结局 |
| 79 | 79 | private String renShenResult =SPIT; |
| 80 | 80 | private Integer status; |
| 81 | + //状态文本 | |
| 82 | + private String statusText; | |
| 81 | 83 | |
| 84 | + public String getStatusText() { | |
| 85 | + if(null==statusText){ | |
| 86 | + return SPIT; | |
| 87 | + } | |
| 88 | + return statusText; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setStatusText(String statusText) { | |
| 92 | + this.statusText = statusText; | |
| 93 | + } | |
| 94 | + | |
| 82 | 95 | public String getRealPhone() { |
| 83 | 96 | return realPhone; |
| 84 | 97 | } |
| ... | ... | @@ -233,6 +246,7 @@ |
| 233 | 246 | setRenShenResult(RenShenJieJu1Enums.getTitle(destModel.getRenShenResult()+"")); |
| 234 | 247 | } |
| 235 | 248 | setStatus(destModel.getStatus()); |
| 249 | + setStatusText(SieveStatusEnums.getStrById(destModel.getStatus())); | |
| 236 | 250 | //整体风险枚举 |
| 237 | 251 | // SieveEnums. |
| 238 | 252 | //妊娠结局 |