Commit 7657f371daa0763c302c1295bc07cf1cdafe3b6f

Authored by hujiaqi

Merge remote-tracking branch 'origin/master'

Showing 19 changed files

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IFolicAcidDao.java View file @ 7657f37
  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 @ 7657f37
  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/AntExRecordService.java View file @ 7657f37
... ... @@ -228,7 +228,7 @@
228 228 antExRecordQuery.mysqlBuild(antExRecordDao.count(query));
229 229 query.start(antExRecordQuery.getOffset()).end(antExRecordQuery.getLimit());
230 230 }
231   - return antExRecordDao.queryRecord(query);
  231 + return antExRecordDao.queryRecord(query.addOrder(Sort.Direction.DESC,"modified"));
232 232 }
233 233  
234 234  
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/FolicAcidService.java View file @ 7657f37
  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 @ 7657f37
  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 @ 7657f37
  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-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 7657f37
... ... @@ -9,6 +9,7 @@
9 9 import org.apache.commons.collections.CollectionUtils;
10 10 import org.springframework.data.mongodb.core.query.Criteria;
11 11  
  12 +import java.util.ArrayList;
12 13 import java.util.Arrays;
13 14 import java.util.Date;
14 15 import java.util.List;
... ... @@ -291,6 +292,7 @@
291 292 * ้ซ˜ๅฑๅ› ็ด 
292 293 */
293 294 private String rFactor;
  295 + private boolean norFactor;
