zhizhi wu 5 years ago
parent
commit
f81c1035d5
  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. 24
      health/src/main/java/com/ccsens/health/api/HealthController.java
  13. 25
      health/src/main/java/com/ccsens/health/bean/dto/HealthDto.java
  14. 8
      health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java
  15. 78
      health/src/main/java/com/ccsens/health/bean/po/HealthRecords.java
  16. 438
      health/src/main/java/com/ccsens/health/bean/po/HealthRecordsExample.java
  17. 106
      health/src/main/java/com/ccsens/health/bean/po/HealthRemarkFile.java
  18. 701
      health/src/main/java/com/ccsens/health/bean/po/HealthRemarkFileExample.java
  19. 11
      health/src/main/java/com/ccsens/health/bean/po/Journey.java
  20. 60
      health/src/main/java/com/ccsens/health/bean/po/JourneyExample.java
  21. 35
      health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java
  22. 6
      health/src/main/java/com/ccsens/health/bean/vo/JourneyVo.java
  23. 8
      health/src/main/java/com/ccsens/health/persist/dao/HealthRemarkFileDao.java
  24. 30
      health/src/main/java/com/ccsens/health/persist/mapper/HealthRemarkFileMapper.java
  25. 16
      health/src/main/java/com/ccsens/health/service/ClockService.java
  26. 63
      health/src/main/java/com/ccsens/health/service/HealthService.java
  27. 8
      health/src/main/java/com/ccsens/health/service/IHealthService.java
  28. 11
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  29. 6
      health/src/main/resources/application-prod.yml
  30. 4
      health/src/main/resources/application.yml
  31. 28
      health/src/main/resources/mapper_dao/HealthRecordDao.xml
  32. 129
      health/src/main/resources/mapper_raw/HealthRecordsMapper.xml
  33. 258
      health/src/main/resources/mapper_raw/HealthRemarkFileMapper.xml
  34. 31
      health/src/main/resources/mapper_raw/JourneyMapper.xml
  35. 2
      util/src/main/java/com/ccsens/util/CodeEnum.java
  36. 1
      util/src/main/java/com/ccsens/util/WebConstant.java

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},

24
health/src/main/java/com/ccsens/health/api/HealthController.java

@ -8,10 +8,12 @@ import com.ccsens.health.bean.vo.JourneyVo;
import com.ccsens.health.bean.vo.UserVo;
import com.ccsens.health.service.IHealthService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.UploadFileUtil_Servlet3;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
@ -21,6 +23,9 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import java.io.File;
import java.util.List;
@Slf4j
@ -77,4 +82,23 @@ public class HealthController {
PageInfo<HealthVo.HealthList> pageInfo = healthService.list(params);
return JsonResponse.newInstance().ok(pageInfo);
}
@ApiOperation(value = "上传健康上报的备注文件", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "file", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<HealthVo.HealthRemarkFileInfo> addFile(@RequestParam(required = true) Part file) throws Exception {
//1.上传文件
String allowedExts = "jpg,jpeg,png";
String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_REMARK;
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir);
String filePath = WebConstant.UPLOAD_PATH_REMARK + File.separator + path;
String name = UploadFileUtil_Servlet3.getFileNameByPart(file);
HealthVo.HealthRemarkFileInfo fileInfo = healthService.uploadRemarkFile(filePath, name);
return JsonResponse.newInstance().ok(fileInfo);
}
}

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

@ -7,6 +7,7 @@ import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;
import java.util.List;
@Data
public class HealthDto {
@ -23,14 +24,34 @@ 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;
@ApiModelProperty("备注文件信息")
private List<Long> fileIdList;
}
@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;
}

106
health/src/main/java/com/ccsens/health/bean/po/HealthRemarkFile.java

@ -0,0 +1,106 @@
package com.ccsens.health.bean.po;
import java.io.Serializable;
import java.util.Date;
public class HealthRemarkFile implements Serializable {
private Long id;
private String name;
private String path;
private Long healthRecordsId;
private Long time;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path == null ? null : path.trim();
}
public Long getHealthRecordsId() {
return healthRecordsId;
}
public void setHealthRecordsId(Long healthRecordsId) {
this.healthRecordsId = healthRecordsId;
}
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", path=").append(path);
sb.append(", healthRecordsId=").append(healthRecordsId);
sb.append(", time=").append(time);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

