Browse Source

修改上报信息的参数

master
zhangye 5 years ago
parent
commit
58280e8f21
  1. 13
      ct/src/main/java/com/ccsens/ct/api/SiteController.java
  2. 7
      ct/src/main/java/com/ccsens/ct/bean/dto/SiteDto.java
  3. 12
      ct/src/main/java/com/ccsens/ct/bean/po/Business.java
  4. 56
      ct/src/main/java/com/ccsens/ct/bean/po/BusinessExample.java
  5. 21
      ct/src/main/java/com/ccsens/ct/bean/vo/SiteVo.java
  6. 3
      ct/src/main/java/com/ccsens/ct/persist/dao/SiteDao.java
  7. 10
      ct/src/main/java/com/ccsens/ct/service/BusinessService.java
  8. 4
      ct/src/main/java/com/ccsens/ct/service/ISiteService.java
  9. 25
      ct/src/main/java/com/ccsens/ct/service/SiteService.java
  10. 37
      ct/src/main/resources/mapper_dao/SiteDao.xml
  11. 28
      ct/src/main/resources/mapper_raw/BusinessMapper.xml
  12. 22
      health/src/main/java/com/ccsens/health/bean/dto/HealthDto.java
  13. 8
      health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java
  14. 78
      health/src/main/java/com/ccsens/health/bean/po/HealthRecords.java
  15. 438
      health/src/main/java/com/ccsens/health/bean/po/HealthRecordsExample.java
  16. 11
      health/src/main/java/com/ccsens/health/bean/po/Journey.java
  17. 60
      health/src/main/java/com/ccsens/health/bean/po/JourneyExample.java
  18. 18
      health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java
  19. 6
      health/src/main/java/com/ccsens/health/bean/vo/JourneyVo.java
  20. 16
      health/src/main/java/com/ccsens/health/service/ClockService.java
  21. 10
      health/src/main/java/com/ccsens/health/service/HealthService.java
  22. 11
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  23. 6
      health/src/main/resources/application-prod.yml
  24. 129
      health/src/main/resources/mapper_raw/HealthRecordsMapper.xml
  25. 31
      health/src/main/resources/mapper_raw/JourneyMapper.xml

13
ct/src/main/java/com/ccsens/ct/api/SiteController.java

