Kaynağa Gözat

检查申请可以选择部位了

xiaochan 3 hafta önce
ebeveyn
işleme
09a9785f3c

+ 5 - 1
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/JianYanJianChaController.java

@@ -187,8 +187,12 @@ public class JianYanJianChaController {
 
     @PostMapping("/printListReqNo")
     @PassToken
-    private ResultVo<Object> printListReqNo(@RequestBody List<Integer> reqNo) {
+    public ResultVo<Object> printListReqNo(@RequestBody List<Integer> reqNo) {
         return server.printListReqNo(reqNo);
     }
 
+    @GetMapping("/buWeiShuJu")
+    public ResultVo<List<GetDropdownBox>> buWeiShuJu(String name) {
+        return server.buWeiShuJu(name);
+    }
 }

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

@@ -6,8 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.*;
-import org.apache.ibatis.mapping.ResultSetType;
-import org.apache.ibatis.session.ResultHandler;
 import thyyxxk.webserver.entity.casefrontsheet.YshHzRecord;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.*;
@@ -33,7 +31,7 @@ public interface JianYanJianChaDao {
 
     @Select("select order_name,req_no,act_order_no, " +
             "start_time,inpatient_no,admiss_times,receive_flag," +
-            "patient_uid " +
+            "patient_uid,inspect_stuff_name = (select rtrim(name) from ysh_zd_part_code where code = inspect_stuff) " +
             "from ysh_yj_req with (NOLOCK) " +
             " ${ew.customSqlSegment} ")
     List<YshYjReq> huoQuJianChaShenQingV2(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
@@ -79,7 +77,13 @@ public interface JianYanJianChaDao {
             "                         confirm_time,\n" +
             "                         confirm_id,\n" +
             "                         quantity,\n" +
-            "    inspect_stuff_name = (select rtrim(name) from jy_zd_sample with (NOLOCK) where code = inspect_stuff),\n" +
+            "                          case\n" +
+            "                          when req_type = '3'\n" +
+            "                              then (select rtrim(name) from ysh_zd_part_code where code = inspect_stuff)\n" +
+            "                          else\n" +
+            "                              (select rtrim(name)\n" +
+            "                               from jy_zd_sample with (NOLOCK)\n" +
+            "                               where code = inspect_stuff) end                                     as inspect_stuff_name,\n" +
             "    req_dept_name      = (select rtrim(name) from zd_unit_code where code = req_dept)," +
             "  req_ward_name      = (select rtrim(name) from zd_unit_code where code = req_ward),\n" +
             "    req_doctor_name    = (select rtrim(name) from a_employee_mi where code = req_doctor),\n" +
@@ -374,11 +378,12 @@ public interface JianYanJianChaDao {
             "group by a.code, a.name ")
     IPage<JcZdClass> jianYanFenLei(IPage<JcZdClass> page);
 
-    @Select("select rtrim(code) as code,name from jy_zd_sample with (NOLOCK) " +
-            "where (name like #{name} " +
+    @Select("select rtrim(code) as code,name from ${tableName} with (NOLOCK) " +
+            "where isnull(del_flag, '0') = '0' and (name like #{name} " +
             "    or py_code like #{name} " +
             "    or code like #{name} or d_code like #{name} )")
-    List<GetDropdownBox> biaoBenLeiXing(String name);
+    List<GetDropdownBox> biaoBenOrBuWei(String name, String tableName);
+
 
     @Select("select * " +
             "from ysh_yj_req with (NOLOCK) where req_no = #{reqNo} and inpatient_no = #{patNo} and admiss_times = #{times}")

+ 6 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/jianyanjiancha/vo/PrintYshReqVo.java

@@ -41,9 +41,15 @@ public class PrintYshReqVo {
 
     private List<Item> items;
 
+
+
     @Data
     public static class Item {
         private Integer reqNo;
+        /**
+         * 检查的部位或者检验的标本
+         */
+        private String inspectStuffName;
         private String itemName;
     }
 }

+ 6 - 2
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/JianYanJianChaShenQingService.java

@@ -35,7 +35,6 @@ import thyyxxk.webserver.utils.*;
 
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
-import java.text.DateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -177,6 +176,7 @@ public class JianYanJianChaShenQingService {
                 PrintYshReqVo.Item voItem = new PrintYshReqVo.Item();
                 voItem.setItemName(i.getOrderName());
                 voItem.setReqNo(i.getReqNo());
+                voItem.setInspectStuffName(i.getInspectStuffName());
                 if (vo.getItems() == null) {
                     vo.setItems(new ArrayList<>());
                 }
@@ -676,7 +676,11 @@ public class JianYanJianChaShenQingService {
     }
 
     public ResultVo<List<GetDropdownBox>> biaoBenShuJu(String name) {
-        return ResultVoUtil.success(dao.biaoBenLeiXing(StringUtil.isContainChinese(name)));
+        return ResultVoUtil.success(dao.biaoBenOrBuWei(StringUtil.isContainChinese(name), "jy_zd_sample"));
+    }
+
+    public ResultVo<List<GetDropdownBox>> buWeiShuJu(String name) {
+        return ResultVoUtil.success(dao.biaoBenOrBuWei(StringUtil.isContainChinese(name), "ysh_zd_part_code"));
     }
 
     public ResultVo<ViewInspectionItemDetailsVo> viewInspectionItemDetails(String orderCode, Boolean isCheck) {