From c15c8d7d34e36852e1c865b2bae5b1b11f573016 Mon Sep 17 00:00:00 2001 From: changpengfei Date: Wed, 8 Sep 2021 19:12:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=97=85=E4=BE=8B=E5=AD=97=E6=AE=B5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PatientController.java | 5 ++- .../com/lyms/talkonlineweb/domain/LymsPcase.java | 45 ++-------------------- 2 files changed, 6 insertions(+), 44 deletions(-) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index d4d0b62..0663633 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -75,6 +75,7 @@ public class PatientController { public BaseResponse savePatient(@Validated LymsPatient patient, BindingResult result, LymsPcase pcase, String illness){ BaseResponse baseResponse=new BaseResponse(); log.info(">>>>>>>>>>>>>>>登记病例"); + log.info(">>>>>>>>>>>>>>>登记病例"); baseResponse.setErrormsg(""); LymsPatient patient2=lymsPatientService.getOne(Wrappers.query(patient).eq("idno",patient.getIdno())); if(patient2==null){ @@ -109,7 +110,7 @@ public class PatientController { for (int i = 0; i < iArr.length; i++) { LymsIllness ness=new LymsIllness(); ness.setCreatedby(patient.getCreatedby()); - ness.setPcid(pcase.getId()); + ness.setPcid(pcase.getPcid()); ness.setIid(Integer.parseInt(iArr[i])); ness.setCreatedtime(new Date()); f=lymsIllnessService.save(ness); @@ -119,7 +120,7 @@ public class PatientController { //需要添加医院购买卡记录 LymsTcard tcard=new LymsTcard(); tcard.setCnt(patient.getCcnt()); - tcard.setPcid(pcase.getId()); + tcard.setPcid(pcase.getPcid()); tcard.setPid(patient.getId()); tcard.setFid(2); diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPcase.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPcase.java index 6bc7446..3e65d02 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPcase.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPcase.java @@ -18,8 +18,8 @@ public class LymsPcase implements Serializable { /** * */ - @TableId(value = "id", type = IdType.AUTO) - private Integer id; + @TableId(value = "pcid", type = IdType.AUTO) + private Integer pcid; /** * 患者id @@ -87,46 +87,7 @@ public class LymsPcase implements Serializable { @TableField(exist = false) private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - LymsPcase other = (LymsPcase) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid())) - && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile())) - && (this.getHid() == null ? other.getHid() == null : this.getHid().equals(other.getHid())) - && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid())) - && (this.getDtid() == null ? other.getDtid() == null : this.getDtid().equals(other.getDtid())) - && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby())) - && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime())) - && (this.getUpdatedby() == null ? other.getUpdatedby() == null : this.getUpdatedby().equals(other.getUpdatedby())) - && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())); - } - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode()); - result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode()); - result = prime * result + ((getHid() == null) ? 0 : getHid().hashCode()); - result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode()); - result = prime * result + ((getDtid() == null) ? 0 : getDtid().hashCode()); - result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode()); - result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode()); - result = prime * result + ((getUpdatedby() == null) ? 0 : getUpdatedby().hashCode()); - result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); - return result; - } @Override public String toString() { @@ -134,7 +95,7 @@ public class LymsPcase implements Serializable { sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); + sb.append(", pcid=").append(pcid); sb.append(", pid=").append(pid); sb.append(", mobile=").append(mobile); sb.append(", hid=").append(hid); -- 1.8.3.1