Commit f6490ed7a21ccd6f8d97aae749dc44d0458b8c4d

Authored by liquanyu
1 parent 0b4766b0bc

update

Showing 7 changed files with 85 additions and 5 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BabyDeathModel.java View file @ f6490ed
... ... @@ -29,7 +29,12 @@
29 29  
30 30 private String phone;
31 31  
  32 + /**
  33 + * 母亲身份证号码
  34 + */
  35 + private String cardNo;
32 36  
  37 +
33 38 /**
34 39 * 机构地址
35 40 */
... ... @@ -109,6 +114,14 @@
109 114 private Date created;
110 115  
111 116 private Date modifed;
  117 +
  118 + public String getCardNo() {
  119 + return cardNo;
  120 + }
  121 +
  122 + public void setCardNo(String cardNo) {
  123 + this.cardNo = cardNo;
  124 + }
112 125  
113 126 public String getPhone() {
114 127 return phone;
platform-dal/src/main/java/com/lyms/platform/pojo/DefectiveChildModel.java View file @ f6490ed
... ... @@ -87,6 +87,24 @@
87 87 */
88 88 private Map<String, Object> formData;
89 89  
  90 + private String cardNo;
  91 + private Date mommyBirth;
  92 +
  93 + public String getCardNo() {
  94 + return cardNo;
  95 + }
  96 +
  97 + public void setCardNo(String cardNo) {
  98 + this.cardNo = cardNo;
  99 + }
  100 +
  101 + public Date getMommyBirth() {
  102 + return mommyBirth;
  103 + }
  104 +
  105 + public void setMommyBirth(Date mommyBirth) {
  106 + this.mommyBirth = mommyBirth;
  107 + }
90 108  
91 109 public String getOrgProvince() {
92 110 return orgProvince;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyDeathListRequest.java View file @ f6490ed
... ... @@ -19,7 +19,12 @@
19 19 */
20 20 private String phone;
21 21  
  22 + /**
  23 + * 身份证号
  24 + */
  25 + private String cardNo;
22 26  
  27 +
23 28 /**
24 29 * 创建时间
25 30 */
... ... @@ -36,6 +41,14 @@
36 41 private String liveArea;
37 42 private String liveStreet;
38 43  
  44 +
  45 + public String getCardNo() {
  46 + return cardNo;
  47 + }
  48 +
  49 + public void setCardNo(String cardNo) {
  50 + this.cardNo = cardNo;
  51 + }
39 52  
40 53 public String getNumber() {
41 54 return number;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CommonParamRequest.java View file @ f6490ed
... ... @@ -17,7 +17,7 @@
17 17 private String cardNo;
18 18  
19 19 /**
20   - * 就诊卡号..
  20 + * 住院号..
21 21 */
22 22 private String otherNo;
23 23  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DefectiveChildModelResult.java View file @ f6490ed
... ... @@ -31,6 +31,16 @@
31 31 */
32 32 private String babyBirthStr;
33 33  
  34 + private String mommyBirthStr;
  35 +
  36 + public String getMommyBirthStr() {
  37 + return mommyBirthStr;
  38 + }
  39 +
  40 + public void setMommyBirthStr(String mommyBirthStr) {
  41 + this.mommyBirthStr = mommyBirthStr;
  42 + }
  43 +
34 44 public String getOrgAddressStr() {
35 45 return orgAddressStr;
36 46 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyDeathServerImpl.java View file @ f6490ed
... ... @@ -107,6 +107,11 @@
107 107 query.addCriteria(Criteria.where("phone").is(phone));
108 108 }
109 109  
  110 + String cardNo = param.getCardNo();
  111 + if (StringUtils.isNotEmpty(phone)) {
  112 + query.addCriteria(Criteria.where("cardNo").is(cardNo));
  113 + }
  114 +
110 115 // 填写单位
111 116 query.addCriteria(Criteria.where("hospitalId").is(hospitalId));
112 117 // 填写时间
... ... @@ -236,6 +241,11 @@
236 241 String code = param.getCode();
237 242 if (StringUtils.isNotEmpty(code)) {
238 243 query.addCriteria(Criteria.where("code").is(code));
  244 + }
  245 +
  246 + String cardNo = param.getCardNo();
  247 + if (StringUtils.isNotEmpty(cardNo)) {
  248 + query.addCriteria(Criteria.where("cardNo").is(cardNo));
239 249 }
240 250 BabyDeathModel model = mongoTemplate.findOne(query.with(new Sort(Sort.Direction.DESC, "created")), BabyDeathModel.class);
241 251 BabyDeathModelResult result = new BabyDeathModelResult();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/DefectiveChildServiceImpl.java View file @ f6490ed
... ... @@ -263,6 +263,11 @@
263 263 result.setBabyBirthStr(DateUtil.getyyyy_MM_dd(babyBirth));
264 264 }
265 265  
  266 + Date mommyBirth = result.getMommyBirth();
  267 + if (mommyBirth != null) {
  268 + result.setMommyBirthStr(DateUtil.getyyyy_MM_dd(mommyBirth));
  269 + }
  270 +
266 271 return result;
267 272 }
268 273  
269 274  
... ... @@ -275,11 +280,22 @@
275 280 @Override
276 281 public BaseResponse getPatientInfoByIdCard(CommonParamRequest param,Integer userId) {
277 282 String hospitalId = autoMatchFacade.getHospitalId(userId);
278   - String inHospitalNo = param.getCardNo();
  283 + String queryNo = "";
  284 + if (StringUtils.isNotEmpty(param.getCardNo()))
  285 + {
  286 + queryNo = param.getCardNo();
  287 + }
  288 +
  289 + if (StringUtils.isNotEmpty(param.getCode()))
  290 + {
  291 + queryNo = param.getCode();
  292 + }
279 293 DefectiveChildModelResult result = null;
280   - if (StringUtils.isNotEmpty(inHospitalNo)) {
281   - List<DefectiveChildModel> defectiveChildModels = mongoTemplate.find(Query.query(Criteria.where("inHospitalNo").is(inHospitalNo).
282   - and("hospitalId").is(hospitalId)), DefectiveChildModel.class);
  294 + if (StringUtils.isNotEmpty(queryNo)) {
  295 + Query query = new Query();
  296 + query.addCriteria(Criteria.where("hospitalId").is(hospitalId));
  297 + query.addCriteria(new Criteria().orOperator(Criteria.where("inHospitalNo").is(queryNo), Criteria.where("cardNo").is(queryNo)));
  298 + List<DefectiveChildModel> defectiveChildModels = mongoTemplate.find(query, DefectiveChildModel.class);
283 299 if (CollectionUtils.isNotEmpty(defectiveChildModels))
284 300 {
285 301 result = getResultByModel(defectiveChildModels.get(0));