Commit 0e332b1b5d20e700a8d518ee737536f2124b8587

Authored by jiangjiazhi
1 parent f8749ddcf7

1

Showing 10 changed files with 419 additions and 77 deletions

platform-dal/src/main/java/com/lyms/platform/query/AntExChuQuery.java View file @ 0e332b1
... ... @@ -5,7 +5,10 @@
5 5 import com.lyms.platform.common.dao.operator.MongoCondition;
6 6 import com.lyms.platform.common.dao.operator.MongoOper;
7 7 import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +import org.springframework.data.mongodb.core.query.Criteria;
8 9  
  10 +import java.util.Date;
  11 +
9 12 /**
10 13 * Created by Administrator on 2016/6/21 0021.
11 14 */
12 15  
... ... @@ -13,7 +16,27 @@
13 16 private String parentId;
14 17 private Integer yn;
15 18 private String id;
  19 + //创建时间
  20 + private Date start;
16 21  
  22 + private Date end;
  23 +
  24 + public Date getEnd() {
  25 + return end;
  26 + }
  27 +
  28 + public void setEnd(Date end) {
  29 + this.end = end;
  30 + }
  31 +
  32 + public Date getStart() {
  33 + return start;
  34 + }
  35 +
  36 + public void setStart(Date start) {
  37 + this.start = start;
  38 + }
  39 +
17 40 public String getId() {
18 41 return id;
19 42 }
... ... @@ -33,6 +56,24 @@
33 56 }
34 57 if(null!=id){
35 58 condition= condition.and("id",id, MongoOper.IS);
  59 + }
  60 + boolean isAddStart = Boolean.FALSE;
  61 + Criteria c = null;
  62 + if (null != start) {
  63 + c = Criteria.where("created").gte(start);
  64 + isAddStart = Boolean.TRUE;
  65 + }
  66 +
  67 + if (null != end) {
  68 + if (isAddStart) {
  69 + c=c.lte(end);
  70 + } else {
  71 + c = Criteria.where("created").lte(end);
  72 + }
  73 + isAddStart = Boolean.TRUE;
  74 + }
  75 + if (isAddStart) {
  76 + return new MongoCondition(c.andOperator(condition.getCriteria())).toMongoQuery();
36 77 }
37 78 return condition.toMongoQuery();
38 79 }
platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java View file @ 0e332b1
... ... @@ -5,7 +5,10 @@
5 5 import com.lyms.platform.common.dao.operator.MongoCondition;
6 6 import com.lyms.platform.common.dao.operator.MongoOper;
7 7 import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +import org.springframework.data.mongodb.core.query.Criteria;
8 9  
  10 +import java.util.Date;
  11 +
9 12 /**
10 13 * 产前检查查询
11 14 *
... ... @@ -15,6 +18,27 @@
15 18 private String parentId;
16 19 private Integer yn;
17 20 private String id;
  21 + //创建时间
  22 + private Date start;
  23 +
  24 + private Date end;
  25 +
  26 + public Date getEnd() {
  27 + return end;
  28 + }
  29 +
  30 + public void setEnd(Date end) {
  31 + this.end = end;
  32 + }
  33 +
  34 + public Date getStart() {
  35 + return start;
  36 + }
  37 +
  38 + public void setStart(Date start) {
  39 + this.start = start;
  40 + }
  41 +
18 42 @Override
19 43 public MongoQuery convertToQuery() {
20 44 MongoCondition condition=MongoCondition.newInstance();
... ... @@ -26,6 +50,26 @@
26 50 }
27 51 if(null!=id){
28 52 condition= condition.and("id",id, MongoOper.IS);
  53 + }
  54 +
  55 +
  56 + boolean isAddStart = Boolean.FALSE;
  57 + Criteria c = null;
  58 + if (null != start) {
  59 + c = Criteria.where("created").gte(start);
  60 + isAddStart = Boolean.TRUE;
  61 + }
  62 +
  63 + if (null != end) {
  64 + if (isAddStart) {
  65 + c=c.lte(end);
  66 + } else {
  67 + c = Criteria.where("created").lte(end);
  68 + }
  69 + isAddStart = Boolean.TRUE;
  70 + }
  71 + if (isAddStart) {
  72 + return new MongoCondition(c.andOperator(condition.getCriteria())).toMongoQuery();
29 73 }
30 74 return condition.toMongoQuery();
31 75 }
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 0e332b1
... ... @@ -50,7 +50,17 @@
50 50 private Integer serviceStatus;
51 51 //体验会员 0非会员 1会员
52 52 private Integer expVip;
  53 + //创建时间
  54 + private Date created;
53 55  
  56 + public Date getCreated() {
  57 + return created;
  58 + }
  59 +
  60 + public void setCreated(Date created) {
  61 + this.created = created;
  62 + }
  63 +
54 64 /**
55 65 * 产妇手机号
56 66 */
... ... @@ -363,7 +373,9 @@
363 373 if (null != communityId && !"-1".equals(communityId)) {
364 374 condition = condition.and("communityId", communityId, MongoOper.IS);
365 375 }
366   -
  376 + if(null!=created){
  377 + condition = condition.and("created", created, MongoOper.LTE);
  378 + }