294 296  
295 297  
296 298 /**
... ... @@ -333,6 +335,14 @@
333 335 //ๅปบๆกฃๅŒป็”Ÿ
334 336 private String bookbuildingDoctor;
335 337  
  338 + public boolean isNorFactor() {
  339 + return norFactor;
  340 + }
  341 +
  342 + public void setNorFactor(boolean norFactor) {
  343 + this.norFactor = norFactor;
  344 + }
  345 +
336 346 public boolean isLastCheckEId() {
337 347 return lastCheckEId;
338 348 }
... ... @@ -878,6 +888,11 @@
878 888  
879 889 if (StringUtils.isNotEmpty(rFactor)) {
880 890 condition = condition.and("riskFactorId", rFactor, MongoOper.LIKE);
  891 + }
  892 + else if(norFactor){
  893 + condition = condition.and("riskFactorId", new ArrayList<String>(), MongoOper.NE);
  894 + MongoCondition c = MongoCondition.newInstance();
  895 + c1= c.andCondition(MongoCondition.newInstance("riskFactorId", null, MongoOper.NE)).getCriteria();
881 896 }
882 897 if (-1 != yn) {
883 898 condition = condition.and("yn", yn, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java View file @ 7657f37
... ... @@ -55,17 +55,18 @@
55 55 // antExChuQuery.setNextCheckTimeEnd(yuYueDate);
56 56 // antExChuQuery.setHospitalId("242");
57 57  
58   - patientsQuery1.setLastCheckEId(true);
59 58 patientsQuery1.setHospitalId("242");
60   - patientsQuery1.setType(1);
61   -
62   - Date yuYueDate = DateUtil.addDay(new Date(), 2);
63   - if (yuYueDate != null) {
64   - //ๆŠŠๆ—ถ้—ดๆ ผๅผๅŒ–ๆˆ yyyy_MM_dd ็š„ๆ—ฅๆœŸ
65   - yuYueDate = DateUtil.formatDate(yuYueDate);
66   - }
67   - patientsQuery1.setDueDateStart(yuYueDate);
68   - patientsQuery1.setDueDateEnd(yuYueDate);
  59 + patientsQuery1.setNorFactor(true);
  60 + patientsQuery1.setrLevel("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2");
  61 +// patientsQuery1.setType(1);
  62 +//
  63 +// Date yuYueDate = DateUtil.addDay(new Date(), 2);
  64 +// if (yuYueDate != null) {
  65 +// //ๆŠŠๆ—ถ้—ดๆ ผๅผๅŒ–ๆˆ yyyy_MM_dd ็š„ๆ—ฅๆœŸ
  66 +// yuYueDate = DateUtil.formatDate(yuYueDate);
  67 +// }
  68 +// patientsQuery1.setDueDateStart(yuYueDate);
  69 +// patientsQuery1.setDueDateEnd(yuYueDate);
69 70  
70 71 System.out.println(patientsQuery1.convertToQuery().convertToMongoQuery());
71 72  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PremaritalCheckupController.java View file @ 7657f37
... ... @@ -63,16 +63,15 @@
63 63 @RequestParam(value = "id",required = false)String id,
64 64 HttpServletRequest request) {
65 65 //่Žทๅ–ๅฝ“ๅ‰็™ปๅฝ•็”จๆˆทID
66   - LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
67 66 PremaritalCheckupQueryRequest param = new PremaritalCheckupQueryRequest();
68 67 param.setHospitalId(hospitalId);
69 68 if (StringUtils.isNotEmpty(id)){
70 69 param.setId(id);
71 70 }else {
72 71 param.setVcCardNo(vcCardNo);
73   - param.setCertificateNum(certificateNum);
  72 + param.setVcCardNo(certificateNum);
74 73 }
75   - return premaritalCheckupFacade.getPremaritalCheckup(param, loginState.getId());
  74 + return premaritalCheckupFacade.getPremaritalCheckup(param);
76 75 }
77 76  
78 77 /**
79 78  
... ... @@ -86,9 +85,8 @@
86 85 @TokenRequired
87 86 public BaseListResponse queryPremaritalCheckup(@Valid PremaritalCheckupQueryRequest queryRequest,
88 87 HttpServletRequest request){
89   - LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
90 88  
91   - return premaritalCheckupFacade.queryPremaritalCheckup(queryRequest, loginState.getId());
  89 + return premaritalCheckupFacade.queryPremaritalCheckup(queryRequest);
92 90 }
93 91 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java View file @ 7657f37
... ... @@ -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 @ 7657f37
... ... @@ -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  
38 41  
39 42  
... ... @@ -40,79 +43,95 @@
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   - * @param id
49 52 * @return
50 53 */
51   - public BaseObjectResponse getPremaritalCheckup(PremaritalCheckupQueryRequest requestParam,Integer id){
  54 + public BaseObjectResponse getPremaritalCheckup(PremaritalCheckupQueryRequest requestParam) {
52 55  
53   - PremaritalCheckup result = new PremaritalCheckup();
  56 + PremaritalCheckup result = null;
  57 + PremaritalCheckupHistoryResult historyResult = null;
  58 + ResidentsArchiveModel archiveModel = null;
  59 + Map<String, Object> archiveMap = null;
54 60  
55   - Map<String,Object> resultMap = new HashMap<>();
56   - Map<String,Object> archiveMap = new HashMap<>();
  61 + Map<String, Object> resultMap = new HashMap<>();
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.getCardNo())) {
74 77 archiveQuery.setYn(YnEnums.YES.getId());
75 78 archiveQuery.setHospitalId(requestParam.getHospitalId());
76   - archiveQuery.setCertificateNum(requestParam.getCertificateNum());
  79 + archiveQuery.setCertificateNum(requestParam.getCardNo());
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 + 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 + }
99 113 }
100 114 }
101 115 }
102   - archiveMap.put("certificateNum",archiveModel.getCertificateNum());
103   - archiveMap.put("certificateTypeId",archiveModel.getCertificateTypeId());
104   - archiveMap.put("username",archiveModel.getUsername());
105   - 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());
112 116  
113   - resultMap.put("archiveResult",archiveMap);
114   - resultMap.put("checkupResult",result);
  117 + if (archiveModel!=null){
  118 + archiveMap = new HashMap<>();
  119 + archiveMap.put("certificateNum", archiveModel.getCertificateNum());
  120 + archiveMap.put("certificateTypeId", archiveModel.getCertificateTypeId());
  121 + archiveMap.put("username", archiveModel.getUsername());
  122 + archiveMap.put("age", archiveModel.getAge());
  123 + archiveMap.put("sex", archiveModel.getSex());
  124 + archiveMap.put("birthday", getBirthday(archiveModel.getBirthday()));
  125 + archiveMap.put("phone", archiveModel.getPhone());
  126 + archiveMap.put("residence", CommonsHelper.getResidence(archiveModel.getProvinceId(), archiveModel.getCityId(),
  127 + archiveModel.getAreaId(), archiveModel.getStreetId(), archiveModel.getAddress(), basicConfigService));
  128 + archiveMap.put("workUnit", archiveModel.getWorkUnit());
  129 + }
115 130  
  131 + resultMap.put("archiveResult", archiveMap);
  132 + resultMap.put("checkupResult", result);
  133 + resultMap.put("premaritalCheckupHistory",historyResult);
  134 +
