lighter 2 years ago
parent
commit
66673735ce

+ 3 - 7
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -385,14 +385,10 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
 
     @Select("select opName = (select top(1) rtrim(name) from a_employee_mi where code = op_id_code)," +
             "rtrim(inpatient_no) inpatient_no, admiss_times, dis_diag_no, dis_diag_type," +
-            "case  when yb_code is null then rtrim(dis_diag) else rtrim(yb_code) end dis_diag," +
-            "case  when yb_name is null then rtrim(dis_diag_comment) else rtrim(yb_name) end dis_diag_comment," +
+            "rtrim(dis_diag) as dis_diag,rtrim(dis_diag_comment) as dis_diag_comment," +
             "op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status, operation, si_diag_type,admiss_cond," +
-            "dept_code," +
-            "(select name from zd_unit_code where code = dept_code) as dept_code_name  " +
-            "from ${tableName} left join zd_icd_code_new on (dis_diag = code) " +
-            "where inpatient_no = #{patNo} and admiss_times = #{times} " +
-            "order by  dis_diag_no ")
+            "dept_code, (select name from zd_unit_code where code=dept_code) as dept_code_name  " +
+            "from ${tableName} where inpatient_no=#{patNo} and admiss_times=#{times} order by dis_diag_no ")
     List<YbZyDisDiag> zhenDuanXinXi(@Param("patNo") String patNo, @Param("times") Integer times, @Param("tableName") String tableName);
 
     @Select("select *,bldCatName = (select name from bld_cat_code where bld_cat_code.code = bld_cat) " + "from patient_bld_info " + "where pat_no = #{patNo} " + "  and times = #{times}")

+ 2 - 3
src/main/java/thyyxxk/webserver/service/utilities/CreateExcelFileService.java

@@ -16,7 +16,6 @@ import java.util.Map;
 @Service
 public class CreateExcelFileService {
     private final WxUploadFileService wxUploadFileService;
-    private static HSSFWorkbook hWorkbook = null;
 
     @Autowired
     public CreateExcelFileService(WxUploadFileService wxUploadFileService) {
@@ -25,7 +24,7 @@ public class CreateExcelFileService {
 
     private File createExcelXls(String sheetName, String[] titleRow) throws Exception {
         File file = File.createTempFile("supply", ".xls");
-        hWorkbook = new HSSFWorkbook();
+        HSSFWorkbook hWorkbook = new HSSFWorkbook();
 
         HSSFCellStyle hSSFCellStyle = hWorkbook.createCellStyle();
         hSSFCellStyle.setAlignment(HorizontalAlignment.LEFT);
@@ -48,7 +47,7 @@ public class CreateExcelFileService {
 
     private void writeToExcelXls(String touserFrom, String sheetName, File file,
                                         List<Map<String, String>> mapList) throws Exception {
-        hWorkbook = new HSSFWorkbook(Files.newInputStream(file.toPath()));
+        HSSFWorkbook hWorkbook = new HSSFWorkbook(Files.newInputStream(file.toPath()));
         FileOutputStream fileOutputStream;
         HSSFSheet sheet = hWorkbook.getSheet(sheetName);
         int columnCount = sheet.getRow(0).getLastCellNum();