Commit cc6ca58151d2683cc307ec7f19363cc39c1c720d

Authored by hujiaqi

Merge remote-tracking branch 'origin/master'

Showing 9 changed files

platform-dal/src/main/java/com/lyms/platform/pojo/ResidentsArchiveModel.java View file @ cc6ca58
... ... @@ -24,7 +24,7 @@
24 24 //性别
25 25 private String sex;
26 26 //出生日期
27   - private String birthday;
  27 + private Date birthday;
28 28 //国籍
29 29 private String countryId;
30 30 //民族Id
... ... @@ -87,7 +87,7 @@
87 87 //建档人
88 88 private String buildDoctor;
89 89 //建档日期
90   - private String buildDay;
  90 + private Date buildDay;
91 91  
92 92 /* table info */
93 93  
94 94  
... ... @@ -132,11 +132,11 @@
132 132 this.sex = sex;
133 133 }
134 134  
135   - public String getBirthday() {
  135 + public Date getBirthday() {
136 136 return birthday;
137 137 }
138 138  
139   - public void setBirthday(String birthday) {
  139 + public void setBirthday(Date birthday) {
140 140 this.birthday = birthday;
141 141 }
142 142  
143 143  
... ... @@ -372,11 +372,11 @@
372 372 this.buildDoctor = buildDoctor;
373 373 }
374 374  
375   - public String getBuildDay() {
  375 + public Date getBuildDay() {
376 376 return buildDay;
377 377 }
378 378  
379   - public void setBuildDay(String buildDay) {
  379 + public void setBuildDay(Date buildDay) {
380 380 this.buildDay = buildDay;
381 381 }
382 382  
platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java View file @ cc6ca58
... ... @@ -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 org.apache.commons.lang.StringUtils;
  9 +import org.springframework.data.mongodb.core.query.Criteria;
9 10  
10 11 import java.util.Date;
11 12  
... ... @@ -21,7 +22,8 @@
21 22 //性别
22 23 private String sex;
23 24 //出生日期
24   - private Date birthday;
  25 + private Date birthdayStart;
  26 + private Date birthdayEnd;
25 27 //国籍
26 28 private String countryId;
27 29 //民族Id
... ... @@ -142,6 +144,20 @@
142 144 if (StringUtils.isNotBlank(hospitalId)) {
143 145 condition = condition.and("hospitalId", hospitalId, MongoOper.IS);
144 146 }
  147 + Criteria c1 = null;
  148 + if(null!=birthdayStart){
  149 + c1 = Criteria.where("birthday").gte(birthdayStart);
  150 + }
  151 + if(null!=birthdayEnd){
  152 + if (null==c1) {
  153 + c1 = Criteria.where("birthday").lte(birthdayEnd);
  154 + } else {
  155 + c1 = c1.lte(birthdayEnd);
  156 + }
  157 + }
  158 + if (c1!=null) {
  159 + condition = condition.andCondition(new MongoCondition(c1));
  160 + }
145 161 return condition.toMongoQuery();
146 162 }
147 163  
148 164  
... ... @@ -177,12 +193,20 @@
177 193 this.sex = sex;
178 194 }
179 195  
180   - public Date getBirthday() {
181   - return birthday;
  196 + public Date getBirthdayStart() {
  197 + return birthdayStart;
182 198 }
183 199  
184   - public void setBirthday(Date birthday) {
185   - this.birthday = birthday;
  200 + public void setBirthdayStart(Date birthdayStart) {
  201 + this.birthdayStart = birthdayStart;
  202 + }
  203 +
  204 + public Date getBirthdayEnd() {
  205 + return birthdayEnd;
  206 + }
  207 +
  208 + public void setBirthdayEnd(Date birthdayEnd) {
  209 + this.birthdayEnd = birthdayEnd;
186 210 }
187 211  
188 212 public String getCountryId() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentArchivesRegionController.java View file @ cc6ca58
  1 +package com.lyms.platform.operate.web.controller;
  2 +
  3 +import com.lyms.platform.common.annotation.TokenRequired;
  4 +import com.lyms.platform.common.base.BaseController;
  5 +import com.lyms.platform.common.base.LoginContext;
  6 +import com.lyms.platform.common.result.BaseResponse;
  7 +import com.lyms.platform.operate.web.request.ResidentsArchiveQueryRequest;
  8 +import org.springframework.stereotype.Controller;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestMethod;
  11 +import org.springframework.web.bind.annotation.ResponseBody;
  12 +
  13 +import javax.servlet.http.HttpServletRequest;
  14 +import javax.validation.Valid;
  15 +
  16 +/**
  17 + *
  18 + * 妇女健康档案管理(区域妇幼)
  19 + *
  20 + * Created by Administrator on 2016/12/20 0020.
  21 + */
  22 +@Controller
  23 +public class ResidentArchivesRegionController extends BaseController{
  24 +
  25 + @RequestMapping(value = "/r", method = RequestMethod.GET)
  26 + @ResponseBody
  27 + @TokenRequired
  28 + public BaseResponse queryAllPuerpera(@Valid ResidentsArchiveQueryRequest queryRequest,HttpServletRequest request) {
  29 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  30 +// return residentsArchiveFacade.queryResidentsArchives(residentsArchiveQueryRequest,loginState.getId(),"true");
  31 + return null;
  32 + }
  33 +
  34 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java View file @ cc6ca58
... ... @@ -112,13 +112,13 @@
112 112 model.setUsername(addRequest.getUsername());
113 113 model.setCertificateNum(addRequest.getCardNo());
114 114 model.setCertificateTypeId(addRequest.getCertificateTypeId());
115   - model.setBirthday(addRequest.getBirthday());
  115 + model.setBirthday(addRequest.getBirthday()!=null ? DateUtil.parseYMD(addRequest.getBirthday()) : null);
116 116 model.setAge(addRequest.getAge());
117 117 model.setPhone(addRequest.getPhone());
118 118  
119 119 model.setSex(SystemConfig.WOMAN_ID);
120 120 //建档日期
121   - model.setBuildDay(DateUtil.getyyyy_MM_dd(new Date()));
  121 + model.setBuildDay(new Date());
122 122  
123 123 model.setVcCardNo(addRequest.getVcCardNo());
124 124  
... ... @@ -204,8 +204,8 @@
204 204 archiveMap.put("certificateNum", archiveModel.getCertificateNum());
205 205 archiveMap.put("certificateTypeId", archiveModel.getCertificateTypeId());
206 206 archiveMap.put("username", archiveModel.getUsername());
207   - archiveMap.put("birthday",archiveModel.getBirthday());
208   - archiveMap.put("age", StringUtils.isEmpty(archiveModel.getBirthday()) ? "" : DateUtil.getAge(DateUtil.parseYMD(archiveModel.getBirthday())));
  207 + archiveMap.put("birthday",archiveModel.getBirthday() != null ? DateUtil.getyyyy_MM_dd(archiveModel.getBirthday()) : null);
  208 + archiveMap.put("age", archiveModel.getBirthday() != null ? "" : DateUtil.getAge(archiveModel.getBirthday()));
209 209 archiveMap.put("phone", archiveModel.getPhone());
210 210 archiveMap.put("id", archiveModel.getId());
211 211 if (StringUtils.isEmpty(archiveModel.getSex()) || archiveModel.getSex().equals(SystemConfig.WOMAN_ID )){
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PremaritalCheckupFacade.java View file @ cc6ca58
... ... @@ -144,7 +144,7 @@
144 144 archiveMap.put("sex", "男");
145 145 }
146 146 }
147   - archiveMap.put("birthday", getBirthday(archiveModel.getBirthday()));
  147 + archiveMap.put("birthday", getBirthday(archiveModel.getBirthday()!=null ? DateUtil.getyyyy_MM_dd(archiveModel.getBirthday()) : null ));
148 148 archiveMap.put("phone", archiveModel.getPhone());
149 149 archiveMap.put("residence", CommonsHelper.getResidence(archiveModel.getProvinceRegisterId(), archiveModel.getCityRegisterId(),
150 150 archiveModel.getAreaRegisterId(), archiveModel.getStreetRegisterId(), archiveModel.getAddressRegister(), basicConfigService));
... ... @@ -779,8 +779,8 @@
779 779 if (archiveModel!=null && archiveModel.getYn()==YnEnums.YES.getId()){
780 780 username = archiveModel.getUsername();
781 781 phone = archiveModel.getPhone();
782   - if (StringUtils.isNotEmpty(archiveModel.getBirthday())){
783   - age = DateUtil.getAge(DateUtil.parseYMD(archiveModel.getBirthday()));
  782 + if (archiveModel.getBirthday()!=null){
  783 + age = DateUtil.getAge(archiveModel.getBirthday());
784 784 }
785 785 }
786 786 }
... ... @@ -1142,8 +1142,8 @@
1142 1142 if (archiveModel!=null && archiveModel.getYn()==YnEnums.YES.getId()){
1143 1143 username = archiveModel.getUsername();
1144 1144 phone = archiveModel.getPhone();
1145   - if (StringUtils.isNotEmpty(archiveModel.getBirthday())){
1146   - age = DateUtil.getAge(DateUtil.parseYMD(archiveModel.getBirthday()));
  1145 + if (archiveModel.getBirthday()!=null){
  1146 + age = DateUtil.getAge(archiveModel.getBirthday());
1147 1147 }
1148 1148 }
1149 1149 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java View file @ cc6ca58
... ... @@ -162,7 +162,7 @@
162 162 result.setHospitalId(String.valueOf(org.getId()));
163 163 }
164 164 }
165   - result.setBookBuildDate(data.getBuildDay());
  165 + result.setBookBuildDate(DateUtil.getyyyy_MM_dd(data.getBuildDay()));
166 166 result.setId(data.getId());
167 167 resultList.add(result);
168 168 }
... ... @@ -428,7 +428,7 @@
428 428 temp.setHospitalId(String.valueOf(org.getId()));
429 429 }
430 430 }
431   - temp.setBookBuildDate(archiveModel.getBuildDay());
  431 + temp.setBookBuildDate(DateUtil.getyyyy_MM_dd(archiveModel.getBuildDay()));