116 135 BaseObjectResponse response = new BaseObjectResponse();
117 136 response.setData(resultMap);
118 137 response.setErrorcode(ErrorCodeConstants.SUCCESS);
119 138  
... ... @@ -134,10 +153,9 @@
134 153 /**
135 154 * ๅฉšๅ‰ๆฃ€ๆŸฅ็ฎก็†
136 155 * @param request
137   - * @param userId
138 156 * @return
139 157 */
140   - public BaseListResponse queryPremaritalCheckup(PremaritalCheckupQueryRequest request,Integer userId){
  158 + public BaseListResponse queryPremaritalCheckup(PremaritalCheckupQueryRequest request){
141 159  
142 160 List<PremaritalCheckup> data = new ArrayList<>();
143 161  
... ... @@ -163,7 +181,7 @@
163 181 query.setLimit(request.getLimit());
164 182 query.setNeed("y");
165 183 query.setYn(YnEnums.YES.getId());
166   - query.setCertificateNum(request.getCertificateNum());
  184 + query.setCertificateNum(request.getCardNo());
167 185 query.setYiXueYiJian(request.getYiXueYiJian());
168 186 query.setPremaritalUpTimeStart(request.getPremaritalUpTimeStart());
169 187 query.setPremaritalUpTimeEnd(request.getPremaritalUpTimeEnd());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java View file @ 7657f37
... ... @@ -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 @ 7657f37
... ... @@ -95,6 +95,8 @@
95 95 //ไบงๆฃ€ๅŒป็”Ÿ
96 96 patientsQuery.setLastCheckEmployeeId(riskPatientsQueryRequest.getLastCheckDoctorId());
97 97  
  98 + patientsQuery.setNorFactor(Boolean.TRUE);
  99 +
98 100 //ๆ€ป็š„ๅญ•ๅฆ‡ๆกๆ•ฐ
99 101 int allPatientCount = patientsService.queryPatientCount(patientsQuery);
100 102  
... ... @@ -104,6 +106,7 @@
104 106 basicConfigQuery.setYn(YnEnums.YES.getId());
105 107 basicConfigQuery.setParentId(SystemConfig.HIGH_RISK_ID);
106 108 basicConfigQuery.setEnable(1);
  109 + basicConfigQuery.setId(riskPatientsQueryRequest.getrLevel());
107 110  
108 111 List<Future> futures = new ArrayList<>();
109 112 List<BasicConfig> riskLevelConfig = basicConfigService.queryBasicConfig(basicConfigQuery);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PremaritalCheckupQueryRequest.java View file @ 7657f37
... ... @@ -11,7 +11,7 @@
11 11  
12 12 private String id;
13 13 //่ฏไปถๅท
14   - private String certificateNum;
  14 + private String cardNo;
15 15 //ๅฐฑ่ฏŠๅก
16 16 private String vcCardNo;
17 17 //ๅฆ‡ๅฅณๅง“ๅ
18 18  
... ... @@ -43,12 +43,12 @@
43 43 this.id = id;
44 44 }
45 45  
46   - public String getCertificateNum() {
47   - return certificateNum;
  46 + public String getCardNo() {
  47 + return cardNo;
48 48 }
49 49  
50   - public void setCertificateNum(String certificateNum) {
51   - this.certificateNum = certificateNum;
  50 + public void setCardNo(String cardNo) {
  51 + this.cardNo = cardNo;
52 52 }
53 53  
54 54 public String getVcCardNo() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PremaritalCheckupHistoryResult.java View file @ 7657f37
  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 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanChanResult.java View file @ 7657f37
... ... @@ -60,8 +60,25 @@
60 60 private String fCh;
61 61 //ๅปบๆกฃๆ—ถ้—ด
62 62 private String bTime;
  63 + //่ƒŽๆ•ฐ
  64 + private String tireNumber;
63 65  
  66 + public String getTireNumber() {
  67 + if(StringUtils.isEmpty(tireNumber)){
  68 + return SPIT;
  69 + }
  70 + return tireNumber;
  71 + }
  72 +
  73 + public void setTireNumber(String tireNumber) {
  74 + this.tireNumber = tireNumber;
  75 + }
  76 +
64 77 public String getbTime() {
  78 + if(StringUtils.isEmpty(bTime)){
  79 + return SPIT;
  80 + }
  81 +
65 82 return bTime;
66 83 }
67 84  
... ... @@ -70,6 +87,9 @@
70 87 }
71 88  
72 89 public String getRegisterAddr() {
  90 + if(StringUtils.isEmpty(registerAddr)){
  91 + return SPIT;
  92 + }
73 93 return registerAddr;
74 94 }
75 95  
... ... @@ -78,6 +98,9 @@
78 98 }
79 99  
80 100 public String getAddr() {
  101 + if(StringUtils.isEmpty(addr)){
  102 + return SPIT;
  103 + }
81 104 return addr;
82 105 }
83 106  
... ... @@ -86,6 +109,9 @@
86 109 }
87 110  
88 111 public String getFirstBH() {
  112 + if(StringUtils.isEmpty(firstBH)){
  113 + return SPIT;
  114 + }
89 115 return firstBH;
90 116 }
91 117  
... ... @@ -94,6 +120,9 @@
94 120 }
95 121  
96 122 public String getfCh() {
  123 + if(StringUtils.isEmpty(fCh)){
  124 + return SPIT;
  125 + }
97 126 return fCh;
98 127 }
99 128  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java View file @ 7657f37
... ... @@ -72,6 +72,10 @@
72 72 private String bTime;
73 73  
74 74 public String getbTime() {
  75 + if(StringUtils.isEmpty(bTime)){
  76 + return SPIT;
  77 + }
  78 +
75 79 return bTime;
76 80 }
77 81  
... ... @@ -80,6 +84,9 @@
80 84 }
81 85  
82 86 public String getRegisterAddr() {
  87 + if(StringUtils.isEmpty(registerAddr)){
  88 + return SPIT;
  89 + }
83 90 return registerAddr;
84 91 }
85 92  
... ... @@ -88,6 +95,10 @@
88 95 }
89 96  
90 97 public String getAddr() {
  98 +
  99 + if(StringUtils.isEmpty(addr)){
  100 + return SPIT;
  101 + }
91 102 return addr;
92 103 }
93 104  
... ... @@ -96,6 +107,10 @@
96 107 }
97 108  
98 109 public String getFirstBH() {
  110 +
  111 + if(StringUtils.isEmpty(firstBH)){
  112 + return SPIT;
  113 + }
99 114 return firstBH;
100 115 }
101 116  
... ... @@ -104,6 +119,9 @@
104 119 }
105 120  
106 121 public String getCurrentCh() {
  122 + if(StringUtils.isEmpty(currentCh)){
  123 + return SPIT;
  124 + }
107 125 return currentCh;
108 126 }
109 127  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java View file @ 7657f37
... ... @@ -83,6 +83,10 @@
83 83 private String bTime;
84 84  
85 85 public String getbTime() {
  86 + if(StringUtils.isEmpty(bTime)){
  87 + return SPIT;
  88 + }
  89 +
86 90 return bTime;
87 91 }
88 92  
... ... @@ -91,6 +95,10 @@
91 95 }
92 96  
93 97 public String getRegisterAddr() {
  98 +
  99 + if(StringUtils.isEmpty(bTime)){
  100 + return SPIT;
  101 + }
94 102 return registerAddr;
95 103 }
96 104  
... ... @@ -99,6 +107,10 @@
99 107 }
100 108  
101 109 public String getAddr() {
  110 +
  111 + if(StringUtils.isEmpty(bTime)){
  112 + return SPIT;
  113 + }
102 114 return addr;
103 115 }
104 116  
... ... @@ -107,6 +119,10 @@
107 119 }
108 120  
109 121 public String getFirstBH() {
  122 +
  123 + if(StringUtils.isEmpty(bTime)){
  124 + return SPIT;
  125 + }
110 126 return firstBH;
111 127 }
112 128  
... ... @@ -115,6 +131,10 @@
115 131 }
116 132  
117 133 public String getCurrentCh() {
  134 +
  135 + if(StringUtils.isEmpty(bTime)){
  136 + return SPIT;
  137 + }
118 138 return currentCh;
119 139 }
120 140  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java View file @ 7657f37
... ... @@ -3,6 +3,7 @@
3 3 import com.lyms.platform.biz.service.*;
4 4 import com.lyms.platform.common.enums.ServiceStatusEnums;
5 5 import com.lyms.platform.common.enums.ServiceTypeEnums;
  6 +import com.lyms.platform.common.enums.TaiShuEnums;
6 7 import com.lyms.platform.common.enums.YnEnums;
7 8 import com.lyms.platform.common.utils.DateUtil;
8 9 import com.lyms.platform.operate.web.facade.PatientFacade;
... ... @@ -106,7 +107,7 @@
106 107 List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery);
107 108 if (CollectionUtils.isNotEmpty(maternalDeliverModels)) {
108 109 chanResult.setDueWeek(maternalDeliverModels.get(0).getDueDate());
109   -
  110 + chanResult.setTireNumber(TaiShuEnums.getTitle(maternalDeliverModels.get(0).getTireNumber() + ""));
110 111 try {
111 112 chanResult.setfCh(organizationService.getOrganization(Integer.valueOf(maternalDeliverModels.get(0).getHospitalId())).getName());
112 113 } catch (Exception e) {