From c61b7ee67860342a14a0bf3e7f831d1259cf1b13 Mon Sep 17 00:00:00 2001 From: zhangchao Date: Tue, 3 Sep 2024 08:26:30 +0800 Subject: [PATCH] =?UTF-8?q?#fix:=E4=BC=98=E5=8C=96=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E6=82=A3=E8=80=85=E7=97=85=E5=8E=86=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lyms/talkonlineweb/controller/PatientController.java | 10 +++------- .../main/java/com/lyms/talkonlineweb/param/IllnessParam.java | 2 +- 2 files changed, 4 insertions(+), 8 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 01ee4dc..bd5022c 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -1,13 +1,11 @@ package com.lyms.talkonlineweb.controller; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; import com.google.common.base.Strings; import com.lyms.talkonlineweb.annotation.TokenRequired; import com.lyms.talkonlineweb.domain.*; @@ -18,9 +16,7 @@ import com.lyms.talkonlineweb.result.PatientPcaseResult; import com.lyms.talkonlineweb.service.*; import com.lyms.talkonlineweb.task.AccessTokenServlet; import com.lyms.talkonlineweb.util.*; -import com.mysql.cj.Query; import lombok.extern.log4j.Log4j2; -import org.apache.ibatis.annotations.Delete; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.util.DigestUtils; @@ -148,7 +144,7 @@ public class PatientController { * @return */ @PostMapping("saveIllness") - public BaseResponse saveIllness(@Validated IllnessParam illnessParam){ + public BaseResponse saveIllness(@RequestBody @Validated IllnessParam illnessParam){ //针对于特殊医院 if (46==illnessParam.getHid()){ LymsPatient lymsPatient= lymsPatientService.getById(illnessParam.getId()); @@ -168,11 +164,11 @@ public class PatientController { pcase.setCreated(new Date()); lymsPcaseService.save(pcase); lymsPatient.setHId(illnessParam.getHid()); - if (illnessParam.getIId()!=null){ + if (illnessParam.getInId()!=null){ LymsIllness lymsIllness=new LymsIllness(); lymsIllness.setPcid(pcase.getPcid()); lymsIllness.setIname(illnessParam.getIname()); - lymsIllness.setIid(illnessParam.getIId()); + lymsIllness.setIid(illnessParam.getInId()); lymsIllness.setCreatedtime(new Date()); lymsIllnessService.save(lymsIllness); }else { diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/param/IllnessParam.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/param/IllnessParam.java index b0b5a0f..a327457 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/param/IllnessParam.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/param/IllnessParam.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; public class IllnessParam { @NotNull(message = "患者不能为空") private Integer id;//患者ID - private Integer iId;//疾病Id + private Integer inId;//疾病Id private String iname;//疾病名称 /** * 填写医院id -- 1.8.3.1