瀏覽代碼

优化了一些代码,以及搭建了草药医嘱

xiaochan 3 年之前
父節點
當前提交
b808e550cc

+ 39 - 0
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/CaoYaoYiZhuController.java

@@ -0,0 +1,39 @@
+package thyyxxk.webserver.controller.zhuyuanyizheng;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import thyyxxk.webserver.config.auth.PassToken;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzActOrderCy;
+import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.caoYaoChaXunTiaoJian;
+import thyyxxk.webserver.service.zhuyuanyisheng.CaoYaoYiZhuServer;
+
+/**
+ * <p>
+ * 描述: 草药医嘱
+ * </p>
+ *
+ * @author xc
+ * @date 2022-02-26 08:37
+ */
+@RestController
+@RequestMapping("/caoYaoYiZhu")
+public class CaoYaoYiZhuController {
+
+    private final CaoYaoYiZhuServer server;
+
+    public CaoYaoYiZhuController(CaoYaoYiZhuServer server) {
+        this.server = server;
+    }
+
+    @PostMapping("/huoQuCaoYaoShuJu")
+    @PassToken
+    public ResultVo<IPage<YzActOrderCy>> huoQuCaoYaoShuJu(@RequestBody @Validated caoYaoChaXunTiaoJian param) {
+        return server.huoQuCaoYaoShuJu(param);
+    }
+
+}

+ 36 - 0
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/CaoYaoYiZhuDao.java

@@ -0,0 +1,36 @@
+package thyyxxk.webserver.dao.his.zhuyuanyisheng;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzActOrderCy;
+
+/**
+ * <p>
+ * 描述: 草药医嘱
+ * </p>
+ *
+ * @author xc
+ * @date 2022-02-26 08:38
+ */
+@Mapper
+public interface CaoYaoYiZhuDao {
+
+    @Select("select order_no, " +
+            "       order_name, " +
+            "       doctor_code_name = (select rtrim(name) from a_employee_mi where code = doctor_code), " +
+            "       status_flag /* 1-录入 2-收费 3-提交 d-删除*/, " +
+            "       order_je, " +
+            "       order_je_dj, " +
+            "       quantity, " +
+            "       quantity_dj, " +
+            "       order_code_dj " +
+            "from yz_act_order_cy " +
+            "${ew.customSqlSegment} ")
+    IPage<YzActOrderCy> huoQuCaoYaoShuJu(IPage<YzActOrderCy> page,
+                                         @Param(Constants.WRAPPER) Wrapper<?> wp);
+
+}

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/ShouShuShenQingDao.java

