Commit 23509daa2c92b656038b470ca860998ff0759e3e

Authored by jesse.wang
1 parent 2fa40af15b
Exists in master

2

Showing 2 changed files with 76 additions and 82 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/NutritionManagementController.java View file @ 23509da
  1 +package com.lyms.talkonlineweb.controller;
  2 +
  3 +import com.lyms.talkonlineweb.annotation.TokenRequired;
  4 +import com.lyms.talkonlineweb.domain.LymsHisInfo;
  5 +import com.lyms.talkonlineweb.domain.LymsNutrition;
  6 +import com.lyms.talkonlineweb.result.BaseResponse;
  7 +import com.lyms.talkonlineweb.service.LymsHisInfoService;
  8 +import com.lyms.talkonlineweb.service.LymsNutritionService;
  9 +import com.lyms.talkonlineweb.util.StringUtil;
  10 +import lombok.extern.log4j.Log4j2;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.validation.annotation.Validated;
  13 +import org.springframework.web.bind.annotation.PostMapping;
  14 +import org.springframework.web.bind.annotation.RequestBody;
  15 +import org.springframework.web.bind.annotation.RequestMapping;
  16 +import org.springframework.web.bind.annotation.RestController;
  17 +
  18 +@RestController
  19 +@RequestMapping("nutritionManagement")
  20 +@Log4j2
  21 +public class NutritionManagementController {
  22 +
  23 + @Autowired
  24 + private LymsNutritionService lymsNutritionService;
  25 +
  26 + @PostMapping("upHisInfo")
  27 + @TokenRequired
  28 + public BaseResponse upHisInfo(@RequestBody @Validated LymsNutrition lymsNutrition){
  29 + BaseResponse baseResponse=new BaseResponse();
  30 + try {
  31 + baseResponse.setErrorcode(0);
  32 + baseResponse.setErrormsg("患者上传成功");
  33 + lymsNutritionService.upNutritionInfo(lymsNutrition);
  34 + } catch (Exception e) {
  35 + e.printStackTrace();
  36 + }
  37 + return baseResponse;
  38 + }
  39 +
  40 +}
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/PatientInfo.java View file @ 23509da
... ... @@ -6,6 +6,7 @@
6 6 import com.baomidou.mybatisplus.annotation.TableName;
7 7 import java.io.Serializable;
8 8 import java.util.Date;
  9 +import java.util.Objects;
9 10  
10 11 import lombok.Data;
11 12 import org.springframework.format.annotation.DateTimeFormat;
12 13  
13 14  
... ... @@ -160,93 +161,46 @@
160 161 @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
161 162 private Date created;
162 163  
  164 + @TableField(value="height")
  165 + private String height;//身高
  166 +
  167 + @TableField(value="weight")
  168 + private String weight;//体重
