咨询模块调整

This commit is contained in:
2026-03-13 17:17:35 +08:00
parent ff63db7081
commit b5c87ed3ff
114 changed files with 387 additions and 384 deletions
+3 -1
View File
@@ -61,4 +61,6 @@ ALTER TABLE HOSPITAL_DEPARTMENT RENAME TO QH_CON_HOSP_DEPT;
ALTER TABLE IM_GROUP_SYNC_RECORD RENAME TO QH_CON_IM_GRP_SYNC;
ALTER TABLE IM_MSG_READ_LOG RENAME TO QH_CON_IM_MSG_RDLOG;
ALTER TABLE IM_MSG_RECORD_ALL RENAME TO QH_CON_IM_MSG_ALL;
ALTER TABLE SYS_LOG RENAME TO QH_SYS_LOG;
-- 修改表字段触发关键字了
ALTER TABLE QH_CON_EVALUATE RENAME COLUMN CONTEXT TO EVA_CONTEXT;
@@ -15,7 +15,7 @@ import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("con_cost_log")
@TableName("qh_con_cost_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_cost_log对象", description = "con_cost_log")
@@ -21,7 +21,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_cost_statistics")
@TableName("qh_con_cost_stat")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_cost_statistics对象", description = "con_cost_statistics")
@@ -27,7 +27,7 @@ import java.util.List;
* @Version: V1.0
*/
@Data
@TableName("con_department")
@TableName("qh_con_dept")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_department对象", description = "con_department")
@@ -28,7 +28,7 @@ import java.util.Map;
* @Version: V1.0
*/
@Data
@TableName("con_doctor")
@TableName("qh_con_doctor")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor对象", description = "con_doctor")
@@ -18,7 +18,7 @@ import java.io.Serializable;
* @Version: V1.0
*/
@Data
@TableName("con_doctor_card")
@TableName("qh_con_doc_card")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_card对象", description = "con_doctor_card")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_doctor_change_log")
@TableName("qh_con_doc_chg_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title="con_doctor_change_log对象", description="专家信息修改日志")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_doctor_follow")
@TableName("qh_con_doc_follow")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_follow对象", description = "医生关注")
@@ -7,7 +7,7 @@ import lombok.Data;
import java.io.Serializable;
@Data
@TableName("con_doctor_satisfy")
@TableName("qh_con_doc_satisfy")
public class ConDoctorSatisfy implements Serializable {
private static final long serialVersionUID = 1L;
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_doctor_scheduling")
@TableName("qh_con_doc_schd")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_scheduling对象", description = "专家排班")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_doctor_scheduling_date")
@TableName("qh_con_doc_schd_dt")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_scheduling_date对象", description = "排班时间")
@@ -22,7 +22,7 @@ import java.util.List;
* @Version: V1.0
*/
@Data
@TableName("con_evaluate")
@TableName("qh_con_evaluate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_evaluate对象", description = "医生评分")
@@ -68,6 +68,7 @@ public class ConEvaluate implements Serializable {
*/
@Excel(name = "评价", width = 15)
@Schema(title = "评价")
@TableField("EVA_CONTEXT")
private String context;
/**
* 会话id
@@ -20,7 +20,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_family_members")
@TableName("qh_con_fammem")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_family_members对象", description = "家庭成员")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_health_info")
@TableName("qh_con_health")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_health_info对象", description = "健康信息")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_health_info_answer")
@TableName("qh_con_health_ans")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_health_info_answer对象", description = "健康信息答案")
@@ -20,7 +20,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_helper")
@TableName("qh_con_helper")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper对象", description = "con_helper")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_helper_online")
@TableName("qh_con_helper_onln")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper_online对象", description = "con_helper_online")
@@ -23,7 +23,7 @@ import lombok.experimental.Accessors;
* @Version: V1.0
*/
@Data
@TableName("con_helper_rest")
@TableName("qh_con_helper_rest")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title="con_helper_rest对象", description="全科医生休息")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_helper_scheduling")
@TableName("qh_con_helper_schd")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper_scheduling对象", description = "con_helper_scheduling")
@@ -22,7 +22,7 @@ import java.io.Serializable;
* @Version: V1.0
*/
@Data
@TableName("con_helper_scheduling_history")
@TableName("qh_con_helper_schd_his")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper_scheduling_history对象", description = "con_helper_scheduling_history")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_hospital_follow")
@TableName("qh_con_hosp_follow")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_hospital_follow对象", description = "医院关注")
@@ -21,7 +21,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_knowledge")
@TableName("qh_con_know")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_knowledge对象", description = "知识库")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_knowledge_category")
@TableName("qh_con_know_cate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_knowledge_category对象", description = "知识库分类")
@@ -22,7 +22,7 @@ import java.util.Map;
* @Version: V1.0
*/
@Data
@TableName("con_medical_records")
@TableName("qh_con_medrec")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_medical_records对象", description = "疾病档案")
@@ -24,7 +24,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_notice")
@TableName("qh_con_notice")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_notice对象", description = "咨询须知")
@@ -13,7 +13,7 @@ import java.io.Serializable;
import java.util.Date;
@Data
@TableName("con_phrases")
@TableName("qh_con_phrases")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_phrases对象", description = "常用语")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_propose")
@TableName("qh_con_propose")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_propose对象", description = "con_propose")
@@ -26,7 +26,7 @@ import java.util.List;
* @Version: V1.0
*/
@Data
@TableName("con_resource")
@TableName("qh_con_resource")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_resource对象", description = "con_resource")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_service")
@TableName("qh_con_srvc")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_service对象", description = "con_service")
@@ -22,7 +22,7 @@ import java.util.List;
* @Version: V1.0
*/
@Data
@TableName("con_session")
@TableName("qh_con_session")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_session对象", description = "con_session")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_session_reservation_date")
@TableName("qh_con_sess_resv_dt")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_session_reservation_date对象", description = "咨询预约时间")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_session_video_info")
@TableName("qh_con_sess_vid")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_session_video_info对象", description = "con_session_video_info")
@@ -20,7 +20,7 @@ import java.util.Date;
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "con_session")
@TableName(value = "qh_con_session")
public class ConSessionView implements Serializable {
private static final long serialVersionUID = 1L;
@TableField(value = "id")
@@ -25,7 +25,7 @@ import java.util.Date;
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "con_settle_config_cost")
@TableName(value = "qh_con_stl_cfg_cost")
public class ConSettleConfigCost implements Serializable {
public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id";
@@ -24,7 +24,7 @@ import java.util.Date;
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "con_settle_config_period")
@TableName(value = "qh_con_stl_cfg_prd")
public class ConSettleConfigPeriod implements Serializable {
public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id";
@@ -22,7 +22,7 @@ import java.util.Date;
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "con_settle_main")
@TableName(value = "qh_con_stl_main")
public class ConSettleMain implements Serializable {
public static final String COL_ID = "id";
public static final String COL_SETTLE_NAME = "settle_name";
@@ -29,7 +29,7 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@ColumnWidth(25)
@TableName(value = "con_settle_result")
@TableName(value = "qh_con_stl_rslt")
public class ConSettleResult implements Serializable {
public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id";
@@ -29,7 +29,7 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@ColumnWidth(25)
@TableName(value = "con_settle_result_item")
@TableName(value = "qh_con_stl_rslt_itm")
public class ConSettleResultItem implements Serializable {
public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id";
@@ -29,7 +29,7 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@ColumnWidth(25)
@TableName(value = "con_settle_result_period")
@TableName(value = "qh_con_stl_rslt_prd")
public class ConSettleResultPeriod implements Serializable {
public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id";
@@ -27,7 +27,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("con_sicks")
@TableName("qh_con_sicks")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_sicks对象", description = "con_sicks")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("hospital_department")
@TableName("qh_con_hosp_dept")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "hospital_department对象", description = "医院部门")
@@ -19,7 +19,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("im_msg_read_log")
@TableName("qh_con_im_msg_rdlog")
@EqualsAndHashCode(callSuper = false)
@Schema(title = "Im消息已读日志", description = "Im消息已读日志")
public class ImMsgReadLog implements Serializable {
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("im_msg_record_all")
@TableName("qh_con_im_msg_all")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "im_msg_record_all对象", description = "im_msg_record_all")
@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.util.Date;
@Data
@TableName("im_msg_record_all")
@TableName("qh_con_im_msg_all")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "im_msg_record_all对象", description = "im_msg_record_all")
@@ -12,7 +12,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@Data
@TableName("con_helper")
@TableName("qh_con_helper")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper对象", description = "con_helper")
@@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data
@TableName("con_resource")
@TableName("qh_con_resource")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "医院列表", description = "医院列表")
@@ -171,7 +171,7 @@ public class ConCostStatisticsController extends JeecgController<ConCostStatisti
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConCostStatistics conCostStatistics) {
return super.exportXls(request, conCostStatistics, ConCostStatistics.class, "con_cost_statistics");
return super.exportXls(request, conCostStatistics, ConCostStatistics.class, "qh_con_cost_stat");
}
/**
@@ -199,7 +199,7 @@ public class ConDepartmentController extends JeecgController<ConDepartment, ICon
@RequiresPermissions("consultation:con_department:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConDepartment conDepartment) {
return super.exportXls(request, conDepartment, ConDepartment.class, "con_department");
return super.exportXls(request, conDepartment, ConDepartment.class, "qh_con_dept");
}
/**
@@ -175,7 +175,7 @@ public class ConDoctorCardController extends JeecgController<ConDoctorCard, ICon
@RequestMapping(value = "/exportXls")
@Operation(summary = "导出", description = "导出")
public ModelAndView exportXls(HttpServletRequest request, ConDoctorCard conDoctorCard) {
return super.exportXls(request, conDoctorCard, ConDoctorCard.class, "con_doctor_card");
return super.exportXls(request, conDoctorCard, ConDoctorCard.class, "qh_con_doc_card");
}
/**
@@ -163,7 +163,7 @@ public class ConHelperController extends JeecgController<ConHelper, IConHelperSe
@Operation(summary = "导出")
@AutoLog(value = "导出全科医生信息")
public ModelAndView exportXls(HttpServletRequest request, ConHelper conHelper) {
return super.exportXls(request, conHelper, ConHelper.class, "con_helper");
return super.exportXls(request, conHelper, ConHelper.class, "qh_con_helper");
}
/**
@@ -143,7 +143,7 @@ public class ConHelperOnlineController extends JeecgController<ConHelperOnline,
@RequiresPermissions("com.renkang.consultation:con_helper_online:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConHelperOnline conHelperOnline) {
return super.exportXls(request, conHelperOnline, ConHelperOnline.class, "con_helper_online");
return super.exportXls(request, conHelperOnline, ConHelperOnline.class, "qh_con_helper_onln");
}
/**
@@ -149,7 +149,7 @@ public class ConHelperSchedulingController extends JeecgController<ConHelperSche
@RequiresPermissions("consultation:con_helper_scheduling:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConHelperScheduling conHelperScheduling) {
return super.exportXls(request, conHelperScheduling, ConHelperScheduling.class, "con_helper_scheduling");
return super.exportXls(request, conHelperScheduling, ConHelperScheduling.class, "qh_con_helper_schd");
}
/**
@@ -133,7 +133,7 @@ public class ConHelperSchedulingHistoryController extends JeecgController<ConHel
@RequiresPermissions("consultation:con_helper_scheduling:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConHelperSchedulingHistory conHelperSchedulingHistory) {
return super.exportXls(request, conHelperSchedulingHistory, ConHelperSchedulingHistory.class, "con_helper_scheduling_history");
return super.exportXls(request, conHelperSchedulingHistory, ConHelperSchedulingHistory.class, "qh_con_helper_schd_his");
}
/**
@@ -142,7 +142,7 @@ public class ConProposeController extends JeecgController<ConPropose, IConPropos
@RequiresPermissions("com.renkang.consultation:con_propose:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConPropose conPropose) {
return super.exportXls(request, conPropose, ConPropose.class, "con_propose");
return super.exportXls(request, conPropose, ConPropose.class, "qh_con_propose");
}
/**
@@ -164,7 +164,7 @@ public class ConResourceController extends JeecgController<ConResource, IConReso
@Operation(summary = "导出医院信息")
@AutoLog(value = "导出医院信息")
public ModelAndView exportXls(HttpServletRequest request, ConResource conResource) {
return super.exportXls(request, conResource, ConResource.class, "con_resource");
return super.exportXls(request, conResource, ConResource.class, "qh_con_resource");
}
/*
@@ -238,7 +238,7 @@ public class ConServiceController extends JeecgController<ConService, IConServic
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConService conService) {
return super.exportXls(request, conService, ConService.class, "con_service");
return super.exportXls(request, conService, ConService.class, "qh_con_srvc");
}
/**
@@ -143,7 +143,7 @@ public class ConSessionVideoInfoController extends JeecgController<ConSessionVid
@RequiresPermissions("com.renkang:con_session_video_info:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConSessionVideoInfo conSessionVideoInfo) {
return super.exportXls(request, conSessionVideoInfo, ConSessionVideoInfo.class, "con_session_video_info");
return super.exportXls(request, conSessionVideoInfo, ConSessionVideoInfo.class, "qh_con_sess_vid");
}
/**
@@ -160,7 +160,7 @@ public class ConSicksController extends JeecgController<ConSicks, IConSicksServi
@Operation(summary = "导出")
@AutoLog(value = "导出疾病信息")
public ModelAndView exportXls(HttpServletRequest request, ConSicks conSicks) {
return super.exportXls(request, conSicks, ConSicks.class, "con_sicks");
return super.exportXls(request, conSicks, ConSicks.class, "qh_con_sicks");
}
/**
@@ -37,7 +37,7 @@ public class ConsultationDataServiceImpl implements ConsultationDataService {
@Override
public TableInfo tableStructure() {
return new TableInfo(new TableCreateInfo(TableInfoEnum.DEFAULT),
analyzeTableManager.columnInfo(Arrays.asList("con_session","con_doctor"), ConsultationDataPageVO.class));
analyzeTableManager.columnInfo(Arrays.asList("qh_con_session","qh_con_doctor"), ConsultationDataPageVO.class));
}
@Override
@@ -87,7 +87,7 @@ public class SpecialistDataServiceImpl implements SpecialistDataService {
@Override
public TableInfo tableStructure() {
return new TableInfo(new TableCreateInfo(TableInfoEnum.DEFAULT),
analyzeTableManager.columnInfo(Collections.singletonList("con_doctor"), SpecialistDataPageVO.class));
analyzeTableManager.columnInfo(Collections.singletonList("qh_con_doctor"), SpecialistDataPageVO.class));
}
@Override
@@ -87,7 +87,7 @@ public class SpecialistHospitalServiceImpl implements SpecialistHospitalService
@Override
public TableInfo tableStructure() {
List<String> tableNames = Collections.singletonList("con_resource");
List<String> tableNames = Collections.singletonList("qh_con_resource");
Map<String, ColumnMetaData> columnInfo = analyzeTableManager.columnInfo(tableNames, HospitalData.class);
TableCreateInfo createInfo = getTableCreateInfo();
@@ -16,7 +16,7 @@ import org.jeecg.common.system.vo.SelectTreeModel;
import java.util.List;
/**
* @Description: con_department
* @Description: qh_con_dept
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Version: V1.0
@@ -24,34 +24,34 @@ import java.util.List;
@Mapper
public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBaseMapper<ConDepartment> {
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and id = #{departmentId} order by tf_top desc,sort")
@Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and id = #{departmentId} order by tf_top desc,sort")
public ConDepartment selectDepartmentNameById(String departmentId);
@Select("SELECT LISTAGG(id, ',') WITHIN GROUP (ORDER BY id) FROM con_department WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId}")
@Select("SELECT LISTAGG(id, ',') WITHIN GROUP (ORDER BY id) FROM qh_con_dept WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId}")
public String selectDepartmentIdByLevelOneId(String departmentId);
@Select("SELECT count(1) FROM con_department WHERE status = '1' and del_flag = '0' and office_level = 1")
@Select("SELECT count(1) FROM qh_con_dept WHERE status = '1' and del_flag = '0' and office_level = 1")
public String selectDepartmentNum();
public List<ConDepartmentDO> selectDepartmentNameByParentId(@Param("officeparid") String officeparid, @Param("name") String name);
@Select("select * from con_department where status = 1 and del_flag = 0")
@Select("select * from qh_con_dept where status = 1 and del_flag = 0")
List<ConDepartment> selectList();
List<ConDepartment> selectListAll(ConDepartment conDepartment);
@Select("select * from con_department where status = 1 and del_flag = 0 and office_level = 1 limit 30")
@Select("select * from qh_con_dept where status = 1 and del_flag = 0 and office_level = 1 limit 30")
List<ConDepartment> selectListLeval();
@Select("select count(1) from con_department where status = 1 and del_flag = 0 and officeparid = #{id}")
@Select("select count(1) from qh_con_dept where status = 1 and del_flag = 0 and officeparid = #{id}")
int selectSecondDepartMentNum(String id);
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}")
@Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}")
List<ConDepartment> selectListByName(String departmentName);
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and office_level = 1 order by tf_top desc,sort")
@Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and office_level = 1 order by tf_top desc,sort")
List<ConDepartment> selectDepartmentNameByParentIdisNull();
/**
@@ -79,7 +79,7 @@ public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBase
Boolean updateTop(@Param("id") String id, @Param("type") Boolean type);
@Select("select * from con_department where del_flag = 0 and status = 1 and office_level = 1 order by tf_top desc,sort")
@Select("select * from qh_con_dept where del_flag = 0 and status = 1 and office_level = 1 order by tf_top desc,sort")
List<ConDepartmentVO> selectDepartmentListLevelOne();
List<ConDoctor> getOneTwoDepartDoctorList();
@@ -93,14 +93,14 @@ public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBase
List<ConDepartmentDO> selectHospitalDepartmentId(String hospitalId);
@Select("SELECT id, department_name as departmentName FROM con_department WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId} order by tf_top desc,sort")
@Select("SELECT id, department_name as departmentName FROM qh_con_dept WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId} order by tf_top desc,sort")
public List<ConDepartmentDO> selectDepartmentIdByLevelOneIdList(String departmentId);
@Select("select * from con_department WHERE status = '1' and del_flag = '0' and office_level = 1")
@Select("select * from qh_con_dept WHERE status = '1' and del_flag = '0' and office_level = 1")
List<ConDepartment> selectDepartmentListAll();
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}")
@Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}")
public ConDepartment selectDepartmentNameByName(String departmentName);
List<MedicalDepartmentVO> getMedicalDepartmentList(@Param("deptIds") List<String> deptIds);
@@ -17,11 +17,11 @@ import java.util.List;
public interface ConDoctorFollowMapper extends BaseMapper<ConDoctorFollow> {
@Select("SELECT count(1) FROM con_doctor_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and doctor_id = #{doctorId}")
@Select("SELECT count(1) FROM qh_con_doc_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and doctor_id = #{doctorId}")
public int selectFollowDoctorExist(String userId, String doctorId);
@Update("update con_doctor_follow set del_flag = '1' where user_id = #{userId} and doctor_id = #{doctorId}")
@Update("update qh_con_doc_follow set del_flag = '1' where user_id = #{userId} and doctor_id = #{doctorId}")
public int cancelDoctorFollow(String userId, String doctorId);
@@ -15,7 +15,7 @@ import java.util.Map;
import java.util.Set;
/**
* @Description: con_doctor
* @Description: qh_con_doctor
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Version: V1.0
@@ -69,24 +69,24 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
*/
IPage<ConDoctor> queryPageList(IPage<ConDoctor> page, ConDoctor conDoctor);
@Select("SELECT * FROM con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
@Select("SELECT * FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public ConDoctorDO selectDoctorInfoById(String doctorId);
public List<ConDoctorDO> selectDoctorInfoByIds(@Param("doctorIds") Set<String> doctorIds);
@Select("SELECT * FROM con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId} and is_accept = '1'")
@Select("SELECT * FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId} and is_accept = '1'")
public ConDoctorDO selectDoctorInfoByIdNew(String doctorId);
@Select("SELECT * FROM con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
@Select("SELECT * FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public ConDoctor selectDoctorDetailById(String doctorId);
@Update("update con_doctor set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
@Update("update qh_con_doctor set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public int updateDoctorScoreAnfNum(String userScore, String doctorId);
@Update("update con_doctor set show_score = show_score + #{showScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
@Update("update qh_con_doctor set show_score = show_score + #{showScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public int updateDoctorShowScoreAnfNum(String showScore, String doctorId);
public List<ConDoctor> selectDoctorListByHospitalId(IPage<ConDoctor> page, @Param("hospitalId") String hospitalId);
@@ -94,7 +94,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
public List<String> selectRecommendDoctor(@Param("limit") int limit);
@Select("select count(1) from con_doctor where status = 1 and del_flag = 0 and doctor_status != 3 and department_id = #{departmentId}")
@Select("select count(1) from qh_con_doctor where status = 1 and del_flag = 0 and doctor_status != 3 and department_id = #{departmentId}")
public int selectDoctorByDepartmentId(String departmentId);
@@ -106,7 +106,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
String selectDictNuMBySickIds(@Param("goodAtSickness") List<String> goodAtSickness);
@Select("SELECT count(1) FROM con_doctor WHERE status = '1' and del_flag = '0' and resource_id = #{resourceId}")
@Select("SELECT count(1) FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and resource_id = #{resourceId}")
public int selectDoctorNum(String resourceId);
/**
@@ -117,46 +117,46 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
*/
List<ConDoctor> getFreeDoctor(CondepartmentId departmentId);
@Select("select id,sicks_name as sicksName from con_sicks where status = 1 and del_flag = 0 and INSTR(',' || #{sickIds} || ',', ',' || id || ',') > 0")
@Select("select id,sicks_name as sicksName from qh_con_sicks where status = 1 and del_flag = 0 and INSTR(',' || #{sickIds} || ',', ',' || id || ',') > 0")
List<Map<String, String>> selectSickName(String sickIds);
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0'")
@Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0'")
List<ConDoctor> selectListAll();
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0' and doctor_status != 3")
@Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' and doctor_status != 3")
List<ConDoctor> selectListNew();
@Update("update con_doctor set message_num = message_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}")
@Update("update qh_con_doctor set message_num = message_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}")
int addDoctorMessageNum(String id);
@Update("update con_doctor set reply_num = reply_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}")
@Update("update qh_con_doctor set reply_num = reply_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}")
int addDoctorReplyNum(String id);
@Update("update con_doctor set audio_status = #{audioStatus},tf_jump_holiday= #{tfJumpHoliday} WHERE status = '1' and del_flag = '0' and id = #{id}")
@Update("update qh_con_doctor set audio_status = #{audioStatus},tf_jump_holiday= #{tfJumpHoliday} WHERE status = '1' and del_flag = '0' and id = #{id}")
int updateAudioStatus(String id, String audioStatus, String tfJumpHoliday);
@Select("select count(1) from con_doctor where del_flag = '0' AND status = 1 and doctor_status != 3 AND INSTR(',' || #{sickId} || ',', ',' || good_at_sickness || ',') > 0")
@Select("select count(1) from qh_con_doctor where del_flag = '0' AND status = 1 and doctor_status != 3 AND INSTR(',' || #{sickId} || ',', ',' || good_at_sickness || ',') > 0")
int selectDoctorNumBySickId(String sickId);
@Select("select count(1) from con_doctor where del_flag = '0' AND status = 1 AND doctor_status != 3 AND INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
@Select("select count(1) from qh_con_doctor where del_flag = '0' AND status = 1 AND doctor_status != 3 AND INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
int selectDoctorNumByDepartmentId(String departmentId);
List<ConDoctor> selectListByQuery(@Param("conDoctor") ConDoctor conDoctor);
@Select("SELECT id FROM con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{hospitalName}, '%')")
@Select("SELECT id FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{hospitalName}, '%')")
List<ConDoctor> selectDoctorInfoByHospitalName(String hospitalName);
@Update("update con_doctor set doctor_status = 3 where id = #{id}")
@Update("update qh_con_doctor set doctor_status = 3 where id = #{id}")
int changeDoctorStatus(String id);
List<ConDoctor> selectByHospitalIds(@Param("hospitalIds") List<String> hospitalIds);
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{resourceName}, '%')")
@Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{resourceName}, '%')")
List<ConDoctor> selectByResourceName(@Param("resourceName") String resourceName);
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0' AND doctor_name LIKE CONCAT('%', #{doctorName}, '%')")
@Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' AND doctor_name LIKE CONCAT('%', #{doctorName}, '%')")
List<ConDoctor> selectByDoctorName(@Param("doctorName") String doctorName);
List<ConDoctor> selectDoctorByIds(@Param("doctorIds") List<String> doctorIds);
@@ -165,20 +165,20 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
List<ConDoctor> selectDoctorByResourceId(@Param("resourceId") String resourceId);
@Update("update con_doctor set is_accept = '1',doctor_status = '1',audio_status = 1,tf_jump_holiday = 0 where id = #{id}")
@Update("update qh_con_doctor set is_accept = '1',doctor_status = '1',audio_status = 1,tf_jump_holiday = 0 where id = #{id}")
int updateDoctorStatusDouble(String id);
@Select("select count(1) from con_doctor where del_flag = '0' AND status = 1 AND INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0 and resource_id = #{resourceId} and doctor_status != 3")
@Select("select count(1) from qh_con_doctor where del_flag = '0' AND status = 1 AND INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0 and resource_id = #{resourceId} and doctor_status != 3")
int selectDoctorNumByDepartmentIdAndResourceId(String departmentId,String resourceId);
@Select("select count(1) from con_doctor where status = 1 and del_flag = 0 and department_id = #{departmentId} and resource_id = #{resourceId} and doctor_status != 3")
@Select("select count(1) from qh_con_doctor where status = 1 and del_flag = 0 and department_id = #{departmentId} and resource_id = #{resourceId} and doctor_status != 3")
public int selectDoctorByDepartmentIdAndResourceId(String departmentId,String resourceId);
@Select("select a.* from con_doctor a left join con_department b on a.department_id = b.id where b.office_level = 1")
@Select("select a.* from qh_con_doctor a left join qh_con_dept b on a.department_id = b.id where b.office_level = 1")
List<ConDoctor> selectDoctorByResourceIdAll();
@@ -195,21 +195,21 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
Boolean insertConDoctorSatisfyQhByDoctorNew(ConDoctorSatisfy conDoctorSatisfy);
@Update("update con_doctor_satisfy set reply_num = reply_num + 1 WHERE id = #{id}")
@Update("update qh_con_doctor_satisfy set reply_num = reply_num + 1 WHERE id = #{id}")
int addDoctorReplyNumBackUp(String id);
@Update("update ${tableName} set reply_num = reply_num + 1 WHERE id = #{id}")
int addDoctorReplyNumNotQh(String id,String tableName);
@Update("update con_doctor_satisfy set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE id = #{doctorId}")
@Update("update qh_con_doctor_satisfy set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE id = #{doctorId}")
public int updateDoctorScoreAnfNumQh(String userScore, String doctorId);
@Update("update con_doctor_satisfy set show_score = show_score + #{showScore} WHERE id = #{doctorId}")
@Update("update qh_con_doctor_satisfy set show_score = show_score + #{showScore} WHERE id = #{doctorId}")
public int updateDoctorShowScoreAnfNumQh(String showScore, String doctorId);
@Update("update con_doctor_satisfy set message_num = message_num + 1 WHERE id = #{id}")
@Update("update qh_con_doctor_satisfy set message_num = message_num + 1 WHERE id = #{id}")
int addDoctorMessageNumQh(String id);
List<ConDoctor> selectRecommendDoctorNewAnother(IPage<ConDoctor> page);
@@ -225,8 +225,8 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
" conr.resource_name hospitalName,\n" +
" count(doct.resource_id) docCount \n" +
" FROM\n" +
" con_resource conr\n" +
" LEFT JOIN con_doctor doct ON conr.id = doct.resource_id \n" +
" qh_con_resource conr\n" +
" LEFT JOIN qh_con_doctor doct ON conr.id = doct.resource_id \n" +
" WHERE conr.del_flag = 0 and doct.del_flag = 0 and doct.doctor_status = '1' \n" +
" GROUP BY conr.id) a\n" +
"ORDER BY\n" +
@@ -242,7 +242,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
" SUM(CASE WHEN c.session_type = '2' THEN 1 ELSE 0 END) AS consultHelperCount,\n" +
" SUM(CASE WHEN c.session_type = '1' THEN 1 ELSE 0 END) AS consultDocCount\n" +
" FROM\n" +
" con_session c \n" +
" qh_con_session c \n" +
" WHERE\n" +
" c.del_flag = 0 \n" +
" AND c.STATUS = '1' \n" +
@@ -264,9 +264,9 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS consultImCount,\n" +
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS consultVedioCount\n" +
" FROM\n" +
" con_session c\n" +
" LEFT JOIN con_doctor d ON c.to_account = d.id\n" +
" LEFT JOIN con_department cre ON d.department_id = cre.id \n" +
" qh_con_session c\n" +
" LEFT JOIN qh_con_doctor d ON c.to_account = d.id\n" +
" LEFT JOIN qh_con_dept cre ON d.department_id = cre.id \n" +
" WHERE\n" +
" c.del_flag = 0 \n" +
" AND c.STATUS = '1' \n" +
@@ -288,9 +288,9 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS consultImCount,\n" +
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS consultVedioCount\n" +
" FROM\n" +
" con_session c\n" +
" LEFT JOIN con_doctor d ON c.to_account = d.id\n" +
" LEFT JOIN con_resource cre ON d.resource_id = cre.id \n" +
" qh_con_session c\n" +
" LEFT JOIN qh_con_doctor d ON c.to_account = d.id\n" +
" LEFT JOIN qh_con_resource cre ON d.resource_id = cre.id \n" +
" WHERE\n" +
" c.del_flag = 0 \n" +
" AND c.STATUS = '1' \n" +
@@ -20,42 +20,42 @@ public interface ConDoctorSchedulingDateMapper extends BaseMapper<ConDoctorSched
IPage<ConDoctorSchedulingDate> queryPageList(IPage<ConDoctorSchedulingDate> page, @Param("conDoctorSchedulingDate") ConDoctorSchedulingDate conDoctorSchedulingDate);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= TO_CHAR(SYSDATE,'YYYY-MM-DD') order by scheduling_date")
@Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= TO_CHAR(SYSDATE,'YYYY-MM-DD') order by scheduling_date")
public List<ConDoctorSchedulingDateListDO> selectDoctorById(String doctorId);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and id = #{id}")
@Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and id = #{id}")
ConDoctorSchedulingDate selectDoctorScheduleById(String id);
@Update("update con_doctor_scheduling_date set ready_scheduling_num = ready_scheduling_num - 1 WHERE id = #{id}")
@Update("update qh_con_doc_schd_dt set ready_scheduling_num = ready_scheduling_num - 1 WHERE id = #{id}")
public int updateScheduleAddNum(String id);
@Update("update con_doctor_scheduling_date set ready_scheduling_num = ready_scheduling_num + 1 WHERE id = #{id}")
@Update("update qh_con_doc_schd_dt set ready_scheduling_num = ready_scheduling_num + 1 WHERE id = #{id}")
public int updateScheduleAddMinus(String id);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= TO_CHAR(#{schedulingDate},'YYYY-MM-DD')")
@Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= TO_CHAR(#{schedulingDate},'YYYY-MM-DD')")
public List<ConDoctorSchedulingDateListDO> selectDoctorScheduleDateById(String doctorId, Date schedulingDate);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= TRUNC(SYSDATE) and week = #{week}")
@Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= TRUNC(SYSDATE) and week = #{week}")
public List<ConDoctorSchedulingDateListDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week);
@Update("update con_doctor_scheduling_date set scheduling_num = #{schedulingNum} WHERE id = #{id}")
@Update("update qh_con_doc_schd_dt set scheduling_num = #{schedulingNum} WHERE id = #{id}")
public int updateScheduleNum(String schedulingNum, String id);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date = TO_CHAR(#{schedulingDate},'YYYY-MM-DD') and type = #{type}")
@Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date = TO_CHAR(#{schedulingDate},'YYYY-MM-DD') and type = #{type}")
public List<ConDoctorSchedulingDateListDO> selectDoctorScheduleDate(String doctorId, Date schedulingDate, String type);
Boolean insertBatchSomeColumn(@Param("list") List<ConDoctorSchedulingDate> list);
@Delete("delete from con_doctor_scheduling_date where user_id = #{userId} and scheduling_date > #{date}")
@Delete("delete from qh_con_doc_schd_dt where user_id = #{userId} and scheduling_date > #{date}")
Boolean deleteDoctorSchedulingDateByUserId(String userId,String date);
@Delete("delete from con_doctor_scheduling_date")
@Delete("delete from qh_con_doc_schd_dt")
Boolean deleteDoctorSchedulingDateAll();
Boolean batchInsert(@Param("list") List<ConDoctorSchedulingDate> list);
@@ -20,32 +20,32 @@ import java.util.List;
public interface ConDoctorSchedulingMapper extends BaseMapper<ConDoctorScheduling> {
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} order by week")
@Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and user_id = #{userId} order by week")
public List<ConDoctorSchedulingDO> selectDoctorScheduling(String userId);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} and week = #{week}")
@Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and user_id = #{userId} and week = #{week}")
public ConDoctorSchedulingDO selectDoctorSchedulingByWeek(String userId, String week);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and week = #{week}")
@Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and week = #{week}")
public List<ConDoctorScheduling> selectDoctorSchedulingByWeekList(int week);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and week = #{week} and user_id = #{userId}")
@Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and week = #{week} and user_id = #{userId}")
public ConDoctorScheduling selectDoctorSchedulingByWeekListByDoctorId(int week, String userId);
@Update("update con_doctor_scheduling set del_flag = 1 WHERE status = '1' and del_flag = '0' and user_id = #{userId}")
@Update("update qh_con_doc_schd 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 >= TRUNC(SYSDATE) and week = #{week}")
@Select("SELECT * FROM qh_con_doc_schd 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);
@Select("select count(1) from con_doctor_scheduling where status = '1' and del_flag = '0' and user_id = #{userId}")
@Select("select count(1) from qh_con_doc_schd where status = '1' and del_flag = '0' and user_id = #{userId}")
int selectExistSchedule(String userId);
@Select("delete from con_doctor_scheduling ")
@Select("delete from qh_con_doc_schd ")
int deleteDoctorScheduleAll();
}
@@ -23,26 +23,26 @@ public interface ConEvaluateMapper extends BaseMapper<ConEvaluate> {
IPage<ConEvaluate> queryPageList(Page<ConEvaluate> page, @Param("conEvaluate") ConEvaluate conEvaluate);
@Select("SELECT * FROM con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} order by create_time desc limit 5")
@Select("SELECT * FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} order by create_time desc limit 5")
public List<ConEvaluateDO> selectDoctorJudgmentById(String expert);
public List<ConEvaluateDO> selectDoctorJudgmentList(IPage<ConEvaluateDO> page, @Param("expert") String expert, @Param("hospitalId") String hospitalId);
@Select("SELECT * FROM con_evaluate WHERE status = '1' and del_flag = '0' and session_id = #{sessionId}")
@Select("SELECT * FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and session_id = #{sessionId}")
public ConEvaluateDO selectDoctorJudgmentBySessionId(String sessionId);
@Select("SELECT COUNT(1) FROM con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} and score >= 3")
@Select("SELECT COUNT(1) FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} and score >= 3")
public String selectDoctorSumScore(String expert);
@Select("SELECT COUNT(1) FROM con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert}")
@Select("SELECT COUNT(1) FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert}")
public String selectDoctorEvNum(String expert);
@Select("SELECT COUNT(1) FROM con_evaluate WHERE status = '1' and del_flag = '0' and hospital_id = #{hospitalId}")
@Select("SELECT COUNT(1) FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and hospital_id = #{hospitalId}")
public String selectHospitalEvNum(String hospitalId);
List<ConEvaluate> selectListByDoctorIds(@Param("doctorIds") List<String> doctorIds);
@@ -25,14 +25,14 @@ public interface ConFamilyMembersMapper extends BaseMapper<ConFamilyMembers> {
public List<ConFamilyMembersAndMedicalRecordsDO> selectMenberList(IPage<ConFamilyMembersAndMedicalRecordsDO> page, @Param("userId") String userId);
@Select("SELECT * FROM con_family_members WHERE status = '1' and del_flag = '0' and id = #{memberId}")
@Select("SELECT * FROM qh_con_fammem WHERE status = '1' and del_flag = '0' and id = #{memberId}")
ConFamilyMembersDO selectConFamilyMembersDOById(String memberId);
@Select("SELECT * FROM con_family_members WHERE status = '1' and del_flag = '0' and id = #{memberId}")
@Select("SELECT * FROM qh_con_fammem WHERE status = '1' and del_flag = '0' and id = #{memberId}")
ConFamilyMembers selectConFamilyMembersById(String memberId);
@Update("update con_family_members set del_flag = '1' where id = #{memberId}")
@Update("update qh_con_fammem set del_flag = '1' where id = #{memberId}")
int removeMenberById(String memberId);
List<ConFamilyNumVO> selectFamilyNum(@Param("familyIds") List<String> familyIds);
@@ -42,11 +42,11 @@ public interface ConFamilyMembersMapper extends BaseMapper<ConFamilyMembers> {
ConFamilyNumVO selectFamilyUserId(@Param("userId") String userId);
@Select("SELECT * FROM con_family_members WHERE status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1 order by create_time desc limit 1")
@Select("SELECT * FROM qh_con_fammem WHERE status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1 order by create_time desc limit 1")
ConFamilyMembers selectConFamilyMembersByUserId(String userId);
List<ConFamilyMembers> selectConFamilyMembersByUserIds(@Param("userIds") List<String> userIds);
@Select("select count(1) from con_family_members where status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1")
@Select("select count(1) from qh_con_fammem where status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1")
int selectOwnFanilyExist(String userId);
}
@@ -18,19 +18,19 @@ import java.util.List;
@Mapper
public interface ConHealthInfoAnswerMapper extends BaseMapper<ConHealthInfoAnswer> {
@Select("SELECT * FROM con_health_info_answer WHERE status = '1' and del_flag = '0' and base_health_id = #{baseHealthId} and member_id = #{memberId}")
@Select("SELECT * FROM qh_con_health_ans WHERE status = '1' and del_flag = '0' and base_health_id = #{baseHealthId} and member_id = #{memberId}")
public ConHealthInfoAnswer selectHealthAnswerByUserIdAndQuestionId(@Param("baseHealthId") String baseHealthId, @Param("memberId") String memberId);
@Update("update con_health_info_answer set del_flag = '1' where user_id = #{userId} and member_id = #{memberId}")
@Update("update qh_con_health_ans set del_flag = '1' where user_id = #{userId} and member_id = #{memberId}")
public int deleteHealthAnswerByUserId(@Param("userId") String userId, @Param("memberId") String memberId);
@Select("SELECT * FROM con_health_info_answer WHERE status = '1' and del_flag = '0' and user_id = #{userId} and member_id = #{memberId} order by create_time")
@Select("SELECT * FROM qh_con_health_ans WHERE status = '1' and del_flag = '0' and user_id = #{userId} and member_id = #{memberId} order by create_time")
public List<ConHealthInfoAnswer> selectHealthAnswerByUserId(@Param("userId") String userId, @Param("memberId") String memberId);
@Select("SELECT * FROM con_health_info_answer WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time")
@Select("SELECT * FROM qh_con_health_ans WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time")
public List<ConHealthInfoAnswer> selectHealthAnswerByMemberId(@Param("memberId") String memberId);
@@ -18,6 +18,6 @@ public interface ConHealthInfoMapper extends BaseMapper<ConHealthInfo> {
List<ConHealthInfo> getAllHealthInfo();
@Select("SELECT * FROM con_health_info WHERE status = '1' and del_flag = '0' and item_area = #{itemArea} order by sort asc")
@Select("SELECT * FROM qh_con_health WHERE status = '1' and del_flag = '0' and item_area = #{itemArea} order by sort asc")
public List<ConHealthInfo> selectHealthInfoListByItemArea(String itemArea);
}
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @Description: con_helper
* @Description: qh_con_helper
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
@@ -30,6 +30,6 @@ public interface ConHelperMapper extends BaseMapper<ConHelper> {
int updateHelperOrgCode(@Param("tableName")String tableName,@Param("orgCode")String orgCode,
@Param("userId")String userId);
@Select("select * from con_helper where del_flag = 0 and id = #{id}")
@Select("select * from qh_con_helper where del_flag = 0 and id = #{id}")
ConHelper selectConHelperbyId(String id);
}
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.*;
import java.util.List;
/**
* @Description: con_helper_scheduling
* @Description: qh_con_helper_schd
* @Author: jeecg-boot
* @Date: 2023-05-23
* @Version: V1.0
@@ -16,18 +16,18 @@ import java.util.List;
public interface ConHelperSchedulingMapper extends BaseMapper<ConHelperScheduling> {
@Select("SELECT user_id FROM con_helper_scheduling WHERE status = '1' and del_flag = '0' and week = #{week} and type = #{type}")
@Select("SELECT user_id FROM qh_con_helper_schd WHERE status = '1' and del_flag = '0' and week = #{week} and type = #{type}")
public List<String> selectHelperInfo(int week, int type);
@Update("UPDATE con_helper_scheduling SET del_flag = '1' WHERE user_id = #{userId}")
@Update("UPDATE qh_con_helper_schd SET del_flag = '1' WHERE user_id = #{userId}")
public Boolean deleteByUserId(String userId);
@Delete("DELETE FROM con_helper_scheduling WHERE week = #{week} and type = #{type}")
@Delete("DELETE FROM qh_con_helper_schd WHERE week = #{week} and type = #{type}")
public Boolean deleteByWeekAndType(String week, String type);
public Integer insertBatch(@Param("list") List<ConHelperScheduling> list);
@Select("SELECT * FROM con_helper_scheduling WHERE week = #{week} and del_flag = '0' and status = '1'")
@Select("SELECT * FROM qh_con_helper_schd WHERE week = #{week} and del_flag = '0' and status = '1'")
public List<ConHelperScheduling> getYesterDayScheduling(Integer week);
}
@@ -14,11 +14,11 @@ import org.apache.ibatis.annotations.Update;
public interface ConHospitalFollowMapper extends BaseMapper<ConHospitalFollow> {
@Select("SELECT count(1) FROM con_hospital_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and hospital_id = #{hospitalId}")
@Select("SELECT count(1) FROM qh_con_hosp_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and hospital_id = #{hospitalId}")
public int selectFollowHospitalExist(String userId, String hospitalId);
@Update("update con_hospital_follow set del_flag = '1' where user_id = #{userId} and hospital_id = #{hospitalId}")
@Update("update qh_con_hosp_follow set del_flag = '1' where user_id = #{userId} and hospital_id = #{hospitalId}")
public int cancelHospitalFollow(String userId, String hospitalId);
}
@@ -25,6 +25,6 @@ public interface ConKnowledgeMapper extends BaseMapper<ConKnowledge> {
IPage<String> selectKnowledgeList(IPage<ConKnowledge> page, @Param("classId") String classId, @Param("tfRecommend") String tfRecommend, @Param("knowTitle") String knowTitle);
@Select("select * from con_knowledge where status = 1 and del_flag = 0 and id = #{id}")
@Select("select * from qh_con_know where status = 1 and del_flag = 0 and id = #{id}")
ConKnowledge selectConKnowledgeById(String id);
}
@@ -18,24 +18,24 @@ import java.util.List;
@Mapper
public interface ConMedicalRecordsMapper extends BaseMapper<ConMedicalRecords> {
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc")
@Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc")
public List<ConMedicalRecordsListDO> selectConMedicalRecordsListByMemberId(String memberId);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and id = #{id}")
@Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and id = #{id}")
public ConMedicalRecordsListDO selectConMedicalRecordsListById(String id);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and id = #{id}")
@Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and id = #{id}")
public ConMedicalRecordsDO selectConMedicalRecordsInfoById(String id);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc")
@Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc")
List<ConMedicalRecordsListDO> selectConMedicalRecordsByMemberId(String memberId);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and member_id = #{memberId} and user_id = #{userId}")
@Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and member_id = #{memberId} and user_id = #{userId}")
ConMedicalRecords selectByMemberIdAndUserId(String memberId, String userId);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and id = #{id}")
@Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and id = #{id}")
public ConMedicalRecordsDO selectConMedicalRecordsViewInfoById(String id);
}
@@ -24,7 +24,7 @@ public interface ConNoticeMapper extends BaseMapper<ConNotice> {
*/
IPage<ConNotice> queryPageList(IPage<ConNotice> page, @Param("conNotice") ConNotice conNotice);
@Select("SELECT * FROM con_notice WHERE status = '1' and del_flag = '0' and notice_type = #{type} order by create_time desc limit 1")
@Select("SELECT * FROM qh_con_notice WHERE status = '1' and del_flag = '0' and notice_type = #{type} order by create_time desc limit 1")
public ConNotice selectNoticeByType(String type);
}
@@ -14,7 +14,7 @@ import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* @Description: con_resource
* @Description: qh_con_resource
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Version: V1.0
@@ -30,18 +30,18 @@ public interface ConResourceMapper extends BaseMapper<ConResource> {
*/
IPage<ConResource> queryPageList(IPage<ConResource> page, ConResource conResource);
@Update("update con_resource set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{id}")
@Update("update qh_con_resource set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{id}")
public int updateHospitalScoreAnfNum(String userScore, String id);
@Select("select id,resource_name as resourceName from con_resource WHERE status = '1' and del_flag = '0' order by tf_top desc,sort")
@Select("select id,resource_name as resourceName from qh_con_resource WHERE status = '1' and del_flag = '0' order by tf_top desc,sort")
public List<ConResourceDO> selectHospitalList();
@Select("select * from con_resource WHERE status = '1' and del_flag = '0'")
@Select("select * from qh_con_resource WHERE status = '1' and del_flag = '0'")
public List<ConResource> selectResourceList();
@Select("select * from con_resource where status = '1' and del_flag = '0' and id = #{id}")
@Select("select * from qh_con_resource where status = '1' and del_flag = '0' and id = #{id}")
ConResource selectConResourceById(String id);
List<ConResource> selectBatchIds(@Param("ids") List<String> ids);
@@ -50,13 +50,13 @@ public interface ConResourceMapper extends BaseMapper<ConResource> {
Boolean updateTop(@Param("id") String id, @Param("type") Boolean type);
@Select("SELECT * FROM con_resource WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{name}, '%')")
@Select("SELECT * FROM qh_con_resource WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{name}, '%')")
List<ConResource> selectByResourceName(@Param("name") String name);
List<HospitalDepartment> selectResourceInfoByDepartId(@Param("idList") List<String> idList);
@Select("SELECT c.id,c.resource_name as resourceName FROM con_resource c WHERE EXISTS (SELECT 1 FROM con_doctor d WHERE c.id = d.resource_id and d.del_flag = 0 and d.status = 1)" +
@Select("SELECT c.id,c.resource_name as resourceName FROM qh_con_resource c WHERE EXISTS (SELECT 1 FROM qh_con_doctor d WHERE c.id = d.resource_id and d.del_flag = 0 and d.status = 1)" +
"and c.del_flag = 0 and c.status = 1 ORDER BY c.tf_top DESC,c.sort")
public List<ConResourceDO> selectHospitalListVersionTwo();
@@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Select;
import java.util.Date;
/**
* @Description: con_service
* @Description: qh_con_srvc
* @Author: jeecg-boot
* @Date: 2023-05-31
* @Version: V1.0
@@ -16,11 +16,11 @@ import java.util.Date;
@Mapper
public interface ConServiceMapper extends BaseMapper<ConService> {
@Select("select * from con_service where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 order by create_time desc limit 1")
@Select("select * from qh_con_srvc where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 order by create_time desc limit 1")
ConService selectConServiceByDoctrId(String doctorId);
@Select("select count(1) from con_service where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 and TO_CHAR(#{scheduleDate}, 'YYYY-MM-DD') >= TO_CHAR(start_day, 'YYYY-MM-DD') and TO_CHAR(#{scheduleDate}, 'YYYY-MM-DD') <= TO_CHAR(end_day, 'YYYY-MM-DD')")
@Select("select count(1) from qh_con_srvc where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 and TO_CHAR(#{scheduleDate}, 'YYYY-MM-DD') >= TO_CHAR(start_day, 'YYYY-MM-DD') and TO_CHAR(#{scheduleDate}, 'YYYY-MM-DD') <= TO_CHAR(end_day, 'YYYY-MM-DD')")
int selectConServiceByDoctrIdExist(String doctorId, Date scheduleDate);
}
@@ -47,7 +47,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
*/
IPage<ConSession> listByHelper(com.baomidou.mybatisplus.core.metadata.IPage<ConSession> page, @Param("conSession") ConSession conSession);
@Update("update con_session set content_status = #{contentStatus},reject_reason = #{rejectReason} where id = #{id}")
@Update("update qh_con_session set content_status = #{contentStatus},reject_reason = #{rejectReason} where id = #{id}")
public int updateContentStatus(String id, String contentStatus, String rejectReason);
@@ -72,7 +72,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
String selectSessioningDoctorExist(@Param("fromAccount") String fromAccount, @Param("toAccount") String toAccount);
@Select("select count(1) from con_session where to_account = #{doctorId} and content_type = 2 and session_type = 1 and session_date >= #{startTime} and session_date <= #{endTime} and (content_status = 1 or content_status = 2 or content_status = 3)")
@Select("select count(1) from qh_con_session where to_account = #{doctorId} and content_type = 2 and session_type = 1 and session_date >= #{startTime} and session_date <= #{endTime} and (content_status = 1 or content_status = 2 or content_status = 3)")
String selectSessionVideoUnByDoctorId(@Param("doctorId") String doctorId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
/**
@@ -83,62 +83,62 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
*/
List<ImMsgRecordAll> selectMsg(@Param("id") String id);
@Select("select * from con_session where id = #{id} and del_flag = 0 and status = 1")
@Select("select * from qh_con_session where id = #{id} and del_flag = 0 and status = 1")
ConSession selectConSessionById(String id);
@Update("update con_session set content_status = #{contentStatus},im_id=#{imId} where id = #{id}")
@Update("update qh_con_session set content_status = #{contentStatus},im_id=#{imId} where id = #{id}")
int updateSessionStatusById(String id, String contentStatus, String imId);
@Select("select * from con_session where from_account = #{userId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1")
@Select("select * from qh_con_session where from_account = #{userId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1")
ConSession selectSessioning(String userId, String toAccount);
@Select("select * from con_session where member_id = #{memberId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1")
@Select("select * from qh_con_session where member_id = #{memberId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1")
ConSession selectSessioningByMember(String memberId, String toAccount);
@Select("select * from con_session where from_account = #{fromAccount} and content_status = 3 and to_account = #{toAccount} and content_type = #{contentType} order by create_time desc limit 1")
@Select("select * from qh_con_session where from_account = #{fromAccount} and content_status = 3 and to_account = #{toAccount} and content_type = #{contentType} order by create_time desc limit 1")
ConSession selectSessioningByFromAccount(String fromAccount, String toAccount, String contentType);
@Select("select count(1) from con_session where from_account = #{userId} and (content_status = 1 or content_status = 3 or content_status = 2) and session_type = 1")
@Select("select count(1) from qh_con_session where from_account = #{userId} and (content_status = 1 or content_status = 3 or content_status = 2) and session_type = 1")
String selectSessioningNum(String userId);
@Update("update con_session set content_status = #{contentStatus},tf_reply = 1,im_id=#{imId} where id = #{id}")
@Update("update qh_con_session set content_status = #{contentStatus},tf_reply = 1,im_id=#{imId} where id = #{id}")
int updateSessionStatusByIdOnly(String id, String contentStatus, String imId);
@Select("select * from con_session where im_id = #{imId} and to_account = #{toAccount} and del_flag = 0 and status = 1")
@Select("select * from qh_con_session where im_id = #{imId} and to_account = #{toAccount} and del_flag = 0 and status = 1")
ConSession selectConSessionByImId(String imId, String toAccount);
@Update("update con_session set reply_time = SYSDATE where im_id = #{imId}")
@Update("update qh_con_session set reply_time = SYSDATE where im_id = #{imId}")
int updateSessionReplyTime(String imId);
@Select("select * from con_session where im_id = #{imId} and del_flag = 0 and status = 1")
@Select("select * from qh_con_session where im_id = #{imId} and del_flag = 0 and status = 1")
ConSession selectConSessionByImIdOnly(String imId);
@Update("update con_session set content_status = 4 where (SYSDATE - CAST(reply_time AS DATE)) * 24 >= 4 and content_status = 3 and content_type = 1")
@Update("update qh_con_session set content_status = 4 where (SYSDATE - CAST(reply_time AS DATE)) * 24 >= 4 and content_status = 3 and content_type = 1")
int sessionSendMessageExpire();
@Update("update con_session set content_status = 8 where (SYSDATE - CAST(create_time AS DATE)) * 24 >= 24 and content_type = 1 and (content_status = 1 or content_status = 2)")
@Update("update qh_con_session set content_status = 8 where (SYSDATE - CAST(create_time AS DATE)) * 24 >= 24 and content_type = 1 and (content_status = 1 or content_status = 2)")
int sessionSendMessageExpireAnother();
@Update("update con_session set content_status = 8 where TRUNC(SYSDATE) > session_date and content_type = 2 and (content_status = 1 or content_status = 2)")
@Update("update qh_con_session set content_status = 8 where TRUNC(SYSDATE) > session_date and content_type = 2 and (content_status = 1 or content_status = 2)")
int sessionSendMessageExpireVideo();
@Update("update con_session set content_status = 4 where TRUNC(SYSDATE) > session_date and content_type = 2 and content_status = 3 ")
@Update("update qh_con_session set content_status = 4 where TRUNC(SYSDATE) > session_date and content_type = 2 and content_status = 3 ")
int sessionSendMessageExpireVideoAnother();
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 limit 1")
@Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 limit 1")
ConSession selectSessioningByProfessorId(String fromAccount, String sessionType);
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 order by create_time desc limit 1")
@Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 order by create_time desc limit 1")
ConSession selectSessioningByProfessorIdNew(String fromAccount, String sessionType);
List<ConSession> companySessionList(@Param("imId") String imId);
@@ -158,7 +158,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
List<ConSessionDO> selectSessionListPictureByUserId(@Param("imIds") String imIds);
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and session_type != 1 order by create_time limit 1")
@Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and session_type != 1 order by create_time limit 1")
ConSession selectSessioningByFromAndTo(String fromAccount, String toAccount);
List<ConSessionDO> selectSessionListByUserIdVersionTwo(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("userId") String userId);
@@ -169,7 +169,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
@Param("contentStatus") String contentStatus);
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and member_id = #{memberId} and session_type = 1 and content_type = 2 and (content_status = 1 or content_status = 2 or content_status = 3 ) order by create_time desc limit 1")
@Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and member_id = #{memberId} and session_type = 1 and content_type = 2 and (content_status = 1 or content_status = 2 or content_status = 3 ) order by create_time desc limit 1")
ConSession selectSessioningVideoByFromAndTo(String fromAccount, String toAccount, String memberId);
@@ -178,7 +178,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
*
* @return
*/
@Update("update con_session set content_status = 5 where session_type != 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
@Update("update qh_con_session set content_status = 5 where session_type != 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
int changeEndUserAndProfessiorHelper(String expireHour);
/**
@@ -186,7 +186,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
*
* @return
*/
@Update("update con_session set content_status = 4 where session_type = 1 and content_type = 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
@Update("update qh_con_session set content_status = 4 where session_type = 1 and content_type = 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
int endSession(String expireHour);
/**
@@ -194,7 +194,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
*
* @return
*/
@Update("update con_session set content_status = 8 where content_type != 2 and (SYSDATE - CAST(create_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 0")
@Update("update qh_con_session set content_status = 8 where content_type != 2 and (SYSDATE - CAST(create_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 0")
int expireMeaaage(String expireHour);
@@ -208,7 +208,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
String selectSessionProfessorIngNew(@Param("toAccount") String toAccount, @Param("contentType") String contentType,
@Param("contentStatus") String contentStatus,@Param("tfReply") String tfReply);
// @Update("update con_session set content_status = 5 where im_id = #{id}")
// @Update("update qh_con_session set content_status = 5 where im_id = #{id}")
// String selectSessionVideoUnByDoctorId();
@@ -240,20 +240,20 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
@Param("fromAccount")String fromAccount);
@Select("select * from con_session where im_id = #{imId} and del_flag = 0 and status = 1")
@Select("select * from qh_con_session where im_id = #{imId} and del_flag = 0 and status = 1")
ConSession selectConSessionByImIdOnlyBackUp(String imId);
@Select("select * from con_session where id = #{id} and del_flag = 0 and status = 1")
@Select("select * from qh_con_session where id = #{id} and del_flag = 0 and status = 1")
ConSession selectConSessionByIdView(String id);
@Select("select * from con_session where im_id = #{id} and del_flag = 0 and status = 1")
@Select("select * from qh_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}")
@Update("update qh_con_session set user_tf_reply = 1 where id = #{id}")
int updateSessionUserReplyState(String id);
@Update("update con_session set user_tf_reply = 1,user_first_reply_time = #{replyTime} where id = #{id}")
@Update("update qh_con_session set user_tf_reply = 1,user_first_reply_time = #{replyTime} where id = #{id}")
int updateSessionUserReplyAndTimeState(String id,Date replyTime);
List<ConSessionDO> selectSessionListByDoctorIdNewAnother(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("doctorId") String doctorId,
@@ -274,7 +274,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
List<ConSessionDO> selectSessionListByUserIdHelperAnother(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("userId") String userId);
@Select("select * from con_session where session_type = 1 and content_type = 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
@Select("select * from qh_con_session where session_type = 1 and content_type = 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
List<ConSession> selectEndSession(String expireHour);
@@ -16,7 +16,7 @@ import java.util.List;
public interface ConSessionReservationDateMapper extends BaseMapper<ConSessionReservationDate> {
@Select("select * from con_session_reservation_date where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time")
@Select("select * from qh_con_sess_resv_dt where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time")
List<ConSessionReservationDateDO> selectConSessionVideoBySessionId(String sessionId);
}
@@ -8,21 +8,21 @@ import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @Description: con_session_video_info
* @Description: qh_con_sess_vid
* @Author: jeecg-boot
* @Date: 2023-06-15
* @Version: V1.0
*/
public interface ConSessionVideoInfoMapper extends BaseMapper<ConSessionVideoInfo> {
@Select("select * from con_session_video_info where session_id = #{sessionId} and del_flag = 0 and status = 1")
@Select("select * from qh_con_sess_vid where session_id = #{sessionId} and del_flag = 0 and status = 1")
List<ConSessionVideoInfoDO> selectConSessionVideoById(String sessionId);
@Select("select * from con_session_video_info where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time desc limit 1")
@Select("select * from qh_con_sess_vid where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time desc limit 1")
ConSessionVideoInfo selectConSessionVideoOnlyById(String sessionId);
@Select("select * from con_session_video_info where reservation_id = #{reservationId} and del_flag = 0 and status = 1")
@Select("select * from qh_con_sess_vid where reservation_id = #{reservationId} and del_flag = 0 and status = 1")
List<ConSessionVideoInfoDO> selectConSessionVideoByReservationId(String reservationId);
}
@@ -12,7 +12,7 @@ import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* @Description: con_sicks
* @Description: qh_con_sicks
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Version: V1.0
@@ -44,22 +44,22 @@ public interface ConSicksMapper extends BaseMapper<ConSicks> {
*/
List<ConSicksDO> selectSickListByDepartmentId(@Param("departmentId") String departmentId);
@Select("select count(1) from con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1")
@Select("select count(1) from qh_con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1")
int selectSickNumByDepartmentId(String departmentId);
@Select("select id from con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1")
@Select("select id from qh_con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1")
List<String> selectSickListStringByDepartmentId(String departmentId);
Boolean updateTop(@Param("id") String id, @Param("type") Boolean type);
List<ConSicks> selectListByIdList(@Param("idList") List<String> idList);
@Select("select count(1) from con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
@Select("select count(1) from qh_con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
int selectSickNumByDepartment(String departmentId);
@Select("select id from con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
@Select("select id from qh_con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
List<String> selectSickNumByDepartmentByDepartment(String departmentId);
@@ -71,13 +71,13 @@ public interface ConSicksMapper extends BaseMapper<ConSicks> {
List<ConSicks> selectSickByTopAndHaveDoctor();
@Select("select id,department_id as departmentId,sicks_name as sicksName,descript from con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0 order by tf_top desc,sort")
@Select("select id,department_id as departmentId,sicks_name as sicksName,descript from qh_con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0 order by tf_top desc,sort")
List<ConSicksDO> selectSickListByDepartment(String departmentId);
@Select("select LISTAGG(id, ',') WITHIN GROUP (ORDER BY id) from con_sicks where department_id = #{departmentId}")
@Select("select LISTAGG(id, ',') WITHIN GROUP (ORDER BY id) from qh_con_sicks where department_id = #{departmentId}")
String selectSickListByDepartmentIdAnother(String departmentId);
@Update("update con_sicks set department_id = #{departmentOne} where department_id = #{departmentTwo}")
@Update("update qh_con_sicks set department_id = #{departmentOne} where department_id = #{departmentTwo}")
int updateSickDepartmentId(String departmentOne,String departmentTwo);
}
@@ -17,12 +17,12 @@ import java.util.List;
@Mapper
public interface HospitalDepartmentMapper extends BaseMapper<HospitalDepartment> {
@Select("select count(1) from hospital_department where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}")
@Select("select count(1) from qh_con_hosp_dept where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}")
public String selectHospitalDepartment(String hospitalId);
@Update("update hospital_department set del_flag = 1 where hospital_id = #{hospitalId}")
@Update("update qh_con_hosp_dept set del_flag = 1 where hospital_id = #{hospitalId}")
public Boolean deleteByResourceId(String hospitalId);
@Select("select * from hospital_department where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}")
@Select("select * from qh_con_hosp_dept where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}")
public List<HospitalDepartment> selectByHospitalId(String hospitalId);
}
@@ -4,7 +4,7 @@
<select id="selectConCostLog" resultType="com.renkang.consultation.entity.ConCostLog">
select * from con_cost_log
select * from qh_con_cost_log
where title_id = #{doctorJob}
<if test="userId != null and userId != ''">
and user_id = #{userId}
@@ -64,7 +64,7 @@
<select id="findlistpage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from con_cost_statistics cct
from qh_con_cost_stat cct
<where>
<if test='type == "1"'>
and cct.operate_type &lt;&gt; '5'
@@ -84,7 +84,7 @@
<select id="groupByMonthList" resultType="java.util.HashMap">
SELECT COUNT(cs.content_type) cou, cs.content_type
FROM con_session cs
FROM qh_con_session cs
where cs.content_type is not null
and cs.content_type &lt;&gt; '4'
and TO_CHAR(cs.create_time, 'YYYY-MM') = #{date}
@@ -94,7 +94,7 @@
<select id="groupByTypehList" resultType="java.util.HashMap">
SELECT COUNT(cs.content_type) cou, cs.content_type, cs.session_status
FROM con_session cs
FROM qh_con_session cs
where cs.content_type is not null
and cs.content_type &lt;&gt; '4'
and cs.to_account = #{userId} and session_type = 1
@@ -105,7 +105,7 @@
</select>
<select id="queryPageList" resultType="com.renkang.consultation.entity.ConCostStatistics">
select ccs.*
from con_cost_statistics ccs
from qh_con_cost_stat ccs
<where>
<if test='conCostStatistics.startDate != null and conCostStatistics.endDate != null'>
and ccs.income_time between TRUNC(#{conCostStatistics.startDate}) and TRUNC(#{conCostStatistics.endDate}) + 1 - 1/86400
@@ -124,28 +124,28 @@
</select>
<select id="getAccountMoney" resultType="java.math.BigDecimal">
SELECT account_money
FROM con_cost_statistics where user_id=#{userId}
FROM qh_con_cost_stat where user_id=#{userId}
ORDER BY create_time DESC
LIMIT 1;
</select>
<select id="getAccumulatedIncome" resultType="java.math.BigDecimal">
select sum(income) from con_cost_statistics where user_id=#{userId} and operate_type!='5'
select sum(income) from qh_con_cost_stat where user_id=#{userId} and operate_type!='5'
</select>
<select id="getWithdrawalAmount" resultType="java.math.BigDecimal">
select sum(payment_money) from con_cost_statistics where user_id=#{userId} and operate_type='5'
select sum(payment_money) from qh_con_cost_stat where user_id=#{userId} and operate_type='5'
</select>
<select id="selectAccountMoneyNew" resultType="java.math.BigDecimal">
select account_money from con_cost_statistics where user_id=#{userId} and del_flag = 0 and status = 1 order by
select account_money from qh_con_cost_stat where user_id=#{userId} and del_flag = 0 and status = 1 order by
create_time desc limit 1
</select>
<select id="selectAccountMoneyNewList" resultType="com.renkang.consultation.entity.ConCostStatistics">
SELECT ccs.account_money, ccs.user_id
FROM con_cost_statistics ccs
FROM qh_con_cost_stat ccs
JOIN (
SELECT user_id, MAX(create_time) AS max_create_time
FROM con_cost_statistics
FROM qh_con_cost_stat
WHERE del_flag = 0 AND status = 1 AND user_id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
@@ -155,14 +155,14 @@
WHERE ccs.del_flag = 0 AND ccs.status = 1;
</select>
<select id="selectNew" resultType="com.renkang.consultation.entity.ConCostStatistics">
select * from con_cost_statistics where user_id=#{userId} and del_flag = 0 and status = 1 order by create_time
select * from qh_con_cost_stat where user_id=#{userId} and del_flag = 0 and status = 1 order by create_time
desc limit 1
</select>
<select id="groupByTypehListNew" resultType="String">
select
count(1)
from con_session
from qh_con_session
where
session_type = 1 and to_account = #{userId} and content_type = #{type}
<if test="state != null and state != '' and state == '1'.toString()">
@@ -176,7 +176,7 @@
</if>
</select>
<select id="selectByDoctorIds" resultType="com.renkang.consultation.entity.ConCostStatistics">
select * from con_cost_statistics where user_id in
select * from qh_con_cost_stat where user_id in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.renkang.consultation.mapper.ConDepartmentMapper">
<update id="updateTop">
update con_department
update qh_con_dept
set tf_top = #{type}
where id = #{id}
</update>
@@ -10,7 +10,7 @@
select
id,
department_name as "departmentName"
from con_department
from qh_con_dept
where status = 1 and del_flag = 0
<if test="officeparid != '0'.toString() and officeparid != '1'.toString()">
and officeparid = #{officeparid}
@@ -28,13 +28,13 @@
</select>
<select id="selectDepartmentList" resultType="com.renkang.consultation.vo.ConDepartDoctorVO">
select id, department_name as "name"
from con_department
from qh_con_dept
where status = 1
and del_flag = 0
</select>
<select id="queryList" resultType="com.renkang.consultation.entity.ConDepartment">
select *
from con_department
from qh_con_dept
<where>
<if test="departmentName != null and departmentName != ''">
and department_name like CONCAT('%', #{departmentName}, '%')
@@ -50,7 +50,7 @@
<select id="selectDoctorByDepartId" parameterType="java.util.List"
resultType="com.renkang.consultation.vo.ConDepartmentVO">
SELECT department_id as id, COUNT(id) AS doctorNum
FROM con_doctor
FROM qh_con_doctor
WHERE del_flag = 0 and department_id IN
<foreach item="departId" collection="departIdList" open="(" separator="," close=")">
#{departId}
@@ -61,7 +61,7 @@
<select id="selectDoctorInfoByDepartId" parameterType="java.util.List"
resultType="com.renkang.consultation.entity.ConDoctor">
SELECT *
FROM con_doctor
FROM qh_con_doctor
WHERE del_flag = 0 and status = 1 and department_id IN
<foreach item="departId" collection="departIdList" open="(" separator="," close=")">
#{departId}
@@ -70,7 +70,7 @@
<select id="selectListByOfficeparid" resultType="com.renkang.consultation.entity.ConDepartment">
select *
from con_department
from qh_con_dept
where status = 1
and del_flag = 0
<if test="officeparid == null">
@@ -81,14 +81,14 @@
</if>
</select>
<select id="selectListAll" resultType="com.renkang.consultation.entity.ConDepartment">
select * from con_department
select * from qh_con_dept
<where>
<if test="resourceId == null">
and status = 1 and del_flag = 0
</if>
<if test="resourceId != null">
id in (
SELECT department_id FROM hospital_department WHERE hospital_id = #{resourceId} AND status = 1 AND
SELECT department_id FROM qh_con_hosp_dept WHERE hospital_id = #{resourceId} AND status = 1 AND
del_flag = 0
)
</if>
@@ -97,7 +97,7 @@
order by tf_top desc, sort
</select>
<select id="selectChildAll" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT * FROM con_department
SELECT * FROM qh_con_dept
WHERE id != #{departmentId}
START WITH id = #{departmentId}
CONNECT BY PRIOR id = officeparid
@@ -106,7 +106,7 @@
<select id="getOneDepartList" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT *
FROM con_department
FROM qh_con_dept
WHERE office_level = 1
and del_flag = 0
and status = 1
@@ -114,7 +114,7 @@
<select id="getTwoDepartList" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT *
FROM con_department
FROM qh_con_dept
WHERE office_level = 2
and del_flag = 0
and status = 1
@@ -122,16 +122,16 @@
<select id="getOneTwoDepartDoctorList" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT *
from con_doctor
from qh_con_doctor
where department_id in
(SELECT id FROM con_department WHERE office_level in (1, 2) and del_flag = 0 and status = 1)
(SELECT id FROM qh_con_dept WHERE office_level in (1, 2) and del_flag = 0 and status = 1)
and del_flag = 0
and status = 1
ORDER BY doctor_status DESC
</select>
<select id="selectChildById" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT * from con_department where officeparid = #{id} and del_flag = 0 and status = 1
SELECT * from qh_con_dept where officeparid = #{id} and del_flag = 0 and status = 1
</select>
@@ -139,13 +139,13 @@
select
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
from qh_con_hosp_dept a left join qh_con_dept 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
</select>
<select id="getMedicalDepartmentList" resultType="com.renkang.consultation.vo.MedicalDepartmentVO">
select id, department_name as name from con_department
select id, department_name as name from qh_con_dept
<where>
<if test="deptIds !=null and deptIds.size()!=0">
id in
@@ -161,9 +161,9 @@
select
id as "key",
department_name as "title",
(case when (select count(1) from con_department cd2 where cd2.officeparid = cdd.id)>0 then 0 else 1 end) as isLeaf,
(case when (select count(1) from qh_con_dept cd2 where cd2.officeparid = cdd.id)>0 then 0 else 1 end) as isLeaf,
officeparid as parentId
from con_department cdd
from qh_con_dept cdd
where CASE WHEN (officeparid IS NULL OR officeparid = '') THEN '0' ELSE officeparid END = #{pid}
</select>
@@ -6,14 +6,14 @@
user_id,
account_money
FROM
con_cost_statistics
qh_con_cost_stat
WHERE
(user_id, create_time) IN (
SELECT
user_id,
MAX(create_time)
FROM
con_cost_statistics
qh_con_cost_stat
WHERE
user_id IN
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
@@ -27,7 +27,7 @@
SELECT
*
FROM
con_doctor_card
qh_con_doc_card
<where>
del_flag = 0 and status = 1
<if test="conDoctorCard.doctorId != null and conDoctorCard.doctorId != ''">
@@ -10,10 +10,10 @@
doc.doctor_name,
dept.department_name
FROM
con_doctor_change_log clog
LEFT JOIN con_doctor doc ON clog.doctor_id = doc.id
LEFT JOIN con_resource reso ON doc.resource_id = reso.id
LEFT JOIN con_department dept ON doc.department_id = dept.id
qh_con_doc_chg_log clog
LEFT JOIN qh_con_doctor doc ON clog.doctor_id = doc.id
LEFT JOIN qh_con_resource reso ON doc.resource_id = reso.id
LEFT JOIN qh_con_dept dept ON doc.department_id = dept.id
<where>
<if test="doctorVO.doctorId != null and doctorVO.doctorId != ''">
AND clog.doctor_id = #{doctorVO.doctorId}
@@ -46,7 +46,7 @@
<select id="selectChangeLogByTime" resultType="com.renkang.consultation.entity.ConDoctorChangeLog">
select * from con_doctor_change_log
select * from qh_con_doc_chg_log
where change_date &gt; DATE(#{changeDate})
and doctor_id = #{doctorId}
and change_type = #{changeType}
@@ -4,8 +4,8 @@
<select id="selectFollowDoctorId" resultType="String">
select
a.doctor_id
from con_doctor_follow a
left join con_doctor b on a.doctor_id = b.id
from qh_con_doc_follow a
left join qh_con_doctor b on a.doctor_id = b.id
where a.user_id = #{userId} and a.del_flag = 0 and a.status = 1 and b.doctor_status = 1
order by a.create_time desc limit 2
</select>
@@ -46,13 +46,13 @@
a.sort as "sort"
</sql>
<insert id="insertCostLog">
INSERT INTO con_cost_log
INSERT INTO qh_con_cost_log
(user_id, graphic_cost, video_cost, create_by, create_time, type, title_id)
VALUES (#{userId}, #{graphicCost}, #{videoCost}, #{createBy}, #{createTime}, #{type}, #{titleId})
</insert>
<insert id="insertCostLogBatch" parameterType="java.util.List">
INSERT INTO con_cost_log
INSERT INTO qh_con_cost_log
(user_id, graphic_cost, video_cost, create_by, create_time, type, title_id)
VALUES
<foreach collection="list" item="item" separator=",">
@@ -62,14 +62,14 @@
</insert>
<update id="updateCostByTitle">
update con_doctor
update qh_con_doctor
set graphic_cost = #{graphicCost},
video_cost = #{videoCost}
where doctor_title = #{titleId}
</update>
<update id="updateCostByUserId">
update con_doctor
update qh_con_doctor
set graphic_cost = #{graphicCost},
video_cost = #{videoCost}
where id = #{userId}
@@ -80,7 +80,7 @@
resultType="com.renkang.consultation.entity.ConDoctor">
select
<include refid="ConDoctorColumns"/>
from con_doctor a
from qh_con_doctor a
<where>
and a.del_flag = 0 and a.status = 1 and a.resource_id = #{hospitalId} and a.doctor_status = '1'
</where>
@@ -89,20 +89,20 @@
<select id="selectRecommendDoctor" resultType="String">
select id
from con_doctor
from qh_con_doctor
where del_flag = 0
and status = 1 and doctor_status = '1'
order by tf_top desc,sort limit ${limit}
</select>
<select id="queryPageList" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT a.*, cdc_first.card_num, cdc_first.card_msg
FROM con_doctor a
FROM qh_con_doctor a
LEFT JOIN (
SELECT cdc.doctor_id, MIN(cdc.card_num) AS card_num, MIN(cdc.card_msg) AS card_msg
FROM con_doctor_card cdc
FROM qh_con_doc_card cdc
INNER JOIN (
SELECT doctor_id, MIN(card_num) as min_card_num
FROM con_doctor_card
FROM qh_con_doc_card
GROUP BY doctor_id
) cdc_min ON cdc.doctor_id = cdc_min.doctor_id AND cdc.del_flag = 0 AND cdc.card_num = cdc_min.min_card_num
GROUP BY cdc.doctor_id
@@ -128,7 +128,7 @@
</if>
<if test="conDoctor.departmentName != null and conDoctor.departmentName != ''">
AND a.department_id IN (SELECT id FROM con_department WHERE del_flag = '0' AND status = 1 AND id =
AND a.department_id IN (SELECT id FROM qh_con_dept WHERE del_flag = '0' AND status = 1 AND id =
#{conDoctor.departmentName})
</if>
<if test="conDoctor.doctorStatus != null and conDoctor.doctorStatus != ''">
@@ -164,8 +164,8 @@
<select id="queryBankCardByDoctorId" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT a.*, cdc.card_num, cdc.card_msg
FROM con_doctor a
LEFT JOIN con_doctor_card cdc ON a.id = cdc.doctor_id
FROM qh_con_doctor a
LEFT JOIN qh_con_doc_card cdc ON a.id = cdc.doctor_id
WHERE a.del_flag = '0' AND a.status = 1
<if test="doctorId != null and doctorId != ''">
AND a.id = #{doctorId}
@@ -224,7 +224,7 @@
(a.user_score+a.message_num) as "addNum",
(a.reply_num/a.message_num) as "replyTotal",
(a.user_score/a.user_score_num) as "totalJudgment"
from con_doctor a
from qh_con_doctor a
<where>
and a.del_flag = 0 and a.status = 1 and a.doctor_status = '1'
<if test="hospitalId != null and hospitalId != ''">
@@ -264,7 +264,7 @@
<select id="selectDictNuMBySickIds" resultType="String">
select count(1) from con_doctor
select count(1) from qh_con_doctor
where del_flag = 0 and status = 1 and is_accept = '1' and doctor_status = '1'
<if test="goodAtSickness != null">
AND
@@ -276,7 +276,7 @@
<select id="getCostLogByType" resultType="com.renkang.consultation.entity.ConCostLog">
select * from con_cost_log where type = #{type}
select * from qh_con_cost_log where type = #{type}
<if test="userId != '' and userId != null">
and user_id = #{userId}
</if>
@@ -293,7 +293,7 @@
SUM(CASE WHEN content_status = 3 THEN 1 ELSE 0 END) AS ongoing,
SUM(CASE WHEN content_type = 2 THEN 1 ELSE 0 END) AS audioVideo,
SUM(CASE WHEN content_type = 1 THEN 1 ELSE 0 END) AS graphic
FROM con_session
FROM qh_con_session
WHERE 1=1
and (tf_reply = 1 or user_tf_reply = 1)
and to_account IN
@@ -312,7 +312,7 @@
<select id="getFreeDoctor" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT * FROM con_doctor
SELECT * FROM qh_con_doctor
<where>
<if test="isAdd != null and isAdd">
AND (resource_id = '' OR resource_id IS NULL)
@@ -322,13 +322,13 @@
</select>
<select id="selectListByQuery" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT a.*, cdc_first.card_num, cdc_first.card_msg
FROM con_doctor a
FROM qh_con_doctor a
LEFT JOIN (
SELECT cdc.doctor_id, MIN(cdc.card_num) AS card_num, MIN(cdc.card_msg) AS card_msg
FROM con_doctor_card cdc
FROM qh_con_doc_card cdc
INNER JOIN (
SELECT doctor_id, MIN(card_num) as min_card_num
FROM con_doctor_card
FROM qh_con_doc_card
GROUP BY doctor_id
) cdc_min ON cdc.doctor_id = cdc_min.doctor_id AND cdc.card_num = cdc_min.min_card_num
GROUP BY cdc.doctor_id
@@ -354,7 +354,7 @@
</if>
<if test="conDoctor.departmentName != null and conDoctor.departmentName != ''">
AND a.department_id IN (SELECT id FROM con_department WHERE del_flag = '0' AND status = 1 AND id =
AND a.department_id IN (SELECT id FROM qh_con_dept WHERE del_flag = '0' AND status = 1 AND id =
#{conDoctor.departmentName})
</if>
<if test="conDoctor.doctorStatus != null and conDoctor.doctorStatus != ''">
@@ -384,14 +384,14 @@
order by a.create_time desc
</select>
<select id="selectByHospitalIds" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT * FROM con_doctor
SELECT * FROM qh_con_doctor
WHERE del_flag = '0' AND status = '1' AND hospital_id IN
<foreach item="item" index="index" collection="hospitalIds" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectDoctorByIds" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT * FROM con_doctor
SELECT * FROM qh_con_doctor
WHERE del_flag = '0' AND status = '1' AND id IN
<foreach item="item" index="index" collection="doctorIds" open="(" separator="," close=")">
#{item}
@@ -399,13 +399,13 @@
</select>
<select id="selectListByIds" resultType="com.renkang.consultation.entity.ConDoctor">
select * from con_doctor where id in
select * from qh_con_doctor where id in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectDoctorByResourceId" resultType="com.renkang.consultation.entity.ConDoctor">
select * from con_doctor where resource_id = #{resourceId} and del_flag = '0' and status = '1'
select * from qh_con_doctor where resource_id = #{resourceId} and del_flag = '0' and status = '1'
</select>
@@ -461,7 +461,7 @@
(a.user_score+a.message_num) as "addNum",
(a.reply_num/a.message_num) as "replyTotal",
(a.user_score/a.user_score_num) as "totalJudgment"
from con_doctor a
from qh_con_doctor a
<where>
and a.del_flag = 0 and a.status = 1 and a.doctor_status = '1'
<if test="departmentId != null and goodAtSickness == null">
@@ -503,12 +503,12 @@
<select id="selectConDoctorSatisfyQhByDoctorIdNew" resultType="com.renkang.consultation.entity.ConDoctorSatisfy">
select
*
from con_doctor_satisfy
from qh_con_doc_satisfy
where id = #{id}
</select>
<insert id="insertConDoctorSatisfyQhByDoctorNew">
INSERT INTO con_doctor_satisfy
INSERT INTO qh_con_doc_satisfy
(id)
VALUES (#{id})
</insert>
@@ -516,7 +516,7 @@
<select id="selectRecommendDoctorNewAnother" resultType="com.renkang.consultation.entity.ConDoctor">
select *
from con_doctor
from qh_con_doctor
where del_flag = '0'
and status = 1 and doctor_status = '1' and type = 1
order by tf_recommend desc,
@@ -525,7 +525,7 @@
<select id="selectDoctorNoExist" resultType="String">
select count(1)
from con_doctor
from qh_con_doctor
where del_flag = 0
and doctor_no = #{doctorNo}
<if test="doctorId != null and doctorId != ''">
@@ -533,7 +533,7 @@
</if>
</select>
<select id="selectDoctorInfoByIds" resultType="com.renkang.consultation.entity.ConDoctorDO">
SELECT * FROM con_doctor
SELECT * FROM qh_con_doctor
WHERE status = '1'
AND del_flag = '0'
<if test="doctorIds != null and doctorIds.size() > 0">
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.renkang.consultation.mapper.ConDoctorSchedulingDateMapper">
<insert id="insertBatchSomeColumn" parameterType="java.util.List">
INSERT INTO con_doctor_scheduling_date (id, user_id, scheduling_date, type, scheduling_num, week,
INSERT INTO qh_con_doc_schd_dt (id, user_id, scheduling_date, type, scheduling_num, week,
ready_scheduling_num) VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id},#{item.userId}, #{item.schedulingDate}, #{item.type}, #{item.schedulingNum}, #{item.week},
@@ -10,7 +10,7 @@
</foreach>
</insert>
<insert id="batchInsert" parameterType="java.util.List" >
INSERT INTO con_doctor_scheduling_date (user_id, scheduling_date, create_time, week, id, type, scheduling_num) VALUES
INSERT INTO qh_con_doc_schd_dt (user_id, scheduling_date, create_time, week, id, type, scheduling_num) VALUES
<foreach collection="list" item="item" index="index" separator="," >
(#{item.userId}, #{item.schedulingDate}, #{item.createTime}, #{item.week}, #{item.id}, #{item.type}, #{item.schedulingNum})
</foreach>
@@ -19,7 +19,7 @@
<select id="queryPageList" resultType="com.renkang.consultation.entity.ConDoctorSchedulingDate">
select csd.*
from con_doctor_scheduling_date
from qh_con_doc_schd_dt
<where>
<if test="conDoctorSchedulingDate.userId != null and conDoctorSchedulingDate.userId != ''">
and user_id = #{userId}
@@ -3,7 +3,7 @@
<mapper namespace="com.renkang.consultation.mapper.ConDoctorSchedulingMapper">
<update id="updateBatchById" parameterType="java.util.List">
<foreach collection="list" item="item" separator="">
UPDATE con_doctor_scheduling
UPDATE qh_con_doc_schd
SET
week = #{item.week},
"TYPE" = #{item.type},
@@ -27,7 +27,7 @@
resultType="com.renkang.consultation.entity.ConEvaluateDO">
select
<include refid="ConEvaluateColumns"/>
from con_evaluate a
from qh_con_evaluate a
<where>
and a.del_flag = '0'
<if test="expert != null and expert != ''">
@@ -41,7 +41,7 @@
</select>
<select id="queryPageList" resultType="com.renkang.consultation.entity.ConEvaluate">
SELECT cn.*
FROM con_evaluate cn
FROM qh_con_evaluate cn
<where>
cn.del_flag = 0
<if test="conEvaluate.sessionId != null and conEvaluate.sessionId != ''">
@@ -81,7 +81,7 @@
order by cn.create_time desc
</select>
<select id="selectListByDoctorIds" resultType="com.renkang.consultation.entity.ConEvaluate">
select * from con_evaluate where del_flag = 0 and expert in
select * from qh_con_evaluate where del_flag = 0 and expert in
<foreach collection="doctorIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
@@ -11,16 +11,16 @@
weight,
family_relation as "familyRelation",
birthday
from con_family_members
from qh_con_fammem
where status = 1 and del_flag = 0 and group_id = #{userId}
order by create_time desc
</select>
<select id="selectFamilyNum" parameterType="list" resultType="com.renkang.consultation.vo.ConFamilyNumVO">
SELECT group_id, COUNT(*) as count
FROM con_family_members
FROM qh_con_fammem
WHERE group_id IN (
SELECT DISTINCT group_id
FROM con_family_members
FROM qh_con_fammem
WHERE id IN
<foreach item="item" index="index" collection="familyIds" open="(" separator="," close=")">
#{item}
@@ -31,7 +31,7 @@
</select>
<select id="selectFamilyGroupId" parameterType="list" resultType="com.renkang.consultation.vo.ConFamilyNumVO">
SELECT id,group_id
FROM con_family_members
FROM qh_con_fammem
WHERE id IN
<foreach item="item" index="index" collection="familyIds" open="(" separator="," close=")">
#{item}
@@ -41,12 +41,12 @@
<select id="selectFamilyUserId" resultType="com.renkang.consultation.vo.ConFamilyNumVO">
SELECT id,group_id
FROM con_family_members
FROM qh_con_fammem
WHERE group_id = #{userId} and status = 1 and del_flag = 0 and family_relation = 1
</select>
<select id="selectConFamilyMembersByUserIds" resultType="com.renkang.consultation.entity.ConFamilyMembers">
SELECT * FROM con_family_members WHERE status = '1' and del_flag = '0' and family_relation = 1 and group_id in
SELECT * FROM qh_con_fammem WHERE status = '1' and del_flag = '0' and family_relation = 1 and group_id in
<foreach item="item" index="index" collection="userIds" open="(" separator="," close=")">
#{item}
</foreach>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.renkang.consultation.mapper.ConHealthInfoMapper">
<select id="getAllHealthInfo" resultType="com.renkang.consultation.entity.ConHealthInfo">
select chi.* from con_health_info chi
select chi.* from qh_con_health chi
<where>
chi.status = 1 and chi.del_flag = 0
</where>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.renkang.consultation.mapper.ConHelperMapper">
<select id="queryPageList" resultType="com.renkang.consultation.entity.ConHelper">
select ch.* from con_helper ch
select ch.* from qh_con_helper ch
<where>
ch.del_flag = 0
<if test="conHelper.userName != null and conHelper.userName != ''">
@@ -28,7 +28,7 @@
order by ch.create_time desc
</select>
<select id="selectListByIds" resultType="com.renkang.consultation.entity.ConHelper">
select * from con_helper where id in
select * from qh_con_helper where id in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
@@ -5,7 +5,7 @@
<select id="selectConHelperRestList" resultType="com.renkang.consultation.entity.ConHelperRest">
select
*
from con_helper_rest
from qh_con_helper_rest
where del_flag = 0
<if test="id != null and id != ''">
AND id != #{id}
@@ -15,7 +15,7 @@
<select id="selectHelperRestInTime" resultType="com.renkang.consultation.entity.ConHelperRest">
SELECT *
FROM con_helper_rest
FROM qh_con_helper_rest
WHERE del_flag = 0
and ((start_time &lt;= end_time AND #{currentTime} &gt;= start_time AND #{currentTime} &lt;= end_time)
OR
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.renkang.consultation.mapper.ConHelperSchedulingHistoryMapper">
<select id="queryPageList" resultType="com.renkang.consultation.entity.ConHelperSchedulingHistory">
select "time" from con_helper_scheduling_history
select "time" from qh_con_helper_schd_his
<where>
<if test="dto.startTime != null and dto.startTime!='' and dto.endTime != null and dto.endTime != ''">
and "time" &gt;= #{dto.startTime} and "time" &lt;= #{dto.endTime}
@@ -14,7 +14,7 @@
</where>
</select>
<select id="pageByScheduleTime" resultType="java.lang.String">
SELECT TO_CHAR("time", 'YYYY-MM-DD') AS scheduleTime FROM con_helper_scheduling_history
SELECT TO_CHAR("time", 'YYYY-MM-DD') AS scheduleTime FROM qh_con_helper_schd_his
<where>
<!-- 日期范围条件 -->
<if test="dto.startTime != null and dto.startTime != ''">
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.renkang.consultation.mapper.ConHelperSchedulingMapper">
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO con_helper_scheduling (id, week, dates, start_online_time, end_online_time, helper_name, helper_id,
INSERT INTO qh_con_helper_schd (id, week, dates, start_online_time, end_online_time, helper_name, helper_id,
type, user_id, user_name, status, del_flag, create_by, create_time, update_by, update_time, memo)
VALUES
<foreach collection="list" item="item" separator=",">
@@ -3,7 +3,7 @@
<mapper namespace="com.renkang.consultation.mapper.ConKnowledgeCategoryMapper">
<select id="selectListByKnowIdList" resultType="com.renkang.consultation.entity.ConKnowledgeCategory">
SELECT *
FROM con_knowledge_category
FROM qh_con_know_cate
WHERE id IN
<foreach collection="knowIdList" item="knowId" open="(" separator="," close=")">
#{knowId}

Some files were not shown because too many files have changed in this diff Show More