Sfoglia il codice sorgente

拦截重复登记

lighter 8 mesi fa
parent
commit
65815d3a18

+ 3 - 7
src/main/java/thyyxxk/simzfeeoprnsystm/dao/SiMzDao.java

@@ -30,15 +30,11 @@ public interface SiMzDao {
                            @Param("times") int times,
                            @Param("nullCtnt") String nullCtnt);
 
-    @Select("select a.psn_no, mdtrtCertType='02', " +
-            "b.visit_date as begntime, " +
-            "a.certno as mdtrtCertNo, " +
-            "a.psn_cert_type, " +
-            "a.certno, " +
-            "a.psn_name, " +
+    @Select("select a.psn_no, mdtrtCertType='02',b.visit_date as begntime, " +
+            "a.certno as mdtrtCertNo,a.psn_cert_type,a.certno,a.psn_name, " +
+            "rtrim(b.visit_dept_code) as deptCode,a.mdtrt_id, " +
             "atddrNo=(select rtrim(yb_code) from a_employee_mi where code=b.doctor_code), " +
             "drName=(select rtrim(name) from a_employee_mi where code=b.doctor_code), " +
-            "rtrim(b.visit_dept_code) as deptCode, " +
             "caty=(select si_caty from zd_unit_code where code=b.visit_dept_code), " +
             "deptName=(select z.name from t_yb_dept z where z.code=" +
             "(select t.si_caty from zd_unit_code t where t.code=b.visit_dept_code)) " +

+ 1 - 0
src/main/java/thyyxxk/simzfeeoprnsystm/pojo/Regstrtn.java

@@ -104,4 +104,5 @@ public class Regstrtn {
      * */
     private String caty;
 
+    private String mdtrtId;
 }

+ 6 - 2
src/main/java/thyyxxk/simzfeeoprnsystm/service/SiMzFeeService.java

@@ -56,9 +56,13 @@ public class SiMzFeeService {
     public ResultVo<String> outpatientRegistration(MzPatientInfo p) {
         Regstrtn regstrtn = mzDao.selectRegstrtn(p.getPatNo(), p.getTimes());
         if (null == regstrtn) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "mz_visit_table患者信息为空,请联系医生重开处方。");
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR,
+                    "mz_visit_table患者信息为空,请联系医生重开处方。");
+        }
+        if (StringUtil.notBlank(regstrtn.getMdtrtId())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "本次就诊已有医保登记[mdtrtId:" +
+                    regstrtn.getMdtrtId() + "],请勿重复办理。");
         }
-
         List<String> chargeCodeList = mzDao.selectHisChargeCodes(p.getPatNo(), p.getTimes());
         if (chargeCodeList.isEmpty()) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "未找到收费明细,请先生成医保处方。");