Compare commits
33
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
177e0e4d97 | ||
|
|
f74a2322e4 | ||
|
|
822cdbf539 | ||
|
|
d75f21c17e | ||
|
|
ffee8611fe | ||
|
|
0e8f5e7b14 | ||
|
|
115407026f | ||
|
|
9f545952e4 | ||
|
|
1988e031e5 | ||
|
|
44b0f6ca2b | ||
|
|
ae866f0791 | ||
|
|
4610ac4737 | ||
|
|
6d6920a2b3 | ||
|
|
c7041fa69e | ||
|
|
370f5e0089 | ||
|
|
a47f27967e | ||
|
|
6c08f5f141 | ||
|
|
690f688c6a | ||
|
|
63cc815022 | ||
|
|
8f00d07377 | ||
|
|
2e90ec71cc | ||
|
|
a43806c4e9 | ||
|
|
237df3ef38 | ||
|
|
bd9fece99c | ||
|
|
47cebd3392 | ||
|
|
61e049cc47 | ||
|
|
ad03177e50 | ||
|
|
3db3301fe3 | ||
|
|
fa9a186a5e | ||
|
|
3cea926a1e | ||
|
|
fe82afd934 | ||
|
|
96242b5c00 | ||
|
|
291f6a4eaa |
@@ -1,100 +0,0 @@
|
||||
DROP TABLE "20250917_CARE";
|
||||
DROP TABLE "ARC_ASSESS_VALUE";
|
||||
DROP TABLE "ARC_FOOD_ATLAS";
|
||||
DROP TABLE "ARC_QUESTIONNAIRE";
|
||||
DROP TABLE "ARC_QUESTIONNAIRE_CHILD";
|
||||
DROP TABLE "CESHI_NOTE";
|
||||
DROP TABLE "COMMON_EXPORTS_INFO_QH";
|
||||
DROP TABLE "COMMON_EXPORTS_ITEM_QH";
|
||||
DROP TABLE "COMMON_IMPORTS_DETAIL_QH";
|
||||
DROP TABLE "COMMON_IMPORTS_QH";
|
||||
DROP TABLE "CON_COST_STATISTICS";
|
||||
DROP TABLE "CON_DEPARTMENT";
|
||||
DROP TABLE "CON_DOCTOR_FOLLOW";
|
||||
DROP TABLE "CON_DOCTOR_SCHEDULING";
|
||||
DROP TABLE "CON_DOCTOR_SCHEDULING_DATE";
|
||||
DROP TABLE "CON_EVALUATE";
|
||||
DROP TABLE "CON_FAMILY_MEMBERS";
|
||||
DROP TABLE "CON_HEALTH_INFO";
|
||||
DROP TABLE "CON_HEALTH_INFO_ANSWER";
|
||||
DROP TABLE "CON_HOSPITAL_FOLLOW";
|
||||
DROP TABLE "CON_KNOWLEDGE";
|
||||
DROP TABLE "CON_KNOWLEDGE_CATEGORY";
|
||||
DROP TABLE "CON_MEDICAL_RECORDS";
|
||||
DROP TABLE "CON_SESSION_RESERVATION_DATE";
|
||||
DROP TABLE "DEMO";
|
||||
DROP TABLE "DEMO_FIELD_DEF_VAL_MAIN";
|
||||
DROP TABLE "DEMO_FIELD_DEF_VAL_SUB";
|
||||
DROP TABLE "EMERGENCY_SERIOUS_DISEASE";
|
||||
DROP TABLE "HEALTH_CLASSIFICATION";
|
||||
DROP TABLE "HEALTH_USER_EMPLOYEE_EX_QH";
|
||||
DROP TABLE "JEECG_MONTHLY_GROWTH_ANALYSIS";
|
||||
DROP TABLE "JEECG_ORDER_CUSTOMER";
|
||||
DROP TABLE "JEECG_ORDER_MAIN";
|
||||
DROP TABLE "JEECG_ORDER_TICKET";
|
||||
DROP TABLE "JEECG_PROJECT_NATURE_INCOME";
|
||||
DROP TABLE "JIMU_DICT";
|
||||
DROP TABLE "JIMU_DICT_ITEM";
|
||||
DROP TABLE "JIMU_REPORT";
|
||||
DROP TABLE "JIMU_REPORT_DATA_SOURCE";
|
||||
DROP TABLE "JIMU_REPORT_DB";
|
||||
DROP TABLE "JIMU_REPORT_DB_FIELD";
|
||||
DROP TABLE "JIMU_REPORT_DB_PARAM";
|
||||
DROP TABLE "JIMU_REPORT_LINK";
|
||||
DROP TABLE "JIMU_REPORT_MAP";
|
||||
DROP TABLE "JIMU_REPORT_SHARE";
|
||||
DROP TABLE "JOA_DEMO";
|
||||
DROP TABLE "LORE_CHECK_SUBJECT";
|
||||
DROP TABLE "ONL_AUTH_DATA";
|
||||
DROP TABLE "ONL_AUTH_PAGE";
|
||||
DROP TABLE "ONL_AUTH_RELATION";
|
||||
DROP TABLE "ONL_CGFORM_BUTTON";
|
||||
DROP TABLE "ONL_CGFORM_ENHANCE_JAVA";
|
||||
DROP TABLE "ONL_CGFORM_ENHANCE_JS";
|
||||
DROP TABLE "ONL_CGFORM_ENHANCE_SQL";
|
||||
DROP TABLE "ONL_CGFORM_FIELD";
|
||||
DROP TABLE "ONL_CGFORM_HEAD";
|
||||
DROP TABLE "ONL_CGFORM_INDEX";
|
||||
DROP TABLE "ONL_CGREPORT_HEAD";
|
||||
DROP TABLE "ONL_CGREPORT_ITEM";
|
||||
DROP TABLE "ONL_CGREPORT_PARAM";
|
||||
DROP TABLE "OSS_FILE";
|
||||
DROP TABLE "QRTZ_BLOB_TRIGGERS";
|
||||
DROP TABLE "QRTZ_CALENDARS";
|
||||
DROP TABLE "QRTZ_CRON_TRIGGERS";
|
||||
DROP TABLE "QRTZ_FIRED_TRIGGERS";
|
||||
DROP TABLE "QRTZ_JOB_DETAILS" CASCADE;
|
||||
DROP TABLE "QRTZ_LOCKS";
|
||||
DROP TABLE "QRTZ_PAUSED_TRIGGER_GRPS";
|
||||
DROP TABLE "QRTZ_SCHEDULER_STATE";
|
||||
DROP TABLE "QRTZ_SIMPLE_TRIGGERS";
|
||||
DROP TABLE "QRTZ_SIMPROP_TRIGGERS";
|
||||
DROP TABLE "QRTZ_TRIGGERS";
|
||||
DROP TABLE "REP_DEMO_DXTJ";
|
||||
DROP TABLE "REP_DEMO_EMPLOYEE";
|
||||
DROP TABLE "REP_DEMO_GONGSI";
|
||||
DROP TABLE "REP_DEMO_JIANPIAO";
|
||||
DROP TABLE "SYS_APP_VERSION_QH";
|
||||
DROP TABLE "SYS_DEPART_GPS_QH";
|
||||
DROP TABLE "SYS_DEPART_QH";
|
||||
DROP TABLE "SYS_LOG_QH";
|
||||
DROP TABLE "SYS_PERMISSION_20241224";
|
||||
DROP TABLE "SYS_PERMISSION_DATA_RULE_QH";
|
||||
DROP TABLE "SYS_PERMISSION_QH";
|
||||
DROP TABLE "SYS_ROLE_INDEX_QH";
|
||||
DROP TABLE "SYS_ROLE_PERMISSION_QH";
|
||||
DROP TABLE "SYS_ROLE_QH";
|
||||
DROP TABLE "SYS_USER_DEPART_CHANGE_APPLY_QH";
|
||||
DROP TABLE "SYS_USER_DEPART_QH";
|
||||
DROP TABLE "SYS_USER_QH";
|
||||
DROP TABLE "SYS_USER_ROLE_QH";
|
||||
DROP TABLE "TEST_DEMO";
|
||||
DROP TABLE "TEST_ENHANCE_SELECT";
|
||||
DROP TABLE "TEST_NOTE";
|
||||
DROP TABLE "TEST_ORDER_CUSTOMER";
|
||||
DROP TABLE "TEST_ORDER_MAIN";
|
||||
DROP TABLE "TEST_ORDER_PRODUCT";
|
||||
DROP TABLE "TEST_SHOPTYPE_TREE";
|
||||
DROP TABLE "TEST_V3_HELLO";
|
||||
DROP TABLE "TMP_REPORT_DATA_1";
|
||||
DROP TABLE "TMP_REPORT_DATA_INCOME";
|
||||
@@ -0,0 +1,10 @@
|
||||
-- QH_WAT_MONITOR_DATA 新增 EVENT_ID(事件ID)和 LOCATE_TIME(定位时间)字段
|
||||
-- 数据库:118-DM 达梦数据库,SQL 全大写规范
|
||||
ALTER TABLE "QH_WAT_MONITOR_DATA" ADD "EVENT_ID" VARCHAR(64) DEFAULT NULL;
|
||||
ALTER TABLE "QH_WAT_MONITOR_DATA" ADD "LOCATE_TIME" DATETIME DEFAULT NULL;
|
||||
|
||||
COMMENT ON COLUMN "QH_WAT_MONITOR_DATA"."EVENT_ID" IS '事件ID';
|
||||
COMMENT ON COLUMN "QH_WAT_MONITOR_DATA"."LOCATE_TIME" IS '定位时间';
|
||||
|
||||
CREATE INDEX "IDX_EVENT_ID" ON "QH_WAT_MONITOR_DATA"("EVENT_ID");
|
||||
CREATE INDEX "IDX_WATCH_NO_EVENT_ID" ON "QH_WAT_MONITOR_DATA"("WATCH_NO", "EVENT_ID");
|
||||
@@ -30,6 +30,10 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
|
||||
+2
-16
@@ -25,7 +25,6 @@ import org.springframework.core.task.TaskExecutor;
|
||||
import org.springframework.jdbc.support.JdbcTransactionManager;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.List;
|
||||
@@ -126,21 +125,8 @@ public class BatchAutoConfiguration {
|
||||
@BatchDataSource ObjectProvider<DataSource> batchDataSource,
|
||||
BatchProperties properties
|
||||
) {
|
||||
DataSource dataSourceToUse = batchDataSource.getIfAvailable(() -> dataSource);
|
||||
BatchProperties.Jdbc jdbc = properties.getJdbc();
|
||||
// 达梦数据库兼容处理:设置platform绕过构造器中的自动类型检测
|
||||
if (!StringUtils.hasText(jdbc.getPlatform())) {
|
||||
jdbc.setPlatform("dm");
|
||||
}
|
||||
// 重写afterPropertiesSet()跳过SQL脚本初始化:
|
||||
// 父类会先断言SQL文件存在再检查initializeSchema mode,导致找不到schema-dm.sql时报错
|
||||
// Batch元数据表已通过数据迁移创建,无需自动建表
|
||||
return new BatchDataSourceScriptDatabaseInitializer(dataSourceToUse, jdbc) {
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
// 跳过Batch元数据表的自动建表,防止找不到schema-dm.sql文件报错
|
||||
}
|
||||
};
|
||||
return new BatchDataSourceScriptDatabaseInitializer(batchDataSource.getIfAvailable(() -> dataSource),
|
||||
properties.getJdbc());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-7
@@ -34,13 +34,6 @@ public class CustomBatchConfigurer extends BasicBatchConfigurer {
|
||||
this.taskExecutor = taskExecutor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
// 达梦数据库兼容处理:跳过Spring Batch数据库类型自动检测
|
||||
// BasicBatchConfigurer.initialize()中DatabaseType.fromProductName()无法识别"DM DBMS"产品名
|
||||
// 保持父类默认隔离级别ISOLATION_SERIALIZABLE,DM8与此兼容
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JobLauncher createJobLauncher() throws Exception {
|
||||
SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public enum AnYanApiEnum {
|
||||
/**
|
||||
* 18.查询关爱联络员信息及急救人员查询接口
|
||||
*/
|
||||
QUERY_EMPLOYEE_CARE_PERSON("/aygc-znhpt-sys/0/api/empCareEmp/findPageByIdNo", "", HttpMethod.POST),
|
||||
QUERY_EMPLOYEE_CARE_PERSON("/aygc-znhpt-sys/0/api/empCareEmp/findPage", "", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
* 19.批量更新员工关键信息接口
|
||||
|
||||
+3
@@ -1,5 +1,6 @@
|
||||
package com.renkang.anyan.model.dto;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -34,4 +35,6 @@ public class CareUserDetailsParam {
|
||||
|
||||
@Schema(title = "pageType")
|
||||
private String pageType = "plus";
|
||||
|
||||
private int year = DateUtil.thisYear();
|
||||
}
|
||||
|
||||
+13
-12
@@ -11,18 +11,19 @@
|
||||
a.icon,
|
||||
a.points,
|
||||
CASE
|
||||
WHEN a.frequency = 1 THEN
|
||||
CASE WHEN COUNT(b.id) > 0 THEN 1 ELSE 0 END
|
||||
WHEN a.frequency = 2 THEN
|
||||
CASE WHEN COUNT(CASE WHEN TRUNC(b.create_time) = TRUNC(SYSDATE) THEN 1 END) > 0 THEN 1 ELSE 0 END
|
||||
WHEN a.frequency = 3 THEN
|
||||
CASE WHEN COUNT(CASE WHEN TO_CHAR(b.create_time, 'IYYY-IW') = TO_CHAR(SYSDATE, 'IYYY-IW') THEN 1 END) > 0 THEN 1 ELSE 0 END
|
||||
WHEN a.frequency = 4 THEN
|
||||
CASE WHEN COUNT(CASE WHEN TO_CHAR(b.create_time, 'YYYY-MM') = TO_CHAR(SYSDATE, 'YYYY-MM') THEN 1 END) > 0 THEN 1 ELSE 0 END
|
||||
WHEN a.frequency = 5 THEN
|
||||
CASE WHEN COUNT(CASE WHEN TO_CHAR(b.create_time, 'Q') = TO_CHAR(SYSDATE, 'Q') AND EXTRACT(YEAR FROM b.create_time) = EXTRACT(YEAR FROM SYSDATE) THEN 1 END) > 0 THEN 1 ELSE 0 END
|
||||
WHEN a.frequency = 6 THEN
|
||||
CASE WHEN COUNT(CASE WHEN EXTRACT(YEAR FROM b.create_time) = EXTRACT(YEAR FROM SYSDATE) THEN 1 END) > 0 THEN 1 ELSE 0 END
|
||||
WHEN a.frequency = 1 THEN -- 单次
|
||||
IF(COUNT(b.id) > 0, 1, 0)
|
||||
WHEN a.frequency = 2 THEN -- 日/次
|
||||
IF(COUNT(CASE WHEN DATE(b.create_time) = CURDATE() THEN 1 END) > 0, 1, 0)
|
||||
WHEN a.frequency = 3 THEN -- 周/次
|
||||
IF(COUNT(CASE WHEN YEARWEEK(b.create_time, 1) = YEARWEEK(CURDATE(), 1) THEN 1 END) > 0, 1, 0)
|
||||
WHEN a.frequency = 4 THEN -- 月/次
|
||||
IF(COUNT(CASE WHEN DATE_FORMAT(b.create_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m') THEN 1 END) > 0, 1, 0)
|
||||
WHEN a.frequency = 5 THEN -- 季度/次
|
||||
IF(COUNT(CASE WHEN QUARTER(b.create_time) = QUARTER(CURDATE()) AND YEAR(b.create_time) = YEAR(CURDATE()) THEN 1
|
||||
END) > 0, 1, 0)
|
||||
WHEN a.frequency = 6 THEN -- 年/次
|
||||
IF(COUNT(CASE WHEN YEAR(b.create_time) = YEAR(CURDATE()) THEN 1 END) > 0, 1, 0)
|
||||
ELSE 0
|
||||
END AS clockInStatus
|
||||
FROM
|
||||
|
||||
+1
-1
@@ -459,7 +459,7 @@ public class UserPointsServiceImpl extends ServiceImpl<UserPointsMapper, UserPoi
|
||||
List<UserPointsDetails> details = userPointsDetailsMapper.selectList(new LambdaQueryWrapper<UserPointsDetails>()
|
||||
.eq(UserPointsDetails::getUserId, userId)
|
||||
.eq(UserPointsDetails::getChangeType, HealthBankConstants.CHANGE_TYPE_ADD)
|
||||
.apply("TO_CHAR(create_time, 'YYYY-MM-DD') = {0}", DateUtil.today())
|
||||
.apply("DATE_FORMAT(create_time, '%Y-%m-%d') = {0}", DateUtil.today())
|
||||
);
|
||||
double sum = details.stream().map(UserPointsDetails::getPoints).mapToDouble(BigDecimal::doubleValue).sum();
|
||||
userPoints.setLatestAddDaySum(BigDecimal.valueOf(sum).add(pointsRule.getPoints()));
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.consultation.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.renkang.consultation.entity.ConPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -11,6 +12,10 @@ public class AccountDTO extends ConPage {
|
||||
@Schema(title = "专家姓名")
|
||||
private String doctorName;
|
||||
|
||||
public void setDoctorName(String doctorName) {
|
||||
this.doctorName = doctorName != null ? HtmlUtil.unescape(doctorName) : null;
|
||||
}
|
||||
|
||||
@Schema(title = "医院选择")
|
||||
private String hospitalName;
|
||||
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.consultation.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.renkang.consultation.entity.ConPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -10,6 +11,10 @@ public class ConDoctorDTO extends ConPage {
|
||||
|
||||
@Schema(title = "专家姓名")
|
||||
private String doctorName;
|
||||
|
||||
public void setDoctorName(String doctorName) {
|
||||
this.doctorName = doctorName != null ? HtmlUtil.unescape(doctorName) : null;
|
||||
}
|
||||
@Schema(title = "专家编号")
|
||||
private String doctorNo;
|
||||
|
||||
|
||||
+8
@@ -1,5 +1,6 @@
|
||||
package com.renkang.consultation.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.renkang.consultation.entity.ConPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -17,6 +18,9 @@ public class ConEvaluateDTO extends ConPage {
|
||||
|
||||
@Schema(title = "咨询人")
|
||||
private String userName;
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName != null ? HtmlUtil.unescape(userName) : null;
|
||||
}
|
||||
|
||||
@Schema(title = "二级单位id")
|
||||
private String sysOrgSecondId;
|
||||
@@ -27,6 +31,10 @@ public class ConEvaluateDTO extends ConPage {
|
||||
@Schema(title = "咨询专家")
|
||||
private String expertName;
|
||||
|
||||
public void setExpertName(String expertName) {
|
||||
this.expertName = expertName != null ? HtmlUtil.unescape(expertName) : null;
|
||||
}
|
||||
|
||||
@Schema(title = "专家医院")
|
||||
private String expertHospital;
|
||||
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.consultation.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.renkang.consultation.entity.ConPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -10,6 +11,10 @@ public class ConHealthInfoAnswerDTO extends ConPage {
|
||||
@Schema(title = "员工姓名")
|
||||
private String fromName;
|
||||
|
||||
public void setFromName(String fromName) {
|
||||
this.fromName = fromName != null ? HtmlUtil.unescape(fromName) : null;
|
||||
}
|
||||
|
||||
@Schema(title = "手机号")
|
||||
private String phone;
|
||||
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.consultation.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.renkang.consultation.entity.ConPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -11,6 +12,10 @@ public class ConHelperDTO extends ConPage {
|
||||
@Schema(title = "全科医生姓名")
|
||||
private String userName;
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName != null ? HtmlUtil.unescape(userName) : null;
|
||||
}
|
||||
|
||||
@Schema(title = "状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
+9
@@ -1,5 +1,6 @@
|
||||
package com.renkang.consultation.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.renkang.consultation.entity.ConPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -17,6 +18,10 @@ public class ConSessionDTO extends ConPage {
|
||||
@Schema(title = "员工姓名")
|
||||
private String fromName;
|
||||
|
||||
public void setFromName(String fromName) {
|
||||
this.fromName = fromName != null ? HtmlUtil.unescape(fromName) : null;
|
||||
}
|
||||
|
||||
@Schema(title = "员工id")
|
||||
private String fromAccount;
|
||||
|
||||
@@ -26,6 +31,10 @@ public class ConSessionDTO extends ConPage {
|
||||
@Schema(title = "专家姓名")
|
||||
private String doctorName;
|
||||
|
||||
public void setDoctorName(String doctorName) {
|
||||
this.doctorName = doctorName != null ? HtmlUtil.unescape(doctorName) : null;
|
||||
}
|
||||
|
||||
@Schema(title = "咨询状态(0待确认 1接收预约 2拒绝预约 3已过期 4已取消 5咨询中 6专家咨询结束 7员工咨询结束 8超时自动结束)")
|
||||
private String contentStatus;
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public class ConSessionView implements Serializable {
|
||||
@TableField(value = "medical_records_id")
|
||||
@Schema(description = "")
|
||||
private String medicalRecordsId;
|
||||
@TableField(value = "status")
|
||||
@TableField(value = "`status`")
|
||||
@Schema(description = "")
|
||||
private Integer status;
|
||||
@TableField(value = "del_flag")
|
||||
|
||||
+6
@@ -480,4 +480,10 @@ public class ConSessionApiController {
|
||||
return conSessionApiService.insertUserAndHelperSessionNew();
|
||||
}
|
||||
|
||||
@Operation(summary = "超时关闭视频咨询", description = "超时关闭视频咨询")
|
||||
@GetMapping("/endVideoSession")
|
||||
public Result<String> endVideoSession() {
|
||||
return Result.ok(conSessionApiService.endVideoSession());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -115,4 +115,6 @@ public interface ConSessionApiService {
|
||||
|
||||
UserSessionCount countForUser();
|
||||
|
||||
String endVideoSession();
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -2114,4 +2114,8 @@ public class ConSessionApiServiceImpl implements ConSessionApiService {
|
||||
return conSessionMapper.selectCount(wrapper).intValue();
|
||||
}
|
||||
|
||||
public String endVideoSession() {
|
||||
return conSessionMapper.endVideoSession();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBase
|
||||
@Select("SELECT * FROM con_department 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 GROUP_CONCAT(id) FROM con_department 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")
|
||||
|
||||
+4
-4
@@ -117,7 +117,7 @@ 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 con_sicks where status = 1 and del_flag = 0 and FIND_IN_SET(id,#{sickIds})")
|
||||
List<Map<String, String>> selectSickName(String sickIds);
|
||||
|
||||
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0'")
|
||||
@@ -136,11 +136,11 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
@Update("update 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 con_doctor where del_flag = '0' AND status = 1 and doctor_status != 3 AND FIND_IN_SET(#{sickId},good_at_sickness)")
|
||||
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 con_doctor where del_flag = '0' AND status = 1 AND doctor_status != 3 AND FIND_IN_SET(department_id,#{departmentId})")
|
||||
int selectDoctorNumByDepartmentId(String departmentId);
|
||||
|
||||
List<ConDoctor> selectListByQuery(@Param("conDoctor") ConDoctor conDoctor);
|
||||
@@ -170,7 +170,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
|
||||
|
||||
|
||||
@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 con_doctor where del_flag = '0' AND status = 1 AND FIND_IN_SET(department_id,#{departmentId}) and resource_id = #{resourceId} and doctor_status != 3")
|
||||
int selectDoctorNumByDepartmentIdAndResourceId(String departmentId,String resourceId);
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ 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 con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= DATE_FORMAT(SYSDATE(),'%Y-%m-%d') 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}")
|
||||
@@ -34,11 +34,11 @@ public interface ConDoctorSchedulingDateMapper extends BaseMapper<ConDoctorSched
|
||||
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 con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= DATE_FORMAT(#{schedulingDate},'%Y-%m-%d')")
|
||||
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 con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= DATE(NOW()) and week = #{week}")
|
||||
public List<ConDoctorSchedulingDateListDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public interface ConDoctorSchedulingDateMapper extends BaseMapper<ConDoctorSched
|
||||
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 con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date = DATE_FORMAT(#{schedulingDate},'%Y-%m-%d') and type = #{type}")
|
||||
public List<ConDoctorSchedulingDateListDO> selectDoctorScheduleDate(String doctorId, Date schedulingDate, String type);
|
||||
|
||||
Boolean insertBatchSomeColumn(@Param("list") List<ConDoctorSchedulingDate> list);
|
||||
|
||||
+2
-2
@@ -56,8 +56,8 @@ public interface ConResourceMapper extends BaseMapper<ConResource> {
|
||||
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)" +
|
||||
"and c.del_flag = 0 and c.status = 1 ORDER BY c.tf_top DESC,c.sort")
|
||||
@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)" +
|
||||
"and c.del_flag = 0 and c.`status` = 1 ORDER BY c.tf_top DESC,c.sort")
|
||||
public List<ConResourceDO> selectHospitalListVersionTwo();
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ public interface ConServiceMapper extends BaseMapper<ConService> {
|
||||
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 con_service where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 and DATE_FORMAT(#{scheduleDate}, '%Y-%m-%d') >= DATE_FORMAT(start_day, '%Y-%m-%d') and DATE_FORMAT(#{scheduleDate}, '%Y-%m-%d') <= DATE_FORMAT(end_day, '%Y-%m-%d')")
|
||||
int selectConServiceByDoctrIdExist(String doctorId, Date scheduleDate);
|
||||
|
||||
}
|
||||
|
||||
+19
-10
@@ -114,24 +114,24 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
|
||||
@Select("select * from 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 con_session set reply_time = NOW() where im_id = #{imId}")
|
||||
int updateSessionReplyTime(String imId);
|
||||
|
||||
|
||||
@Select("select * from 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 con_session set content_status = 4 where TIMESTAMPDIFF(HOUR,reply_time,now()) >= 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 con_session set content_status = 8 where TIMESTAMPDIFF(HOUR,create_time,now()) >= 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 con_session set content_status = 8 where DATE(NOW()) > 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 con_session set content_status = 4 where DATE(NOW()) > 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")
|
||||
@@ -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 con_session set content_status = 5 where session_type != 1 and content_status = 3 and timestampdiff(HOUR,reply_time,NOW()) >= #{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 con_session set content_status = 4 where session_type = 1 and content_type = 1 and content_status = 3 and timestampdiff(HOUR,reply_time,NOW()) >= #{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 con_session set content_status = 8 where content_type != 2 and timestampdiff(HOUR,create_time,NOW()) >= #{expireHour} and tf_reply = 0")
|
||||
int expireMeaaage(String expireHour);
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
|
||||
ConSession selectConSessionByImIdOnlyBackUp(String imId);
|
||||
|
||||
|
||||
@Update("update con_session_qh set reply_time = SYSDATE where im_id = #{imId}")
|
||||
@Update("update con_session_qh set reply_time = NOW() where im_id = #{imId}")
|
||||
int updateSessionReplyTimeBackUp(String imId);
|
||||
|
||||
@Update("update con_session_qh set tf_reply = 1 where id = #{id}")
|
||||
@@ -282,7 +282,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 con_session where session_type = 1 and content_type = 1 and content_status = 3 and timestampdiff(HOUR,reply_time,NOW()) >= #{expireHour} and tf_reply = 1")
|
||||
List<ConSession> selectEndSession(String expireHour);
|
||||
|
||||
|
||||
@@ -294,4 +294,13 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
|
||||
@Param("doctorjob")String doctorjob,
|
||||
@Param("contentType")String contentType,
|
||||
@Param("toAccount")String toAccount);
|
||||
|
||||
/**
|
||||
* 音视频咨询过期处理:预约日期已过的视频咨询,有通话记录则改为待评价,无通话记录则改为取消
|
||||
* content_status: 4=待评价,6=取消
|
||||
*/
|
||||
@Update("UPDATE con_session SET content_status = CASE WHEN session_time IS NOT NULL THEN 4 ELSE 6 END " +
|
||||
"WHERE content_type = 2 AND CURDATE() > session_date " +
|
||||
"AND content_status NOT IN (4, 5, 6, 7, 8) AND del_flag = 0 AND status = 1")
|
||||
String endVideoSession();
|
||||
}
|
||||
|
||||
+4
-4
@@ -55,11 +55,11 @@ public interface ConSicksMapper extends BaseMapper<ConSicks> {
|
||||
|
||||
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 con_sicks where del_flag = 0 and status = 1 and FIND_IN_SET(department_id,#{departmentId})")
|
||||
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 con_sicks where del_flag = 0 and status = 1 and FIND_IN_SET(department_id,#{departmentId})")
|
||||
List<String> selectSickNumByDepartmentByDepartment(String departmentId);
|
||||
|
||||
|
||||
@@ -71,11 +71,11 @@ 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 con_sicks where del_flag = 0 and status = 1 and FIND_IN_SET(department_id,#{departmentId}) 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 GROUP_CONCAT(id) from con_sicks where department_id = #{departmentId}")
|
||||
String selectSickListByDepartmentIdAnother(String departmentId);
|
||||
|
||||
@Update("update con_sicks set department_id = #{departmentOne} where department_id = #{departmentTwo}")
|
||||
|
||||
+6
-6
@@ -73,7 +73,7 @@
|
||||
and cct.operate_type = '5'
|
||||
</if>
|
||||
<if test='date != "1"'>
|
||||
and TO_CHAR(cct.income_time, 'YYYY-MM')=#{date}
|
||||
and DATE_FORMAT(cct.income_time, '%Y-%m')=#{date}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and cct.user_id = #{userId}
|
||||
@@ -87,8 +87,8 @@
|
||||
FROM con_session cs
|
||||
where cs.content_type is not null
|
||||
and cs.content_type <> '4'
|
||||
and TO_CHAR(cs.create_time, 'YYYY-MM') = #{date}
|
||||
group by cs.content_type, TO_CHAR(cs.create_time, 'YYYY-MM')
|
||||
and DATE_FORMAT(cs.create_time, '%Y-%m') = #{date}
|
||||
group by cs.content_type, DATE_FORMAT(cs.create_time, '%Y-%m')
|
||||
</select>
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
and cs.content_type <> '4'
|
||||
and cs.to_account = #{userId} and session_type = 1
|
||||
<if test="date != null and date != ''">
|
||||
and TO_CHAR(cs.create_time, 'YYYY-MM') = #{date}
|
||||
and DATE_FORMAT(cs.create_time, '%Y-%m') = #{date}
|
||||
</if>
|
||||
group by cs.content_type, session_status
|
||||
</select>
|
||||
@@ -108,7 +108,7 @@
|
||||
from con_cost_statistics 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
|
||||
and ccs.income_time between DATE_FORMAT(#{conCostStatistics.startDate}, '%Y-%m-%d 00:00:00') and DATE_FORMAT(#{conCostStatistics.endDate}, '%Y-%m-%d 23:59:59')
|
||||
</if>
|
||||
<if test='conCostStatistics.operateType != null and conCostStatistics.operateType != "" and conCostStatistics.operateType == "0"'>
|
||||
and ccs.operate_type != '5'
|
||||
@@ -172,7 +172,7 @@
|
||||
and content_status > 3
|
||||
</if>
|
||||
<if test="date != null and date != ''">
|
||||
and TO_CHAR(create_time, 'YYYY-MM') = #{date}
|
||||
and DATE_FORMAT(create_time, '%Y-%m') = #{date}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByDoctorIds" resultType="com.renkang.consultation.entity.ConCostStatistics">
|
||||
|
||||
+20
-11
@@ -74,7 +74,7 @@
|
||||
where status = 1
|
||||
and del_flag = 0
|
||||
<if test="officeparid == null">
|
||||
and NVL(officeparid,'') = ''
|
||||
and ifnull(officeparid,'') = ''
|
||||
</if>
|
||||
<if test="officeparid != null">
|
||||
and officeparid = #{officeparid}
|
||||
@@ -97,16 +97,25 @@
|
||||
order by tf_top desc, sort
|
||||
</select>
|
||||
<select id="selectChildAll" resultType="com.renkang.consultation.entity.ConDepartment">
|
||||
SELECT * FROM con_department
|
||||
WHERE id != #{departmentId}
|
||||
START WITH id = #{departmentId}
|
||||
CONNECT BY PRIOR id = officeparid
|
||||
ORDER BY LEVEL, id
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT d1.*,
|
||||
@pv := CONCAT(@pv, ',', d1.id) AS path
|
||||
FROM
|
||||
con_department AS d1
|
||||
JOIN
|
||||
(SELECT @pv := #{departmentId}) AS initial
|
||||
WHERE
|
||||
FIND_IN_SET(d1.officeparid
|
||||
, @pv)
|
||||
> 0
|
||||
) AS subquery
|
||||
ORDER BY LENGTH(path)
|
||||
</select>
|
||||
|
||||
<select id="getOneDepartList" resultType="com.renkang.consultation.entity.ConDepartment">
|
||||
SELECT *
|
||||
FROM con_department
|
||||
FROM `con_department`
|
||||
WHERE office_level = 1
|
||||
and del_flag = 0
|
||||
and status = 1
|
||||
@@ -114,7 +123,7 @@
|
||||
|
||||
<select id="getTwoDepartList" resultType="com.renkang.consultation.entity.ConDepartment">
|
||||
SELECT *
|
||||
FROM con_department
|
||||
FROM `con_department`
|
||||
WHERE office_level = 2
|
||||
and del_flag = 0
|
||||
and status = 1
|
||||
@@ -124,10 +133,10 @@
|
||||
SELECT *
|
||||
from 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 `con_department` 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
|
||||
ORDER BY doctor_status DESC;
|
||||
</select>
|
||||
|
||||
<select id="selectChildById" resultType="com.renkang.consultation.entity.ConDepartment">
|
||||
@@ -165,7 +174,7 @@
|
||||
(case when (select count(1) from con_department cd2 where cd2.officeparid = cdd.id)>0 then 0 else 1 end) as isLeaf,
|
||||
officeparid as parentId
|
||||
from con_department cdd
|
||||
where CASE WHEN (officeparid IS NULL OR officeparid = '') THEN '0' ELSE officeparid END = #{pid}
|
||||
where if(officeparid is null or officeparid = '','0',officeparid) = #{pid}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+7
-7
@@ -2,31 +2,31 @@
|
||||
<!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 con_helper_scheduling_history
|
||||
<where>
|
||||
<if test="dto.startTime != null and dto.startTime!='' and dto.endTime != null and dto.endTime != ''">
|
||||
and "time" >= #{dto.startTime} and "time" <= #{dto.endTime}
|
||||
and `time` >= #{dto.startTime} and `time` <= #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.week != null and dto.week!=''">
|
||||
and week = #{dto.week}
|
||||
</if>
|
||||
and status = 1 and del_flag = 0 GROUP BY "time" order by "time" desc
|
||||
and status = 1 and del_flag = 0 GROUP BY `time` order by `time` desc
|
||||
</where>
|
||||
</select>
|
||||
<select id="pageByScheduleTime" resultType="java.lang.String">
|
||||
SELECT TO_CHAR("time", 'YYYY-MM-DD') AS scheduleTime FROM con_helper_scheduling_history
|
||||
SELECT DATE_FORMAT(time, '%Y-%m-%d') AS `time` FROM con_helper_scheduling_history
|
||||
<where>
|
||||
<!-- 日期范围条件 -->
|
||||
<if test="dto.startTime != null and dto.startTime != ''">
|
||||
AND "time" >= TO_DATE(#{dto.startTime}, 'YYYY-MM-DD HH24:MI:SS')
|
||||
AND `time` >= DATE_FORMAT(#{dto.startTime}, '%Y-%m-%d 00:00:00')
|
||||
</if>
|
||||
<if test="dto.endTime != null and dto.endTime != ''">
|
||||
AND "time" <= TO_DATE(#{dto.endTime}, 'YYYY-MM-DD HH24:MI:SS')
|
||||
AND `time` <= DATE_FORMAT(#{dto.endTime}, '%Y-%m-%d 23:59:59')
|
||||
</if>
|
||||
<if test="dto.week != null and dto.week != ''">
|
||||
and week = #{dto.week}
|
||||
</if>
|
||||
and status = 1 and del_flag = 0 GROUP BY "time" order by "time" desc
|
||||
and status = 1 and del_flag = 0 GROUP BY `time` order by `time` desc
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
AND cr.address LIKE CONCAT('%', #{conResource.province}, '%')
|
||||
</if>
|
||||
<if test="conResource.level != null and conResource.level != ''">
|
||||
AND cr."level" = #{conResource.level}
|
||||
AND cr.`level` = #{conResource.level}
|
||||
</if>
|
||||
<if test="conResource.status != null and conResource.status != ''">
|
||||
AND cr.status = #{conResource.status}
|
||||
@@ -42,7 +42,7 @@
|
||||
</select>
|
||||
<select id="selectHostitalList" resultType="com.renkang.consultation.vo.ConsultResourceVO">
|
||||
select id,
|
||||
resource_name as name
|
||||
`resource_name` as `name`
|
||||
from con_resource
|
||||
where del_flag = 0
|
||||
order by sort
|
||||
|
||||
+4
-4
@@ -542,8 +542,8 @@
|
||||
<foreach item="id" collection="doctorIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND EXTRACT(YEAR FROM session_date) = EXTRACT(YEAR FROM SYSDATE)
|
||||
AND EXTRACT(MONTH FROM session_date) = EXTRACT(MONTH FROM SYSDATE)
|
||||
AND YEAR(session_date) = YEAR(CURRENT_DATE())
|
||||
AND MONTH(session_date) = MONTH(CURRENT_DATE())
|
||||
</select>
|
||||
|
||||
|
||||
@@ -667,10 +667,10 @@
|
||||
|
||||
<!-- 日期范围条件 -->
|
||||
<if test="conSession.startDate != null and conSession.startDate != ''">
|
||||
AND c.create_time >= TRUNC(#{conSession.startDate})
|
||||
AND c.create_time >= DATE_FORMAT(#{conSession.startDate}, '%Y-%m-%d 00:00:00')
|
||||
</if>
|
||||
<if test="conSession.endDate != null and conSession.endDate != ''">
|
||||
AND c.create_time <= TRUNC(#{conSession.endDate}) + 1 - 1/86400
|
||||
AND c.create_time <= DATE_FORMAT(#{conSession.endDate}, '%Y-%m-%d 23:59:59')
|
||||
</if>
|
||||
|
||||
<!-- ID 和账户条件 -->
|
||||
|
||||
-4
@@ -3,7 +3,6 @@ package com.renkang.consultation.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -249,9 +248,6 @@ public class ConDoctorServiceImpl extends ServiceImpl<ConDoctorMapper, ConDoctor
|
||||
if (StringUtils.hasLength(dto.getHospitalName())) {
|
||||
conDoctor.setResourceId(dto.getHospitalName());
|
||||
}
|
||||
if (StrUtil.isNotEmpty(dto.getDoctorName())){
|
||||
conDoctor.setDoctorName(HtmlUtil.unescape(dto.getDoctorName()));
|
||||
}
|
||||
IPage<ConDoctor> conDoctorIPage = conDoctorMapper.queryPageList(page, conDoctor);
|
||||
List<ConDoctor> conDoctorList = conDoctorIPage.getRecords();
|
||||
if (CollectionUtils.isEmpty(conDoctorList)) {
|
||||
|
||||
+11
-2
@@ -7,6 +7,7 @@ import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.config.shiro.ClientSignThreadLocal;
|
||||
import org.parboiled.common.StringUtils;
|
||||
@@ -36,10 +37,10 @@ public class SyncScheduleJob {
|
||||
String expireHour = "168";
|
||||
|
||||
String param = XxlJobHelper.getJobParam();
|
||||
if(StringUtils.isNotEmpty(param)){
|
||||
if (StringUtils.isNotEmpty(param)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(param);
|
||||
String expireHourRequest = jsonObject.getString("expireHour");
|
||||
if(StringUtils.isNotEmpty(expireHourRequest)){
|
||||
if (StringUtils.isNotEmpty(expireHourRequest)) {
|
||||
expireHour = jsonObject.getString("expireHour");
|
||||
}
|
||||
}
|
||||
@@ -53,4 +54,12 @@ public class SyncScheduleJob {
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@XxlJob(value = "endVideoSession")
|
||||
public Result<String> endVideoSession() {
|
||||
// 20260327 新增 音视频咨询过期处理 规则为:超过预约时间,比如预约的是 12月9日和专家视频沟通,但超过时间一天,即为过期,需要关闭咨询
|
||||
conSessionApiController.endVideoSession();
|
||||
return Result.ok("success");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
PROFILE_NAME=dev
|
||||
SERVER_PORT=7010
|
||||
NACOS_SERVER_ADDR=192.168.1.80:8848
|
||||
NACOS_USERNAME=xjuser
|
||||
NACOS_PASSWORD=Aa135790!123
|
||||
NACOS_NAMESPACE=xjxc-space-common
|
||||
NACOS_NAMESPACE_DISCOVERY=xjxc-space-common
|
||||
NACOS_SERVER_ADDR=localhost:8848
|
||||
NACOS_USERNAME=nacos
|
||||
NACOS_PASSWORD=nacos
|
||||
NACOS_NAMESPACE=f3f65fb2-303b-4bf7-bccb-4755886503c1
|
||||
NACOS_GROUP=dev
|
||||
FILE_SERVER_URL=http://fileserver.yg.dt.io
|
||||
|
||||
@@ -21,7 +21,7 @@ spring:
|
||||
password: ${spring.cloud.nacos.password}
|
||||
discovery:
|
||||
enabled: true
|
||||
namespace: ${NACOS_NAMESPACE_DISCOVERY:}
|
||||
namespace: ${NACOS_NAMESPACE:}
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
server-addr: ${spring.cloud.nacos.server-addr}
|
||||
username: ${spring.cloud.nacos.username}
|
||||
|
||||
-1
@@ -345,7 +345,6 @@ public class AedEquipmentManger implements Serializable {
|
||||
*/
|
||||
@Excel(name = "型号", width = 15)
|
||||
@Schema(title = "型号")
|
||||
@TableField("MODEL_NUMBER")
|
||||
private String model;
|
||||
/**
|
||||
* 来源字典 设备类型 1:立式 ,2:挂式,3:车载
|
||||
|
||||
-3
@@ -1,6 +1,5 @@
|
||||
package com.renkang.emergency.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -82,14 +81,12 @@ public class TblQimoNotice implements Serializable {
|
||||
*/
|
||||
@Schema(title = "通话接通时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@Excel(name = "通话接通时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("beginTime")
|
||||
private java.util.Date begin;
|
||||
/**
|
||||
* 通话结束时间
|
||||
*/
|
||||
@Schema(title = "通话结束时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@Excel(name = "通话结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("endTime")
|
||||
private java.util.Date end;
|
||||
/**
|
||||
* 来电进入技能组时间
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.emergency.entity.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -7,6 +8,10 @@ import lombok.Data;
|
||||
public class CallLogDTO {
|
||||
@Schema(description = "姓名")
|
||||
private String realName;
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName != null ? HtmlUtil.unescape(realName) : null;
|
||||
}
|
||||
@Schema(description = "呼叫中心")
|
||||
private String centerId;
|
||||
@Schema(description = "坐席工号")
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.emergency.entity.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -21,6 +22,10 @@ public class PhoneListDTO {
|
||||
private String phoneType;
|
||||
@Schema(description = "姓名")
|
||||
private String realName;
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName != null ? HtmlUtil.unescape(realName) : null;
|
||||
}
|
||||
/**
|
||||
* 0:全部 1:女 2:男
|
||||
*/
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.emergency.entity.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -9,6 +10,10 @@ public class TblQimoNoticeDTO {
|
||||
private String seatId;
|
||||
@Schema(title = "姓名")
|
||||
private String realName;
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName != null ? HtmlUtil.unescape(realName) : null;
|
||||
}
|
||||
@Schema(title = "所属应急中心")
|
||||
private String centerId;
|
||||
@Schema(title = "orgCode")
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public interface AedEquipmentMangerMapper extends BaseMapper<AedEquipmentManger>
|
||||
* 按单位统计aed设备数量
|
||||
* @return 统计数据
|
||||
*/
|
||||
@Select(value = "SELECT LEFT(depart_code,6) as orgCode, count(1) as aedCount FROM aed_equipment_manger where del_flag = 0 GROUP BY LEFT(depart_code,6)")
|
||||
@Select(value = "SELECT LEFT(depart_code,6) as orgCode, count(1) as aedCount FROM `aed_equipment_manger` where del_flag = 0 GROUP BY LEFT(depart_code,6)")
|
||||
List<JSONObject> statisticAedByOrgCode();
|
||||
|
||||
List<AedLocationEquipment> getLocation(@Param("idList") List<Long> idList);
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
operate_instruction as operateInstruction,
|
||||
operate_video as operateVideo,
|
||||
disclaimer as disclaimer,
|
||||
control_org_name as controlOrgName,
|
||||
manage_user_name as manageUserName,
|
||||
manage_user_mobile as manageUserMobile,
|
||||
mfrs_Mobile as mfrsMobile,
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package com.renkang.emergency.controller;
|
||||
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.renkang.emergency.entity.EmergencyProfessionUser;
|
||||
import com.renkang.emergency.service.EmergencyProfessionUserService;
|
||||
@@ -40,6 +41,7 @@ public class EmergencyProfessionUserController {
|
||||
@RequestParam(name = "type", defaultValue = "5") Integer type,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
name = HtmlUtil.unescape(name);
|
||||
IPage<EmergencyProfessionUser> pageList = emergencyProfessionUserService.customPage(name, centerId, type, pageNo, pageSize);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,11 +6,11 @@
|
||||
SELECT t1.user_id as userId,
|
||||
t3.realname as userName,
|
||||
t3.type as userType
|
||||
FROM emergency_schedules_new_item t1
|
||||
FROM `emergency_schedules_new_item` t1
|
||||
LEFT JOIN emergency_new_schedules t2 ON t1.schedules_id = t2.id
|
||||
left join emergency_profession_user t3 on t1.user_id = t3.user_id
|
||||
WHERE t2.center_id = #{centerId}
|
||||
AND TO_CHAR(t2.schedules_time, 'YYYY-MM-DD') = #{time}
|
||||
AND date_format(t2.schedules_time, '%Y-%m-%d') = #{time}
|
||||
ORDER BY
|
||||
t3.type,
|
||||
t1.sort
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@
|
||||
WHERE operation_user_id is not null
|
||||
and operation_user_id != ''
|
||||
and session_now = 1
|
||||
and TO_CHAR(create_time, 'YYYY-MM-DD') = #{targetDateStr}
|
||||
and DATE_FORMAT(create_time, '%Y-%m-%d') = #{targetDateStr}
|
||||
GROUP BY
|
||||
operation_user_id
|
||||
</select>
|
||||
@@ -26,7 +26,7 @@
|
||||
WHERE major_user_id is not null
|
||||
and major_user_id != ''
|
||||
and session_now = 1
|
||||
and TO_CHAR(create_time, 'YYYY-MM-DD') = #{targetDateStr}
|
||||
and DATE_FORMAT(create_time, '%Y-%m-%d') = #{targetDateStr}
|
||||
GROUP BY
|
||||
major_user_id
|
||||
</select>
|
||||
@@ -58,7 +58,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="type != null and type != '' and '0'.toString().equals(type)">
|
||||
AND EXTRACT(YEAR FROM create_time) = EXTRACT(YEAR FROM SYSDATE)
|
||||
AND year(create_time) = year(now())
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY center_id
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@
|
||||
and type = #{amOrPm}
|
||||
</if>
|
||||
<if test="date != null and date != ''">
|
||||
and TO_CHAR(schedule_time, 'YYYY-MM-DD') = #{date}
|
||||
and DATE_FORMAT(schedule_time, '%Y-%m-%d') = #{date}
|
||||
</if>
|
||||
and status = 1
|
||||
and del_flag = 0
|
||||
@@ -30,7 +30,7 @@
|
||||
user_sex
|
||||
FROM emergency_schedule_custom
|
||||
WHERE user_id = #{userId}
|
||||
AND EXTRACT(YEAR FROM schedule_time) = #{year}
|
||||
AND EXTRACT(MONTH FROM schedule_time) = #{month}
|
||||
AND YEAR (schedule_time) = #{year}
|
||||
AND MONTH (schedule_time) = #{month}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+5
-5
@@ -11,7 +11,7 @@
|
||||
and type = #{amOrPm}
|
||||
</if>
|
||||
<if test="date != null and date != ''">
|
||||
and TO_CHAR(schedule_time, 'YYYY-MM-DD') = #{date}
|
||||
and DATE_FORMAT(schedule_time, '%Y-%m-%d') = #{date}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
@@ -22,16 +22,16 @@
|
||||
<select id="scheduleRecord" resultType="com.renkang.emergency.entity.ScheduleRecord">
|
||||
SELECT
|
||||
id,schedule_time,type,user_type,user_name,user_id,user_sex,
|
||||
EXTRACT(MONTH FROM schedule_time) AS month,
|
||||
EXTRACT(DAY FROM schedule_time) AS day
|
||||
MONTH(schedule_time) AS month,
|
||||
DAY(schedule_time) AS day
|
||||
FROM
|
||||
emergency_schedule_record
|
||||
<where>
|
||||
<if test="year != null and year != ''">
|
||||
and EXTRACT(YEAR FROM schedule_time) = #{year}
|
||||
and YEAR (schedule_time) = #{year}
|
||||
</if>
|
||||
<if test="month != null and month != ''">
|
||||
and EXTRACT(MONTH FROM schedule_time) = #{month}
|
||||
and MONTH(schedule_time) = #{month}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and user_id = #{userId}
|
||||
|
||||
+6
-6
@@ -3,27 +3,27 @@
|
||||
<mapper namespace="com.renkang.emergency.mapper.TblBaseHospitalMapper">
|
||||
|
||||
<select id="getHospitalList" resultType="com.renkang.emergency.entity.TblBaseHospitalVo">
|
||||
SELECT id,name,latitude lat ,longitude lon,type
|
||||
SELECT id,`name`,latitude lat ,longitude lon,`type`
|
||||
FROM emergency_resource
|
||||
WHERE 1 = 1 and del_flag = 0
|
||||
<if test="type != null and type.length() > 0">
|
||||
AND type = #{type}
|
||||
AND `type` = #{type}
|
||||
</if>
|
||||
<if test="hospitalName != null and hospitalName.length() > 0">
|
||||
AND name LIKE CONCAT('%', #{hospitalName}, '%')
|
||||
AND `name` LIKE CONCAT('%', #{hospitalName}, '%')
|
||||
</if>
|
||||
ORDER BY id
|
||||
</select>
|
||||
|
||||
<select id="getHospitalListNew" resultType="com.renkang.emergency.entity.TblBaseHospitalVo">
|
||||
SELECT id,name,latitude lat ,longitude lon,type
|
||||
SELECT id,`name`,latitude lat ,longitude lon,`type`
|
||||
FROM emergency_resource
|
||||
WHERE 1 = 1 and del_flag = 0 and type != 3
|
||||
<if test="type != null and type != ''">
|
||||
AND type = #{type}
|
||||
AND `type` = #{type}
|
||||
</if>
|
||||
<if test="hospitalName != null and hospitalName.length() > 0">
|
||||
AND name LIKE CONCAT('%', #{hospitalName}, '%')
|
||||
AND `name` LIKE CONCAT('%', #{hospitalName}, '%')
|
||||
</if>
|
||||
ORDER BY id
|
||||
</select>
|
||||
|
||||
+3
-3
@@ -15,13 +15,13 @@
|
||||
) AS sub_query
|
||||
<where>
|
||||
<if test="condition != null and condition != '' and condition == 2">
|
||||
EXTRACT(YEAR FROM help_time) = EXTRACT(YEAR FROM SYSDATE)
|
||||
YEAR(help_time) = YEAR(NOW())
|
||||
</if>
|
||||
<if test="condition != null and condition != '' and condition == 3">
|
||||
TO_CHAR(help_time, 'YYYYMM') = TO_CHAR(SYSDATE, 'YYYYMM')
|
||||
DATE_FORMAT(help_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
|
||||
</if>
|
||||
<if test="condition != null and condition != '' and condition == 4">
|
||||
TO_CHAR(help_time, 'IYYY-IW') = TO_CHAR(SYSDATE, 'IYYY-IW')
|
||||
YEARWEEK(date_format(help_time, '%Y-%m-%d')) = YEARWEEK(now())
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY type
|
||||
|
||||
+4
-4
@@ -9,16 +9,16 @@
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="type != null and type == 0">
|
||||
-- 周(使用 ISO 年-周 比较)
|
||||
AND TO_CHAR(start_time, 'IYYY-IW') = TO_CHAR(SYSDATE, 'IYYY-IW')
|
||||
-- 周
|
||||
AND YEARWEEK(start_time, 1) = YEARWEEK(NOW(), 1)
|
||||
</if>
|
||||
<if test="type != null and type == 1">
|
||||
-- 月
|
||||
AND TO_CHAR(start_time,'YYYYMM') = TO_CHAR(SYSDATE,'YYYYMM')
|
||||
AND DATE_FORMAT(start_time,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m')
|
||||
</if>
|
||||
<if test="type != null and type == 2">
|
||||
-- 年
|
||||
AND EXTRACT(YEAR FROM start_time) = EXTRACT(YEAR FROM SYSDATE)
|
||||
AND YEAR(start_time) =YEAR(NOW())
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY injury_level
|
||||
|
||||
+4
@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -58,6 +59,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
|
||||
@Override
|
||||
public IPage<Order> pageCustom(Page<Order> page, Order order, HttpServletRequest req) {
|
||||
if(StrUtil.isNotBlank(order.getSalvageUserName())){
|
||||
order.setSalvageUserName(HtmlUtil.unescape(order.getSalvageUserName()));
|
||||
}
|
||||
String salvageUserName = order.getSalvageUserName();
|
||||
String initiatorUserName = order.getInitiatorUserName();
|
||||
Order orderCopy = new Order();
|
||||
|
||||
+6
-6
@@ -110,13 +110,13 @@ public class TblUserHelpServiceImpl extends ServiceImpl<TblUserHelpMapper, TblUs
|
||||
// 1:全部,2:年,3:月,4:周
|
||||
switch (dto.getCondition()) {
|
||||
case "2":
|
||||
queryWrapper.apply("EXTRACT(YEAR FROM help_time) = EXTRACT(YEAR FROM SYSDATE)");
|
||||
queryWrapper.apply("DATE_FORMAT(help_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
|
||||
break;
|
||||
case "3":
|
||||
queryWrapper.apply("TO_CHAR(help_time,'YYYY-MM') = TO_CHAR(SYSDATE,'YYYY-MM')");
|
||||
queryWrapper.apply("DATE_FORMAT(help_time,'%Y-%m') = DATE_FORMAT(NOW(),'%Y-%m')");
|
||||
break;
|
||||
case "4":
|
||||
queryWrapper.apply("TO_CHAR(help_time,'IYYY-IW') = TO_CHAR(SYSDATE,'IYYY-IW')");
|
||||
queryWrapper.apply("YEARWEEK(date_format(help_time,'%Y-%m-%d'), 1) = YEARWEEK(now(), 1)");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -224,13 +224,13 @@ public class TblUserHelpServiceImpl extends ServiceImpl<TblUserHelpMapper, TblUs
|
||||
// 1:全部,2:年,3:月,4:周
|
||||
switch (condition) {
|
||||
case "2":
|
||||
queryWrapper.apply("EXTRACT(YEAR FROM help_time) = EXTRACT(YEAR FROM SYSDATE)");
|
||||
queryWrapper.apply("DATE_FORMAT(help_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
|
||||
break;
|
||||
case "3":
|
||||
queryWrapper.apply("TO_CHAR(help_time,'YYYY-MM') = TO_CHAR(SYSDATE,'YYYY-MM')");
|
||||
queryWrapper.apply("DATE_FORMAT(help_time,'%Y-%m') = DATE_FORMAT(NOW(),'%Y-%m')");
|
||||
break;
|
||||
case "4":
|
||||
queryWrapper.apply("TO_CHAR(help_time,'IYYY-IW') = TO_CHAR(SYSDATE,'IYYY-IW')");
|
||||
queryWrapper.apply("YEARWEEK(date_format(help_time,'%Y-%m-%d')) = YEARWEEK(now())");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -2,10 +2,9 @@ package com.renkang;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
@SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"},exclude = QuartzAutoConfiguration.class)
|
||||
@SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"})
|
||||
@EnableFeignClients(basePackages = {"org.jeecg", "com.renkang"})
|
||||
public class HealthEmergencyCloudApplication {
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
PROFILE_NAME=dev
|
||||
SERVER_PORT=7011
|
||||
NACOS_SERVER_ADDR=192.168.1.80:8848
|
||||
NACOS_USERNAME=xjuser
|
||||
NACOS_PASSWORD=Aa135790!123
|
||||
NACOS_NAMESPACE=xjxc-space-common
|
||||
NACOS_NAMESPACE_DISCOVERY=xjxc-space-common
|
||||
NACOS_SERVER_ADDR=localhost:8848
|
||||
NACOS_USERNAME=nacos
|
||||
NACOS_PASSWORD=nacos
|
||||
NACOS_NAMESPACE=f3f65fb2-303b-4bf7-bccb-4755886503c1
|
||||
NACOS_GROUP=dev
|
||||
FILE_SERVER_URL=http://fileserver.yg.dt.io
|
||||
|
||||
@@ -21,7 +21,7 @@ spring:
|
||||
password: ${spring.cloud.nacos.password}
|
||||
discovery:
|
||||
enabled: true
|
||||
namespace: ${NACOS_NAMESPACE_DISCOVERY:}
|
||||
namespace: ${NACOS_NAMESPACE:}
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
server-addr: ${spring.cloud.nacos.server-addr}
|
||||
username: ${spring.cloud.nacos.username}
|
||||
|
||||
+4
@@ -22,6 +22,10 @@ public class WatchH5IndexItemNewVo {
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dataDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dataDateNew;
|
||||
/**
|
||||
* 注意 当wdType=sleep时此字段返回长睡时长
|
||||
*/
|
||||
|
||||
+4
@@ -1,5 +1,6 @@
|
||||
package com.renkang.watch.bean.request;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -19,6 +20,9 @@ public class AbnormalEventFilter {
|
||||
private String departOrgCode;
|
||||
// 用户名称
|
||||
private String userName;
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName != null ? HtmlUtil.unescape(userName) : null;
|
||||
}
|
||||
// 工具编码
|
||||
private String watchNo;
|
||||
//员工编号
|
||||
|
||||
+14
@@ -52,4 +52,18 @@ public class AbnormalEvent extends BaseUser {
|
||||
private Date bindDate;
|
||||
@Schema(title = "重点指标用户(0:非重点指标用户 1:大病异常 2:慢病异常 3:指标异常)")
|
||||
private List<WatchKeyUser> keyUserList;
|
||||
/**
|
||||
* 事件ID(用于告警事件与GPS位置更新关联的唯一标识)
|
||||
*/
|
||||
@Excel(name = "事件ID", width = 32, orderNum = "12")
|
||||
@Schema(title = "事件ID")
|
||||
private String eventId;
|
||||
/**
|
||||
* 定位时间(手表定时上报的GPS定位时间)
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "定位时间", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "13")
|
||||
@Schema(title = "定位时间")
|
||||
private Date locateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.renkang.watch.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author TianZi
|
||||
* @date 2023/11/7 14:13
|
||||
*/
|
||||
@Data
|
||||
public class BindDeviceDTO {
|
||||
|
||||
@Schema(title = "手表编号")
|
||||
private String watchNo;
|
||||
}
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.watch.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -18,6 +19,10 @@ public class CalorieDataByUserDTO {
|
||||
private Integer pageSize = 10;
|
||||
@Schema(title = "用户姓名")
|
||||
private String realName;
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName != null ? HtmlUtil.unescape(realName) : null;
|
||||
}
|
||||
@Schema(title = "工号")
|
||||
private String workNo;
|
||||
@Schema(title = "用户id组")
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public class WatchDataWorkoutTrace implements Serializable {
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(title = "时间戳")
|
||||
@TableField("utc_time")
|
||||
@TableField("`utc_time`")
|
||||
private java.util.Date utcTime;
|
||||
/**
|
||||
* 数据是否合法
|
||||
|
||||
+14
@@ -151,6 +151,20 @@ public class WatchMonitorData implements Serializable {
|
||||
@Excel(name = "部门编码", width = 15)
|
||||
@Schema(title = "部门编码")
|
||||
private java.lang.String orgCode;
|
||||
/**
|
||||
* 事件ID(用于告警事件与GPS位置更新关联的唯一标识)
|
||||
*/
|
||||
@Excel(name = "事件ID", width = 32)
|
||||
@Schema(title = "事件ID")
|
||||
private java.lang.String eventId;
|
||||
/**
|
||||
* 定位时间(手表上报的GPS定位时间,定时上报场景使用)
|
||||
*/
|
||||
@Excel(name = "定位时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "定位时间")
|
||||
private java.util.Date locateTime;
|
||||
|
||||
@Schema(title = "员工编号")
|
||||
@TableField(exist = false)
|
||||
|
||||
+51
-2
@@ -1,22 +1,71 @@
|
||||
package com.renkang.watch.vo.UserData.res;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.renkang.watch.WatchH5IndexItemNewVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/** 用户统计数据
|
||||
/**
|
||||
* 用户统计数据
|
||||
*
|
||||
* @author stan
|
||||
* @since 2024-11-04 16:33
|
||||
*/
|
||||
@Data
|
||||
public class UserStat {
|
||||
/**
|
||||
* 数据类型:0=心率 1=血氧 2=压力 3=体温 4=睡眠
|
||||
*/
|
||||
private String type;
|
||||
private BigDecimal latest;
|
||||
private BigDecimal max;
|
||||
private BigDecimal min;
|
||||
private BigDecimal avg;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date latestTime;
|
||||
|
||||
public UserStat() {
|
||||
}
|
||||
|
||||
public UserStat(WatchH5IndexItemNewVo watchH5IndexItemNewVo) {
|
||||
switch (watchH5IndexItemNewVo.getWdType()) {
|
||||
case "sleep":
|
||||
this.type = "4";
|
||||
break;
|
||||
case "heart_rate":
|
||||
this.type = "0";
|
||||
break;
|
||||
case "stress":
|
||||
this.type = "2";
|
||||
break;
|
||||
case "spo2":
|
||||
this.type = "1";
|
||||
break;
|
||||
case "temperature":
|
||||
this.type = "3";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.latest = parseSafe(watchH5IndexItemNewVo.getDataValue());
|
||||
this.max = parseSafe(watchH5IndexItemNewVo.getDataMax());
|
||||
this.min = parseSafe(watchH5IndexItemNewVo.getDataMin());
|
||||
this.avg = parseSafe(watchH5IndexItemNewVo.getDataAvg());
|
||||
this.latestTime = watchH5IndexItemNewVo.getDataDateNew();
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全解析字符串为 BigDecimal,入参为 null 或空串时返回 null
|
||||
*
|
||||
* @param value 待解析的字符串数值
|
||||
* @return 解析结果,无效输入返回 null
|
||||
*/
|
||||
private static BigDecimal parseSafe(String value) {
|
||||
if (value == null || value.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return BigDecimal.valueOf(Double.parseDouble(value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,15 @@ public class WatchNotifyVo implements Serializable {
|
||||
private Date warnTime;
|
||||
|
||||
private String gpsErrorMsg;
|
||||
|
||||
/**
|
||||
* 事件ID(用于告警事件与GPS位置更新关联的唯一标识)
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 定位时间(手表上报的GPS定位时间,定时上报场景使用)
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date locateTime;
|
||||
}
|
||||
|
||||
+12
-10
@@ -18,9 +18,14 @@ public class DeptStatData {
|
||||
/**
|
||||
* 已分配设备数
|
||||
*/
|
||||
@Excel(name = "分配设备数", width = 15,orderNum = "4")
|
||||
@Excel(name = "已分配设备数", width = 15,orderNum = "4")
|
||||
private Integer assignedDeviceNums;
|
||||
|
||||
/**
|
||||
* 未分配设备数(入库设备数 - 已分配设备数,仅一、二级部门有值)
|
||||
*/
|
||||
@Excel(name = "未分配设备数", width = 15,orderNum = "5")
|
||||
private Integer undistributedDeviceNums;
|
||||
|
||||
@Excel(name = "入库设备数", width = 15,orderNum = "3")
|
||||
private Integer totalAssignedDeviceNums;
|
||||
@@ -28,25 +33,22 @@ public class DeptStatData {
|
||||
/**
|
||||
* 佩戴人员数
|
||||
*/
|
||||
@Excel(name = "佩戴人员数", width = 15,orderNum = "5")
|
||||
@Excel(name = "佩戴人员数", width = 15,orderNum = "6")
|
||||
private Integer assignedUserNums;
|
||||
/**
|
||||
* 未佩戴人员数
|
||||
*/
|
||||
@Excel(name = "未佩戴人员数", width = 15,orderNum = "6")
|
||||
@Excel(name = "未佩戴人员数", width = 15,orderNum = "7")
|
||||
private Integer undistributedUserNums;
|
||||
|
||||
@Excel(name = "心率异常人数", width = 15,orderNum = "7")
|
||||
@Excel(name = "心率异常人数", width = 15,orderNum = "8")
|
||||
private Integer heartRateNums;
|
||||
@Excel(name = "血氧异常人数", width = 15,orderNum = "8")
|
||||
@Excel(name = "血氧异常人数", width = 15,orderNum = "9")
|
||||
private Integer spo2Nums;
|
||||
@Excel(name = "压力异常人数", width = 15,orderNum = "9")
|
||||
@Excel(name = "压力异常人数", width = 15,orderNum = "10")
|
||||
private Integer stressNums;
|
||||
@Excel(name = "体温异常人数", width = 15,orderNum = "10")
|
||||
@Excel(name = "体温异常人数", width = 15,orderNum = "11")
|
||||
private Integer tempNums;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+11
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@@ -41,6 +42,16 @@ public class WatchDataApiController {
|
||||
return Result.ok(watchDataApiService.userStatResult(type));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户手表数据(批量返回)
|
||||
*
|
||||
* @return data
|
||||
*/
|
||||
@GetMapping("userWatchDataAll")
|
||||
public Result<List<UserStat>> userStatResultAll(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date date) {
|
||||
return Result.ok(watchDataApiService.userStatResultAll(date));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户此刻是否拥有手表
|
||||
*
|
||||
|
||||
+9
@@ -11,6 +11,7 @@ import com.renkang.watch.vo.UserData.res.sleep.WatchDataSleepRes;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface WatchDataApiService {
|
||||
@@ -43,6 +44,14 @@ public interface WatchDataApiService {
|
||||
|
||||
UserStat userStatResult(String type);
|
||||
|
||||
/**
|
||||
* 查询当前登录用户所有健康指标统计数据(按指定日期过滤)
|
||||
*
|
||||
* @param date 查询日期,为 null 时返回最新一条数据
|
||||
* @return 各指标统计结果列表
|
||||
*/
|
||||
List<UserStat> userStatResultAll(Date date);
|
||||
|
||||
Boolean userHaveWatch(String userId);
|
||||
|
||||
UserWatchInfo findWatchInfo(String userId);
|
||||
|
||||
+236
-32
@@ -7,6 +7,8 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.renkang.watch.WatchH5IndexItemNewVo;
|
||||
import com.renkang.watch.api.bean.response.UserWatchInfo;
|
||||
import com.renkang.watch.api.service.WatchDataApiService;
|
||||
import com.renkang.watch.dto.WatchDataWorkoutDTO;
|
||||
@@ -24,31 +26,34 @@ import com.renkang.watch.vo.UserData.res.bodyTemperature.BodyTempStat;
|
||||
import com.renkang.watch.vo.UserData.res.bodyTemperature.BodyTempStatRes;
|
||||
import com.renkang.watch.vo.UserData.res.heartRate.WatchDataHeartRateRes;
|
||||
import com.renkang.watch.vo.UserData.res.sleep.WatchDataSleepRes;
|
||||
import com.renkang.watch.vo.WatchH5IndexItemVo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.global.GlobalUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.task.AsyncTaskExecutor;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Service
|
||||
public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private WatchDataWorkoutMapper watchDataWorkoutMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private WatchStatUserInfoDayHeartRateMapper watchStatUserInfoDayHeartRateMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private WatchDataHeartRateMapper watchDataHeartRateMapper;
|
||||
|
||||
@@ -60,9 +65,6 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
@Autowired
|
||||
private WatchStatUserInfoDaySpo2ServiceImpl watchStatUserInfoDaySpo2ServiceImpl;
|
||||
|
||||
@Autowired
|
||||
private WatchStatUserInfoDaySleepMapper watchStatUserInfoDaySleepMapper;
|
||||
|
||||
@Autowired
|
||||
private WatchDataSleepNewMinuteMapper watchDataSleepNewMinuteMapper;
|
||||
|
||||
@@ -96,7 +98,6 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
@Autowired
|
||||
private IWatchDataTemperatureService watchDataTemperatureService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IWatchDataStressService watchDataStressService;
|
||||
@Autowired
|
||||
@@ -106,12 +107,47 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
@Autowired
|
||||
private WatchUserDataMapper watchUserDataMapper;
|
||||
@Autowired
|
||||
private WatchStatUserInfoDayHeartRateMapper watchStatUserInfoDayHeartRateMapper;
|
||||
@Autowired
|
||||
private WatchStatUserInfoDaySleepMapper watchStatUserInfoDaySleepMapper;
|
||||
@Autowired
|
||||
private WatchStatUserInfoDaySpo2Mapper watchStatUserInfoDaySpo2Mapper;
|
||||
@Autowired
|
||||
private WatchStatUserInfoDayStressMapper watchStatUserInfoDayStressMapper;
|
||||
@Autowired
|
||||
private WatchStatUserInfoDayTempMapper watchStatUserInfoDayTempMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
/** 用户统计全量数据 Redis 缓存 key 前缀 */
|
||||
private static final String USER_STAT_ALL_CACHE_KEY = "watch:userStatAll:";
|
||||
|
||||
private AsyncTaskExecutor asyncTaskExecutor;
|
||||
|
||||
public AsyncTaskExecutor getAsyncTaskExecutor() {
|
||||
if (asyncTaskExecutor == null) {
|
||||
initAsyncExecutor();
|
||||
}
|
||||
return asyncTaskExecutor;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
initAsyncExecutor();
|
||||
}
|
||||
|
||||
private void initAsyncExecutor() {
|
||||
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
|
||||
taskExecutor.setCorePoolSize(150);
|
||||
taskExecutor.setMaxPoolSize(500);
|
||||
taskExecutor.setQueueCapacity(500);
|
||||
taskExecutor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
taskExecutor.setThreadNamePrefix("watch-latest-pool1-");
|
||||
taskExecutor.initialize();
|
||||
asyncTaskExecutor = taskExecutor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Map<String,Object>> selectSportCostListApi() {
|
||||
LoginUser loginUser = GlobalUtils.getLoginUser();
|
||||
@@ -834,20 +870,171 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
String userId = GlobalUtils.getLoginUser().getId();
|
||||
switch (type) {
|
||||
case "0":
|
||||
return handleHeartRate(userId);
|
||||
return handleHeartRate(userId,null);
|
||||
case "1":
|
||||
return handleBloodOxygen(userId);
|
||||
return handleBloodOxygen(userId,null);
|
||||
case "2":
|
||||
return handleStress(userId);
|
||||
return handleStress(userId,null);
|
||||
case "3":
|
||||
return handleBodyTemperature(userId);
|
||||
return handleBodyTemperature(userId,null);
|
||||
case "4":
|
||||
return handleSleep(userId);
|
||||
return handleSleep(userId,null);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserStat> userStatResultAll(Date date) {
|
||||
// 在主线程提前获取 userId,避免子线程无法访问 ThreadLocal 中的登录信息
|
||||
String userId = GlobalUtils.getLoginUser().getId();
|
||||
// 有时间参数时缓存 key 携带日期,避免与无参缓存冲突
|
||||
String cacheKey = USER_STAT_ALL_CACHE_KEY + userId + (date != null ? "_" + date.getTime() : "");
|
||||
|
||||
// 命中 Redis 缓存直接返回
|
||||
Object cached = redisUtil.get(cacheKey);
|
||||
if (cached != null) {
|
||||
return (List<UserStat>) cached;
|
||||
}
|
||||
|
||||
// 构建「数据类型 → 异步查询 Future」映射,消除 switch-case 冗余
|
||||
Map<String, CompletableFuture<WatchH5IndexItemNewVo>> futureMap = new HashMap<>();
|
||||
futureMap.put("sleep", CompletableFuture.supplyAsync(() -> latestSleepData(userId), getAsyncTaskExecutor()));
|
||||
futureMap.put("heart_rate", CompletableFuture.supplyAsync(() -> latestHeartRateData(userId), getAsyncTaskExecutor()));
|
||||
futureMap.put("spo2", CompletableFuture.supplyAsync(() -> latestSpo2Data(userId), getAsyncTaskExecutor()));
|
||||
futureMap.put("stress", CompletableFuture.supplyAsync(() -> latestStressData(userId), getAsyncTaskExecutor()));
|
||||
futureMap.put("temperature", CompletableFuture.supplyAsync(() -> latestTempData(userId), getAsyncTaskExecutor()));
|
||||
|
||||
// 等待全部异步查询完成
|
||||
CompletableFuture.allOf(futureMap.values().toArray(new CompletableFuture[0])).join();
|
||||
|
||||
// 转为顺序流遍历,避免并行流写入 ArrayList 的线程安全问题
|
||||
List<WatchH5IndexItemNewVo> list = new ArrayList<>();
|
||||
emptyItems().sequential().forEach(itemVo -> {
|
||||
CompletableFuture<WatchH5IndexItemNewVo> future = futureMap.get(itemVo.getWdType());
|
||||
// steps 等暂无对应查询的类型直接跳过
|
||||
if (future == null) {
|
||||
return;
|
||||
}
|
||||
WatchH5IndexItemNewVo data = future.join();
|
||||
if (data == null) {
|
||||
data = new WatchH5IndexItemNewVo();
|
||||
}
|
||||
// 将模板字段(wdType、wdTypeName、阈值)合并到结果对象
|
||||
data.fieldCopy(itemVo);
|
||||
// 睡眠数据特殊处理:dataValue 为空时补 "0"
|
||||
if ("sleep".equals(itemVo.getWdType()) && StrUtil.isEmpty(data.getDataValue())) {
|
||||
data.setDataValue("0");
|
||||
}
|
||||
list.add(data);
|
||||
});
|
||||
|
||||
List<UserStat> result = list.stream().map(UserStat::new).collect(Collectors.toList());
|
||||
|
||||
// 写入 Redis 缓存,TTL=3分钟(180秒)
|
||||
redisUtil.set(cacheKey, result, 180);
|
||||
return result;
|
||||
}
|
||||
|
||||
private Stream<WatchH5IndexItemVo> emptyItems() {
|
||||
//睡眠
|
||||
WatchH5IndexItemVo sleepVo = new WatchH5IndexItemVo();
|
||||
sleepVo.setWdType("sleep");
|
||||
//步数
|
||||
WatchH5IndexItemVo stepsVo = new WatchH5IndexItemVo();
|
||||
stepsVo.setWdType("steps");
|
||||
//心率
|
||||
WatchH5IndexItemVo hearRateVo = new WatchH5IndexItemVo();
|
||||
hearRateVo.setWdType("heart_rate");
|
||||
//压力
|
||||
WatchH5IndexItemVo stressVo = new WatchH5IndexItemVo();
|
||||
stressVo.setWdType("stress");
|
||||
//血氧饱和度
|
||||
WatchH5IndexItemVo spo2Vo = new WatchH5IndexItemVo();
|
||||
spo2Vo.setWdType("spo2");
|
||||
//体温
|
||||
WatchH5IndexItemVo tempVo = new WatchH5IndexItemVo();
|
||||
tempVo.setWdType("temperature");
|
||||
List<WatchH5IndexItemVo> list = Arrays.asList(sleepVo, stepsVo, hearRateVo, stressVo, spo2Vo, tempVo);
|
||||
return list.parallelStream()
|
||||
.peek(itemVo -> {
|
||||
itemVo.setWarnMin("0.0");
|
||||
itemVo.setWarnMax("0.0");
|
||||
});
|
||||
}
|
||||
|
||||
private WatchH5IndexItemNewVo latestSleepData(String userId) {
|
||||
MPJLambdaWrapper<WatchStatUserInfoDaySleep> wrapper = new MPJLambdaWrapper<>();
|
||||
//因为睡眠详情页取的是长睡时长作为当天的睡眠时间 , 所以这里保持一致并没有取当天的睡眠总时长
|
||||
wrapper.selectAs(WatchStatUserInfoDaySleep::getLongDurationTotal,WatchH5IndexItemNewVo::getDataValue);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySleep::getDeepSleepTimes,WatchH5IndexItemNewVo::getDataMax);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySleep::getLightSleepTimes,WatchH5IndexItemNewVo::getDataMin);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySleep::getSleepAvg,WatchH5IndexItemNewVo::getDataAvg);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySleep::getLastUploadTime,WatchH5IndexItemNewVo::getDataDateNew);
|
||||
wrapper.eq(WatchStatUserInfoDaySleep::getUserId, userId);
|
||||
wrapper.orderByDesc(WatchStatUserInfoDaySleep::getDataDate);
|
||||
wrapper.last("limit 1");
|
||||
return watchStatUserInfoDaySleepMapper.selectJoinOne(WatchH5IndexItemNewVo.class,wrapper);
|
||||
}
|
||||
|
||||
private WatchH5IndexItemNewVo latestHeartRateData(String userId) {
|
||||
MPJLambdaWrapper<WatchStatUserInfoDayHeartRate> wrapper = new MPJLambdaWrapper<>();
|
||||
// 必须是watch_stat_user_info_day_heart_rate表中new_data字段启用后才能这样查
|
||||
wrapper.selectAs(WatchStatUserInfoDayHeartRate::getNewValue,WatchH5IndexItemNewVo::getDataValue);
|
||||
wrapper.selectAs(WatchStatUserInfoDayHeartRate::getMaxValue,WatchH5IndexItemNewVo::getDataMax);
|
||||
wrapper.selectAs(WatchStatUserInfoDayHeartRate::getMinValue,WatchH5IndexItemNewVo::getDataMin);
|
||||
wrapper.selectAs(WatchStatUserInfoDayHeartRate::getAvgValue,WatchH5IndexItemNewVo::getDataAvg);
|
||||
wrapper.selectAs(WatchStatUserInfoDayHeartRate::getLastUploadTime,WatchH5IndexItemNewVo::getDataDateNew);
|
||||
wrapper.eq(WatchStatUserInfoDayHeartRate::getUserId, userId);
|
||||
wrapper.orderByDesc(WatchStatUserInfoDayHeartRate::getDataDate);
|
||||
wrapper.last("limit 1");
|
||||
return watchStatUserInfoDayHeartRateMapper.selectJoinOne(WatchH5IndexItemNewVo.class,wrapper);
|
||||
}
|
||||
|
||||
private WatchH5IndexItemNewVo latestSpo2Data(String userId) {
|
||||
MPJLambdaWrapper<WatchStatUserInfoDaySpo2> wrapper = new MPJLambdaWrapper<>();
|
||||
// 必须是watch_stat_user_info_day_spo2表中new_data字段启用后才能这样查
|
||||
wrapper.selectAs(WatchStatUserInfoDaySpo2::getNewValue,WatchH5IndexItemNewVo::getDataValue);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySpo2::getMaxValue,WatchH5IndexItemNewVo::getDataMax);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySpo2::getMinValue,WatchH5IndexItemNewVo::getDataMin);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySpo2::getAvgValue,WatchH5IndexItemNewVo::getDataAvg);
|
||||
wrapper.selectAs(WatchStatUserInfoDaySpo2::getLastUploadTime,WatchH5IndexItemNewVo::getDataDateNew);
|
||||
wrapper.eq(WatchStatUserInfoDaySpo2::getUserId, userId);
|
||||
wrapper.orderByDesc(WatchStatUserInfoDaySpo2::getDataDate);
|
||||
wrapper.last("limit 1");
|
||||
return watchStatUserInfoDaySpo2Mapper.selectJoinOne(WatchH5IndexItemNewVo.class,wrapper);
|
||||
}
|
||||
|
||||
private WatchH5IndexItemNewVo latestStressData(String userId) {
|
||||
MPJLambdaWrapper<WatchStatUserInfoDayStress> wrapper = new MPJLambdaWrapper<>();
|
||||
// 必须是watch_stat_user_info_day_stress表中new_data字段启用后才能这样查
|
||||
wrapper.selectAs(WatchStatUserInfoDayStress::getNewValue,WatchH5IndexItemNewVo::getDataValue);
|
||||
wrapper.selectAs(WatchStatUserInfoDayStress::getMaxValue,WatchH5IndexItemNewVo::getDataMax);
|
||||
wrapper.selectAs(WatchStatUserInfoDayStress::getMinValue,WatchH5IndexItemNewVo::getDataMin);
|
||||
wrapper.selectAs(WatchStatUserInfoDayStress::getAvgValue,WatchH5IndexItemNewVo::getDataAvg);
|
||||
wrapper.selectAs(WatchStatUserInfoDayStress::getLastUploadTime,WatchH5IndexItemNewVo::getDataDateNew);
|
||||
wrapper.eq(WatchStatUserInfoDayStress::getUserId, userId);
|
||||
wrapper.orderByDesc(WatchStatUserInfoDayStress::getDataDate);
|
||||
wrapper.last("limit 1");
|
||||
return watchStatUserInfoDayStressMapper.selectJoinOne(WatchH5IndexItemNewVo.class,wrapper);
|
||||
}
|
||||
|
||||
private WatchH5IndexItemNewVo latestTempData(String userId) {
|
||||
MPJLambdaWrapper<WatchStatUserInfoDayTemp> wrapper = new MPJLambdaWrapper<>();
|
||||
// 必须是watch_stat_user_info_day_temp表中new_data字段启用后才能这样查
|
||||
wrapper.selectAs(WatchStatUserInfoDayTemp::getNewValue,WatchH5IndexItemNewVo::getDataValue);
|
||||
wrapper.selectAs(WatchStatUserInfoDayTemp::getMaxValue,WatchH5IndexItemNewVo::getDataMax);
|
||||
wrapper.selectAs(WatchStatUserInfoDayTemp::getMinValue,WatchH5IndexItemNewVo::getDataMin);
|
||||
wrapper.selectAs(WatchStatUserInfoDayTemp::getAvgValue,WatchH5IndexItemNewVo::getDataAvg);
|
||||
wrapper.selectAs(WatchStatUserInfoDayTemp::getLastUploadTime,WatchH5IndexItemNewVo::getDataDateNew);
|
||||
wrapper.eq(WatchStatUserInfoDayTemp::getUserId, userId);
|
||||
wrapper.orderByDesc(WatchStatUserInfoDayTemp::getDataDate);
|
||||
wrapper.last("limit 1");
|
||||
return watchStatUserInfoDayTempMapper.selectJoinOne(WatchH5IndexItemNewVo.class,wrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean userHaveWatch(String userId) {
|
||||
if (StrUtil.isBlank(userId)) {
|
||||
@@ -885,7 +1072,7 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
}
|
||||
|
||||
|
||||
private UserStat handleSleep(String userId) {
|
||||
private UserStat handleSleep(String userId, Date date) {
|
||||
LambdaQueryWrapper<WatchStatUserInfoDaySleep> queryWrapper = Wrappers.lambdaQuery(WatchStatUserInfoDaySleep.class)
|
||||
.select(WatchStatUserInfoDaySleep::getId,
|
||||
WatchStatUserInfoDaySleep::getDeepSleepTimes,
|
||||
@@ -893,13 +1080,15 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
WatchStatUserInfoDaySleep::getDeepLightTimes,
|
||||
WatchStatUserInfoDaySleep::getDataDate)
|
||||
.eq(WatchStatUserInfoDaySleep::getUserId, userId)
|
||||
.orderByDesc(WatchStatUserInfoDaySleep::getDataDate)
|
||||
// 传了日期则精确匹配,否则取最新一条
|
||||
.eq(date != null, WatchStatUserInfoDaySleep::getDataDate, date)
|
||||
.orderByDesc(date == null, WatchStatUserInfoDaySleep::getDataDate)
|
||||
.last("limit 1");
|
||||
|
||||
WatchStatUserInfoDaySleep data = watchStatUserInfoDaySleepMapper.selectOne(queryWrapper);
|
||||
|
||||
if (data == null) {
|
||||
return null;
|
||||
return new UserStat();
|
||||
}
|
||||
|
||||
UserStat stat = new UserStat();
|
||||
@@ -915,15 +1104,15 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
return stat;
|
||||
}
|
||||
|
||||
private UserStat handleBodyTemperature(String userId) {
|
||||
private UserStat handleBodyTemperature(String userId, Date date) {
|
||||
int type = 5;
|
||||
int scale = 1;
|
||||
// 最新数据
|
||||
UserStat userStat = userWatchDataLatest(userId, type, scale);
|
||||
if (userStat == null) {
|
||||
return null;
|
||||
return new UserStat();
|
||||
}
|
||||
LambdaQueryWrapper<WatchStatUserInfoDayTemp> queryWrapper = getQueryWrapper(userId);
|
||||
LambdaQueryWrapper<WatchStatUserInfoDayTemp> queryWrapper = getQueryWrapper(userId, date);
|
||||
WatchStatUserInfoDayTemp data = watchStatUserInfoDayTempMapper.selectOne(queryWrapper);
|
||||
if (data == null) {
|
||||
return userStat;
|
||||
@@ -933,15 +1122,15 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
return userStat;
|
||||
}
|
||||
|
||||
private UserStat handleStress(String userId) {
|
||||
private UserStat handleStress(String userId, Date date) {
|
||||
int type = 3;
|
||||
int scale = 0;
|
||||
// 最新数据
|
||||
UserStat userStat = userWatchDataLatest(userId, type, scale);
|
||||
if (userStat == null) {
|
||||
return null;
|
||||
return new UserStat();
|
||||
}
|
||||
LambdaQueryWrapper<WatchStatUserInfoDayStress> queryWrapper = getQueryWrapper(userId);
|
||||
LambdaQueryWrapper<WatchStatUserInfoDayStress> queryWrapper = getQueryWrapper(userId, date);
|
||||
WatchStatUserInfoDayStress data = watchStatUserInfoDayStressMapper.selectOne(queryWrapper);
|
||||
if (data == null) {
|
||||
return userStat;
|
||||
@@ -951,15 +1140,15 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
return userStat;
|
||||
}
|
||||
|
||||
private UserStat handleBloodOxygen(String userId) {
|
||||
private UserStat handleBloodOxygen(String userId, Date date) {
|
||||
int type = 2;
|
||||
int scale = 0;
|
||||
// 最新数据
|
||||
UserStat userStat = userWatchDataLatest(userId, type, scale);
|
||||
if (userStat == null) {
|
||||
return null;
|
||||
return new UserStat();
|
||||
}
|
||||
LambdaQueryWrapper<WatchStatUserInfoDaySpo2> queryWrapper = getQueryWrapper(userId);
|
||||
LambdaQueryWrapper<WatchStatUserInfoDaySpo2> queryWrapper = getQueryWrapper(userId, date);
|
||||
WatchStatUserInfoDaySpo2 data = watchStatUserInfoDaySpo2Mapper.selectOne(queryWrapper);
|
||||
if (data == null) {
|
||||
return userStat;
|
||||
@@ -969,15 +1158,15 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
return userStat;
|
||||
}
|
||||
|
||||
private UserStat handleHeartRate(String userId) {
|
||||
private UserStat handleHeartRate(String userId, Date date) {
|
||||
int type = 1;
|
||||
int scale = 0;
|
||||
// 最新数据
|
||||
UserStat userStat = userWatchDataLatest(userId, type, scale);
|
||||
if (userStat == null) {
|
||||
return null;
|
||||
return new UserStat();
|
||||
}
|
||||
LambdaQueryWrapper<WatchStatUserInfoDayHeartRate> queryWrapper = getQueryWrapper(userId);
|
||||
LambdaQueryWrapper<WatchStatUserInfoDayHeartRate> queryWrapper = getQueryWrapper(userId, date);
|
||||
WatchStatUserInfoDayHeartRate data = watchStatUserInfoDayHeartRateMapper.selectOne(queryWrapper);
|
||||
if (data == null) {
|
||||
return userStat;
|
||||
@@ -1029,10 +1218,12 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
return stat;
|
||||
}
|
||||
|
||||
private <T> LambdaQueryWrapper<T> getQueryWrapper(String userId) {
|
||||
private <T> LambdaQueryWrapper<T> getQueryWrapper(String userId, Date date) {
|
||||
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("user_id", userId)
|
||||
.orderByDesc("data_date")
|
||||
// 传了日期则精确匹配,否则取最新一条
|
||||
.eq(date != null, "data_date", date)
|
||||
.orderByDesc(date == null, "data_date")
|
||||
.last("limit 1");
|
||||
return queryWrapper.lambda();
|
||||
}
|
||||
@@ -1051,4 +1242,17 @@ public class WatchDataApiServiceImpl implements WatchDataApiService {
|
||||
return BigDecimal.valueOf(value).setScale(0, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置统计数据类型标识,stat 为 null 时直接返回 null
|
||||
*
|
||||
* @param stat UserStat 对象
|
||||
* @param type 类型编码:0=心率 1=血氧 2=压力 3=体温 4=睡眠
|
||||
*/
|
||||
private UserStat setType(UserStat stat, String type) {
|
||||
if (stat != null) {
|
||||
stat.setType(type);
|
||||
}
|
||||
return stat;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -336,8 +336,9 @@ public class AsyncImportService {
|
||||
updatedWatchDevice.setBindDate(watchDevice.getBindDate()==null?new Date():watchDevice.getBindDate());
|
||||
updatedWatchDevice.setUpdateDate(new Date());
|
||||
updatedWatchDevice.setUpdateBy(sysUser.getId());
|
||||
updatedWatchDevice.setDeptId(device.getDeptId());
|
||||
updatedWatchDevice.setOrgCode(device.getOrgCode());
|
||||
// 这里修改成以用户的部门为准,更新手表的所属部门
|
||||
updatedWatchDevice.setDeptId(sysCache.getDepartIdByOrgCode(user.getOrgCode()));
|
||||
updatedWatchDevice.setOrgCode(user.getOrgCode());
|
||||
updateList.add(updatedWatchDevice);
|
||||
}
|
||||
info1.setHandleMsg(index + "/" + count);
|
||||
|
||||
+15
@@ -38,6 +38,21 @@ public class WatchApiController {
|
||||
return watchMonitorDataService.notice(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新告警事件GPS位置信息接口
|
||||
* 根据 watchNo + eventId 联合定位已有告警数据;
|
||||
* 仅更新GPS相关字段,不推送大屏与短信;
|
||||
* 内部会调用高德接口进行GPS84→GCJ02坐标转换与地址反查。
|
||||
*
|
||||
* @param json 入参(watchNo、eventId、lon、lat、address、locateTime、gpsErrorMsg)
|
||||
* @return 处理结果
|
||||
*/
|
||||
@PostMapping("/updateMonitorGps")
|
||||
@Operation(summary = "更新告警事件GPS位置信息")
|
||||
public AjaxJson updateMonitorGps(@RequestBody JSONObject json) {
|
||||
return watchMonitorDataService.updateMonitorGps(json);
|
||||
}
|
||||
|
||||
@GetMapping("/setData")
|
||||
public AjaxJson setData() {
|
||||
AjaxJson ajaxJson = new AjaxJson();
|
||||
|
||||
+2
-4
@@ -11,10 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -327,4 +324,5 @@ public class WatchController {
|
||||
// }
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user