From aeb6c8b0f62127ad3fdaa58bbd8fad94e7195028 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Thu, 2 Apr 2020 18:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E8=A7=A6=E7=97=85=E4=BA=BA=E6=89=93?= =?UTF-8?q?=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ccsens/health/bean/vo/HealthVo.java | 2 +- .../com/ccsens/health/bean/vo/MemberVo.java | 6 ++--- .../ccsens/health/util/HealthConstant.java | 22 +++++++++++++++++-- health/src/main/resources/application-dev.yml | 4 +++- .../src/main/resources/application-prod.yml | 4 +++- .../src/main/resources/application-test.yml | 4 +++- .../main/resources/mapper_dao/JourneyDao.xml | 2 +- .../resources/mapper_dao/SiteClockInDao.xml | 9 ++++---- 8 files changed, 38 insertions(+), 15 deletions(-) diff --git a/health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java b/health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java index ffda8ee5..cf0e4265 100644 --- a/health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java +++ b/health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java @@ -117,7 +117,7 @@ public class HealthVo { @ApiModelProperty("体温") private BigDecimal animalHeat; @ApiModelProperty("健康状态code") - private Byte code; + private String code; @ApiModelProperty("健康状态名字") private String name; private String quarantine; diff --git a/health/src/main/java/com/ccsens/health/bean/vo/MemberVo.java b/health/src/main/java/com/ccsens/health/bean/vo/MemberVo.java index a2a006bf..229cb6d7 100644 --- a/health/src/main/java/com/ccsens/health/bean/vo/MemberVo.java +++ b/health/src/main/java/com/ccsens/health/bean/vo/MemberVo.java @@ -67,9 +67,9 @@ public class MemberVo { private int touchSick; @ApiModelProperty("体温") private BigDecimal animalHeat; - @ApiModelProperty("状态 0:健康 1:治愈 2:隔离 3:疑似 4:确诊") - private Byte healthType; - @ApiModelProperty("名字") + @ApiModelProperty("状态") + private String healthType; + @ApiModelProperty("状态对应:名字") private String healthTypeName; @ApiModelProperty("就诊医院") private String hospital; diff --git a/health/src/main/java/com/ccsens/health/util/HealthConstant.java b/health/src/main/java/com/ccsens/health/util/HealthConstant.java index c157d3ab..369b9f8f 100644 --- a/health/src/main/java/com/ccsens/health/util/HealthConstant.java +++ b/health/src/main/java/com/ccsens/health/util/HealthConstant.java @@ -1,15 +1,24 @@ package com.ccsens.health.util; +import cn.hutool.core.date.DateUtil; +import org.springframework.beans.factory.annotation.Value; + /** * 健康码项目常量类 * @author whj */ public class HealthConstant { + public static String school; + @Value("${health.school:}") + public void setSchool(String school) { + HealthConstant.school = school; + } + /*** redis key: 总人数*/ - public static final String MEMBER_TOTAL_REDIS = "health_member_total_redis"; + public static final String MEMBER_TOTAL_REDIS = school + "health_member_total_redis"; /** redis key: 返校行程总人数*/ - public static final String BACK_SCHOOL_TOTAL_REDIS = "health_back_school_total_redis"; + public static final String BACK_SCHOOL_TOTAL_REDIS = school + "health_back_school_total_redis"; /** redis有效时长:30天 */ public static final long REDIS_TIME = 30 * 24 * 60 * 60; @@ -41,4 +50,13 @@ public class HealthConstant { public static String getHealthTypeKey(long healthTypeId) { return "health_type_" + healthTypeId; } + + /** + * 查询学校今天健康记录key + * + * @return + */ + public static String getHealthRecordNow() { + return school + "health_record_" + DateUtil.today(); + } } diff --git a/health/src/main/resources/application-dev.yml b/health/src/main/resources/application-dev.yml index 1a4eac84..b2ec6fe0 100644 --- a/health/src/main/resources/application-dev.yml +++ b/health/src/main/resources/application-dev.yml @@ -34,4 +34,6 @@ file: path: /home/cloud/health/uploads/ domain: http://localhost:7080/ imgDomain: http://localhost:7080/uploads - qrCode: https://localhost:7080/gateway/health/uploads/ \ No newline at end of file + qrCode: https://localhost:7080/gateway/health/uploads/ +health: + school: sxdx \ No newline at end of file diff --git a/health/src/main/resources/application-prod.yml b/health/src/main/resources/application-prod.yml index 82993fe4..6db11ffa 100644 --- a/health/src/main/resources/application-prod.yml +++ b/health/src/main/resources/application-prod.yml @@ -36,4 +36,6 @@ file: path: /home/cloud/health/uploads/ domain: https://sd.tall.com/gateway/health/ imgDomain: https://sd.tall.com/gateway/health/uploads - qrCode: https://www.tall.wiki/gateway/health/uploads/ \ No newline at end of file + qrCode: https://www.tall.wiki/gateway/health/uploads/ +health: + school: sxdx \ No newline at end of file diff --git a/health/src/main/resources/application-test.yml b/health/src/main/resources/application-test.yml index a395f7d4..5f486448 100644 --- a/health/src/main/resources/application-test.yml +++ b/health/src/main/resources/application-test.yml @@ -36,4 +36,6 @@ file: path: /home/cloud/health/uploads/ domain: https://test.tall.wiki/gateway/health/ imgDomain: https://test.tall.wiki/gateway/health/uploads - qrCode: https://test.tall.wiki/gateway/health/uploads/ \ No newline at end of file + qrCode: https://test.tall.wiki/gateway/health/uploads/ +health: + school: sxdx \ No newline at end of file diff --git a/health/src/main/resources/mapper_dao/JourneyDao.xml b/health/src/main/resources/mapper_dao/JourneyDao.xml index 5a4ee415..2498ed7e 100644 --- a/health/src/main/resources/mapper_dao/JourneyDao.xml +++ b/health/src/main/resources/mapper_dao/JourneyDao.xml @@ -62,7 +62,7 @@ select t1.department as className, t1.totalNum, ifNull(t2.backNum,0) as backNum, t1.totalNum-IFNULL(t2.backNum,0) as noBackNum from (select department, count(id) as totalNum from t_member where type in (0,1) - and department = #{className} + and department like concat('%',#{className},'%') group by department) t1 left join diff --git a/health/src/main/resources/mapper_dao/SiteClockInDao.xml b/health/src/main/resources/mapper_dao/SiteClockInDao.xml index 8f0bcf38..f85abd17 100644 --- a/health/src/main/resources/mapper_dao/SiteClockInDao.xml +++ b/health/src/main/resources/mapper_dao/SiteClockInDao.xml @@ -15,7 +15,6 @@ - @@ -65,7 +64,7 @@ select i.user_id as userId, a.no, a.name, m.department, s.id as siteId, s.site_name as siteName, i.time, i.out_time as outTime from - t_site_clock_in i left join t_real_name_auth a on i.user_id = a.id + t_site_clock_in i left join t_real_name_auth a on i.user_id = a.user_id left join t_site s on i.site_id = s.id left join t_member m on a.no = m.wkno - - (s.id = #{item.siteId} and i.out_time >= #{item.inTime} and i.time <= #{item.outTime}) + + (s.id = #{item.siteId} and i.out_time >= #{item.time} and i.time <= #{item.outTime}) and i.rec_status = 0