Browse Source

只在签收的时候新增数据

lighter 2 years ago
parent
commit
1189f8b3dd

+ 0 - 5
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/CaseFrontSheetDao.java

@@ -503,11 +503,6 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
     @Update("update t_case_frontsheet_main set file_status=1, sign_date=getdate() where bah=#{bah} and admiss_times=#{times}")
     void updateSignStatus(@Param("bah") String bah, @Param("times") int times);
 
-    @Delete("delete from t_case_frontsheet_main where bah=#{bah} and admiss_times=#{times}; " +
-            "delete from t_case_frontsheet_disdiag where bah=#{bah} and times=#{times}; " +
-            "delete from t_case_frontsheet_surgery where bah=#{bah} and times=#{times}")
-    void deleteSheetInfo(@Param("bah") String bah, @Param("times") int times);
-
     @Insert("insert into ba_op_log (op_type, op_id, op_time, inpatient_no, admiss_times) values " +
             "(#{opType}, #{staffId}, getDate(), #{bah}, #{admissTimes})")
     void writeBaOpLog(@Param("opType") int opType,

+ 0 - 18
src/main/java/thyyxxk/webserver/service/casefrontsheet/CaseFrontSheetMainService.java

@@ -638,9 +638,6 @@ public class CaseFrontSheetMainService {
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "已最终归档病案首页无法打印!");
             }
         }
-        if (null == sheet.getFileStatus() || 0 == sheet.getFileStatus()) {
-            dao.deleteSheetInfo(sheet.getBah(), sheet.getAdmissTimes());
-        }
         ResultVo<List<CodeName>> save = saveSheet(param.getSheet());
         if (save.getCode() != ExceptionEnum.SUCCESS.getCode()) {
             Map<String, List<CodeName>> map = new HashMap<>();
@@ -653,10 +650,6 @@ public class CaseFrontSheetMainService {
         if (warnings.get("force").isEmpty()) {
             if (param.getPage() == 2) {
                 saveSheet(sheet);
-                if (null == sheet.getFileStatus() || 0 == sheet.getFileStatus()) {
-                    sheet.setFileStatus(0);
-                    insertSheetData(sheet);
-                }
             }
             if (warnings.get("advice").isEmpty()) {
                 return ResultVoUtil.success();
@@ -721,17 +714,6 @@ public class CaseFrontSheetMainService {
             forces.removeIf(item -> Objects.equals(item.getCode(), "dismissDate"));
             forces.removeIf(item -> Objects.equals(item.getCode(), "pathologicDiagCode"));
         }
-        if (forces.isEmpty()) {
-            Integer status = dao.selectFileStatus(sheet.getBah(), sheet.getAdmissTimes());
-            status = null == status ? -1 : status;
-            if (status == 0) {
-                dao.deleteSheetInfo(view.getBah(), view.getTimes());
-            }
-            if (status < 1) {
-                sheet.setFileStatus(0);
-                insertSheetData(sheet);
-            }
-        }
         return ResultVoUtil.success(warnings);
     }