فهرست منبع

优化和修复

xiaochan 2 سال پیش
والد
کامیت
3c17500c53

+ 12 - 1
src/main/java/thyyxxk/webserver/dao/his/PublicDao.java

@@ -112,7 +112,18 @@ public interface PublicDao {
      * @param code 人员代码
      * @return 返回人员
      */
-    @Select("<script>" + "select distinct rtrim(code) code,rtrim(name) name," + " dept_name = (select rtrim(name) from zd_unit_code where zd_unit_code.code = dept_code)," + " emp_tit_name  = (select rtrim(name) from zd_emp_title where zd_emp_title.code = emp_tit_code)," + " rtrim(yb_code) as  yb_code " + "from a_employee_mi where " + "(code like #{code} or name like #{code} or code_rs like #{code} or py_code like #{code}) " + "and isnull(del_flag,0) = 0 " + "<if test=\"deptCode != null and deptCode != '' \">" + "and dept_code = #{deptCode} " + "</if>" + "</script>")
+    @Select("<script>" +
+            "select distinct rtrim(code) as code,rtrim(name) as name,py_code, d_code as w_code," +
+            " dept_name = (select rtrim(name) from zd_unit_code where zd_unit_code.code = dept_code)," +
+            " emp_tit_name  = (select rtrim(name) from zd_emp_title where zd_emp_title.code = emp_tit_code)," +
+            " rtrim(yb_code) as  yb_code " +
+            "from a_employee_mi where " +
+            "(code like #{code} or name like #{code} or code_rs like #{code} or py_code like #{code}) " +
+            "and isnull(del_flag,0) = 0 " +
+            "<if test=\"deptCode != null and deptCode != '' \">" +
+            "and dept_code = #{deptCode} " +
+            "</if>" +
+            "</script>")
     List<GetDropdownBox> getRenYuan(String code, String deptCode);
 
     /**

+ 5 - 3
src/main/java/thyyxxk/webserver/dao/his/jiekou/DuiWaiJieKouDao.java

@@ -58,7 +58,7 @@ public interface DuiWaiJieKouDao {
                              @Param("mz") MzChargeDetail mz);
 
 
-    @Select("select act_order_no, confirm_flag " +
+    @Select("select act_order_no, confirm_flag,inpatient_no,admiss_times " +
             "from ysh_yj_req where req_no = #{reqNo}")
     YshYjReq selectedYshJyReqOne(Integer reqNo);
 
@@ -83,9 +83,11 @@ public interface DuiWaiJieKouDao {
             "    op_id         = #{confirmId}, " +
             "    op_date       = #{date}," +
             "    exec_unit     = #{deptCode} " +
-            "where act_order_no = #{orderNo} ")
+            "where inpatient_no = #{patNo} and admiss_times = #{times} and act_order_no = #{orderNo} ")
     int confirmTheIntermediateTable(String confirmId,
                                     BigDecimal orderNo,
                                     Date date,
-                                    String deptCode);
+                                    String deptCode,
+                                    String patNo,
+                                    Integer times);
 }

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

@@ -410,7 +410,7 @@ public interface JianYanJianChaDao {
             "  and a.order_code = #{orderCode}")
     List<JianYanFeiYongXiangQing> viewInspectionItemDetails(String orderCode);
 
-    @Select("select jc_id from yj_jc_patient where ba_no = #{patNo} ")
+    @Select("select top 1 jc_id from yj_jc_patient where ba_no = #{patNo} ")
     String getJcIdByPatNo(String patNo);
 
     @Select("select count(1) from zy_detail_charge where order_no = #{yj.actOrderNo} and inpatient_no = #{yj.inpatientNo} and admiss_times = #{yj.admissTimes}  ")

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

@@ -137,9 +137,13 @@ public interface ShouShuShenQingDao extends BaseMapper<OpRecord> {
                                          @Param("code") String code,
                                          @Param("name") String name);
 
-    @Select("select code,name from op_zd_part_new " +
-            "with (NOLOCK) where " +
-            "(name like #{code} or py_code like #{code} or d_code like #{code} or code like #{code})")
+    @Select("<script>" +
+            "select code,name, py_code, d_code as w_code from op_zd_part_new " +
+            "with (NOLOCK) where 1=1 " +
+            "<if test=\"code != null and code != '' \">" +
+            "(name like #{code} or py_code like #{code} or d_code like #{code} or code like #{code})" +
+            "</if>" +
+            "</script>")
     List<GetDropdownBox> huoQuShouShuBuWei(String code);
 
     @Select("Select isnull(Max(op_times),0) " +

+ 2 - 0
src/main/java/thyyxxk/webserver/entity/datamodify/GetDropdownBox.java

@@ -13,6 +13,8 @@ public class GetDropdownBox {
     @JsonInclude(JsonInclude.Include.NON_NULL)
     private String wCode;
     @JsonInclude(JsonInclude.Include.NON_NULL)
+    private String DCode;
+    @JsonInclude(JsonInclude.Include.NON_NULL)
     private String ybCode;
     @JsonInclude(JsonInclude.Include.NON_NULL)
     private String deptName;

+ 7 - 1
src/main/java/thyyxxk/webserver/service/jiekou/MedicalTechnologyIsPaidService.java

@@ -86,7 +86,13 @@ public class MedicalTechnologyIsPaidService {
         if (yshFlag == 0) {
             return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "更新失败请联系管理员");
         }
-        int feeCount = dao.confirmTheIntermediateTable(confirmId, yshYjReq.getActOrderNo(), date, userInfo.getDeptCode());
+        int feeCount = dao.confirmTheIntermediateTable(confirmId,
+                yshYjReq.getActOrderNo(),
+                date,
+                userInfo.getDeptCode(),
+                yshYjReq.getInpatientNo(),
+                yshYjReq.getAdmissTimes());
+
         if (feeCount == 0) {
             throw new BizException(ExceptionEnum.INVALID_PARAM, "更新失败请联系管理员");
         }

+ 3 - 0
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/ShouShuShenQingService.java

@@ -138,6 +138,9 @@ public class ShouShuShenQingService {
      */
     @DS("his")
     public ResultVo<List<GetDropdownBox>> huoQuShouShuBuWei(String name) {
+        if (StringUtil.isBlank(name)) {
+            return ResultVoUtil.success(dao.huoQuShouShuBuWei(name));
+        }
         return ResultVoUtil.success(dao.huoQuShouShuBuWei(StringUtil.isContainChinese(name)));
     }
 

+ 2 - 0
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -5,6 +5,7 @@ import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -181,6 +182,7 @@ public class YiZhuLuRuServer {
      * @param code 拼音首字母,中文,编码来进行搜索
      * @return 返回项目信息
      */
+    @DS("his")
     public ResultVo<List<YiZhuMingChen>> huoQuXiangMu(String code, String groupNo) {
         code = StringUtil.isContainChinese(code);
         // 药品