Browse Source

上报行程

master
zhangye 5 years ago
parent
commit
988c5ac22a
  1. 7
      health/src/main/java/com/ccsens/health/api/ClockController.java
  2. 23
      health/src/main/java/com/ccsens/health/api/HealthController.java
  3. 8
      health/src/main/java/com/ccsens/health/api/JourneyController.java
  4. 8
      health/src/main/java/com/ccsens/health/bean/dto/HealthDto.java
  5. 9
      health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java
  6. 20
      health/src/main/java/com/ccsens/health/bean/dto/UserDto.java
  7. 12
      health/src/main/java/com/ccsens/health/bean/po/DepartmentEmployee.java
  8. 40
      health/src/main/java/com/ccsens/health/bean/po/DepartmentEmployeeExample.java
  9. 8
      health/src/main/java/com/ccsens/health/bean/po/Employee.java
  10. 30
      health/src/main/java/com/ccsens/health/bean/po/EmployeeExample.java
  11. 106
      health/src/main/java/com/ccsens/health/bean/po/HealthQRCode.java
  12. 691
      health/src/main/java/com/ccsens/health/bean/po/HealthQRCodeExample.java
  13. 30
      health/src/main/java/com/ccsens/health/bean/po/Journey.java
  14. 150
      health/src/main/java/com/ccsens/health/bean/po/JourneyExample.java
  15. 11
      health/src/main/java/com/ccsens/health/bean/po/RealNameAuth.java
  16. 60
      health/src/main/java/com/ccsens/health/bean/po/RealNameAuthExample.java
  17. 4
      health/src/main/java/com/ccsens/health/bean/vo/HealthVo.java
  18. 4
      health/src/main/java/com/ccsens/health/bean/vo/JourneyVo.java
  19. 27
      health/src/main/java/com/ccsens/health/bean/vo/UserVo.java
  20. 8
      health/src/main/java/com/ccsens/health/persist/dao/EmployeeDao.java
  21. 16
      health/src/main/java/com/ccsens/health/persist/dao/HealthRecordsDao.java
  22. 9
      health/src/main/java/com/ccsens/health/persist/dao/HealthTypeDao.java
  23. 14
      health/src/main/java/com/ccsens/health/persist/dao/JourneyDao.java
  24. 30
      health/src/main/java/com/ccsens/health/persist/mapper/HealthQRCodeMapper.java
  25. 124
      health/src/main/java/com/ccsens/health/service/HealthService.java
  26. 9
      health/src/main/java/com/ccsens/health/service/IHealthService.java
  27. 4
      health/src/main/java/com/ccsens/health/service/IJourneyService.java
  28. 3
      health/src/main/java/com/ccsens/health/service/IUserService.java
  29. 57
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  30. 30
      health/src/main/java/com/ccsens/health/service/UserService.java
  31. 4
      health/src/main/resources/application.yml
  32. 60
      health/src/main/resources/mapper_dao/HealthRecordDao.xml
  33. 39
      health/src/main/resources/mapper_dao/JourneyDao.xml
  34. 26
      health/src/main/resources/mapper_raw/DepartmentEmployeeMapper.xml
  35. 14
      health/src/main/resources/mapper_raw/EmployeeMapper.xml
  36. 259
      health/src/main/resources/mapper_raw/HealthQRCodeMapper.xml
  37. 64
      health/src/main/resources/mapper_raw/JourneyMapper.xml
  38. 27
      health/src/main/resources/mapper_raw/RealNameAuthMapper.xml
  39. 3
      util/src/main/java/com/ccsens/util/CodeEnum.java
  40. 18
      util/src/main/java/com/ccsens/util/DateUtil.java
  41. 5
      util/src/main/java/com/ccsens/util/QrCodeUtil.java
  42. 6
      util/src/main/java/com/ccsens/util/WebConstant.java
  43. 1
      util/src/main/java/com/ccsens/util/bean/dto/QueryDto.java

7
health/src/main/java/com/ccsens/health/api/ClockController.java

