Commit 5bd00c8530b74320e07167d8c1ad84237e6a2ea1
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 10 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IFolicAcidDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/FolicAcidDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/FolicAcidService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/FolicAcid.java
- platform-dal/src/main/java/com/lyms/platform/query/FolicAcidQuery.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/facade/PremaritalCheckupFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PremaritalCheckupHistoryResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IFolicAcidDao.java
View file @
5bd00c8
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.pojo.FolicAcid; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by Administrator on 2016/12/1 0001. | |
| 10 | + */ | |
| 11 | +public interface IFolicAcidDao { | |
| 12 | + | |
| 13 | + public FolicAcid addFolicAcid(FolicAcid obj); | |
| 14 | + | |
| 15 | + public void updateFolicAcid(FolicAcid obj, String id); | |
| 16 | + | |
| 17 | + public void deleteFolicAcid(String id); | |
| 18 | + | |
| 19 | + public FolicAcid getFolicAcid(String id); | |
| 20 | + | |
| 21 | + public int queryFolicAcidCount(MongoQuery query); | |
| 22 | + | |
| 23 | + public List<FolicAcid> queryFolicAcid(MongoQuery query); | |
| 24 | + | |
| 25 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/FolicAcidDaoImpl.java
View file @
5bd00c8
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IFolicAcidDao; | |
| 4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | +import com.lyms.platform.pojo.FolicAcid; | |
| 9 | +import org.bson.types.ObjectId; | |
| 10 | +import org.springframework.stereotype.Repository; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * Created by Administrator on 2016/12/1 0001. | |
| 16 | + */ | |
| 17 | +@Repository("folicAcidDao") | |
| 18 | +public class FolicAcidDaoImpl extends BaseMongoDAOImpl<FolicAcid> implements IFolicAcidDao{ | |
| 19 | + @Override | |
| 20 | + public FolicAcid addFolicAcid(FolicAcid obj) { | |
| 21 | + return save(obj); | |
| 22 | + } | |
| 23 | + | |
| 24 | + @Override | |
| 25 | + public void updateFolicAcid(FolicAcid obj, String id) { | |
| 26 | + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), obj); | |
| 27 | + } | |
| 28 | + | |
| 29 | + @Override | |
| 30 | + public void deleteFolicAcid(String id) { | |
| 31 | + boolean check = ObjectId.isValid(id); | |
| 32 | + if (check) { | |
| 33 | + delete(new MongoQuery(new MongoCondition("id", new ObjectId(id), MongoOper.IS)).convertToMongoQuery()); | |
| 34 | + } | |
| 35 | + } | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public FolicAcid getFolicAcid(String id) { | |
| 39 | + return findById(id); | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public int queryFolicAcidCount(MongoQuery query) { | |
| 44 | + return (int) count(query.convertToMongoQuery()); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public List<FolicAcid> queryFolicAcid(MongoQuery query) { | |
| 49 | + return find(query.convertToMongoQuery()); | |
| 50 | + } | |
| 51 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/FolicAcidService.java
View file @
5bd00c8
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IFolicAcidDao; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 5 | +import com.lyms.platform.common.utils.StringUtils; | |
| 6 | +import com.lyms.platform.pojo.FolicAcid; | |
| 7 | +import com.lyms.platform.query.FolicAcidQuery; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.data.domain.Sort; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * Created by Administrator on 2016/12/1 0001. | |
| 16 | + */ | |
| 17 | +@Service("folicAcidService") | |
| 18 | +public class FolicAcidService { | |
| 19 | + | |
| 20 | + @Autowired | |
| 21 | + private IFolicAcidDao folicAcidDao; | |
| 22 | + | |
| 23 | + public FolicAcid addFolicAcid(FolicAcid obj){ | |
| 24 | + return folicAcidDao.addFolicAcid(obj); | |
| 25 | + } | |
| 26 | + | |
| 27 | + public void updateFolicAcid(FolicAcid obj, String id){ | |
| 28 | + folicAcidDao.updateFolicAcid(obj, id); | |
| 29 | + } | |
| 30 | + | |
| 31 | + public FolicAcid getFolicAcid(String id){ | |
| 32 | + return folicAcidDao.getFolicAcid(id); | |
| 33 | + } | |
| 34 | + | |
| 35 | + public int queryFolicAcidCount(MongoQuery query){ | |
| 36 | + return folicAcidDao.queryFolicAcidCount(query); | |
| 37 | + } | |
| 38 | + | |
| 39 | + public List<FolicAcid> queryFolicAcid(FolicAcidQuery query){ | |
| 40 | + MongoQuery mongoQuery = query.convertToQuery(); | |
| 41 | + if (StringUtils.isNotEmpty(query.getNeed())) { | |
| 42 | + query.mysqlBuild(folicAcidDao.queryFolicAcidCount(mongoQuery)); | |
| 43 | + mongoQuery.start(query.getOffset()).end(query.getLimit()); | |
| 44 | + } | |
| 45 | + return folicAcidDao.queryFolicAcid(mongoQuery.addOrder(Sort.Direction.DESC, "created")); | |
| 46 | + } | |
| 47 | + | |
| 48 | + public List<FolicAcid> queryFolicAcidWithSort(FolicAcidQuery query,String sortkey,Sort.Direction sort){ | |
| 49 | + MongoQuery mongoQuery = query.convertToQuery(); | |
| 50 | + return folicAcidDao.queryFolicAcid(mongoQuery.addOrder(sort, sortkey)); | |
| 51 | + } | |
| 52 | + | |
| 53 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/FolicAcid.java
View file @
5bd00c8
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 4 | + | |
| 5 | +import java.util.Date; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 叶酸发放 | |
| 9 | + * | |
| 10 | + * Created by Administrator on 2016/12/1 0001. | |
| 11 | + */ | |
| 12 | +@Document(collection="lyms_folic_acid") | |
| 13 | +public class FolicAcid { | |
| 14 | + | |
| 15 | + private String id; | |
| 16 | + //妇女ID | |
| 17 | + private String parentId; | |
| 18 | + /* 领取信息 */ | |
| 19 | + //高危因素 | |
| 20 | + private String riskFactors; | |
| 21 | + //领取数量 | |
| 22 | + private String drawCount; | |
| 23 | + //孕期类型 | |
| 24 | + private Integer pregnancyType; | |
| 25 | + //孕周 | |
| 26 | + private String pregnancyWeeks; | |
| 27 | + //高危因素 | |
| 28 | + private String hightRisk; | |
| 29 | + | |
| 30 | + /* 院内信息 */ | |
| 31 | + //发放单位 | |
| 32 | + private String hospitalId; | |
| 33 | + //发放人 | |
| 34 | + private String operator; | |
| 35 | + //领取时间 | |
| 36 | + private String drawTime; | |
| 37 | + //创建时间 | |
| 38 | + private Date created; | |
| 39 | + //修改时间 | |
| 40 | + private Date modified; | |
| 41 | + //创建人ID | |
| 42 | + private Integer publishId; | |
| 43 | + //有效标识 | |
| 44 | + private Integer yn; | |
| 45 | + | |
| 46 | + public Date getCreated() { | |
| 47 | + return created; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setCreated(Date created) { | |
| 51 | + this.created = created; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public Date getModified() { | |
| 55 | + return modified; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setModified(Date modified) { | |
| 59 | + this.modified = modified; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public Integer getPublishId() { | |
| 63 | + return publishId; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setPublishId(Integer publishId) { | |
| 67 | + this.publishId = publishId; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public Integer getYn() { | |
| 71 | + return yn; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setYn(Integer yn) { | |
| 75 | + this.yn = yn; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public String getId() { | |
| 79 | + return id; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void setId(String id) { | |
| 83 | + this.id = id; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public String getParentId() { | |
| 87 | + return parentId; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void setParentId(String parentId) { | |
| 91 | + this.parentId = parentId; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public String getRiskFactors() { | |
| 95 | + return riskFactors; | |
| 96 | + } | |
| 97 | + | |
| 98 | + public void setRiskFactors(String riskFactors) { | |
| 99 | + this.riskFactors = riskFactors; | |
| 100 | + } | |
| 101 | + | |
| 102 | + public String getDrawCount() { | |
| 103 | + return drawCount; | |
| 104 | + } | |
| 105 | + | |
| 106 | + public void setDrawCount(String drawCount) { | |
| 107 | + this.drawCount = drawCount; | |
| 108 | + } | |
| 109 | + | |
| 110 | + public Integer getPregnancyType() { | |
| 111 | + return pregnancyType; | |
| 112 | + } | |
| 113 | + | |
| 114 | + public void setPregnancyType(Integer pregnancyType) { | |
| 115 | + this.pregnancyType = pregnancyType; | |
| 116 | + } | |
| 117 | + | |
| 118 | + public String getPregnancyWeeks() { | |
| 119 | + return pregnancyWeeks; | |
| 120 | + } | |
| 121 | + | |
| 122 | + public void setPregnancyWeeks(String pregnancyWeeks) { | |
| 123 | + this.pregnancyWeeks = pregnancyWeeks; | |
| 124 | + } | |
| 125 | + | |
| 126 | + public String getHospitalId() { | |
| 127 | + return hospitalId; | |
| 128 | + } | |
| 129 | + | |
| 130 | + public void setHospitalId(String hospitalId) { | |
| 131 | + this.hospitalId = hospitalId; | |
| 132 | + } | |
| 133 | + | |
| 134 | + public String getOperator() { | |
| 135 | + return operator; | |
| 136 | + } | |
| 137 | + | |
| 138 | + public void setOperator(String operator) { | |
| 139 | + this.operator = operator; | |
| 140 | + } | |
| 141 | + | |
| 142 | + public String getDrawTime() { | |
| 143 | + return drawTime; | |
| 144 | + } | |
| 145 | + | |
| 146 | + public void setDrawTime(String drawTime) { | |
| 147 | + this.drawTime = drawTime; | |
| 148 | + } | |
| 149 | +} |
platform-dal/src/main/java/com/lyms/platform/query/FolicAcidQuery.java
View file @
5bd00c8
| 1 | +package com.lyms.platform.query; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
| 4 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * Created by Administrator on 2016/12/1 0001. | |
| 9 | + */ | |
| 10 | +public class FolicAcidQuery extends BaseQuery implements IConvertToNativeQuery { | |
| 11 | + | |
| 12 | + private String id; | |
| 13 | + //妇女ID | |
| 14 | + private String parentId; | |
| 15 | + /* 领取信息 */ | |
| 16 | + //领取次数 | |
| 17 | + private String drawNum; | |
| 18 | + //领取数量 | |
| 19 | + private String drawCount; | |
| 20 | + //孕期类型 | |
| 21 | + private Integer pregnancyType; | |
| 22 | + //孕周 | |
| 23 | + private String pregnancyWeeks; | |
| 24 | + /* 院内信息 */ | |
| 25 | + //发放单位 | |
| 26 | + private String hospitalId; | |
| 27 | + //发放人 | |
| 28 | + private String operator; | |
| 29 | + //领取时间 | |
| 30 | + private String drawTime; | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public MongoQuery convertToQuery() { | |
| 34 | + return null; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public String getId() { | |
| 38 | + return id; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setId(String id) { | |
| 42 | + this.id = id; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getParentId() { | |
| 46 | + return parentId; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setParentId(String parentId) { | |
| 50 | + this.parentId = parentId; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public String getDrawNum() { | |
| 54 | + return drawNum; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setDrawNum(String drawNum) { | |
| 58 | + this.drawNum = drawNum; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public String getDrawCount() { | |
| 62 | + return drawCount; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setDrawCount(String drawCount) { | |
| 66 | + this.drawCount = drawCount; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public Integer getPregnancyType() { | |
| 70 | + return pregnancyType; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setPregnancyType(Integer pregnancyType) { | |
| 74 | + this.pregnancyType = pregnancyType; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public String getPregnancyWeeks() { | |
| 78 | + return pregnancyWeeks; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setPregnancyWeeks(String pregnancyWeeks) { | |
| 82 | + this.pregnancyWeeks = pregnancyWeeks; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public String getHospitalId() { | |
| 86 | + return hospitalId; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void setHospitalId(String hospitalId) { | |
| 90 | + this.hospitalId = hospitalId; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public String getOperator() { | |
| 94 | + return operator; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public void setOperator(String operator) { | |
| 98 | + this.operator = operator; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public String getDrawTime() { | |
| 102 | + return drawTime; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public void setDrawTime(String drawTime) { | |
| 106 | + this.drawTime = drawTime; | |
| 107 | + } | |
| 108 | + | |
| 109 | + | |
| 110 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
5bd00c8
| ... | ... | @@ -13,6 +13,10 @@ |
| 13 | 13 | import com.lyms.platform.operate.web.facade.PatientFacade; |
| 14 | 14 | import com.lyms.platform.operate.web.facade.PuerperaManagerFacade; |
| 15 | 15 | import com.lyms.platform.operate.web.request.*; |
| 16 | +import com.lyms.platform.operate.web.result.BasicConfigResult; | |
| 17 | +import com.lyms.platform.operate.web.utils.HiskCountTask; | |
| 18 | +import com.lyms.platform.pojo.BasicConfig; | |
| 19 | +import org.apache.commons.collections.CollectionUtils; | |
| 16 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 17 | 21 | import org.springframework.stereotype.Controller; |
| 18 | 22 | import org.springframework.web.bind.annotation.*; |
| ... | ... | @@ -24,6 +28,8 @@ |
| 24 | 28 | import java.util.HashMap; |
| 25 | 29 | import java.util.List; |
| 26 | 30 | import java.util.Map; |
| 31 | +import java.util.concurrent.Callable; | |
| 32 | +import java.util.concurrent.Future; | |
| 27 | 33 | |
| 28 | 34 | /** |
| 29 | 35 | * 孕产妇管理接口 |
| ... | ... | @@ -107,7 +113,7 @@ |
| 107 | 113 | @TokenRequired |
| 108 | 114 | public BaseResponse queryHighRiskPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest,HttpServletRequest request) { |
| 109 | 115 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 110 | - return patientFacade.queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1, loginState.getId(), "true",Boolean.FALSE); | |
| 116 | + return patientFacade.queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1, loginState.getId(), "true", Boolean.FALSE); | |
| 111 | 117 | } |
| 112 | 118 | /** |
| 113 | 119 | *全部孕妇管理 |
| ... | ... | @@ -167,6 +173,32 @@ |
| 167 | 173 | map.put("organizations", antenatalExaminationFacade.convert()); |
| 168 | 174 | return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 169 | 175 | } |
| 176 | + | |
| 177 | + @RequestMapping(value = "/apatients/rLevel", method = RequestMethod.GET) | |
| 178 | + @ResponseBody | |
| 179 | + public BaseResponse rLevle(){ | |
| 180 | + Map<String, Object> map = new HashMap<>(); | |
| 181 | + | |
| 182 | + List<BasicConfigResult> results = new ArrayList<>(); | |
| 183 | + | |
| 184 | + List<BasicConfigResult> riskLevelConfig = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.HIGH_RISK_ID); | |
| 185 | + if (CollectionUtils.isNotEmpty(riskLevelConfig)) | |
| 186 | + { | |
| 187 | + for(BasicConfigResult levelConfig : riskLevelConfig) | |
| 188 | + { | |
| 189 | + //健康 | |
| 190 | + if ("e637b361-99cf-41eb-84f2-f0dab596e928".equals(levelConfig.getId())) | |
| 191 | + { | |
| 192 | + continue; | |
| 193 | + } | |
| 194 | + results.add(levelConfig); | |
| 195 | + | |
| 196 | + } | |
| 197 | + } | |
| 198 | + map.put("gwfz", results); | |
| 199 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 200 | + } | |
| 201 | + | |
| 170 | 202 | /** |
| 171 | 203 | * 获取产妇基本信息 |
| 172 | 204 | * |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PremaritalCheckupFacade.java
View file @
5bd00c8
| ... | ... | @@ -13,7 +13,10 @@ |
| 13 | 13 | import com.lyms.platform.common.utils.DateUtil; |
| 14 | 14 | import com.lyms.platform.operate.web.request.PremaritalCheckupAddRequest; |
| 15 | 15 | import com.lyms.platform.operate.web.request.PremaritalCheckupQueryRequest; |
| 16 | +import com.lyms.platform.operate.web.result.PremaritalCheckupHistoryResult; | |
| 16 | 17 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
| 18 | +import com.lyms.platform.permission.model.Organization; | |
| 19 | +import com.lyms.platform.permission.service.OrganizationService; | |
| 17 | 20 | import com.lyms.platform.pojo.PremaritalCheckup; |
| 18 | 21 | import com.lyms.platform.pojo.ResidentsArchiveModel; |
| 19 | 22 | import com.lyms.platform.query.PremaritalCheckupQuery; |
| 20 | 23 | |
| 21 | 24 | |
| 22 | 25 | |
| 23 | 26 | |
| 24 | 27 | |
| 25 | 28 | |
| 26 | 29 | |
| 27 | 30 | |
| 28 | 31 | |
| 29 | 32 | |
| 30 | 33 | |
| 31 | 34 | |
| 32 | 35 | |
| 33 | 36 | |
| 34 | 37 | |
| 35 | 38 | |
| 36 | 39 | |
| 37 | 40 | |
| ... | ... | @@ -40,78 +43,91 @@ |
| 40 | 43 | private ResidentsArchiveService residentsArchiveService; |
| 41 | 44 | @Autowired |
| 42 | 45 | private BasicConfigService basicConfigService; |
| 46 | + @Autowired | |
| 47 | + private OrganizationService organizationService; | |
| 43 | 48 | |
| 44 | - | |
| 45 | 49 | /** |
| 46 | 50 | * 查询单个(男/女)婚前检查 |
| 47 | 51 | * @param requestParam |
| 48 | 52 | * @param id |
| 49 | 53 | * @return |
| 50 | 54 | */ |
| 51 | - public BaseObjectResponse getPremaritalCheckup(PremaritalCheckupQueryRequest requestParam,Integer id){ | |
| 55 | + public BaseObjectResponse getPremaritalCheckup(PremaritalCheckupQueryRequest requestParam,Integer id) { | |
| 52 | 56 | |
| 53 | - PremaritalCheckup result = new PremaritalCheckup(); | |
| 57 | + PremaritalCheckup result = null; | |
| 58 | + Map<String, Object> resultMap = new HashMap<>(); | |
| 59 | + Map<String, Object> archiveMap = new HashMap<>(); | |
| 54 | 60 | |
| 55 | - Map<String,Object> resultMap = new HashMap<>(); | |
| 56 | - Map<String,Object> archiveMap = new HashMap<>(); | |
| 61 | + ResidentsArchiveModel archiveModel = null; | |
| 57 | 62 | |
| 58 | - ResidentsArchiveModel archiveModel = new ResidentsArchiveModel(); | |
| 59 | - | |
| 60 | 63 | //婚检ID不为空 |
| 61 | - if (StringUtils.isNotEmpty(requestParam.getId())){ | |
| 64 | + if (StringUtils.isNotEmpty(requestParam.getId())) { | |
| 62 | 65 | //婚检数据 |
| 63 | 66 | result = premaritalCheckupService.getPremaritalCheckup(requestParam.getId()); |
| 64 | - if (StringUtils.isNotEmpty(result.getParentId())){ | |
| 67 | + if (StringUtils.isNotEmpty(result.getParentId())) { | |
| 65 | 68 | //居民数据 |
| 66 | 69 | archiveModel = residentsArchiveService.getResident(result.getParentId()); |
| 67 | 70 | } |
| 68 | - }else { | |
| 71 | + } else { | |
| 69 | 72 | |
| 70 | 73 | ResidentsArchiveQuery archiveQuery = new ResidentsArchiveQuery(); |
| 71 | 74 | |
| 72 | 75 | //当婚检ID为空,用证件号或者就诊卡去查询居民建档的信息 |
| 73 | - if (StringUtils.isNotEmpty(requestParam.getCertificateNum())){ | |
| 76 | + if (StringUtils.isNotEmpty(requestParam.getCertificateNum())) { | |
| 74 | 77 | archiveQuery.setYn(YnEnums.YES.getId()); |
| 75 | 78 | archiveQuery.setHospitalId(requestParam.getHospitalId()); |
| 76 | 79 | archiveQuery.setCertificateNum(requestParam.getCertificateNum()); |
| 77 | 80 | List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(archiveQuery); |
| 78 | - if (CollectionUtils.isNotEmpty(modelList)){ | |
| 81 | + if (CollectionUtils.isNotEmpty(modelList)) { | |
| 79 | 82 | archiveModel = modelList.get(0); |
| 80 | 83 | } |
| 81 | - }else if (StringUtils.isNotEmpty(requestParam.getVcCardNo())){ | |
| 84 | + } else if (StringUtils.isNotEmpty(requestParam.getVcCardNo())) { | |
| 82 | 85 | archiveQuery.setYn(YnEnums.YES.getId()); |
| 83 | 86 | archiveQuery.setHospitalId(requestParam.getHospitalId()); |
| 84 | 87 | archiveQuery.setVcCardNo(requestParam.getVcCardNo()); |
| 85 | - List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(archiveQuery); | |
| 86 | - if (CollectionUtils.isNotEmpty(modelList)){ | |
| 88 | + List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(archiveQuery); | |
| 89 | + if (CollectionUtils.isNotEmpty(modelList)) { | |
| 87 | 90 | archiveModel = modelList.get(0); |
| 88 | 91 | } |
| 89 | 92 | } |
| 90 | 93 | |
| 91 | - if (archiveModel!=null){ | |
| 94 | + if (archiveModel != null) { | |
| 92 | 95 | PremaritalCheckupQuery query = new PremaritalCheckupQuery(); |
| 93 | 96 | query.setYn(YnEnums.YES.getId()); |
| 94 | 97 | query.setHospitalId(requestParam.getHospitalId()); |
| 95 | 98 | query.setParentId(archiveModel.getId()); |
| 96 | 99 | List<PremaritalCheckup> checkupList = premaritalCheckupService.queryPremaritalCheckup(query); |
| 97 | - if (CollectionUtils.isNotEmpty(checkupList)){ | |
| 100 | + if (CollectionUtils.isNotEmpty(checkupList)) { | |
| 98 | 101 | result = checkupList.get(0); |
| 102 | + //历史婚检记录 | |
| 103 | + for (PremaritalCheckup data : checkupList){ | |
| 104 | + PremaritalCheckupHistoryResult historyResult = new PremaritalCheckupHistoryResult(); | |
| 105 | + historyResult.setId(data.getId()); | |
| 106 | + historyResult.setPremaritalUpTime(data.getPremaritalUpTime()); | |
| 107 | + Organization org = organizationService.getOrganization(Integer.valueOf(data.getHospitalId())); | |
| 108 | + if (org!=null){ | |
| 109 | + historyResult.setPremaritalUpHospital(org.getName()); | |
| 110 | + historyResult.setHospitalId(data.getHospitalId()); | |
| 111 | + } | |
| 112 | + resultMap.put("premaritalCheckupHistory",historyResult); | |
| 113 | + } | |
| 99 | 114 | } |
| 100 | 115 | } |
| 101 | 116 | } |
| 102 | - archiveMap.put("certificateNum",archiveModel.getCertificateNum()); | |
| 103 | - archiveMap.put("certificateTypeId",archiveModel.getCertificateTypeId()); | |
| 104 | - archiveMap.put("username",archiveModel.getUsername()); | |
| 117 | + | |
| 118 | + archiveMap.put("certificateNum", archiveModel.getCertificateNum()); | |
| 119 | + archiveMap.put("certificateTypeId", archiveModel.getCertificateTypeId()); | |
| 120 | + archiveMap.put("username", archiveModel.getUsername()); | |
| 105 | 121 | archiveMap.put("age", archiveModel.getAge()); |
| 106 | - archiveMap.put("sex",archiveModel.getSex()); | |
| 107 | - archiveMap.put("birthday",getBirthday(archiveModel.getBirthday())); | |
| 108 | - archiveMap.put("phone",archiveModel.getPhone()); | |
| 109 | - archiveMap.put("residence", CommonsHelper.getResidence(archiveModel.getProvinceId(),archiveModel.getCityId(), | |
| 110 | - archiveModel.getAreaId(),archiveModel.getStreetId(),archiveModel.getAddress(),basicConfigService)); | |
| 111 | - archiveMap.put("workUnit",archiveModel.getWorkUnit()); | |
| 122 | + archiveMap.put("sex", archiveModel.getSex()); | |
| 123 | + archiveMap.put("birthday", getBirthday(archiveModel.getBirthday())); | |
| 124 | + archiveMap.put("phone", archiveModel.getPhone()); | |
| 125 | + archiveMap.put("residence", CommonsHelper.getResidence(archiveModel.getProvinceId(), archiveModel.getCityId(), | |
| 126 | + archiveModel.getAreaId(), archiveModel.getStreetId(), archiveModel.getAddress(), basicConfigService)); | |
| 127 | + archiveMap.put("workUnit", archiveModel.getWorkUnit()); | |
| 112 | 128 | |
| 113 | - resultMap.put("archiveResult",archiveMap); | |
| 114 | - resultMap.put("checkupResult",result); | |
| 129 | + resultMap.put("archiveResult", archiveMap); | |
| 130 | + resultMap.put("checkupResult", result); | |
| 115 | 131 | |
| 116 | 132 | BaseObjectResponse response = new BaseObjectResponse(); |
| 117 | 133 | response.setData(resultMap); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
5bd00c8
| ... | ... | @@ -430,6 +430,7 @@ |
| 430 | 430 | if (CollectionUtils.isNotEmpty(modelList)){ |
| 431 | 431 | for (ResidentsArchiveModel model : modelList){ |
| 432 | 432 | Map<String,Object> map = new HashMap<>(); |
| 433 | + map.put("id",model.getId()); | |
| 433 | 434 | map.put("username",model.getUsername()); |
| 434 | 435 | map.put("certificateNum",model.getCertificateNum()); |
| 435 | 436 | map.put("age",model.getAge()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
5bd00c8
| ... | ... | @@ -104,6 +104,7 @@ |
| 104 | 104 | basicConfigQuery.setYn(YnEnums.YES.getId()); |
| 105 | 105 | basicConfigQuery.setParentId(SystemConfig.HIGH_RISK_ID); |
| 106 | 106 | basicConfigQuery.setEnable(1); |
| 107 | + basicConfigQuery.setId(riskPatientsQueryRequest.getrLevel()); | |
| 107 | 108 | |
| 108 | 109 | List<Future> futures = new ArrayList<>(); |
| 109 | 110 | List<BasicConfig> riskLevelConfig = basicConfigService.queryBasicConfig(basicConfigQuery); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PremaritalCheckupHistoryResult.java
View file @
5bd00c8
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * Created by Administrator on 2016/12/5 0005. | |
| 5 | + */ | |
| 6 | +public class PremaritalCheckupHistoryResult { | |
| 7 | + | |
| 8 | + //建档ID | |
| 9 | + private String id; | |
| 10 | + //建档时间 | |
| 11 | + private String premaritalUpTime; | |
| 12 | + //建档医院 | |
| 13 | + private String premaritalUpHospital; | |
| 14 | + //医院ID | |
| 15 | + private String hospitalId; | |
| 16 | + | |
| 17 | + public String getId() { | |
| 18 | + return id; | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void setId(String id) { | |
| 22 | + this.id = id; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public String getPremaritalUpHospital() { | |
| 26 | + return premaritalUpHospital; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setPremaritalUpHospital(String premaritalUpHospital) { | |
| 30 | + this.premaritalUpHospital = premaritalUpHospital; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public String getPremaritalUpTime() { | |
| 34 | + return premaritalUpTime; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void setPremaritalUpTime(String premaritalUpTime) { | |
| 38 | + this.premaritalUpTime = premaritalUpTime; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public String getHospitalId() { | |
| 42 | + return hospitalId; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setHospitalId(String hospitalId) { | |
| 46 | + this.hospitalId = hospitalId; | |
| 47 | + } | |
| 48 | +} |