fix(emergency):
更新实体类中的数据库表名@TableName 更新相关XML映射文件中的表名引用,确保查询语句与新的表名保持一致。 更新mapper文件注解中表名
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("aed_equipment_maintain")
|
||||
@TableName("QH_EME_AED_EQUIP_MAINTAIN")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "aed_equipment_maintain对象", description = "aed_equipment_maintain")
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("aed_equipment_retrain")
|
||||
@TableName("QH_EME_AED_EQUIP_RETRAIN")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "aed_equipment_retrain对象", description = "aed_equipment_retrain")
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("aed_equipment_train")
|
||||
@TableName("QH_EME_AED_EQUIP_TRAIN")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "aed_equipment_train对象", description = "aed_equipment_train")
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("aed_latest")
|
||||
@TableName("QH_EME_AED_LATEST")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "aed_latest对象", description = "aed_latest")
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("aed_location_equipment")
|
||||
@TableName("QH_EME_AED_LOC_EQUIP")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "aed_location_equipment对象", description = "aed_location_equipment")
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("aed_use_record")
|
||||
@TableName("QH_EME_AED_USE_RECORD")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "aed_use_record对象", description = "aed_use_record")
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("aed_warn_info")
|
||||
@TableName("QH_EME_AED_WARN_INFO")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "aed_warn_info对象", description = "aed_warn_info")
|
||||
|
||||
+3
-3
@@ -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);
|
||||
|
||||
|
||||
@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();
|
||||
|
||||
|
||||
@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();
|
||||
|
||||
|
||||
@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);
|
||||
|
||||
Integer dutyTeam(String userId);
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public interface ResourceMapper extends BaseMapper<Resource> {
|
||||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
+5
-5
@@ -4,8 +4,8 @@
|
||||
|
||||
<delete id="deleteFutureSchedules">
|
||||
DELETE t1
|
||||
FROM emergency_schedules_new_item t1
|
||||
INNER JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id
|
||||
FROM QH_EME_SCHED_NEW_ITEM t1
|
||||
INNER JOIN QH_EME_NEW_SCHEDULES t2 ON t1.schedules_id = t2.id
|
||||
WHERE t2.schedules_time > SYSDATE
|
||||
AND t1.user_id = #{userId}
|
||||
</delete>
|
||||
@@ -14,7 +14,7 @@
|
||||
SELECT center_id,
|
||||
SUM(IF(type = 5, 1, 0)) AS operatorNum,
|
||||
SUM(IF(type = 6, 1, 0)) AS professionNum
|
||||
FROM emergency_profession_user
|
||||
FROM QH_EME_PROFESS_USER
|
||||
GROUP BY center_id
|
||||
</select>
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
t1.*,
|
||||
t2.center_name as centerName
|
||||
FROM
|
||||
emergency_profession_user t1
|
||||
LEFT JOIN emergency_center t2 ON t1.center_id = t2.id
|
||||
QH_EME_PROFESS_USER t1
|
||||
LEFT JOIN QH_EME_CENTER t2 ON t1.center_id = t2.id
|
||||
<where>
|
||||
and t1.type = #{type}
|
||||
<if test="name != null and name != ''">
|
||||
|
||||
+5
-5
@@ -6,9 +6,9 @@
|
||||
SELECT t1.user_id as userId,
|
||||
t3.realname as userName,
|
||||
t3.type as userType
|
||||
FROM emergency_schedules_new_item t1
|
||||
LEFT JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id
|
||||
left join emergency_profession_user t3 on t1.user_id = t3.user_id
|
||||
FROM QH_EME_SCHED_NEW_ITEM t1
|
||||
LEFT JOIN QH_EME_NEW_SCHEDULES t2 ON t1.schedules_id = t2.id
|
||||
left join QH_EME_PROFESS_USER t3 on t1.user_id = t3.user_id
|
||||
WHERE t2.center_id = #{centerId}
|
||||
AND TO_CHAR(t2.schedules_time, 'YYYY-MM-DD') = #{time}
|
||||
ORDER BY
|
||||
@@ -21,8 +21,8 @@
|
||||
t1.user_id as userId,
|
||||
t2.schedules_time as time
|
||||
FROM
|
||||
emergency_schedules_new_item t1
|
||||
LEFT JOIN emergency_new_schedules t2 on t1.schedules_id = t2.id
|
||||
QH_EME_SCHED_NEW_ITEM t1
|
||||
LEFT JOIN QH_EME_NEW_SCHEDULES t2 on t1.schedules_id = t2.id
|
||||
<where>
|
||||
<if test="userIds != null and userIds.size > 0">
|
||||
and t1.user_id in
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
<mapper namespace="com.renkang.emergency.mapper.EmergencySchedulesNewMapper">
|
||||
<select id="scheduleTimes" resultType="java.util.Date">
|
||||
SELECT DISTINCT t2.schedules_time
|
||||
FROM emergency_schedules_new_item t1
|
||||
LEFT JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id
|
||||
FROM QH_EME_SCHED_NEW_ITEM t1
|
||||
LEFT JOIN QH_EME_NEW_SCHEDULES t2 ON t1.schedules_id = t2.id
|
||||
WHERE
|
||||
EXTRACT(YEAR FROM t2.schedules_time) = #{year}
|
||||
AND EXTRACT(MONTH FROM t2.schedules_time) = #{month}
|
||||
|
||||
+2
-2
@@ -101,8 +101,8 @@
|
||||
SELECT t8.num
|
||||
from (SELECT t1.user_type AS type,
|
||||
count(1) AS num
|
||||
FROM emergency_schedules_new_item t1
|
||||
LEFT JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id
|
||||
FROM QH_EME_SCHED_NEW_ITEM t1
|
||||
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
|
||||
WHERE t3.user_id = #{userId}
|
||||
AND TRUNC(t2.schedules_time) = TRUNC(SYSDATE)
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
operation_user_id userId,
|
||||
count(*) num
|
||||
FROM
|
||||
emergency_order
|
||||
QH_EME_ORDER
|
||||
WHERE operation_user_id is not null
|
||||
and operation_user_id != ''
|
||||
and session_now = 1
|
||||
@@ -22,7 +22,7 @@
|
||||
major_user_id userId,
|
||||
count(*) num
|
||||
FROM
|
||||
emergency_order
|
||||
QH_EME_ORDER
|
||||
WHERE major_user_id is not null
|
||||
and major_user_id != ''
|
||||
and session_now = 1
|
||||
@@ -32,7 +32,7 @@
|
||||
</select>
|
||||
<select id="selectHelpCentor" resultType="com.renkang.emergency.entity.TblHelpCentorVo">
|
||||
SELECT Initiator_type as type, COUNT(*) as count
|
||||
FROM emergency_order
|
||||
FROM QH_EME_ORDER
|
||||
<where>
|
||||
<if test="sex != null and sex != '' and sex != '0'">
|
||||
salvage_user_sex = #{sex}
|
||||
@@ -48,7 +48,7 @@
|
||||
<select id="emergencyNum" resultType="com.renkang.emergency.archives.model.vo.EmergencyNum">
|
||||
SELECT center_id as id,
|
||||
count(*) num
|
||||
FROM emergency_order
|
||||
FROM QH_EME_ORDER
|
||||
<where>
|
||||
and del_flag = 0
|
||||
<if test="centerIds != null and centerIds.size() > 0">
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.renkang.emergency.mapper.ResourceMapper">
|
||||
<select id="selectHospitalList" resultType="String">
|
||||
select id
|
||||
from emergency_resource
|
||||
from QH_EME_RESOURCE
|
||||
where type = 2
|
||||
and status = 1
|
||||
and del_flag = 0
|
||||
@@ -14,7 +14,7 @@
|
||||
select
|
||||
id,
|
||||
name
|
||||
from emergency_resource
|
||||
from QH_EME_RESOURCE
|
||||
where INSTR(',' || #{hospitalIds} || ',', ',' || id || ',') > 0
|
||||
and status = 1 and del_flag = 0
|
||||
</select>
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
SELECT
|
||||
schedule_time
|
||||
FROM
|
||||
emergency_schedule_custom
|
||||
QH_EME_SCHED_CUSTOM
|
||||
<where>
|
||||
<if test="amOrPm != null and amOrPm != ''">
|
||||
and type = #{amOrPm}
|
||||
@@ -28,7 +28,7 @@
|
||||
user_id,
|
||||
user_name,
|
||||
user_sex
|
||||
FROM emergency_schedule_custom
|
||||
FROM QH_EME_SCHED_CUSTOM
|
||||
WHERE user_id = #{userId}
|
||||
AND EXTRACT(YEAR FROM schedule_time) = #{year}
|
||||
AND EXTRACT(MONTH FROM schedule_time) = #{month}
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
SELECT
|
||||
schedule_time
|
||||
FROM
|
||||
emergency_schedule_record
|
||||
QH_EME_SCHED_RECORD
|
||||
<where>
|
||||
<if test="amOrPm != null and amOrPm != ''">
|
||||
and type = #{amOrPm}
|
||||
@@ -25,7 +25,7 @@
|
||||
EXTRACT(MONTH FROM schedule_time) AS month,
|
||||
EXTRACT(DAY FROM schedule_time) AS day
|
||||
FROM
|
||||
emergency_schedule_record
|
||||
QH_EME_SCHED_RECORD
|
||||
<where>
|
||||
<if test="year != null and year != ''">
|
||||
and EXTRACT(YEAR FROM schedule_time) = #{year}
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
<select id="getHospitalList" resultType="com.renkang.emergency.entity.TblBaseHospitalVo">
|
||||
SELECT id,name,latitude lat ,longitude lon,type
|
||||
FROM emergency_resource
|
||||
FROM QH_EME_RESOURCE
|
||||
WHERE 1 = 1 and del_flag = 0
|
||||
<if test="type != null and type.length() > 0">
|
||||
AND type = #{type}
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<select id="getHospitalListNew" resultType="com.renkang.emergency.entity.TblBaseHospitalVo">
|
||||
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
|
||||
<if test="type != null and type != ''">
|
||||
AND type = #{type}
|
||||
|
||||
+5
-5
@@ -5,13 +5,13 @@
|
||||
<select id="statistics" resultType="com.renkang.emergency.entity.TblUserHelpVo">
|
||||
SELECT type, COUNT(id) as count
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
<where>
|
||||
<if test="condition != null and condition != '' and condition == 2">
|
||||
@@ -28,7 +28,7 @@
|
||||
</select>
|
||||
<select id="getTotalAcceptance" resultType="java.lang.Integer">
|
||||
SELECT COUNT(id) AS totalAcceptance
|
||||
FROM tbl_user_help
|
||||
FROM QH_EME_USER_HELP
|
||||
<where>
|
||||
status in('1','2')
|
||||
</where>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<select id="ambulanceStat" resultType="com.renkang.emergency.bean.response.YcAmbulanceStat">
|
||||
SELECT injury_level AS type,
|
||||
count(*) AS count
|
||||
FROM zy_ambulance_data
|
||||
FROM QH_EME_AMBUL_DATA
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="type != null and type == 0">
|
||||
|
||||
Reference in New Issue
Block a user