Browse Source

修改护理记录单

xiaochan 4 years ago
parent
commit
194f268417

+ 44 - 0
src/main/java/thyyxxk/webserver/controller/datamodify/YzTemperatureController.java

@@ -0,0 +1,44 @@
+package thyyxxk.webserver.controller.datamodify;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
+import thyyxxk.webserver.entity.datamodify.YzTemperature;
+import thyyxxk.webserver.service.datamodify.YzTemperatureService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 描述
+ * </p>
+ *
+ * @author xc
+ * @date 2021-04-12 17:42
+ */
+@RestController
+@RequestMapping("/yzTemperature")
+public class YzTemperatureController {
+
+    private final YzTemperatureService service;
+
+    public YzTemperatureController(YzTemperatureService service) {
+        this.service = service;
+    }
+
+    @PostMapping("/query")
+    public ResultVo<YzTemperature> queryDetails(@RequestBody YzTemperature param){
+        return service.queryDetails(param);
+    }
+
+    @GetMapping("/getWard")
+    public ResultVo<List<GetDropdownBox>> getWard(){
+        return service.getWard();
+    }
+
+    @PostMapping("/modify")
+    public ResultVo<Boolean> modify(@RequestBody YzTemperature param)  {
+        return service.modify(param);
+    }
+}

+ 6 - 0
src/main/java/thyyxxk/webserver/dao/his/datamodify/YzActOrderMapper.java

@@ -72,4 +72,10 @@ public interface YzActOrderMapper extends BaseMapper<YzActOrder> {
             "${ew.customSqlSegment} order by id")
     List<TYzActOrderModify> queryZhuangTai(@Param(Constants.WRAPPER) Wrapper<TYzActOrderModify> queryWrapper);
 
+    /**
+     * 查询出有医嘱修改审核权限的人的 code 用这个来发送通知
+     * @return 返回code
+     * */
+    @Select("select user_code from dj_user_role where role_id=28")
+    List<String> selectAdmins();
 }

+ 108 - 0
src/main/java/thyyxxk/webserver/dao/his/datamodify/YzTemperatureMapper.java

@@ -0,0 +1,108 @@
+package thyyxxk.webserver.dao.his.datamodify;
+
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
+import thyyxxk.webserver.entity.datamodify.YzTemperature;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 描述
+ * </p>
+ *
+ * @author xc
+ * @date 2021-04-12 17:43
+ */
+@Mapper
+public interface YzTemperatureMapper {
+
+
+    /**
+     * 查询住院 护理记录单
+     * @param param 住院号 住院 次数 能查询 出这个人的全部护理记录单 在根据日期,时间就能查询出 某一条的护理记录单
+     * @return 返回这个人 某一条或者全部的护理记录
+     * */
+    @Select("select patientName=(select rtrim(name) name from a_patient_mi where a_patient_mi.inpatient_no= yz_temperature.inpatient_no), " +
+            "inpatient_no,rec_date,rec_time,temperature_1,pulse_1,breathe_1,pressure_1_am,pressure_1_pm," +
+            "spo2,mind,skin,tubes_name,tubes_status,other_info,ward,admiss_times,detail_no, " +
+            "userid=(select rtrim(name) name from a_employee_mi where code = userid) " +
+            "from yz_temperature " +
+            "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and scd_flag='0' " +
+            "and rec_date=#{toStringRecDate} and rec_time=#{toStringRecTime} " +
+            "order by detail_no"
+           )
+    List<YzTemperature> queryDetails(YzTemperature param);
+
+    /**
+     * 获取病区
+     * @return 科室 code 和 名字
+     * */
+    @Select("select code,name from zy_ward_code")
+    List<GetDropdownBox> getWard();
+
+    /**
+     * 更新重要的数据
+     * @param param 根据 住院号 住院次数 日期 时间
+     *              现在能修改的字段有 体温:temperature1 脉搏:pulse1 呼吸:breathe1
+     *              血压am: pressure1Am, 血压pm:pressure1Pm  spo2:spo2 意识:mind 皮肤:skin
+     *              管道名称:tubesName 管道状态:tubesStatus  病区:ward
+     * @return 返回状态
+     * */
+    @Update("<script>" +
+            "update yz_temperature set " +
+            "<if test=\"temperature1!=null\">" +
+            "temperature_1=#{temperature1}" +
+            "</if>" +
+            "<if test=\"pulse1!=null\">" +
+            ",pulse_1=#{pulse1}" +
+            "</if>" +
+            "<if test=\"breathe1!=null\">" +
+            ",breathe_1=#{breathe1}" +
+            "</if>" +
+            "<if test=\"pressure1Am!=null\">" +
+            ",pressure_1_am=#{pressure1Am}" +
+            "</if>" +
+            "<if test=\"pressure1Pm!=null\">" +
+            ",pressure_1_pm=#{pressure1Pm}" +
+            "</if>" +
+            "<if test=\"spo2!=null\">" +
+            ",spo2=#{spo2}" +
+            "</if>" +
+            "<if test=\"mind!=null\">" +
+            ",mind=#{mind}" +
+            "</if>" +
+            "<if test=\"skin!=null\">" +
+            ",skin=#{skin}" +
+            "</if>" +
+            "<if test=\"tubesName!=null\">" +
+            ",tubes_name=#{tubesName}" +
+            "</if>" +
+            "<if test=\"tubesStatus!=null\">" +
+            ",tubes_status=#{tubesStatus}" +
+            "</if>" +
+            "<if test=\"ward!=null\">" +
+            ",ward=#{ward}" +
+            "</if>" +
+            ",modify_userid=#{modifyUserid},modify_time=#{modifyTime} " +
+            "where " +
+            "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and scd_flag='0' " +
+            "and rec_date=#{toStringRecDate} and rec_time=#{toStringRecTime} and detail_no=#{detailNo}" +
+            "</script>")
+    Boolean teperatureHead(YzTemperature param);
+
+    @Update("<script>" +
+            "update yz_temperature set modify_userid=#{modifyUserid},modify_time=#{modifyTime}" +
+            "<if test=\"ward!=null\">" +
+            ",ward=#{ward}" +
+            "</if>" +
+            "where " +
+            "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and scd_flag='0' " +
+            "and rec_date=#{toStringRecDate} and rec_time=#{toStringRecTime} and detail_no=#{detailNo}" +
+            "</script>")
+    Boolean teperatureBody(YzTemperature param);
+
+}