701
health/src/main/java/com/ccsens/health/bean/po/HealthRemarkFileExample.java

@ -0,0 +1,701 @@
package com.ccsens.health.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HealthRemarkFileExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public HealthRemarkFileExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andPathIsNull() {
addCriterion("path is null");
return (Criteria) this;
}
public Criteria andPathIsNotNull() {
addCriterion("path is not null");
return (Criteria) this;
}
public Criteria andPathEqualTo(String value) {
addCriterion("path =", value, "path");
return (Criteria) this;
}
public Criteria andPathNotEqualTo(String value) {
addCriterion("path <>", value, "path");
return (Criteria) this;
}
public Criteria andPathGreaterThan(String value) {
addCriterion("path >", value, "path");
return (Criteria) this;
}
public Criteria andPathGreaterThanOrEqualTo(String value) {
addCriterion("path >=", value, "path");
return (Criteria) this;
}
public Criteria andPathLessThan(String value) {
addCriterion("path <", value, "path");
return (Criteria) this;
}
public Criteria andPathLessThanOrEqualTo(String value) {
addCriterion("path <=", value, "path");
return (Criteria) this;
}
public Criteria andPathLike(String value) {
addCriterion("path like", value, "path");
return (Criteria) this;
}
public Criteria andPathNotLike(String value) {
addCriterion("path not like", value, "path");
return (Criteria) this;
}
public Criteria andPathIn(List<String> values) {
addCriterion("path in", values, "path");
return (Criteria) this;
}
public Criteria andPathNotIn(List<String> values) {
addCriterion("path not in", values, "path");
return (Criteria) this;
}
public Criteria andPathBetween(String value1, String value2) {
addCriterion("path between", value1, value2, "path");
return (Criteria) this;
}
public Criteria andPathNotBetween(String value1, String value2) {
addCriterion("path not between", value1, value2, "path");
return (Criteria) this;
}
public Criteria andHealthRecordsIdIsNull() {
addCriterion("health_records_id is null");
return (Criteria) this;
}
public Criteria andHealthRecordsIdIsNotNull() {
addCriterion("health_records_id is not null");
return (Criteria) this;
}
public Criteria andHealthRecordsIdEqualTo(Long value) {
addCriterion("health_records_id =", value, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdNotEqualTo(Long value) {
addCriterion("health_records_id <>", value, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdGreaterThan(Long value) {
addCriterion("health_records_id >", value, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdGreaterThanOrEqualTo(Long value) {
addCriterion("health_records_id >=", value, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdLessThan(Long value) {
addCriterion("health_records_id <", value, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdLessThanOrEqualTo(Long value) {
addCriterion("health_records_id <=", value, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdIn(List<Long> values) {
addCriterion("health_records_id in", values, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdNotIn(List<Long> values) {
addCriterion("health_records_id not in", values, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdBetween(Long value1, Long value2) {
addCriterion("health_records_id between", value1, value2, "healthRecordsId");
return (Criteria) this;
}
public Criteria andHealthRecordsIdNotBetween(Long value1, Long value2) {
addCriterion("health_records_id not between", value1, value2, "healthRecordsId");
return (Criteria) this;
}
public Criteria andTimeIsNull() {
addCriterion("time is null");
return (Criteria) this;
}
public Criteria andTimeIsNotNull() {
addCriterion("time is not null");
return (Criteria) this;
}
public Criteria andTimeEqualTo(Long value) {
addCriterion("time =", value, "time");
return (Criteria) this;
}
public Criteria andTimeNotEqualTo(Long value) {
addCriterion("time <>", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThan(Long value) {
addCriterion("time >", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThanOrEqualTo(Long value) {
addCriterion("time >=", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThan(Long value) {
addCriterion("time <", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThanOrEqualTo(Long value) {
addCriterion("time <=", value, "time");
return (Criteria) this;
}
public Criteria andTimeIn(List<Long> values) {
addCriterion("time in", values, "time");
return (Criteria) this;
}
public Criteria andTimeNotIn(List<Long> values) {
addCriterion("time not in", values, "time");
return (Criteria) this;
}
public Criteria andTimeBetween(Long value1, Long value2) {
addCriterion("time between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andTimeNotBetween(Long value1, Long value2) {
addCriterion("time not between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

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;

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

@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class HealthVo {
@ -24,20 +25,36 @@ 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("健康码")
private String healthCode;
@ApiModelProperty("健康状态名字")
private String healthTypeName;
@ApiModelProperty("备注的文件信息")
private List<HealthRemarkFileInfo> fileInfoList;
}
@Data
@ -129,4 +146,18 @@ public class HealthVo {
@ApiModelProperty("部门")
private String department;
}
@Data
@ApiModel("备注文件的信息")
public static class HealthRemarkFileInfo{
@ApiModelProperty("文件id")
private Long fileId;
@ApiModelProperty("文件名")
private String fileName;
@ApiModelProperty("文件路径")
private String filePath;
@ApiModelProperty("上传时间")
private Long time;
}
}

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

8
health/src/main/java/com/ccsens/health/persist/dao/HealthRemarkFileDao.java

@ -0,0 +1,8 @@
package com.ccsens.health.persist.dao;
import com.ccsens.health.persist.mapper.HealthRemarkFileMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface HealthRemarkFileDao extends HealthRemarkFileMapper {
}

30
health/src/main/java/com/ccsens/health/persist/mapper/HealthRemarkFileMapper.java

@ -0,0 +1,30 @@
package com.ccsens.health.persist.mapper;
import com.ccsens.health.bean.po.HealthRemarkFile;
import com.ccsens.health.bean.po.HealthRemarkFileExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HealthRemarkFileMapper {
long countByExample(HealthRemarkFileExample example);
int deleteByExample(HealthRemarkFileExample example);
int deleteByPrimaryKey(Long id);
int insert(HealthRemarkFile record);
int insertSelective(HealthRemarkFile record);
List<HealthRemarkFile> selectByExample(HealthRemarkFileExample example);
HealthRemarkFile selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HealthRemarkFile record, @Param("example") HealthRemarkFileExample example);
int updateByExample(@Param("record") HealthRemarkFile record, @Param("example") HealthRemarkFileExample example);
int updateByPrimaryKeySelective(HealthRemarkFile record);
int updateByPrimaryKey(HealthRemarkFile record);
}

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;
}

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

@ -12,6 +12,7 @@ import com.ccsens.health.bean.po.*;
import com.ccsens.health.bean.vo.HealthVo;
import com.ccsens.health.persist.dao.HealthQRCodeDao;
import com.ccsens.health.persist.dao.HealthRecordsDao;
import com.ccsens.health.persist.dao.HealthRemarkFileDao;
import com.ccsens.health.persist.dao.HealthTypeDao;
import com.ccsens.util.*;
import com.ccsens.util.bean.dto.QueryDto;
@ -37,8 +38,6 @@ import java.util.*;
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class HealthService implements IHealthService{
@Autowired
private IUserService userService;
@Autowired
private Snowflake snowflake;
@Autowired
@ -48,7 +47,7 @@ public class HealthService implements IHealthService{
@Autowired
private HealthQRCodeDao healthQRCodeDao;
@Autowired
private TallFeignClient tallFeignClient;
private HealthRemarkFileDao healthRemarkFileDao;
/**
* 上报健康信息
@ -112,11 +111,31 @@ public class HealthService implements IHealthService{
healthQRCode.setQrcodePath(qrcodePath);
healthQRCode.setTime(System.currentTimeMillis());
healthQRCodeDao.insertSelective(healthQRCode);
//关联备注文件信息
List<HealthVo.HealthRemarkFileInfo> healthRemarkFileInfoList = new ArrayList<>();
if(CollectionUtil.isNotEmpty(healthInfo.getFileIdList())){
for(Long fileId : healthInfo.getFileIdList()){
HealthRemarkFile healthRemarkFile = healthRemarkFileDao.selectByPrimaryKey(fileId);
if(ObjectUtil.isNull(healthRemarkFile)){
throw new BaseException(CodeEnum.NOT_DELIVER_FILE);
}
healthRemarkFile.setHealthRecordsId(healthRecords.getId());
healthRemarkFileDao.updateByPrimaryKeySelective(healthRemarkFile);
//添加至返回信息
HealthVo.HealthRemarkFileInfo fileInfo = new HealthVo.HealthRemarkFileInfo();
fileInfo.setFileId(healthRemarkFile.getId());
fileInfo.setFileName(healthRemarkFile.getName());
fileInfo.setFilePath(healthRemarkFile.getPath());
fileInfo.setTime(healthRemarkFile.getTime());
healthRemarkFileInfoList.add(fileInfo);
}
}
//6、查询健康信息和健康码地址返回前端
BeanUtil.copyProperties(healthRecords,healthInfoVo);
healthInfoVo.setUserId(userId);
healthInfoVo.setHealthCode(qrcodePath);
healthInfoVo.setFileInfoList(healthRemarkFileInfoList);
return healthInfoVo;
}
@ -131,14 +150,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);
@ -151,6 +170,7 @@ public class HealthService implements IHealthService{
}
healthInfo.setHealthTypeName(healthType.getName());
}
}
}
//4、返回
@ -243,4 +263,29 @@ public class HealthService implements IHealthService{
List<HealthVo.HealthList> vos = healthRecordsDao.list(param);
return new PageInfo<>(vos);
}
/**
* 上传备注文件
* @param filePath
* @param name
* @return
*/
@Override
public HealthVo.HealthRemarkFileInfo uploadRemarkFile(String filePath, String name) {
//添加文件File
HealthRemarkFile healthRemarkFile = new HealthRemarkFile();
healthRemarkFile.setId(snowflake.nextId());
healthRemarkFile.setName(name);
healthRemarkFile.setPath(PropUtil.qrCode + filePath);
healthRemarkFile.setTime(System.currentTimeMillis());
healthRemarkFileDao.insertSelective(healthRemarkFile);
//返回
HealthVo.HealthRemarkFileInfo healthRemarkFileInfo = new HealthVo.HealthRemarkFileInfo();
healthRemarkFileInfo.setFileId(healthRemarkFile.getId());
healthRemarkFileInfo.setFileName(healthRemarkFile.getName());
healthRemarkFileInfo.setFilePath(healthRemarkFile.getPath());
healthRemarkFileInfo.setTime(healthRemarkFile.getTime());
return healthRemarkFileInfo;
}
}

8
health/src/main/java/com/ccsens/health/service/IHealthService.java

@ -24,4 +24,12 @@ public interface IHealthService {
* @return
*/
PageInfo<HealthVo.HealthList> list(QueryDto<HealthDto.QueryList> params);
/**
* 上传备注文件
* @param filePath
* @param name
* @return
*/
HealthVo.HealthRemarkFileInfo uploadRemarkFile(String filePath, String name);
}

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:

4
health/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: prod
include: common, util-prod
active: test
include: common, util-test

28
health/src/main/resources/mapper_dao/HealthRecordDao.xml

@ -11,8 +11,19 @@
<result column="hHospital" property="hospital"/>
<result column="hTouchHuBei" property="touchHubei"/>
<result column="hTouchSick" property="touchSick"/>
<result column="hAnimalHeat" property="animalHeat"/>
<result column="hHealthCode" property="healthCode"/>
<result column="hTouchOverseas" property="touchOverseas"/>
<result column="hSchoolLocation" property="schoolLocation"/>
<result column="hEmergencyName" property="emergencyName"/>
<result column="hEmergencyPhone" property="emergencyPhone"/>
<result column="hRemark" property="remark"/>
<result column="hHealthAgreement" property="healthAgreement"/>
<result column="hSelfFill" property="selfFill"/>
<collection property="fileInfoList" ofType="com.ccsens.health.bean.vo.HealthVo$HealthRemarkFileInfo">
<id column="fileId" property="fileId"/>
<result column="fileName" property="fileName"/>
<result column="filePath" property="filePath"/>
<result column="fTime" property="time"/>
</collection>
</resultMap>
<resultMap id="resultMap_healthCode" type="com.ccsens.health.bean.vo.UserVo$HealthCode">
@ -37,10 +48,21 @@
h.hospital as hHospital,
h.touch_hubei as hTouchHuBei,
h.touch_sick as hTouchSick,
h.animal_heat as hAnimalHeat,
h.touch_overseas as hTouchOverseas,
h.school_location as hSchoolLocation,
h.emergency_name as hEmergencyName,
h.emergency_phone as hEmergencyPhone,
h.remark as hRemark,
h.health_agreement as hHealthAgreement,
h.self_fill as hSelfFill,
f.id as fileId,
f.name as fileName,
f.path as filePath,
f.time as fTime,
q.qrcode_path as hHealthCode
from
t_health_records h join t_health_qrcode q on q.health_records_id = h.id
left join t_health_remark_file f on f.health_records_id = h.id
where
h.rec_status = 0
and

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},

258
health/src/main/resources/mapper_raw/HealthRemarkFileMapper.xml

@ -0,0 +1,258 @@
<?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.health.persist.mapper.HealthRemarkFileMapper">
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.HealthRemarkFile">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="health_records_id" jdbcType="BIGINT" property="healthRecordsId" />
<result column="time" jdbcType="BIGINT" property="time" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, path, health_records_id, time, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.HealthRemarkFileExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_health_remark_file
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_health_remark_file
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_health_remark_file
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.health.bean.po.HealthRemarkFileExample">
delete from t_health_remark_file
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.HealthRemarkFile">
insert into t_health_remark_file (id, name, path,
health_records_id, time, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR},
#{healthRecordsId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.HealthRemarkFile">
insert into t_health_remark_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="path != null">
path,
</if>
<if test="healthRecordsId != null">
health_records_id,
</if>
<if test="time != null">
time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="path != null">
#{path,jdbcType=VARCHAR},
</if>
<if test="healthRecordsId != null">
#{healthRecordsId,jdbcType=BIGINT},
</if>
<if test="time != null">
#{time,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.health.bean.po.HealthRemarkFileExample" resultType="java.lang.Long">
select count(*) from t_health_remark_file
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_health_remark_file
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.path != null">
path = #{record.path,jdbcType=VARCHAR},
</if>
<if test="record.healthRecordsId != null">
health_records_id = #{record.healthRecordsId,jdbcType=BIGINT},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_health_remark_file
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
path = #{record.path,jdbcType=VARCHAR},
health_records_id = #{record.healthRecordsId,jdbcType=BIGINT},
time = #{record.time,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.HealthRemarkFile">
update t_health_remark_file
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="path != null">
path = #{path,jdbcType=VARCHAR},
</if>
<if test="healthRecordsId != null">
health_records_id = #{healthRecordsId,jdbcType=BIGINT},
</if>
<if test="time != null">
time = #{time,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.HealthRemarkFile">
update t_health_remark_file
set name = #{name,jdbcType=VARCHAR},
path = #{path,jdbcType=VARCHAR},
health_records_id = #{healthRecordsId,jdbcType=BIGINT},
time = #{time,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

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},

2
util/src/main/java/com/ccsens/util/CodeEnum.java

@ -49,7 +49,7 @@ public enum CodeEnum {
NOT_ROLE(37,"对不起,找不到该角色",true),
NOT_DELIVER(38,"对不起,找不到对应的交付物",true),
NOT_TASK(39,"对不起,找不到对应的任务",true),
NOT_DELIVER_FILE(40,"对不起,找不到文件",true),
NOT_DELIVER_FILE(40,"上传文件信息错误,请重试",true),
IS_NOT_EXECUTOR(41,"对不起,您不是该任务负责人",true),
NOT_CHECKER(42,"请选择检查人",true),
SUB_TASK_IS_NOT_FINISH(43,"分组内任务未全部完成,无法完成任务",true),

1
util/src/main/java/com/ccsens/util/WebConstant.java

@ -70,6 +70,7 @@ public class WebConstant {
public static final String UPLOAD_PATH_DELIVER = UPLOAD_PATH_BASE + File.separator + "delivers";
public static final String UPLOAD_PATH_DELIVER1 ="delivers";
public static final String UPLOAD_PATH_REMARK ="remarks";
public static final String UPLOAD_PROJECT_WBS = UPLOAD_PATH_BASE + File.separator + "project";
public static final String URL_BASE = "https://api.ccsens.com/ptpro/uploads/";
public static final String TEST_URL = "https://test.tall.wiki/";

Loading…
Cancel
Save