Commit 44c44e5c38f8fc18c22c57c35754ad85026bc499

Authored by jiangjiazhi
1 parent 188cfa5b73

增加字段

Showing 14 changed files with 731 additions and 40 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/ISieveDao.java View file @ 44c44e5
... ... @@ -4,6 +4,8 @@
4 4 import com.lyms.platform.pojo.SieveModel;
5 5 import com.lyms.platform.pojo.SieveResultModel;
6 6  
  7 +import java.util.List;
  8 +
7 9 /**
8 10 * Created by Administrator on 2016/6/30 0030.
9 11 */
... ... @@ -44,6 +46,13 @@
44 46 */
45 47 void addChanQianSieve(SieveModel sieveModel);
46 48  
  49 + /**
  50 + * 查询产筛列表
  51 + *
  52 + * @param sieveQuery
  53 + * @return
  54 + */
  55 + List<SieveModel> queryList(MongoQuery sieveQuery);
47 56  
48 57 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/SieveDaoImpl.java View file @ 44c44e5
... ... @@ -13,6 +13,8 @@
13 13 import org.springframework.stereotype.Repository;
14 14 import org.springframework.util.Assert;
15 15  
  16 +import java.util.List;
  17 +
16 18 /**
17 19 * Created by Administrator on 2016/6/30 0030.
18 20 */
19 21  
... ... @@ -46,9 +48,15 @@
46 48 Assert.notNull(update, "execute update method must not null.");
47 49 mongoTemplate.updateMulti(new MongoQuery(new MongoCondition("id", sieveModel.getId(), MongoOper.IS)).convertToMongoQuery(), update, SieveModel.class);
48 50 }
49   - public void addChanQianSieve(SieveModel sieveModel){
  51 +
  52 + public void addChanQianSieve(SieveModel sieveModel) {
50 53 Assert.notNull(sieveModel, "execute insert method must not null.");
51 54 mongoTemplate.insert(sieveModel);
  55 + }
  56 +
  57 + public List<SieveModel> queryList(MongoQuery sieveQuery) {
  58 + Assert.notNull(sieveQuery, "execute find method query must not null.");
  59 + return mongoTemplate.find(sieveQuery.convertToMongoQuery(), SieveModel.class);
52 60 }
53 61 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/SieveService.java View file @ 44c44e5
... ... @@ -4,10 +4,13 @@
4 4 import com.lyms.platform.common.enums.YnEnums;
5 5 import com.lyms.platform.pojo.SieveModel;
6 6 import com.lyms.platform.pojo.SieveResultModel;
  7 +import com.lyms.platform.query.SieveQuery;
7 8 import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.data.domain.Sort;
8 10 import org.springframework.stereotype.Service;
9 11  
10 12 import java.util.Date;
  13 +import java.util.List;
11 14  
12 15 /**
13 16 * Created by Administrator on 2016/6/30 0030.
14 17  
15 18  
16 19  
17 20  
... ... @@ -18,27 +21,32 @@
18 21 @Autowired
19 22 private ISieveDao iSieveDao;
20 23  
21   - public SieveResultModel addSieve(SieveResultModel obj){
  24 + public SieveResultModel addSieve(SieveResultModel obj) {
22 25 obj.setModified(new Date());
23 26 obj.setCreated(new Date());
24 27 obj.setYn(YnEnums.YES.getId());
25 28 return iSieveDao.addSieveResult(obj);
26 29 }
27 30  
28   - public SieveResultModel findById(String id){
29   - return iSieveDao.findById(id);
  31 + public SieveResultModel findById(String id) {
  32 + return iSieveDao.findById(id);
30 33 }
31 34  
32 35  
33   - public void updateOneChanQianDiaSieve(SieveModel sieveModel){
  36 + public void updateOneChanQianDiaSieve(SieveModel sieveModel) {
34 37 sieveModel.setModified(new Date());
35 38 iSieveDao.updateChanQianSieve(sieveModel);
36 39 }
37   - public void addChanQianSieve(SieveModel sieveModel){
  40 +
  41 + public void addChanQianSieve(SieveModel sieveModel) {
38 42 sieveModel.setModified(new Date());
39 43 sieveModel.setCreated(new Date());
40 44 sieveModel.setYn(YnEnums.YES.getId());
41 45 iSieveDao.addChanQianSieve(sieveModel);
  46 + }
  47 +
  48 + public List<SieveModel> queryList(SieveQuery sieveQuery) {
  49 + return iSieveDao.queryList(sieveQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
42 50 }
43 51 }
platform-common/src/main/java/com/lyms/platform/common/enums/ChanQResultEnums.java View file @ 44c44e5
... ... @@ -65,6 +65,14 @@
65 65 public void setName(String name) {
66 66 this.name = name;
67 67 }
  68 + public static String getTitle(Integer id){
  69 + for(CqResult enums:values()){
  70 + if(id==enums.getId()){
  71 + return enums.getName();
  72 + }
  73 + }
  74 + return null;
  75 + }
68 76 }
69 77 }
platform-common/src/main/java/com/lyms/platform/common/enums/RenShenJieJuEnums.java View file @ 44c44e5
... ... @@ -4,21 +4,21 @@
4 4 * Created by Administrator on 2016/6/24 0024.
5 5 */
6 6 public enum RenShenJieJuEnums {
7   - O("活产", "0"),O1("死胎", "1"),O2("噙软胎", "2");
  7 + O("活产", 0),O1("死胎", 1),O2("噙软胎", 2);
8 8  
9   - private RenShenJieJuEnums(String name, String id) {
  9 + private RenShenJieJuEnums(String name, Integer id) {
10 10 this.name = name;
11 11 this.id = id;
12 12 }
13 13  
14 14 private String name;
15   - private String id;
  15 + private Integer id;
16 16  
17   - public String getId() {
  17 + public Integer getId() {
18 18 return id;
19 19 }
20 20  
21   - public void setId(String id) {
  21 + public void setId(Integer id) {
22 22 this.id = id;
23 23 }
24 24  
... ... @@ -28,6 +28,14 @@
28 28  
29 29 public void setName(String name) {
30 30 this.name = name;
  31 + }
  32 + public static String getTitle(Integer id){
  33 + for(RenShenJieJuEnums enums:values()){
  34 + if(id==enums.getId()){
  35 + return enums.getName();
  36 + }
  37 + }
  38 + return null;
31 39 }
32 40 }
platform-common/src/main/java/com/lyms/platform/common/enums/SieveEnums.java View file @ 44c44e5
... ... @@ -31,5 +31,13 @@
31 31 public void setName(String name) {
32 32 this.name = name;
33 33 }
  34 + public static String getTitle(Integer id){
  35 + for(SieveEnums enums:values()){
  36 + if(id==enums.getId()){
  37 + return enums.getName();
  38 + }
  39 + }
  40 + return null;
  41 + }
34 42 }
platform-common/src/main/java/com/lyms/platform/common/enums/TaiPanEnums.java View file @ 44c44e5
... ... @@ -12,6 +12,15 @@
12 12 O4("五胎","5"),
13 13 O5("六胎","6"),
14 14 O6("七胎","7");
  15 +
  16 + public static String getTitle(String id){
  17 + for(TaiPanEnums enums:values()){
  18 + if(id==enums.getId()){
  19 + return enums.getName();
  20 + }
  21 + }
  22 + return null;
  23 + }
15 24 public enum TpEnums {
16 25 O("完整","1"),O1("不完整","2");
17 26 private TpEnums(String name,String id){
platform-dal/src/main/java/com/lyms/platform/pojo/SieveModel.java View file @ 44c44e5
... ... @@ -31,9 +31,11 @@
31 31 //产前诊断 1 已检查 0 未检查
32 32 private Integer cqStatus;
33 33 //产前诊断结果
34   - private String cqResult;
  34 + private Integer cqResult;
35 35 //妊娠结局
36   - private String renShenResult;
  36 + private Integer renShenResult;
  37 + //1 待产筛 2 产筛中 3 完成产筛 4 完成产诊
  38 + private Integer status;
37 39  
38 40 // 诊断时间
39 41 private String diaTime;
40 42  
41 43  
... ... @@ -54,14 +56,30 @@
54 56 this.yn = yn;
55 57 }
56 58  
57   - public String getCqResult() {
  59 + public Integer getRenShenResult() {
  60 + return renShenResult;
  61 + }
  62 +
  63 + public Integer getCqResult() {
58 64 return cqResult;
59 65 }
60 66  
61   - public void setCqResult(String cqResult) {
  67 + public void setCqResult(Integer cqResult) {
62 68 this.cqResult = cqResult;
63 69 }
64 70  
  71 + public void setRenShenResult(Integer renShenResult) {
  72 + this.renShenResult = renShenResult;
  73 + }
  74 +
  75 + public Integer getStatus() {
  76 + return status;
  77 + }
  78 +
  79 + public void setStatus(Integer status) {
  80 + this.status = status;
  81 + }
  82 +
65 83 public Integer getCqStatus() {
66 84 return cqStatus;
67 85 }
68 86  
... ... @@ -158,13 +176,7 @@
158 176 this.publishName = publishName;
159 177 }
160 178  
161   - public String getRenShenResult() {
162   - return renShenResult;
163   - }
164 179  
165   - public void setRenShenResult(String renShenResult) {
166   - this.renShenResult = renShenResult;
167   - }
168 180  
169 181 public Integer getTireNumber() {
170 182 return tireNumber;
platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java View file @ 44c44e5
  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.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
  7 +import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +
  9 +import java.util.Date;
  10 +
  11 +/**
  12 + *
  13 + * 产前筛查
  14 + *
  15 + * Created by Administrator on 2016/7/5 0005.
  16 + */
  17 +public class SieveQuery extends BaseQuery implements IConvertToNativeQuery {
  18 +
  19 + private String id;
  20 + //患者id
  21 + private String parentId;
  22 + //姓名
  23 + private String name;
  24 + //胎数
  25 + private Integer tireNumber;
  26 + //整体风险
  27 + private Integer ztfx;
  28 + //联系方式
  29 + private String phone;
  30 + //申请孕周
  31 + private String dueWeek;
  32 + //产前诊断 1 已检查 0 未检查
  33 + private Integer cqStatus;
  34 + //产前诊断结果
  35 + private Integer cqResult;
  36 + //妊娠结局
  37 + private Integer renShenResult;
  38 + //状态
  39 + private Integer status;
  40 + private String cardNo;
  41 +
  42 + private Integer yn;
  43 +
  44 + //孕周开始
  45 + private Date dueWeekStart;
  46 + //孕周结束
  47 + private Date dueWeekEnd;
  48 +
  49 + //是否通知
  50 + private Integer isNotify;
  51 +
  52 + public Integer getIsNotify() {
  53 + return isNotify;
  54 + }
  55 +
  56 + public void setIsNotify(Integer isNotify) {
  57 + this.isNotify = isNotify;
  58 + }
  59 +
  60 + public Date getDueWeekEnd() {
  61 + return dueWeekEnd;
  62 + }
  63 +
  64 + public void setDueWeekEnd(Date dueWeekEnd) {
  65 + this.dueWeekEnd = dueWeekEnd;
  66 + }
  67 +
  68 + public Date getDueWeekStart() {
  69 + return dueWeekStart;
  70 + }
  71 +
  72 + public void setDueWeekStart(Date dueWeekStart) {
  73 + this.dueWeekStart = dueWeekStart;
  74 + }
  75 +
  76 + public Integer getStatus() {
  77 + return status;
  78 + }
  79 +
  80 + public String getCardNo() {
  81 + return cardNo;
  82 + }
  83 +
  84 + public void setCardNo(String cardNo) {
  85 + this.cardNo = cardNo;
  86 + }
  87 +
  88 + public void setStatus(Integer status) {
  89 + this.status = status;
  90 + }
  91 +
  92 + @Override
  93 + public MongoQuery convertToQuery() {
  94 + MongoCondition condition = MongoCondition.newInstance();
  95 + if (null != id) {
  96 + condition = condition.and("id", id, MongoOper.IS);
  97 + }
  98 + if (null != parentId) {
  99 + condition = condition.and("parentId", parentId, MongoOper.IS);
  100 + }
  101 + if (null != name) {
  102 + condition = condition.and("name", name, MongoOper.IS);
  103 + }
  104 + if (null != tireNumber) {
  105 + condition = condition.and("tireNumber", tireNumber, MongoOper.IS);
  106 + }
  107 + if (null != ztfx) {
  108 + condition = condition.and("ztfx", ztfx, MongoOper.IS);
  109 + }
  110 + if (null != phone) {
  111 + condition = condition.and("phone", phone, MongoOper.IS);
  112 + }
  113 + if (null != dueWeek) {
  114 + condition = condition.and("dueWeek", dueWeek, MongoOper.IS);
  115 + }
  116 + if (null != cqStatus) {
  117 + condition = condition.and("cqStatus", cqStatus, MongoOper.IS);
  118 + }
  119 +
  120 + if (null != cqResult) {
  121 + condition = condition.and("cqResult", cqResult, MongoOper.IS);
  122 + }
  123 + if (null != renShenResult) {
  124 + condition = condition.and("renShenResult", renShenResult, MongoOper.IS);
  125 + }
  126 + return condition.toMongoQuery();
  127 + }
  128 +
  129 +
  130 + public Integer getCqResult() {
  131 + return cqResult;
  132 + }
  133 +
  134 + public void setCqResult(Integer cqResult) {
  135 + this.cqResult = cqResult;
  136 + }
  137 +
  138 + public void setRenShenResult(Integer renShenResult) {
  139 + this.renShenResult = renShenResult;
  140 + }
  141 +
  142 + public Integer getCqStatus() {
  143 + return cqStatus;
  144 + }
  145 +
  146 + public void setCqStatus(Integer cqStatus) {
  147 + this.cqStatus = cqStatus;
  148 + }
  149 +
  150 +
  151 + public String getDueWeek() {
  152 + return dueWeek;
  153 + }
  154 +
  155 + public void setDueWeek(String dueWeek) {
  156 + this.dueWeek = dueWeek;
  157 + }
  158 +
  159 + public String getId() {
  160 + return id;
  161 + }
  162 +
  163 + public void setId(String id) {
  164 + this.id = id;
  165 + }
  166 +
  167 + public String getName() {
  168 + return name;
  169 + }
  170 +
  171 + public void setName(String name) {
  172 + this.name = name;
  173 + }
  174 +
  175 + public String getParentId() {
  176 + return parentId;
  177 + }
  178 +
  179 + public void setParentId(String parentId) {
  180 + this.parentId = parentId;
  181 + }
  182 +
  183 + public String getPhone() {
  184 + return phone;
  185 + }
  186 +
  187 + public void setPhone(String phone) {
  188 + this.phone = phone;
  189 + }
  190 +
  191 +
  192 +
  193 + public Integer getTireNumber() {
  194 + return tireNumber;
  195 + }
  196 +
  197 + public void setTireNumber(Integer tireNumber) {
  198 + this.tireNumber = tireNumber;
  199 + }
  200 +
  201 + public Integer getYn() {
  202 + return yn;
  203 + }
  204 +
  205 + public void setYn(Integer yn) {
  206 + this.yn = yn;
  207 + }
  208 +
  209 + public Integer getZtfx() {
  210 + return ztfx;
  211 + }
  212 +
  213 + public void setZtfx(Integer ztfx) {
  214 + this.ztfx = ztfx;
  215 + }
  216 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java View file @ 44c44e5
1 1 package com.lyms.platform.operate.web.controller;
2 2  
  3 +import com.lyms.platform.common.constants.ErrorCodeConstants;
  4 +import com.lyms.platform.common.enums.ChanQResultEnums;
  5 +import com.lyms.platform.common.enums.FuZhongEnums;
  6 +import com.lyms.platform.common.enums.RenShenJieJuEnums;
  7 +import com.lyms.platform.common.enums.SieveEnums;
  8 +import com.lyms.platform.common.result.BaseObjectResponse;
3 9 import com.lyms.platform.common.result.BaseResponse;
4 10 import com.lyms.platform.operate.web.facade.SieveFacade;
5 11 import com.lyms.platform.operate.web.request.ChanQianDiaAddRequest;
  12 +import com.lyms.platform.operate.web.request.CqSieveQueryRequest;
6 13 import com.lyms.platform.operate.web.request.SieveAddRequest;
7 14 import org.springframework.beans.factory.annotation.Autowired;
8 15 import org.springframework.stereotype.Controller;
9 16 import org.springframework.web.bind.annotation.RequestBody;
  17 +import org.springframework.web.bind.annotation.RequestMapping;
  18 +import org.springframework.web.bind.annotation.RequestMethod;
  19 +import org.springframework.web.bind.annotation.ResponseBody;
10 20  
11 21 import javax.validation.Valid;
  22 +import java.util.ArrayList;
  23 +import java.util.HashMap;
  24 +import java.util.List;
  25 +import java.util.Map;
12 26  
13 27 /**
14 28 * 产筛接口
... ... @@ -26,6 +40,8 @@
26 40 * @param sieveAddRequest
27 41 * @return
28 42 */
  43 + @ResponseBody
  44 + @RequestMapping(value = "/sieve",method = RequestMethod.POST)
29 45 public BaseResponse addOneSieve(@RequestBody @Valid SieveAddRequest sieveAddRequest) {
30 46 return sieveFacade.addOneSieve(sieveAddRequest);
31 47 }
32 48  
... ... @@ -36,8 +52,78 @@
36 52 * @param chanQianDiaAddRequest
37 53 * @return
38 54 */
  55 + @ResponseBody
  56 + @RequestMapping(value = "/cqsieve",method = RequestMethod.POST)
39 57 public BaseResponse addOneChanQianDiaSieve(@RequestBody @Valid ChanQianDiaAddRequest chanQianDiaAddRequest) {
40 58 return sieveFacade.addOneChanQianDiaSieve(chanQianDiaAddRequest);
  59 + }
  60 +
  61 + @ResponseBody
  62 + @RequestMapping(value = "/cqsieve/enums",method = RequestMethod.GET)
  63 + public BaseResponse getEnums(){
  64 + Map<String, Object> map = new HashMap<>();
  65 + map.put("getChanQResultEnums",getChanQResultEnums());
  66 + map.put("getCqResult",getCqResult());
  67 + map.put("getSieveEnums",getSieveEnums());
  68 + map.put("getRenShenJieJuEnums",getRenShenJieJuEnums());
  69 + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); }
  70 + //产前诊断结果
  71 + public List<Object> getChanQResultEnums() {
  72 + List<Object> list = new ArrayList<>();
  73 + for (ChanQResultEnums enums : ChanQResultEnums.values()) {
  74 + Map<String, Object> resultMap = new HashMap<>();
  75 + resultMap.put("id", enums.getId());
  76 + resultMap.put("name", enums.getName());
  77 + list.add(resultMap);
  78 + }
  79 + return list;
  80 + }
  81 +
  82 + //产前诊断结果
  83 + public List<Object> getCqResult() {
  84 + List<Object> list = new ArrayList<>();
  85 + for (ChanQResultEnums.CqResult enums : ChanQResultEnums.CqResult.values()) {
  86 + Map<String, Object> resultMap = new HashMap<>();
  87 + resultMap.put("id", enums.getId());
  88 + resultMap.put("name", enums.getName());
  89 + list.add(resultMap);
  90 + }
  91 + return list;
  92 + }
  93 +
  94 + //整体风险
  95 + public List<Object> getSieveEnums() {
  96 + List<Object> list = new ArrayList<>();
  97 + for (SieveEnums enums : SieveEnums.values()) {
  98 + Map<String, Object> resultMap = new HashMap<>();
  99 + resultMap.put("id", enums.getId());
  100 + resultMap.put("name", enums.getName());
  101 + list.add(resultMap);
  102 + }
  103 + return list;
  104 + }
  105 +
  106 + //妊娠结局
  107 + public List<Object> getRenShenJieJuEnums() {
  108 + List<Object> list = new ArrayList<>();
  109 + for (RenShenJieJuEnums enums : RenShenJieJuEnums.values()) {
  110 + Map<String, Object> resultMap = new HashMap<>();
  111 + resultMap.put("id", enums.getId());
  112 + resultMap.put("name", enums.getName());
  113 + list.add(resultMap);
  114 + }
  115 + return list;
  116 + }
  117 +
  118 + /**
  119 + * 查询产前筛查列表
  120 + *
  121 + * @return
  122 + */
  123 + @ResponseBody
  124 + @RequestMapping(value = "/cqsieve",method = RequestMethod.GET)
  125 + public BaseResponse queryChanQianSieve(@Valid CqSieveQueryRequest cqSieveQueryRequest){
  126 + return sieveFacade.queryList(cqSieveQueryRequest);
41 127 }
42 128 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ 44c44e5
... ... @@ -2,16 +2,26 @@
2 2  
3 3 import com.lyms.platform.biz.service.SieveService;
4 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
  5 +import com.lyms.platform.common.enums.YnEnums;
  6 +import com.lyms.platform.common.result.BaseListResponse;
5 7 import com.lyms.platform.common.result.BaseResponse;
  8 +import com.lyms.platform.common.utils.DateUtil;
6 9 import com.lyms.platform.operate.web.request.ChanQianDiaAddRequest;
  10 +import com.lyms.platform.operate.web.request.CqSieveQueryRequest;
7 11 import com.lyms.platform.operate.web.request.SieveAddRequest;
  12 +import com.lyms.platform.operate.web.result.SieveListResult;
8 13 import com.lyms.platform.pojo.SieveModel;
  14 +import com.lyms.platform.query.SieveQuery;
  15 +import org.apache.commons.collections.CollectionUtils;
9 16 import org.springframework.beans.factory.annotation.Autowired;
10 17 import org.springframework.stereotype.Component;
11 18  
  19 +import java.util.ArrayList;
  20 +import java.util.List;
  21 +
12 22 /**
13 23 * 产筛门面
14   - *
  24 + * <p>
15 25 * Created by Administrator on 2016/6/30 0030.
16 26 */
17 27 @Component
... ... @@ -25,7 +35,7 @@
25 35 * @param sieveAddRequest
26 36 * @return
27 37 */
28   - public BaseResponse addOneSieve(SieveAddRequest sieveAddRequest){
  38 + public BaseResponse addOneSieve(SieveAddRequest sieveAddRequest) {
29 39 sieveService.addSieve(sieveAddRequest.convertToDataModel());
30 40 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
31 41 }
32 42  
... ... @@ -34,11 +44,10 @@
34 44 * 产前诊断
35 45 *
36 46 * @param chanQianDiaAddRequest
37   - *
38 47 * @return
39 48 */
40   - public BaseResponse addOneChanQianDiaSieve(ChanQianDiaAddRequest chanQianDiaAddRequest) {
41   - SieveModel sieveModel=new SieveModel();
  49 + public BaseResponse addOneChanQianDiaSieve(ChanQianDiaAddRequest chanQianDiaAddRequest) {
  50 + SieveModel sieveModel = new SieveModel();
42 51 sieveModel.setId(chanQianDiaAddRequest.getId());
43 52 sieveModel.setPublishName(chanQianDiaAddRequest.getPublishName());
44 53 sieveModel.setDiaTime(chanQianDiaAddRequest.getDiaTime());
... ... @@ -47,6 +56,42 @@
47 56 sieveModel.setRenShenResult(chanQianDiaAddRequest.getPregnancyOutcome());
48 57 sieveService.updateOneChanQianDiaSieve(sieveModel);
49 58 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  59 + }
  60 +
  61 + /**
  62 + * 查询产筛列表数据
  63 + *
  64 + * @param cqSieveQueryRequest
  65 + * @return
  66 + */
  67 + public BaseResponse queryList(CqSieveQueryRequest cqSieveQueryRequest) {
  68 + SieveQuery sieveQuery = new SieveQuery();
  69 + sieveQuery.setYn(YnEnums.YES.getId());
  70 + sieveQuery.setPhone(cqSieveQueryRequest.getPhone());
  71 + sieveQuery.setStatus(cqSieveQueryRequest.getStatus());
  72 + sieveQuery.setCqResult(cqSieveQueryRequest.getCqResult());
  73 + sieveQuery.setRenShenResult(cqSieveQueryRequest.getRenShenResult());
  74 + sieveQuery.setName(cqSieveQueryRequest.getName());
  75 + sieveQuery.setCardNo(cqSieveQueryRequest.getCardNo());
  76 + sieveQuery.setDueWeekStart(DateUtil.parseYMD(cqSieveQueryRequest.getDueWeekStart()));
  77 + sieveQuery.setDueWeekEnd(DateUtil.parseYMD(cqSieveQueryRequest.getDueWeekEnd()));
  78 + sieveQuery.setZtfx(cqSieveQueryRequest.getZtfx());
  79 + sieveQuery.setIsNotify(cqSieveQueryRequest.getIsNotify());
  80 + sieveQuery.setPage(cqSieveQueryRequest.getPage());
  81 + sieveQuery.setLimit(cqSieveQueryRequest.getLimit());
  82 + sieveQuery.setNeed("1");
  83 +
  84 + //查询产筛list
  85 + List<SieveModel> list = sieveService.queryList(sieveQuery);
  86 + List<SieveListResult> data = new ArrayList<>();
  87 + if (CollectionUtils.isNotEmpty(list)) {
  88 + for (SieveModel sieveModel : list) {
  89 + SieveListResult sieveListResult = new SieveListResult();
  90 + sieveListResult.convertToResult(sieveModel);
  91 + data.add(sieveListResult);
  92 + }
  93 + }
  94 + return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
50 95 }
51 96 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChanQianDiaAddRequest.java View file @ 44c44e5
... ... @@ -17,20 +17,12 @@
17 17 @FormParam
18 18 private String diaUnit;// 诊断单位
19 19 @FormParam
20   - private String diaresult;//诊断结果
  20 + private Integer diaresult;//诊断结果
21 21 @FormParam
22   - private String pregnancyOutcome;// 妊娠结局
  22 + private Integer pregnancyOutcome;// 妊娠结局
23 23 @FormParam
24 24 private String publishName;// 录入人员;
25 25  
26   - public String getDiaresult() {
27   - return diaresult;
28   - }
29   -
30   - public void setDiaresult(String diaresult) {
31   - this.diaresult = diaresult;
32   - }
33   -
34 26 public String getDiaTime() {
35 27 return diaTime;
36 28 }
37 29  
38 30  
... ... @@ -56,12 +48,19 @@
56 48 }
57 49  
58 50  
  51 + public Integer getDiaresult() {
  52 + return diaresult;
  53 + }
59 54  
60   - public String getPregnancyOutcome() {
  55 + public void setDiaresult(Integer diaresult) {
  56 + this.diaresult = diaresult;
  57 + }
  58 +
  59 + public Integer getPregnancyOutcome() {
61 60 return pregnancyOutcome;
62 61 }
63 62  
64   - public void setPregnancyOutcome(String pregnancyOutcome) {
  63 + public void setPregnancyOutcome(Integer pregnancyOutcome) {
65 64 this.pregnancyOutcome = pregnancyOutcome;
66 65 }
67 66  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CqSieveQueryRequest.java View file @ 44c44e5
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +import com.lyms.platform.common.core.annotation.form.FormParam;
  4 +import com.lyms.platform.common.core.annotation.form.Form;
  5 +/**
  6 + * 产前筛查查询请求
  7 + *
  8 + * Created by Administrator on 2016/7/6 0006.
  9 + */
  10 +@Form
  11 +public class CqSieveQueryRequest extends BasePageQueryRequest{
  12 + //孕妇姓名
  13 + @FormParam
  14 + private String name;
  15 + //母亲身份证
  16 + @FormParam
  17 + private String cardNo;
  18 + //孕周开始
  19 + @FormParam
  20 + private String dueWeekStart;
  21 + //孕周结束
  22 + @FormParam
  23 + private String dueWeekEnd;
  24 + //整体风险
  25 + @FormParam
  26 + private Integer ztfx;
  27 + //联系方式
  28 + @FormParam
  29 + private String phone;
  30 + //是否通知
  31 + @FormParam
  32 + private Integer isNotify;
  33 + //产前诊断结果
  34 + @FormParam
  35 + private Integer cqResult;
  36 + //妊娠结局
  37 + @FormParam
  38 + private Integer renShenResult;
  39 + //1 待产筛 2 产筛中 3 完成产筛 4 完成产诊
  40 + @FormParam
  41 + private Integer status;
  42 +
  43 + public Integer getStatus() {
  44 + return status;
  45 + }
  46 +
  47 + public void setStatus(Integer status) {
  48 + this.status = status;
  49 + }
  50 +
  51 + public String getCardNo() {
  52 + return cardNo;
  53 + }
  54 +
  55 + public void setCardNo(String cardNo) {
  56 + this.cardNo = cardNo;
  57 + }
  58 +
  59 + public Integer getCqResult() {
  60 + return cqResult;
  61 + }
  62 +
  63 + public void setCqResult(Integer cqResult) {
  64 + this.cqResult = cqResult;
  65 + }
  66 +
  67 + public String getDueWeekEnd() {
  68 + return dueWeekEnd;
  69 + }
  70 +
  71 + public void setDueWeekEnd(String dueWeekEnd) {
  72 + this.dueWeekEnd = dueWeekEnd;
  73 + }
  74 +
  75 + public String getDueWeekStart() {
  76 + return dueWeekStart;
  77 + }
  78 +
  79 + public void setDueWeekStart(String dueWeekStart) {
  80 + this.dueWeekStart = dueWeekStart;
  81 + }
  82 +
  83 + public Integer getIsNotify() {
  84 + return isNotify;
  85 + }
  86 +
  87 + public void setIsNotify(Integer isNotify) {
  88 + this.isNotify = isNotify;
  89 + }
  90 +
  91 + public String getName() {
  92 + return name;
  93 + }
  94 +
  95 + public void setName(String name) {
  96 + this.name = name;
  97 + }
  98 +
  99 + public String getPhone() {
  100 + return phone;
  101 + }
  102 +
  103 + public void setPhone(String phone) {
  104 + this.phone = phone;
  105 + }
  106 +
  107 + public Integer getRenShenResult() {
  108 + return renShenResult;
  109 + }
  110 +
  111 + public void setRenShenResult(Integer renShenResult) {
  112 + this.renShenResult = renShenResult;
  113 + }
  114 +
  115 + public Integer getZtfx() {
  116 + return ztfx;
  117 + }
  118 +
  119 + public void setZtfx(Integer ztfx) {
  120 + this.ztfx = ztfx;
  121 + }
  122 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java View file @ 44c44e5
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.base.IBasicResultConvert;
  4 +import com.lyms.platform.common.enums.ChanQResultEnums;
  5 +import com.lyms.platform.common.enums.RenShenJieJuEnums;
  6 +import com.lyms.platform.common.enums.SieveEnums;
  7 +import com.lyms.platform.common.enums.TaiPanEnums;
  8 +import com.lyms.platform.common.utils.DateUtil;
  9 +import com.lyms.platform.pojo.Patients;
  10 +import com.lyms.platform.pojo.SieveModel;
  11 +
  12 +import java.util.Date;
  13 +
  14 +/**
  15 + * Created by Administrator on 2016/7/5 0005.
  16 + */
  17 +public class SieveListResult implements IBasicResultConvert<SieveListResult, SieveModel> {
  18 + private String id;
  19 + //患者id
  20 + private String parentId;
  21 + //姓名
  22 + private String name;
  23 + //当前孕周
  24 + private String cDueWeek;
  25 + //胎数
  26 + private String tireNumber;
  27 +
  28 + //申请孕周
  29 + private String dueWeek;
  30 +
  31 + //整体风险
  32 + private String ztfx;
  33 + //联系方式
  34 + private String phone;
  35 +
  36 + //产前诊断 1 已检查 0 未检查
  37 + private String cqStatus;
  38 + //产前诊断结果
  39 + private String cqResult;
  40 + //妊娠结局
  41 + private String renShenResult;
  42 +
  43 + public String getcDueWeek() {
  44 + return cDueWeek;
  45 + }
  46 +
  47 + public void setcDueWeek(String cDueWeek) {
  48 + this.cDueWeek = cDueWeek;
  49 + }
  50 +
  51 + public String getCqResult() {
  52 + return cqResult;
  53 + }
  54 +
  55 + public void setCqResult(String cqResult) {
  56 + this.cqResult = cqResult;
  57 + }
  58 +
  59 + public String getCqStatus() {
  60 + return cqStatus;
  61 + }
  62 +
  63 + public void setCqStatus(String cqStatus) {
  64 + this.cqStatus = cqStatus;
  65 + }
  66 +
  67 + public String getDueWeek() {
  68 + return dueWeek;
  69 + }
  70 +
  71 + public void setDueWeek(String dueWeek) {
  72 + this.dueWeek = dueWeek;
  73 + }
  74 +
  75 + public String getId() {
  76 + return id;
  77 + }
  78 +
  79 + public void setId(String id) {
  80 + this.id = id;
  81 + }
  82 +
  83 + public String getName() {
  84 + return name;
  85 + }
  86 +
  87 + public void setName(String name) {
  88 + this.name = name;
  89 + }
  90 +
  91 + public String getParentId() {
  92 + return parentId;
  93 + }
  94 +
  95 + public void setParentId(String parentId) {
  96 + this.parentId = parentId;
  97 + }
  98 +
  99 + public String getPhone() {
  100 + return phone;
  101 + }
  102 +
  103 + public void setPhone(String phone) {
  104 + this.phone = phone;
  105 + }
  106 +
  107 + public String getRenShenResult() {
  108 + return renShenResult;
  109 + }
  110 +
  111 + public void setRenShenResult(String renShenResult) {
  112 + this.renShenResult = renShenResult;
  113 + }
  114 +
  115 + public String getTireNumber() {
  116 + return tireNumber;
  117 + }
  118 +
  119 + public void setTireNumber(String tireNumber) {
  120 + this.tireNumber = tireNumber;
  121 + }
  122 +
  123 + public String getZtfx() {
  124 + return ztfx;
  125 + }
  126 +
  127 + public void setZtfx(String ztfx) {
  128 + this.ztfx = ztfx;
  129 + }
  130 +
  131 + @Override
  132 + public SieveListResult convertToResult(SieveModel destModel) {
  133 + setId(destModel.getId());
  134 + setParentId(destModel.getParentId());
  135 + setName(destModel.getName());
  136 + int days= DateUtil.daysBetween(destModel.getLastMenses(), new Date());
  137 + String week= (days/7)+"";
  138 + int day = (days%7);
  139 + this.cDueWeek="孕"+week+"周" +(day>0?"+"+day+"天":"");
  140 + setTireNumber(TaiPanEnums.getTitle(destModel.getTireNumber() + ""));
  141 + setDueWeek(destModel.getDueWeek());
  142 + setZtfx(SieveEnums.getTitle(destModel.getZtfx()));
  143 + setPhone(destModel.getPhone());
  144 + setCqStatus(ChanQResultEnums.getTitle(destModel.getCqStatus()));
  145 + setCqResult(ChanQResultEnums.CqResult.getTitle(destModel.getCqResult()));
  146 + setRenShenResult(RenShenJieJuEnums.getTitle(destModel.getRenShenResult()));
  147 + //整体风险枚举
  148 +// SieveEnums.
  149 + //妊娠结局
  150 +// RenShenJieJuEnums
  151 + return this;
  152 + }
  153 +}