Compare commits

2 Commits
Author SHA1 Message Date
lianlonggang 0b403a559e refactor(consultation): 优化代码格式和空行规范
- 统一各实体类、Mapper 和 XML 文件的代码格式
- 规范化导入语句和类声明之间的空行
- 调整 ConSessionView、ConCostStatistics 等实体类格式
- 优化 Mapper 接口和 XML 映射文件的空行结构
- 提升代码可读性和一致性
- 去掉view及_qh表依赖
2026-03-09 10:55:55 +08:00
lianlonggang 8fd4cd9253 fix(consultation): 修复达梦数据库关键字冲突问题
- 将 SQL 中的 `type` 字段使用双引号转义为 `\"TYPE\"`
- 解决达梦数据库保留关键字导致的查询异常
- 影响模块:
  - ConDoctorSchedulingMapper.xml
  - ConDepartmentMapper.xml
2026-03-09 10:53:35 +08:00
12 changed files with 22 additions and 32 deletions
@@ -20,7 +20,7 @@ import java.util.Date;
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "con_session_view")
@TableName(value = "con_session")
public class ConSessionView implements Serializable {
private static final long serialVersionUID = 1L;
@TableField(value = "id")
@@ -38,7 +38,7 @@ public interface ConDoctorSchedulingMapper extends BaseMapper<ConDoctorSchedulin
@Update("update con_doctor_scheduling set del_flag = 1 WHERE status = '1' and del_flag = '0' and user_id = #{userId}")
public int deleteDoctorSchedule(String userId);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= DATE(NOW()) and week = #{week}")
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= TRUNC(SYSDATE) and week = #{week}")
public List<ConDoctorSchedulingDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week);
Boolean updateBatchById(@Param("list") List<ConDoctorScheduling> schedulingList);
@@ -30,6 +30,4 @@ public interface ConHelperSchedulingMapper extends BaseMapper<ConHelperSchedulin
@Select("SELECT * FROM con_helper_scheduling WHERE week = #{week} and del_flag = '0' and status = '1'")
public List<ConHelperScheduling> getYesterDayScheduling(Integer week);
@Select("SELECT * FROM con_helper_scheduling_qh WHERE week = #{week} and del_flag = '0' and status = '1'")
public List<ConHelperScheduling> getYesterDaySchedulingQh(Integer week);
}
@@ -36,6 +36,6 @@ public interface ConMedicalRecordsMapper extends BaseMapper<ConMedicalRecords> {
ConMedicalRecords selectByMemberIdAndUserId(String memberId, String userId);
@Select("SELECT * FROM con_medical_records_view WHERE status = '1' and del_flag = '0' and id = #{id}")
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and id = #{id}")
public ConMedicalRecordsDO selectConMedicalRecordsViewInfoById(String id);
}
@@ -240,21 +240,13 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
@Param("fromAccount")String fromAccount);
@Select("select * from con_session_view where im_id = #{imId} and del_flag = 0 and status = 1")
@Select("select * from con_session where im_id = #{imId} and del_flag = 0 and status = 1")
ConSession selectConSessionByImIdOnlyBackUp(String imId);
@Update("update con_session_qh set reply_time = SYSDATE where im_id = #{imId}")
int updateSessionReplyTimeBackUp(String imId);
@Update("update con_session_qh set tf_reply = 1 where id = #{id}")
int updateConSessionTfReplyBackUp(String id);
@Select("select * from con_session_view where id = #{id} and del_flag = 0 and status = 1")
@Select("select * from con_session where id = #{id} and del_flag = 0 and status = 1")
ConSession selectConSessionByIdView(String id);
@Select("select * from con_session_view where im_id = #{id} and del_flag = 0 and status = 1")
@Select("select * from con_session where im_id = #{id} and del_flag = 0 and status = 1")
ConSession selectConSessionByIdViewAndImId(String imId);
@Update("update con_session set user_tf_reply = 1 where id = #{id}")
@@ -162,7 +162,7 @@
<select id="groupByTypehListNew" resultType="String">
select
count(1)
from con_session_view
from con_session
where
session_type = 1 and to_account = #{userId} and content_type = #{type}
<if test="state != null and state != '' and state == '1'.toString()">
@@ -137,12 +137,11 @@
<select id="selectHospitalDepartmentId" resultType="com.renkang.consultation.entity.ConDepartmentDO">
select
distinct a.department_id as "id",
a.department_id as "id",
b.department_name as "departmentName"
from hospital_department a left join con_department b on a.department_id = b.id
where a.hospital_id = #{hospitalId} and b.office_level = 1
GROUP BY a.department_id,b.department_name
order by b.tf_top desc,b.sort
</select>
<select id="getMedicalDepartmentList" resultType="com.renkang.consultation.vo.MedicalDepartmentVO">
@@ -6,7 +6,7 @@
UPDATE con_doctor_scheduling
SET
week = #{item.week},
`type` = #{item.type},
"TYPE" = #{item.type},
am_num = #{item.amNum},
pm_num = #{item.pmNum},
tf_jump_holiday = #{item.tfJumpHoliday},
@@ -31,8 +31,8 @@
</select>
<select id="selectBatchIds" resultType="com.renkang.consultation.entity.ConResource">
SELECT id, resource_name, longitude, latitude, type, second_type, aidrange, gd_id, url, province, city, area,
address, level, img, synopsis, sort, status, del_flag, create_by, create_time, update_by, update_time, memo,
SELECT id, resource_name, longitude, latitude, "TYPE", second_type, aidrange, gd_id, url, province, city, area,
address, "LEVEL", img, synopsis, sort, "STATUS", del_flag, create_by, create_time, update_by, update_time, memo,
key_departments, user_score, user_score_num, resource_detail, tf_top
FROM con_resource
WHERE id IN
@@ -715,7 +715,7 @@
<select id="selectSessionProfessorIngNewNew" resultType="String">
select
count(1)
from con_session_view
from con_session
where status = '1' and del_flag = 0
and session_type = 1
and to_account = #{toAccount}
@@ -750,7 +750,7 @@
<select id="selectSessionProfessorIngNewNewNew" resultType="String">
select
count(1)
from con_session_view
from con_session
where status = '1' and del_flag = 0
and session_type = 1
and to_account = #{toAccount}
@@ -795,7 +795,7 @@
create_time as "createTime",
im_id as "imId",
tf_reply as "tfReply"
from con_session_view
from con_session
where status = '1' and del_flag = 0 and session_type = 1 and (to_account = #{doctorId} or third_account =
#{doctorId})
<if test="contentType != null and contentType != ''">
@@ -842,7 +842,7 @@
create_time as "createTime",
im_id as "imId",
tf_reply as "tfReply"
from con_session_view
from con_session
where status = '1'
and content_type = '1'
and del_flag = 0
@@ -878,7 +878,7 @@
create_time as "createTime",
im_id as "imId",
tf_reply as "tfReply"
from con_session_view
from con_session
where status = '1'
and content_type = '1'
and del_flag = 0
@@ -909,7 +909,7 @@
create_time as "createTime",
im_id as "imId",
tf_reply as "tfReply"
from con_session_view
from con_session
where status = '1' and user_tf_reply = 1 and del_flag = 0 and session_type = 1 and (to_account = #{doctorId} or third_account =
#{doctorId})
<if test="contentType != null and contentType != ''">
@@ -945,7 +945,7 @@
<select id="selectSessionProfessorIngNewNewAnother" resultType="String">
select
count(1)
from con_session_view
from con_session
where status = '1' and del_flag = 0
and session_type = 1
and user_tf_reply = 1
@@ -981,7 +981,7 @@
<select id="selectSessionProfessorIngNewNewNewAnother" resultType="String">
select
count(1)
from con_session_view
from con_session
where status = '1' and del_flag = 0
and session_type = 1
and to_account = #{toAccount}
@@ -55,7 +55,7 @@
<!--@mbg.generated-->
id, member_id, from_account, to_account, end_time, content_type, reservation_time,
session_type, from_name, member_name, to_name, im_id, session_time, third_account,
third_name, cost, char_date, medical_records_id, `status`, del_flag, create_by, create_time,
third_name, cost, char_date, medical_records_id, "STATUS", del_flag, create_by, create_time,
update_by, update_time, memo, content_status, session_date, week, am_pm, scheduling_date_id,
job_status, member_sex, member_age, session_status, doctor_start_time, doctor_end_time,
reject_reason, reason_type, org_code, from_type, tf_reply, reply_time, user_tf_reply,
@@ -2,9 +2,10 @@ package com.renkang;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"})
@SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"},exclude = QuartzAutoConfiguration .class)
@EnableFeignClients(basePackages = {"com.renkang", "org.jeecg"})
public class HealthConsultationCloudApplication {