Sfoglia il codice sorgente

删除审核记录

lihong 2 anni fa
parent
commit
78554d82c4

+ 11 - 0
src/main/java/thyyxxk/webserver/controller/medicalinsurance/SetlListUpldController.java

@@ -402,4 +402,15 @@ public class SetlListUpldController {
     public ResultVo<String> validateYbCode(@RequestParam("code")String code) {
         return service.validateYbCode(code);
     }
+    /**
+     * @description:删除审核记录
+     * @author: lihong
+     * @date: 2023/3/10 11:54
+     * @param: code
+     * @return: thyyxxk.webserver.entity.ResultVo<java.lang.String>
+     **/
+    @PostMapping("/delAuditLog")
+    public ResultVo<String> delAuditLog(@RequestBody TYbSetlModifyReq param) {
+        return service.delAuditLog(param);
+    }
 }

+ 25 - 0
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -1055,4 +1055,29 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
             "  and admiss_times = #{times}" +
             "  order by dis_diag_no ")
     List<YbZyDisDiag> getBafirstPage1(@Param("patNo") String patNo, @Param("times") Integer times);
+    @Insert("insert into zy_dis_diag_yb_modify_del (inpatient_no, admiss_times, dis_diag_no, dis_diag_type, dis_diag,\n" +
+            "                                       dis_diag_comment, op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status,\n" +
+            "                                       operation, si_diag_type, admiss_cond, dept_code)\n" +
+            " select inpatient_no, admiss_times, dis_diag_no, dis_diag_type, dis_diag,\n" +
+            "       dis_diag_comment, op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status,\n" +
+            "       operation, si_diag_type, admiss_cond, dept_code\n" +
+            "from zy_dis_diag_yb_modify where inpatient_no=#{patNo} and admiss_times=#{times}")
+    void insertDisYbModifyDel(@Param("patNo") String patNo, @Param("times") Integer times);
+    @Insert("insert into batj_ba4_modify_del (bah, zyh, zycs, ssxh, ssrq, sstj, ssys, sszs1, sszs2, mzys, ssbm, ssmc, mzff, qkjb,\n" +
+            "                                 yhqk, ssbfz, fhqk, ssjb, cut_heal, op_start_date, op_end_date, anst_start_date,\n" +
+            "                                 anst_end_date, dept_code)\n" +
+            "                                 select bah, zyh, zycs, ssxh, ssrq, sstj, ssys, sszs1, sszs2, mzys, ssbm, ssmc, mzff, qkjb,\n" +
+            "                                        yhqk, ssbfz, fhqk, ssjb, cut_heal, op_start_date, op_end_date, anst_start_date,\n" +
+            "                                        anst_end_date, dept_code from  batj_ba4_modify where zyh = #{patNo} and zycs = #{times}")
+    void insOprtModifiyDel(@Param("patNo") String patNo, @Param("times") Integer times);
+    @Delete("delete from t_yb_setl_modify_req  where  pat_no = #{patNo} and times = #{times};\n" +
+            "delete from t_setl_audit_log where  pat_no = #{patNo} and times = #{times};\n" +
+            "delete from zy_dis_diag_yb_modify where  inpatient_no = #{patNo} and admiss_times = #{times};\n" +
+            "delete  from batj_ba4_modify where  bah = #{patNo} and zycs = #{times};")
+    void delAuditLog(@Param("patNo") String patNo, @Param("times") Integer times);
+    @Insert("insert into t_setl_audit_log_del(create_name, create_code, create_time, remark, audit_flag, audit_type, pat_no, times,\n" +
+            "                                 del_code, del_name)\n" +
+            " select create_name, create_code, create_time, remark, audit_flag, audit_type, pat_no, times,#{delCode},#{delName}\n" +
+            " from t_setl_audit_log where pat_no = #{patNo} and times = #{times}")
+    void insertAuditLogsDel(@Param("patNo") String patNo, @Param("times") Integer times, @Param("delCode") String delCode, @Param("delName") String delName);
 }

+ 14 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -2491,4 +2491,18 @@ public class SetlListUpldService {
         return ResultVoUtil.success(str);
 
     }
+
+    public ResultVo<String> delAuditLog(TYbSetlModifyReq param) {
+        TYbSetlModifyReq setlModifyReq = dao.getSetlModifyReq(param.getPatNo(), param.getTimes());
+        if(setlModifyReq == null){
+            throw new BizException(ExceptionEnum.LOGICAL_ERROR,"已经是未审核状态,不能删除审核记录");
+        }else {
+            UserInfo userInfo = redisLikeService.getUserInfoByToken();
+            dao.insertDisYbModifyDel(param.getPatNo(),param.getTimes());
+            dao.insOprtModifiyDel(param.getPatNo(),param.getTimes());
+            dao.insertAuditLogsDel(param.getPatNo(),param.getTimes(),userInfo.getCode(),userInfo.getName());
+            dao.delAuditLog(param.getPatNo(),param.getTimes());
+        }
+        return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION,"删除成功");
+    }
 }