367 379 if (null != hScore) {
368 380 condition = condition.and("riskScore", hScore, MongoOper.IS);
369 381 }else if(null!=isHighRisk){
platform-dal/src/main/java/com/lyms/platform/query/PostReviewQuery.java View file @ 0e332b1
... ... @@ -5,7 +5,10 @@
5 5 import com.lyms.platform.common.dao.operator.MongoCondition;
6 6 import com.lyms.platform.common.dao.operator.MongoOper;
7 7 import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +import org.springframework.data.mongodb.core.query.Criteria;
8 9  
  10 +import java.util.Date;
  11 +
9 12 /**
10 13 * Created by Administrator on 2016/6/28 0028.
11 14 */
12 15  
... ... @@ -13,7 +16,27 @@
13 16 private String id;
14 17 private String parentId;
15 18 private Integer yn;
  19 + //创建时间
  20 + private Date start;
16 21  
  22 + private Date end;
  23 +
  24 + public Date getEnd() {
  25 + return end;
  26 + }
  27 +
  28 + public void setEnd(Date end) {
  29 + this.end = end;
  30 + }
  31 +
  32 + public Date getStart() {
  33 + return start;
  34 + }
  35 +
  36 + public void setStart(Date start) {
  37 + this.start = start;
  38 + }
  39 +
17 40 public String getId() {
18 41 return id;
19 42 }
... ... @@ -49,6 +72,25 @@
49 72 }
50 73 if(null!=parentId){
51 74 mongoCondition= mongoCondition.and("parentId",parentId, MongoOper.IS);
  75 + }
  76 +
  77 + boolean isAddStart = Boolean.FALSE;
  78 + Criteria c = null;
  79 + if (null != start) {
  80 + c = Criteria.where("created").gte(start);
  81 + isAddStart = Boolean.TRUE;
  82 + }
  83 +
  84 + if (null != end) {
  85 + if (isAddStart) {
  86 + c=c.lte(end);
  87 + } else {
  88 + c = Criteria.where("created").lte(end);
  89 + }
  90 + isAddStart = Boolean.TRUE;
  91 + }
  92 + if (isAddStart) {
  93 + return new MongoCondition(c.andOperator(mongoCondition.getCriteria())).toMongoQuery();
52 94 }
53 95 return mongoCondition.toMongoQuery();
54 96 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java View file @ 0e332b1
... ... @@ -4,14 +4,14 @@
4 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
5 5 import com.lyms.platform.common.result.BaseResponse;
6 6 import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade;
7   -import com.lyms.platform.operate.web.request.AntExAddRequest;
8   -import com.lyms.platform.operate.web.request.AntExQueryRequest;
9   -import com.lyms.platform.operate.web.request.AntExcAddRequest;
10   -import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest;
  7 +import com.lyms.platform.operate.web.request.*;