432 432 temp.setId(archiveModel.getId());
433 433 historyResults.add(temp);
434 434 }
... ... @@ -449,7 +449,7 @@
449 449 result.setId(model.getId());
450 450 result.setUsername(model.getUsername());
451 451 result.setSex(model.getSex());
452   - result.setBirthday(model.getBirthday());
  452 + result.setBirthday(DateUtil.getyyyy_MM_dd(model.getBirthday()));
453 453 result.setCountryId(model.getCountryId());
454 454 result.setNationId(model.getNationId());
455 455 result.setMarriageId(model.getMarriageId());
... ... @@ -483,7 +483,7 @@
483 483  
484 484 result.setVcCardNo(model.getVcCardNo());
485 485 result.setBuildDoctor(model.getBuildDoctor());
486   - result.setBuildDay(model.getBuildDay());
  486 + result.setBuildDay(DateUtil.getyyyy_MM_dd(model.getBuildDay()));
487 487  
488 488 result.setCreated(model.getCreated());
489 489 result.setModified(model.getModified());
... ... @@ -537,7 +537,7 @@
537 537 map.put("id",model.getId());
538 538 map.put("username",model.getUsername());
539 539 map.put("certificateNum",model.getCertificateNum());
540   - map.put("age",DateUtil.getAge(DateUtil.parseYMD(model.getBirthday())));
  540 + map.put("age",DateUtil.getAge(model.getBirthday()));
