fix(emergency):

更新实体类中的数据库表名@TableName
更新相关XML映射文件中的表名引用,确保查询语句与新的表名保持一致。
更新mapper文件注解中表名
This commit is contained in:
hejiayang
2026-03-12 16:06:02 +08:00
parent b9ea233a45
commit 886c9d1dbc
51 changed files with 74 additions and 74 deletions
@@ -19,7 +19,7 @@ import java.util.Date;
* @date 2023-12-12 * @date 2023-12-12
*/ */
@Data @Data
@TableName("aed") @TableName("QH_EME_AED")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class Aed implements Serializable { public class Aed implements Serializable {
@@ -26,7 +26,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_equipment_manger") @TableName("QH_EME_AED_EQUIP_MANGER")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_equipment_manger对象", description = "aed_equipment_manger") @Schema(title = "aed_equipment_manger对象", description = "aed_equipment_manger")
@@ -21,7 +21,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_latest") @TableName("QH_EME_AED_LATEST")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_latest对象", description = "aed_latest") @Schema(title = "aed_latest对象", description = "aed_latest")
@@ -20,7 +20,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_warn_info") @TableName("QH_EME_AED_WARN_INFO")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_warn_info对象", description = "aed_warn_info") @Schema(title = "aed_warn_info对象", description = "aed_warn_info")
@@ -26,7 +26,7 @@ import java.util.List;
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@FieldNameConstants @FieldNameConstants
@TableName(value = "emergency_center", autoResultMap = true) @TableName("QH_EME_CENTER")
public class EmergencyCenter implements Serializable { public class EmergencyCenter implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -17,7 +17,7 @@ import java.util.Date;
* @Data 2024/8/19下午4:19 * @Data 2024/8/19下午4:19
*/ */
@Data @Data
@TableName("emergency_center_admin") @TableName("QH_EME_CENTER_ADMIN")
public class EmergencyCenterAdmin implements Serializable { public class EmergencyCenterAdmin implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -18,7 +18,7 @@ import java.util.Date;
* @since 2024-09-29 09:15:15 * @since 2024-09-29 09:15:15
*/ */
@Data @Data
@TableName("emergency_center_open_time") @TableName("QH_EME_CENTER_OPEN_TIME")
public class EmergencyCenterOpenTime implements Serializable { public class EmergencyCenterOpenTime implements Serializable {
private static final long serialVersionUID = -40932379994360081L; private static final long serialVersionUID = -40932379994360081L;
@@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_center_resource") @TableName("QH_EME_CENTER_RESOUR")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title="emergency_center_resource对象", description="应急医疗点") @Schema(title="emergency_center_resource对象", description="应急医疗点")
@@ -24,7 +24,7 @@ import lombok.experimental.Accessors;
@FieldNameConstants @FieldNameConstants
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@TableName("emergency_grouped") @TableName("QH_EME_GROUPED")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title="emergency_grouped对象", description="分组管理表") @Schema(title="emergency_grouped对象", description="分组管理表")
@@ -15,7 +15,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("emergency_health_room") @TableName("QH_EME_HEALTH_ROOM")
@Schema(title="新疆健康小屋", description="新疆健康小屋表") @Schema(title="新疆健康小屋", description="新疆健康小屋表")
public class EmergencyHealthRoom { public class EmergencyHealthRoom {
@@ -24,7 +24,7 @@ import java.util.List;
* @since 2024-09-12 09:38:00 * @since 2024-09-12 09:38:00
*/ */
@Data @Data
@TableName("emergency_profession_user") @TableName("QH_EME_PROFESS_USER")
public class EmergencyProfessionUser implements Serializable { public class EmergencyProfessionUser implements Serializable {
private static final long serialVersionUID = -83227744569667346L; private static final long serialVersionUID = -83227744569667346L;
@@ -17,7 +17,7 @@ import org.springframework.format.annotation.DateTimeFormat;
* @Data 2024/8/19下午4:23 * @Data 2024/8/19下午4:23
*/ */
@Data @Data
@TableName("emergency_new_schedules") @TableName("QH_EME_NEW_SCHEDULES")
@FieldNameConstants @FieldNameConstants
public class EmergencySchedules { public class EmergencySchedules {
@@ -12,7 +12,7 @@ import lombok.experimental.FieldNameConstants;
* @Data 2024/8/19下午4:23 * @Data 2024/8/19下午4:23
*/ */
@Data @Data
@TableName("emergency_schedules_new_item") @TableName("QH_EME_SCHED_NEW_ITEM")
@FieldNameConstants @FieldNameConstants
public class EmergencySchedulesItem { public class EmergencySchedulesItem {
@@ -25,7 +25,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_serious_disease") @TableName("QH_EME_SERIOUS_DIS")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "emergency_serious_disease对象", description = "大病就医") @Schema(title = "emergency_serious_disease对象", description = "大病就医")
@@ -15,7 +15,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("large_screen_data") @TableName("QH_EME_SCRN_DATA")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "large_screen_data对象", description = "large_screen_data") @Schema(title = "large_screen_data对象", description = "large_screen_data")
@@ -22,7 +22,7 @@ import java.util.List;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_order") @TableName("QH_EME_ORDER")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "emergency_order对象", description = "emergency_order") @Schema(title = "emergency_order对象", description = "emergency_order")
@@ -21,7 +21,7 @@ import java.io.Serializable;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_order_detail") @TableName("QH_EME_ORDER_DETAIL")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "emergency_order_detail对象", description = "emergency_order_detail") @Schema(title = "emergency_order_detail对象", description = "emergency_order_detail")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_order_intervene") @TableName("QH_EME_ORDER_INTERVENE")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "emergency_order_intervene对象", description = "emergency_order_intervene") @Schema(title = "emergency_order_intervene对象", description = "emergency_order_intervene")
@@ -18,7 +18,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_order_operator") @TableName("QH_EME_ORDER_OPERATOR")
@Schema(title = "应急工单操作人员表", description = "应急工单操作人员表") @Schema(title = "应急工单操作人员表", description = "应急工单操作人员表")
public class OrderOperator implements Serializable { public class OrderOperator implements Serializable {
/** /**
@@ -19,7 +19,7 @@ import java.io.Serializable;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_order_send_record") @TableName("QH_EME_ORDER_SEND_REC")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "emergency_order_send_record对象", description = "emergency_order_send_record") @Schema(title = "emergency_order_send_record对象", description = "emergency_order_send_record")
@@ -24,7 +24,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_resource") @TableName("QH_EME_RESOURCE")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "emergency_resource对象", description = "应急资源") @Schema(title = "emergency_resource对象", description = "应急资源")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_schedule_custom") @TableName("QH_EME_SCHED_CUSTOM")
@Accessors(chain = true) @Accessors(chain = true)
@Deprecated @Deprecated
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@@ -21,7 +21,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_schedule_default") @TableName("QH_EME_SCHED_DEFAULT")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Deprecated @Deprecated
@@ -19,7 +19,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("emergency_schedule_record") @TableName("QH_EME_SCHED_RECORD")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "emergency_schedule_record对象", description = "emergency_schedule_record") @Schema(title = "emergency_schedule_record对象", description = "emergency_schedule_record")
@@ -13,7 +13,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("emergency_screen_animation") @TableName("QH_EME_SCRN_ANIMAT")
@Schema(title = "应急大屏开屏动画", description = "应急大屏开屏动画") @Schema(title = "应急大屏开屏动画", description = "应急大屏开屏动画")
public class ScreenAnimation implements Serializable { public class ScreenAnimation implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -17,7 +17,7 @@ import java.io.Serializable;
* @date 2023-06-06 17:29:38 * @date 2023-06-06 17:29:38
*/ */
@Setter @Setter
@TableName("sys_notify_sms_phone") @TableName("QH_SYS_NOTIF_SMS_PHONE")
@Data @Data
public class SysNotifySmsPhone implements Serializable { public class SysNotifySmsPhone implements Serializable {
/** /**
@@ -17,7 +17,7 @@ import java.io.Serializable;
* @date 2018-12-12 14:51:19 * @date 2018-12-12 14:51:19
*/ */
@Data @Data
@TableName("tbl_qimo_notice") @TableName("QH_EME_QIMO_NOTICE")
public class TblQimoNotice implements Serializable { public class TblQimoNotice implements Serializable {
/** /**
* 主键 * 主键
@@ -20,7 +20,7 @@ import java.util.Date;
* @date 2023/11/30 17:17 * @date 2023/11/30 17:17
*/ */
@Data @Data
@TableName("tbl_user_help") @TableName("QH_EME_USER_HELP")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "tbl_user_help对象", description = "tbl_user_help") @Schema(title = "tbl_user_help对象", description = "tbl_user_help")
@@ -19,7 +19,7 @@ import java.util.Date;
* @date 2023/11/30 17:17 * @date 2023/11/30 17:17
*/ */
@Data @Data
@TableName("tbl_video_mac") @TableName("QH_EME_VIDEO_MAC")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "tbl_video_mac对象", description = "tbl_video_mac") @Schema(title = "tbl_video_mac对象", description = "tbl_video_mac")
@@ -14,7 +14,7 @@ import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("xj_aed") @TableName("QH_EME_XJ_AED")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class XjAed implements Serializable { public class XjAed implements Serializable {
@@ -24,7 +24,7 @@ import java.util.Date;
@Builder @Builder
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@TableName(value = "zy_ambulance_data") @TableName(value = "QH_EME_AMBUL_DATA")
public class ZyAmbulanceData implements Serializable { public class ZyAmbulanceData implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
@@ -26,7 +26,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_equipment_maintain") @TableName("QH_EME_AED_EQUIP_MAINTAIN")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_equipment_maintain对象", description = "aed_equipment_maintain") @Schema(title = "aed_equipment_maintain对象", description = "aed_equipment_maintain")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_equipment_retrain") @TableName("QH_EME_AED_EQUIP_RETRAIN")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_equipment_retrain对象", description = "aed_equipment_retrain") @Schema(title = "aed_equipment_retrain对象", description = "aed_equipment_retrain")
@@ -25,7 +25,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_equipment_train") @TableName("QH_EME_AED_EQUIP_TRAIN")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_equipment_train对象", description = "aed_equipment_train") @Schema(title = "aed_equipment_train对象", description = "aed_equipment_train")
@@ -21,7 +21,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_latest") @TableName("QH_EME_AED_LATEST")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_latest对象", description = "aed_latest") @Schema(title = "aed_latest对象", description = "aed_latest")
@@ -24,7 +24,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_location_equipment") @TableName("QH_EME_AED_LOC_EQUIP")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_location_equipment对象", description = "aed_location_equipment") @Schema(title = "aed_location_equipment对象", description = "aed_location_equipment")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_use_record") @TableName("QH_EME_AED_USE_RECORD")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_use_record对象", description = "aed_use_record") @Schema(title = "aed_use_record对象", description = "aed_use_record")
@@ -20,7 +20,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("aed_warn_info") @TableName("QH_EME_AED_WARN_INFO")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "aed_warn_info对象", description = "aed_warn_info") @Schema(title = "aed_warn_info对象", description = "aed_warn_info")
@@ -25,15 +25,15 @@ public interface EmergencySeriousDiseaseMapper extends BaseMapper<EmergencySerio
public List<EmergencySeriousDisease> selectEmergencySeriousDiseaseListByState(IPage<EmergencySeriousDisease> page, @Param("state") String state, @Param("userId") String userId); public List<EmergencySeriousDisease> selectEmergencySeriousDiseaseListByState(IPage<EmergencySeriousDisease> page, @Param("state") String state, @Param("userId") String userId);
@Update("update emergency_serious_disease set state = 8 where state = 1 and desire_time < SYSDATE") @Update("update QH_EME_SERIOUS_DIS set state = 8 where state = 1 and desire_time < SYSDATE")
public int updateEmergencyStateOne(); public int updateEmergencyStateOne();
@Update("update emergency_serious_disease set state = 5 where state = 4 and reservation_time < SYSDATE") @Update("update QH_EME_SERIOUS_DIS set state = 5 where state = 4 and reservation_time < SYSDATE")
public int updateEmergencyStateTeo(); public int updateEmergencyStateTeo();
@Select("select count(1) from emergency_serious_disease where user_id = #{userId} and state < 5") @Select("select count(1) from QH_EME_SERIOUS_DIS where user_id = #{userId} and state < 5")
int selectEmergencyExist(String userId); int selectEmergencyExist(String userId);
Integer dutyTeam(String userId); Integer dutyTeam(String userId);
@@ -24,7 +24,7 @@ public interface ResourceMapper extends BaseMapper<Resource> {
List<EmergencyResourceDO> selectHospitalListByIds(@Param("hospitalIds") String hospitalIds); List<EmergencyResourceDO> selectHospitalListByIds(@Param("hospitalIds") String hospitalIds);
@Select("SELECT YEAR(order_over_time) AS year,COUNT(id) AS sums FROM emergency_order WHERE del_flag =0 and resource_id = #{resourceId} GROUP BY YEAR(order_over_time) ORDER BY year") @Select("SELECT YEAR(order_over_time) AS year,COUNT(id) AS sums FROM QH_EME_ORDER WHERE del_flag =0 and resource_id = #{resourceId} GROUP BY YEAR(order_over_time) ORDER BY year")
List<YearsStatistic> yearsStatistic(@Param("resourceId") String resourceId); List<YearsStatistic> yearsStatistic(@Param("resourceId") String resourceId);
@@ -4,8 +4,8 @@
<delete id="deleteFutureSchedules"> <delete id="deleteFutureSchedules">
DELETE t1 DELETE t1
FROM emergency_schedules_new_item t1 FROM QH_EME_SCHED_NEW_ITEM t1
INNER JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id INNER JOIN QH_EME_NEW_SCHEDULES t2 ON t1.schedules_id = t2.id
WHERE t2.schedules_time > SYSDATE WHERE t2.schedules_time > SYSDATE
AND t1.user_id = #{userId} AND t1.user_id = #{userId}
</delete> </delete>
@@ -14,7 +14,7 @@
SELECT center_id, SELECT center_id,
SUM(IF(type = 5, 1, 0)) AS operatorNum, SUM(IF(type = 5, 1, 0)) AS operatorNum,
SUM(IF(type = 6, 1, 0)) AS professionNum SUM(IF(type = 6, 1, 0)) AS professionNum
FROM emergency_profession_user FROM QH_EME_PROFESS_USER
GROUP BY center_id GROUP BY center_id
</select> </select>
@@ -23,8 +23,8 @@
t1.*, t1.*,
t2.center_name as centerName t2.center_name as centerName
FROM FROM
emergency_profession_user t1 QH_EME_PROFESS_USER t1
LEFT JOIN emergency_center t2 ON t1.center_id = t2.id LEFT JOIN QH_EME_CENTER t2 ON t1.center_id = t2.id
<where> <where>
and t1.type = #{type} and t1.type = #{type}
<if test="name != null and name != ''"> <if test="name != null and name != ''">
@@ -6,9 +6,9 @@
SELECT t1.user_id as userId, SELECT t1.user_id as userId,
t3.realname as userName, t3.realname as userName,
t3.type as userType t3.type as userType
FROM emergency_schedules_new_item t1 FROM QH_EME_SCHED_NEW_ITEM t1
LEFT JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id LEFT JOIN QH_EME_NEW_SCHEDULES t2 ON t1.schedules_id = t2.id
left join emergency_profession_user t3 on t1.user_id = t3.user_id left join QH_EME_PROFESS_USER t3 on t1.user_id = t3.user_id
WHERE t2.center_id = #{centerId} WHERE t2.center_id = #{centerId}
AND TO_CHAR(t2.schedules_time, 'YYYY-MM-DD') = #{time} AND TO_CHAR(t2.schedules_time, 'YYYY-MM-DD') = #{time}
ORDER BY ORDER BY
@@ -21,8 +21,8 @@
t1.user_id as userId, t1.user_id as userId,
t2.schedules_time as time t2.schedules_time as time
FROM FROM
emergency_schedules_new_item t1 QH_EME_SCHED_NEW_ITEM t1
LEFT JOIN emergency_new_schedules t2 on t1.schedules_id = t2.id LEFT JOIN QH_EME_NEW_SCHEDULES t2 on t1.schedules_id = t2.id
<where> <where>
<if test="userIds != null and userIds.size > 0"> <if test="userIds != null and userIds.size > 0">
and t1.user_id in and t1.user_id in
@@ -3,8 +3,8 @@
<mapper namespace="com.renkang.emergency.mapper.EmergencySchedulesNewMapper"> <mapper namespace="com.renkang.emergency.mapper.EmergencySchedulesNewMapper">
<select id="scheduleTimes" resultType="java.util.Date"> <select id="scheduleTimes" resultType="java.util.Date">
SELECT DISTINCT t2.schedules_time SELECT DISTINCT t2.schedules_time
FROM emergency_schedules_new_item t1 FROM QH_EME_SCHED_NEW_ITEM t1
LEFT JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id LEFT JOIN QH_EME_NEW_SCHEDULES t2 ON t1.schedules_id = t2.id
WHERE WHERE
EXTRACT(YEAR FROM t2.schedules_time) = #{year} EXTRACT(YEAR FROM t2.schedules_time) = #{year}
AND EXTRACT(MONTH FROM t2.schedules_time) = #{month} AND EXTRACT(MONTH FROM t2.schedules_time) = #{month}
@@ -101,8 +101,8 @@
SELECT t8.num SELECT t8.num
from (SELECT t1.user_type AS type, from (SELECT t1.user_type AS type,
count(1) AS num count(1) AS num
FROM emergency_schedules_new_item t1 FROM QH_EME_SCHED_NEW_ITEM t1
LEFT JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id LEFT JOIN QH_EME_NEW_SCHEDULES t2 ON t1.schedules_id = t2.id
LEFT JOIN emergency_profession_user t3 ON t3.center_id = t2.center_id LEFT JOIN emergency_profession_user t3 ON t3.center_id = t2.center_id
WHERE t3.user_id = #{userId} WHERE t3.user_id = #{userId}
AND TRUNC(t2.schedules_time) = TRUNC(SYSDATE) AND TRUNC(t2.schedules_time) = TRUNC(SYSDATE)
@@ -7,7 +7,7 @@
operation_user_id userId, operation_user_id userId,
count(*) num count(*) num
FROM FROM
emergency_order QH_EME_ORDER
WHERE operation_user_id is not null WHERE operation_user_id is not null
and operation_user_id != '' and operation_user_id != ''
and session_now = 1 and session_now = 1
@@ -22,7 +22,7 @@
major_user_id userId, major_user_id userId,
count(*) num count(*) num
FROM FROM
emergency_order QH_EME_ORDER
WHERE major_user_id is not null WHERE major_user_id is not null
and major_user_id != '' and major_user_id != ''
and session_now = 1 and session_now = 1
@@ -32,7 +32,7 @@
</select> </select>
<select id="selectHelpCentor" resultType="com.renkang.emergency.entity.TblHelpCentorVo"> <select id="selectHelpCentor" resultType="com.renkang.emergency.entity.TblHelpCentorVo">
SELECT Initiator_type as type, COUNT(*) as count SELECT Initiator_type as type, COUNT(*) as count
FROM emergency_order FROM QH_EME_ORDER
<where> <where>
<if test="sex != null and sex != '' and sex != '0'"> <if test="sex != null and sex != '' and sex != '0'">
salvage_user_sex = #{sex} salvage_user_sex = #{sex}
@@ -48,7 +48,7 @@
<select id="emergencyNum" resultType="com.renkang.emergency.archives.model.vo.EmergencyNum"> <select id="emergencyNum" resultType="com.renkang.emergency.archives.model.vo.EmergencyNum">
SELECT center_id as id, SELECT center_id as id,
count(*) num count(*) num
FROM emergency_order FROM QH_EME_ORDER
<where> <where>
and del_flag = 0 and del_flag = 0
<if test="centerIds != null and centerIds.size() > 0"> <if test="centerIds != null and centerIds.size() > 0">
@@ -3,7 +3,7 @@
<mapper namespace="com.renkang.emergency.mapper.ResourceMapper"> <mapper namespace="com.renkang.emergency.mapper.ResourceMapper">
<select id="selectHospitalList" resultType="String"> <select id="selectHospitalList" resultType="String">
select id select id
from emergency_resource from QH_EME_RESOURCE
where type = 2 where type = 2
and status = 1 and status = 1
and del_flag = 0 and del_flag = 0
@@ -14,7 +14,7 @@
select select
id, id,
name name
from emergency_resource from QH_EME_RESOURCE
where INSTR(',' || #{hospitalIds} || ',', ',' || id || ',') > 0 where INSTR(',' || #{hospitalIds} || ',', ',' || id || ',') > 0
and status = 1 and del_flag = 0 and status = 1 and del_flag = 0
</select> </select>
@@ -5,7 +5,7 @@
SELECT SELECT
schedule_time schedule_time
FROM FROM
emergency_schedule_custom QH_EME_SCHED_CUSTOM
<where> <where>
<if test="amOrPm != null and amOrPm != ''"> <if test="amOrPm != null and amOrPm != ''">
and type = #{amOrPm} and type = #{amOrPm}
@@ -28,7 +28,7 @@
user_id, user_id,
user_name, user_name,
user_sex user_sex
FROM emergency_schedule_custom FROM QH_EME_SCHED_CUSTOM
WHERE user_id = #{userId} WHERE user_id = #{userId}
AND EXTRACT(YEAR FROM schedule_time) = #{year} AND EXTRACT(YEAR FROM schedule_time) = #{year}
AND EXTRACT(MONTH FROM schedule_time) = #{month} AND EXTRACT(MONTH FROM schedule_time) = #{month}
@@ -5,7 +5,7 @@
SELECT SELECT
schedule_time schedule_time
FROM FROM
emergency_schedule_record QH_EME_SCHED_RECORD
<where> <where>
<if test="amOrPm != null and amOrPm != ''"> <if test="amOrPm != null and amOrPm != ''">
and type = #{amOrPm} and type = #{amOrPm}
@@ -25,7 +25,7 @@
EXTRACT(MONTH FROM schedule_time) AS month, EXTRACT(MONTH FROM schedule_time) AS month,
EXTRACT(DAY FROM schedule_time) AS day EXTRACT(DAY FROM schedule_time) AS day
FROM FROM
emergency_schedule_record QH_EME_SCHED_RECORD
<where> <where>
<if test="year != null and year != ''"> <if test="year != null and year != ''">
and EXTRACT(YEAR FROM schedule_time) = #{year} and EXTRACT(YEAR FROM schedule_time) = #{year}
@@ -4,7 +4,7 @@
<select id="getHospitalList" resultType="com.renkang.emergency.entity.TblBaseHospitalVo"> <select id="getHospitalList" resultType="com.renkang.emergency.entity.TblBaseHospitalVo">
SELECT id,name,latitude lat ,longitude lon,type SELECT id,name,latitude lat ,longitude lon,type
FROM emergency_resource FROM QH_EME_RESOURCE
WHERE 1 = 1 and del_flag = 0 WHERE 1 = 1 and del_flag = 0
<if test="type != null and type.length() > 0"> <if test="type != null and type.length() > 0">
AND type = #{type} AND type = #{type}
@@ -17,7 +17,7 @@
<select id="getHospitalListNew" resultType="com.renkang.emergency.entity.TblBaseHospitalVo"> <select id="getHospitalListNew" resultType="com.renkang.emergency.entity.TblBaseHospitalVo">
SELECT id,name,latitude lat ,longitude lon,type SELECT id,name,latitude lat ,longitude lon,type
FROM emergency_resource FROM QH_EME_RESOURCE
WHERE 1 = 1 and del_flag = 0 and type != 3 WHERE 1 = 1 and del_flag = 0 and type != 3
<if test="type != null and type != ''"> <if test="type != null and type != ''">
AND type = #{type} AND type = #{type}
@@ -5,13 +5,13 @@
<select id="statistics" resultType="com.renkang.emergency.entity.TblUserHelpVo"> <select id="statistics" resultType="com.renkang.emergency.entity.TblUserHelpVo">
SELECT type, COUNT(id) as count SELECT type, COUNT(id) as count
FROM ( FROM (
SELECT 'gross' as type, id, help_time FROM tbl_user_help SELECT 'gross' as type, id, help_time FROM QH_EME_USER_HELP
UNION ALL UNION ALL
SELECT 'alerdyreceive' as type, id, help_time FROM tbl_user_help WHERE status IN ('1','2') SELECT 'alerdyreceive' as type, id, help_time FROM QH_EME_USER_HELP WHERE status IN ('1','2')
UNION ALL UNION ALL
SELECT 'jqqz' as type, id, help_time FROM tbl_user_help WHERE treat_type = '2' SELECT 'jqqz' as type, id, help_time FROM QH_EME_USER_HELP WHERE treat_type = '2'
UNION ALL UNION ALL
SELECT 'dbjy' as type, id, help_time FROM tbl_user_help WHERE treat_type = '1' SELECT 'dbjy' as type, id, help_time FROM QH_EME_USER_HELP WHERE treat_type = '1'
) AS sub_query ) AS sub_query
<where> <where>
<if test="condition != null and condition != '' and condition == 2"> <if test="condition != null and condition != '' and condition == 2">
@@ -28,7 +28,7 @@
</select> </select>
<select id="getTotalAcceptance" resultType="java.lang.Integer"> <select id="getTotalAcceptance" resultType="java.lang.Integer">
SELECT COUNT(id) AS totalAcceptance SELECT COUNT(id) AS totalAcceptance
FROM tbl_user_help FROM QH_EME_USER_HELP
<where> <where>
status in('1','2') status in('1','2')
</where> </where>
@@ -5,7 +5,7 @@
<select id="ambulanceStat" resultType="com.renkang.emergency.bean.response.YcAmbulanceStat"> <select id="ambulanceStat" resultType="com.renkang.emergency.bean.response.YcAmbulanceStat">
SELECT injury_level AS type, SELECT injury_level AS type,
count(*) AS count count(*) AS count
FROM zy_ambulance_data FROM QH_EME_AMBUL_DATA
<where> <where>
del_flag = 0 del_flag = 0
<if test="type != null and type == 0"> <if test="type != null and type == 0">