信创改造

This commit is contained in:
wanghao
2026-03-02 15:13:07 +08:00
parent 98dc17552d
commit 2c0d684079
54 changed files with 355 additions and 350 deletions
@@ -59,7 +59,7 @@ public interface AedEquipmentMangerMapper extends BaseMapper<AedEquipmentManger>
* 按单位统计aed设备数量
* @return 统计数据
*/
@Select(value = "SELECT LEFT(depart_code,6) as orgCode, count(1) as aedCount FROM `aed_equipment_manger` where del_flag = 0 GROUP BY LEFT(depart_code,6)")
@Select(value = "SELECT LEFT(depart_code,6) as orgCode, count(1) as aedCount FROM aed_equipment_manger where del_flag = 0 GROUP BY LEFT(depart_code,6)")
List<JSONObject> statisticAedByOrgCode();
List<AedLocationEquipment> getLocation(@Param("idList") List<Long> idList);
@@ -6,11 +6,11 @@
SELECT t1.user_id as userId,
t3.realname as userName,
t3.type as userType
FROM `emergency_schedules_new_item` t1
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
WHERE t2.center_id = #{centerId}
AND date_format(t2.schedules_time, '%Y-%m-%d') = #{time}
AND TO_CHAR(t2.schedules_time, 'YYYY-MM-DD') = #{time}
ORDER BY
t3.type,
t1.sort
@@ -11,7 +11,7 @@
WHERE operation_user_id is not null
and operation_user_id != ''
and session_now = 1
and DATE_FORMAT(create_time, '%Y-%m-%d') = #{targetDateStr}
and TO_CHAR(create_time, 'YYYY-MM-DD') = #{targetDateStr}
GROUP BY
operation_user_id
</select>
@@ -26,7 +26,7 @@
WHERE major_user_id is not null
and major_user_id != ''
and session_now = 1
and DATE_FORMAT(create_time, '%Y-%m-%d') = #{targetDateStr}
and TO_CHAR(create_time, 'YYYY-MM-DD') = #{targetDateStr}
GROUP BY
major_user_id
</select>
@@ -58,7 +58,7 @@
</foreach>
</if>
<if test="type != null and type != '' and '0'.toString().equals(type)">
AND year(create_time) = year(now())
AND EXTRACT(YEAR FROM create_time) = EXTRACT(YEAR FROM SYSDATE)
</if>
</where>
GROUP BY center_id
@@ -11,7 +11,7 @@
and type = #{amOrPm}
</if>
<if test="date != null and date != ''">
and DATE_FORMAT(schedule_time, '%Y-%m-%d') = #{date}
and TO_CHAR(schedule_time, 'YYYY-MM-DD') = #{date}
</if>
and status = 1
and del_flag = 0
@@ -30,7 +30,7 @@
user_sex
FROM emergency_schedule_custom
WHERE user_id = #{userId}
AND YEAR (schedule_time) = #{year}
AND MONTH (schedule_time) = #{month}
AND EXTRACT(YEAR FROM schedule_time) = #{year}
AND EXTRACT(MONTH FROM schedule_time) = #{month}
</select>
</mapper>
@@ -11,7 +11,7 @@
and type = #{amOrPm}
</if>
<if test="date != null and date != ''">
and DATE_FORMAT(schedule_time, '%Y-%m-%d') = #{date}
and TO_CHAR(schedule_time, 'YYYY-MM-DD') = #{date}
</if>
</where>
GROUP BY
@@ -22,16 +22,16 @@
<select id="scheduleRecord" resultType="com.renkang.emergency.entity.ScheduleRecord">
SELECT
id,schedule_time,type,user_type,user_name,user_id,user_sex,
MONTH(schedule_time) AS month,
DAY(schedule_time) AS day
EXTRACT(MONTH FROM schedule_time) AS month,
EXTRACT(DAY FROM schedule_time) AS day
FROM
emergency_schedule_record
<where>
<if test="year != null and year != ''">
and YEAR (schedule_time) = #{year}
and EXTRACT(YEAR FROM schedule_time) = #{year}
</if>
<if test="month != null and month != ''">
and MONTH(schedule_time) = #{month}
and EXTRACT(MONTH FROM schedule_time) = #{month}
</if>
<if test="userId != null and userId != ''">
and user_id = #{userId}
@@ -3,27 +3,27 @@
<mapper namespace="com.renkang.emergency.mapper.TblBaseHospitalMapper">
<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
WHERE 1 = 1 and del_flag = 0
<if test="type != null and type.length() > 0">
AND `type` = #{type}
AND type = #{type}
</if>
<if test="hospitalName != null and hospitalName.length() > 0">
AND `name` LIKE CONCAT('%', #{hospitalName}, '%')
AND name LIKE CONCAT('%', #{hospitalName}, '%')
</if>
ORDER BY id
</select>
<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
WHERE 1 = 1 and del_flag = 0 and type != 3
<if test="type != null and type != ''">
AND `type` = #{type}
AND type = #{type}
</if>
<if test="hospitalName != null and hospitalName.length() > 0">
AND `name` LIKE CONCAT('%', #{hospitalName}, '%')
AND name LIKE CONCAT('%', #{hospitalName}, '%')
</if>
ORDER BY id
</select>
@@ -15,13 +15,13 @@
) AS sub_query
<where>
<if test="condition != null and condition != '' and condition == 2">
YEAR(help_time) = YEAR(NOW())
EXTRACT(YEAR FROM help_time) = EXTRACT(YEAR FROM SYSDATE)
</if>
<if test="condition != null and condition != '' and condition == 3">
DATE_FORMAT(help_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
TO_CHAR(help_time, 'YYYYMM') = TO_CHAR(SYSDATE, 'YYYYMM')
</if>
<if test="condition != null and condition != '' and condition == 4">
YEARWEEK(date_format(help_time, '%Y-%m-%d')) = YEARWEEK(now())
TO_CHAR(help_time, 'IYYY-IW') = TO_CHAR(SYSDATE, 'IYYY-IW')
</if>
</where>
GROUP BY type
@@ -9,16 +9,16 @@
<where>
del_flag = 0
<if test="type != null and type == 0">
-- 周
AND YEARWEEK(start_time, 1) = YEARWEEK(NOW(), 1)
-- 周(使用 ISO 年-周 比较)
AND TO_CHAR(start_time, 'IYYY-IW') = TO_CHAR(SYSDATE, 'IYYY-IW')
</if>
<if test="type != null and type == 1">
-- 月
AND DATE_FORMAT(start_time,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m')
AND TO_CHAR(start_time,'YYYYMM') = TO_CHAR(SYSDATE,'YYYYMM')
</if>
<if test="type != null and type == 2">
-- 年
AND YEAR(start_time) =YEAR(NOW())
AND EXTRACT(YEAR FROM start_time) = EXTRACT(YEAR FROM SYSDATE)
</if>
</where>
GROUP BY injury_level
@@ -110,13 +110,13 @@ public class TblUserHelpServiceImpl extends ServiceImpl<TblUserHelpMapper, TblUs
// 1:全部,2:年,3:月,4:周
switch (dto.getCondition()) {
case "2":
queryWrapper.apply("DATE_FORMAT(help_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
queryWrapper.apply("EXTRACT(YEAR FROM help_time) = EXTRACT(YEAR FROM SYSDATE)");
break;
case "3":
queryWrapper.apply("DATE_FORMAT(help_time,'%Y-%m') = DATE_FORMAT(NOW(),'%Y-%m')");
queryWrapper.apply("TO_CHAR(help_time,'YYYY-MM') = TO_CHAR(SYSDATE,'YYYY-MM')");
break;
case "4":
queryWrapper.apply("YEARWEEK(date_format(help_time,'%Y-%m-%d'), 1) = YEARWEEK(now(), 1)");
queryWrapper.apply("TO_CHAR(help_time,'IYYY-IW') = TO_CHAR(SYSDATE,'IYYY-IW')");
break;
}
}
@@ -224,13 +224,13 @@ public class TblUserHelpServiceImpl extends ServiceImpl<TblUserHelpMapper, TblUs
// 1:全部,2:年,3:月,4:周
switch (condition) {
case "2":
queryWrapper.apply("DATE_FORMAT(help_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
queryWrapper.apply("EXTRACT(YEAR FROM help_time) = EXTRACT(YEAR FROM SYSDATE)");
break;
case "3":
queryWrapper.apply("DATE_FORMAT(help_time,'%Y-%m') = DATE_FORMAT(NOW(),'%Y-%m')");
queryWrapper.apply("TO_CHAR(help_time,'YYYY-MM') = TO_CHAR(SYSDATE,'YYYY-MM')");
break;
case "4":
queryWrapper.apply("YEARWEEK(date_format(help_time,'%Y-%m-%d')) = YEARWEEK(now())");
queryWrapper.apply("TO_CHAR(help_time,'IYYY-IW') = TO_CHAR(SYSDATE,'IYYY-IW')");
break;
}
}