@@ -164,7 +164,7 @@ public interface ShouShuShenQingDao extends BaseMapper<OpRecord> {
             "                          self_buy, pay_self, serial, group_no, doctor_flag, dept_code, ward_code, reg_flag,yb_self_flag,emergency_flag,exec_unit) " +
             " VALUES " +
             "<foreach collection='list' item='item' separator=','>" +
-            " (#{item.opCode}, '(手术)' + '${item.opName}', 'ONCE', #{infantFlag}, getdate(), #{userCode}, getdate(), " +
+            " (#{item.opCode}, '(${item.partCodeName})' + '${item.opName}', 'ONCE', #{infantFlag}, getdate(), #{userCode}, getdate(), " +
             "        #{item.actOrderNo}, #{patNo}, " +
             "        #{times}, 'p', #{userCode}, getdate(), '2', #{userCode}, getdate(), '0', '0', '00', '00', '1', #{dept}, #{ward},'1',#{item.ybSelfFlag},#{item.urgentClinicFlag},#{execUnit})" +
             "</foreach>" +

+ 182 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/caoyaoyizhu/YzActOrderCy.java

@@ -0,0 +1,182 @@
+package thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu;
+
+import java.io.Serializable;
+import lombok.Data;
+import java.util.Date;
+
+@Data
+public class YzActOrderCy  implements Serializable {
+
+	private static final long serialVersionUID =  1453078027541397715L;
+
+	/**
+	 * inpatientNo
+	 */
+	private String inpatientNo;
+
+	/**
+	 * admissTimes
+	 */
+	private Integer admissTimes;
+
+	/**
+	 * zySerialNo
+	 */
+	private String zySerialNo;
+
+	/**
+	 * 医嘱号
+	 */
+	private Integer orderNo;
+
+	/**
+	 * 01-小包装 99-大包装
+	 */
+	private Integer serialNo;
+
+	/**
+	 * 医嘱名,处方名
+	 */
+	private String orderName;
+
+	/**
+	 * 金额
+	 */
+	private Double orderJe;
+
+	/**
+	 * 单剂金额
+	 */
+	private Double orderJeDj;
+
+	/**
+	 * 数量
+	 */
+	private Double quantity;
+
+	/**
+	 * 单剂数量
+	 */
+	private Double quantityDj;
+
+	/**
+	 * orderCodeDj
+	 */
+	private String orderCodeDj;
+
+	/**
+	 * doctorCode
+	 */
+	private String doctorCode;
+
+	/**
+	 * inputId
+	 */
+	private String inputId;
+
+	/**
+	 * inputDate
+	 */
+	private Date inputDate;
+
+	/**
+	 * chargeId
+	 */
+	private String chargeId;
+
+	/**
+	 * chargeDate
+	 */
+	private Date chargeDate;
+
+	/**
+	 * confirmId
+	 */
+	private String confirmId;
+
+	/**
+	 * confirmDate
+	 */
+	private Date confirmDate;
+
+	/**
+	 * 药单号
+	 */
+	private Integer pageNo;
+
+	/**
+	 * statusFlag
+	 */
+	private String statusFlag;
+
+	/**
+	 * 申请科室
+	 */
+	private String deptCode;
+
+	/**
+	 * 申请病房
+	 */
+	private String wardCode;
+
+	/**
+	 * printId
+	 */
+	private String printId;
+
+	/**
+	 * cyMtjs
+	 */
+	private Integer cyMtjs;
+
+	/**
+	 * cyJsl
+	 */
+	private Integer cyJsl;
+
+	/**
+	 * cyZql
+	 */
+	private Integer cyZql;
+
+	/**
+	 * cyFj
+	 */
+	private Integer cyFj;
+
+	/**
+	 * cyFfcs
+	 */
+	private Integer cyFfcs;
+
+	/**
+	 * cyFysm
+	 */
+	private Integer cyFysm;
+
+	/**
+	 * cyJssm
+	 */
+	private String cyJssm;
+
+	/**
+	 * submitId
+	 */
+	private String submitId;
+
+	/**
+	 * submitDate
+	 */
+	private Date submitDate;
+
+	/**
+	 * execDept
+	 */
+	private String execDept;
+
+	/**
+	 * 药房 草药,中药颗粒
+	 */
+	private String groupNo;
+
+}

+ 33 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/caoyaoyizhu/caoYaoChaXunTiaoJian.java

@@ -0,0 +1,33 @@
+package thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * <p>
+ * 描述: 草药医嘱查询条件
+ * </p>
+ *
+ * @author xc
+ * @date 2022-02-26 11:09
+ */
+@Data
+public class caoYaoChaXunTiaoJian {
+
+    @NotNull(message = "住院号不能为空")
+    @NotBlank(message = "住院号不能为空")
+    private String patNo;
+    @NotNull(message = "住院次数不能为空")
+    private Integer times;
+
+    private String startTime;
+    private String endTime;
+
+    @NotNull(message = "当前页不能为空")
+    private long currentPage;
+
+    @NotNull(message = "也打消")
+    private long pageSize;
+}

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/shoushu/OpRecord.java

@@ -194,6 +194,7 @@ public class OpRecord implements Serializable {
      * 手术部位
      */
     private String partCode;
+    private String partCodeName;
 
     /**
      * 手术用物

+ 46 - 0
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/CaoYaoYiZhuServer.java

@@ -0,0 +1,46 @@
+package thyyxxk.webserver.service.zhuyuanyisheng;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import thyyxxk.webserver.dao.his.zhuyuanyisheng.CaoYaoYiZhuDao;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzActOrderCy;
+import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.caoYaoChaXunTiaoJian;
+import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
+
+/**
+ * <p>
+ * 描述:
+ * </p>
+ *
+ * @author xc
+ * @date 2022-02-26 08:39
+ */
+@Service
+@Slf4j
+public class CaoYaoYiZhuServer {
+
+    private final CaoYaoYiZhuDao dao;
+
+    public CaoYaoYiZhuServer(CaoYaoYiZhuDao dao) {
+        this.dao = dao;
+    }
+
+    public ResultVo<IPage<YzActOrderCy>> huoQuCaoYaoShuJu(caoYaoChaXunTiaoJian param) {
+        IPage<YzActOrderCy> page = new Page<>(param.getCurrentPage(), param.getPageSize(), param.getCurrentPage() == 1);
+        QueryWrapper<?> qw = new QueryWrapper<>();
+        qw.eq("inpatient_no", param.getPatNo());
+        qw.eq("admiss_times", param.getTimes());
+        qw.le("status_flag", "3");
+        if (StringUtil.notBlank(param.getStartTime())) {
+            qw.ge("input_date", param.getStartTime());
+            qw.le("input_date", param.getEndTime());
+        }
+        dao.huoQuCaoYaoShuJu(page, qw);
+        return ResultVoUtil.success(page);
+    }
+}