Explorar el Código

医嘱项目查询优化

DESKTOP-0GD05B0\Administrator hace 3 años
padre
commit
8108859b9b

+ 4 - 2
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/YiZhuLuRuDao.java

@@ -184,7 +184,8 @@ public interface YiZhuLuRuDao {
     long huoQuYiZhuShuJuTotal(@Param(Constants.WRAPPER) Wrapper<?> wq);
 
 
-    @Select("SELECT distinct py_code=a.py_code, " +
+    @Select("SELECT         distinct        rtrim(a.code) + rtrim(serial) as id, " +
+            "               py_code=a.py_code, " +
             "                d_code =a.d_code, " +
             "                order_code =a.code, " +
             "                order_name =a.name, " +
@@ -231,7 +232,8 @@ public interface YiZhuLuRuDao {
                                      @Param("groupNo") String groupNo);
 
 
-    @Select("SELECT a.py_code, " +
+    @Select("SELECT rtrim(a.order_code) + '00' as id," +
+            "a.py_code, " +
             "       a.d_code, " +
             "       a.order_code , " +
             "       rtrim(a.order_name) order_name, " +

+ 2 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/yizhuluru/YiZhuMingChen.java

@@ -15,6 +15,8 @@ import java.math.BigDecimal;
  */
 @Data
 public class YiZhuMingChen {
+
+    private String id;
     private String pyCode;
     private String dCode;
     private String patternCode;

+ 2 - 2
src/main/java/thyyxxk/webserver/service/casefrontsheet/HuiZhenShenQingService.java

@@ -126,9 +126,9 @@ public class HuiZhenShenQingService {
     public ResultVo<Boolean> shanChuHuiZhenShenQing(String inpatientNo, int admissTimes, BigDecimal actOrderNo, int reqTimes) {
         List<YshHzRecord> huiZhenXinXi = dao.chaKanHuiZhenShenQing(inpatientNo, admissTimes, actOrderNo);
         if (ListUtil.isBlank(huiZhenXinXi)) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没shou有查询到对应信息可能已经被删除了。");
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有查询到原来的会诊信息。");
         }
-        if (StringUtil.notBlank(huiZhenXinXi.get(0).getStatusFlag()) && huiZhenXinXi.get(0).getStatusFlag().trim().equals("2")) {
+        if (StringUtil.notBlank(huiZhenXinXi.get(0).getStatusFlag()) && "2".equals(huiZhenXinXi.get(0).getStatusFlag().trim())) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该会诊已经完成了无法删除。");
         }
         //会诊申请是根据 住院号,住院次数,申请次数 来获取到 一条

+ 0 - 62
src/main/java/thyyxxk/webserver/xcTest/Test.java

@@ -1,62 +0,0 @@
-package thyyxxk.webserver.xcTest;
-
-import com.baomidou.dynamic.datasource.annotation.DS;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.stereotype.Component;
-import thyyxxk.webserver.dao.his.xcTest.TestDao;
-
-import javax.annotation.PostConstruct;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-@Component
-@Slf4j
-@DS("his")
-public class Test {
-
-    private final TestDao dao;
-
-    public Test(TestDao dao) {
-        this.dao = dao;
-    }
-
-
-//    @PostConstruct
-    public void test() throws IOException, InvalidFormatException {
-        String 文件路径 = "C:\\Users\\Administrator\\Documents\\WeChat Files\\wxid_ii3i0go9bhwv22\\FileStorage\\File\\2022-11\\drg分组明细查询导出-2022 10月.xlsx";
-        XSSFWorkbook xssfWorkbook = new XSSFWorkbook(new File(文件路径));
-        XSSFSheet sheet = xssfWorkbook.getSheetAt(0);
-
-        int maxRow = sheet.getLastRowNum();
-        List<String> list = new ArrayList<>();
-        for (int row = 1; row <= maxRow; row++) {
-            XSSFRow getRow = sheet.getRow(row);
-            Cell cell1 = getRow.createCell(24);
-            Cell cell2 = getRow.createCell(25);
-
-            Map<String, String> map = dao.patientInfo(getRow.getCell(0).toString());
-            if (map == null) {
-                continue;
-            }
-            cell1.setCellValue(map.get("name"));
-            cell2.setCellValue(map.get("small_dept"));
-
-        }
-        FileOutputStream outputStream = new FileOutputStream("D:\\2.xlsx");
-        xssfWorkbook.write(outputStream);
-        //7、关闭流
-        outputStream.close();
-        System.out.println(String.join(",", list));
-    }
-
-
-}