Commit 99a127d0bb52a1a9ab54e7ed87fdc588a8b962d4
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 31 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPatientDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PatientDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/MongoSyncService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-common/src/main/java/com/lyms/platform/common/dao/BaseMongoDAOImpl.java
- platform-common/src/main/java/com/lyms/platform/common/pojo/SyncDataModel.java
- platform-common/src/main/java/com/lyms/platform/common/pojo/UpdateMultiData.java
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AutoMatchFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.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/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasePageQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyManageListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BookBuildManagerResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverManagerResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPatientDao.java
View file @
99a127d
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PatientDaoImpl.java
View file @
99a127d
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 8 | 8 | import com.lyms.platform.common.dao.operator.Page; |
| 9 | 9 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
| 10 | +import com.lyms.platform.pojo.BabyModel; | |
| 10 | 11 | import com.lyms.platform.pojo.Patients; |
| 11 | 12 | import org.bson.types.ObjectId; |
| 12 | 13 | import org.springframework.data.mongodb.core.aggregation.Aggregation; |
| ... | ... | @@ -15,6 +16,7 @@ |
| 15 | 16 | import org.springframework.data.mongodb.core.aggregation.Field; |
| 16 | 17 | import org.springframework.data.mongodb.core.query.Criteria; |
| 17 | 18 | import org.springframework.data.mongodb.core.query.Query; |
| 19 | +import org.springframework.data.mongodb.core.query.Update; | |
| 18 | 20 | import org.springframework.stereotype.Repository; |
| 19 | 21 | |
| 20 | 22 | import java.util.List; |
| ... | ... | @@ -34,6 +36,12 @@ |
| 34 | 36 | public void findAndModify(MongoQuery query,Patients obj){ |
| 35 | 37 | updateMulti(query.convertToMongoQuery(),obj); |
| 36 | 38 | } |
| 39 | + | |
| 40 | + @Override | |
| 41 | + public void updatePatientOneCol(String id, Object colValue) { | |
| 42 | + this.mongoTemplate.updateFirst(new Query(Criteria.where("id").is(id)), Update.update("nextCheckTime", colValue), Patients.class); | |
| 43 | + } | |
| 44 | + | |
| 37 | 45 | @Override |
| 38 | 46 | public void updatePatient(Patients obj, String id) { |
| 39 | 47 | update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), obj); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/MongoSyncService.java
View file @
99a127d
| ... | ... | @@ -58,10 +58,18 @@ |
| 58 | 58 | Class cla = Class.forName(LymsEncodeUtil.aesDecrypt(className, mongo_crypto_key)); |
| 59 | 59 | // 批量修改的情况下,ID字段是要修改的CLASS |
| 60 | 60 | Class updateClass = Class.forName(LymsEncodeUtil.aesDecrypt(id, mongo_crypto_key)); |
| 61 | - Object obj = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), cla); | |
| 61 | + Object obj = null; | |
| 62 | + try { | |
| 63 | + obj = SerializUtils.byteToObj(Base64.decodeBase64(json)); | |
| 64 | + } catch (Exception ee) { | |
| 65 | + obj = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), cla); | |
| 66 | + } | |
| 62 | 67 | if (obj instanceof UpdateMultiData) { |
| 63 | 68 | UpdateMultiData data = (UpdateMultiData) obj; |
| 64 | - if (data.getQuery() != null && data.getUpdate() != null) { | |
| 69 | + if (data.getMongoQuery() != null && data.getMongoUpdate() != null) { | |
| 70 | + mongoTemplate.updateMulti(data.getMongoQuery(), data.getMongoUpdate(), updateClass); | |
| 71 | + return true; | |
| 72 | + } else if (data.getQuery() != null && data.getUpdate() != null) { | |
| 65 | 73 | MongoCondition c = null; |
| 66 | 74 | for (String key:data.getQuery().keySet()) { |
| 67 | 75 | if (c == null) { |
| 68 | 76 | |
| ... | ... | @@ -80,13 +88,23 @@ |
| 80 | 88 | } |
| 81 | 89 | } |
| 82 | 90 | } else if ("ADD".equals(action)) { |
| 83 | - Object entity = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), Class.forName(LymsEncodeUtil.aesDecrypt(className, mongo_crypto_key))); | |
| 91 | + Object entity = null; | |
| 92 | + try { | |
| 93 | + entity = SerializUtils.byteToObj(Base64.decodeBase64(json)); | |
| 94 | + } catch (Exception ee) { | |
| 95 | + entity = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), Class.forName(LymsEncodeUtil.aesDecrypt(className, mongo_crypto_key))); | |
| 96 | + } | |
| 84 | 97 | Assert.notNull(entity, "execute insert method must not null."); |
| 85 | 98 | mongoTemplate.save(entity); |
| 86 | 99 | return true; |
| 87 | 100 | } else if ("UPDATE".equals(action)) { |
| 88 | 101 | Class cla = Class.forName(LymsEncodeUtil.aesDecrypt(className, mongo_crypto_key)); |
| 89 | - Object obj = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), cla); | |
| 102 | + Object obj = null; | |
| 103 | + try { | |
| 104 | + obj = SerializUtils.byteToObj(Base64.decodeBase64(json)); | |
| 105 | + } catch (Exception ee) { | |
| 106 | + obj = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), cla); | |
| 107 | + } | |
| 90 | 108 | Update update = MongoConvertHelper.convertToNativeUpdate(ReflectionUtils.getUpdateField(obj)); |
| 91 | 109 | Assert.notNull(update, "execute update method must not null."); |
| 92 | 110 | mongoTemplate.updateMulti(new MongoQuery(new MongoCondition("id", LymsEncodeUtil.aesDecrypt(id, mongo_crypto_key), MongoOper.IS)).convertToMongoQuery(), update, cla); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
99a127d
platform-common/src/main/java/com/lyms/platform/common/dao/BaseMongoDAOImpl.java
View file @
99a127d
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import com.lyms.platform.common.pojo.SyncDataModel; |
| 5 | 5 | import com.lyms.platform.common.pojo.UpdateMultiData; |
| 6 | 6 | import com.lyms.platform.common.utils.*; |
| 7 | +import org.apache.commons.codec.binary.Base64; | |
| 7 | 8 | import org.apache.commons.collections.CollectionUtils; |
| 8 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | 10 | import org.springframework.data.mongodb.core.MongoTemplate; |
| ... | ... | @@ -11,6 +12,7 @@ |
| 11 | 12 | import org.springframework.data.mongodb.core.query.Update; |
| 12 | 13 | import org.springframework.util.Assert; |
| 13 | 14 | |
| 15 | +import java.io.Serializable; | |
| 14 | 16 | import java.util.Collection; |
| 15 | 17 | import java.util.Date; |
| 16 | 18 | import java.util.List; |
| ... | ... | @@ -142,6 +144,7 @@ |
| 142 | 144 | // 数据上传 |
| 143 | 145 | UpdateMultiData data = new UpdateMultiData(); |
| 144 | 146 | data.setMongoQuery(query); |
| 147 | + data.setMongoUpdate(update); | |
| 145 | 148 | data.setUpdate(ReflectionUtils.getUpdateField(obj)); |
| 146 | 149 | // 批量修改的情况下,ID字段是要修改的CLASS |
| 147 | 150 | addSyncData("UPDATEMULTI", data, obj.getClass().getName()); |
| ... | ... | @@ -162,7 +165,8 @@ |
| 162 | 165 | model.setAction(action); |
| 163 | 166 | if (null != data) { |
| 164 | 167 | model.setClassName(LymsEncodeUtil.aesEncrypt(data.getClass().getName(), mongo_crypto_key)); |
| 165 | - model.setJsonData(LymsEncodeUtil.aesEncrypt(JsonUtil.obj2Str(data), mongo_crypto_key)); | |
| 168 | + model.setJsonData(Base64.encodeBase64String(SerializUtils.objToByte((Serializable)data))); | |
| 169 | + model.setType(1); | |
| 166 | 170 | } |
| 167 | 171 | model.setCreated(new Date()); |
| 168 | 172 | model.setModified(model.getCreated()); |
| ... | ... | @@ -173,6 +177,7 @@ |
| 173 | 177 | mongoTemplate.insert(model); |
| 174 | 178 | } catch (Exception e) { |
| 175 | 179 | e.printStackTrace(); |
| 180 | + System.out.println(data); | |
| 176 | 181 | } |
| 177 | 182 | } |
| 178 | 183 | } |
platform-common/src/main/java/com/lyms/platform/common/pojo/SyncDataModel.java
View file @
99a127d
| ... | ... | @@ -20,7 +20,16 @@ |
| 20 | 20 | private String className; |
| 21 | 21 | private String jsonData; |
| 22 | 22 | private String dataId; |
| 23 | - private Integer status; | |
| 23 | + private Integer status; // 1:未同步 , 2:已同步 | |
| 24 | + private Integer type; // null:旧版本(JSON),1:jsonData 为 SerializData | |
| 25 | + | |
| 26 | + public Integer getType() { | |
| 27 | + return type; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setType(Integer type) { | |
| 31 | + this.type = type; | |
| 32 | + } | |
| 24 | 33 | |
| 25 | 34 | public Integer getStatus() { |
| 26 | 35 | return status; |
platform-common/src/main/java/com/lyms/platform/common/pojo/UpdateMultiData.java
View file @
99a127d
| ... | ... | @@ -4,17 +4,38 @@ |
| 4 | 4 | import org.springframework.data.mongodb.core.query.Query; |
| 5 | 5 | import org.springframework.data.mongodb.core.query.Update; |
| 6 | 6 | |
| 7 | +import java.io.Serializable; | |
| 7 | 8 | import java.util.HashMap; |
| 8 | 9 | import java.util.Map; |
| 9 | 10 | |
| 10 | 11 | /** |
| 11 | 12 | * Created by riecard on 2016/10/30. |
| 12 | 13 | */ |
| 13 | -public class UpdateMultiData { | |
| 14 | +public class UpdateMultiData implements Serializable { | |
| 14 | 15 | |
| 16 | + /** | |
| 17 | + * | |
| 18 | + */ | |
| 19 | + private static final long serialVersionUID = 1L; | |
| 20 | + | |
| 15 | 21 | private Map<String, Object> query; |
| 16 | 22 | private Map<String, Object> update; |
| 17 | 23 | |
| 24 | + private Query mongoQuery; | |
| 25 | + private Update mongoUpdate; | |
| 26 | + | |
| 27 | + public Update getMongoUpdate() { | |
| 28 | + return mongoUpdate; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void setMongoUpdate(Update mongoUpdate) { | |
| 32 | + this.mongoUpdate = mongoUpdate; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public Query getMongoQuery() { | |
| 36 | + return mongoQuery; | |
| 37 | + } | |
| 38 | + | |
| 18 | 39 | public void setQuery(Map<String, Object> query) { |
| 19 | 40 | this.query = query; |
| 20 | 41 | } |
| ... | ... | @@ -24,6 +45,7 @@ |
| 24 | 45 | } |
| 25 | 46 | |
| 26 | 47 | public void setMongoQuery(Query query) { |
| 48 | + this.mongoQuery = query; | |
| 27 | 49 | DBObject dbObject = query.getQueryObject(); |
| 28 | 50 | this.query = new HashMap<>(); |
| 29 | 51 | for (String key:dbObject.keySet()) { |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
99a127d
| ... | ... | @@ -794,11 +794,11 @@ |
| 794 | 794 | // Date startDate = getRangeDate(parseYMD("2016-09-07"),2,"周",-1); |
| 795 | 795 | // System.out.println(getyyyy_MM_dd(startDate)); |
| 796 | 796 | |
| 797 | -// int a = daysBetween(parseYMD("2013-09-13"),new Date())/7; | |
| 798 | -// System.out.println(a); | |
| 797 | + int a = daysBetween(parseYMD("2016-10-01"),new Date())/7; | |
| 798 | + System.out.println(a); | |
| 799 | 799 | |
| 800 | - Date dueDate = DateUtil.addDay(DateUtil.addMonth(parseYMD("2016-02-08"), 9), 7); | |
| 801 | - System.out.println(getyyyy_MM_dd(dueDate)); | |
| 800 | +// Date dueDate = DateUtil.addDay(DateUtil.addMonth(parseYMD("2016-02-08"), 9), 7); | |
| 801 | +// System.out.println(getyyyy_MM_dd(dueDate)); | |
| 802 | 802 | } catch (Exception e) |
| 803 | 803 | { |
| 804 | 804 |
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
View file @
99a127d
| ... | ... | @@ -90,6 +90,8 @@ |
| 90 | 90 | private Date created; |
| 91 | 91 | private String hospitalId; |
| 92 | 92 | private String bp; |
| 93 | + //丈夫健康情况 | |
| 94 | + private String hHealthInfo; | |
| 93 | 95 | |
| 94 | 96 | public String getPid() { |
| 95 | 97 | return pid; |
| 96 | 98 | |
| ... | ... | @@ -203,14 +205,22 @@ |
| 203 | 205 | this.syjg = syjg; |
| 204 | 206 | } |
| 205 | 207 | |
| 208 | + public String gethHealthInfo() { | |
| 209 | + return hHealthInfo; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public void sethHealthInfo(String hHealthInfo) { | |
| 213 | + this.hHealthInfo = hHealthInfo; | |
| 214 | + } | |
| 215 | + | |
| 206 | 216 | /*//心率 |
| 207 | - private double heartRate; | |
| 208 | - //胎方位 | |
| 209 | - private String fetalPosition; | |
| 210 | - //胎先露 | |
| 211 | - private String fetalPresentation; | |
| 212 | - // 衔接 | |
| 213 | - private String join;*/ | |
| 217 | + private double heartRate; | |
| 218 | + //胎方位 | |
| 219 | + private String fetalPosition; | |
| 220 | + //胎先露 | |
| 221 | + private String fetalPresentation; | |
| 222 | + // 衔接 | |
| 223 | + private String join;*/ | |
| 214 | 224 | //高危因素 |
| 215 | 225 | private String highrisk ; |
| 216 | 226 | //高危评分 |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
View file @
99a127d
| ... | ... | @@ -96,6 +96,7 @@ |
| 96 | 96 | private String cardNo; |
| 97 | 97 | |
| 98 | 98 | private String hospitalId; |
| 99 | + private String hospitalName; | |
| 99 | 100 | //建档类型 1、儿童直接建档 2 产妇分娩建档 3 为转诊自动建档 |
| 100 | 101 | private Integer buildType; |
| 101 | 102 | /** |
| ... | ... | @@ -332,6 +333,14 @@ |
| 332 | 333 | |
| 333 | 334 | public void setHospitalId(String hospitalId) { |
| 334 | 335 | this.hospitalId = hospitalId; |
| 336 | + } | |
| 337 | + | |
| 338 | + public String getHospitalName() { | |
| 339 | + return hospitalName; | |
| 340 | + } | |
| 341 | + | |
| 342 | + public void setHospitalName(String hospitalName) { | |
| 343 | + this.hospitalName = hospitalName; | |
| 335 | 344 | } |
| 336 | 345 | |
| 337 | 346 | public String getCardNo() { |
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
99a127d
| ... | ... | @@ -419,6 +419,8 @@ |
| 419 | 419 | |
| 420 | 420 | if (null != hospitalIdList) { |
| 421 | 421 | condition = condition.and("hospitalId", hospitalIdList, MongoOper.IN); |
| 422 | + }else if (null != hospitalId) { | |
| 423 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
| 422 | 424 | } |
| 423 | 425 | if (!StringUtils.isEmpty(lastDiagnose)) { |
| 424 | 426 | condition = condition.and("lastDiagnose", lastDiagnose, MongoOper.IN); |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
99a127d
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | import com.lyms.platform.common.dao.operator.MongoOper; |
| 7 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 8 | 8 | import com.lyms.platform.common.utils.StringUtils; |
| 9 | +import org.apache.commons.collections.CollectionUtils; | |
| 9 | 10 | import org.springframework.data.mongodb.core.query.Criteria; |
| 10 | 11 | |
| 11 | 12 | import java.util.Arrays; |
| ... | ... | @@ -70,7 +71,7 @@ |
| 70 | 71 | */ |
| 71 | 72 | private int visitstatus = -1; |
| 72 | 73 | |
| 73 | - private String areaId; | |
| 74 | + | |
| 74 | 75 | //社区id |
| 75 | 76 | private String areaIdOrRestId; |
| 76 | 77 | //服务状态 |
| 77 | 78 | |
| ... | ... | @@ -92,7 +93,77 @@ |
| 92 | 93 | private Date lastCTimeEnd; |
| 93 | 94 | private Integer postViewTimes; |
| 94 | 95 | private boolean gtePostTimes=false; |
| 96 | + //户籍地 | |
| 97 | + private String provinceRegisterId; | |
| 98 | + private String cityRegisterId; | |
| 99 | + private String areaRegisterId; | |
| 95 | 100 | |
| 101 | + //居住地 | |
| 102 | + private String provinceId; | |
| 103 | + private String cityId; | |
| 104 | + private String areaId; | |
| 105 | + //医院id | |
| 106 | + private List<String> hospitalList; | |
| 107 | + | |
| 108 | + public String getProvinceRegisterId() { | |
| 109 | + return provinceRegisterId; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void setProvinceRegisterId(String provinceRegisterId) { | |
| 113 | + this.provinceRegisterId = provinceRegisterId; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public String getCityRegisterId() { | |
| 117 | + return cityRegisterId; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public void setCityRegisterId(String cityRegisterId) { | |
| 121 | + this.cityRegisterId = cityRegisterId; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public String getAreaRegisterId() { | |
| 125 | + return areaRegisterId; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public void setAreaRegisterId(String areaRegisterId) { | |
| 129 | + this.areaRegisterId = areaRegisterId; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public String getProvinceId() { | |
| 133 | + return provinceId; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public void setProvinceId(String provinceId) { | |
| 137 | + this.provinceId = provinceId; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public String getCityId() { | |
| 141 | + return cityId; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public void setCityId(String cityId) { | |
| 145 | + this.cityId = cityId; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public List<String> getHospitalList() { | |
| 149 | + return hospitalList; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public void setHospitalList(List<String> hospitalList) { | |
| 153 | + this.hospitalList = hospitalList; | |
| 154 | + } | |
| 155 | + | |
| 156 | + //查询号 | |
| 157 | + private String queryNo; | |
| 158 | + | |
| 159 | + public String getQueryNo() { | |
| 160 | + return queryNo; | |
| 161 | + } | |
| 162 | + | |
| 163 | + public void setQueryNo(String queryNo) { | |
| 164 | + this.queryNo = queryNo; | |
| 165 | + } | |
| 166 | + | |
| 96 | 167 | public Integer getPostViewTimes() { |
| 97 | 168 | return postViewTimes; |
| 98 | 169 | } |
| ... | ... | @@ -241,6 +312,8 @@ |
| 241 | 312 | |
| 242 | 313 | private Date fmDateStart; |
| 243 | 314 | private Date fmDateEnd; |
| 315 | + private Date nextCheckTimeStart; | |
| 316 | + private Date nextCheckTimeEnd; | |
| 244 | 317 | |
| 245 | 318 | //大于修改时间 |
| 246 | 319 | private Date gteModified; |
| 247 | 320 | |
| ... | ... | @@ -248,7 +321,45 @@ |
| 248 | 321 | //大于创建时间 |
| 249 | 322 | private Date gteCreated; |
| 250 | 323 | |
| 324 | + //最后一次产检医生职工ID | |
| 325 | + private String lastCheckEmployeeId; | |
| 251 | 326 | |
| 327 | + //建档医生 | |
| 328 | + private String bookbuildingDoctor; | |
| 329 | + | |
| 330 | + | |
| 331 | + public String getLastCheckEmployeeId() { | |
| 332 | + return lastCheckEmployeeId; | |
| 333 | + } | |
| 334 | + | |
| 335 | + public void setLastCheckEmployeeId(String lastCheckEmployeeId) { | |
| 336 | + this.lastCheckEmployeeId = lastCheckEmployeeId; | |
| 337 | + } | |
| 338 | + | |
| 339 | + public String getBookbuildingDoctor() { | |
| 340 | + return bookbuildingDoctor; | |
| 341 | + } | |
| 342 | + | |
| 343 | + public void setBookbuildingDoctor(String bookbuildingDoctor) { | |
| 344 | + this.bookbuildingDoctor = bookbuildingDoctor; | |
| 345 | + } | |
| 346 | + | |
| 347 | + public Date getNextCheckTimeStart() { | |
| 348 | + return nextCheckTimeStart; | |
| 349 | + } | |
| 350 | + | |
| 351 | + public void setNextCheckTimeStart(Date nextCheckTimeStart) { | |
| 352 | + this.nextCheckTimeStart = nextCheckTimeStart; | |
| 353 | + } | |
| 354 | + | |
| 355 | + public Date getNextCheckTimeEnd() { | |
| 356 | + return nextCheckTimeEnd; | |
| 357 | + } | |
| 358 | + | |
| 359 | + public void setNextCheckTimeEnd(Date nextCheckTimeEnd) { | |
| 360 | + this.nextCheckTimeEnd = nextCheckTimeEnd; | |
| 361 | + } | |
| 362 | + | |
| 252 | 363 | public Date getLastCTimeStart() { |
| 253 | 364 | return lastCTimeStart; |
| 254 | 365 | } |
| ... | ... | @@ -573,6 +684,7 @@ |
| 573 | 684 | |
| 574 | 685 | public MongoQuery convertToQuery() { |
| 575 | 686 | MongoCondition condition = MongoCondition.newInstance(); |
| 687 | + | |
| 576 | 688 | if (null != keyword) { |
| 577 | 689 | MongoCondition con1 = MongoCondition.newInstance("phone", "^" + keyword, MongoOper.LIKE); |
| 578 | 690 | MongoCondition con = MongoCondition.newInstance("username", "^" + keyword, MongoOper.LIKE); |
| 579 | 691 | |
| 580 | 692 | |
| ... | ... | @@ -596,15 +708,19 @@ |
| 596 | 708 | } else if (null != buildTypeList) { |
| 597 | 709 | MongoCondition mongoCondition = MongoCondition.newInstance("buildType", 3, MongoOper.IS); |
| 598 | 710 | MongoCondition condition1 = mongoCondition.and("enable", "1", MongoOper.IS); |
| 599 | - | |
| 600 | 711 | MongoCondition condition2 = MongoCondition.newInstance("buildType", buildTypeList, MongoOper.IN); |
| 601 | - | |
| 602 | 712 | condition = condition.orCondition(new MongoCondition[]{condition1, condition2}); |
| 603 | 713 | } |
| 604 | 714 | |
| 605 | 715 | if (buildTypeEq != null) { |
| 606 | 716 | condition = condition.and("buildType", buildTypeEq, MongoOper.IS); |
| 607 | 717 | } |
| 718 | + if (lastCheckEmployeeId != null) { | |
| 719 | + condition = condition.and("lastCheckEmployeeId", lastCheckEmployeeId, MongoOper.IS); | |
| 720 | + } | |
| 721 | + if (bookbuildingDoctor != null) { | |
| 722 | + condition = condition.and("bookbuildingDoctor", bookbuildingDoctor, MongoOper.IS); | |
| 723 | + } | |
| 608 | 724 | if (visitstatus != -1) { |
| 609 | 725 | condition = condition.and("isVisit", visitstatus, MongoOper.IS); |
| 610 | 726 | } |
| 611 | 727 | |
| ... | ... | @@ -617,9 +733,43 @@ |
| 617 | 733 | if (StringUtils.isNotEmpty(rLevel)) { |
| 618 | 734 | condition = condition.and("riskLevelId", rLevel, MongoOper.LIKE); |
| 619 | 735 | } |
| 620 | - if (null != areaId) { | |
| 736 | + //居住地 | |
| 737 | + if (StringUtils.isNotEmpty(areaId)) { | |
| 621 | 738 | condition = condition.and("areaId", areaId, MongoOper.IS); |
| 622 | 739 | } |
| 740 | + if(StringUtils.isNotEmpty(cityId)){ | |
| 741 | + condition = condition.and("cityId", cityId, MongoOper.IS); | |
| 742 | + } | |
| 743 | + if(StringUtils.isNotEmpty(provinceId)){ | |
| 744 | + condition = condition.and("provinceId", cityId, MongoOper.IS); | |
| 745 | + } | |
| 746 | + //户籍地 | |
| 747 | + if(StringUtils.isNotEmpty(provinceRegisterId)){ | |
| 748 | + condition = condition.and("provinceRegisterId", provinceRegisterId, MongoOper.IS); | |
| 749 | + } | |
| 750 | + if(StringUtils.isNotEmpty(cityRegisterId)){ | |
| 751 | + condition = condition.and("cityRegisterId", cityRegisterId, MongoOper.IS); | |
| 752 | + } | |
| 753 | + if(StringUtils.isNotEmpty(areaRegisterId)){ | |
| 754 | + condition = condition.and("areaRegisterId", areaRegisterId, MongoOper.IS); | |
| 755 | + } | |
| 756 | + | |
| 757 | + | |
| 758 | + /* //户籍地 | |
| 759 | + private String provinceRegisterId; | |
| 760 | + private String cityRegisterId; | |
| 761 | + private String areaRegisterId; | |
| 762 | + | |
| 763 | + //居住地 | |
| 764 | + private String provinceId; | |
| 765 | + private String cityId; | |
| 766 | + private String areaId; | |
| 767 | + //医院id | |
| 768 | + private List<String> hospitalList;*/ | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 623 | 773 | if (StringUtils.isNotEmpty(id)) { |
| 624 | 774 | condition = condition.and("id", id, MongoOper.IS); |
| 625 | 775 | } |
| ... | ... | @@ -638,6 +788,9 @@ |
| 638 | 788 | } else if (null != likeName) { |
| 639 | 789 | condition = condition.and("username", likeName, MongoOper.LIKE); |
| 640 | 790 | } |
| 791 | + if(CollectionUtils.isNotEmpty(hospitalList)){ | |
| 792 | + condition = condition.and("hospitalId", hospitalList, MongoOper.IN); | |
| 793 | + }else | |
| 641 | 794 | if (null != hospitalId) { |
| 642 | 795 | condition = condition.and("hospitalId", hospitalId, MongoOper.IS); |
| 643 | 796 | } |
| ... | ... | @@ -645,6 +798,14 @@ |
| 645 | 798 | condition = condition.and("pid", pid, MongoOper.IS); |
| 646 | 799 | } |
| 647 | 800 | Criteria c1 = null; |
| 801 | + if (null != queryNo) { | |
| 802 | + MongoCondition c = MongoCondition.newInstance(); | |
| 803 | + MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS); | |
| 804 | + MongoCondition con2 = MongoCondition.newInstance("username", queryNo, MongoOper.IS); | |
| 805 | + MongoCondition con3 = MongoCondition.newInstance("cardNo", queryNo, MongoOper.IS); | |
| 806 | + c1= c.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria(); | |
| 807 | + } | |
| 808 | + | |
| 648 | 809 | if (fmDateStart != null && fmDateEnd != null) { |
| 649 | 810 | c1 = Criteria.where("fmDate").gte(fmDateStart).lte(fmDateEnd); |
| 650 | 811 | } |
| ... | ... | @@ -710,6 +871,24 @@ |
| 710 | 871 | c1 = Criteria.where("lastRhTime").lte(lastRhTimeEnd); |
| 711 | 872 | } |
| 712 | 873 | } |
| 874 | + | |
| 875 | + if (null != nextCheckTimeStart) { | |
| 876 | + if (null != c1) { | |
| 877 | + c1 = c1.and("nextCheckTime").gte(nextCheckTimeStart); | |
| 878 | + } else { | |
| 879 | + c1 = Criteria.where("nextCheckTime").gte(nextCheckTimeStart); | |
| 880 | + } | |
| 881 | + } | |
| 882 | + | |
| 883 | + if (null != nextCheckTimeEnd) { | |
| 884 | + if (null != c1) { | |
| 885 | + c1 = c1.lte(nextCheckTimeEnd); | |
| 886 | + } else { | |
| 887 | + c1 = Criteria.where("nextCheckTime").lte(nextCheckTimeEnd); | |
| 888 | + } | |
| 889 | + } | |
| 890 | + | |
| 891 | + | |
| 713 | 892 | if (null != hScoreStart) { |
| 714 | 893 | if (null != hScoreStart) { |
| 715 | 894 | if (null != c1) { |
| 716 | 895 | |
| ... | ... | @@ -818,7 +997,9 @@ |
| 818 | 997 | } |
| 819 | 998 | if (null != c1) { |
| 820 | 999 | condition = condition.andCondition(new MongoCondition(c1)); |
| 1000 | + | |
| 821 | 1001 | } |
| 1002 | + | |
| 822 | 1003 | return condition.toMongoQuery(); |
| 823 | 1004 | } |
| 824 | 1005 |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
99a127d
| ... | ... | @@ -508,12 +508,12 @@ |
| 508 | 508 | { |
| 509 | 509 | for(MessageContent message : messageContents) |
| 510 | 510 | { |
| 511 | -// //判断当前短信是否已经发送 通过短信ID和孕妇ID | |
| 512 | -// boolean isExist = SaveMessageService.isExistSms(baby.getId(), message.getId()); | |
| 513 | -// if (isExist) | |
| 514 | -// { | |
| 515 | -// continue; | |
| 516 | -// } | |
| 511 | + //判断当前短信是否已经发送 通过短信ID和儿童ID | |
| 512 | + boolean isExist = SaveMessageService.isExistSms(baby.getId(), message.getId()); | |
| 513 | + if (isExist) | |
| 514 | + { | |
| 515 | + continue; | |
| 516 | + } | |
| 517 | 517 | String messageContent = "【"+messagePrefix+"】" + message.getContent(); |
| 518 | 518 | MessageRequest request = getMessageRequest( messageContent,baby.getMphone(),ServiceObjEnums.BABYOBJ.getId(), SmsServiceEnums.YBZD.getId(), |
| 519 | 519 | baby.getHospitalId(),message.getId(),baby.getId()); |
| ... | ... | @@ -639,6 +639,12 @@ |
| 639 | 639 | for(MessageContent message : messageContents) |
| 640 | 640 | { |
| 641 | 641 | |
| 642 | + //判断当前短信是否已经发送 通过短信ID和产妇ID | |
| 643 | + boolean isExist = SaveMessageService.isExistSms(pat.getId(), message.getId()); | |
| 644 | + if (isExist) | |
| 645 | + { | |
| 646 | + continue; | |
| 647 | + } | |
| 642 | 648 | String messageContent = "【"+messagePrefix+"】" + message.getContent(); |
| 643 | 649 | |
| 644 | 650 | MessageRequest request = getMessageRequest( messageContent,pat.getPhone(),ServiceObjEnums.CHANOBJ.getId(), SmsServiceEnums.YBZD.getId(), |
| ... | ... | @@ -712,7 +718,7 @@ |
| 712 | 718 | SmsConfigQuery configQuery = new SmsConfigQuery(); |
| 713 | 719 | configQuery.setYn(YnEnums.YES.getId()); |
| 714 | 720 | configQuery.setPrefixTypes(new Integer[]{0, 1}); |
| 715 | -// configQuery.setHospitalId(242 + ""); | |
| 721 | +// configQuery.setHospitalId(221 + ""); | |
| 716 | 722 | |
| 717 | 723 | //查询出对应医院配置 |
| 718 | 724 | List<SmsConfigModel> configs = smsConfigService.querySmsConfig(configQuery); |
| 719 | 725 | |
| ... | ... | @@ -2252,22 +2258,12 @@ |
| 2252 | 2258 | AntExQuery antExQuery = new AntExQuery(); |
| 2253 | 2259 | antExQuery.setParentId(chu.getParentId()); |
| 2254 | 2260 | antExQuery.setYn(YnEnums.YES.getId()); |
| 2255 | - | |
| 2256 | - PatientsQuery patientQuery = new PatientsQuery(); | |
| 2257 | - patientQuery.setYn(YnEnums.YES.getId()); | |
| 2258 | - patientQuery.setType(1); | |
| 2259 | - patientQuery.setId(chu.getParentId()); | |
| 2260 | - | |
| 2261 | - List<Patients> patientses = patientsService.queryPatient(patientQuery); | |
| 2262 | - if (CollectionUtils.isNotEmpty(patientses)) | |
| 2261 | + antExQuery.setHospitalId(tempHid); | |
| 2262 | + //复诊不存在 才添加 | |
| 2263 | + List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 2264 | + if (!CollectionUtils.isNotEmpty(list)) | |
| 2263 | 2265 | { |
| 2264 | - //复诊不存在 才添加 | |
| 2265 | - List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 2266 | - if (!CollectionUtils.isNotEmpty(list)) | |
| 2267 | - { | |
| 2268 | - idset.add(chu.getParentId()); | |
| 2269 | - } | |
| 2270 | - | |
| 2266 | + idset.add(chu.getParentId()); | |
| 2271 | 2267 | } |
| 2272 | 2268 | |
| 2273 | 2269 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
99a127d
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | import com.lyms.platform.permission.model.Users; |
| 10 | 10 | import com.lyms.platform.permission.service.UsersService; |
| 11 | 11 | import com.lyms.platform.pojo.Patients; |
| 12 | +import com.lyms.platform.query.AntExChuQuery; | |
| 12 | 13 | import com.lyms.platform.query.PatientsQuery; |
| 13 | 14 | import org.springframework.context.ApplicationContext; |
| 14 | 15 | import org.springframework.context.support.ClassPathXmlApplicationContext; |
| 15 | 16 | |
| ... | ... | @@ -25,24 +26,37 @@ |
| 25 | 26 | public class Test{ |
| 26 | 27 | |
| 27 | 28 | public static void main(String[] args){ |
| 28 | - PatientsQuery patientsQuery1 = new PatientsQuery(); | |
| 29 | - patientsQuery1.setPid("pid"); | |
| 30 | - patientsQuery1.setYn(YnEnums.YES.getId()); | |
| 31 | - patientsQuery1.setType(1); | |
| 32 | - Patients patients1 = new Patients(); | |
| 33 | - patients1.setModified(new Date()); | |
| 29 | +// PatientsQuery patientsQuery1 = new PatientsQuery(); | |
| 30 | +// patientsQuery1.setHospitalId("221"); | |
| 31 | +// patientsQuery1.setYn(YnEnums.YES.getId()); | |
| 32 | +// patientsQuery1.setType(1); | |
| 33 | +// | |
| 34 | +// List buildType = new ArrayList(); | |
| 35 | +// buildType.add(0); | |
| 36 | +// buildType.add(2); | |
| 37 | +// patientsQuery1.setBuildTypeList(buildType); | |
| 38 | +// | |
| 39 | +// patientsQuery1.setQueryNo("q"); | |
| 40 | +// | |
| 41 | +// | |
| 42 | +// | |
| 43 | +// patientsQuery1.setBookbuildingDateStart(DateUtil.parseYMD("1999-11-11")); | |
| 44 | +// patientsQuery1.setBookbuildingDateEnd(DateUtil.parseYMD("2016-12-08")); | |
| 34 | 45 | |
| 35 | - List<String> ids = new ArrayList<>(); | |
| 36 | - ids.add("id1"); | |
| 37 | - ids.add("id12"); | |
| 38 | - ids.add("id134"); | |
| 39 | - patients1.setRiskScore(12); | |
| 40 | - patients1.setRiskFactorId(ids); | |
| 41 | - patients1.setRiskLevelId(JsonUtil.array2JsonString(ids)); | |
| 42 | - Update update = MongoConvertHelper | |
| 43 | - .convertToNativeUpdate(ReflectionUtils.getUpdateField(patients1)); | |
| 44 | - System.out.println(JsonUtil.obj2JsonString(patientsQuery1.convertToQuery().convertToMongoQuery())); | |
| 45 | - System.out.println(JsonUtil.obj2JsonString(update)); | |
| 46 | + | |
| 47 | + Date yuYueDate = DateUtil.addDay(new Date(), 2); | |
| 48 | + if (yuYueDate != null) | |
| 49 | + { | |
| 50 | + //把时间格式化成 yyyy_MM_dd 的日期 | |
| 51 | + yuYueDate = DateUtil.formatDate(yuYueDate); | |
| 52 | + } | |
| 53 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 54 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 55 | + antExChuQuery.setNextCheckTimeStart(yuYueDate); | |
| 56 | + antExChuQuery.setNextCheckTimeEnd(yuYueDate); | |
| 57 | + antExChuQuery.setHospitalId("242"); | |
| 58 | + | |
| 59 | + System.out.println(antExChuQuery.convertToQuery().convertToMongoQuery()); | |
| 46 | 60 | |
| 47 | 61 | } |
| 48 | 62 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
99a127d
| ... | ... | @@ -189,7 +189,8 @@ |
| 189 | 189 | @RequestParam("limit") Integer limit, |
| 190 | 190 | |
| 191 | 191 | @RequestParam(value = "areaId",required = false) String areaId, |
| 192 | - @RequestParam(value = "hospitalId",required = false) String hospitalId){ | |
| 192 | + @RequestParam(value = "hospitalId",required = false) String hospitalId, | |
| 193 | + @RequestParam(value = "isArea",required = false) String isArea){ | |
| 193 | 194 | LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); |
| 194 | 195 | BabyManageRequest request = new BabyManageRequest(); |
| 195 | 196 | request.setBcardNo(bcardNo); |
| ... | ... | @@ -213,6 +214,8 @@ |
| 213 | 214 | request.setAreaId(areaId); |
| 214 | 215 | // 建档医院 |
| 215 | 216 | request.setHospitalId(hospitalId); |
| 217 | + // 是否区域 | |
| 218 | + request.setIsArea(isArea); | |
| 216 | 219 | |
| 217 | 220 | return babyBookbuildingFacade.queryBabyList(request,loginState.getId()); |
| 218 | 221 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
99a127d
| ... | ... | @@ -92,7 +92,7 @@ |
| 92 | 92 | @TokenRequired |
| 93 | 93 | public BaseResponse queryHighRiskPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request) { |
| 94 | 94 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 95 | - return patientFacade.queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1, loginState.getId(),"true"); | |
| 95 | + return patientFacade.queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1, loginState.getId(), "true",Boolean.FALSE); | |
| 96 | 96 | } |
| 97 | 97 | /** |
| 98 | 98 | *全部孕妇管理 |
| ... | ... | @@ -105,7 +105,7 @@ |
| 105 | 105 | @TokenRequired |
| 106 | 106 | public BaseResponse queryAllPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request) { |
| 107 | 107 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 108 | - return patientFacade.queryHighRisk(patientsQueryRequest,null,1,loginState.getId(),"true"); | |
| 108 | + return patientFacade.queryHighRisk(patientsQueryRequest,null,1,loginState.getId(),"true",Boolean.FALSE); | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | |
| ... | ... | @@ -133,7 +133,7 @@ |
| 133 | 133 | @TokenRequired |
| 134 | 134 | public BaseResponse queryAllPatients(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request){ |
| 135 | 135 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 136 | - return patientFacade.queryHighRisk(patientsQueryRequest, null, 3,loginState.getId(),"true"); | |
| 136 | + return patientFacade.queryHighRisk(patientsQueryRequest, null, 3,loginState.getId(),"true",Boolean.FALSE); | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | @RequestMapping(value = "/apatients/enums", method = RequestMethod.GET) |
| ... | ... | @@ -162,7 +162,7 @@ |
| 162 | 162 | @TokenRequired |
| 163 | 163 | public BaseResponse getPatent(@Valid PatientQueryRequest request,HttpServletRequest request1){ |
| 164 | 164 | LoginContext loginState = (LoginContext) request1.getAttribute("loginContext"); |
| 165 | - return patientFacade.findPatient(request,loginState.getId()); | |
| 165 | + return patientFacade.findPatient(request, loginState.getId()); | |
| 166 | 166 | } |
| 167 | 167 | /** |
| 168 | 168 | * 发送孕妇指导短信 |
| ... | ... | @@ -174,7 +174,48 @@ |
| 174 | 174 | @TokenRequired |
| 175 | 175 | public BaseResponse patientGuildSms(@RequestBody @Valid PatientGuideSmsRequest patientGuideSmsRequest,HttpServletRequest request1){ |
| 176 | 176 | LoginContext loginState = (LoginContext) request1.getAttribute("loginContext"); |
| 177 | - return patientFacade.patientGuildSms(patientGuideSmsRequest,loginState.getId()); | |
| 177 | + return patientFacade.patientGuildSms(patientGuideSmsRequest, loginState.getId()); | |
| 178 | + } | |
| 179 | + | |
| 180 | + /** | |
| 181 | + * 区域高危孕妇管理 | |
| 182 | + * | |
| 183 | + * @param patientsQueryRequest 产妇管理修改接口 | |
| 184 | + * @return 返回结果 | |
| 185 | + */ | |
| 186 | + @RequestMapping(value = "/rhPuer", method = RequestMethod.GET) | |
| 187 | + @ResponseBody | |
| 188 | + @TokenRequired | |
| 189 | + public BaseResponse queryRegionPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request) { | |
| 190 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 191 | + return patientFacade.queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1, loginState.getId(), "true",Boolean.TRUE); | |
| 192 | + } | |
| 193 | + | |
| 194 | + /** | |
| 195 | + * 区域全部产妇 | |
| 196 | + * | |
| 197 | + * @return | |
| 198 | + */ | |
| 199 | + @RequestMapping(value = "/rapatients", method = RequestMethod.GET) | |
| 200 | + @ResponseBody | |
| 201 | + @TokenRequired | |
| 202 | + public BaseResponse queryRegionAllPatients(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request){ | |
| 203 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 204 | + return patientFacade.queryHighRisk(patientsQueryRequest, null, 3,loginState.getId(),"true",Boolean.TRUE); | |
| 205 | + } | |
| 206 | + | |
| 207 | + /** | |
| 208 | + *区域全部孕妇管理 | |
| 209 | + * | |
| 210 | + * @param patientsQueryRequest 全部孕妇管理查询 (因为请求参数一样同用一个对象) | |
| 211 | + * @return 返回结果 | |
| 212 | + */ | |
| 213 | + @RequestMapping(value = "/raPuer", method = RequestMethod.GET) | |
| 214 | + @ResponseBody | |
| 215 | + @TokenRequired | |
| 216 | + public BaseResponse queryRegionAllPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request) { | |
| 217 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 218 | + return patientFacade.queryHighRisk(patientsQueryRequest,null,1,loginState.getId(),"true",Boolean.TRUE); | |
| 178 | 219 | } |
| 179 | 220 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
99a127d
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
| 4 | 4 | import com.lyms.platform.biz.JdbcUtil; |
| 5 | +import com.lyms.platform.biz.service.AntenatalExaminationService; | |
| 5 | 6 | import com.lyms.platform.biz.service.AssayConfigService; |
| 6 | 7 | import com.lyms.platform.biz.service.PatientsService; |
| 7 | 8 | import com.lyms.platform.biz.service.SieveService; |
| 8 | 9 | |
| 9 | 10 | |
| ... | ... | @@ -10,12 +11,17 @@ |
| 10 | 11 | import com.lyms.platform.common.utils.JsonUtil; |
| 11 | 12 | import com.lyms.platform.operate.web.service.SyncDataTaskService; |
| 12 | 13 | import com.lyms.platform.permission.service.OrganizationService; |
| 14 | +import com.lyms.platform.pojo.AntExChuModel; | |
| 15 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
| 13 | 16 | import com.lyms.platform.pojo.AssayConfig; |
| 14 | 17 | import com.lyms.platform.pojo.Patients; |
| 18 | +import com.lyms.platform.query.AntExChuQuery; | |
| 19 | +import com.lyms.platform.query.AntExQuery; | |
| 15 | 20 | import com.lyms.platform.query.PatientsQuery; |
| 16 | 21 | import org.apache.commons.collections.CollectionUtils; |
| 17 | 22 | import org.apache.commons.io.FileUtils; |
| 18 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| 24 | +import org.springframework.data.domain.Sort; | |
| 19 | 25 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 20 | 26 | import org.springframework.stereotype.Controller; |
| 21 | 27 | import org.springframework.web.bind.annotation.RequestMapping; |
| ... | ... | @@ -53,6 +59,9 @@ |
| 53 | 59 | @Autowired |
| 54 | 60 | private OrganizationService organizationService; |
| 55 | 61 | |
| 62 | + @Autowired | |
| 63 | + private AntenatalExaminationService antenatalExaminationService; | |
| 64 | + | |
| 56 | 65 | /** |
| 57 | 66 | * 获取科室 |
| 58 | 67 | */ |
| ... | ... | @@ -285,6 +294,53 @@ |
| 285 | 294 | public String rebuildDefaultRoles() { |
| 286 | 295 | organizationService.rebuildDefaultRoles(); |
| 287 | 296 | return "sieveOrder finish"; |
| 297 | + } | |
| 298 | + | |
| 299 | + | |
| 300 | + @RequestMapping(value = "/syncPatNextTime", method = RequestMethod.GET) | |
| 301 | + @ResponseBody | |
| 302 | + public String syncPatNextTime() { | |
| 303 | + PatientsQuery patientQuery = new PatientsQuery(); | |
| 304 | + patientQuery.setYn(YnEnums.YES.getId()); | |
| 305 | +// patientQuery.setHospitalId("221"); | |
| 306 | + patientQuery.setType(1); | |
| 307 | + List<Patients> patientses = patientsService.queryPatient(patientQuery); | |
| 308 | + if (CollectionUtils.isNotEmpty(patientses)) | |
| 309 | + { | |
| 310 | + for (Patients pat : patientses) { | |
| 311 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 312 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 313 | + antExChuQuery.setHospitalId(pat.getHospitalId()); | |
| 314 | + antExChuQuery.setParentId(pat.getId()); | |
| 315 | + List<AntExChuModel> chus = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 316 | + if (CollectionUtils.isNotEmpty(chus)) { | |
| 317 | + Date nextTime = null; | |
| 318 | + AntExChuModel chu = chus.get(0); | |
| 319 | + if (chu != null) | |
| 320 | + { | |
| 321 | + nextTime = chu.getNextCheckTime(); | |
| 322 | + | |
| 323 | + AntExQuery antExQuery = new AntExQuery(); | |
| 324 | + antExQuery.setParentId(pat.getId()); | |
| 325 | + antExQuery.setYn(YnEnums.YES.getId()); | |
| 326 | + antExQuery.setHospitalId(pat.getHospitalId()); | |
| 327 | + List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 328 | + if (CollectionUtils.isNotEmpty(list)) | |
| 329 | + { | |
| 330 | + AntenatalExaminationModel ae = list.get(0); | |
| 331 | + if (ae != null) | |
| 332 | + { | |
| 333 | + nextTime = ae.getNextCheckTime(); | |
| 334 | + } | |
| 335 | + } | |
| 336 | + patientsService.updatePatientOneCol(pat.getId(), nextTime); | |
| 337 | + | |
| 338 | + } | |
| 339 | + | |
| 340 | + } | |
| 341 | + } | |
| 342 | + } | |
| 343 | + return "syncPatNextTime finish"; | |
| 288 | 344 | } |
| 289 | 345 | |
| 290 | 346 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
99a127d
| ... | ... | @@ -231,7 +231,7 @@ |
| 231 | 231 | page = page == null ? 1 : page; |
| 232 | 232 | |
| 233 | 233 | usersQuery.setNeed("true"); |
| 234 | - usersQuery.setSort("account desc"); | |
| 234 | + usersQuery.setSort("modified desc"); | |
| 235 | 235 | usersQuery.setYn(YnEnums.YES.getId()); |
| 236 | 236 | usersQuery.setDeptId(deptId); |
| 237 | 237 | usersQuery.setKeyword(keyword); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
99a127d
| ... | ... | @@ -136,8 +136,8 @@ |
| 136 | 136 | Patients patients = patientsService.findOnePatientById(antExAddRequest.getParentId()); |
| 137 | 137 | |
| 138 | 138 | patients.setLastCheckEmployeeId(antExAddRequest.getCheckDoctor()); |
| 139 | - | |
| 140 | 139 | patientsService.updatePatient(patients); |
| 140 | + patientsService.updatePatientOneCol(patients.getId(), com.lyms.platform.common.utils.StringUtils.isEmpty(antExAddRequest.getNextCheckTime()) == true ? null : DateUtil.parseYMD(antExAddRequest.getNextCheckTime())); | |
| 141 | 141 | //修改孕妇高危等级 |
| 142 | 142 | updateLastRisk(antExAddRequest.getParentId()); |
| 143 | 143 | |
| 144 | 144 | |
| ... | ... | @@ -160,11 +160,13 @@ |
| 160 | 160 | } |
| 161 | 161 | Patients patients = patientsService.findOnePatientById(antExAddRequest.getParentId()); |
| 162 | 162 | patients.setLastCheckEmployeeId(antExAddRequest.getCheckDoctor()); |
| 163 | + | |
| 163 | 164 | model.setPid(patients.getPid()); |
| 164 | 165 | if (StringUtils.isNotEmpty(patients.getEnable()) && "0".equals(patients.getEnable())) { |
| 165 | 166 | patients.setEnable("1"); |
| 166 | 167 | } |
| 167 | 168 | patientsService.updatePatient(patients); |
| 169 | + patientsService.updatePatientOneCol(patients.getId(), com.lyms.platform.common.utils.StringUtils.isEmpty(antExAddRequest.getNextCheckTime()) == true ? null : DateUtil.parseYMD(antExAddRequest.getNextCheckTime())); | |
| 168 | 170 | antenatalExaminationService.addOneBabyAnt(model); |
| 169 | 171 | |
| 170 | 172 | //修改最后一次检查时间 |
| ... | ... | @@ -254,6 +256,7 @@ |
| 254 | 256 | //修改患者风险等级 |
| 255 | 257 | // updatePatientRiskLevel(antExChuModel, patients); |
| 256 | 258 | patientsService.updatePatient(patients); |
| 259 | + patientsService.updatePatientOneCol(patients.getId(), com.lyms.platform.common.utils.StringUtils.isEmpty(excAddRequest.getNextCheckTime()) == true ? null : DateUtil.parseYMD(excAddRequest.getNextCheckTime())); | |
| 257 | 260 | //修改本系统最后的高危 |
| 258 | 261 | updateLastRisk(patients.getId()); |
| 259 | 262 | //修改本院最后一次定义高危 |
| 260 | 263 | |
| ... | ... | @@ -291,9 +294,11 @@ |
| 291 | 294 | antExChuModel.setHospitalId(autoMatchFacade.getHospitalId(userId)); |
| 292 | 295 | antenatalExaminationService.addOneAntEx(antExChuModel); |
| 293 | 296 | //修改患者风险等级 |
| 297 | + | |
| 294 | 298 | patients.setLastCheckEmployeeId(excAddRequest.getProdDoctor()); |
| 295 | 299 | // updatePatientRiskLevel(antExChuModel, patients); |
| 296 | 300 | patientsService.updatePatient(patients); |
| 301 | + patientsService.updatePatientOneCol(patients.getId(), com.lyms.platform.common.utils.StringUtils.isEmpty(excAddRequest.getNextCheckTime()) == true ? null : DateUtil.parseYMD(excAddRequest.getNextCheckTime())); | |
| 297 | 302 | updateLastRisk(patients.getId()); |
| 298 | 303 | |
| 299 | 304 | //修改本院最后一次定义高危 |
| ... | ... | @@ -1374,6 +1379,9 @@ |
| 1374 | 1379 | * @return |
| 1375 | 1380 | */ |
| 1376 | 1381 | public BaseResponse delOneAntEx(AntExQueryRequest antExQueryRequest, Integer userId) { |
| 1382 | + | |
| 1383 | + String parentId = ""; | |
| 1384 | + | |
| 1377 | 1385 | if ("1".equals(antExQueryRequest.getType())) { |
| 1378 | 1386 | AntenatalExaminationModel antEx = new AntenatalExaminationModel(); |
| 1379 | 1387 | antEx.setYn(YnEnums.NO.getId()); |
| ... | ... | @@ -1382,7 +1390,7 @@ |
| 1382 | 1390 | |
| 1383 | 1391 | AntenatalExaminationModel localAntModel = antenatalExaminationService.findOneById(antExQueryRequest.getId()); |
| 1384 | 1392 | |
| 1385 | - ; | |
| 1393 | + parentId =localAntModel.getParentId(); | |
| 1386 | 1394 | |
| 1387 | 1395 | /*AntExQuery antExQuery = new AntExQuery(); |
| 1388 | 1396 | antExQuery.setId(antExQueryRequest.getId()); |
| 1389 | 1397 | |
| ... | ... | @@ -1427,9 +1435,9 @@ |
| 1427 | 1435 | |
| 1428 | 1436 | AntExChuModel antExChuModel11 = antenatalExaminationService.findOne(antExQueryRequest.getId()); |
| 1429 | 1437 | |
| 1438 | + parentId = antExChuModel11.getParentId(); | |
| 1430 | 1439 | |
| 1431 | 1440 | |
| 1432 | - | |
| 1433 | 1441 | /*AntExChuQuery antExQuery = new AntExChuQuery(); |
| 1434 | 1442 | antExQuery.setId(antExQueryRequest.getId()); |
| 1435 | 1443 | antExQuery.setYn(YnEnums.YES.getId()); |
| ... | ... | @@ -1467,6 +1475,52 @@ |
| 1467 | 1475 | return new BaseResponse().setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg("当前产检记录不是本院最新的产检记录,不能删除"); |
| 1468 | 1476 | } |
| 1469 | 1477 | } |
| 1478 | + | |
| 1479 | + | |
| 1480 | + //删除复诊或者出诊的时候更新patient表的下次预约时间为最近的一次预约 | |
| 1481 | + if (StringUtils.isNotEmpty(parentId)) | |
| 1482 | + { | |
| 1483 | + PatientsQuery patientQuery = new PatientsQuery(); | |
| 1484 | + patientQuery.setYn(YnEnums.YES.getId()); | |
| 1485 | + patientQuery.setId(parentId); | |
| 1486 | + List<Patients> patientses = patientsService.queryPatient(patientQuery); | |
| 1487 | + if (CollectionUtils.isNotEmpty(patientses)) | |
| 1488 | + { | |
| 1489 | + for (Patients pat : patientses) { | |
| 1490 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 1491 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 1492 | + antExChuQuery.setHospitalId(pat.getHospitalId()); | |
| 1493 | + antExChuQuery.setParentId(pat.getId()); | |
| 1494 | + List<AntExChuModel> chus = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 1495 | + if (CollectionUtils.isNotEmpty(chus)) { | |
| 1496 | + Date nextTime = null; | |
| 1497 | + AntExChuModel chu = chus.get(0); | |
| 1498 | + if (chu != null) | |
| 1499 | + { | |
| 1500 | + nextTime = chu.getNextCheckTime(); | |
| 1501 | + | |
| 1502 | + AntExQuery antExQuery = new AntExQuery(); | |
| 1503 | + antExQuery.setParentId(pat.getId()); | |
| 1504 | + antExQuery.setYn(YnEnums.YES.getId()); | |
| 1505 | + antExQuery.setHospitalId(pat.getHospitalId()); | |
| 1506 | + List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 1507 | + if (CollectionUtils.isNotEmpty(list)) | |
| 1508 | + { | |
| 1509 | + AntenatalExaminationModel ae = list.get(0); | |
| 1510 | + if (ae != null) | |
| 1511 | + { | |
| 1512 | + nextTime = ae.getNextCheckTime(); | |
| 1513 | + } | |
| 1514 | + } | |
| 1515 | + patientsService.updatePatientOneCol(pat.getId(), nextTime); | |
| 1516 | + | |
| 1517 | + } | |
| 1518 | + | |
| 1519 | + } | |
| 1520 | + } | |
| 1521 | + } | |
| 1522 | + } | |
| 1523 | + | |
| 1470 | 1524 | |
| 1471 | 1525 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 1472 | 1526 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AutoMatchFacade.java
View file @
99a127d
| ... | ... | @@ -57,35 +57,16 @@ |
| 57 | 57 | List<Users> list = usersService.queryUsers(usersQuery); |
| 58 | 58 | List<Integer> data = new ArrayList<>(); |
| 59 | 59 | if (CollectionUtils.isNotEmpty(list)) { |
| 60 | - //用户角色 | |
| 61 | - if (UserTypeEnum.NORMAL_USER.getId().equals(list.get(0).getType())) { | |
| 62 | - List<Organization> list2 = accessPermissionFacade.getOrganization(accessPermissionFacade.findAccessPerminssionByUserId(list.get(0).getId())); | |
| 63 | - if(CollectionUtils.isNotEmpty(list2)){ | |
| 64 | - for(Organization organization:list2){ | |
| 65 | - data.add(organization.getId()); | |
| 66 | - } | |
| 67 | - } | |
| 68 | - } else if(UserTypeEnum.PLATFORM_ADMIN.getId().equals(list.get(0).getType())){ | |
| 69 | - List<Organization> list2 = accessPermissionFacade.getOrganization(accessPermissionFacade.findAccessPerminssionByUserId(list.get(0).getId())); | |
| 70 | - if(CollectionUtils.isNotEmpty(list2)){ | |
| 71 | - for(Organization organization:list2){ | |
| 72 | - data.add(organization.getId()); | |
| 73 | - } | |
| 74 | - } | |
| 75 | - /*UserOrganizationMapsQuery userOrganizationMapsQuery = new UserOrganizationMapsQuery(); | |
| 76 | - userOrganizationMapsQuery.setUserId(list.get(0).getId()); | |
| 77 | - userOrganizationMapsQuery.setYn(YnEnums.YES.getId()); | |
| 78 | - List<UserOrganizationMaps> list1 = userOrganizationMapsService.queryUserOrganizationMaps(userOrganizationMapsQuery); | |
| 79 | - if(CollectionUtils.isNotEmpty(list1)){ | |
| 80 | - for(UserOrganizationMaps userOrganizationMaps:list1){ | |
| 81 | - data.add(userOrganizationMaps.getOrgId()); | |
| 82 | - } | |
| 83 | - }*/ | |
| 60 | + | |
| 61 | + /**/ //用户角色 | |
| 62 | + if (UserTypeEnum.NORMAL_USER.getId().equals(list.get(0).getType())||UserTypeEnum.PLATFORM_ADMIN.getId().equals(list.get(0).getType())) { | |
| 63 | + data.add(list.get(0).getOrgId()); | |
| 84 | 64 | } else if(UserTypeEnum.SUPPER_ADMIN.getId().equals(list.get(0).getType())) { |
| 85 | 65 | return null; |
| 86 | 66 | } |
| 67 | + return data; | |
| 87 | 68 | } |
| 88 | - return data; | |
| 69 | + return null; | |
| 89 | 70 | } |
| 90 | 71 | public String getHospitalId(Integer userId){ |
| 91 | 72 | List<Integer> list = matchOrgId(userId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
99a127d
| ... | ... | @@ -38,6 +38,7 @@ |
| 38 | 38 | |
| 39 | 39 | public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); |
| 40 | 40 | |
| 41 | + | |
| 41 | 42 | @Autowired |
| 42 | 43 | private HisService hisServiceV2; |
| 43 | 44 | |
| ... | ... | @@ -479,6 +480,9 @@ |
| 479 | 480 | model.setCreated(new Date()); |
| 480 | 481 | model.setModified(new Date()); |
| 481 | 482 | model.setBuildType(1); |
| 483 | + model.setHospitalId(request.getHospitalId()); | |
| 484 | + String hospitalName = organizationService.getOrganization(Integer.valueOf(request.getHospitalId())).getName(); | |
| 485 | + model.setHospitalName(hospitalName); | |
| 482 | 486 | model = babyBookbuildingService.addBabyBookbuilding(model); |
| 483 | 487 | |
| 484 | 488 | if (model == null || model.getId() == null) { |
| 485 | 489 | |
| 486 | 490 | |
| 487 | 491 | |
| ... | ... | @@ -1431,38 +1435,42 @@ |
| 1431 | 1435 | */ |
| 1432 | 1436 | public BaseListResponse queryBabyList(BabyManageRequest request, Integer userId) { |
| 1433 | 1437 | |
| 1434 | - // HuJiaqi注释开始 | |
| 1435 | - // String hospitalId = ""; | |
| 1436 | - | |
| 1437 | - | |
| 1438 | - //得到当前登录的医院id | |
| 1439 | - // if (userId != null) { | |
| 1440 | - // Users dbuser = usersService.getUsers(userId); | |
| 1441 | - // if (dbuser != null) { | |
| 1442 | - // hospitalId = String.valueOf(dbuser.getOrgId()); | |
| 1443 | - // } | |
| 1444 | - // } | |
| 1445 | - // HuJiaqi注释结束 | |
| 1446 | - // 更改原因-从一个医院更改为list | |
| 1447 | 1438 | List<String> hospitalIdList = new ArrayList<>(); |
| 1448 | - if(request.getHospitalId()==null){ | |
| 1449 | - // 没有传入医院,取所有有权限的医院 | |
| 1450 | - OrganizationQuery organizationQuery = new OrganizationQuery(); | |
| 1451 | - List<Integer> typeList = new ArrayList<>(); | |
| 1452 | - typeList.add(OrganizationTypeEnum.NY.getId()); | |
| 1453 | - typeList.add(OrganizationTypeEnum.FB.getId()); | |
| 1454 | - typeList.add(OrganizationTypeEnum.JMQY.getId()); | |
| 1455 | - typeList.add(OrganizationTypeEnum.TY.getId()); | |
| 1456 | - organizationQuery.setTypeList(typeList); | |
| 1457 | - List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
| 1458 | - for (Organization organization : organizationList) { | |
| 1459 | - hospitalIdList.add(String.valueOf(organization.getId())); | |
| 1439 | + | |
| 1440 | + if(String.valueOf(YnEnums.YES.getId()).equals(request.getIsArea())){ | |
| 1441 | + // 更改原因-从一个医院更改为list | |
| 1442 | + if(request.getHospitalId()==null){ | |
| 1443 | + // 没有传入医院,取所有有权限的医院 | |
| 1444 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
| 1445 | + List<Integer> typeList = new ArrayList<>(); | |
| 1446 | + typeList.add(OrganizationTypeEnum.NY.getId()); | |
| 1447 | + typeList.add(OrganizationTypeEnum.FB.getId()); | |
| 1448 | + typeList.add(OrganizationTypeEnum.JMQY.getId()); | |
| 1449 | + typeList.add(OrganizationTypeEnum.TY.getId()); | |
| 1450 | + organizationQuery.setTypeList(typeList); | |
| 1451 | + List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
| 1452 | + for (Organization organization : organizationList) { | |
| 1453 | + hospitalIdList.add(String.valueOf(organization.getId())); | |
| 1454 | + } | |
| 1455 | + }else{ | |
| 1456 | + // 传入了医院,取传入的医院 | |
| 1457 | + hospitalIdList.add(request.getHospitalId()); | |
| 1460 | 1458 | } |
| 1461 | 1459 | }else{ |
| 1462 | - // 传入了医院,取传入的医院 | |
| 1463 | - hospitalIdList.add(request.getHospitalId()); | |
| 1460 | + String hospitalId = ""; | |
| 1461 | + //得到当前登录的医院id | |
| 1462 | + if (userId != null) { | |
| 1463 | + Users dbuser = usersService.getUsers(userId); | |
| 1464 | + if (dbuser != null) { | |
| 1465 | + hospitalId = String.valueOf(dbuser.getOrgId()); | |
| 1466 | + } | |
| 1467 | + } | |
| 1468 | + hospitalIdList.add(hospitalId); | |
| 1464 | 1469 | } |
| 1465 | 1470 | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1466 | 1474 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1467 | 1475 | babyQuery.setHospitalIdList(hospitalIdList); |
| 1468 | 1476 | List<BabyModel> models = getBabayListByCondition(request, true, babyQuery); |
| ... | ... | @@ -1488,6 +1496,35 @@ |
| 1488 | 1496 | result.setMonthAge(StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); |
| 1489 | 1497 | result.setPatientId(model.getParentId()); |
| 1490 | 1498 | result.setBuildTime(DateUtil.getyyyy_MM_dd(model.getBuildDate())); |
| 1499 | + result.setHospitalName(model.getHospitalName()); | |
| 1500 | + | |
| 1501 | + // 开始查询省市区街道 | |
| 1502 | + // 省 | |
| 1503 | + BasicConfig provinceName = basicConfigService.getOneBasicConfigById(model.getProvinceId()); | |
| 1504 | + // 市 | |
| 1505 | + BasicConfig cityName = basicConfigService.getOneBasicConfigById(model.getCityId()); | |
| 1506 | + // 区 | |
| 1507 | + BasicConfig areaName = basicConfigService.getOneBasicConfigById(model.getAreaId()); | |
| 1508 | + // 街道 | |
| 1509 | + BasicConfig streetName = basicConfigService.getOneBasicConfigById(model.getStreetId()); | |
| 1510 | + // 具体 | |
| 1511 | + String address = model.getAddress(); | |
| 1512 | + String completeAddress = ""; | |
| 1513 | + if(provinceName!=null){ | |
| 1514 | + completeAddress+=provinceName.getName(); | |
| 1515 | + } | |
| 1516 | + if(cityName!=null){ | |
| 1517 | + completeAddress+=cityName.getName(); | |
| 1518 | + } | |
| 1519 | + if(areaName!=null){ | |
| 1520 | + completeAddress+=areaName.getName(); | |
| 1521 | + } | |
| 1522 | + if(streetName!=null){ | |
| 1523 | + completeAddress+=streetName.getName(); | |
| 1524 | + } | |
| 1525 | + completeAddress+=address; | |
| 1526 | + result.setCompleteAddress(completeAddress); | |
| 1527 | + | |
| 1491 | 1528 | String diagnose = ""; |
| 1492 | 1529 | // if (!StringUtils.isEmpty(model.getDiagnose())) { |
| 1493 | 1530 | // List diagList = JsonUtil.toList(model.getDiagnose(), List.class); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
99a127d
| ... | ... | @@ -1385,11 +1385,38 @@ |
| 1385 | 1385 | } |
| 1386 | 1386 | } |
| 1387 | 1387 | |
| 1388 | - public BaseListResponse queryBookBuild(BookBuildManagerQueryRequest bookBuildManagerQueryRequest){ | |
| 1388 | + /** | |
| 1389 | + * | |
| 1390 | + * 建档管理页面 | |
| 1391 | + * | |
| 1392 | + * @param bookBuildManagerQueryRequest | |
| 1393 | + * @return | |
| 1394 | + */ | |
| 1395 | + public BaseListResponse queryBookBuild(BookBuildManagerQueryRequest bookBuildManagerQueryRequest,Integer userId){ | |
| 1389 | 1396 | PatientsQuery patientsQuery1=new PatientsQuery(); |
| 1390 | 1397 | patientsQuery1.setYn(YnEnums.YES.getId()); |
| 1391 | - yunBookbuildingService.queryPregnantWithQuery(patientsQuery1); | |
| 1392 | - return new BaseListResponse(); | |
| 1398 | + List buildType = new ArrayList(); | |
| 1399 | + buildType.add(0); | |
| 1400 | + buildType.add(2); | |
| 1401 | + patientsQuery1.setBuildTypeList(buildType); | |
| 1402 | + String hospitalId= autoMatchFacade.getHospitalId(userId); | |
| 1403 | + patientsQuery1.setHospitalId(hospitalId); | |
| 1404 | + patientsQuery1.setNeed("1"); | |
| 1405 | + patientsQuery1.setLimit(bookBuildManagerQueryRequest.getLimit()); | |
| 1406 | + patientsQuery1.setPage(bookBuildManagerQueryRequest.getPage()); | |
| 1407 | + patientsQuery1.setPhone(bookBuildManagerQueryRequest.getPhone()); | |
| 1408 | + patientsQuery1.setCardNo(bookBuildManagerQueryRequest.getCardNo()); | |
| 1409 | + patientsQuery1.setPhone(bookBuildManagerQueryRequest.getPhone()); | |
| 1410 | + | |
| 1411 | + List<Patients> patientses= yunBookbuildingService.queryPregnantWithQuery(patientsQuery1); | |
| 1412 | + | |
| 1413 | + BookBuildManagerResult bookBuildManagerResult=new BookBuildManagerResult(); | |
| 1414 | + List<BookBuildManagerResult> data = new ArrayList<>(); | |
| 1415 | + for(Patients patients: patientses){ | |
| 1416 | + bookBuildManagerResult.convertToResult(patients); | |
| 1417 | + | |
| 1418 | + } | |
| 1419 | + return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 1393 | 1420 | } |
| 1394 | 1421 | |
| 1395 | 1422 | public BaseResponse findPatientById(String parentId,Integer userId){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
99a127d
| ... | ... | @@ -14,22 +14,21 @@ |
| 14 | 14 | import com.lyms.platform.operate.web.worker.QuanChanPatientWorker; |
| 15 | 15 | import com.lyms.platform.operate.web.worker.QuanPatientWorker; |
| 16 | 16 | import com.lyms.platform.operate.web.worker.WorkHR; |
| 17 | -import com.lyms.platform.permission.model.Users; | |
| 17 | +import com.lyms.platform.permission.model.Organization; | |
| 18 | +import com.lyms.platform.permission.model.OrganizationQuery; | |
| 19 | +import com.lyms.platform.permission.service.OrganizationService; | |
| 18 | 20 | import com.lyms.platform.permission.service.UsersService; |
| 19 | 21 | import com.lyms.platform.pojo.*; |
| 20 | 22 | import com.lyms.platform.query.*; |
| 21 | 23 | import org.apache.commons.collections.CollectionUtils; |
| 22 | 24 | import org.apache.commons.lang.StringUtils; |
| 23 | -import org.apache.commons.lang.math.NumberUtils; | |
| 24 | 25 | import org.slf4j.Logger; |
| 25 | 26 | import org.slf4j.LoggerFactory; |
| 26 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
| 27 | -import org.springframework.data.domain.Sort; | |
| 28 | 28 | import org.springframework.stereotype.Component; |
| 29 | 29 | import org.springframework.util.StopWatch; |
| 30 | 30 | |
| 31 | 31 | import javax.servlet.http.HttpServletResponse; |
| 32 | -import java.io.IOException; | |
| 33 | 32 | import java.io.OutputStream; |
| 34 | 33 | import java.util.*; |
| 35 | 34 | import java.util.concurrent.*; |
| ... | ... | @@ -68,6 +67,10 @@ |
| 68 | 67 | |
| 69 | 68 | @Autowired |
| 70 | 69 | private SyncDataService syncDataService; |
| 70 | + @Autowired | |
| 71 | + private DataPermissionService dataPermissionService; | |
| 72 | + @Autowired | |
| 73 | + private OrganizationService organizationService; | |
| 71 | 74 | |
| 72 | 75 | private ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(15, 20, 1, TimeUnit.MINUTES, new LinkedBlockingQueue<Runnable>(5000)); |
| 73 | 76 | |
| ... | ... | @@ -200,7 +203,7 @@ |
| 200 | 203 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 201 | 204 | } |
| 202 | 205 | |
| 203 | - private PatientsQuery complayRequest(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, int type, Integer userId, String needPage) { | |
| 206 | + private PatientsQuery complayRequest(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, int type, Integer userId, String needPage, boolean isRegion) { | |
| 204 | 207 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 205 | 208 | patientsQuery.setPhone(riskPatientsQueryRequest.getPhone()); |
| 206 | 209 | patientsQuery.setCardNo(riskPatientsQueryRequest.getCardNo()); |
| ... | ... | @@ -213,7 +216,7 @@ |
| 213 | 216 | Date currentDate = DateUtil.formatDate(new Date()); |
| 214 | 217 | |
| 215 | 218 | patientsQuery.setPostViewTimes(riskPatientsQueryRequest.getPostViewTimes()); |
| 216 | - if(null!=riskPatientsQueryRequest.getPostViewTimes() &&riskPatientsQueryRequest.getPostViewTimes()>=4){ | |
| 219 | + if (null != riskPatientsQueryRequest.getPostViewTimes() && riskPatientsQueryRequest.getPostViewTimes() >= 4) { | |
| 217 | 220 | patientsQuery.setGtePostTimes(true); |
| 218 | 221 | } |
| 219 | 222 | |
| ... | ... | @@ -249,6 +252,20 @@ |
| 249 | 252 | } |
| 250 | 253 | } |
| 251 | 254 | |
| 255 | + //下次预约时间 | |
| 256 | + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getNextCheckTime())) { | |
| 257 | + String nextDateStr = riskPatientsQueryRequest.getNextCheckTime(); | |
| 258 | + String[] dates = nextDateStr.split(" - "); | |
| 259 | + patientsQuery.setNextCheckTimeStart(DateUtil.parseYMD(dates[0])); | |
| 260 | + if (dates.length == 2) { | |
| 261 | + patientsQuery.setNextCheckTimeEnd(DateUtil.parseYMD(dates[1])); | |
| 262 | + } | |
| 263 | + } | |
| 264 | + patientsQuery.setBookbuildingDoctor(riskPatientsQueryRequest.getBuildUserId()); | |
| 265 | + patientsQuery.setLastCheckEmployeeId(riskPatientsQueryRequest.getLastCheckDoctorId()); | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 252 | 269 | patientsQuery.setrLevel(riskPatientsQueryRequest.getrLevel()); |
| 253 | 270 | patientsQuery.setLastMensesStart(riskPatientsQueryRequest.capEnd()); |
| 254 | 271 | patientsQuery.setLastMensesEnd(riskPatientsQueryRequest.capStart()); |
| 255 | 272 | |
| ... | ... | @@ -303,9 +320,67 @@ |
| 303 | 320 | buildType.add(0); |
| 304 | 321 | buildType.add(2); |
| 305 | 322 | patientsQuery.setBuildTypeList(buildType); |
| 306 | - String hospital = autoMatchFacade.getHospitalId(userId); | |
| 307 | - patientsQuery.setHospitalId(hospital); | |
| 323 | + //居住地 | |
| 324 | + patientsQuery.setAreaId(riskPatientsQueryRequest.getAreaId()); | |
| 325 | + patientsQuery.setCityId(riskPatientsQueryRequest.getCityId()); | |
| 326 | + patientsQuery.setProvinceId(riskPatientsQueryRequest.getProvinceId()); | |
| 327 | + //户籍地 | |
| 328 | + patientsQuery.setAreaRegisterId(riskPatientsQueryRequest.getAreaRegisterId()); | |
| 329 | + patientsQuery.setProvinceRegisterId(riskPatientsQueryRequest.getProvinceRegisterId()); | |
| 330 | + patientsQuery.setCityRegisterId(riskPatientsQueryRequest.getCityRegisterId()); | |
| 331 | + List<String> hospitalList = null; | |
| 332 | + //区域范围内孕妇 | |
| 333 | + if (isRegion) { | |
| 334 | + //王平说的 必须要给区域医院权限,不然他就是蠢逼 201611124 16:41 | |
| 335 | + hospitalList = new ArrayList<>(); | |
| 336 | + DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); | |
| 337 | + dataPermissionsModelQuery.setUserId(userId); | |
| 338 | + List<DataPermissionsModel> permissionsModels = dataPermissionService.queryPermission(dataPermissionsModelQuery); | |
| 339 | + if (CollectionUtils.isNotEmpty(permissionsModels)) { | |
| 340 | + Set<String> set = permissionsModels.get(0).getData().keySet(); | |
| 341 | + Iterator<String> it = set.iterator(); | |
| 342 | + while (it.hasNext()) { | |
| 343 | + String id = it.next(); | |
| 344 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(id) && !hospitalList.contains(id)) { | |
| 345 | + hospitalList.add(id); | |
| 346 | + } | |
| 347 | + } | |
| 348 | + } | |
| 349 | + | |
| 350 | + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.gethId())) { | |
| 351 | + List<String> orgId = new ArrayList<>(); | |
| 352 | + orgId.add(riskPatientsQueryRequest.gethId()); | |
| 353 | + hospitalList.retainAll(orgId); | |
| 354 | + } else if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCprovinceId())) { | |
| 355 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
| 356 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
| 357 | + organizationQuery.setProvinceId(riskPatientsQueryRequest.getCprovinceId()); | |
| 358 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCcityId())) { | |
| 359 | + organizationQuery.setCityId(riskPatientsQueryRequest.getCcityId()); | |
| 360 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCareaId())) { | |
| 361 | + organizationQuery.setAreaId(riskPatientsQueryRequest.getCareaId()); | |
| 362 | + } | |
| 363 | + } | |
| 364 | + List<String> orgId = new ArrayList<>(); | |
| 365 | + List<Organization> organizations = organizationService.queryOrganization(organizationQuery); | |
| 366 | + if (CollectionUtils.isNotEmpty(organizations)) { | |
| 367 | + for (Organization org : organizations) { | |
| 368 | + if (null != org.getId()) { | |
| 369 | + orgId.add(org.getId() + ""); | |
| 370 | + } | |
| 371 | + } | |
| 372 | + } | |
| 373 | + hospitalList.retainAll(orgId); | |
| 374 | + } | |
| 375 | + patientsQuery.setHospitalList(hospitalList); | |
| 376 | + } else { | |
| 377 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
| 378 | + patientsQuery.setHospitalId(hospital); | |
| 379 | + } | |
| 308 | 380 | patientsQuery.setNeed(needPage); |
| 381 | + | |
| 382 | + patientsQuery.setQueryNo(riskPatientsQueryRequest.getQueryNo()); | |
| 383 | + | |
| 309 | 384 | return patientsQuery; |
| 310 | 385 | } |
| 311 | 386 | |
| 312 | 387 | |
| ... | ... | @@ -318,9 +393,9 @@ |
| 318 | 393 | * @param type 控制类型 1孕妇 3产妇 |
| 319 | 394 | * @return |
| 320 | 395 | */ |
| 321 | - public BaseResponse queryHighRisk(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, int type, Integer userId, String needPage) { | |
| 396 | + public BaseResponse queryHighRisk(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, int type, Integer userId, String needPage, boolean isRegion) { | |
| 322 | 397 | //组合请求 |
| 323 | - PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage); | |
| 398 | + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); | |
| 324 | 399 | |
| 325 | 400 | String hospital = autoMatchFacade.getHospitalId(userId); |
| 326 | 401 | //查询符合条件的孕妇 |
| ... | ... | @@ -385,7 +460,7 @@ |
| 385 | 460 | if (end > patientses.size()) { |
| 386 | 461 | end = patientses.size(); |
| 387 | 462 | } |
| 388 | - listFuture.add(threadPoolExecutor.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService,patientsService))); | |
| 463 | + listFuture.add(threadPoolExecutor.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService))); | |
| 389 | 464 | } |
| 390 | 465 | for (Future f : listFuture) { |
| 391 | 466 | try { |
| ... | ... | @@ -408,7 +483,7 @@ |
| 408 | 483 | if (end > patientses.size()) { |
| 409 | 484 | end = patientses.size(); |
| 410 | 485 | } |
| 411 | - listFuture.add(threadPoolExecutor.submit(new QuanPatientWorker(patientses.subList(i, end), usersService, hospital, antExService, basicConfigService,patientsService))); | |
| 486 | + listFuture.add(threadPoolExecutor.submit(new QuanPatientWorker(patientses.subList(i, end), usersService, hospital, antExService, basicConfigService, patientsService))); | |
| 412 | 487 | } |
| 413 | 488 | for (Future f : listFuture) { |
| 414 | 489 | try { |
| ... | ... | @@ -436,7 +511,7 @@ |
| 436 | 511 | if (end > patientses.size()) { |
| 437 | 512 | end = patientses.size(); |
| 438 | 513 | } |
| 439 | - listFuture.add(threadPoolExecutor.submit(new WorkHR(patientses.subList(i, end), usersService, hospital, basicConfigService, antExService,patientsService))); | |
| 514 | + listFuture.add(threadPoolExecutor.submit(new WorkHR(patientses.subList(i, end), usersService, hospital, basicConfigService, antExService, patientsService))); | |
| 440 | 515 | } |
| 441 | 516 | for (Future f : listFuture) { |
| 442 | 517 | try { |
| ... | ... | @@ -517,7 +592,7 @@ |
| 517 | 592 | if (patientsQueryRequest.getQueryType() != null) { |
| 518 | 593 | // 0 高危孕妇 1 全部孕妇 2全部产妇 |
| 519 | 594 | if (patientsQueryRequest.getQueryType() == 0) { |
| 520 | - listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1, userId, null); | |
| 595 | + listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1, userId, null, Boolean.FALSE); | |
| 521 | 596 | List list = listResponse.getData(); |
| 522 | 597 | for (Object obj : list) { |
| 523 | 598 | Map<String, Object> data = new HashMap<>(); |
| ... | ... | @@ -552,7 +627,7 @@ |
| 552 | 627 | cnames.put("phone", "联系方式"); |
| 553 | 628 | |
| 554 | 629 | } else if (patientsQueryRequest.getQueryType() == 1) { |
| 555 | - listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 1, userId, null); | |
| 630 | + listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 1, userId, null, Boolean.FALSE); | |
| 556 | 631 | List list = listResponse.getData(); |
| 557 | 632 | for (Object obj : list) { |
| 558 | 633 | Map<String, Object> data = new HashMap<>(); |
| ... | ... | @@ -585,7 +660,7 @@ |
| 585 | 660 | cnames.put("phone", "联系方式"); |
| 586 | 661 | cnames.put("serviceType", "服务类型"); |
| 587 | 662 | } else if (patientsQueryRequest.getQueryType() == 2) { |
| 588 | - listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 3, userId, null); | |
| 663 | + listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 3, userId, null, Boolean.FALSE); | |
| 589 | 664 | List list = listResponse.getData(); |
| 590 | 665 | for (Object obj : list) { |
| 591 | 666 | Map<String, Object> data = new HashMap<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
View file @
99a127d
| ... | ... | @@ -46,6 +46,8 @@ |
| 46 | 46 | private Map ysfyHistory ; |
| 47 | 47 | //本次妊娠情况 |
| 48 | 48 | private Map cestationInfo; |
| 49 | + //丈夫健康情况 | |
| 50 | + private Map hHealthInfo; | |
| 49 | 51 | |
| 50 | 52 | //孕次 |
| 51 | 53 | private Integer pregnancyTimes; |
| ... | ... | @@ -272,6 +274,14 @@ |
| 272 | 274 | this.cDueWeek = cDueWeek; |
| 273 | 275 | } |
| 274 | 276 | |
| 277 | + public Map gethHealthInfo() { | |
| 278 | + return hHealthInfo; | |
| 279 | + } | |
| 280 | + | |
| 281 | + public void sethHealthInfo(Map hHealthInfo) { | |
| 282 | + this.hHealthInfo = hHealthInfo; | |
| 283 | + } | |
| 284 | + | |
| 275 | 285 | public String getDueDate() { |
| 276 | 286 | return dueDate; |
| 277 | 287 | } |
| ... | ... | @@ -876,6 +886,9 @@ |
| 876 | 886 | antExChuModel.setCervical(cervical); |
| 877 | 887 | antExChuModel.setUterus(uterus); |
| 878 | 888 | antExChuModel.setFujian(fujian); |
| 889 | + if(null!=hHealthInfo){ | |
| 890 | + antExChuModel.sethHealthInfo(JsonUtil.obj2JsonString(hHealthInfo)); | |
| 891 | + } | |
| 879 | 892 | // antExChuModel.setMdxqsy(mdxqsy); |
| 880 | 893 | antExChuModel.setHivkt(hivkt); |
| 881 | 894 | antExChuModel.setYdfmw(JsonUtil.obj2JsonString(ydfmw)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
View file @
99a127d
| ... | ... | @@ -62,6 +62,16 @@ |
| 62 | 62 | |
| 63 | 63 | private String hospitalId; |
| 64 | 64 | |
| 65 | + private String isArea; | |
| 66 | + | |
| 67 | + public String getIsArea() { | |
| 68 | + return isArea; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void setIsArea(String isArea) { | |
| 72 | + this.isArea = isArea; | |
| 73 | + } | |
| 74 | + | |
| 65 | 75 | public String getDateRange() { |
| 66 | 76 | return dateRange; |
| 67 | 77 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasePageQueryRequest.java
View file @
99a127d
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java
View file @
99a127d
| ... | ... | @@ -61,8 +61,6 @@ |
| 61 | 61 | //体验会员 0非会员 1会员 |
| 62 | 62 | @FormParam |
| 63 | 63 | private Integer expVip; |
| 64 | - //建档时间 | |
| 65 | - private String buildTime; | |
| 66 | 64 | //最后一次医院定义的高危 |
| 67 | 65 | private String lastRhTime; |
| 68 | 66 | //本院最后一次产检时间 |
| ... | ... | @@ -74,6 +72,154 @@ |
| 74 | 72 | |
| 75 | 73 | // 0 高危孕妇 1 全部孕妇 2全部产妇 |
| 76 | 74 | private Integer queryType; |
| 75 | + | |
| 76 | + | |
| 77 | + //户籍id | |
| 78 | + private String provinceRegisterId; | |
| 79 | + private String cityRegisterId; | |
| 80 | + private String areaRegisterId; | |
| 81 | + | |
| 82 | + //居住地 | |
| 83 | + private String provinceId; | |
| 84 | + private String cityId; | |
| 85 | + private String areaId; | |
| 86 | + | |
| 87 | + //产检医院 | |
| 88 | + private String cprovinceId; | |
| 89 | + private String ccityId; | |
| 90 | + private String careaId; | |
| 91 | + // 医院id | |
| 92 | + private String hId; | |
| 93 | + | |
| 94 | + //建档时间 | |
| 95 | + private String buildTime; | |
| 96 | + | |
| 97 | + //下次预约时间 | |
| 98 | + private String nextCheckTime; | |
| 99 | + | |
| 100 | + //查询号 | |
| 101 | + private String queryNo; | |
| 102 | + | |
| 103 | + //建档人 | |
| 104 | + private String buildUserId; | |
| 105 | + | |
| 106 | + //产检医生 | |
| 107 | + private String lastCheckDoctorId; | |
| 108 | + | |
| 109 | + public String getQueryNo() { | |
| 110 | + return queryNo; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public void setQueryNo(String queryNo) { | |
| 114 | + this.queryNo = queryNo; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public String getProvinceRegisterId() { | |
| 118 | + return provinceRegisterId; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public void setProvinceRegisterId(String provinceRegisterId) { | |
| 122 | + this.provinceRegisterId = provinceRegisterId; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public String getCityRegisterId() { | |
| 126 | + return cityRegisterId; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public void setCityRegisterId(String cityRegisterId) { | |
| 130 | + this.cityRegisterId = cityRegisterId; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public String getAreaRegisterId() { | |
| 134 | + return areaRegisterId; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public void setAreaRegisterId(String areaRegisterId) { | |
| 138 | + this.areaRegisterId = areaRegisterId; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public String getProvinceId() { | |
| 142 | + return provinceId; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public void setProvinceId(String provinceId) { | |
| 146 | + this.provinceId = provinceId; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public String getCityId() { | |
| 150 | + return cityId; | |
| 151 | + } | |
| 152 | + | |
| 153 | + public void setCityId(String cityId) { | |
| 154 | + this.cityId = cityId; | |
| 155 | + } | |
| 156 | + | |
| 157 | + public String getAreaId() { | |
| 158 | + return areaId; | |
| 159 | + } | |
| 160 | + | |
| 161 | + public void setAreaId(String areaId) { | |
| 162 | + this.areaId = areaId; | |
| 163 | + } | |
| 164 | + | |
| 165 | + public String getCprovinceId() { | |
| 166 | + return cprovinceId; | |
| 167 | + } | |
| 168 | + | |
| 169 | + public void setCprovinceId(String cprovinceId) { | |
| 170 | + this.cprovinceId = cprovinceId; | |
| 171 | + } | |
| 172 | + | |
| 173 | + public String getCcityId() { | |
| 174 | + return ccityId; | |
| 175 | + } | |
| 176 | + | |
| 177 | + public void setCcityId(String ccityId) { | |
| 178 | + this.ccityId = ccityId; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public String getCareaId() { | |
| 182 | + return careaId; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public void setCareaId(String careaId) { | |
| 186 | + this.careaId = careaId; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public String gethId() { | |
| 190 | + return hId; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public void sethId(String hId) { | |
| 194 | + this.hId = hId; | |
| 195 | + } | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + public String getNextCheckTime() { | |
| 201 | + return nextCheckTime; | |
| 202 | + } | |
| 203 | + | |
| 204 | + public void setNextCheckTime(String nextCheckTime) { | |
| 205 | + this.nextCheckTime = nextCheckTime; | |
| 206 | + } | |
| 207 | + | |
| 208 | + public String getBuildUserId() { | |
| 209 | + return buildUserId; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public void setBuildUserId(String buildUserId) { | |
| 213 | + this.buildUserId = buildUserId; | |
| 214 | + } | |
| 215 | + | |
| 216 | + public String getLastCheckDoctorId() { | |
| 217 | + return lastCheckDoctorId; | |
| 218 | + } | |
| 219 | + | |
| 220 | + public void setLastCheckDoctorId(String lastCheckDoctorId) { | |
| 221 | + this.lastCheckDoctorId = lastCheckDoctorId; | |
| 222 | + } | |
| 77 | 223 | |
| 78 | 224 | public Integer getPostViewTimes() { |
| 79 | 225 | return postViewTimes; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java
View file @
99a127d
| ... | ... | @@ -63,6 +63,8 @@ |
| 63 | 63 | private Map fksxHistory; |
| 64 | 64 | // 叶酸服用 |
| 65 | 65 | private Map ysfyHistory; |
| 66 | + | |
| 67 | + private Map hHealthInfo; | |
| 66 | 68 | //孕次 |
| 67 | 69 | private Integer pregnancyTimes; |
| 68 | 70 | // 产次 |
| ... | ... | @@ -860,6 +862,14 @@ |
| 860 | 862 | this.parentId = parentId; |
| 861 | 863 | } |
| 862 | 864 | |
| 865 | + public Map gethHealthInfo() { | |
| 866 | + return hHealthInfo; | |
| 867 | + } | |
| 868 | + | |
| 869 | + public void sethHealthInfo(Map hHealthInfo) { | |
| 870 | + this.hHealthInfo = hHealthInfo; | |
| 871 | + } | |
| 872 | + | |
| 863 | 873 | public AntexChuResult convertToResult(AntExChuModel antExChuModel) { |
| 864 | 874 | if (null != antExChuModel) { |
| 865 | 875 | setId(antExChuModel.getId()); |
| ... | ... | @@ -870,6 +880,10 @@ |
| 870 | 880 | } |
| 871 | 881 | try { |
| 872 | 882 | setFamilyHistory(JsonUtil.str2Obj(antExChuModel.getFamilyHistory(), Map.class)); |
| 883 | + } catch (Exception e) { | |
| 884 | + } | |
| 885 | + try { | |
| 886 | + sethHealthInfo(JsonUtil.str2Obj(antExChuModel.gethHealthInfo(), Map.class)); | |
| 873 | 887 | } catch (Exception e) { |
| 874 | 888 | } |
| 875 | 889 | try { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyManageListResult.java
View file @
99a127d
| ... | ... | @@ -48,6 +48,26 @@ |
| 48 | 48 | |
| 49 | 49 | private String buildTime; |
| 50 | 50 | |
| 51 | + private String hospitalName; | |
| 52 | + | |
| 53 | + private String completeAddress; | |
| 54 | + | |
| 55 | + public String getCompleteAddress() { | |
| 56 | + return completeAddress; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void setCompleteAddress(String completeAddress) { | |
| 60 | + this.completeAddress = completeAddress; | |
| 61 | + } | |
| 62 | + | |
| 63 | + public String getHospitalName() { | |
| 64 | + return hospitalName; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void setHospitalName(String hospitalName) { | |
| 68 | + this.hospitalName = hospitalName; | |
| 69 | + } | |
| 70 | + | |
| 51 | 71 | public String getBuildTime() { |
| 52 | 72 | return buildTime; |
| 53 | 73 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BookBuildManagerResult.java
View file @
99a127d
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IBasicResultConvert; | |
| 4 | +import com.lyms.platform.common.enums.ServiceTypeEnums; | |
| 5 | +import com.lyms.platform.common.utils.DateUtil; | |
| 6 | +import com.lyms.platform.pojo.BasicConfig; | |
| 7 | +import com.lyms.platform.pojo.Patients; | |
| 8 | + | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * | |
| 13 | + * 建档管理返回对象 | |
| 14 | + * | |
| 15 | + * Created by Administrator on 2016/11/9 0009. | |
| 16 | + */ | |
| 17 | +public class BookBuildManagerResult implements IBasicResultConvert<BookBuildManagerResult,Patients> { | |
| 18 | + | |
| 19 | + private String id; | |
| 20 | + private String pid; | |
| 21 | + //条码 | |
| 22 | + private String barCode; | |
| 23 | + //姓名 | |
| 24 | + private String name; | |
| 25 | + //年龄 | |
| 26 | + private String age; | |
| 27 | + //联系电话 | |
| 28 | + private String phone; | |
| 29 | + //证件号码 | |
| 30 | + private String cardNo; | |
| 31 | + //地址 | |
| 32 | + private String addr; | |
| 33 | + //丈夫名字 | |
| 34 | + private String hName; | |
| 35 | + //丈夫地址 | |
| 36 | + private String hAddr; | |
| 37 | + //建档时间 | |
| 38 | + private String buildTime; | |
| 39 | + //建档医生 | |
| 40 | + private Map buildDoctor; | |
| 41 | + //服务类型 | |
| 42 | + private String serviceType; | |
| 43 | + | |
| 44 | + public String getBarCode() { | |
| 45 | + return barCode; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public void setBarCode(String barCode) { | |
| 49 | + this.barCode = barCode; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public String getName() { | |
| 53 | + return name; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public void setName(String name) { | |
| 57 | + this.name = name; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public String getAge() { | |
| 61 | + return age; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void setAge(String age) { | |
| 65 | + this.age = age; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public String getPhone() { | |
| 69 | + return phone; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void setPhone(String phone) { | |
| 73 | + this.phone = phone; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public String getCardNo() { | |
| 77 | + return cardNo; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public String getId() { | |
| 81 | + return id; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setId(String id) { | |
| 85 | + this.id = id; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public String getPid() { | |
| 89 | + return pid; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setPid(String pid) { | |
| 93 | + this.pid = pid; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public void setCardNo(String cardNo) { | |
| 97 | + this.cardNo = cardNo; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public String getAddr() { | |
| 101 | + return addr; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public void setAddr(String addr) { | |
| 105 | + this.addr = addr; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public String gethName() { | |
| 109 | + return hName; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void sethName(String hName) { | |
| 113 | + this.hName = hName; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public String gethAddr() { | |
| 117 | + return hAddr; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public void sethAddr(String hAddr) { | |
| 121 | + this.hAddr = hAddr; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public String getBuildTime() { | |
| 125 | + return buildTime; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public void setBuildTime(String buildTime) { | |
| 129 | + this.buildTime = buildTime; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public Map getBuildDoctor() { | |
| 133 | + return buildDoctor; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public void setBuildDoctor(Map buildDoctor) { | |
| 137 | + this.buildDoctor = buildDoctor; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public String getServiceType() { | |
| 141 | + return serviceType; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public void setServiceType(String serviceType) { | |
| 145 | + this.serviceType = serviceType; | |
| 146 | + } | |
| 147 | + | |
| 148 | + @Override | |
| 149 | + public BookBuildManagerResult convertToResult(Patients destModel) { | |
| 150 | + /* //条码 | |
| 151 | + private String barCode; | |
| 152 | + //姓名 | |
| 153 | + private String name; | |
| 154 | + //年龄 | |
| 155 | + private String age; | |
| 156 | + //联系电话 | |
| 157 | + private String phone; | |
| 158 | + //证件号码 | |
| 159 | + private String cardNo; | |
| 160 | + //地址 | |
| 161 | + private String addr; | |
| 162 | + //丈夫名字 | |
| 163 | + private String hName; | |
| 164 | + //丈夫地址 | |
| 165 | + private String hAddr; | |
| 166 | + //建档时间 | |
| 167 | + private String buildTime; | |
| 168 | + //建档医生 | |
| 169 | + private Map buildDoctor; | |
| 170 | + //服务类型 | |
| 171 | + private String serviceType;*/ | |
| 172 | + setId(destModel.getId()); | |
| 173 | + setPid(destModel.getPid()); | |
| 174 | + setName(destModel.getUsername()); | |
| 175 | + sethName(destModel.getHusbandName()); | |
| 176 | + setAge(destModel.getAge() + ""); | |
| 177 | + setPhone(destModel.getPhone()); | |
| 178 | + setCardNo(destModel.getCardNo()); | |
| 179 | + setBuildTime(DateUtil.getyyyy_MM_dd(destModel.getBookbuildingDate())); | |
| 180 | + setServiceType(ServiceTypeEnums.getTitleById(destModel.getServiceType())); | |
| 181 | + return null; | |
| 182 | + } | |
| 183 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverManagerResult.java
View file @
99a127d
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * | |
| 5 | + * 分娩管理返回 | |
| 6 | + * | |
| 7 | + * Created by Administrator on 2016/11/22 0022. | |
| 8 | + */ | |
| 9 | +public class MatDeliverManagerResult { | |
| 10 | + //分娩日期 | |
| 11 | + private String fmDate; | |
| 12 | + private String id; | |
| 13 | + private String pid; | |
| 14 | + //证件号 | |
| 15 | + private String cardNo; | |
| 16 | + //名字 | |
| 17 | + private String name; | |
| 18 | + //年龄 | |
| 19 | + private String age; | |
| 20 | + //分娩孕周 | |
| 21 | + private String dueWeek; | |
| 22 | + //分娩方式 | |
| 23 | + private String dueType; | |
| 24 | + //产妇情况 | |
| 25 | + private String pInfo; | |
| 26 | + //胎数 | |
| 27 | + private String tireNumber; | |
| 28 | + //活产数 | |
| 29 | + private String liveNum; | |
| 30 | + //接生医生 | |
| 31 | + private String prodDoctor; | |
| 32 | + //联系方式 | |
| 33 | + private String phone; | |
| 34 | +} |