@ -40,7 +40,7 @@ public class SiteController {
}
@MustLogin
@ApiOperation(value = "过id查看单个场所的信息", notes = "")
@ApiOperation(value = "通过过id查看单个场所的信息", notes = "")
@RequestMapping(value = "siteId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteInfo> selectSite(@ApiParam @Validated @RequestBody QueryDto<SiteDto.SiteId> params) throws Exception {
log.info("透过id查看单个场所的信息:{}",params);
@ -60,7 +60,7 @@ public class SiteController {
@MustLogin
@ApiOperation(value = "过商户id查看所有场所的信息", notes = "")
@ApiOperation(value = "过商户id查看所有场所的信息", notes = "")
@RequestMapping(value = "siteAll", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteInfoVo> selectSiteAllByBusinessId(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessId> params) throws Exception {
log.info("透过商户id查看所有场所的信息:{}",params);
@ -76,4 +76,13 @@ public class SiteController {
// String path = siteService.downloadQrCode(params.getParam().getId());
// return JsonResponse.newInstance().ok(path);
// }
@MustLogin
@ApiOperation(value = "通过打卡扫码得到的id,获取场所信息和商户信息", notes = "")
@RequestMapping(value = "siteInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteClockVo> selectSiteInfoByClockId(@ApiParam @Validated @RequestBody QueryDto<SiteDto.SiteClockId> params) throws Exception {
log.info("通过打卡扫码得到的id,获取场所信息和商户信息:{}",params);
SiteVo.SiteClockVo siteClockVo = siteService.selectSiteInfoByClockId(params.getParam().getId());
return JsonResponse.newInstance().ok(siteClockVo);
}
}

7
ct/src/main/java/com/ccsens/ct/bean/dto/SiteDto.java

@ -60,4 +60,11 @@ public class SiteDto {
@ApiModelProperty("场所id")
private Long id;
}
@Data
@ApiModel("扫码时获取的场所进出id")
public static class SiteClockId{
@ApiModelProperty("扫码时获取的场所进出id")
private Long id;
}
}

12
ct/src/main/java/com/ccsens/ct/bean/po/Business.java

@ -18,7 +18,7 @@ public class Business implements Serializable {
private String businessLicense;
private String qrCord;
private String qrCode;
private Long userId;
@ -88,12 +88,12 @@ public class Business implements Serializable {
this.businessLicense = businessLicense == null ? null : businessLicense.trim();
}
public String getQrCord() {
return qrCord;
public String getQrCode() {
return qrCode;
}
public void setQrCord(String qrCord) {
this.qrCord = qrCord == null ? null : qrCord.trim();
public void setQrCode(String qrCode) {
this.qrCode = qrCode == null ? null : qrCode.trim();
}
public Long getUserId() {
@ -149,7 +149,7 @@ public class Business implements Serializable {
sb.append(", applicantIdCard=").append(applicantIdCard);
sb.append(", applicantPhone=").append(applicantPhone);
sb.append(", businessLicense=").append(businessLicense);
sb.append(", qrCord=").append(qrCord);
sb.append(", qrCode=").append(qrCode);
sb.append(", userId=").append(userId);
sb.append(", passed=").append(passed);
sb.append(", createdAt=").append(createdAt);

56
ct/src/main/java/com/ccsens/ct/bean/po/BusinessExample.java

@ -585,73 +585,73 @@ public class BusinessExample {
return (Criteria) this;
}
public Criteria andQrCordIsNull() {
addCriterion("qr_cord is null");
public Criteria andQrCodeIsNull() {
addCriterion("qr_code is null");
return (Criteria) this;
}
public Criteria andQrCordIsNotNull() {
addCriterion("qr_cord is not null");
public Criteria andQrCodeIsNotNull() {
addCriterion("qr_code is not null");
return (Criteria) this;
}
public Criteria andQrCordEqualTo(String value) {
addCriterion("qr_cord =", value, "qrCord");
public Criteria andQrCodeEqualTo(String value) {
addCriterion("qr_code =", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordNotEqualTo(String value) {
addCriterion("qr_cord <>", value, "qrCord");
public Criteria andQrCodeNotEqualTo(String value) {
addCriterion("qr_code <>", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordGreaterThan(String value) {
addCriterion("qr_cord >", value, "qrCord");
public Criteria andQrCodeGreaterThan(String value) {
addCriterion("qr_code >", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordGreaterThanOrEqualTo(String value) {
addCriterion("qr_cord >=", value, "qrCord");
public Criteria andQrCodeGreaterThanOrEqualTo(String value) {
addCriterion("qr_code >=", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordLessThan(String value) {
addCriterion("qr_cord <", value, "qrCord");
public Criteria andQrCodeLessThan(String value) {
addCriterion("qr_code <", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordLessThanOrEqualTo(String value) {
addCriterion("qr_cord <=", value, "qrCord");
public Criteria andQrCodeLessThanOrEqualTo(String value) {
addCriterion("qr_code <=", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordLike(String value) {
addCriterion("qr_cord like", value, "qrCord");
public Criteria andQrCodeLike(String value) {
addCriterion("qr_code like", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordNotLike(String value) {
addCriterion("qr_cord not like", value, "qrCord");
public Criteria andQrCodeNotLike(String value) {
addCriterion("qr_code not like", value, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordIn(List<String> values) {
addCriterion("qr_cord in", values, "qrCord");
public Criteria andQrCodeIn(List<String> values) {
addCriterion("qr_code in", values, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordNotIn(List<String> values) {
addCriterion("qr_cord not in", values, "qrCord");
public Criteria andQrCodeNotIn(List<String> values) {
addCriterion("qr_code not in", values, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordBetween(String value1, String value2) {
addCriterion("qr_cord between", value1, value2, "qrCord");
public Criteria andQrCodeBetween(String value1, String value2) {
addCriterion("qr_code between", value1, value2, "qrCode");
return (Criteria) this;
}
public Criteria andQrCordNotBetween(String value1, String value2) {
addCriterion("qr_cord not between", value1, value2, "qrCord");
public Criteria andQrCodeNotBetween(String value1, String value2) {
addCriterion("qr_code not between", value1, value2, "qrCode");
return (Criteria) this;
}

21
ct/src/main/java/com/ccsens/ct/bean/vo/SiteVo.java

@ -41,4 +41,25 @@ public class SiteVo {
@ApiModelProperty("纬度")
private BigDecimal latitude;
}
@Data
@ApiModel("通过场所进出的二维码id查询的场所和商户信息")
public static class SiteClockVo{
@ApiModelProperty("场所id")
private Long siteId;
@ApiModelProperty("场所名称")
private String siteName;
@ApiModelProperty("进出类型 0进 1出")
private int type;
@ApiModelProperty("经度")
private BigDecimal longitude;
@ApiModelProperty("纬度")
private BigDecimal latitude;
@ApiModelProperty("所属商户id")
private Long businessId;
@ApiModelProperty("所属商户名称")
private String businessName;
@ApiModelProperty("所属商户公众号的二维码")
private String businessQrCode;
}
}

3
ct/src/main/java/com/ccsens/ct/persist/dao/SiteDao.java

@ -1,8 +1,11 @@
package com.ccsens.ct.persist.dao;
import com.ccsens.ct.bean.vo.SiteVo;
import com.ccsens.ct.persist.mapper.SiteMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface SiteDao extends SiteMapper {
SiteVo.SiteClockVo selectSiteInfoByClockId(@Param("siteQrCodeId") Long siteQrCodeId);
}

10
ct/src/main/java/com/ccsens/ct/service/BusinessService.java

@ -63,7 +63,7 @@ public class BusinessService implements IBusinessService{
business.setApplicantIdCard(businessInfo.getIdCard());
business.setApplicantPhone(businessInfo.getPhone());
business.setBusinessLicense(businessLicensePath);
business.setQrCord(qrCodePath);
business.setQrCode(qrCodePath);
business.setUserId(userId);
businessDao.insertSelective(business);
//返回
@ -75,7 +75,7 @@ public class BusinessService implements IBusinessService{
businessInfoVo.setIdCard(business.getApplicantIdCard());
businessInfoVo.setPhone(business.getApplicantPhone());
businessInfoVo.setBusinessLicense(business.getBusinessLicense());
businessInfoVo.setQrCode(business.getQrCord());
businessInfoVo.setQrCode(business.getQrCode());
return businessInfoVo;
}
@ -103,7 +103,7 @@ public class BusinessService implements IBusinessService{
businessInfo.setApplicantName(business.getApplicantName());
businessInfo.setPhone(business.getApplicantPhone());
businessInfo.setBusinessLicense(business.getBusinessLicense());
businessInfo.setQrCode(business.getQrCord());
businessInfo.setQrCode(business.getQrCode());
}
return businessInfo;
}
@ -151,7 +151,7 @@ public class BusinessService implements IBusinessService{
if(StrUtil.isNotEmpty(updateBusiness.getQrCode())){
String qrCodeName = Base64FileUtil.base64ToFile(updateBusiness.getQrCode(),path,fileName);
String qrCodePath = WebConstant.TEST_URL_BASE_CT + "/business/" + qrCodeName;
business.setQrCord(qrCodePath);
business.setQrCode(qrCodePath);
}
businessDao.updateByPrimaryKeySelective(business);
//返回
@ -163,7 +163,7 @@ public class BusinessService implements IBusinessService{
businessInfoVo.setIdCard(business.getApplicantIdCard());
businessInfoVo.setPhone(business.getApplicantPhone());
businessInfoVo.setBusinessLicense(business.getBusinessLicense());
businessInfoVo.setQrCode(business.getQrCord());
businessInfoVo.setQrCode(business.getQrCode());
return businessInfoVo;
}

4
ct/src/main/java/com/ccsens/ct/service/ISiteService.java

@ -17,5 +17,7 @@ public interface ISiteService {
SiteVo.SiteInfoVo selectSiteAllByBusinessId(Long businessId);
String downloadQrCode(Long businessId);
// String downloadQrCode(Long businessId);
SiteVo.SiteClockVo selectSiteInfoByClockId(Long id);
}

25
ct/src/main/java/com/ccsens/ct/service/SiteService.java

@ -85,8 +85,8 @@ public class SiteService implements ISiteService {
inSiteQrcode.setId(snowflake.nextId());
inSiteQrcode.setSiteId(site.getId());
inSiteQrcode.setOutOrIn((byte) 0);
String inFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev?id=" + inSiteQrcode.getId(), path + "/in/",0);
String bigInFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev?id=" + inSiteQrcode.getId(), path + "/in/",1);
String inFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + inSiteQrcode.getId(), path + "/in/",0);
String bigInFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + inSiteQrcode.getId(), path + "/in/",1);
inSiteQrcode.setQrcodePath(WebConstant.TEST_URL_BASE_CT +"/business/" + siteInfoDto.getId() + "/siteqrcode/" + site.getSiteName() + "/in/" + inFileName);
inSiteQrcode.setBigQrcodePath(WebConstant.TEST_URL_BASE_CT + "/business/" + siteInfoDto.getId() + "/siteqrcode/" + site.getSiteName() + "/in" + bigInFileName);
@ -221,7 +221,7 @@ public class SiteService implements ISiteService {
siteInfoVo.setBusinessId(business.getId());
siteInfoVo.setBusinessName(business.getName());
//TODO
siteInfoVo.setPath("http://test.tall.wiki/ct-dev/sign-history");
siteInfoVo.setPath("http://test.tall.wiki/ct-dev/sign-history?id="+business.getId());
siteInfoVo.setDownloadPath(WebConstant.TEST_URL_BASE_CT + "/business/" + business.getId() + "/QrCode.zip");
//获取场所信息
List<SiteVo.SiteInfo> siteInfoList = new ArrayList<>();
@ -239,12 +239,23 @@ public class SiteService implements ISiteService {
}
/**
* 下载商户下的所有场所的二维码
* @param businessId
* 通过扫码获取的场所进出id获取场所和商户的信息
* @param id
* @return
*/
@Override
public String downloadQrCode(Long businessId) {
return null;
public SiteVo.SiteClockVo selectSiteInfoByClockId(Long id) {
SiteVo.SiteClockVo siteClockVo = siteDao.selectSiteInfoByClockId(id);
return siteClockVo;
}
// /**
// * 下载商户下的所有场所的二维码
// * @param businessId
// * @return
// */
// @Override
// public String downloadQrCode(Long businessId) {
// return null;
// }
}

37
ct/src/main/resources/mapper_dao/SiteDao.xml

@ -1,28 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.ct.persist.dao.SiteDao">
<resultMap id="resultMap_siteInfo" type="com.ccsens.ct.bean.vo.SiteVo$SiteInfo">
<id column="sId" property="id"/>
<result column="sName" property="name"/>
<result column="sOutQrCode" property="outQrCode"/>
<result column="sInQrCode" property="inQrCode"/>
<result column="sLatitude" property="latitude"/>
<result column="sLongitude" property="longitude"/>
<resultMap id="resultMap_siteClockInfo" type="com.ccsens.ct.bean.vo.SiteVo$SiteClockVo">
<id column="siteId" property="siteId"/>
<result column="siteName" property="siteName"/>
<result column="type" property="type"/>
<result column="latitude" property="latitude"/>
<result column="longitude" property="longitude"/>
<result column="businessId" property="businessId"/>
<result column="businessName" property="businessName"/>
<result column="businessQrCode" property="businessQrCode"/>
</resultMap>
<select id="selectSiteById" resultMap="resultMap_siteInfo" parameterType="java.util.Map">
<select id="selectSiteInfoByClockId" resultMap="resultMap_siteClockInfo" parameterType="java.util.Map">
select
s.id as sId,
s.site_name as sName,
c.time as sTime,
s.longitude as sLongitude,
s.latitude as sLatitude
s.id as siteId,
s.site_name as siteName,
s.longitude as longitude,
s.latitude as latitude,
q.out_or_in as type,
b.id as businessId,
b.name as businessName,
b.qr_code as businessQrCode
from
t_site s join t_site_qrcode q on q.site_id = s.id
t_site_qrcode q join t_site s on q.site_id = s.id join t_business b on s.business_id = b.id
where
b.rec_status = 0
and
s.rec_status = 0
and
s.id = #{siteId}
q.id = #{siteQrCodeId}
</select>
</mapper>

28
ct/src/main/resources/mapper_raw/BusinessMapper.xml

@ -9,7 +9,7 @@
<result column="applicant_id_card" jdbcType="VARCHAR" property="applicantIdCard" />
<result column="applicant_phone" jdbcType="VARCHAR" property="applicantPhone" />
<result column="business_license" jdbcType="VARCHAR" property="businessLicense" />
<result column="qr_cord" jdbcType="VARCHAR" property="qrCord" />
<result column="qr_code" jdbcType="VARCHAR" property="qrCode" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="passed" jdbcType="TINYINT" property="passed" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -76,7 +76,7 @@
</sql>
<sql id="Base_Column_List">
id, name, address, applicant_name, applicant_id_card, applicant_phone, business_license,
qr_cord, user_id, passed, created_at, updated_at, rec_status
qr_code, user_id, passed, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.ct.bean.po.BusinessExample" resultMap="BaseResultMap">
select
@ -111,12 +111,12 @@
<insert id="insert" parameterType="com.ccsens.ct.bean.po.Business">
insert into t_business (id, name, address,
applicant_name, applicant_id_card, applicant_phone,
business_license, qr_cord, user_id,
business_license, qr_code, user_id,
passed, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{applicantName,jdbcType=VARCHAR}, #{applicantIdCard,jdbcType=VARCHAR}, #{applicantPhone,jdbcType=VARCHAR},
#{businessLicense,jdbcType=VARCHAR}, #{qrCord,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
#{businessLicense,jdbcType=VARCHAR}, #{qrCode,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
#{passed,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
@ -144,8 +144,8 @@
<if test="businessLicense != null">
business_license,
</if>
<if test="qrCord != null">
qr_cord,
<if test="qrCode != null">
qr_code,
</if>
<if test="userId != null">
user_id,
@ -185,8 +185,8 @@
<if test="businessLicense != null">
#{businessLicense,jdbcType=VARCHAR},
</if>
<if test="qrCord != null">
#{qrCord,jdbcType=VARCHAR},
<if test="qrCode != null">
#{qrCode,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
@ -235,8 +235,8 @@
<if test="record.businessLicense != null">
business_license = #{record.businessLicense,jdbcType=VARCHAR},
</if>
<if test="record.qrCord != null">
qr_cord = #{record.qrCord,jdbcType=VARCHAR},
<if test="record.qrCode != null">
qr_code = #{record.qrCode,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
@ -267,7 +267,7 @@
applicant_id_card = #{record.applicantIdCard,jdbcType=VARCHAR},
applicant_phone = #{record.applicantPhone,jdbcType=VARCHAR},
business_license = #{record.businessLicense,jdbcType=VARCHAR},
qr_cord = #{record.qrCord,jdbcType=VARCHAR},
qr_code = #{record.qrCode,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=BIGINT},
passed = #{record.passed,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -298,8 +298,8 @@
<if test="businessLicense != null">
business_license = #{businessLicense,jdbcType=VARCHAR},
</if>
<if test="qrCord != null">
qr_cord = #{qrCord,jdbcType=VARCHAR},
<if test="qrCode != null">
qr_code = #{qrCode,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
@ -327,7 +327,7 @@
applicant_id_card = #{applicantIdCard,jdbcType=VARCHAR},
applicant_phone = #{applicantPhone,jdbcType=VARCHAR},
business_license = #{businessLicense,jdbcType=VARCHAR},
qr_cord = #{qrCord,jdbcType=VARCHAR},
qr_code = #{qrCode,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=BIGINT},
passed = #{passed,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

22
health/src/main/java/com/ccsens/health/bean/dto/HealthDto.java

@ -23,14 +23,32 @@ public class HealthDto {
private String address;
@ApiModelProperty("当前身体状态")
private Long healthTypeId;
@ApiModelProperty("体温")
private BigDecimal animalHeat;
@ApiModelProperty("就诊医院")
private String hospital;
@ApiModelProperty("有无湖北武汉接触史 0没有 1有")
private int touchHubei;
@ApiModelProperty("有无接触患者 0无 1有")
private int touchSick;
@ApiModelProperty("体温")
private BigDecimal animalHeat;
@ApiModelProperty("有无境外人员接触史 0无 1有")
private int touchOverseas;
@ApiModelProperty("是否在学校所在地 0无 1有")
private int schoolLocation;
@ApiModelProperty("紧急联系人姓名")
private String emergencyName;
@ApiModelProperty("紧急联系人电话")
private String emergencyPhone;
@ApiModelProperty("备注信息")
private String remark;
@Min(value = 1)
@Max(value=1)
@ApiModelProperty("是否同意疫情防控协议 0无 1有")
private int healthAgreement;
@Min(value = 1)
@Max(value=1)
@ApiModelProperty("是否本人填写 0无 1有")
private int selfFill;
}
@ApiModel("查询健康上报列表参数")

8
health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java

@ -30,6 +30,14 @@ public class JourneyDto {
private Long endTime;
@ApiModelProperty("同行人员")
private String together;
@Min(value = 1)
@Max(value=1)
@ApiModelProperty("是否同意疫情防控协议 0无 1有")
private int healthAgreement;
@Min(value = 1)
@Max(value=1)
@ApiModelProperty("是否本人填写 0无 1有")
private int selfFill;
}
@Data

78
health/src/main/java/com/ccsens/health/bean/po/HealthRecords.java

@ -17,13 +17,25 @@ public class HealthRecords implements Serializable {
private Long healthTypeId;
private BigDecimal animalHeat;
private String hospital;
private Byte touchHubei;
private Byte touchSick;
private BigDecimal animalHeat;
private Byte touchOverseas;
private Byte schoolLocation;
private String emergencyName;
private String emergencyPhone;
private String remark;
private Byte healthAgreement;
private Byte selfFill;
@ -83,6 +95,14 @@ public class HealthRecords implements Serializable {
this.healthTypeId = healthTypeId;
}
public BigDecimal getAnimalHeat() {
return animalHeat;
}
public void setAnimalHeat(BigDecimal animalHeat) {
this.animalHeat = animalHeat;
}
public String getHospital() {
return hospital;
}
@ -107,12 +127,52 @@ public class HealthRecords implements Serializable {
this.touchSick = touchSick;
}
public BigDecimal getAnimalHeat() {
return animalHeat;
public Byte getTouchOverseas() {
return touchOverseas;
}
public void setAnimalHeat(BigDecimal animalHeat) {
this.animalHeat = animalHeat;
public void setTouchOverseas(Byte touchOverseas) {
this.touchOverseas = touchOverseas;
}
public Byte getSchoolLocation() {
return schoolLocation;
}
public void setSchoolLocation(Byte schoolLocation) {
this.schoolLocation = schoolLocation;
}
public String getEmergencyName() {
return emergencyName;
}
public void setEmergencyName(String emergencyName) {
this.emergencyName = emergencyName == null ? null : emergencyName.trim();
}
public String getEmergencyPhone() {
return emergencyPhone;
}
public void setEmergencyPhone(String emergencyPhone) {
this.emergencyPhone = emergencyPhone == null ? null : emergencyPhone.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Byte getHealthAgreement() {
return healthAgreement;
}
public void setHealthAgreement(Byte healthAgreement) {
this.healthAgreement = healthAgreement;
}
public Byte getSelfFill() {
@ -159,10 +219,16 @@ public class HealthRecords implements Serializable {
sb.append(", district=").append(district);
sb.append(", address=").append(address);
sb.append(", healthTypeId=").append(healthTypeId);
sb.append(", animalHeat=").append(animalHeat);
sb.append(", hospital=").append(hospital);
sb.append(", touchHubei=").append(touchHubei);
sb.append(", touchSick=").append(touchSick);
sb.append(", animalHeat=").append(animalHeat);
sb.append(", touchOverseas=").append(touchOverseas);
sb.append(", schoolLocation=").append(schoolLocation);
sb.append(", emergencyName=").append(emergencyName);
sb.append(", emergencyPhone=").append(emergencyPhone);
sb.append(", remark=").append(remark);
sb.append(", healthAgreement=").append(healthAgreement);
sb.append(", selfFill=").append(selfFill);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);

438
health/src/main/java/com/ccsens/health/bean/po/HealthRecordsExample.java

@ -486,6 +486,66 @@ public class HealthRecordsExample {
return (Criteria) this;
}
public Criteria andAnimalHeatIsNull() {
addCriterion("animal_heat is null");
return (Criteria) this;
}
public Criteria andAnimalHeatIsNotNull() {
addCriterion("animal_heat is not null");
return (Criteria) this;
}
public Criteria andAnimalHeatEqualTo(BigDecimal value) {
addCriterion("animal_heat =", value, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatNotEqualTo(BigDecimal value) {
addCriterion("animal_heat <>", value, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatGreaterThan(BigDecimal value) {
addCriterion("animal_heat >", value, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("animal_heat >=", value, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatLessThan(BigDecimal value) {
addCriterion("animal_heat <", value, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatLessThanOrEqualTo(BigDecimal value) {
addCriterion("animal_heat <=", value, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatIn(List<BigDecimal> values) {
addCriterion("animal_heat in", values, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatNotIn(List<BigDecimal> values) {
addCriterion("animal_heat not in", values, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("animal_heat between", value1, value2, "animalHeat");
return (Criteria) this;
}
public Criteria andAnimalHeatNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("animal_heat not between", value1, value2, "animalHeat");
return (Criteria) this;
}
public Criteria andHospitalIsNull() {
addCriterion("hospital is null");
return (Criteria) this;
@ -676,63 +736,393 @@ public class HealthRecordsExample {
return (Criteria) this;
}
public Criteria andAnimalHeatIsNull() {
addCriterion("animal_heat is null");
public Criteria andTouchOverseasIsNull() {
addCriterion("touch_overseas is null");
return (Criteria) this;
}
public Criteria andAnimalHeatIsNotNull() {
addCriterion("animal_heat is not null");
public Criteria andTouchOverseasIsNotNull() {
addCriterion("touch_overseas is not null");
return (Criteria) this;
}
public Criteria andAnimalHeatEqualTo(BigDecimal value) {
addCriterion("animal_heat =", value, "animalHeat");
public Criteria andTouchOverseasEqualTo(Byte value) {
addCriterion("touch_overseas =", value, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatNotEqualTo(BigDecimal value) {
addCriterion("animal_heat <>", value, "animalHeat");
public Criteria andTouchOverseasNotEqualTo(Byte value) {
addCriterion("touch_overseas <>", value, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatGreaterThan(BigDecimal value) {
addCriterion("animal_heat >", value, "animalHeat");
public Criteria andTouchOverseasGreaterThan(Byte value) {
addCriterion("touch_overseas >", value, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("animal_heat >=", value, "animalHeat");
public Criteria andTouchOverseasGreaterThanOrEqualTo(Byte value) {
addCriterion("touch_overseas >=", value, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatLessThan(BigDecimal value) {
addCriterion("animal_heat <", value, "animalHeat");
public Criteria andTouchOverseasLessThan(Byte value) {
addCriterion("touch_overseas <", value, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatLessThanOrEqualTo(BigDecimal value) {
addCriterion("animal_heat <=", value, "animalHeat");
public Criteria andTouchOverseasLessThanOrEqualTo(Byte value) {
addCriterion("touch_overseas <=", value, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatIn(List<BigDecimal> values) {
addCriterion("animal_heat in", values, "animalHeat");
public Criteria andTouchOverseasIn(List<Byte> values) {
addCriterion("touch_overseas in", values, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatNotIn(List<BigDecimal> values) {
addCriterion("animal_heat not in", values, "animalHeat");
public Criteria andTouchOverseasNotIn(List<Byte> values) {
addCriterion("touch_overseas not in", values, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("animal_heat between", value1, value2, "animalHeat");
public Criteria andTouchOverseasBetween(Byte value1, Byte value2) {
addCriterion("touch_overseas between", value1, value2, "touchOverseas");
return (Criteria) this;
}
public Criteria andAnimalHeatNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("animal_heat not between", value1, value2, "animalHeat");
public Criteria andTouchOverseasNotBetween(Byte value1, Byte value2) {
addCriterion("touch_overseas not between", value1, value2, "touchOverseas");
return (Criteria) this;
}
public Criteria andSchoolLocationIsNull() {
addCriterion("school_location is null");
return (Criteria) this;
}
public Criteria andSchoolLocationIsNotNull() {
addCriterion("school_location is not null");
return (Criteria) this;
}
public Criteria andSchoolLocationEqualTo(Byte value) {
addCriterion("school_location =", value, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationNotEqualTo(Byte value) {
addCriterion("school_location <>", value, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationGreaterThan(Byte value) {
addCriterion("school_location >", value, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationGreaterThanOrEqualTo(Byte value) {
addCriterion("school_location >=", value, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationLessThan(Byte value) {
addCriterion("school_location <", value, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationLessThanOrEqualTo(Byte value) {
addCriterion("school_location <=", value, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationIn(List<Byte> values) {
addCriterion("school_location in", values, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationNotIn(List<Byte> values) {
addCriterion("school_location not in", values, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationBetween(Byte value1, Byte value2) {
addCriterion("school_location between", value1, value2, "schoolLocation");
return (Criteria) this;
}
public Criteria andSchoolLocationNotBetween(Byte value1, Byte value2) {
addCriterion("school_location not between", value1, value2, "schoolLocation");
return (Criteria) this;
}
public Criteria andEmergencyNameIsNull() {
addCriterion("emergency_name is null");
return (Criteria) this;
}
public Criteria andEmergencyNameIsNotNull() {
addCriterion("emergency_name is not null");
return (Criteria) this;
}
public Criteria andEmergencyNameEqualTo(String value) {
addCriterion("emergency_name =", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameNotEqualTo(String value) {
addCriterion("emergency_name <>", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameGreaterThan(String value) {
addCriterion("emergency_name >", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameGreaterThanOrEqualTo(String value) {
addCriterion("emergency_name >=", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameLessThan(String value) {
addCriterion("emergency_name <", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameLessThanOrEqualTo(String value) {
addCriterion("emergency_name <=", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameLike(String value) {
addCriterion("emergency_name like", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameNotLike(String value) {
addCriterion("emergency_name not like", value, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameIn(List<String> values) {
addCriterion("emergency_name in", values, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameNotIn(List<String> values) {
addCriterion("emergency_name not in", values, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameBetween(String value1, String value2) {
addCriterion("emergency_name between", value1, value2, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyNameNotBetween(String value1, String value2) {
addCriterion("emergency_name not between", value1, value2, "emergencyName");
return (Criteria) this;
}
public Criteria andEmergencyPhoneIsNull() {
addCriterion("emergency_phone is null");
return (Criteria) this;
}
public Criteria andEmergencyPhoneIsNotNull() {
addCriterion("emergency_phone is not null");
return (Criteria) this;
}
public Criteria andEmergencyPhoneEqualTo(String value) {
addCriterion("emergency_phone =", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneNotEqualTo(String value) {
addCriterion("emergency_phone <>", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneGreaterThan(String value) {
addCriterion("emergency_phone >", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneGreaterThanOrEqualTo(String value) {
addCriterion("emergency_phone >=", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneLessThan(String value) {
addCriterion("emergency_phone <", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneLessThanOrEqualTo(String value) {
addCriterion("emergency_phone <=", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneLike(String value) {
addCriterion("emergency_phone like", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneNotLike(String value) {
addCriterion("emergency_phone not like", value, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneIn(List<String> values) {
addCriterion("emergency_phone in", values, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneNotIn(List<String> values) {
addCriterion("emergency_phone not in", values, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneBetween(String value1, String value2) {
addCriterion("emergency_phone between", value1, value2, "emergencyPhone");
return (Criteria) this;
}
public Criteria andEmergencyPhoneNotBetween(String value1, String value2) {
addCriterion("emergency_phone not between", value1, value2, "emergencyPhone");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andHealthAgreementIsNull() {
addCriterion("health_agreement is null");
return (Criteria) this;
}
public Criteria andHealthAgreementIsNotNull() {
addCriterion("health_agreement is not null");
return (Criteria) this;
}
public Criteria andHealthAgreementEqualTo(Byte value) {
addCriterion("health_agreement =", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementNotEqualTo(Byte value) {
addCriterion("health_agreement <>", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementGreaterThan(Byte value) {
addCriterion("health_agreement >", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementGreaterThanOrEqualTo(Byte value) {
addCriterion("health_agreement >=", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementLessThan(Byte value) {
addCriterion("health_agreement <", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementLessThanOrEqualTo(Byte value) {
addCriterion("health_agreement <=", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementIn(List<Byte> values) {
addCriterion("health_agreement in", values, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementNotIn(List<Byte> values) {
addCriterion("health_agreement not in", values, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementBetween(Byte value1, Byte value2) {
addCriterion("health_agreement between", value1, value2, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementNotBetween(Byte value1, Byte value2) {
addCriterion("health_agreement not between", value1, value2, "healthAgreement");
return (Criteria) this;
}

11
health/src/main/java/com/ccsens/health/bean/po/Journey.java

@ -20,6 +20,8 @@ public class Journey implements Serializable {
private String together;
private Byte healthAgreement;
private Byte selfFill;
private Date createdAt;
@ -94,6 +96,14 @@ public class Journey implements Serializable {
this.together = together == null ? null : together.trim();
}
public Byte getHealthAgreement() {
return healthAgreement;
}
public void setHealthAgreement(Byte healthAgreement) {
this.healthAgreement = healthAgreement;
}
public Byte getSelfFill() {
return selfFill;
}
@ -140,6 +150,7 @@ public class Journey implements Serializable {
sb.append(", endTime=").append(endTime);
sb.append(", journeyType=").append(journeyType);
sb.append(", together=").append(together);
sb.append(", healthAgreement=").append(healthAgreement);
sb.append(", selfFill=").append(selfFill);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);

60
health/src/main/java/com/ccsens/health/bean/po/JourneyExample.java

@ -605,6 +605,66 @@ public class JourneyExample {
return (Criteria) this;
}
public Criteria andHealthAgreementIsNull() {
addCriterion("health_agreement is null");
return (Criteria) this;
}
public Criteria andHealthAgreementIsNotNull() {
addCriterion("health_agreement is not null");
return (Criteria) this;
}
public Criteria andHealthAgreementEqualTo(Byte value) {
addCriterion("health_agreement =", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementNotEqualTo(Byte value) {
addCriterion("health_agreement <>", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementGreaterThan(Byte value) {
addCriterion("health_agreement >", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementGreaterThanOrEqualTo(Byte value) {
addCriterion("health_agreement >=", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementLessThan(Byte value) {
addCriterion("health_agreement <", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementLessThanOrEqualTo(Byte value) {
addCriterion("health_agreement <=", value, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementIn(List<Byte> values) {
addCriterion("health_agreement in", values, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementNotIn(List<Byte> values) {
addCriterion("health_agreement not in", values, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementBetween(Byte value1, Byte value2) {
addCriterion("health_agreement between", value1, value2, "healthAgreement");
return (Criteria) this;
}
public Criteria andHealthAgreementNotBetween(Byte value1, Byte value2) {
addCriterion("health_agreement not between", value1, value2, "healthAgreement");
return (Criteria) this;
}
public Criteria andSelfFillIsNull() {
addCriterion("self_fill is null");
return (Criteria) this;

18
health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java

@ -24,14 +24,28 @@ public class HealthVo {
private String address;
@ApiModelProperty("当前身体状态")
private Long healthTypeId;
@ApiModelProperty("体温")
private BigDecimal animalHeat;
@ApiModelProperty("就诊医院")
private String hospital;
@ApiModelProperty("有无湖北武汉接触史 0没有 1有")
private int touchHubei;
@ApiModelProperty("有无接触患者 0无 1有")
private int touchSick;
@ApiModelProperty("体温")
private BigDecimal animalHeat;
@ApiModelProperty("有无境外人员接触史 0无 1有")
private int touchOverseas;
@ApiModelProperty("是否在学校所在地 0无 1有")
private int schoolLocation;
@ApiModelProperty("紧急联系人姓名")
private String emergencyName;
@ApiModelProperty("紧急联系人电话")
private String emergencyPhone;
@ApiModelProperty("备注信息")
private String remark;
@ApiModelProperty("是否同意疫情防控协议 0无 1有")
private int healthAgreement;
@ApiModelProperty("是否本人填写 0无 1有")
private int selfFill;
@ApiModelProperty("健康码等级 0正常 1隔离中或疑似 2确诊")
private int healthLevel;
@ApiModelProperty("健康码")

6
health/src/main/java/com/ccsens/health/bean/vo/JourneyVo.java

@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.util.List;
@Data
@ -28,6 +30,10 @@ public class JourneyVo {
private Long endTime;
@ApiModelProperty("同行人员")
private String together;
@ApiModelProperty("是否同意疫情防控协议 0无 1有")
private int healthAgreement;
@ApiModelProperty("是否本人填写 0无 1有")
private int selfFill;
}
@Data

16
health/src/main/java/com/ccsens/health/service/ClockService.java

@ -175,17 +175,17 @@ public class ClockService implements IClockService {
JourneyDto.SelectDate selectDate = params.getParam();
Long startTime = selectDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : selectDate.getStartTime();
Long endTime = selectDate.getEndTime() == null ? System.currentTimeMillis() : selectDate.getEndTime();
String userId = String.valueOf(params.getUserId());
if (StrUtil.isNotBlank(selectDate.getToken())) {
userId = tallFeignClient.getUserId(selectDate.getToken());
if (StrUtil.isEmpty(userId)) {
throw new BaseException(CodeEnum.NOT_LOGIN);
}
}
Long userId = params.getUserId();
// if (StrUtil.isNotBlank(selectDate.getToken())) {
// userId = tallFeignClient.getUserId(selectDate.getToken());
// if (StrUtil.isEmpty(userId)) {
// throw new BaseException(CodeEnum.NOT_LOGIN);
// }
// }
// //2、通过userid查询出成员id
// Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
//3、查询该成员符合时间的记录
List<ClockVo.SiteClockInfo> siteClockInfoList = siteClockInDao.selectHealthInfoByDate(Long.valueOf(userId), startTime, endTime);
List<ClockVo.SiteClockInfo> siteClockInfoList = siteClockInDao.selectHealthInfoByDate(userId, startTime, endTime);
//4、返回
return siteClockInfoList;
}

10
health/src/main/java/com/ccsens/health/service/HealthService.java

@ -131,14 +131,14 @@ public class HealthService implements IHealthService{
JourneyDto.SelectDate selectDate = params.getParam();
Long startTime = selectDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : selectDate.getStartTime();
Long endTime = selectDate.getEndTime() == null ? System.currentTimeMillis() : selectDate.getEndTime();
String userId = tallFeignClient.getUserId(selectDate.getToken());
if(StrUtil.isEmpty(userId)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
Long userId = params.getUserId();
// if(StrUtil.isEmpty(userId)){
// throw new BaseException(CodeEnum.NOT_LOGIN);
// }
// //2、通过userid查询出成员id
// Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
//3、查询该成员符合时间的记录
List<HealthVo.HealthInfo> healthInfoList = healthRecordsDao.selectHealthInfoByDate(Long.valueOf(userId),startTime,endTime);
List<HealthVo.HealthInfo> healthInfoList = healthRecordsDao.selectHealthInfoByDate(userId,startTime,endTime);
if(CollectionUtil.isNotEmpty(healthInfoList)){
for(HealthVo.HealthInfo healthInfo : healthInfoList){
healthInfo.setHealthLevel(0);

11
health/src/main/java/com/ccsens/health/service/JourneyService.java

@ -134,14 +134,15 @@ public class JourneyService implements IJourneyService{
JourneyDto.SelectDate selectDate = params.getParam();
Long startTime = selectDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : selectDate.getStartTime();
Long endTime = selectDate.getEndTime() == null ? System.currentTimeMillis() : selectDate.getEndTime();
String userId = tallFeignClient.getUserId(selectDate.getToken());
if(StrUtil.isEmpty(userId)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
Long userId = params.getUserId();
// String userId = tallFeignClient.getUserId(selectDate.getToken());
// if(StrUtil.isEmpty(userId)){
// throw new BaseException(CodeEnum.NOT_LOGIN);
// }
// //2、通过userid查询出成员id
// Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
//3、查询该成员符合时间的行程记录
List<JourneyVo.JourneyInfo> journeyList = journeyDao.selectJourneyByDate(Long.valueOf(userId),startTime,endTime);
List<JourneyVo.JourneyInfo> journeyList = journeyDao.selectJourneyByDate(userId,startTime,endTime);
//4、返回
return journeyList;
}

6
health/src/main/resources/application-prod.yml

@ -1,11 +1,11 @@
server:
port: 7080
port: 7081
servlet:
context-path:
spring:
snowflake:
datacenterId: 1
workerId: 1
datacenterId: 2
workerId: 2
application:
name: health
datasource:

129
health/src/main/resources/mapper_raw/HealthRecordsMapper.xml

@ -8,10 +8,16 @@
<result column="district" jdbcType="VARCHAR" property="district" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="health_type_id" jdbcType="BIGINT" property="healthTypeId" />
<result column="animal_heat" jdbcType="DECIMAL" property="animalHeat" />
<result column="hospital" jdbcType="VARCHAR" property="hospital" />
<result column="touch_hubei" jdbcType="TINYINT" property="touchHubei" />
<result column="touch_sick" jdbcType="TINYINT" property="touchSick" />
<result column="animal_heat" jdbcType="DECIMAL" property="animalHeat" />
<result column="touch_overseas" jdbcType="TINYINT" property="touchOverseas" />
<result column="school_location" jdbcType="TINYINT" property="schoolLocation" />
<result column="emergency_name" jdbcType="VARCHAR" property="emergencyName" />
<result column="emergency_phone" jdbcType="VARCHAR" property="emergencyPhone" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="health_agreement" jdbcType="TINYINT" property="healthAgreement" />
<result column="self_fill" jdbcType="TINYINT" property="selfFill" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
@ -76,8 +82,9 @@
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, time, district, address, health_type_id, hospital, touch_hubei, touch_sick,
animal_heat, self_fill, created_at, updated_at, rec_status
id, user_id, time, district, address, health_type_id, animal_heat, hospital, touch_hubei,
touch_sick, touch_overseas, school_location, emergency_name, emergency_phone, remark,
health_agreement, self_fill, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.HealthRecordsExample" resultMap="BaseResultMap">
select
@ -112,13 +119,17 @@
<insert id="insert" parameterType="com.ccsens.health.bean.po.HealthRecords">
insert into t_health_records (id, user_id, time,
district, address, health_type_id,
hospital, touch_hubei, touch_sick,
animal_heat, self_fill, created_at,
animal_heat, hospital, touch_hubei,
touch_sick, touch_overseas, school_location,
emergency_name, emergency_phone, remark,
health_agreement, self_fill, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT},
#{district,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{healthTypeId,jdbcType=BIGINT},
#{hospital,jdbcType=VARCHAR}, #{touchHubei,jdbcType=TINYINT}, #{touchSick,jdbcType=TINYINT},
#{animalHeat,jdbcType=DECIMAL}, #{selfFill,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{animalHeat,jdbcType=DECIMAL}, #{hospital,jdbcType=VARCHAR}, #{touchHubei,jdbcType=TINYINT},
#{touchSick,jdbcType=TINYINT}, #{touchOverseas,jdbcType=TINYINT}, #{schoolLocation,jdbcType=TINYINT},
#{emergencyName,jdbcType=VARCHAR}, #{emergencyPhone,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{healthAgreement,jdbcType=TINYINT}, #{selfFill,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.HealthRecords">
@ -142,6 +153,9 @@
<if test="healthTypeId != null">
health_type_id,
</if>
<if test="animalHeat != null">
animal_heat,
</if>
<if test="hospital != null">
hospital,
</if>
@ -151,8 +165,23 @@
<if test="touchSick != null">
touch_sick,
</if>
<if test="animalHeat != null">
animal_heat,
<if test="touchOverseas != null">
touch_overseas,
</if>
<if test="schoolLocation != null">
school_location,
</if>
<if test="emergencyName != null">
emergency_name,
</if>
<if test="emergencyPhone != null">
emergency_phone,
</if>
<if test="remark != null">
remark,
</if>
<if test="healthAgreement != null">
health_agreement,
</if>
<if test="selfFill != null">
self_fill,
@ -186,6 +215,9 @@
<if test="healthTypeId != null">
#{healthTypeId,jdbcType=BIGINT},
</if>
<if test="animalHeat != null">
#{animalHeat,jdbcType=DECIMAL},
</if>
<if test="hospital != null">
#{hospital,jdbcType=VARCHAR},
</if>
@ -195,8 +227,23 @@
<if test="touchSick != null">
#{touchSick,jdbcType=TINYINT},
</if>
<if test="animalHeat != null">
#{animalHeat,jdbcType=DECIMAL},
<if test="touchOverseas != null">
#{touchOverseas,jdbcType=TINYINT},
</if>
<if test="schoolLocation != null">
#{schoolLocation,jdbcType=TINYINT},
</if>
<if test="emergencyName != null">
#{emergencyName,jdbcType=VARCHAR},
</if>
<if test="emergencyPhone != null">
#{emergencyPhone,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="healthAgreement != null">
#{healthAgreement,jdbcType=TINYINT},
</if>
<if test="selfFill != null">
#{selfFill,jdbcType=TINYINT},
@ -239,6 +286,9 @@
<if test="record.healthTypeId != null">
health_type_id = #{record.healthTypeId,jdbcType=BIGINT},
</if>
<if test="record.animalHeat != null">
animal_heat = #{record.animalHeat,jdbcType=DECIMAL},
</if>
<if test="record.hospital != null">
hospital = #{record.hospital,jdbcType=VARCHAR},
</if>
@ -248,8 +298,23 @@
<if test="record.touchSick != null">
touch_sick = #{record.touchSick,jdbcType=TINYINT},
</if>
<if test="record.animalHeat != null">
animal_heat = #{record.animalHeat,jdbcType=DECIMAL},
<if test="record.touchOverseas != null">
touch_overseas = #{record.touchOverseas,jdbcType=TINYINT},
</if>
<if test="record.schoolLocation != null">
school_location = #{record.schoolLocation,jdbcType=TINYINT},
</if>
<if test="record.emergencyName != null">
emergency_name = #{record.emergencyName,jdbcType=VARCHAR},
</if>
<if test="record.emergencyPhone != null">
emergency_phone = #{record.emergencyPhone,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.healthAgreement != null">
health_agreement = #{record.healthAgreement,jdbcType=TINYINT},
</if>
<if test="record.selfFill != null">
self_fill = #{record.selfFill,jdbcType=TINYINT},
@ -276,10 +341,16 @@
district = #{record.district,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
health_type_id = #{record.healthTypeId,jdbcType=BIGINT},
animal_heat = #{record.animalHeat,jdbcType=DECIMAL},
hospital = #{record.hospital,jdbcType=VARCHAR},
touch_hubei = #{record.touchHubei,jdbcType=TINYINT},
touch_sick = #{record.touchSick,jdbcType=TINYINT},
animal_heat = #{record.animalHeat,jdbcType=DECIMAL},
touch_overseas = #{record.touchOverseas,jdbcType=TINYINT},
school_location = #{record.schoolLocation,jdbcType=TINYINT},
emergency_name = #{record.emergencyName,jdbcType=VARCHAR},
emergency_phone = #{record.emergencyPhone,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
health_agreement = #{record.healthAgreement,jdbcType=TINYINT},
self_fill = #{record.selfFill,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
@ -306,6 +377,9 @@
<if test="healthTypeId != null">
health_type_id = #{healthTypeId,jdbcType=BIGINT},
</if>
<if test="animalHeat != null">
animal_heat = #{animalHeat,jdbcType=DECIMAL},
</if>
<if test="hospital != null">
hospital = #{hospital,jdbcType=VARCHAR},
</if>
@ -315,8 +389,23 @@
<if test="touchSick != null">
touch_sick = #{touchSick,jdbcType=TINYINT},
</if>
<if test="animalHeat != null">
animal_heat = #{animalHeat,jdbcType=DECIMAL},
<if test="touchOverseas != null">
touch_overseas = #{touchOverseas,jdbcType=TINYINT},
</if>
<if test="schoolLocation != null">
school_location = #{schoolLocation,jdbcType=TINYINT},
</if>
<if test="emergencyName != null">
emergency_name = #{emergencyName,jdbcType=VARCHAR},
</if>
<if test="emergencyPhone != null">
emergency_phone = #{emergencyPhone,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="healthAgreement != null">
health_agreement = #{healthAgreement,jdbcType=TINYINT},
</if>
<if test="selfFill != null">
self_fill = #{selfFill,jdbcType=TINYINT},
@ -340,10 +429,16 @@
district = #{district,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
health_type_id = #{healthTypeId,jdbcType=BIGINT},
animal_heat = #{animalHeat,jdbcType=DECIMAL},
hospital = #{hospital,jdbcType=VARCHAR},
touch_hubei = #{touchHubei,jdbcType=TINYINT},
touch_sick = #{touchSick,jdbcType=TINYINT},
animal_heat = #{animalHeat,jdbcType=DECIMAL},
touch_overseas = #{touchOverseas,jdbcType=TINYINT},
school_location = #{schoolLocation,jdbcType=TINYINT},
emergency_name = #{emergencyName,jdbcType=VARCHAR},
emergency_phone = #{emergencyPhone,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
health_agreement = #{healthAgreement,jdbcType=TINYINT},
self_fill = #{selfFill,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},

31
health/src/main/resources/mapper_raw/JourneyMapper.xml

@ -10,6 +10,7 @@
<result column="end_time" jdbcType="BIGINT" property="endTime" />
<result column="journey_type" jdbcType="TINYINT" property="journeyType" />
<result column="together" jdbcType="VARCHAR" property="together" />
<result column="health_agreement" jdbcType="TINYINT" property="healthAgreement" />
<result column="self_fill" jdbcType="TINYINT" property="selfFill" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
@ -74,8 +75,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, trip_mode, car_no, start_time, end_time, journey_type, together, self_fill,
created_at, updated_at, rec_status
id, user_id, trip_mode, car_no, start_time, end_time, journey_type, together, health_agreement,
self_fill, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.JourneyExample" resultMap="BaseResultMap">
select
@ -110,14 +111,14 @@
<insert id="insert" parameterType="com.ccsens.health.bean.po.Journey">
insert into t_journey (id, user_id, trip_mode,
car_no, start_time, end_time,
journey_type, together, self_fill,
created_at, updated_at, rec_status
)
journey_type, together, health_agreement,
self_fill, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{tripMode,jdbcType=TINYINT},
#{carNo,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT},
#{journeyType,jdbcType=TINYINT}, #{together,jdbcType=VARCHAR}, #{selfFill,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
#{journeyType,jdbcType=TINYINT}, #{together,jdbcType=VARCHAR}, #{healthAgreement,jdbcType=TINYINT},
#{selfFill,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.Journey">
insert into t_journey
@ -146,6 +147,9 @@
<if test="together != null">
together,
</if>
<if test="healthAgreement != null">
health_agreement,
</if>
<if test="selfFill != null">
self_fill,
</if>
@ -184,6 +188,9 @@
<if test="together != null">
#{together,jdbcType=VARCHAR},
</if>
<if test="healthAgreement != null">
#{healthAgreement,jdbcType=TINYINT},
</if>
<if test="selfFill != null">
#{selfFill,jdbcType=TINYINT},
</if>
@ -231,6 +238,9 @@
<if test="record.together != null">
together = #{record.together,jdbcType=VARCHAR},
</if>
<if test="record.healthAgreement != null">
health_agreement = #{record.healthAgreement,jdbcType=TINYINT},
</if>
<if test="record.selfFill != null">
self_fill = #{record.selfFill,jdbcType=TINYINT},
</if>
@ -258,6 +268,7 @@
end_time = #{record.endTime,jdbcType=BIGINT},
journey_type = #{record.journeyType,jdbcType=TINYINT},
together = #{record.together,jdbcType=VARCHAR},
health_agreement = #{record.healthAgreement,jdbcType=TINYINT},
self_fill = #{record.selfFill,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
@ -290,6 +301,9 @@
<if test="together != null">
together = #{together,jdbcType=VARCHAR},
</if>
<if test="healthAgreement != null">
health_agreement = #{healthAgreement,jdbcType=TINYINT},
</if>
<if test="selfFill != null">
self_fill = #{selfFill,jdbcType=TINYINT},
</if>
@ -314,6 +328,7 @@
end_time = #{endTime,jdbcType=BIGINT},
journey_type = #{journeyType,jdbcType=TINYINT},
together = #{together,jdbcType=VARCHAR},
health_agreement = #{healthAgreement,jdbcType=TINYINT},
self_fill = #{selfFill,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},

Loading…
Cancel
Save