11 8 import org.apache.commons.lang.StringUtils;
12 9 import org.springframework.beans.factory.annotation.Autowired;
13 10 import org.springframework.stereotype.Controller;
14   -import org.springframework.web.bind.annotation.*;
  11 +import org.springframework.web.bind.annotation.RequestBody;
  12 +import org.springframework.web.bind.annotation.RequestMapping;
  13 +import org.springframework.web.bind.annotation.RequestMethod;
  14 +import org.springframework.web.bind.annotation.ResponseBody;
15 15  
16 16 import javax.validation.Valid;
17 17  
... ... @@ -35,7 +35,7 @@
35 35 @RequestMapping(method = RequestMethod.GET, value = "/antexmanage")
36 36 @ResponseBody
37 37 public BaseResponse queryAntenatalExamination(@Valid AntenatalExaminationQueryRequest antenatalExaminationQueryRequest) {
38   - if(StringUtils.isEmpty(antenatalExaminationQueryRequest.getCardNo())&&StringUtils.isEmpty(antenatalExaminationQueryRequest.getVcCardNo())){
  38 + if (StringUtils.isEmpty(antenatalExaminationQueryRequest.getCardNo()) && StringUtils.isEmpty(antenatalExaminationQueryRequest.getVcCardNo())) {
39 39 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请输出参数.");
40 40 }
41 41 return antenatalExaminationFacade.queryAntenatalExamination(antenatalExaminationQueryRequest);
... ... @@ -52,6 +52,7 @@
52 52 public BaseResponse addOneAntenatalExamination(@Valid @RequestBody AntExAddRequest antExAddRequest) {
53 53 return antenatalExaminationFacade.addOneAntEx(antExAddRequest);
54 54 }
  55 +
55 56 /**
56 57 * 增加产前检查(初诊)
57 58 *
... ... @@ -60,7 +61,7 @@
60 61 */
61 62 @RequestMapping(method = RequestMethod.POST, value = "/antex")
62 63 @ResponseBody
63   - public BaseResponse addOneAntEx(@Valid @RequestBody AntExcAddRequest antExcAddRequest){
  64 + public BaseResponse addOneAntEx(@Valid @RequestBody AntExcAddRequest antExcAddRequest) {
64 65 return antenatalExaminationFacade.addOneAnetExChu(antExcAddRequest);
65 66 }
66 67  
67 68  
68 69  
... ... @@ -88,10 +89,22 @@
88 89 public BaseResponse delOneAntById(@Valid AntExQueryRequest antExQueryRequest) {
89 90 return antenatalExaminationFacade.delOneAntEx(antExQueryRequest);
90 91 }
  92 +
91 93 @RequestMapping(method = RequestMethod.GET, value = "/antex/getenums")
92 94 @ResponseBody
93   - public BaseResponse getEnums(){
  95 + public BaseResponse getEnums() {
94 96 return antenatalExaminationFacade.getEnums();
  97 + }
  98 +
  99 + /**
  100 + * 获取产妇整个产程的建档记录
  101 + *
  102 + * @return
  103 + */
  104 + @RequestMapping(method = RequestMethod.GET, value = "/antex/antexlist")
  105 + @ResponseBody
  106 + public BaseResponse findAntExList(@Valid AntExListQueryRequest exListQueryRequest) {
  107 + return antenatalExaminationFacade.findAntExList(exListQueryRequest);
95 108 }
96 109 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 0e332b1
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3   -import com.lyms.platform.biz.service.AntenatalExaminationService;
4   -import com.lyms.platform.biz.service.ApplyOrderService;
5   -import com.lyms.platform.biz.service.BasicConfigService;
6   -import com.lyms.platform.biz.service.PatientsService;
  3 +import com.lyms.platform.biz.service.*;
7 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
8 5 import com.lyms.platform.common.enums.*;
9 6 import com.lyms.platform.common.result.BaseObjectResponse;
10 7 import com.lyms.platform.common.result.BaseResponse;
11 8 import com.lyms.platform.common.utils.Assert;
  9 +import com.lyms.platform.common.utils.DateUtil;
12 10 import com.lyms.platform.common.utils.JsonUtil;
13 11 import com.lyms.platform.common.utils.SystemConfig;
14   -import com.lyms.platform.operate.web.request.AntExAddRequest;
15   -import com.lyms.platform.operate.web.request.AntExQueryRequest;
16   -import com.lyms.platform.operate.web.request.AntExcAddRequest;
17   -import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest;
  12 +import com.lyms.platform.operate.web.request.*;
  13 +import com.lyms.platform.operate.web.result.AntData;
18 14 import com.lyms.platform.operate.web.result.AntenatalExaminationResult;
19 15 import com.lyms.platform.operate.web.result.AntexChuResult;
20 16 import com.lyms.platform.operate.web.result.AntexListResult;
21 17 import com.lyms.platform.permission.model.Organization;
22 18 import com.lyms.platform.permission.service.OrganizationService;
23 19 import com.lyms.platform.pojo.*;
24   -import com.lyms.platform.query.AntExChuQuery;
25   -import com.lyms.platform.query.PatientsQuery;
26   -import com.lyms.platform.query.ReferralApplyOrderQuery;
  20 +import com.lyms.platform.query.*;
27 21 import org.apache.commons.collections.CollectionUtils;
28 22 import org.apache.commons.lang.StringUtils;
29 23 import org.apache.commons.lang.math.NumberUtils;
30 24 import org.springframework.beans.factory.annotation.Autowired;
31 25 import org.springframework.stereotype.Component;
32 26  
33   -import java.util.ArrayList;
34   -import java.util.HashMap;
35   -import java.util.List;
36   -import java.util.Map;
  27 +import java.util.*;
37 28  
38 29 /**
39 30 * 产前检查接口
... ... @@ -54,6 +45,10 @@
54 45 private ApplyOrderService applyOrderService;
55 46 @Autowired
56 47 private OrganizationService organizationService;
  48 + @Autowired
  49 + private MatDeliverService matDeliverService;
  50 + @Autowired
  51 + private PostReviewService postReviewService;
57 52  
58 53 /**
59 54 * 增加一条产前检查
... ... @@ -65,7 +60,7 @@
65 60 if (StringUtils.isNotEmpty(antExAddRequest.getId())) {
66 61 AntenatalExaminationModel antenatalExamination = antExAddRequest.convertToDataModel();
67 62 antenatalExaminationService.updateOneAnt(antenatalExamination, antExAddRequest.getId());
68   - updateApplyOrder(antenatalExamination,antExAddRequest.getParentId());
  63 + updateApplyOrder(antenatalExamination, antExAddRequest.getParentId());
69 64 } else {
70 65 AntenatalExaminationModel model = antExAddRequest.convertToDataModel();
71 66 model.setYn(YnEnums.YES.getId());
... ... @@ -77,7 +72,7 @@
77 72 }
78 73  
79 74  
80   - public void updateApplyOrder(AntenatalExaminationModel antenatalExamination ,String parentId){
  75 + public void updateApplyOrder(AntenatalExaminationModel antenatalExamination, String parentId) {
81 76 ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery();
82 77 referralApplyOrderQuery.setParentId(parentId);
83 78  
... ... @@ -91,6 +86,7 @@
91 86 referralApplyOrderModel.setrLevel("黄");
92 87 applyOrderService.updateByParentId(referralApplyOrderQuery, referralApplyOrderModel);
93 88 }
  89 +
94 90 /**
95 91 * 增加或修改产前检查记录(初诊)
96 92 *
97 93  
... ... @@ -108,7 +104,89 @@
108 104 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
109 105 }
110 106  
  107 + /**
  108 + * 查询产妇所有产检的数据
  109 + *
  110 + * @param exListQueryRequest
  111 + * @return
  112 + */
  113 + public BaseResponse findAntExList(AntExListQueryRequest exListQueryRequest) {
  114 + PatientsQuery patientsQuery = new PatientsQuery();
  115 + patientsQuery.setCardNo(exListQueryRequest.getCardNo());
  116 + patientsQuery.setYn(YnEnums.YES.getId());
  117 + patientsQuery.setPhone(exListQueryRequest.getPhone());
  118 + //获取所有的建档记录
  119 + List<Patients> list = patientsService.queryPatient(patientsQuery);
  120 + List listDate = new ArrayList();
  121 + int i = 0;
  122 + if (CollectionUtils.isNotEmpty(list)) {
  123 + for (Patients patients : list) {
  124 + List<AntData> data = new ArrayList<>();
  125 + MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
  126 + matDeliverQuery.setYn(YnEnums.YES.getId());
  127 + matDeliverQuery.setParentId(patients.getId());
  128 + //建档记录
  129 + data.add(new AntData(patients));
  130 + //分娩记录
  131 + List<MaternalDeliverModel> modelList = matDeliverService.query(matDeliverQuery);
  132 + String dueDate = "";
  133 + if (CollectionUtils.isNotEmpty(modelList)) {
  134 + MaternalDeliverModel model = modelList.get(0);
  135 + dueDate = model.getDueDate();
  136 + }
  137 + PostReviewQuery postReviewQuery = null;
  138 + if (StringUtils.isNotEmpty(dueDate)) {
  139 + Date date = DateUtil.parseYMD(dueDate);
  140 + //初诊记录
  141 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  142 + antExChuQuery.setYn(YnEnums.YES.getId());
  143 + antExChuQuery.setStart(patients.getCreated());
  144 + antExChuQuery.setEnd(new Date(date.getTime() + 86398000));
  145 + antExChuQuery.setParentId(patients.getId());
  146 + List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery);
  147 + if (CollectionUtils.isNotEmpty(antExChuModels)) {
  148 + for (AntExChuModel an : antExChuModels) {
  149 + data.add(new AntData(an));
  150 + }
  151 + }
  152 + //复诊记录
  153 + AntExQuery antExQuery = new AntExQuery();
  154 + antExQuery.setYn(YnEnums.YES.getId());
  155 + antExQuery.setParentId(patients.getId());
  156 + antExQuery.setStart(patients.getCreated());
  157 + antExQuery.setEnd(new Date(date.getTime() + 86398000));
  158 + List<AntenatalExaminationModel> list1 = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery());
  159 + if (CollectionUtils.isNotEmpty(list1)) {
  160 + for (AntenatalExaminationModel an : list1) {
  161 + data.add(new AntData(an));
  162 + }
  163 + }
  164 + postReviewQuery = new PostReviewQuery();
  165 + postReviewQuery.setYn(YnEnums.YES.getId());
  166 + postReviewQuery.setStart(date);
  167 + //下次建档记录前都是产后复查
  168 + postReviewQuery.setEnd(list.size() - 1 > i ? list.get(i).getCreated() : new Date());
  169 + postReviewQuery.setParentId(patients.getId());
  170 + }
  171 + i++;
  172 + //分娩记录
  173 + if (CollectionUtils.isNotEmpty(modelList)) {
  174 + data.add(new AntData(modelList.get(0),patients.getLastMenses()));
  175 + }
  176 + //产后复查记录
  177 + List<PostReviewModel> reviewModels=postReviewService.findWithList(postReviewQuery);
  178 + if(CollectionUtils.isNotEmpty(reviewModels)){
  179 + for(PostReviewModel postReviewModel:reviewModels){
  180 + data.add(new AntData(postReviewModel));
  181 + }
  182 + }
  183 + listDate.add(data);
  184 + }
  185 + }
111 186  
  187 + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(listDate);
  188 + }
  189 +
112 190 /**
113 191 * 删除一条产前检查
114 192 *
115 193  
... ... @@ -138,12 +216,14 @@
138 216 * @param vcCardNo
139 217 * @return
140 218 */
141   - public Patients findOnePatient(String cardNo, String vcCardNo) {
  219 + public Patients findOnePatient(String cardNo, String vcCardNo, String id) {
142 220 PatientsQuery patientsQuery = new PatientsQuery();
143 221 if (StringUtils.isNotEmpty(cardNo)) {
144 222 patientsQuery.setCardNo(cardNo);
145 223 } else if (StringUtils.isNotEmpty(vcCardNo)) {
146 224 patientsQuery.setVcCardNo(vcCardNo);
  225 + } else if (StringUtils.isNotEmpty(id)) {
  226 + patientsQuery.setId(id);
147 227 }
148 228  
149 229 patientsQuery.setYn(YnEnums.YES.getId());
... ... @@ -176,7 +256,7 @@
176 256 }
177 257 } else {
178 258 //查询产妇数据
179   - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo());
  259 + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null);
180 260 }
181 261  
182 262 if (null == patients) {
183 263  
184 264  
185 265  
186 266  
... ... @@ -270,22 +350,24 @@
270 350 map.put("ydqjd", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.YDQJD));
271 351 map.put("fxys", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.FXYS));
272 352 map.put("gwfz", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.GWFZ));
273   - map.put("organizations",convert());
  353 + map.put("organizations", convert());