@ -49,11 +49,10 @@ public class ClockController {
@MustLogin
@ApiOperation(value = "扫码统计", notes = "")
@RequestMapping(value = "statistics", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ClockVo.SiteClockStatistics>> getSiteClickStatistics(HttpServletRequest request,
@RequestParam String date) throws Exception {
@RequestMapping(value = "statistics", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ClockVo.SiteClockStatistics>> getSiteClickStatistics(@ApiParam @Validated @RequestBody JourneyDto.StatisticsDate date) throws Exception {
log.info("扫码统计");
List<ClockVo.SiteClockStatistics> siteClockStatisticsList = clockService.getSiteClickStatistics(date);
List<ClockVo.SiteClockStatistics> siteClockStatisticsList = clockService.getSiteClickStatistics(date.getDate());
return JsonResponse.newInstance().ok(siteClockStatisticsList);
}
}

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

@ -8,6 +8,7 @@ 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.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -34,7 +35,8 @@ public class HealthController {
@RequestMapping(value = "upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<HealthVo.HealthInfo> addHealthInfo(@ApiParam @Validated @RequestBody QueryDto<HealthDto.healthInfo> params) throws Exception {
log.info("健康打卡:{}",params);
HealthVo.HealthInfo healthInfo = healthService.addHealthInfo(params);
// String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN);
HealthVo.HealthInfo healthInfo = healthService.addHealthInfo(null,params);
return JsonResponse.newInstance().ok(healthInfo);
}
@ -42,28 +44,27 @@ public class HealthController {
@MustLogin
@ApiOperation(value = "获取个人健康打卡记录", notes = "")
@RequestMapping(value = "info", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<HealthVo.HealthInfo> getHealthInfo(@ApiParam @Validated @RequestBody QueryDto<JourneyDto.SelectDate> params) throws Exception {
public JsonResponse<List<HealthVo.HealthInfo>> getHealthInfo(@ApiParam @Validated @RequestBody QueryDto<JourneyDto.SelectDate> params) throws Exception {
log.info("获取个人健康打卡记录:{}",params);
HealthVo.HealthInfo healthInfo = healthService.getHealthInfo(params);
return JsonResponse.newInstance().ok(healthInfo);
List<HealthVo.HealthInfo> healthInfoList = healthService.getHealthInfo(params);
return JsonResponse.newInstance().ok(healthInfoList);
}
@MustLogin
@ApiOperation(value = "查询健康状态类型", notes = "")
@RequestMapping(value = "type", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<HealthVo.HealthType>> getHealthType() throws Exception {
@RequestMapping(value = "type", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<HealthVo.HealthTypeVo>> getHealthType() throws Exception {
log.info("查询健康状态类型");
List<HealthVo.HealthType> healthTypeList = healthService.getHealthType();
List<HealthVo.HealthTypeVo> healthTypeList = healthService.getHealthType();
return JsonResponse.newInstance().ok(healthTypeList);
}
@MustLogin
@ApiOperation(value = "健康类型统计", notes = "")
@RequestMapping(value = "statistics", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<HealthVo.HealthTypeStatistics>> getHealthTypeStatistics(HttpServletRequest request,
@RequestParam String date) throws Exception {
@RequestMapping(value = "statistics", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<HealthVo.HealthTypeStatistics>> getHealthTypeStatistics(@ApiParam @Validated @RequestBody JourneyDto.StatisticsDate date) throws Exception {
log.info("健康类型统计");
List<HealthVo.HealthTypeStatistics> healthTypeStatisticsList = healthService.getHealthTypeStatistics(date);
List<HealthVo.HealthTypeStatistics> healthTypeStatisticsList = healthService.getHealthTypeStatistics(date.getDate());
return JsonResponse.newInstance().ok(healthTypeStatisticsList);
}

8
health/src/main/java/com/ccsens/health/api/JourneyController.java

@ -18,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Slf4j
@Api(tags = "行程相关" , description = "")
@RestController
@ -40,9 +42,9 @@ public class JourneyController {
@MustLogin
@ApiOperation(value = "查询行程", notes = "")
@RequestMapping(value = "info", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<JourneyVo.JourneyInfo> getJourney(@ApiParam @Validated @RequestBody QueryDto<JourneyDto.SelectDate> params) throws Exception {
public JsonResponse<List<JourneyVo.JourneyInfo>> getJourney(@ApiParam @Validated @RequestBody QueryDto<JourneyDto.SelectDate> params) throws Exception {
log.info("查询行程:{}",params);
JourneyVo.JourneyInfo journeyInfo = journeyService.getJourney(params);
return JsonResponse.newInstance().ok(journeyInfo);
List<JourneyVo.JourneyInfo> journeyInfoList = journeyService.getJourney(params);
return JsonResponse.newInstance().ok(journeyInfoList);
}
}

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

@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class HealthDto {
@ -11,8 +13,6 @@ public class HealthDto {
@Data
@ApiModel("上报健康状况")
public static class healthInfo{
@ApiModelProperty("日期")
private Long time;
@ApiModelProperty("当前所在地区")
private String district;
@ApiModelProperty("当前所在详细地址")
@ -20,12 +20,12 @@ public class HealthDto {
@ApiModelProperty("当前身体状态")
private Long healthTypeId;
@ApiModelProperty("就诊医院")
private Long hospital;
private String hospital;
@ApiModelProperty("有无湖北武汉接触史 0没有 1有")
private int touchHuBei;
@ApiModelProperty("有无接触患者 0无 1有")
private Long touchSick;
@ApiModelProperty("体温")
private Long animalHeat;
private BigDecimal animalHeat;
}
}

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

@ -11,7 +11,7 @@ public class JourneyDto {
@ApiModel("上报行程")
public static class JourneyInfo{
@ApiModelProperty("'出行方式'")
private String tripMode;
private int tripMode;
@ApiModelProperty("车次号")
private String carNo;
@ApiModelProperty("行程类型 0未填写 1返校行程 2日常外出")
@ -32,4 +32,11 @@ public class JourneyDto {
@ApiModelProperty("结束时间 默认当前时间")
private Long endTime;
}
@Data
@ApiModel("统计时的日期")
public static class StatisticsDate{
@ApiModelProperty("日期")
private String date;
}
}

20
health/src/main/java/com/ccsens/health/bean/dto/UserDto.java

@ -10,20 +10,16 @@ public class UserDto {
@Data
@ApiModel("保存的信息")
public static class UserInfo{
@ApiModelProperty("微信建立的部门id")
private Long weixinId;
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("性别 0男 1女")
private int gender;
@ApiModelProperty("状态 0激活 1禁用 2未激活")
private int status;
@ApiModelProperty("'地址'")
private String address;
@ApiModelProperty("是否隐藏手机号 0隐藏 1不隐藏")
private int hideMobile;
@ApiModelProperty("英文名")
private String englishName;
@ApiModelProperty("身份证号")
private String IDCard;
@ApiModelProperty("身份 0学生 1老师 2工作人员")
private int post;
@ApiModelProperty("学号")
private int no;
@ApiModelProperty("手机号")
private String phone;
}
}

12
health/src/main/java/com/ccsens/health/bean/po/DepartmentEmployee.java

@ -10,9 +10,9 @@ public class DepartmentEmployee implements Serializable {
private Long employeeId;
private Byte order;
private Integer order;
private Byte sort;
private Integer sort;
private Date createdAt;
@ -46,19 +46,19 @@ public class DepartmentEmployee implements Serializable {
this.employeeId = employeeId;
}
public Byte getOrder() {
public Integer getOrder() {
return order;
}
public void setOrder(Byte order) {
public void setOrder(Integer order) {
this.order = order;
}
public Byte getSort() {
public Integer getSort() {
return sort;
}
public void setSort(Byte sort) {
public void setSort(Integer sort) {
this.sort = sort;
}

40
health/src/main/java/com/ccsens/health/bean/po/DepartmentEmployeeExample.java

@ -295,52 +295,52 @@ public class DepartmentEmployeeExample {
return (Criteria) this;
}
public Criteria andOrderEqualTo(Byte value) {
public Criteria andOrderEqualTo(Integer value) {
addCriterion("order =", value, "order");
return (Criteria) this;
}
public Criteria andOrderNotEqualTo(Byte value) {
public Criteria andOrderNotEqualTo(Integer value) {
addCriterion("order <>", value, "order");
return (Criteria) this;
}
public Criteria andOrderGreaterThan(Byte value) {
public Criteria andOrderGreaterThan(Integer value) {
addCriterion("order >", value, "order");
return (Criteria) this;
}
public Criteria andOrderGreaterThanOrEqualTo(Byte value) {
public Criteria andOrderGreaterThanOrEqualTo(Integer value) {
addCriterion("order >=", value, "order");
return (Criteria) this;
}
public Criteria andOrderLessThan(Byte value) {
public Criteria andOrderLessThan(Integer value) {
addCriterion("order <", value, "order");
return (Criteria) this;
}
public Criteria andOrderLessThanOrEqualTo(Byte value) {
public Criteria andOrderLessThanOrEqualTo(Integer value) {
addCriterion("order <=", value, "order");
return (Criteria) this;
}
public Criteria andOrderIn(List<Byte> values) {
public Criteria andOrderIn(List<Integer> values) {
addCriterion("order in", values, "order");
return (Criteria) this;
}
public Criteria andOrderNotIn(List<Byte> values) {
public Criteria andOrderNotIn(List<Integer> values) {
addCriterion("order not in", values, "order");
return (Criteria) this;
}
public Criteria andOrderBetween(Byte value1, Byte value2) {
public Criteria andOrderBetween(Integer value1, Integer value2) {
addCriterion("order between", value1, value2, "order");
return (Criteria) this;
}
public Criteria andOrderNotBetween(Byte value1, Byte value2) {
public Criteria andOrderNotBetween(Integer value1, Integer value2) {
addCriterion("order not between", value1, value2, "order");
return (Criteria) this;
}
@ -355,52 +355,52 @@ public class DepartmentEmployeeExample {
return (Criteria) this;
}
public Criteria andSortEqualTo(Byte value) {
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Byte value) {
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Byte value) {
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Byte value) {
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Byte value) {
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Byte value) {
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Byte> values) {
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Byte> values) {
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Byte value1, Byte value2) {
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Byte value1, Byte value2) {
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}

8
health/src/main/java/com/ccsens/health/bean/po/Employee.java

@ -20,7 +20,7 @@ public class Employee implements Serializable {
private String englishName;
private String tallUserId;
private Long tallUserId;
private Date createdAt;
@ -94,12 +94,12 @@ public class Employee implements Serializable {
this.englishName = englishName == null ? null : englishName.trim();
}
public String getTallUserId() {
public Long getTallUserId() {
return tallUserId;
}
public void setTallUserId(String tallUserId) {
this.tallUserId = tallUserId == null ? null : tallUserId.trim();
public void setTallUserId(Long tallUserId) {
this.tallUserId = tallUserId;
}
public Date getCreatedAt() {

30
health/src/main/java/com/ccsens/health/bean/po/EmployeeExample.java

@ -635,62 +635,52 @@ public class EmployeeExample {
return (Criteria) this;
}
public Criteria andTallUserIdEqualTo(String value) {
public Criteria andTallUserIdEqualTo(Long value) {
addCriterion("tall_user_id =", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdNotEqualTo(String value) {
public Criteria andTallUserIdNotEqualTo(Long value) {
addCriterion("tall_user_id <>", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdGreaterThan(String value) {
public Criteria andTallUserIdGreaterThan(Long value) {
addCriterion("tall_user_id >", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdGreaterThanOrEqualTo(String value) {
public Criteria andTallUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("tall_user_id >=", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdLessThan(String value) {
public Criteria andTallUserIdLessThan(Long value) {
addCriterion("tall_user_id <", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdLessThanOrEqualTo(String value) {
public Criteria andTallUserIdLessThanOrEqualTo(Long value) {
addCriterion("tall_user_id <=", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdLike(String value) {
addCriterion("tall_user_id like", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdNotLike(String value) {
addCriterion("tall_user_id not like", value, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdIn(List<String> values) {
public Criteria andTallUserIdIn(List<Long> values) {
addCriterion("tall_user_id in", values, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdNotIn(List<String> values) {
public Criteria andTallUserIdNotIn(List<Long> values) {
addCriterion("tall_user_id not in", values, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdBetween(String value1, String value2) {
public Criteria andTallUserIdBetween(Long value1, Long value2) {
addCriterion("tall_user_id between", value1, value2, "tallUserId");
return (Criteria) this;
}
public Criteria andTallUserIdNotBetween(String value1, String value2) {
public Criteria andTallUserIdNotBetween(Long value1, Long value2) {
addCriterion("tall_user_id not between", value1, value2, "tallUserId");
return (Criteria) this;
}

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

@ -0,0 +1,106 @@
package com.ccsens.health.bean.po;
import java.io.Serializable;
import java.util.Date;
public class HealthQRCode implements Serializable {
private Long id;
private Long healthRecordsId;
private Long healthTypeId;
private String qrcodePath;
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 Long getHealthRecordsId() {
return healthRecordsId;
}
public void setHealthRecordsId(Long healthRecordsId) {
this.healthRecordsId = healthRecordsId;
}
public Long getHealthTypeId() {
return healthTypeId;
}
public void setHealthTypeId(Long healthTypeId) {
this.healthTypeId = healthTypeId;
}
public String getQrcodePath() {
return qrcodePath;
}
public void setQrcodePath(String qrcodePath) {
this.qrcodePath = qrcodePath == null ? null : qrcodePath.trim();
}
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(", healthRecordsId=").append(healthRecordsId);
sb.append(", healthTypeId=").append(healthTypeId);
sb.append(", qrcodePath=").append(qrcodePath);
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();
}
}

691
health/src/main/java/com/ccsens/health/bean/po/HealthQRCodeExample.java

@ -0,0 +1,691 @@
package com.ccsens.health.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HealthQRCodeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public HealthQRCodeExample() {
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 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 andHealthTypeIdIsNull() {
addCriterion("health_type_id is null");
return (Criteria) this;
}
public Criteria andHealthTypeIdIsNotNull() {
addCriterion("health_type_id is not null");
return (Criteria) this;
}
public Criteria andHealthTypeIdEqualTo(Long value) {
addCriterion("health_type_id =", value, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdNotEqualTo(Long value) {
addCriterion("health_type_id <>", value, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdGreaterThan(Long value) {
addCriterion("health_type_id >", value, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdGreaterThanOrEqualTo(Long value) {
addCriterion("health_type_id >=", value, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdLessThan(Long value) {
addCriterion("health_type_id <", value, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdLessThanOrEqualTo(Long value) {
addCriterion("health_type_id <=", value, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdIn(List<Long> values) {
addCriterion("health_type_id in", values, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdNotIn(List<Long> values) {
addCriterion("health_type_id not in", values, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdBetween(Long value1, Long value2) {
addCriterion("health_type_id between", value1, value2, "healthTypeId");
return (Criteria) this;
}
public Criteria andHealthTypeIdNotBetween(Long value1, Long value2) {
addCriterion("health_type_id not between", value1, value2, "healthTypeId");
return (Criteria) this;
}
public Criteria andQrcodePathIsNull() {
addCriterion("qrcode_path is null");
return (Criteria) this;
}
public Criteria andQrcodePathIsNotNull() {
addCriterion("qrcode_path is not null");
return (Criteria) this;
}
public Criteria andQrcodePathEqualTo(String value) {
addCriterion("qrcode_path =", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathNotEqualTo(String value) {
addCriterion("qrcode_path <>", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathGreaterThan(String value) {
addCriterion("qrcode_path >", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathGreaterThanOrEqualTo(String value) {
addCriterion("qrcode_path >=", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathLessThan(String value) {
addCriterion("qrcode_path <", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathLessThanOrEqualTo(String value) {
addCriterion("qrcode_path <=", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathLike(String value) {
addCriterion("qrcode_path like", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathNotLike(String value) {
addCriterion("qrcode_path not like", value, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathIn(List<String> values) {
addCriterion("qrcode_path in", values, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathNotIn(List<String> values) {
addCriterion("qrcode_path not in", values, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathBetween(String value1, String value2) {
addCriterion("qrcode_path between", value1, value2, "qrcodePath");
return (Criteria) this;
}
public Criteria andQrcodePathNotBetween(String value1, String value2) {
addCriterion("qrcode_path not between", value1, value2, "qrcodePath");
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);
}
}
}

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

@ -6,7 +6,9 @@ import java.util.Date;
public class Journey implements Serializable {
private Long id;
private String tripMode;
private Long employeeId;
private Byte tripMode;
private String carNo;
@ -14,6 +16,8 @@ public class Journey implements Serializable {
private Long endTime;
private Byte journeyType;
private String together;
private Byte selfFill;
@ -34,12 +38,20 @@ public class Journey implements Serializable {
this.id = id;
}
public String getTripMode() {
public Long getEmployeeId() {
return employeeId;
}
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
}
public Byte getTripMode() {
return tripMode;
}
public void setTripMode(String tripMode) {
this.tripMode = tripMode == null ? null : tripMode.trim();
public void setTripMode(Byte tripMode) {
this.tripMode = tripMode;
}
public String getCarNo() {
@ -66,6 +78,14 @@ public class Journey implements Serializable {
this.endTime = endTime;
}
public Byte getJourneyType() {
return journeyType;
}
public void setJourneyType(Byte journeyType) {
this.journeyType = journeyType;
}
public String getTogether() {
return together;
}
@ -113,10 +133,12 @@ public class Journey implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", employeeId=").append(employeeId);
sb.append(", tripMode=").append(tripMode);
sb.append(", carNo=").append(carNo);
sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime);
sb.append(", journeyType=").append(journeyType);
sb.append(", together=").append(together);
sb.append(", selfFill=").append(selfFill);
sb.append(", createdAt=").append(createdAt);

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

@ -165,6 +165,66 @@ public class JourneyExample {
return (Criteria) this;
}
public Criteria andEmployeeIdIsNull() {
addCriterion("employee_id is null");
return (Criteria) this;
}
public Criteria andEmployeeIdIsNotNull() {
addCriterion("employee_id is not null");
return (Criteria) this;
}
public Criteria andEmployeeIdEqualTo(Long value) {
addCriterion("employee_id =", value, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotEqualTo(Long value) {
addCriterion("employee_id <>", value, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThan(Long value) {
addCriterion("employee_id >", value, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThanOrEqualTo(Long value) {
addCriterion("employee_id >=", value, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThan(Long value) {
addCriterion("employee_id <", value, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThanOrEqualTo(Long value) {
addCriterion("employee_id <=", value, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdIn(List<Long> values) {
addCriterion("employee_id in", values, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotIn(List<Long> values) {
addCriterion("employee_id not in", values, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdBetween(Long value1, Long value2) {
addCriterion("employee_id between", value1, value2, "employeeId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotBetween(Long value1, Long value2) {
addCriterion("employee_id not between", value1, value2, "employeeId");
return (Criteria) this;
}
public Criteria andTripModeIsNull() {
addCriterion("trip_mode is null");
return (Criteria) this;
@ -175,62 +235,52 @@ public class JourneyExample {
return (Criteria) this;
}
public Criteria andTripModeEqualTo(String value) {
public Criteria andTripModeEqualTo(Byte value) {
addCriterion("trip_mode =", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeNotEqualTo(String value) {
public Criteria andTripModeNotEqualTo(Byte value) {
addCriterion("trip_mode <>", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeGreaterThan(String value) {
public Criteria andTripModeGreaterThan(Byte value) {
addCriterion("trip_mode >", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeGreaterThanOrEqualTo(String value) {
public Criteria andTripModeGreaterThanOrEqualTo(Byte value) {
addCriterion("trip_mode >=", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeLessThan(String value) {
public Criteria andTripModeLessThan(Byte value) {
addCriterion("trip_mode <", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeLessThanOrEqualTo(String value) {
public Criteria andTripModeLessThanOrEqualTo(Byte value) {
addCriterion("trip_mode <=", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeLike(String value) {
addCriterion("trip_mode like", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeNotLike(String value) {
addCriterion("trip_mode not like", value, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeIn(List<String> values) {
public Criteria andTripModeIn(List<Byte> values) {
addCriterion("trip_mode in", values, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeNotIn(List<String> values) {
public Criteria andTripModeNotIn(List<Byte> values) {
addCriterion("trip_mode not in", values, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeBetween(String value1, String value2) {
public Criteria andTripModeBetween(Byte value1, Byte value2) {
addCriterion("trip_mode between", value1, value2, "tripMode");
return (Criteria) this;
}
public Criteria andTripModeNotBetween(String value1, String value2) {
public Criteria andTripModeNotBetween(Byte value1, Byte value2) {
addCriterion("trip_mode not between", value1, value2, "tripMode");
return (Criteria) this;
}
@ -425,6 +475,66 @@ public class JourneyExample {
return (Criteria) this;
}
public Criteria andJourneyTypeIsNull() {
addCriterion("journey_type is null");
return (Criteria) this;
}
public Criteria andJourneyTypeIsNotNull() {
addCriterion("journey_type is not null");
return (Criteria) this;
}
public Criteria andJourneyTypeEqualTo(Byte value) {
addCriterion("journey_type =", value, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeNotEqualTo(Byte value) {
addCriterion("journey_type <>", value, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeGreaterThan(Byte value) {
addCriterion("journey_type >", value, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("journey_type >=", value, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeLessThan(Byte value) {
addCriterion("journey_type <", value, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeLessThanOrEqualTo(Byte value) {
addCriterion("journey_type <=", value, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeIn(List<Byte> values) {
addCriterion("journey_type in", values, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeNotIn(List<Byte> values) {
addCriterion("journey_type not in", values, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeBetween(Byte value1, Byte value2) {
addCriterion("journey_type between", value1, value2, "journeyType");
return (Criteria) this;
}
public Criteria andJourneyTypeNotBetween(Byte value1, Byte value2) {
addCriterion("journey_type not between", value1, value2, "journeyType");
return (Criteria) this;
}
public Criteria andTogetherIsNull() {
addCriterion("together is null");
return (Criteria) this;

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

@ -12,6 +12,8 @@ public class RealNameAuth implements Serializable {
private String name;
private Byte post;
private String no;
private String phone;
@ -56,6 +58,14 @@ public class RealNameAuth implements Serializable {
this.name = name == null ? null : name.trim();
}
public Byte getPost() {
return post;
}
public void setPost(Byte post) {
this.post = post;
}
public String getNo() {
return no;
}
@ -106,6 +116,7 @@ public class RealNameAuth implements Serializable {
sb.append(", employeeId=").append(employeeId);
sb.append(", idCard=").append(idCard);
sb.append(", name=").append(name);
sb.append(", post=").append(post);
sb.append(", no=").append(no);
sb.append(", phone=").append(phone);
sb.append(", createdAt=").append(createdAt);

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

@ -355,6 +355,66 @@ public class RealNameAuthExample {
return (Criteria) this;
}
public Criteria andPostIsNull() {
addCriterion("post is null");
return (Criteria) this;
}
public Criteria andPostIsNotNull() {
addCriterion("post is not null");
return (Criteria) this;
}
public Criteria andPostEqualTo(Byte value) {
addCriterion("post =", value, "post");
return (Criteria) this;
}
public Criteria andPostNotEqualTo(Byte value) {
addCriterion("post <>", value, "post");
return (Criteria) this;
}
public Criteria andPostGreaterThan(Byte value) {
addCriterion("post >", value, "post");
return (Criteria) this;
}
public Criteria andPostGreaterThanOrEqualTo(Byte value) {
addCriterion("post >=", value, "post");
return (Criteria) this;
}
public Criteria andPostLessThan(Byte value) {
addCriterion("post <", value, "post");
return (Criteria) this;
}
public Criteria andPostLessThanOrEqualTo(Byte value) {
addCriterion("post <=", value, "post");
return (Criteria) this;
}
public Criteria andPostIn(List<Byte> values) {
addCriterion("post in", values, "post");
return (Criteria) this;
}
public Criteria andPostNotIn(List<Byte> values) {
addCriterion("post not in", values, "post");
return (Criteria) this;
}
public Criteria andPostBetween(Byte value1, Byte value2) {
addCriterion("post between", value1, value2, "post");
return (Criteria) this;
}
public Criteria andPostNotBetween(Byte value1, Byte value2) {
addCriterion("post not between", value1, value2, "post");
return (Criteria) this;
}
public Criteria andNoIsNull() {
addCriterion("no is null");
return (Criteria) this;

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

@ -32,11 +32,13 @@ public class HealthVo {
private int touchSick;
@ApiModelProperty("体温")
private BigDecimal animalHeat;
@ApiModelProperty("健康码")
private String healthCode;
}
@Data
@ApiModel("健康状态")
public static class HealthType{
public static class HealthTypeVo{
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("状态名")

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

@ -12,8 +12,10 @@ public class JourneyVo {
public static class JourneyInfo{
@ApiModelProperty("Id")
private Long id;
@ApiModelProperty("成员Id")
private Long employeeId;
@ApiModelProperty("'出行方式'")
private String tripMode;
private int tripMode;
@ApiModelProperty("车次号")
private String carNo;
@ApiModelProperty("行程类型 0未填写 1返校行程 2日常外出")

27
health/src/main/java/com/ccsens/health/bean/vo/UserVo.java

@ -10,24 +10,19 @@ public class UserVo {
@Data
@ApiModel("查询个人信息")
public static class UserInfo{
@ApiModelProperty("Id")
@ApiModelProperty("成员id")
private Long id;
@ApiModelProperty("微信建立的部门id")
private Long weixinId;
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("性别 0男 1女")
private int gender;
@ApiModelProperty("状态 0激活 1禁用 2未激活")
private int status;
@ApiModelProperty("'地址'")
private String address;
@ApiModelProperty("是否隐藏手机号 0隐藏 1不隐藏")
private int hideMobile;
@ApiModelProperty("英文名")
private String englishName;
@ApiModelProperty("tall里的userId")
private Long tallUserId;
@ApiModelProperty("身份证号")
private String IDCard;
@ApiModelProperty("身份 0学生 1老师 2工作人员")
private int post;
@ApiModelProperty("学号")
private int no;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("健康码")
private String healthCode;
}
}

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

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

16
health/src/main/java/com/ccsens/health/persist/dao/HealthRecordsDao.java

@ -0,0 +1,16 @@
package com.ccsens.health.persist.dao;
import com.ccsens.health.bean.po.HealthRecords;
import com.ccsens.health.bean.vo.HealthVo;
import com.ccsens.health.persist.mapper.HealthRecordsMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface HealthRecordsDao extends HealthRecordsMapper {
List<HealthVo.HealthInfo> selectHealthInfoByDate(@Param("employeeId")Long employeeId, @Param("startTime")Long startTime, @Param("endTime")Long endTime);
int selectByTypeId(@Param("healthTypeId")Long healthTypeId, @Param("startTime")Long startTime, @Param("endTime")Long endTime);
}

9
health/src/main/java/com/ccsens/health/persist/dao/HealthTypeDao.java

@ -0,0 +1,9 @@
package com.ccsens.health.persist.dao;
import com.ccsens.health.bean.po.HealthType;
import com.ccsens.health.persist.mapper.HealthTypeMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface HealthTypeDao extends HealthTypeMapper {
}

14
health/src/main/java/com/ccsens/health/persist/dao/JourneyDao.java

@ -0,0 +1,14 @@
package com.ccsens.health.persist.dao;
import com.ccsens.health.bean.po.Journey;
import com.ccsens.health.bean.vo.JourneyVo;
import com.ccsens.health.persist.mapper.JourneyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface JourneyDao extends JourneyMapper {
List<JourneyVo.JourneyInfo> selectJourneyByDate(@Param("employeeId")Long employeeId, @Param("startTime")Long startTime, @Param("endTime")Long endTime);
}

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

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

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

@ -1,24 +1,74 @@
package com.ccsens.health.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import com.ccsens.health.bean.dto.HealthDto;
import com.ccsens.health.bean.dto.JourneyDto;
import com.ccsens.health.bean.po.*;
import com.ccsens.health.bean.vo.HealthVo;
import com.ccsens.health.persist.dao.HealthRecordsDao;
import com.ccsens.health.persist.dao.HealthTypeDao;
import com.ccsens.util.DateUtil;
import com.ccsens.util.QrCodeUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.io.File;
import java.io.IOException;
import java.util.*;
@Service
public class HealthService implements IHealthService{
@Autowired
private IUserService userService;
@Autowired
private Snowflake snowflake;
@Autowired
private HealthRecordsDao healthRecordsDao;
@Autowired
private HealthTypeDao healthTypeDao;
/**
* 上报健康信息
* @param params
* @return
*/
@Override
public HealthVo.HealthInfo addHealthInfo(QueryDto<HealthDto.healthInfo> params) {
return null;
public HealthVo.HealthInfo addHealthInfo(String token ,QueryDto<HealthDto.healthInfo> params) throws IOException {
//1、获取健康信息和userId
HealthDto.healthInfo healthInfo = params.getParam();
Long userId = params.getUserId();
//2、通过userId获取成员id
Employee employee = userService.getEmployeeByUserId(userId);
//3、保存健康信息
HealthRecords healthRecords = new HealthRecords();
healthRecords.setId(snowflake.nextId());
healthRecords.setEmployeeId(employee.getId());
BeanUtil.copyProperties(healthInfo,healthRecords);
healthRecordsDao.insertSelective(healthRecords);
//4、生成健康码,返回地址
String qrcodeInfo = WebConstant.QRCODE_HEALTH + "?token=" + token + "&scene=1011";
String path = QrCodeUtil.urlToQRCode(qrcodeInfo,WebConstant.UPLOAD_PATH_BASE_HEALTH);
String qrcodePath = WebConstant.TEST_URL_BASE_HEALTH + path;
//5、将健康码信息存入数据库
HealthQRCode healthQRCode = new HealthQRCode();
healthQRCode.setId(snowflake.nextId());
healthQRCode.setTime(System.currentTimeMillis());
healthQRCode.setHealthRecordsId(healthRecords.getId());
healthQRCode.setHealthTypeId(healthInfo.getHealthTypeId());
healthQRCode.setQrcodePath(qrcodePath);
healthQRCode.setTime(System.currentTimeMillis());
//6、查询健康信息和健康码地址返回前端
HealthVo.HealthInfo healthInfoVo = new HealthVo.HealthInfo();
BeanUtil.copyProperties(healthRecords,healthInfoVo);
healthInfoVo.setUserId(employee.getId());
healthInfoVo.setHealthCode(qrcodePath);
return healthInfoVo;
}
/**
@ -27,8 +77,18 @@ public class HealthService implements IHealthService{
* @return
*/
@Override
public HealthVo.HealthInfo getHealthInfo(QueryDto<JourneyDto.SelectDate> params) {
return null;
public List<HealthVo.HealthInfo> getHealthInfo(QueryDto<JourneyDto.SelectDate> params) throws Exception {
//1、获取查询时间和userId
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();
Long userId = params.getUserId();
//2、通过userid查询出成员id
Employee employee = userService.getEmployeeByUserId(userId);
//3、查询该成员符合时间的行程记录
List<HealthVo.HealthInfo> healthInfoList = healthRecordsDao.selectHealthInfoByDate(employee.getId(),startTime,endTime);
//4、返回
return healthInfoList;
}
/**
@ -36,8 +96,21 @@ public class HealthService implements IHealthService{
* @return
*/
@Override
public List<HealthVo.HealthType> getHealthType() {
return null;
public List<HealthVo.HealthTypeVo> getHealthType() {
List<HealthVo.HealthTypeVo> healthTypeVoList = new ArrayList<>();
HealthTypeExample healthTypeExample = new HealthTypeExample();
healthTypeExample.clear();
List<HealthType> healthTypeList = healthTypeDao.selectByExample(healthTypeExample);
if(CollectionUtil.isNotEmpty(healthTypeList)){
for(HealthType healthType : healthTypeList){
HealthVo.HealthTypeVo healthTypeVo = new HealthVo.HealthTypeVo();
healthTypeVo.setId(healthType.getId());
healthTypeVo.setName(healthType.getName());
healthTypeVoList.add(healthTypeVo);
}
}
return healthTypeVoList;
}
/**
@ -46,7 +119,40 @@ public class HealthService implements IHealthService{
* @return
*/
@Override
public List<HealthVo.HealthTypeStatistics> getHealthTypeStatistics(String date) {
return null;
public List<HealthVo.HealthTypeStatistics> getHealthTypeStatistics(String date) throws Exception {
List<HealthVo.HealthTypeStatistics> healthTypeStatisticsList = new ArrayList<>();
//1、获取日期的开始结束时间
Map<String, Long> timeMap = new HashMap<>();
timeMap = DateUtil.projectFormatDateTime(date);
Long startMillisTime = timeMap.get("startMillisTime");
Long endMillisTime = timeMap.get("endMillisTime");
//2、获取所有健康状态
int otherNumber = 0;
HealthTypeExample healthTypeExample = new HealthTypeExample();
healthTypeExample.clear();
List<HealthType> healthTypeList = healthTypeDao.selectByExample(healthTypeExample);
if(CollectionUtil.isNotEmpty(healthTypeList)){
for(HealthType healthType : healthTypeList){
//3、若需要单独统计则单独返回,否则都归为其他类返回总数
if(healthType.getIndependent() == 1){
//查询此状态在时间内的打卡人数
int number = healthRecordsDao.selectByTypeId(healthType.getId(),startMillisTime,endMillisTime);
HealthVo.HealthTypeStatistics healthTypeStatistics = new HealthVo.HealthTypeStatistics();
healthTypeStatistics.setName(healthType.getName());
healthTypeStatistics.setNumber(number);
healthTypeStatisticsList.add(healthTypeStatistics);
}else {
//查询此状态在时间内的打卡人数
int number = healthRecordsDao.selectByTypeId(healthType.getId(),startMillisTime,endMillisTime);
otherNumber += number;
}
}
HealthVo.HealthTypeStatistics healthTypeStatistics = new HealthVo.HealthTypeStatistics();
healthTypeStatistics.setName("其他");
healthTypeStatistics.setNumber(otherNumber);
healthTypeStatisticsList.add(healthTypeStatistics);
}
return healthTypeStatisticsList;
}
}

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

@ -5,14 +5,15 @@ import com.ccsens.health.bean.dto.JourneyDto;
import com.ccsens.health.bean.vo.HealthVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.io.IOException;
import java.util.List;
public interface IHealthService {
HealthVo.HealthInfo addHealthInfo(QueryDto<HealthDto.healthInfo> params);
HealthVo.HealthInfo addHealthInfo(String token,QueryDto<HealthDto.healthInfo> params) throws IOException;
HealthVo.HealthInfo getHealthInfo(QueryDto<JourneyDto.SelectDate> params);
List<HealthVo.HealthInfo> getHealthInfo(QueryDto<JourneyDto.SelectDate> params) throws Exception;
List<HealthVo.HealthType> getHealthType();
List<HealthVo.HealthTypeVo> getHealthType();
List<HealthVo.HealthTypeStatistics> getHealthTypeStatistics(String date);
List<HealthVo.HealthTypeStatistics> getHealthTypeStatistics(String date) throws Exception;
}

4
health/src/main/java/com/ccsens/health/service/IJourneyService.java

@ -5,8 +5,10 @@ import com.ccsens.health.bean.vo.JourneyVo;
import com.ccsens.health.bean.vo.UserVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.util.List;
public interface IJourneyService {
JourneyVo.JourneyInfo addJourney(QueryDto<JourneyDto.JourneyInfo> params);
JourneyVo.JourneyInfo getJourney(QueryDto<JourneyDto.SelectDate> params);
List<JourneyVo.JourneyInfo> getJourney(QueryDto<JourneyDto.SelectDate> params) throws Exception;
}

3
health/src/main/java/com/ccsens/health/service/IUserService.java

@ -1,6 +1,7 @@
package com.ccsens.health.service;
import com.ccsens.health.bean.dto.UserDto;
import com.ccsens.health.bean.po.Employee;
import com.ccsens.health.bean.vo.UserVo;
import com.ccsens.util.bean.dto.QueryDto;
@ -8,4 +9,6 @@ public interface IUserService {
UserVo.UserInfo getUserInfo(QueryDto params);
UserVo.UserInfo addUserInfo(QueryDto<UserDto.UserInfo> params);
Employee getEmployeeByUserId(Long userId);
}

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

@ -1,14 +1,37 @@
package com.ccsens.health.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import com.ccsens.health.bean.dto.JourneyDto;
import com.ccsens.health.bean.po.Employee;
import com.ccsens.health.bean.po.EmployeeExample;
import com.ccsens.health.bean.po.Journey;
import com.ccsens.health.bean.vo.JourneyVo;
import com.ccsens.health.bean.vo.UserVo;
import com.ccsens.health.persist.dao.EmployeeDao;
import com.ccsens.health.persist.dao.JourneyDao;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.DateUtil;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class JourneyService implements IJourneyService{
@Autowired
private IUserService userService;
@Autowired
private Snowflake snowflake;
@Autowired
private EmployeeDao employeeDao;
@Autowired
private JourneyDao journeyDao;
/**
* 上报行程
@ -17,7 +40,22 @@ public class JourneyService implements IJourneyService{
*/
@Override
public JourneyVo.JourneyInfo addJourney(QueryDto<JourneyDto.JourneyInfo> params) {
return null;
//1、获取用户id和传入信息
JourneyDto.JourneyInfo journeyInfo = params.getParam();
Long userId = params.getUserId();
//2、通过tallId找到health里的成员id
Employee employee = userService.getEmployeeByUserId(userId);
//3、保存行程
Journey journey = new Journey();
BeanUtil.copyProperties(journeyInfo,journey);
journey.setId(snowflake.nextId());
journey.setEmployeeId(employee.getId());
journeyDao.insertSelective(journey);
//4、查询行程信息,并返回
JourneyVo.JourneyInfo journeyInfoVo = new JourneyVo.JourneyInfo();
BeanUtil.copyProperties(journey,journeyInfoVo);
return journeyInfoVo;
}
/**
@ -26,7 +64,20 @@ public class JourneyService implements IJourneyService{
* @return
*/
@Override
public JourneyVo.JourneyInfo getJourney(QueryDto<JourneyDto.SelectDate> params) {
return null;
public List<JourneyVo.JourneyInfo> getJourney(QueryDto<JourneyDto.SelectDate> params) throws Exception {
//1、获取查询时间和userId
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();
Long userId = params.getUserId();
//2、通过userid查询出成员id
Employee employee = userService.getEmployeeByUserId(userId);
//3、查询该成员符合时间的行程记录
List<JourneyVo.JourneyInfo> journeyList = journeyDao.selectJourneyByDate(employee.getId(),startTime,endTime);
//4、返回
return journeyList;
}
}

30
health/src/main/java/com/ccsens/health/service/UserService.java

@ -1,13 +1,23 @@
package com.ccsens.health.service;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.health.bean.dto.UserDto;
import com.ccsens.health.bean.po.Employee;
import com.ccsens.health.bean.po.EmployeeExample;
import com.ccsens.health.bean.vo.UserVo;
import com.ccsens.health.persist.dao.EmployeeDao;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class UserService implements IUserService{
@Autowired
private EmployeeDao employeeDao;
/**
* 查询个人信息
@ -26,6 +36,24 @@ public class UserService implements IUserService{
*/
@Override
public UserVo.UserInfo addUserInfo(QueryDto<UserDto.UserInfo> params) {
//获取个人信息和tall的userId
return null;
}
/**
* 通过userid获取employeeId
*/
@Override
public Employee getEmployeeByUserId(Long userId){
EmployeeExample employeeExample = new EmployeeExample();
employeeExample.createCriteria().andTallUserIdEqualTo(userId);
List<Employee> employeeList = employeeDao.selectByExample(employeeExample);
if(CollectionUtil.isEmpty(employeeList)){
throw new BaseException(CodeEnum.NOT_EMPLOYEE);
}
return employeeList.get(0);
}
}

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

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

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

@ -0,0 +1,60 @@
<?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.dao.HealthRecordsDao">
<resultMap id="resultMap_HealthInfo" type="com.ccsens.health.bean.vo.HealthVo$HealthInfo">
<id column="hId" property="id"/>
<result column="hEmployeeId" property="userId"/>
<result column="hTime" property="time"/>
<result column="hDistrict" property="district"/>
<result column="hAddress" property="address"/>
<result column="hHealthTypeId" property="healthTypeId"/>
<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"/>
</resultMap>
<select id="selectHealthInfoByDate" resultMap="resultMap_HealthInfo" parameterType="java.util.Map">
select
h.id as hId,
h.emplotee_id as hEmployeeId,
h.time as hTime,
h.district as hDistrict,
h.address as hAddress,
h.health_type_id as hHealthTypeId,
h.hospital as hHospital,
h.touch_hubei as hTouchHuBei,
h.touch_sick as hTouchSick,
h.animal_heat as hAnimalHeat,
q.qrcode_path as hHealthCode
from
t_health_records h join t_health_qrcode q on q.health_records_id = h.id
where
h.rec_status = 0
and
h.employee_id = #{employeeId}
and
h.time &lt;= #{endTime}
and
h.time &gt;= #{startTime}
ORDER By h.time DESC
</select>
<select id="selectByTypeId" parameterType="java.util.Map" resultType="int">
select
COUNT(*)
from
t_health_records h
where
h.rec_status = 0
and
h.health_type_id = #{healthTypeId}
and
h.time &lt;= #{endTime}
and
h.time &gt;= #{startTime}
</select>
</mapper>

39
health/src/main/resources/mapper_dao/JourneyDao.xml

@ -0,0 +1,39 @@
<?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.dao.JourneyDao">
<resultMap id="resultMap_journey" type="com.ccsens.health.bean.vo.JourneyVo$JourneyInfo">
<id column="jId" property="id"/>
<result column="jEmployeeId" property="employeeId"/>
<result column="jTripMode" property="tripMode"/>
<result column="jCarNo" property="carNo"/>
<result column="jJourneyType" property="journeyType"/>
<result column="jStartTime" property="startTime"/>
<result column="jEndTime" property="endTime"/>
<result column="jTogether" property="together"/>
</resultMap>
<select id="selectJourneyByDate" resultMap="resultMap_journey" parameterType="java.util.Map">
select
id as jId,
employee_id as jEmployeeId,
trip_mode as jTripMode,
car_no as jCarNo,
start_time as jStartTime,
end_time as jEndTime,
journey_type as jJourneyType,
together as jTogether
from
t_journey
where
rec_status = 0
and
employee_id = #{employeeId}
and
start_time &lt;= #{endTime}
and
end_time &gt;= #{startTime}
ORDER By start_time DESC
</select>
</mapper>

26
health/src/main/resources/mapper_raw/DepartmentEmployeeMapper.xml

@ -5,8 +5,8 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="department_id" jdbcType="BIGINT" property="departmentId" />
<result column="employee_id" jdbcType="BIGINT" property="employeeId" />
<result column="order" jdbcType="TINYINT" property="order" />
<result column="sort" jdbcType="TINYINT" property="sort" />
<result column="order" jdbcType="INTEGER" property="order" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
@ -107,7 +107,7 @@
order, sort, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{departmentId,jdbcType=BIGINT}, #{employeeId,jdbcType=BIGINT},
#{order,jdbcType=TINYINT}, #{sort,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{order,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.DepartmentEmployee">
@ -149,10 +149,10 @@
#{employeeId,jdbcType=BIGINT},
</if>
<if test="order != null">
#{order,jdbcType=TINYINT},
#{order,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=TINYINT},
#{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
@ -184,10 +184,10 @@
employee_id = #{record.employeeId,jdbcType=BIGINT},
</if>
<if test="record.order != null">
order = #{record.order,jdbcType=TINYINT},
order = #{record.order,jdbcType=INTEGER},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=TINYINT},
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -208,8 +208,8 @@
set id = #{record.id,jdbcType=BIGINT},
department_id = #{record.departmentId,jdbcType=BIGINT},
employee_id = #{record.employeeId,jdbcType=BIGINT},
order = #{record.order,jdbcType=TINYINT},
sort = #{record.sort,jdbcType=TINYINT},
order = #{record.order,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=INTEGER},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
@ -227,10 +227,10 @@
employee_id = #{employeeId,jdbcType=BIGINT},
</if>
<if test="order != null">
order = #{order,jdbcType=TINYINT},
order = #{order,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=TINYINT},
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
@ -248,8 +248,8 @@
update t_department_employee
set department_id = #{departmentId,jdbcType=BIGINT},
employee_id = #{employeeId,jdbcType=BIGINT},
order = #{order,jdbcType=TINYINT},
sort = #{sort,jdbcType=TINYINT},
order = #{order,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}

14
health/src/main/resources/mapper_raw/EmployeeMapper.xml

@ -10,7 +10,7 @@
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="hide_mobile" jdbcType="TINYINT" property="hideMobile" />
<result column="english_name" jdbcType="VARCHAR" property="englishName" />
<result column="tall_user_id" jdbcType="VARCHAR" property="tallUserId" />
<result column="tall_user_id" jdbcType="BIGINT" property="tallUserId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
@ -115,7 +115,7 @@
)
values (#{id,jdbcType=BIGINT}, #{userid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{gender,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{address,jdbcType=VARCHAR},
#{hideMobile,jdbcType=TINYINT}, #{englishName,jdbcType=VARCHAR}, #{tallUserId,jdbcType=VARCHAR},
#{hideMobile,jdbcType=TINYINT}, #{englishName,jdbcType=VARCHAR}, #{tallUserId,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
@ -185,7 +185,7 @@
#{englishName,jdbcType=VARCHAR},
</if>
<if test="tallUserId != null">
#{tallUserId,jdbcType=VARCHAR},
#{tallUserId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
@ -232,7 +232,7 @@
english_name = #{record.englishName,jdbcType=VARCHAR},
</if>
<if test="record.tallUserId != null">
tall_user_id = #{record.tallUserId,jdbcType=VARCHAR},
tall_user_id = #{record.tallUserId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -258,7 +258,7 @@
address = #{record.address,jdbcType=VARCHAR},
hide_mobile = #{record.hideMobile,jdbcType=TINYINT},
english_name = #{record.englishName,jdbcType=VARCHAR},
tall_user_id = #{record.tallUserId,jdbcType=VARCHAR},
tall_user_id = #{record.tallUserId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
@ -291,7 +291,7 @@
english_name = #{englishName,jdbcType=VARCHAR},
</if>
<if test="tallUserId != null">
tall_user_id = #{tallUserId,jdbcType=VARCHAR},
tall_user_id = #{tallUserId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
@ -314,7 +314,7 @@
address = #{address,jdbcType=VARCHAR},
hide_mobile = #{hideMobile,jdbcType=TINYINT},
english_name = #{englishName,jdbcType=VARCHAR},
tall_user_id = #{tallUserId,jdbcType=VARCHAR},
tall_user_id = #{tallUserId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}

259
health/src/main/resources/mapper_raw/HealthQRCodeMapper.xml

@ -0,0 +1,259 @@
<?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.HealthQRCodeMapper">
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.HealthQRCode">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="health_records_id" jdbcType="BIGINT" property="healthRecordsId" />
<result column="health_type_id" jdbcType="BIGINT" property="healthTypeId" />
<result column="qrcode_path" jdbcType="VARCHAR" property="qrcodePath" />
<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, health_records_id, health_type_id, qrcode_path, time, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.HealthQRCodeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_health_qrcode
<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_qrcode
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_health_qrcode
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.health.bean.po.HealthQRCodeExample">
delete from t_health_qrcode
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.HealthQRCode">
insert into t_health_qrcode (id, health_records_id, health_type_id,
qrcode_path, time, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{healthRecordsId,jdbcType=BIGINT}, #{healthTypeId,jdbcType=BIGINT},
#{qrcodePath,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.HealthQRCode">
insert into t_health_qrcode
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="healthRecordsId != null">
health_records_id,
</if>
<if test="healthTypeId != null">
health_type_id,
</if>
<if test="qrcodePath != null">
qrcode_path,
</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="healthRecordsId != null">
#{healthRecordsId,jdbcType=BIGINT},
</if>
<if test="healthTypeId != null">
#{healthTypeId,jdbcType=BIGINT},
</if>
<if test="qrcodePath != null">
#{qrcodePath,jdbcType=VARCHAR},
</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.HealthQRCodeExample" resultType="java.lang.Long">
select count(*) from t_health_qrcode
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_health_qrcode
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.healthRecordsId != null">
health_records_id = #{record.healthRecordsId,jdbcType=BIGINT},
</if>
<if test="record.healthTypeId != null">
health_type_id = #{record.healthTypeId,jdbcType=BIGINT},
</if>
<if test="record.qrcodePath != null">
qrcode_path = #{record.qrcodePath,jdbcType=VARCHAR},
</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_qrcode
set id = #{record.id,jdbcType=BIGINT},
health_records_id = #{record.healthRecordsId,jdbcType=BIGINT},
health_type_id = #{record.healthTypeId,jdbcType=BIGINT},
qrcode_path = #{record.qrcodePath,jdbcType=VARCHAR},
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.HealthQRCode">
update t_health_qrcode
<set>
<if test="healthRecordsId != null">
health_records_id = #{healthRecordsId,jdbcType=BIGINT},
</if>
<if test="healthTypeId != null">
health_type_id = #{healthTypeId,jdbcType=BIGINT},
</if>
<if test="qrcodePath != null">
qrcode_path = #{qrcodePath,jdbcType=VARCHAR},
</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.HealthQRCode">
update t_health_qrcode
set health_records_id = #{healthRecordsId,jdbcType=BIGINT},
health_type_id = #{healthTypeId,jdbcType=BIGINT},
qrcode_path = #{qrcodePath,jdbcType=VARCHAR},
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>

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

@ -3,10 +3,12 @@
<mapper namespace="com.ccsens.health.persist.mapper.JourneyMapper">
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.Journey">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="trip_mode" jdbcType="VARCHAR" property="tripMode" />
<result column="employee_id" jdbcType="BIGINT" property="employeeId" />
<result column="trip_mode" jdbcType="TINYINT" property="tripMode" />
<result column="car_no" jdbcType="VARCHAR" property="carNo" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
<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="self_fill" jdbcType="TINYINT" property="selfFill" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -72,8 +74,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, trip_mode, car_no, start_time, end_time, together, self_fill, created_at, updated_at,
rec_status
id, employee_id, trip_mode, car_no, start_time, end_time, journey_type, together,
self_fill, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.JourneyExample" resultMap="BaseResultMap">
select
@ -106,14 +108,16 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.Journey">
insert into t_journey (id, trip_mode, car_no,
start_time, end_time, together,
self_fill, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{tripMode,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR},
#{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{together,jdbcType=VARCHAR},
#{selfFill,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
insert into t_journey (id, employee_id, trip_mode,
car_no, start_time, end_time,
journey_type, together, self_fill,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{employeeId,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}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.Journey">
insert into t_journey
@ -121,6 +125,9 @@
<if test="id != null">
id,
</if>
<if test="employeeId != null">
employee_id,
</if>
<if test="tripMode != null">
trip_mode,
</if>
@ -133,6 +140,9 @@
<if test="endTime != null">
end_time,
</if>
<if test="journeyType != null">
journey_type,
</if>
<if test="together != null">
together,
</if>
@ -153,8 +163,11 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="employeeId != null">
#{employeeId,jdbcType=BIGINT},
</if>
<if test="tripMode != null">
#{tripMode,jdbcType=VARCHAR},
#{tripMode,jdbcType=TINYINT},
</if>
<if test="carNo != null">
#{carNo,jdbcType=VARCHAR},
@ -165,6 +178,9 @@
<if test="endTime != null">
#{endTime,jdbcType=BIGINT},
</if>
<if test="journeyType != null">
#{journeyType,jdbcType=TINYINT},
</if>
<if test="together != null">
#{together,jdbcType=VARCHAR},
</if>
@ -194,8 +210,11 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.employeeId != null">
employee_id = #{record.employeeId,jdbcType=BIGINT},
</if>
<if test="record.tripMode != null">
trip_mode = #{record.tripMode,jdbcType=VARCHAR},
trip_mode = #{record.tripMode,jdbcType=TINYINT},
</if>
<if test="record.carNo != null">
car_no = #{record.carNo,jdbcType=VARCHAR},
@ -206,6 +225,9 @@
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=BIGINT},
</if>
<if test="record.journeyType != null">
journey_type = #{record.journeyType,jdbcType=TINYINT},
</if>
<if test="record.together != null">
together = #{record.together,jdbcType=VARCHAR},
</if>
@ -229,10 +251,12 @@
<update id="updateByExample" parameterType="map">
update t_journey
set id = #{record.id,jdbcType=BIGINT},
trip_mode = #{record.tripMode,jdbcType=VARCHAR},
employee_id = #{record.employeeId,jdbcType=BIGINT},
trip_mode = #{record.tripMode,jdbcType=TINYINT},
car_no = #{record.carNo,jdbcType=VARCHAR},
start_time = #{record.startTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
journey_type = #{record.journeyType,jdbcType=TINYINT},
together = #{record.together,jdbcType=VARCHAR},
self_fill = #{record.selfFill,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -245,8 +269,11 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.Journey">
update t_journey
<set>
<if test="employeeId != null">
employee_id = #{employeeId,jdbcType=BIGINT},
</if>
<if test="tripMode != null">
trip_mode = #{tripMode,jdbcType=VARCHAR},
trip_mode = #{tripMode,jdbcType=TINYINT},
</if>
<if test="carNo != null">
car_no = #{carNo,jdbcType=VARCHAR},
@ -257,6 +284,9 @@
<if test="endTime != null">
end_time = #{endTime,jdbcType=BIGINT},
</if>
<if test="journeyType != null">
journey_type = #{journeyType,jdbcType=TINYINT},
</if>
<if test="together != null">
together = #{together,jdbcType=VARCHAR},
</if>
@ -277,10 +307,12 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.Journey">
update t_journey
set trip_mode = #{tripMode,jdbcType=VARCHAR},
set employee_id = #{employeeId,jdbcType=BIGINT},
trip_mode = #{tripMode,jdbcType=TINYINT},
car_no = #{carNo,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},
journey_type = #{journeyType,jdbcType=TINYINT},
together = #{together,jdbcType=VARCHAR},
self_fill = #{selfFill,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

27
health/src/main/resources/mapper_raw/RealNameAuthMapper.xml

@ -6,6 +6,7 @@
<result column="employee_id" jdbcType="BIGINT" property="employeeId" />
<result column="id_card" jdbcType="BIGINT" property="idCard" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="post" jdbcType="TINYINT" property="post" />
<result column="no" jdbcType="VARCHAR" property="no" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -71,7 +72,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, employee_id, id_card, name, no, phone, created_at, updated_at, rec_status
id, employee_id, id_card, name, post, no, phone, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.RealNameAuthExample" resultMap="BaseResultMap">
select
@ -105,11 +106,13 @@
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.RealNameAuth">
insert into t_real_name_auth (id, employee_id, id_card,
name, no, phone, created_at,
updated_at, rec_status)
name, post, no, phone,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{employeeId,jdbcType=BIGINT}, #{idCard,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
#{name,jdbcType=VARCHAR}, #{post,jdbcType=TINYINT}, #{no,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.RealNameAuth">
insert into t_real_name_auth
@ -126,6 +129,9 @@
<if test="name != null">
name,
</if>
<if test="post != null">
post,
</if>
<if test="no != null">
no,
</if>
@ -155,6 +161,9 @@
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="post != null">
#{post,jdbcType=TINYINT},
</if>
<if test="no != null">
#{no,jdbcType=VARCHAR},
</if>
@ -193,6 +202,9 @@
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.post != null">
post = #{record.post,jdbcType=TINYINT},
</if>
<if test="record.no != null">
no = #{record.no,jdbcType=VARCHAR},
</if>
@ -219,6 +231,7 @@
employee_id = #{record.employeeId,jdbcType=BIGINT},
id_card = #{record.idCard,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
post = #{record.post,jdbcType=TINYINT},
no = #{record.no,jdbcType=VARCHAR},
phone = #{record.phone,jdbcType=VARCHAR},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -240,6 +253,9 @@
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="post != null">
post = #{post,jdbcType=TINYINT},
</if>
<if test="no != null">
no = #{no,jdbcType=VARCHAR},
</if>
@ -263,6 +279,7 @@
set employee_id = #{employeeId,jdbcType=BIGINT},
id_card = #{idCard,jdbcType=BIGINT},
name = #{name,jdbcType=VARCHAR},
post = #{post,jdbcType=TINYINT},
no = #{no,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},

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

@ -93,7 +93,8 @@ public enum CodeEnum {
ALREADY_EXIST_ACCOUNT(76,"该账号已存在",true),
NOT_SIGN_FIELD(77,"签到的字段不可用",true),
ALREADY_SIGN(78,"您已经签到过了,请勿重复签到",true),
ALREADY_ATTENTION(78,"您已经关注了这个项目",true)
ALREADY_ATTENTION(79,"您已经关注了这个项目",true),
NOT_EMPLOYEE(79,"未找到成员信息",true)
;
public CodeEnum addMsg(String msg){

18
util/src/main/java/com/ccsens/util/DateUtil.java

@ -140,4 +140,22 @@ public class DateUtil extends cn.hutool.core.date.DateUtil {
}
return true;
}
/**
* 获取某天零点的时间戳
*/
public static Long getZeroTime(Date date) throws Exception{
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return calendar.getTime().getTime();
}
// public static void main(String[] args) throws Exception {
//
// System.out.println(getZeroTime(new Date()));
// }
}

5
util/src/main/java/com/ccsens/util/QrCodeUtil.java

@ -38,7 +38,10 @@ public class QrCodeUtil {
out.close();
}
}
return fileName;
}
// public static void main(String[] args) throws IOException {
// System.out.println(urlToQRCode("321321321", ""));
// }
}

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

@ -50,7 +50,6 @@ public class WebConstant {
public static final long JWT_REFRESH_TOKEN_EXPIRED_TLLMILLS = 3600 * 17 * 30 * 1000; //17 days
public static final long JWT_ACCESS_TOKEN_EXPIRED_TLLMILLS_TEST = 3600 * 24 * 365 * 1000; //2 hours
//public static final String IMG_PATH_PREFIX = "d:\\images";
public static final String IMG_PATH_PREFIX = "/home/ptpro/images";
public static final String IMG_PATH_PREFIX_AVATAR = IMG_PATH_PREFIX + File.separator + "avatar";
public static final String IMG_PATH_PREFIX_SHARE_QR = IMG_PATH_PREFIX + File.separator + "qrcode";
@ -69,6 +68,7 @@ public class WebConstant {
public static final String PREFIX_WEBSOCKET_GROUPID = "groupId=";
public static final String UPLOAD_PATH_BASE = "/home/cloud/tall/uploads";
public static final String UPLOAD_PATH_BASE_HEALTH = "/home/cloud/health/uploads";
public static final String UPLOAD_PATH_BASE_MT_JUDGE = "mt";
public static final String UPLOAD_PATH_DELIVER = UPLOAD_PATH_BASE + File.separator + "delivers";
@ -82,6 +82,10 @@ public class WebConstant {
public static final String TEST_URL_BASE = TEST_URL + "gateway/tall/v1.0/uploads/";
public static final String TEST_URL_BASE_MT = TEST_URL + "gateway/mt/uploads/";
public static final String TEST_URL_BASE_HEALTH = TEST_URL + "gateway/health/uploads/";
public static final String QRCODE_HEALTH = "pages/user-code/user-code";
public static final String QRCODE_SITE = "pages/sign/sign";
public static final Integer Expired_Verify_Code_In_Seconds = 120;
public static final Integer Exist_Verify_Code_In_Seconds = 60;

1
util/src/main/java/com/ccsens/util/bean/dto/QueryDto.java

@ -22,4 +22,5 @@ public class QueryDto<T> {
private T param;
@ApiModelProperty("登录用户ID 前端不为userId赋值")
private Long userId;
}

Loading…
Cancel
Save