فهرست منبع

增加夜班提示

hurugang 2 سال پیش
والد
کامیت
6fadf374af

+ 6 - 0
src/main/java/cn/hnthyy/thmz/controller/api/MedicalViewApiController.java

@@ -1748,6 +1748,12 @@ public class MedicalViewApiController {
                     }
                     map.put("doctorTitle", zdEmpTitle.getName());
                 }
+                int isP4Request = mzyRequestService.isP4Request(requestDayD, unitCode, doctorCode);
+                if (isP4Request > 0) {
+                    map.put("isP4Request", true);
+                } else {
+                    map.put("isP4Request", false);
+                }
             }
             list.removeAll(removeList);
             results.put("resultCode", 0);

+ 13 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzyRequestMapper.java

@@ -287,4 +287,17 @@ public interface MzyRequestMapper {
     @Delete("delete from mzy_request_new where id=#{id,jdbcType=BIGINT}")
     int deleteMzyRequestById(@Param("id") Long id);
 
+    /**
+     * 判断是否有夜班排班
+     *
+     * @param requestDay
+     * @param unitCode
+     * @param doctorCode
+     * @return
+     */
+    @Select({"<script>",
+            "select count(1) from mzy_request_new WITH(NOLOCK) where unit_code=#{unitCode} and doctor_code=#{doctorCode} and  ampm='p4' and request_day=#{requestDay,jdbcType=TIMESTAMP}  and del_flag=0  and charge_type not in (16,24)",
+            "</script>"})
+    int isP4Request(@Param("requestDay") Date requestDay, @Param("unitCode") String unitCode, @Param("doctorCode") String doctorCode);
+
 }

+ 10 - 0
src/main/java/cn/hnthyy/thmz/service/his/mz/MzyRequestService.java

@@ -175,4 +175,14 @@ public interface MzyRequestService {
      * @return
      */
     List<String> queryUnitCodeByRequestDayAndDoctor(String requestDay, String doctorCode,List<String> ampms);
+
+
+    /**
+     * 判断是否有夜班排班
+     * @param requestDay
+     * @param unitCode
+     * @param doctorCode
+     * @return
+     */
+    int isP4Request(Date requestDay, String unitCode, String doctorCode);
 }

+ 7 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzyRequestServiceImpl.java

@@ -255,4 +255,11 @@ public class MzyRequestServiceImpl implements MzyRequestService {
     public List<String> queryUnitCodeByRequestDayAndDoctor(String requestDay, String doctorCode,List<String> ampms) {
         return mzyRequestMapper.selectUnitCodeByRequestDayAndDoctor(requestDay,doctorCode,ampms);
     }
+
+
+
+    @Override
+    public int isP4Request(Date requestDay, String unitCode, String doctorCode) {
+        return mzyRequestMapper.isP4Request(requestDay,unitCode,doctorCode);
+    }
 }