Selaa lähdekoodia

所有核酸采样一天都只能采一次

hurugang 2 vuotta sitten
vanhempi
commit
1e0ff2468f

+ 1 - 1
src/main/java/cn/hnthyy/thmz/common/Constants.java

@@ -396,7 +396,7 @@ public class Constants {
     public static final String NUCLEIC_ORDER_CODE = "003585";
 
     /**
-     * 核酸检测项目(混检)编码
+     * 核酸检测项目(混检)医嘱编码
      */
     public static final String HYBRID_TEST_ORDER_CODE = "003680";
 

+ 2 - 2
src/main/java/cn/hnthyy/thmz/controller/mz/ClinicController.java

@@ -48,8 +48,8 @@ public class ClinicController {
     private ZdUnitCodeService zdUnitCodeService;
     @Autowired
     private EmployeeService employeeService;
-    @Autowired
-    private MzyZdReqtypeService mzyZdReqtypeService;
+//    @Autowired
+//    private MzyZdReqtypeService mzyZdReqtypeService;
     @Autowired
     private MzyZdChargeTypeService mzyZdChargeTypeService;
     @Autowired

+ 11 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzChargeDetailMapper.java

@@ -1141,4 +1141,15 @@ public interface MzChargeDetailMapper {
      */
     @Select("select patient_id from mz_charge_detail  WITH(NOLOCK) where tc_no ='003585' and pay_mark = '0' and cash_id <> '99997' and price_time> '2022-10-09 15:00:00'  ")
     List<String> selectDrdgPatientId();
+
+
+
+    /**
+     * 根据收费编码查询当天是否有已经缴费的记录
+     * @param patientId
+     * @param chargeItemCode
+     * @return
+     */
+    @Select("select count(1) from  mz_charge_detail where patient_id=#{patientId} and charge_item_code =#{chargeItemCode} and pay_mark = 0 and DateDiff(dd,charge_date,getDate()) =0 ")
+    int select24HourReqByCode(@Param("patientId") String patientId,@Param("chargeItemCode") String chargeItemCode);
 }

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

@@ -2325,6 +2325,10 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (mzPatientMi == null) {
             throw new MzException("当前挂号的病人信息不存在,请先保存病人信息!");
         }
+        int num=mzYjReqMapper.select24HourReqByCode(patientId,orderCode);
+        if(num>0){
+            throw new MzException("您在今天已经采过样了,请不要重复申请!");
+        }
         //自助开核酸的时候更新病人年龄
         if (mzPatientMi.getBirthDay() != null) {
             int age = DateUtil.getAge(mzPatientMi.getBirthDay());
@@ -2374,6 +2378,10 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (mzPatientMi == null) {
             throw new MzException("当前挂号的病人信息不存在,请先保存病人信息!");
         }
+        int num=mzChargeDetailMapper.select24HourReqByCode(patientId,Constants.HYBRID_TEST_CHARGE_CODE);
+        if(num>0){
+            throw new MzException("您在今天已经采过样了,请不要重复申请!");
+        }
         //自助开核酸的时候更新病人年龄
         if (mzPatientMi.getBirthDay() != null) {
             int age = DateUtil.getAge(mzPatientMi.getBirthDay());
@@ -2434,10 +2442,6 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
 
     @Override
     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("您在今天已经采过样了,请不要重复申请!");
-        }
         return getNucleicAcidApplication(patientId, opId,Constants.NUCLEIC_ORDER_ONLY_YELLOW_CODE);
     }
 

+ 1 - 1
src/main/resources/templates/mz/clinic.html

@@ -1561,7 +1561,7 @@
                             <div class="col-md-10 col-sm-10 col-xs-12">
                                 <input id="editUserDetail" class="form-control col-md-7 col-xs-12"
                                        data-validate-length-range="0,40"
-                                       placeholder="请输入" required="required" type="text">
+                                       placeholder="请输入"  type="text">
                             </div>
                         </div>
                     </div>

+ 1 - 1
src/main/resources/templates/mz/registration.html

@@ -747,7 +747,7 @@
                             <div class="col-md-10 col-sm-10 col-xs-12">
                                 <input id="editUserDetail" class="form-control col-md-7 col-xs-12"
                                        data-validate-length-range="0,40"
-                                       placeholder="请输入" required="required" type="text">
+                                       placeholder="请输入"  type="text">
                             </div>
                         </div>
                     </div>

+ 1 - 1
src/main/resources/templates/mz/registration_list.html

@@ -458,7 +458,7 @@
                             <div class="col-md-10 col-sm-10 col-xs-12">
                                 <input id="editUserDetail" class="form-control col-md-7 col-xs-12"
                                        data-validate-length-range="0,40"
-                                       placeholder="请输入" required="required" type="text">
+                                       placeholder="请输入" type="text">
                             </div>
                         </div>
                     </div>