+ 8 - 2
src/main/java/thyyxxk/webserver/entity/datamodify/TYzActOrderModify.java

@@ -40,12 +40,12 @@ public class TYzActOrderModify implements Serializable {
 	/**
 	 * 老的开始时间
 	 */
-	private Date StartTime;
+	private Date startTime;
 
 	/**
 	 * 老的结束时间
 	 */
-	private Date EndTime;
+	private Date endTime;
 
 	/**
 	 * 要修改的开始时间
@@ -67,6 +67,12 @@ public class TYzActOrderModify implements Serializable {
 	 */
 	private String proposer;
 
+
+	/**
+	 * 修改申请人的姓名
+	 * */
+	private String proposerName;
+
 	/**
 	 * 医嘱修改申请时间
 	 */

+ 749 - 0
src/main/java/thyyxxk/webserver/entity/datamodify/YzTemperature.java

@@ -0,0 +1,749 @@
+package thyyxxk.webserver.entity.datamodify;
+
+import java.io.Serializable;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class YzTemperature  implements Serializable {
+
+	private static final long serialVersionUID =  8042518365378175786L;
+
+	/**
+	 * inpatientNo
+	 */
+	private String inpatientNo;
+
+	/**
+	 * 患者姓名
+	 * */
+	private String patientName;
+
+	/**
+	 * admissTimes
+	 */
+	private Integer admissTimes;
+
+	/**
+	 * 获取前端的日期,然后在拆分出来
+	 * */
+	private Date date;
+
+	/**
+	 * recDate
+	 */
+	private Date recDate;
+
+	/**
+	 * recTime
+	 */
+	private Date recTime;
+
+	private String toStringRecDate;
+	private String toStringRecTime;
+
+	private String splicingOtherInfo;
+
+	/**
+	 * detailNo
+	 */
+	private Integer detailNo;
+
+	/**
+	 * patientState
+	 */
+	private String patientState;
+
+	/**
+	 * temperature
+	 */
+	private BigDecimal temperature;
+
+	/**
+	 * temperatureType
+	 */
+	private String temperatureType;
+
+	/**
+	 * pulse
+	 */
+	private BigDecimal pulse;
+
+	/**
+	 * breathe
+	 */
+	private Integer breathe;
+
+	/**
+	 * pressureAm
+	 */
+	private String pressureAm;
+
+	/**
+	 * pressurePm
+	 */
+	private String pressurePm;
+
+	/**
+	 * spo2
+	 */
+	private Double spo2;
+
+	/**
+	 * mind
+	 */
+	private String mind;
+
+	/**
+	 * lpupil
+	 */
+	private BigDecimal lpupil;
+
+	/**
+	 * rpupil
+	 */
+	private BigDecimal rpupil;
+
+	/**
+	 * pupil
+	 */
+	private String pupil;
+
+	/**
+	 * colName
+	 */
+	private String colName;
+
+	/**
+	 * intake
+	 */
+	private BigDecimal intake;
+
+	/**
+	 * shit
+	 */
+	private BigDecimal shit;
+
+	/**
+	 * shitOther
+	 */
+	private String shitOther;
+
+	/**
+	 * shitUnit
+	 */
+	private String shitUnit;
+
+	/**
+	 * shitShape
+	 */
+	private String shitShape;
+
+	/**
+	 * urineQuanAm
+	 */
+	private BigDecimal urineQuanAm;
+
+	/**
+	 * bodyWeight
+	 */
+	private String bodyWeight;
+
+	/**
+	 * bodyWeightInfo
+	 */
+	private String bodyWeightInfo;
+
+	/**
+	 * blood
+	 */
+	private BigDecimal blood;
+
+	/**
+	 * bodyFluid
+	 */
+	private BigDecimal bodyFluid;
+
+	/**
+	 * outputSum
+	 */
+	private BigDecimal outputSum;
+
+	/**
+	 * outputOther
+	 */
+	private BigDecimal outputOther;
+
+	/**
+	 * decubitus
+	 */
+	private String decubitus;
+
+	/**
+	 * skin
+	 */
+	private String skin;
+
+	/**
+	 * sputumFlag
+	 */
+	private Integer sputumFlag;
+
+	/**
+	 * atomizationFlag
+	 */
+	private Integer atomizationFlag;
+
+	/**
+	 * mouthpieceFlag
+	 */
+	private Integer mouthpieceFlag;
+
+	/**
+	 * eyesFlag
+	 */
+	private Integer eyesFlag;
+
+	/**
+	 * otherInfo
+	 */
+	private String otherInfo;
+
+	/**
+	 * userid
+	 */
+	private String userid;
+
+	/**
+	 * inputTime
+	 */
+	private Date inputTime;
+
+	/**
+	 * physicalFlag
+	 */
+	private Integer physicalFlag;
+
+	/**
+	 * skinFlag
+	 */
+	private Integer skinFlag;
+
+	/**
+	 * modifyUserid
+	 */
+	private String modifyUserid;
+
+	/**
+	 * modifyTime
+	 */
+	private Date modifyTime;
+
+	/**
+	 * sumFlag
+	 */
+	private Integer sumFlag;
+
+	/**
+	 * urineQuanInfo
+	 */
+	private BigDecimal urineQuanInfo;
+
+	/**
+	 * scdFlag
+	 */
+	private Integer scdFlag;
+
+	/**
+	 * roomTemperature
+	 */
+	private BigDecimal roomTemperature;
+
+	/**
+	 * humidness
+	 */
+	private BigDecimal humidness;
+
+	/**
+	 * intakeSpeed
+	 */
+	private BigDecimal intakeSpeed;
+
+	/**
+	 * intakeBreastMilk
+	 */
+	private BigDecimal intakeBreastMilk;
+
+	/**
+	 * intakeWater
+	 */
+	private BigDecimal intakeWater;
+
+	/**
+	 * intakeMilk
+	 */
+	private BigDecimal intakeMilk;
+
+	/**
+	 * urineQuanColor
+	 */
+	private String urineQuanColor;
+
+	/**
+	 * shitWater
+	 */
+	private BigDecimal shitWater;
+
+	/**
+	 * outputOtherInfo
+	 */
+	private String outputOtherInfo;
+
+	/**
+	 * bellybuttonFlag
+	 */
+	private Integer bellybuttonFlag;
+
+	/**
+	 * buttocksFlag
+	 */
+	private Integer buttocksFlag;
+
+	/**
+	 * showerFlag
+	 */
+	private Integer showerFlag;
+
+	/**
+	 * spongeBathFlag
+	 */
+	private Integer spongeBathFlag;
+
+	/**
+	 * infoCry
+	 */
+	private String infoCry;
+
+	/**
+	 * infoSuck
+	 */
+	private String infoSuck;
+
+	/**
+	 * infoSleep
+	 */
+	private String infoSleep;
+
+	/**
+	 * infoActivity
+	 */
+	private String infoActivity;
+
+	/**
+	 * acraTemperature
+	 */
+	private String acraTemperature;
+
+	/**
+	 * scdSpecialtext
+	 */
+	private String scdSpecialtext;
+
+	/**
+	 * tableStyle
+	 */
+	private Integer tableStyle;
+
+	/**
+	 * physicalMethodFlag
+	 */
+	private String physicalMethodFlag;
+
+	/**
+	 * bodyStature
+	 */
+	private BigDecimal bodyStature;
+
+	/**
+	 * heart
+	 */
+	private Integer heart;
+
+	/**
+	 * specialtextTime
+	 */
+	private Date specialtextTime;
+
+	/**
+	 * specialtextOther
+	 */
+	private String specialtextOther;
+
+	/**
+	 * temperatureCool
+	 */
+	private BigDecimal temperatureCool;
+
+	/**
+	 * temperature1
+	 */
+	private BigDecimal temperature1;
+
+	/**
+	 * pulse1
+	 */
+	private BigDecimal pulse1;
+
+	/**
+	 * breathe1
+	 */
+	private Integer breathe1;
+
+	/**
+	 * pressure1Am
+	 */
+	private BigDecimal pressure1Am;
+
+	/**
+	 * pressure1Pm
+	 */
+	private BigDecimal pressure1Pm;
+
+	/**
+	 * col1Name
+	 */
+	private String col1Name;
+
+	/**
+	 * col1Am
+	 */
+	private BigDecimal col1Am;
+
+	/**
+	 * isSputum
+	 */
+	private Integer isSputum;
+
+	/**
+	 * isAtomization
+	 */
+	private Integer isAtomization;
+
+	/**
+	 * isMouthpiece
+	 */
+	private Integer isMouthpiece;
+
+	/**
+	 * isEyes
+	 */
+	private Integer isEyes;
+
+	/**
+	 * isPhysical
+	 */
+	private Integer isPhysical;
+
+	/**
+	 * isSkin
+	 */
+	private Integer isSkin;
+
+	/**
+	 * temperature1Type
+	 */
+	private String temperature1Type;
+
+	/**
+	 * isPhysicalMethod
+	 */
+	private Integer isPhysicalMethod;
+
+	/**
+	 * tubesName
+	 */
+	private String tubesName;
+
+	/**
+	 * isTubes
+	 */
+	private Integer isTubes;
+
+	/**
+	 * col2Name
+	 */
+	private String col2Name;
+
+	/**
+	 * col2Am
+	 */
+	private BigDecimal col2Am;
+
+	/**
+	 * tubesStatus
+	 */
+	private String tubesStatus;
+
+	/**
+	 * boxTemp
+	 */
+	private BigDecimal boxTemp;
+
+	/**
+	 * boxHumi
+	 */
+	private BigDecimal boxHumi;
+
+	/**
+	 * urineColor
+	 */
+	private String urineColor;
+
+	/**
+	 * shitQuan
+	 */
+	private BigDecimal shitQuan;
+
+	/**
+	 * shitWaterQuan
+	 */
+	private BigDecimal shitWaterQuan;
+
+	/**
+	 * outputDblood
+	 */
+	private BigDecimal outputDblood;
+
+	/**
+	 * fHeartSound
+	 */
+	private String fHeartSound;
+
+	/**
+	 * fetalBreak
+	 */
+	private String fetalBreak;
+
+	/**
+	 * uterineOpen
+	 */
+	private String uterineOpen;
+
+	/**
+	 * uterineStatus
+	 */
+	private String uterineStatus;
+
+	/**
+	 * uterineHigh
+	 */
+	private String uterineHigh;
+
+	/**
+	 * uterineMove
+	 */
+	private String uterineMove;
+
+	/**
+	 * outBlood
+	 */
+	private String outBlood;
+
+	/**
+	 * redHurt
+	 */
+	private String redHurt;
+
+	/**
+	 * anusAir
+	 */
+	private String anusAir;
+
+	/**
+	 * suckleFun
+	 */
+	private String suckleFun;
+
+	/**
+	 * faceColour
+	 */
+	private String faceColour;
+
+	/**
+	 * skinColour
+	 */
+	private String skinColour;
+
+	/**
+	 * skinStatus
+	 */
+	private String skinStatus;
+
+	/**
+	 * urineQuan
+	 */
+	private Integer urineQuan;
+
+	/**
+	 * boxTempIn
+	 */
+	private BigDecimal boxTempIn;
+
+	/**
+	 * boxTempOut
+	 */
+	private BigDecimal boxTempOut;
+
+	/**
+	 * breath
+	 */
+	private String breath;
+
+	/**
+	 * acraStatus
+	 */
+	private String acraStatus;
+
+	/**
+	 * intakeFlag
+	 */
+	private String intakeFlag;
+
+	/**
+	 * outtakeFlag
+	 */
+	private String outtakeFlag;
+
+	/**
+	 * urineInfo
+	 */
+	private String urineInfo;
+
+	/**
+	 * intakeInfo
+	 */
+	private String intakeInfo;
+
+	/**
+	 * outputInfo
+	 */
+	private String outputInfo;
+
+	/**
+	 * pupilr
+	 */
+	private String pupilr;
+
+	/**
+	 * pupilbj
+	 */
+	private String pupilbj;
+
+	/**
+	 * fmTime
+	 */
+	private Date fmTime;
+
+	/**
+	 * csTime
+	 */
+	private Date csTime;
+
+	/**
+	 * fHeartSoundStr
+	 */
+	private String fHeartSoundStr;
+
+	/**
+	 * glu
+	 */
+	private String glu;
+
+	/**
+	 * painLvl
+	 */
+	private String painLvl;
+
+	/**
+	 * breatheMachine
+	 */
+	private String breatheMachine;
+
+	/**
+	 * map
+	 */
+	private Integer map;
+
+	/**
+	 * col1Srl
+	 */
+	private String col1Srl;
+
+	/**
+	 * gastric
+	 */
+	private String gastric;
+
+	/**
+	 * cvp
+	 */
+	private String cvp;
+
+	/**
+	 * etcho2
+	 */
+	private String etcho2;
+
+	/**
+	 * gcs
+	 */
+	private String gcs;
+
+	/**
+	 * rass
+	 */
+	private String rass;
+
+	/**
+	 * othJc
+	 */
+	private String othJc;
+
+	/**
+	 * position
+	 */
+	private String position;
+
+	/**
+	 * isBreath
+	 */
+	private Integer isBreath;
+
+	/**
+	 * isHuiyin
+	 */
+	private Integer isHuiyin;
+
+	/**
+	 * isBed
+	 */
+	private Integer isBed;
+
+	/**
+	 * isAV
+	 */
+	private Integer isAV;
+
+	/**
+	 * col1Dos
+	 */
+	private String col1Dos;
+
+	/**
+	 * ward
+	 */
+	private String ward;
+
+}

+ 8 - 1
src/main/java/thyyxxk/webserver/service/datamodify/YzActOrderModifyService.java

@@ -1,5 +1,6 @@
 package thyyxxk.webserver.service.datamodify;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,6 +12,7 @@ import thyyxxk.webserver.entity.datamodify.TYzActOrderModify;
 import thyyxxk.webserver.entity.datamodify.YzActOrder;
 import thyyxxk.webserver.utils.ResultVoUtil;
 import thyyxxk.webserver.utils.TokenUtil;
+import thyyxxk.webserver.websocket.WebSocketServer;
 
 import java.util.List;
 
@@ -59,7 +61,6 @@ public class YzActOrderModifyService {
      * @return 返回提示
      * */
     public ResultVo<Boolean> yzModifyApply(TYzActOrderModify param){
-
         for(TYzActOrderModify pojo:param.getList()){
             log.info("申请医嘱修改==》申请人:{},开始时间:{},结束时间:{}",
                     TokenUtil.getTokenUserId(),param.getStartTime(),param.getEndTime());
@@ -80,6 +81,12 @@ public class YzActOrderModifyService {
                 dao.yzActOrderModifyInsert(pojo);
             }
         }
+        List<String> admins = dao.selectAdmins();
+        JSONObject obj = new JSONObject();
+        obj.put("name", "systemNotification");
+        obj.put("message", String.format("用户【%s】提交了医嘱修改申请,请前往审核页面查看。刷新一下", TokenUtil.getTokenUserId()));
+        String message = obj.toJSONString();
+        admins.forEach(code -> WebSocketServer.sendMessageByUserCode(code,message));
         return ResultVoUtil.success();
     }
 

+ 20 - 3
src/main/java/thyyxxk/webserver/service/datamodify/YzActOrderModifyVerifyService.java

@@ -1,6 +1,7 @@
 package thyyxxk.webserver.service.datamodify;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.ibatis.annotations.Param;
@@ -14,6 +15,7 @@ import thyyxxk.webserver.entity.datamodify.YzActOrder;
 import thyyxxk.webserver.utils.ResultVoUtil;
 import thyyxxk.webserver.utils.StringUtil;
 import thyyxxk.webserver.utils.TokenUtil;
+import thyyxxk.webserver.websocket.WebSocketServer;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -85,7 +87,7 @@ public class YzActOrderModifyVerifyService {
     public TYzActOrderModify yzActOrderQuery(BigDecimal actOrderNo){
         QueryWrapper<TYzActOrderModify> qw = new QueryWrapper<>();
         qw.select("act_order_no,inpatient_no,start_time,end_time,new_start_time," +
-                "new_end_time,audit_flag,proposer=(select name from a_employee_mi where code=proposer),propose_time," +
+                "new_end_time,audit_flag,proposer,proposer_name=(select name from a_employee_mi where code=proposer),propose_time," +
                 "audit_staff,audit_time,audit_remark,propose_remark," +
                 "patient_name,frequ_code,ward_code,order_name");
         qw.eq("act_order_no",actOrderNo);
@@ -105,6 +107,11 @@ public class YzActOrderModifyVerifyService {
         //根据医嘱号 在申请表中 获取数据
         TYzActOrderModify pojo = yzActOrderQuery(actOrderNo);
         if (auditFlag==YZ_SHENHE_TONGGUO){
+            JSONObject obj = new JSONObject();
+            obj.put("name","systemNotification");
+            obj.put("message",String.format("用户【%s】,你的审核已通过。",pojo.getProposerName()));
+            String message = obj.toJSONString();
+            WebSocketServer.sendMessageByUserCode(pojo.getProposer(),message);
             log.info("医嘱修改审核审核通过");
             //改变医嘱 数据
             if (dao.yzActOrderModify(pojo)){
@@ -118,7 +125,12 @@ public class YzActOrderModifyVerifyService {
             }
         }else if (auditFlag==YZ_SHENHE_BOHUI){
             dao.shenHeZhuangTaiGaiBian(auditFlag,TokenUtil.getTokenUserId(),actOrderNo,auditRemark);
-            log.info("驳回成功",auditFlag);
+            JSONObject obj = new JSONObject();
+            obj.put("name","systemNotification");
+            obj.put("message",String.format("用户【%s】,你的审核已驳回。",pojo.getProposerName()));
+            String message = obj.toJSONString();
+            WebSocketServer.sendMessageByUserCode(pojo.getProposer(),message);
+            log.info("医嘱修改审核,操作:{驳回},操作员:{}",TokenUtil.getTokenUserId());
         }else if (auditFlag==YZ_SHENHE_HUICHE){
             TYzActOrderModify param = new TYzActOrderModify();
             param.setStartTime(pojo.getStartTime());
@@ -126,7 +138,12 @@ public class YzActOrderModifyVerifyService {
             param.setActOrderNo(pojo.getActOrderNo());
             if (dao.yzHuiChe(param)){
                 if (dao.shenHeZhuangTaiGaiBian(auditFlag,TokenUtil.getTokenUserId(),actOrderNo,auditRemark)){
-                    log.info("数据回撤成功");
+                    JSONObject obj = new JSONObject();
+                    obj.put("name","systemNotification");
+                    obj.put("message",String.format("用户【%s】,数据回撤,请重新提交申请。",pojo.getProposerName()));
+                    String message = obj.toJSONString();
+                    WebSocketServer.sendMessageByUserCode(pojo.getProposer(),message);
+                    log.info("医嘱修改审核,操作:{数据回撤成功},操作人员:{}",TokenUtil.getTokenUserId());
                 }
             }
         }

+ 126 - 0
src/main/java/thyyxxk/webserver/service/datamodify/YzTemperatureService.java

@@ -0,0 +1,126 @@
+package thyyxxk.webserver.service.datamodify;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import jdk.nashorn.internal.scripts.JO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import thyyxxk.webserver.config.exception.ExceptionEnum;
+import thyyxxk.webserver.dao.his.datamodify.YzTemperatureMapper;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
+import thyyxxk.webserver.entity.datamodify.YzTemperature;
+import thyyxxk.webserver.utils.*;
+
+
+import java.util.*;
+
+/**
+ * <p>
+ * 描述
+ * </p>
+ *
+ * @author xc
+ * @date 2021-04-12 17:44
+ */
+@Service
+@Slf4j
+@DS("dev")
+public class YzTemperatureService {
+
+    private final YzTemperatureMapper dao;
+
+    private static final String GET_DATE = "yyyy-MM-dd";
+    private static final String GET_TIME = "HH:mm:ss";
+
+    public YzTemperatureService(YzTemperatureMapper dao) {
+        this.dao = dao;
+    }
+
+    /**
+     * 查询护理记录单 、
+     * @param param 根据 住院号 住院次数 日期 查询 坑爹的这个人把 日期要 拆分出来
+     * @return 返回一条拼接好 ,问题描述的数据 给到页面
+     * */
+    public ResultVo<YzTemperature> queryDetails(YzTemperature param){
+        String date =  DateUtil.formatDatetime(param.getDate(),GET_DATE);
+        String time =  DateUtil.formatDatetime(param.getDate(),GET_TIME);
+
+        log.info("查询护理记录单:操作人:{},住院号:{},住院次数:{},日期:{},时间:{}",
+                TokenUtil.getTokenUserId(),param.getInpatientNo(),param.getAdmissTimes(),date,time);
+        param.setToStringRecDate(date);
+        param.setToStringRecTime(time);
+
+        List<YzTemperature> list = dao.queryDetails(param);
+        StringBuilder splicingOtherInfo = new StringBuilder();
+        YzTemperature pojo = new YzTemperature();
+
+        if (list.size()>0){
+            for (int i = 0;i<list.size();i++){
+                if (i==0){
+                    pojo = list.get(0);
+                    //坑爹的1900年的 日期 传到前端会少几分钟 需要转成 string 在把 1900替换成2000
+                   pojo.setRecTime(DateUtil.getDatetimeAfterCentury(pojo.getRecTime()));
+                }
+                //拼接字符串 把otherInfo 拼起来
+                splicingOtherInfo.append(list.get(i).getOtherInfo());
+            }
+            pojo.setSplicingOtherInfo(splicingOtherInfo.toString().replace(" ",""));
+            return ResultVoUtil.success(pojo);
+        }
+        return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
+    }
+
+    public ResultVo<Boolean> modify(YzTemperature param)  {
+        param.setToStringRecDate(DateUtil.formatDatetime(param.getRecDate(),GET_DATE));
+        param.setToStringRecTime(DateUtil.formatDatetime(param.getRecTime(),GET_TIME));
+
+        //查询出原来的 数据
+        YzTemperature pojo = new YzTemperature();
+        List<YzTemperature> list =  dao.queryDetails(param);
+
+        param.setModifyUserid(TokenUtil.getTokenUserId());
+        param.setModifyTime(new Date());
+
+        for(int i =0;i<list.size();i++){
+            if (i==0){
+                param.setDetailNo(list.get(i).getDetailNo());
+                pojo = list.get(i);
+                if (!dao.teperatureHead(param)){
+                    return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
+                }
+                log.info("第一次执行头部数据的添加:{}",param.getDetailNo());
+            }else {
+                param.setDetailNo(list.get(i).getDetailNo());
+                dao.teperatureBody(param);
+                log.info("执行尾部数据添加:{}",param.getDetailNo());
+            }
+        }
+
+        log.info("护理记录单修改前:操作人:{},修改的记录单日期:{},时间:{},住院次数:{},住院号:{},体温:{}," +
+                        "心率/脉搏:{},呼吸:{},血压am:{},血压pm:{}," +
+                        "spo2:{},意识:{},皮肤:{},管道名称:{},管道情况:{},病区:{}",
+                TokenUtil.getTokenUserId(),pojo.getRecDate(),pojo.getRecTime(),pojo.getAdmissTimes(),pojo.getInpatientNo(),
+                pojo.getTemperature1(),pojo.getPulse1(),pojo.getBreathe1(),pojo.getPressure1Am(),
+                pojo.getPressure1Pm(),pojo.getSpo2(),pojo.getMind(),pojo.getSkin(),pojo.getTubesName(),pojo.getTubesStatus(),
+                pojo.getWard());
+
+        log.info("修改护理记录单后:操作人:{},修改的记录单日期:{},时间:{},住院次数:{},住院号:{},体温:{}," +
+                        "心率/脉搏:{},呼吸:{},血压am:{},血压pm:{}," +
+                        "spo2:{},意识:{},皮肤:{},管道名称:{},管道情况:{},病区:{}",
+                TokenUtil.getTokenUserId(),param.getToStringRecDate(),param.getToStringRecTime(),param.getAdmissTimes(),
+                param.getInpatientNo(),param.getTemperature1(),param.getPulse1(),param.getBreathe1(),param.getPressure1Am(),
+                param.getPressure1Pm(),param.getSpo2(),param.getMind(),param.getSkin(),param.getTubesName(),param.getTubesStatus(),
+                param.getWard());
+
+        return ResultVoUtil.success();
+    }
+
+    /**
+     * 获取病房
+     * @return 返回病房的code 和 name
+     * */
+    public ResultVo<List<GetDropdownBox>> getWard(){
+        return ResultVoUtil.success(dao.getWard());
+    }
+}

+ 8 - 0
src/main/java/thyyxxk/webserver/utils/DateUtil.java

@@ -53,6 +53,14 @@ public class DateUtil {
         return da.format(now.getTime());
     }
 
+    public static Date getDatetimeAfterCentury(Date date) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.set(2000,Calendar.DECEMBER,31, calendar.get(Calendar.HOUR_OF_DAY),
+                calendar.get(Calendar.MINUTE), calendar.get(Calendar.SECOND));
+        return calendar.getTime();
+    }
+
     public static String calculateAge(Date birthDate) {
         if (null == birthDate) {
             return "";

+ 39 - 0
src/main/java/thyyxxk/webserver/utils/EntityCopy.java

@@ -0,0 +1,39 @@
+package thyyxxk.webserver.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import sun.rmi.runtime.Log;
+
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+
+/**
+ * <p>
+ * 描述
+ * </p>
+ *
+ * @author xc
+ * @date 2021-04-14 11:31
+ */
+@Slf4j
+public class EntityCopy {
+    public static void Copy(Object source, Object dest) throws Exception {
+        // 获取属性
+        BeanInfo sourceBean = Introspector.getBeanInfo(source.getClass(), java.lang.Object.class);
+        PropertyDescriptor[] sourceProperty = sourceBean.getPropertyDescriptors();
+
+        BeanInfo destBean = Introspector.getBeanInfo(dest.getClass(), java.lang.Object.class);
+        PropertyDescriptor[] destProperty = destBean.getPropertyDescriptors();
+
+        try {
+            for (int i = 0; i < sourceProperty.length; i++) {
+                            // 调用source的getter方法和dest的setter方法
+               if (destProperty[i].getReadMethod().invoke(dest)==null){
+                    destProperty[i].getWriteMethod().invoke(dest, sourceProperty[i].getReadMethod().invoke(source));
+               }
+            }
+        } catch (Exception e) {
+            throw new Exception("属性复制失败:" + e.getMessage());
+        }
+    }
+}

+ 53 - 0
src/main/java/thyyxxk/webserver/utils/StringUtil.java

@@ -1,5 +1,9 @@
 package thyyxxk.webserver.utils;
 
+
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author dj
  */
@@ -18,4 +22,53 @@ public class StringUtil {
                 .replaceAll("\"", "")
                 .split(",");
     }
+
+    /**
+     * 把原始字符串分割成指定长度的字符串列表
+     * @param inputString 原始字符串
+     * @param length 指定长度
+     * @return 。。
+     * */
+    public static List<String> getStringList(String inputString,int length){
+        int size = inputString.length() / length;
+        if (inputString.length()%length!=0){
+            size += 1;
+        }
+        return getStrList(inputString,length,size);
+    }
+    /**
+     *把原始字符串分割成指定长度的字符串列表
+     * @param inputString 原始字符串
+     * @param length  指定长度
+     * @param size 指定列表大小
+     * @return ..
+     * */
+    public static List<String> getStrList(String inputString,int length,int size){
+        List<String> list = new ArrayList<>();
+        for (int i = 0;i<size;i++){
+            String childStr = substring(inputString,i * length,(i+1)*length);
+            list.add(childStr);
+        }
+        return list;
+    }
+
+    /**
+     * 分割字符串,如果开始位置大于字符串长度,返回空
+     * @param str 原始字符串
+     * @param f 开始未知
+     * @param t 结束位置
+     * @return 。。
+     * */
+    public static String substring(String str,int f,int t){
+        if (f>str.length()){
+            return null;
+        }
+        if (t>str.length()){
+            return str.substring(f,str.length());
+        }else {
+            return str.substring(f,t);
+        }
+    }
+
 }
+

+ 6 - 1
src/main/resources/application.yml

@@ -23,6 +23,12 @@ spring:
           password: "hnthxyyy"
           type: "com.zaxxer.hikari.HikariDataSource"
           driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+        dev:
+          url: "jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb"
+          username: "sa"
+          password:
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
     minimum-idle: 10
     idle-timeout: 180000
     maximum-pool-size: 30
@@ -63,4 +69,3 @@ CSSYB_MT_PRE_CAL:
   http://172.16.30.26:1000/mzsyb/mzPreCalculate
 PROOFREAD:
   http://172.16.30.26:1111/proofread/start
-