Commit 92ecd84b9225e022ece92627656254153430ac44
1 parent
bc490f3ec1
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 303 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/PostkfModel.java
View file @
92ecd84
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.result.BaseModel; | |
| 4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 5 | + | |
| 6 | +import java.util.Date; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by Administrator on 2021-05-18. | |
| 10 | + */ | |
| 11 | +@Document(collection = "lyms_postkf") | |
| 12 | +public class PostkfModel extends BaseModel { | |
| 13 | + private String id; | |
| 14 | + //分娩id | |
| 15 | + private String mid; | |
| 16 | + private String pid; | |
| 17 | + private String patientId; | |
| 18 | + //重症急救 | |
| 19 | + private String zzjj; | |
| 20 | + //疾病治疗 | |
| 21 | + private String jbzl; | |
| 22 | + //损伤康复 | |
| 23 | + private String sskf; | |
| 24 | + //胃肠功能减退 | |
| 25 | + private String wcgnjt; | |
| 26 | + //尿失禁 | |
| 27 | + private String nsj; | |
| 28 | + //尿潴留 | |
| 29 | + private String ndl; | |
| 30 | + //乳房 (无奶 乳汁不足、涨奶) | |
| 31 | + private String rf; | |
| 32 | + //恶露异常 | |
| 33 | + private String elyc; | |
| 34 | + //乳腺炎 | |
| 35 | + private String rxy; | |
| 36 | + //盆底肌受损 | |
| 37 | + private String pdjss; | |
| 38 | + //腹直肌受损 | |
| 39 | + private String fzjss; | |
| 40 | + | |
| 41 | + //肥胖 | |
| 42 | + private String fp; | |
| 43 | + | |
| 44 | + //耻骨联合分离 | |
| 45 | + private String cglhfl; | |
| 46 | + | |
| 47 | + //保健预防 | |
| 48 | + private String bjyf; | |
| 49 | + | |
| 50 | + | |
| 51 | + private Date created; | |
| 52 | + | |
| 53 | + private Date modified; | |
| 54 | + | |
| 55 | + private String operaterId; | |
| 56 | + | |
| 57 | + public Date getCreated() { | |
| 58 | + return created; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void setCreated(Date created) { | |
| 62 | + this.created = created; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public Date getModified() { | |
| 66 | + return modified; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setModified(Date modified) { | |
| 70 | + this.modified = modified; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public String getOperaterId() { | |
| 74 | + return operaterId; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setOperaterId(String operaterId) { | |
| 78 | + this.operaterId = operaterId; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public String getId() { | |
| 82 | + return id; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setId(String id) { | |
| 86 | + this.id = id; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public String getMid() { | |
| 90 | + return mid; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setMid(String mid) { | |
| 94 | + this.mid = mid; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getPid() { | |
| 98 | + return pid; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setPid(String pid) { | |
| 102 | + this.pid = pid; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getPatientId() { | |
| 106 | + return patientId; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setPatientId(String patientId) { | |
| 110 | + this.patientId = patientId; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public String getZzjj() { | |
| 114 | + return zzjj; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setZzjj(String zzjj) { | |
| 118 | + this.zzjj = zzjj; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public String getJbzl() { | |
| 122 | + return jbzl; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setJbzl(String jbzl) { | |
| 126 | + this.jbzl = jbzl; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public String getSskf() { | |
| 130 | + return sskf; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public void setSskf(String sskf) { | |
| 134 | + this.sskf = sskf; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public String getWcgnjt() { | |
| 138 | + return wcgnjt; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setWcgnjt(String wcgnjt) { | |
| 142 | + this.wcgnjt = wcgnjt; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public String getNsj() { | |
| 146 | + return nsj; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public void setNsj(String nsj) { | |
| 150 | + this.nsj = nsj; | |
| 151 | + } | |
| 152 | + | |
| 153 | + public String getNdl() { | |
| 154 | + return ndl; | |
| 155 | + } | |
| 156 | + | |
| 157 | + public void setNdl(String ndl) { | |
| 158 | + this.ndl = ndl; | |
| 159 | + } | |
| 160 | + | |
| 161 | + public String getRf() { | |
| 162 | + return rf; | |
| 163 | + } | |
| 164 | + | |
| 165 | + public void setRf(String rf) { | |
| 166 | + this.rf = rf; | |
| 167 | + } | |
| 168 | + | |
| 169 | + public String getElyc() { | |
| 170 | + return elyc; | |
| 171 | + } | |
| 172 | + | |
| 173 | + public void setElyc(String elyc) { | |
| 174 | + this.elyc = elyc; | |
| 175 | + } | |
| 176 | + | |
| 177 | + public String getRxy() { | |
| 178 | + return rxy; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public void setRxy(String rxy) { | |
| 182 | + this.rxy = rxy; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public String getPdjss() { | |
| 186 | + return pdjss; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public void setPdjss(String pdjss) { | |
| 190 | + this.pdjss = pdjss; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public String getFzjss() { | |
| 194 | + return fzjss; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public void setFzjss(String fzjss) { | |
| 198 | + this.fzjss = fzjss; | |
| 199 | + } | |
| 200 | + | |
| 201 | + public String getFp() { | |
| 202 | + return fp; | |
| 203 | + } | |
| 204 | + | |
| 205 | + public void setFp(String fp) { | |
| 206 | + this.fp = fp; | |
| 207 | + } | |
| 208 | + | |
| 209 | + public String getCglhfl() { | |
| 210 | + return cglhfl; | |
| 211 | + } | |
| 212 | + | |
| 213 | + public void setCglhfl(String cglhfl) { | |
| 214 | + this.cglhfl = cglhfl; | |
| 215 | + } | |
| 216 | + | |
| 217 | + public String getBjyf() { | |
| 218 | + return bjyf; | |
| 219 | + } | |
| 220 | + | |
| 221 | + public void setBjyf(String bjyf) { | |
| 222 | + this.bjyf = bjyf; | |
| 223 | + } | |
| 224 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostkfController.java
View file @
92ecd84
| 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.result.BaseResponse; | |
| 6 | +import com.lyms.platform.operate.web.facade.PostkfFaccade; | |
| 7 | +import com.lyms.platform.pojo.PostkfModel; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.stereotype.Controller; | |
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 12 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 13 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 14 | + | |
| 15 | +import javax.servlet.http.HttpServletRequest; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * Created by Administrator on 2021-05-18. | |
| 19 | + */ | |
| 20 | +@Controller | |
| 21 | +public class PostkfController extends BaseController { | |
| 22 | + | |
| 23 | + @Autowired | |
| 24 | + private PostkfFaccade postkfFaccade; | |
| 25 | + | |
| 26 | + @TokenRequired | |
| 27 | + @ResponseBody | |
| 28 | + @RequestMapping(value = "/addPostKf", method = RequestMethod.POST) | |
| 29 | + public BaseResponse addPostKf(HttpServletRequest request,PostkfModel postkfModel) { | |
| 30 | + return postkfFaccade.addPostKf(postkfModel,getUserId(request)); | |
| 31 | + } | |
| 32 | + | |
| 33 | + | |
| 34 | + @TokenRequired | |
| 35 | + @ResponseBody | |
| 36 | + @RequestMapping(value = "/getPostKf", method = RequestMethod.GET) | |
| 37 | + public BaseResponse getPostKf(HttpServletRequest request,@RequestParam(required = true) String mid) { | |
| 38 | + return postkfFaccade.getPostKf(mid, getUserId(request)); | |
| 39 | + } | |
| 40 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostkfFaccade.java
View file @
92ecd84
| 1 | +package com.lyms.platform.operate.web.facade; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 4 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 5 | +import com.lyms.platform.common.result.BaseResponse; | |
| 6 | +import com.lyms.platform.pojo.PatientWeight; | |
| 7 | +import com.lyms.platform.pojo.PostkfModel; | |
| 8 | +import org.apache.commons.collections.CollectionUtils; | |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
| 11 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 12 | +import org.springframework.data.mongodb.core.query.Query; | |
| 13 | +import org.springframework.stereotype.Component; | |
| 14 | + | |
| 15 | +import java.util.Date; | |
| 16 | +import java.util.List; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * Created by Administrator on 2021-05-18. | |
| 20 | + */ | |
| 21 | +@Component | |
| 22 | +public class PostkfFaccade { | |
| 23 | + | |
| 24 | + @Autowired | |
| 25 | + private MongoTemplate mongoTemplate; | |
| 26 | + | |
| 27 | + public BaseResponse addPostKf(PostkfModel postkfModel, Integer userId) { | |
| 28 | + postkfModel.setOperaterId(String.valueOf(userId)); | |
| 29 | + postkfModel.setCreated(new Date()); | |
| 30 | + postkfModel.setModified(new Date()); | |
| 31 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 32 | + } | |
| 33 | + | |
| 34 | + public BaseResponse getPostKf(String mid, Integer userId) { | |
| 35 | + List<PostkfModel> postkfModels = mongoTemplate.find(Query.query(Criteria.where("mid"). | |
| 36 | + is(mid)), PostkfModel.class); | |
| 37 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(CollectionUtils.isNotEmpty(postkfModels) ? postkfModels.get(0) : null); | |
| 38 | + } | |
| 39 | +} |