541 541 map.put("residence", CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(), model.getAreaId(), model.getStreetId(), model.getAddress(), basicConfigService));
542 542 map.put("isCheckup",queryPremaritalCheckup(model.getId(), model.getHospitalId()));
543 543 map.put("phone", FunvCommonUtil.getXingPhone(model.getPhone()));
... ... @@ -609,7 +609,7 @@
609 609 Map<String,Object> map = new HashMap<>();
610 610 map.put("username",data.getUsername());
611 611 map.put("sex","女");
612   - map.put("birthday",getBirthday(data.getBirthday()));
  612 + map.put("birthday",getBirthday(DateUtil.getyyyy_MM_dd(data.getBirthday())));
613 613 map.put("countryId",getBaseicConfigByid(data.getCountryId()));
614 614 map.put("nationId",getBaseicConfigByid(data.getNationId()));
615 615 map.put("marriageId",getBaseicConfigByid(data.getMarriageId()));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveAddRequest.java View file @ cc6ca58
... ... @@ -3,6 +3,7 @@
3 3 import com.lyms.platform.common.base.IBasicRequestConvert;
4 4 import com.lyms.platform.common.core.annotation.form.Form;
5 5 import com.lyms.platform.common.core.annotation.form.FormParam;
  6 +import com.lyms.platform.common.utils.DateUtil;
6 7 import com.lyms.platform.common.utils.JsonUtil;
7 8 import com.lyms.platform.pojo.ResidentsArchiveModel;
8 9 import org.hibernate.validator.constraints.NotEmpty;
... ... @@ -99,7 +100,7 @@
99 100 model.setId(id);
100 101 model.setUsername(username);
101 102 model.setSex(sex);
102   - model.setBirthday(birthday);
  103 + model.setBirthday((birthday != null && birthday != "") ? DateUtil.parseYMD(birthday) : null);
103 104 model.setCountryId(countryId);
104 105 model.setNationId(nationId);
105 106 model.setMarriageId(marriageId);
... ... @@ -142,7 +143,7 @@
142 143 }
143 144 model.setVcCardNo(vcCardNo);
144 145 model.setBuildDoctor(buildDoctor);
145   - model.setBuildDay(buildDay);
  146 + model.setBuildDay((buildDay!=null && buildDay!="") ? DateUtil.parseYMD(buildDay) : null);