163 169 @TableField(exist = false)
164 170 private static final long serialVersionUID = 1L;
165 171  
166 172 @Override
167   - public boolean equals(Object that) {
168   - if (this == that) {
169   - return true;
170   - }
171   - if (that == null) {
172   - return false;
173   - }
174   - if (getClass() != that.getClass()) {
175   - return false;
176   - }
177   - PatientInfo other = (PatientInfo) that;
178   - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
179   - && (this.getPname() == null ? other.getPname() == null : this.getPname().equals(other.getPname()))
180   - && (this.getIdno() == null ? other.getIdno() == null : this.getIdno().equals(other.getIdno()))
181   - && (this.getPpasswd() == null ? other.getPpasswd() == null : this.getPpasswd().equals(other.getPpasswd()))
182   - && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
183   - && (this.getCcnt() == null ? other.getCcnt() == null : this.getCcnt().equals(other.getCcnt()))
184   - && (this.getHxid() == null ? other.getHxid() == null : this.getHxid().equals(other.getHxid()))
185   - && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby()))
186   - && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
187   - && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
188   - && (this.getHid() == null ? other.getHid() == null : this.getHid().equals(other.getHid()))
189   - && (this.getHname() == null ? other.getHname() == null : this.getHname().equals(other.getHname()))
190   - && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid()))
191   - && (this.getDname() == null ? other.getDname() == null : this.getDname().equals(other.getDname()))
192   - && (this.getDtid() == null ? other.getDtid() == null : this.getDtid().equals(other.getDtid()))
193   - && (this.getDtname() == null ? other.getDtname() == null : this.getDtname().equals(other.getDtname()))
194   - && (this.getIid() == null ? other.getIid() == null : this.getIid().equals(other.getIid()))
195   - && (this.getIname() == null ? other.getIname() == null : this.getIname().equals(other.getIname()));
196   - }
197   -
198   - @Override
199   - public int hashCode() {
200   - final int prime = 31;
201   - int result = 1;
202   - result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
203   - result = prime * result + ((getPname() == null) ? 0 : getPname().hashCode());
204   - result = prime * result + ((getIdno() == null) ? 0 : getIdno().hashCode());
205   - result = prime * result + ((getPpasswd() == null) ? 0 : getPpasswd().hashCode());
206   - result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
207   - result = prime * result + ((getCcnt() == null) ? 0 : getCcnt().hashCode());
208   - result = prime * result + ((getHxid() == null) ? 0 : getHxid().hashCode());
209   - result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode());
210   - result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
211   - result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
212   - result = prime * result + ((getHid() == null) ? 0 : getHid().hashCode());
213   - result = prime * result + ((getHname() == null) ? 0 : getHname().hashCode());
214   - result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode());
215   - result = prime * result + ((getDname() == null) ? 0 : getDname().hashCode());
216   - result = prime * result + ((getDtid() == null) ? 0 : getDtid().hashCode());
217   - result = prime * result + ((getDtname() == null) ? 0 : getDtname().hashCode());
218   - result = prime * result + ((getIid() == null) ? 0 : getIid().hashCode());
219   - result = prime * result + ((getIname() == null) ? 0 : getIname().hashCode());
220   - return result;
221   - }
222   -
223   - @Override
224 173 public String toString() {
225   - StringBuilder sb = new StringBuilder();
226   - sb.append(getClass().getSimpleName());
227   - sb.append(" [");
228   - sb.append("Hash = ").append(hashCode());
229   - sb.append(", id=").append(id);
230   - sb.append(", pname=").append(pname);
231   - sb.append(", idno=").append(idno);
232   - sb.append(", ppasswd=").append(ppasswd);
233   - sb.append(", sex=").append(sex);
234   - sb.append(", ccnt=").append(ccnt);
235   - sb.append(", hxid=").append(hxid);
236   - sb.append(", createdby=").append(createdby);
237   - sb.append(", cid=").append(cid);
238   - sb.append(", mobile=").append(mobile);
239   - sb.append(", hid=").append(hid);
240   - sb.append(", hname=").append(hname);
241   - sb.append(", did=").append(did);
242   - sb.append(", dname=").append(dname);
243   - sb.append(", dtid=").append(dtid);
244   - sb.append(", dtname=").append(dtname);
245   - sb.append(", iid=").append(iid);
246   - sb.append(", iname=").append(iname);
247   - sb.append(", serialVersionUID=").append(serialVersionUID);
248   - sb.append("]");
249   - return sb.toString();
  174 + return "PatientInfo{" +
  175 + "id=" + id +
  176 + ", pname='" + pname + '\'' +
  177 + ", idno='" + idno + '\'' +
  178 + ", ppasswd='" + ppasswd + '\'' +
  179 + ", sex=" + sex +
  180 + ", ccnt=" + ccnt +
  181 + ", birth='" + birth + '\'' +
  182 + ", hxid='" + hxid + '\'' +
  183 + ", createdby=" + createdby +
  184 + ", cid=" + cid +
  185 + ", mobile='" + mobile + '\'' +
  186 + ", enrolmentPhone='" + enrolmentPhone + '\'' +
  187 + ", hid=" + hid +
  188 + ", hname='" + hname + '\'' +
  189 + ", did=" + did +
  190 + ", dname='" + dname + '\'' +
  191 + ", dtid=" + dtid +
  192 + ", dtname='" + dtname + '\'' +
  193 + ", iid=" + iid +
  194 + ", iname='" + iname + '\'' +
  195 + ", ilid=" + ilid +
  196 + ", headimg='" + headimg + '\'' +
  197 + ", createdtime=" + createdtime +
  198 + ", gzopenid='" + gzopenid + '\'' +
  199 + ", synthesisQuery='" + synthesisQuery + '\'' +
  200 + ", created=" + created +
  201 + ", height='" + height + '\'' +
  202 + ", weight='" + weight + '\'' +
  203 + '}';
250 204 }
251 205 }