274 354 return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
275 355 }
276   - public List convert(){
  356 +
  357 + public List convert() {
277 358 List<Organization> organization = organizationService.queryHospital();
278 359 List data = new ArrayList();
279   - if(CollectionUtils.isNotEmpty(organization)){
280   - for(Organization org:organization){
  360 + if (CollectionUtils.isNotEmpty(organization)) {
  361 + for (Organization org : organization) {
281 362 Map map = new HashMap();
282   - map.put("id",org.getId());
283   - map.put("name",org.getName());
  363 + map.put("id", org.getId());
  364 + map.put("name", org.getName());
284 365 data.add(map);
285 366 }
286 367 }
287 368 return data;
288 369 }
  370 +
289 371 public List<Object> getFuZhong() {
290 372 List<Object> list = new ArrayList<>();
291 373 for (FuZhongEnums enums : FuZhongEnums.values()) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 0e332b1
... ... @@ -134,7 +134,7 @@
134 134 */
135 135 public BaseResponse queryMatDeliver(MatDeliverQueryRequest deliverQueryRequest) {
136 136 //获取
137   - Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo());
  137 + Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(),null);
138 138 if (null == patients) {
139 139 return new BaseResponse().setErrormsg("没有相关的产妇记录").setErrorcode(ErrorCodeConstants.BUSINESS_ERROR);
140 140 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExListQueryRequest.java View file @ 0e332b1
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +import com.lyms.platform.common.core.annotation.form.Form;
  4 +import com.lyms.platform.common.core.annotation.form.FormParam;
  5 +
  6 +/**
  7 + *
  8 + * 孕妇建档列表
  9 + *
  10 + * Created by Administrator on 2016/7/5 0005.
  11 + */
  12 +
  13 +@Form
  14 +public class AntExListQueryRequest {
  15 +
  16 + private String parentId;
  17 + @FormParam
  18 + private String cardNo;
  19 + @FormParam
  20 + private String phone;
  21 +
  22 + public String getPhone() {
  23 + return phone;
  24 + }
  25 +
  26 + public void setPhone(String phone) {
  27 + this.phone = phone;
  28 + }
  29 +
  30 + public String getCardNo() {
  31 + return cardNo;
  32 + }
  33 +
  34 + public void setCardNo(String cardNo) {
  35 + this.cardNo = cardNo;
  36 + }
  37 +
  38 + public String getParentId() {
  39 + return parentId;
  40 + }
  41 +
  42 + public void setParentId(String parentId) {
  43 + this.parentId = parentId;
  44 + }
  45 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntData.java View file @ 0e332b1
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.utils.DateUtil;
  4 +import com.lyms.platform.pojo.*;
  5 +
  6 +import java.util.Date;
  7 +
  8 +public class AntData {
  9 + private String dueWeek;
  10 + private String id;
  11 + private String checkTime;
  12 + private String title;
  13 + //1 建档 2初诊 3 复诊 4 产后分娩 5 产后复查
  14 + private String type;
  15 +
  16 + public String getType() {
  17 + return type;
  18 + }
  19 +
  20 + public void setType(String type) {
  21 + this.type = type;
  22 + }
  23 +
  24 + public String getTitle() {
  25 + return title;
  26 + }
  27 +
  28 + public void setTitle(String title) {
  29 + this.title = title;
  30 + }
  31 +
  32 + public AntData(AntenatalExaminationModel model) {
  33 + this.id = model.getId();
  34 + this.dueWeek = model.getCurrentDueDate();
  35 + this.checkTime = model.getCheckDate();
  36 + this.title="产前复诊";
  37 + this.type="3";
  38 + }
  39 +
  40 + public AntData(AntExChuModel model) {
  41 + this.id = model.getId();
  42 + int days = DateUtil.daysBetween(model.getLastMenses(), new Date());
  43 + String week = (days / 7) + "";
  44 + int day = (days % 7);
  45 + this.dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : "");
  46 + this.checkTime = model.getCheckTime();
  47 + this.title="产前初诊";
  48 + this.type="2";
  49 + }
  50 +
  51 + public AntData(Patients model) {
  52 + this.id = model.getId();
  53 + int days = DateUtil.daysBetween(model.getLastMenses(), new Date());
  54 + String week = (days / 7) + "";
  55 + int day = (days % 7);
  56 + this.dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : "");
  57 + this.checkTime = DateUtil.getyyyy_MM_dd(model.getCreated());
  58 + this.title="孕妇建档";
  59 + this.type="1";
  60 + }
  61 +
  62 + public AntData(MaternalDeliverModel model,Date lastMenses) {
  63 + this.id = model.getId();
  64 + int days = DateUtil.daysBetween(lastMenses,model.getCreated());
  65 + String week = (days / 7) + "";
  66 + int day = (days % 7);
  67 + this.dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : "");
  68 + this.checkTime = DateUtil.getyyyy_MM_dd(model.getCreated());
  69 + this.title="孕妇分娩";
  70 + this.type="4";
  71 + }
  72 +
  73 + public AntData(PostReviewModel postReviewModel) {
  74 + this.id=postReviewModel.getId();
  75 + this.dueWeek=postReviewModel.getDay();
  76 + this.checkTime=postReviewModel.getCheckTime();
  77 + this.title="产后复查";
  78 + this.type="5";
  79 + }
  80 +
  81 + public String getCheckTime() {
  82 + return checkTime;
  83 + }
  84 +
  85 + public void setCheckTime(String checkTime) {
  86 + this.checkTime = checkTime;
  87 + }
  88 +
  89 + public String getDueWeek() {
  90 + return dueWeek;
  91 + }
  92 +
  93 + public void setDueWeek(String dueWeek) {
  94 + this.dueWeek = dueWeek;
  95 + }
  96 +
  97 + public String getId() {
  98 + return id;
  99 + }
  100 +
  101 + public void setId(String id) {
  102 + this.id = id;
  103 + }
  104 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java View file @ 0e332b1
... ... @@ -148,48 +148,7 @@
148 148 setData(dataList);
149 149 return this;
150 150 }
151   - private class AntData{
152   - private String dueWeek;
153   - private String id;
154   - private String checkTime;
155   - public AntData(AntenatalExaminationModel model){
156   - this.id=model.getId();
157   - this.dueWeek=model.getCurrentDueDate();
158   - this.checkTime=model.getCheckDate();
159   - }
160 151  
161   - public AntData(AntExChuModel model){
162   - this.id=model.getId();
163   - int days= DateUtil.daysBetween(model.getLastMenses(),new Date());
164   - String week= (days/7)+"";
165   - int day = (days%7);
166   - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":"");
167   - this.checkTime=model.getCheckTime();
168   - }
169   - public String getCheckTime() {
170   - return checkTime;
171   - }
172   -
173   - public void setCheckTime(String checkTime) {
174   - this.checkTime = checkTime;
175   - }
176   -
177   - public String getDueWeek() {
178   - return dueWeek;
179   - }
180   -
181   - public void setDueWeek(String dueWeek) {
182   - this.dueWeek = dueWeek;
183   - }
184   -
185   - public String getId() {
186   - return id;
187   - }
188   -
189   - public void setId(String id) {
190   - this.id = id;
191   - }
192   - }
193 152 public List getData() {
194 153 return data;
195 154 }