فهرست منبع

门诊撤销时,新增一条该就诊人的次数为-1的医保记录

lighter 2 سال پیش
والد
کامیت
c97b5e8232

+ 1 - 0
src/main/java/thyyxxk/webserver/controller/medicalinsurance/MarkMtFeesController.java

@@ -76,6 +76,7 @@ public class MarkMtFeesController {
         mz.setStaffId(param.getStaffId());
         mz.setNeedRevokeRegistration(1);
         ResultVo<FundDetail> result = mzService.revokeOutpatientSettlement(mz);
+        mzService.insertSiPatInfo(mz);
         return getStringObjectMap(param, result, "收费窗口撤销门特结算");
     }
 

+ 6 - 4
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiMzDao.java

@@ -2,9 +2,7 @@ package thyyxxk.webserver.dao.his.medicalinsurance;
 
 import org.apache.ibatis.annotations.*;
 import thyyxxk.webserver.entity.markmtfees.*;
-import thyyxxk.webserver.entity.medicalinsurance.outpatient.MzPatientInfo;
 import thyyxxk.webserver.entity.medicalinsurance.outpatient.*;
-import thyyxxk.webserver.entity.medicalinsurance.query.InsuInfo;
 import thyyxxk.webserver.entity.medicalinsurance.query.PsnBaseInfo;
 import thyyxxk.webserver.entity.medicalinsurance.query.SiPatInfo;
 
@@ -24,8 +22,12 @@ public interface SiMzDao {
     @Select("select insuplc_admdvs from t_si_pat_info where " +
             "pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
     String selectAdmdvs(@Param("patNo") String patNo,
-                               @Param("times") int times,
-                               @Param("ledgerSn") int ledgerSn);
+                        @Param("times") int times,
+                        @Param("ledgerSn") int ledgerSn);
+
+    @Select("select * from t_si_pat_info where pat_no=#{patNo} and times=#{times}")
+    PsnBaseInfo selectPsnBaseinfo(@Param("patNo") String patNo,
+                                @Param("times") int times);
 
     @Select("SELECT a.patient_id,a.times,a.visit_dept_code,b.adress,b.phone_no, " +
             "b.name,b.age,sex=case when b.sex='1' then '男' when b.sex='2' then '女' else '未知' end, " +

+ 6 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -304,6 +304,12 @@ public class SiMzService {
         return mzSrvc.revokeOutpatientSettlement(siMzFeeUrl, p);
     }
 
+    public void insertSiPatInfo(MzPatientInfo mz) {
+        PsnBaseInfo patinfo = dao.selectPsnBaseinfo(mz.getPatNo(), mz.getTimes());
+        patinfo.setTimes(-1);
+        dao.insertSiMzInfoPsnNo(patinfo);
+    }
+
     public ResultVo<String> saveSiMzDiags(List<SiMzDiag> diags) {
         if (ListUtil.isBlank(diags)) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有要保存的诊断!");