146 147 return model;
147 148 }
148 149  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveQueryRequest.java View file @ cc6ca58
... ... @@ -17,18 +17,97 @@
17 17 private String certificateTypeId;
18 18 //就诊卡号
19 19 private String vcCardNo;
20   - //医院ID
21   - private String hospitalId;
  20 + //姓名
  21 + private String username;
  22 + //联系方式
  23 + private String phone;
  24 +
  25 + /* 建档医院 */
22 26 //省
23 27 private String provinceId;
24 28 //市
25 29 private String cityId;
26 30 //区县
27 31 private String areaId;
28   - //姓名
29   - private String username;
30   - //联系方式
31   - private String phone;
  32 + //医院ID
  33 + private String hospitalId;
  34 + /* 居住地省市区 */
  35 + private String liveProvinceId;
  36 + private String liveCityId;
  37 + private String liveAreaId;
  38 + /* 户籍地址省市区 */
  39 + private String provinceRegisterId;
  40 + private String cityRegisterId;
  41 + private String areaRegisterId;
  42 +
  43 + //年龄(如: 24-26)
  44 + private String age;
  45 + //出生日期(范围值 - )
  46 + private String birthday;
  47 +
  48 + public String getLiveProvinceId() {
  49 + return liveProvinceId;
  50 + }
  51 +
  52 + public void setLiveProvinceId(String liveProvinceId) {
  53 + this.liveProvinceId = liveProvinceId;
  54 + }
  55 +
  56 + public String getLiveCityId() {
  57 + return liveCityId;
  58 + }
  59 +
  60 + public void setLiveCityId(String liveCityId) {
  61 + this.liveCityId = liveCityId;
  62 + }
  63 +
  64 + public String getLiveAreaId() {
  65 + return liveAreaId;
  66 + }
  67 +
  68 + public void setLiveAreaId(String liveAreaId) {
  69 + this.liveAreaId = liveAreaId;
  70 + }
  71 +
  72 + public String getProvinceRegisterId() {
  73 + return provinceRegisterId;
  74 + }
  75 +
  76 + public void setProvinceRegisterId(String provinceRegisterId) {
  77 + this.provinceRegisterId = provinceRegisterId;
  78 + }
  79 +
  80 + public String getCityRegisterId() {
  81 + return cityRegisterId;
  82 + }
  83 +
  84 + public void setCityRegisterId(String cityRegisterId) {
  85 + this.cityRegisterId = cityRegisterId;
  86 + }
  87 +
  88 + public String getAreaRegisterId() {
  89 + return areaRegisterId;
  90 + }
  91 +
  92 + public void setAreaRegisterId(String areaRegisterId) {
  93 + this.areaRegisterId = areaRegisterId;
  94 + }
  95 +
  96 + public String getAge() {
  97 + return age;
  98 + }
  99 +
  100 + public void setAge(String age) {
  101 + this.age = age;
  102 + }
  103 +
  104 + public String getBirthday() {
  105 + return birthday;
  106 + }
  107 +
  108 + public void setBirthday(String birthday) {
  109 + this.birthday = birthday;
  110 + }
32 111  
33 112 public String getCertificateTypeId() {
34 113 return certificateTypeId;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java View file @ cc6ca58
... ... @@ -2,6 +2,9 @@
2 2  
3 3 import org.apache.commons.lang.StringUtils;
4 4  
  5 +import java.util.HashMap;
  6 +import java.util.Map;
  7 +
5 8 /**
6 9 * 妇女模块公共方法
7 10 *
... ... @@ -74,6 +77,37 @@
74 77 }
75 78 return "";
76 79 }
  80 +
  81 +/* private static final Map<String, String> content = new HashMap<>();
  82 +
  83 + static {
  84 + content.put("ycxjbs", "遗传性疾病史");
  85 + content.put("jsjbs", "精神疾病史");
  86 + content.put("xtjx", "先天畸形");
  87 + content.put("xtyx", "先天愚型");
  88 + content.put("ny", "聋哑");
  89 + content.put("mr", "盲人");
  90 + content.put("cel", "唇腭裂");
  91 + content.put("xyb", "血友病");
  92 + content.put("sm", "色盲");
  93 + content.put("npx", "牛皮癣");
  94 + content.put("st", "双胎");
  95 + content.put("gb", "肝病");
  96 + content.put("jh", "结核");
  97 +
  98 + content.put("xy", "吸烟");
  99 + content.put("yj", "饮酒");
  100 + content.put("fyyw", "服用药物");
  101 + content.put("jcydyhwz", "接触有毒有害物质");
  102 + content.put("jcfsx", "接触放射线");
  103 +
  104 + content.put("qmsgm", "青霉素过敏");
  105 + content.put("xfmsgm", "先锋霉素过敏");
  106 + content.put("halywgm", "磺胺类药物过敏");
  107 + }*/
  108 +
  109 +
  110 +
77 111  
78 112 }