Pārlūkot izejas kodu

核酸重复创建校验改为同一天内

hurugang 2 gadi atpakaļ
vecāks
revīzija
f105576c9a

+ 2 - 2
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzYjReqMapper.java

@@ -384,11 +384,11 @@ public interface MzYjReqMapper {
     String selectJcIdFromYjJcPatient(@Param("patientId") String patientId);
 
     /**
-     * 根据医嘱编码查询24小时内是否有已经缴费的记录
+     * 根据医嘱编码查询当天是否有已经缴费的记录
      * @param patientId
      * @param orderCode
      * @return
      */
-    @Select("select count(1) from  mz_yj_req where patient_id=#{patientId} and order_code =#{orderCode} and pay_mark = 0 and DateDiff(hh,req_date,getDate()) <=24 ")
+    @Select("select count(1) from  mz_yj_req where patient_id=#{patientId} and order_code =#{orderCode} and pay_mark = 0 and DateDiff(dd,req_date,getDate()) =0 ")
     int select24HourReqByCode(@Param("patientId") String patientId,@Param("orderCode") String orderCode);
 }

+ 1 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -2426,7 +2426,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
     public Clinic nucleicOnlyYellowAcidApplication(String patientId, String opId) throws MzException {
         int num=mzYjReqMapper.select24HourReqByCode(patientId,Constants.NUCLEIC_ORDER_ONLY_YELLOW_CODE);
         if(num>0){
-            throw new MzException("您在24小时内已经采过样了,请不要重复申请!");
+            throw new MzException("您在今天已经采过样了,请不要重复申请!");
         }
         return getNucleicAcidApplication(patientId, opId,Constants.NUCLEIC_ORDER_ONLY_YELLOW_CODE);
     }