Browse Source

解决冲突

master
zhizhi wu 5 years ago
parent
commit
b9b0e1a732
  1. 2
      health/src/main/java/com/ccsens/health/api/ClockController.java
  2. 4
      health/src/main/java/com/ccsens/health/api/DebugController.java
  3. 2
      health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java
  4. 12
      health/src/main/java/com/ccsens/health/bean/po/HealthAbnormal.java
  5. 48
      health/src/main/java/com/ccsens/health/bean/po/HealthAbnormalExample.java
  6. 12
      health/src/main/java/com/ccsens/health/bean/po/HealthRecords.java
  7. 48
      health/src/main/java/com/ccsens/health/bean/po/HealthRecordsExample.java
  8. 12
      health/src/main/java/com/ccsens/health/bean/po/Journey.java
  9. 48
      health/src/main/java/com/ccsens/health/bean/po/JourneyExample.java
  10. 11
      health/src/main/java/com/ccsens/health/bean/po/Site.java
  11. 12
      health/src/main/java/com/ccsens/health/bean/po/SiteClockIn.java
  12. 48
      health/src/main/java/com/ccsens/health/bean/po/SiteClockInExample.java
  13. 70
      health/src/main/java/com/ccsens/health/bean/po/SiteExample.java
  14. 14
      health/src/main/java/com/ccsens/health/bean/vo/ClockVo.java
  15. 2
      health/src/main/java/com/ccsens/health/bean/vo/UserVo.java
  16. 2
      health/src/main/java/com/ccsens/health/persist/dao/SiteClockInDao.java
  17. 44
      health/src/main/java/com/ccsens/health/service/ClockService.java
  18. 20
      health/src/main/java/com/ccsens/health/service/HealthService.java
  19. 2
      health/src/main/java/com/ccsens/health/service/IClockService.java
  20. 2
      health/src/main/java/com/ccsens/health/service/IUserService.java
  21. 16
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  22. 50
      health/src/main/java/com/ccsens/health/service/UserService.java
  23. 8
      health/src/main/resources/mapper_dao/HealthRecordDao.xml
  24. 4
      health/src/main/resources/mapper_dao/JourneyDao.xml
  25. 21
      health/src/main/resources/mapper_dao/SiteClockInDao.xml
  26. 28
      health/src/main/resources/mapper_raw/HealthAbnormalMapper.xml
  27. 30
      health/src/main/resources/mapper_raw/HealthRecordsMapper.xml
  28. 30
      health/src/main/resources/mapper_raw/JourneyMapper.xml
  29. 28
      health/src/main/resources/mapper_raw/SiteClockInMapper.xml
  30. 28
      health/src/main/resources/mapper_raw/SiteMapper.xml
  31. 6
      util/home
  32. 1
      util/src/main/java/com/ccsens/util/CodeEnum.java
  33. 5
      util/src/main/java/com/ccsens/util/wx/WxXcxUtil.java
  34. 1
      util/src/test/java/com/ccsens/util/Base64Test.java

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

@ -60,7 +60,7 @@ public class ClockController {
@MustLogin
@ApiOperation(value = "获取所有场景信息", notes = "")
@RequestMapping(value = "siteInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ClockVo.SiteInfo>> getAllSiteInfo() throws Exception {
public JsonResponse<List<Site>> getAllSiteInfo() throws Exception {
log.info("获取所有场景信息");
List<Site> siteList = clockService.getAllSiteInfo();
return JsonResponse.newInstance().ok(siteList);

4
health/src/main/java/com/ccsens/health/api/DebugController.java

@ -32,8 +32,8 @@ public class DebugController {
})
@RequestMapping(value="qrcode",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse qrcode(HttpServletRequest request) throws Exception {
WxXcxUtil.getWxCode("pages/sign/sign?siteId=1235756988936359936&scene=1011&siteName=TSG&type=in"
,"1011", WebConstant.UPLOAD_PATH_BASE+"112233.jpg");
WxXcxUtil.getWxCode("pages/sign/sign"
,"scene=1011&siteName=TSG","/home/cloud/tall/uploads/112233.png");
return JsonResponse.newInstance().ok("完成");
}
}

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

@ -10,7 +10,7 @@ public class JourneyDto {
@Data
@ApiModel("上报行程")
public static class JourneyInfo{
@ApiModelProperty("'出行方式'")
@ApiModelProperty("出行方式 0铁路 1飞机 2客运车辆 3自驾 4船 5其他")
private int tripMode;
@ApiModelProperty("车次号")
private String carNo;

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

@ -6,7 +6,7 @@ import java.util.Date;
public class HealthAbnormal implements Serializable {
private Long id;
private Long employeeId;
private Long userId;
private Long time;
@ -28,12 +28,12 @@ public class HealthAbnormal implements Serializable {
this.id = id;
}
public Long getEmployeeId() {
return employeeId;
public Long getUserId() {
return userId;
}
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getTime() {
@ -83,7 +83,7 @@ public class HealthAbnormal implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", employeeId=").append(employeeId);
sb.append(", userId=").append(userId);
sb.append(", time=").append(time);
sb.append(", healthTypeId=").append(healthTypeId);
sb.append(", createdAt=").append(createdAt);

48
health/src/main/java/com/ccsens/health/bean/po/HealthAbnormalExample.java

@ -165,63 +165,63 @@ public class HealthAbnormalExample {
return (Criteria) this;
}
public Criteria andEmployeeIdIsNull() {
addCriterion("employee_id is null");
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andEmployeeIdIsNotNull() {
addCriterion("employee_id is not null");
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andEmployeeIdEqualTo(Long value) {
addCriterion("employee_id =", value, "employeeId");
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotEqualTo(Long value) {
addCriterion("employee_id <>", value, "employeeId");
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThan(Long value) {
addCriterion("employee_id >", value, "employeeId");
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThanOrEqualTo(Long value) {
addCriterion("employee_id >=", value, "employeeId");
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThan(Long value) {
addCriterion("employee_id <", value, "employeeId");
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThanOrEqualTo(Long value) {
addCriterion("employee_id <=", value, "employeeId");
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdIn(List<Long> values) {
addCriterion("employee_id in", values, "employeeId");
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotIn(List<Long> values) {
addCriterion("employee_id not in", values, "employeeId");
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdBetween(Long value1, Long value2) {
addCriterion("employee_id between", value1, value2, "employeeId");
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotBetween(Long value1, Long value2) {
addCriterion("employee_id not between", value1, value2, "employeeId");
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}

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

@ -7,7 +7,7 @@ import java.util.Date;
public class HealthRecords implements Serializable {
private Long id;
private Long employeeId;
private Long userId;
private Long time;
@ -43,12 +43,12 @@ public class HealthRecords implements Serializable {
this.id = id;
}
public Long getEmployeeId() {
return employeeId;
public Long getUserId() {
return userId;
}
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getTime() {
@ -154,7 +154,7 @@ public class HealthRecords implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", employeeId=").append(employeeId);
sb.append(", userId=").append(userId);
sb.append(", time=").append(time);
sb.append(", district=").append(district);
sb.append(", address=").append(address);

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

@ -166,63 +166,63 @@ public class HealthRecordsExample {
return (Criteria) this;
}
public Criteria andEmployeeIdIsNull() {
addCriterion("employee_id is null");
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andEmployeeIdIsNotNull() {
addCriterion("employee_id is not null");
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andEmployeeIdEqualTo(Long value) {
addCriterion("employee_id =", value, "employeeId");
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotEqualTo(Long value) {
addCriterion("employee_id <>", value, "employeeId");
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThan(Long value) {
addCriterion("employee_id >", value, "employeeId");
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThanOrEqualTo(Long value) {
addCriterion("employee_id >=", value, "employeeId");
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThan(Long value) {
addCriterion("employee_id <", value, "employeeId");
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThanOrEqualTo(Long value) {
addCriterion("employee_id <=", value, "employeeId");
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdIn(List<Long> values) {
addCriterion("employee_id in", values, "employeeId");
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotIn(List<Long> values) {
addCriterion("employee_id not in", values, "employeeId");
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdBetween(Long value1, Long value2) {
addCriterion("employee_id between", value1, value2, "employeeId");
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotBetween(Long value1, Long value2) {
addCriterion("employee_id not between", value1, value2, "employeeId");
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}

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

@ -6,7 +6,7 @@ import java.util.Date;
public class Journey implements Serializable {
private Long id;
private Long employeeId;
private Long userId;
private Byte tripMode;
@ -38,12 +38,12 @@ public class Journey implements Serializable {
this.id = id;
}
public Long getEmployeeId() {
return employeeId;
public Long getUserId() {
return userId;
}
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
public void setUserId(Long userId) {
this.userId = userId;
}
public Byte getTripMode() {
@ -133,7 +133,7 @@ public class Journey implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", employeeId=").append(employeeId);
sb.append(", userId=").append(userId);
sb.append(", tripMode=").append(tripMode);
sb.append(", carNo=").append(carNo);
sb.append(", startTime=").append(startTime);

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

@ -165,63 +165,63 @@ public class JourneyExample {
return (Criteria) this;
}
public Criteria andEmployeeIdIsNull() {
addCriterion("employee_id is null");
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andEmployeeIdIsNotNull() {
addCriterion("employee_id is not null");
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andEmployeeIdEqualTo(Long value) {
addCriterion("employee_id =", value, "employeeId");
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotEqualTo(Long value) {
addCriterion("employee_id <>", value, "employeeId");
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThan(Long value) {
addCriterion("employee_id >", value, "employeeId");
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThanOrEqualTo(Long value) {
addCriterion("employee_id >=", value, "employeeId");
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThan(Long value) {
addCriterion("employee_id <", value, "employeeId");
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThanOrEqualTo(Long value) {
addCriterion("employee_id <=", value, "employeeId");
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdIn(List<Long> values) {
addCriterion("employee_id in", values, "employeeId");
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotIn(List<Long> values) {
addCriterion("employee_id not in", values, "employeeId");
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdBetween(Long value1, Long value2) {
addCriterion("employee_id between", value1, value2, "employeeId");
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotBetween(Long value1, Long value2) {
addCriterion("employee_id not between", value1, value2, "employeeId");
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}

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

@ -15,6 +15,8 @@ public class Site implements Serializable {
private BigDecimal latitude;
private String parentCode;
private Date createdAt;
private Date updatedAt;
@ -63,6 +65,14 @@ public class Site implements Serializable {
this.latitude = latitude;
}
public String getParentCode() {
return parentCode;
}
public void setParentCode(String parentCode) {
this.parentCode = parentCode == null ? null : parentCode.trim();
}
public Date getCreatedAt() {
return createdAt;
}
@ -98,6 +108,7 @@ public class Site implements Serializable {
sb.append(", siteCode=").append(siteCode);
sb.append(", longitude=").append(longitude);
sb.append(", latitude=").append(latitude);
sb.append(", parentCode=").append(parentCode);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);

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

@ -12,7 +12,7 @@ public class SiteClockIn implements Serializable {
private String location;
private Long employeeId;
private Long userId;
private Date createdAt;
@ -54,12 +54,12 @@ public class SiteClockIn implements Serializable {
this.location = location == null ? null : location.trim();
}
public Long getEmployeeId() {
return employeeId;
public Long getUserId() {
return userId;
}
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
public void setUserId(Long userId) {
this.userId = userId;
}
public Date getCreatedAt() {
@ -96,7 +96,7 @@ public class SiteClockIn implements Serializable {
sb.append(", qrcodeId=").append(qrcodeId);
sb.append(", time=").append(time);
sb.append(", location=").append(location);
sb.append(", employeeId=").append(employeeId);
sb.append(", userId=").append(userId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);

48
health/src/main/java/com/ccsens/health/bean/po/SiteClockInExample.java

@ -355,63 +355,63 @@ public class SiteClockInExample {
return (Criteria) this;
}
public Criteria andEmployeeIdIsNull() {
addCriterion("employee_id is null");
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andEmployeeIdIsNotNull() {
addCriterion("employee_id is not null");
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andEmployeeIdEqualTo(Long value) {
addCriterion("employee_id =", value, "employeeId");
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotEqualTo(Long value) {
addCriterion("employee_id <>", value, "employeeId");
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThan(Long value) {
addCriterion("employee_id >", value, "employeeId");
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdGreaterThanOrEqualTo(Long value) {
addCriterion("employee_id >=", value, "employeeId");
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThan(Long value) {
addCriterion("employee_id <", value, "employeeId");
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdLessThanOrEqualTo(Long value) {
addCriterion("employee_id <=", value, "employeeId");
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdIn(List<Long> values) {
addCriterion("employee_id in", values, "employeeId");
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotIn(List<Long> values) {
addCriterion("employee_id not in", values, "employeeId");
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdBetween(Long value1, Long value2) {
addCriterion("employee_id between", value1, value2, "employeeId");
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andEmployeeIdNotBetween(Long value1, Long value2) {
addCriterion("employee_id not between", value1, value2, "employeeId");
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}

70
health/src/main/java/com/ccsens/health/bean/po/SiteExample.java

@ -426,6 +426,76 @@ public class SiteExample {
return (Criteria) this;
}
public Criteria andParentCodeIsNull() {
addCriterion("parent_code is null");
return (Criteria) this;
}
public Criteria andParentCodeIsNotNull() {
addCriterion("parent_code is not null");
return (Criteria) this;
}
public Criteria andParentCodeEqualTo(String value) {
addCriterion("parent_code =", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeNotEqualTo(String value) {
addCriterion("parent_code <>", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeGreaterThan(String value) {
addCriterion("parent_code >", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeGreaterThanOrEqualTo(String value) {
addCriterion("parent_code >=", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeLessThan(String value) {
addCriterion("parent_code <", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeLessThanOrEqualTo(String value) {
addCriterion("parent_code <=", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeLike(String value) {
addCriterion("parent_code like", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeNotLike(String value) {
addCriterion("parent_code not like", value, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeIn(List<String> values) {
addCriterion("parent_code in", values, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeNotIn(List<String> values) {
addCriterion("parent_code not in", values, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeBetween(String value1, String value2) {
addCriterion("parent_code between", value1, value2, "parentCode");
return (Criteria) this;
}
public Criteria andParentCodeNotBetween(String value1, String value2) {
addCriterion("parent_code not between", value1, value2, "parentCode");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;

14
health/src/main/java/com/ccsens/health/bean/vo/ClockVo.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 ClockVo {
@ -17,9 +19,9 @@ public class ClockVo {
@ApiModelProperty("打卡时间")
private Long time;
@ApiModelProperty("经度")
private Long longitude;
private BigDecimal longitude;
@ApiModelProperty("纬度")
private Long latitude;
private BigDecimal latitude;
}
@ -33,9 +35,9 @@ public class ClockVo {
@ApiModelProperty("人数")
private Integer number;
@ApiModelProperty("经度")
private Long longitude;
private BigDecimal longitude;
@ApiModelProperty("纬度")
private Long latitude;
private BigDecimal latitude;
}
@Data
@ -48,8 +50,8 @@ public class ClockVo {
@ApiModelProperty("场所Code")
private String siteCode;
@ApiModelProperty("经度")
private Long longitude;
private BigDecimal longitude;
@ApiModelProperty("纬度")
private Long latitude;
private BigDecimal latitude;
}
}

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

@ -28,7 +28,7 @@ public class UserVo {
private List<HealthCode> healthCodeList;
}
@Data
@ApiModel("查询个人信息")
@ApiModel("个人健康码信息")
public static class HealthCode{
@ApiModelProperty("打卡时间")
private Long time;

2
health/src/main/java/com/ccsens/health/persist/dao/SiteClockInDao.java

@ -10,4 +10,6 @@ import java.util.List;
@Repository
public interface SiteClockInDao extends SiteClockInMapper {
List<ClockVo.SiteClockInfo> selectHealthInfoByDate(@Param("employee")Long employee, @Param("startTime")Long startTime, @Param("endTime")Long endTime);
int getClockInNumberBySiteId(@Param("siteId")Long siteId);
}

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

@ -3,6 +3,7 @@ package com.ccsens.health.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.health.bean.dto.ClockDto;
import com.ccsens.health.bean.dto.HealthDto;
@ -51,12 +52,12 @@ public class ClockService implements IClockService {
//1、获取打卡信息和userId
ClockDto.SiteDto clickIn = params.getParam();
Long userId = params.getUserId();
//2、通过userId获取成员id
Employee employee = userService.getEmployeeByUserId(userId);
// //2、通过userId获取成员id
// Employee employee = userService.getEmployeeByUserId(userId);
//添加打卡记录
SiteClockIn siteClockIn = new SiteClockIn();
siteClockIn.setId(snowflake.nextId());
siteClockIn.setEmployeeId(employee.getId());
siteClockIn.setUserId(userId);
siteClockIn.setQrcodeId(clickIn.getSiteId());
siteClockIn.setTime(System.currentTimeMillis());
siteClockInDao.insertSelective(siteClockIn);
@ -75,10 +76,13 @@ public class ClockService implements IClockService {
Long startTime = selectDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : selectDate.getStartTime();
Long endTime = selectDate.getEndTime() == null ? System.currentTimeMillis() : selectDate.getEndTime();
String userId = tallFeignClient.getUserId(selectDate.getToken());
//2、通过userid查询出成员id
Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
if(StrUtil.isEmpty(userId)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
// //2、通过userid查询出成员id
// Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
//3、查询该成员符合时间的记录
List<ClockVo.SiteClockInfo> siteClockInfoList = siteClockInDao.selectHealthInfoByDate(employee.getId(),startTime,endTime);
List<ClockVo.SiteClockInfo> siteClockInfoList = siteClockInDao.selectHealthInfoByDate(Long.valueOf(userId),startTime,endTime);
//4、返回
return siteClockInfoList;
}
@ -89,9 +93,32 @@ public class ClockService implements IClockService {
* @return
*/
@Override
public List<ClockVo.SiteClockStatistics> getSiteClickStatistics(QueryDto<JourneyDto.StatisticsDate> params) {
public List<ClockVo.SiteClockStatistics> getSiteClickStatistics(QueryDto<JourneyDto.StatisticsDate> params) throws Exception {
List<ClockVo.SiteClockStatistics> siteClockStatisticsList = new ArrayList<>();
//1、获取日期的开始结束时间
JourneyDto.StatisticsDate statisticsDate = params.getParam();
Long startTime = statisticsDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : statisticsDate.getStartTime();
Long endTime = statisticsDate.getEndTime() == null ? System.currentTimeMillis() : statisticsDate.getEndTime();
//TODO 1、获取所有场景(暂时只获取学校的场所)
SiteExample siteExample = new SiteExample();
siteExample.createCriteria().andParentCodeEqualTo("SXDX");
List<Site> siteList = siteDao.selectByExample(siteExample);
if(CollectionUtil.isNotEmpty(siteList)){
for(Site site:siteList){
//2、获取场景的二维码(包括进出),查找每个二维码下的打卡记录
int number = siteClockInDao.getClockInNumberBySiteId(site.getId());
ClockVo.SiteClockStatistics siteClockStatistics = new ClockVo.SiteClockStatistics();
siteClockStatistics.setSiteId(site.getId());
siteClockStatistics.setSiteName(site.getSiteName());
siteClockStatistics.setLatitude(site.getLatitude());
siteClockStatistics.setLongitude(site.getLongitude());
siteClockStatistics.setNumber(number);
siteClockStatisticsList.add(siteClockStatistics);
}
}
return null;
return siteClockStatisticsList;
}
/**
@ -121,6 +148,7 @@ public class ClockService implements IClockService {
//添加场所二维码记录
SiteQrcode siteQrcode = new SiteQrcode();
siteQrcode.setId(snowflake.nextId());
siteQrcode.setSiteId(createQRCode.getId());
siteQrcode.setOutOrIn((byte) createQRCode.getType());
String type = "in";
if(createQRCode.getType() == 1){

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

@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.health.bean.dto.HealthDto;
import com.ccsens.health.bean.dto.JourneyDto;
@ -12,10 +13,12 @@ import com.ccsens.health.bean.vo.HealthVo;
import com.ccsens.health.persist.dao.HealthQRCodeDao;
import com.ccsens.health.persist.dao.HealthRecordsDao;
import com.ccsens.health.persist.dao.HealthTypeDao;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.DateUtil;
import com.ccsens.util.QrCodeUtil;
import com.ccsens.util.WebConstant;
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;
@ -49,13 +52,13 @@ public class HealthService implements IHealthService{
//1、获取健康信息和userId
HealthDto.healthInfo healthInfo = params.getParam();
Long userId = params.getUserId();
//2、通过userId获取成员id
Employee employee = userService.getEmployeeByUserId(userId);
// //2、通过userId获取成员id
// Employee employee = userService.getEmployeeByUserId(userId);
//3、保存健康信息
HealthRecords healthRecords = new HealthRecords();
healthRecords.setId(snowflake.nextId());
healthRecords.setTime(System.currentTimeMillis());
healthRecords.setEmployeeId(employee.getId());
healthRecords.setUserId(userId);
BeanUtil.copyProperties(healthInfo,healthRecords);
healthRecordsDao.insertSelective(healthRecords);
//4、生成健康码,返回地址
@ -73,7 +76,7 @@ public class HealthService implements IHealthService{
//6、查询健康信息和健康码地址返回前端
HealthVo.HealthInfo healthInfoVo = new HealthVo.HealthInfo();
BeanUtil.copyProperties(healthRecords,healthInfoVo);
healthInfoVo.setUserId(employee.getId());
healthInfoVo.setUserId(userId);
healthInfoVo.setHealthCode(qrcodePath);
return healthInfoVo;
}
@ -90,10 +93,13 @@ public class HealthService implements IHealthService{
Long startTime = selectDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : selectDate.getStartTime();
Long endTime = selectDate.getEndTime() == null ? System.currentTimeMillis() : selectDate.getEndTime();
String userId = tallFeignClient.getUserId(selectDate.getToken());
//2、通过userid查询出成员id
Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
if(StrUtil.isEmpty(userId)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
// //2、通过userid查询出成员id
// Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
//3、查询该成员符合时间的记录
List<HealthVo.HealthInfo> healthInfoList = healthRecordsDao.selectHealthInfoByDate(employee.getId(),startTime,endTime);
List<HealthVo.HealthInfo> healthInfoList = healthRecordsDao.selectHealthInfoByDate(Long.valueOf(userId),startTime,endTime);
//4、返回
return healthInfoList;
}

2
health/src/main/java/com/ccsens/health/service/IClockService.java

@ -14,7 +14,7 @@ public interface IClockService {
List<ClockVo.SiteClockInfo> getSiteClock(QueryDto<JourneyDto.SelectDate> params) throws Exception;
List<ClockVo.SiteClockStatistics> getSiteClickStatistics(QueryDto<JourneyDto.StatisticsDate> params);
List<ClockVo.SiteClockStatistics> getSiteClickStatistics(QueryDto<JourneyDto.StatisticsDate> params) throws Exception;
String getQRCode(QueryDto<JourneyDto.CreateQRCode> params) throws IOException;

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

@ -11,5 +11,5 @@ public interface IUserService {
UserVo.UserInfo addUserInfo(QueryDto<UserDto.UserInfo> params);
Employee getEmployeeByUserId(Long userId);
// Employee getEmployeeByUserId(Long userId);
}

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

@ -3,6 +3,7 @@ package com.ccsens.health.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.StrUtil;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.health.bean.dto.JourneyDto;
import com.ccsens.health.bean.po.Employee;
@ -46,13 +47,13 @@ public class JourneyService implements IJourneyService{
//1、获取用户id和传入信息
JourneyDto.JourneyInfo journeyInfo = params.getParam();
Long userId = params.getUserId();
//2、通过tallId找到health里的成员id
Employee employee = userService.getEmployeeByUserId(userId);
// //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());
journey.setUserId(userId);
journeyDao.insertSelective(journey);
//4、查询行程信息,并返回
JourneyVo.JourneyInfo journeyInfoVo = new JourneyVo.JourneyInfo();
@ -73,10 +74,13 @@ public class JourneyService implements IJourneyService{
Long startTime = selectDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : selectDate.getStartTime();
Long endTime = selectDate.getEndTime() == null ? System.currentTimeMillis() : selectDate.getEndTime();
String userId = tallFeignClient.getUserId(selectDate.getToken());
//2、通过userid查询出成员id
Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
if(StrUtil.isEmpty(userId)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
// //2、通过userid查询出成员id
// Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
//3、查询该成员符合时间的行程记录
List<JourneyVo.JourneyInfo> journeyList = journeyDao.selectJourneyByDate(employee.getId(),startTime,endTime);
List<JourneyVo.JourneyInfo> journeyList = journeyDao.selectJourneyByDate(Long.valueOf(userId),startTime,endTime);
//4、返回
return journeyList;
}

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

@ -3,13 +3,11 @@ package com.ccsens.health.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.StrUtil;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.health.bean.dto.JourneyDto;
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.po.HealthQRCodeExample;
import com.ccsens.health.bean.po.RealNameAuth;
import com.ccsens.health.bean.po.*;
import com.ccsens.health.bean.vo.UserVo;
import com.ccsens.health.persist.dao.EmployeeDao;
import com.ccsens.health.persist.dao.HealthRecordsDao;
@ -51,13 +49,16 @@ public class UserService implements IUserService{
Long startTime = selectDate.getStartTime() == null ? DateUtil.getZeroTime(new Date()) : selectDate.getStartTime();
Long endTime = selectDate.getEndTime() == null ? System.currentTimeMillis() : selectDate.getEndTime();
String userId = tallFeignClient.getUserId(selectDate.getToken());
if(StrUtil.isEmpty(userId)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
//查询信息
RealNameAuth realNameAuth = realNameAuthDao.selectByPrimaryKey(Long.valueOf(userId));
UserVo.UserInfo userInfoVo = new UserVo.UserInfo();
BeanUtil.copyProperties(realNameAuth,userInfoVo);
//查询健康码
Employee employee = getEmployeeByUserId(Long.valueOf(userId));
List<UserVo.HealthCode> healthCodeList = healthRecordsDao.getHealthQrCodeByEmployeeId(employee.getId(),startTime,endTime);
// //查询健康码
// Employee employee = getEmployeeByUserId(Long.valueOf(userId));
List<UserVo.HealthCode> healthCodeList = healthRecordsDao.getHealthQrCodeByEmployeeId(Long.valueOf(userId),startTime,endTime);
userInfoVo.setHealthCodeList(healthCodeList);
@ -74,10 +75,19 @@ public class UserService implements IUserService{
//获取个人信息和tall的userId
UserDto.UserInfo userInfo = params.getParam();
Long userId = params.getUserId();
//检查是否认证过
RealNameAuthExample realNameAuthExample = new RealNameAuthExample();
realNameAuthExample.createCriteria().andUserIdEqualTo(userId);
List<RealNameAuth> realNameAuthList = realNameAuthDao.selectByExample(realNameAuthExample);
if(CollectionUtil.isNotEmpty(realNameAuthList)){
//如果不为空代表已经认证过,直接返回认证信息
throw new BaseException(CodeEnum.ALREADY_REAL_AUTH);
}
//实名认证,检查是否属于该学校的学生
//保存信息
RealNameAuth realNameAuth = new RealNameAuth();
realNameAuth.setId(snowflake.nextId());
realNameAuth.setUserId(userId);
realNameAuth.setIdCard(userInfo.getIdCard());
realNameAuth.setName(userInfo.getName());
realNameAuth.setNo(userInfo.getNo());
@ -91,18 +101,18 @@ public class UserService implements IUserService{
}
/**
* 通过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);
}
// /**
// * 通过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);
// }
}

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

@ -28,7 +28,7 @@
<select id="selectHealthInfoByDate" resultMap="resultMap_HealthInfo" parameterType="java.util.Map">
select
h.id as hId,
h.employee_id as hEmployeeId,
h.user_id as hEmployeeId,
h.time as hTime,
h.district as hDistrict,
h.address as hAddress,
@ -43,7 +43,7 @@
where
h.rec_status = 0
and
h.employee_id = #{employeeId}
h.user_id = #{employeeId}
and
h.time &lt;= #{endTime}
and
@ -76,7 +76,7 @@
where
h.rec_status = 0
and
h.employee_id = #{employeeId}
h.user_id = #{employeeId}
and
h.time &lt;= #{endTime}
and
@ -93,7 +93,7 @@
SELECT
count(*) as times
FROM
t_employee e LEFT JOIN t_health_records r on e.id = r.employee_id
t_employee e LEFT JOIN t_health_records r on e.tall_user_id = r.user_id
where
r.time &lt;= #{endTime}
and

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

@ -15,7 +15,7 @@
<select id="selectJourneyByDate" resultMap="resultMap_journey" parameterType="java.util.Map">
select
id as jId,
employee_id as jEmployeeId,
user_id as jEmployeeId,
trip_mode as jTripMode,
car_no as jCarNo,
start_time as jStartTime,
@ -27,7 +27,7 @@
where
rec_status = 0
and
employee_id = #{employeeId}
user_id = #{employeeId}
and
start_time &lt;= #{endTime}
and

21
health/src/main/resources/mapper_dao/SiteClockInDao.xml

@ -12,16 +12,16 @@
<select id="selectHealthInfoByDate" resultMap="resultMap_siteClick" parameterType="java.util.Map">
select
s.id as sId,
c.employee_id as sSiteName,
c.user_id as sSiteName,
c.time as sTime,
s.district as sLongitude,
s.address as sLatitude
s.longitude as sLongitude,
s.latitude as sLatitude
from
t_site_clock_in c join t_site_qrcode q on q.id = c.qrcode_id join t_site s on q.site_id = s.id
where
c.rec_status = 0
and
c.employee_id = #{employeeId}
c.user_id = #{employeeId}
and
c.time &lt;= #{endTime}
and
@ -29,20 +29,15 @@
ORDER By c.time DESC
</select>
<select id="selectByTypeId" parameterType="java.util.Map" resultType="int">
<select id="getClockInNumberBySiteId" parameterType="java.util.Map" resultType="int">
select
COUNT(*)
from
t_health_records h
t_site_qrcode q RIGHT JOIN t_site_clock_in c on q.id = c.qrcode_id
where
h.rec_status = 0
and
h.health_type_id = #{healthTypeId}
and
h.time &lt;= #{endTime}
c.rec_status = 0
and
h.time &gt;= #{startTime}
q.site_id = #{siteId}
</select>
</mapper>

28
health/src/main/resources/mapper_raw/HealthAbnormalMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.ccsens.health.persist.mapper.HealthAbnormalMapper">
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.HealthAbnormal">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="employee_id" jdbcType="BIGINT" property="employeeId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="time" jdbcType="BIGINT" property="time" />
<result column="health_type_id" jdbcType="BIGINT" property="healthTypeId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -69,7 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, employee_id, time, health_type_id, created_at, updated_at, rec_status
id, user_id, time, health_type_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.HealthAbnormalExample" resultMap="BaseResultMap">
select
@ -102,10 +102,10 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.HealthAbnormal">
insert into t_health_abnormal (id, employee_id, time,
insert into t_health_abnormal (id, user_id, time,
health_type_id, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{employeeId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT},
#{healthTypeId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
@ -115,8 +115,8 @@
<if test="id != null">
id,
</if>
<if test="employeeId != null">
employee_id,
<if test="userId != null">
user_id,
</if>
<if test="time != null">
time,
@ -138,8 +138,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="employeeId != null">
#{employeeId,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="time != null">
#{time,jdbcType=BIGINT},
@ -170,8 +170,8 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.employeeId != null">
employee_id = #{record.employeeId,jdbcType=BIGINT},
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=BIGINT},
@ -196,7 +196,7 @@
<update id="updateByExample" parameterType="map">
update t_health_abnormal
set id = #{record.id,jdbcType=BIGINT},
employee_id = #{record.employeeId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
time = #{record.time,jdbcType=BIGINT},
health_type_id = #{record.healthTypeId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -209,8 +209,8 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.HealthAbnormal">
update t_health_abnormal
<set>
<if test="employeeId != null">
employee_id = #{employeeId,jdbcType=BIGINT},
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="time != null">
time = #{time,jdbcType=BIGINT},
@ -232,7 +232,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.HealthAbnormal">
update t_health_abnormal
set employee_id = #{employeeId,jdbcType=BIGINT},
set user_id = #{userId,jdbcType=BIGINT},
time = #{time,jdbcType=BIGINT},
health_type_id = #{healthTypeId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

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

@ -3,7 +3,7 @@
<mapper namespace="com.ccsens.health.persist.mapper.HealthRecordsMapper">
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.HealthRecords">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="employee_id" jdbcType="BIGINT" property="employeeId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="time" jdbcType="BIGINT" property="time" />
<result column="district" jdbcType="VARCHAR" property="district" />
<result column="address" jdbcType="VARCHAR" property="address" />
@ -76,8 +76,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, employee_id, time, district, address, health_type_id, hospital, touch_hubei,
touch_sick, animal_heat, self_fill, created_at, updated_at, rec_status
id, user_id, time, district, address, health_type_id, hospital, touch_hubei, touch_sick,
animal_heat, self_fill, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.HealthRecordsExample" resultMap="BaseResultMap">
select
@ -110,12 +110,12 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.HealthRecords">
insert into t_health_records (id, employee_id, time,
insert into t_health_records (id, user_id, time,
district, address, health_type_id,
hospital, touch_hubei, touch_sick,
animal_heat, self_fill, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{employeeId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT},
#{district,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{healthTypeId,jdbcType=BIGINT},
#{hospital,jdbcType=VARCHAR}, #{touchHubei,jdbcType=TINYINT}, #{touchSick,jdbcType=TINYINT},
#{animalHeat,jdbcType=DECIMAL}, #{selfFill,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
@ -127,8 +127,8 @@
<if test="id != null">
id,
</if>
<if test="employeeId != null">
employee_id,
<if test="userId != null">
user_id,
</if>
<if test="time != null">
time,
@ -171,8 +171,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="employeeId != null">
#{employeeId,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="time != null">
#{time,jdbcType=BIGINT},
@ -224,8 +224,8 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.employeeId != null">
employee_id = #{record.employeeId,jdbcType=BIGINT},
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=BIGINT},
@ -271,7 +271,7 @@
<update id="updateByExample" parameterType="map">
update t_health_records
set id = #{record.id,jdbcType=BIGINT},
employee_id = #{record.employeeId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
time = #{record.time,jdbcType=BIGINT},
district = #{record.district,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
@ -291,8 +291,8 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.HealthRecords">
update t_health_records
<set>
<if test="employeeId != null">
employee_id = #{employeeId,jdbcType=BIGINT},
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="time != null">
time = #{time,jdbcType=BIGINT},
@ -335,7 +335,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.HealthRecords">
update t_health_records
set employee_id = #{employeeId,jdbcType=BIGINT},
set user_id = #{userId,jdbcType=BIGINT},
time = #{time,jdbcType=BIGINT},
district = #{district,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},

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

@ -3,7 +3,7 @@
<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="employee_id" jdbcType="BIGINT" property="employeeId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="trip_mode" jdbcType="TINYINT" property="tripMode" />
<result column="car_no" jdbcType="VARCHAR" property="carNo" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
@ -74,8 +74,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, employee_id, trip_mode, car_no, start_time, end_time, journey_type, together,
self_fill, created_at, updated_at, rec_status
id, user_id, trip_mode, car_no, start_time, end_time, journey_type, together, self_fill,
created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.JourneyExample" resultMap="BaseResultMap">
select
@ -108,12 +108,12 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.Journey">
insert into t_journey (id, employee_id, trip_mode,
insert into t_journey (id, user_id, trip_mode,
car_no, start_time, end_time,
journey_type, together, self_fill,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{employeeId,jdbcType=BIGINT}, #{tripMode,jdbcType=TINYINT},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{tripMode,jdbcType=TINYINT},
#{carNo,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT},
#{journeyType,jdbcType=TINYINT}, #{together,jdbcType=VARCHAR}, #{selfFill,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
@ -125,8 +125,8 @@
<if test="id != null">
id,
</if>
<if test="employeeId != null">
employee_id,
<if test="userId != null">
user_id,
</if>
<if test="tripMode != null">
trip_mode,
@ -163,8 +163,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="employeeId != null">
#{employeeId,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="tripMode != null">
#{tripMode,jdbcType=TINYINT},
@ -210,8 +210,8 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.employeeId != null">
employee_id = #{record.employeeId,jdbcType=BIGINT},
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.tripMode != null">
trip_mode = #{record.tripMode,jdbcType=TINYINT},
@ -251,7 +251,7 @@
<update id="updateByExample" parameterType="map">
update t_journey
set id = #{record.id,jdbcType=BIGINT},
employee_id = #{record.employeeId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
trip_mode = #{record.tripMode,jdbcType=TINYINT},
car_no = #{record.carNo,jdbcType=VARCHAR},
start_time = #{record.startTime,jdbcType=BIGINT},
@ -269,8 +269,8 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.Journey">
update t_journey
<set>
<if test="employeeId != null">
employee_id = #{employeeId,jdbcType=BIGINT},
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="tripMode != null">
trip_mode = #{tripMode,jdbcType=TINYINT},
@ -307,7 +307,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.Journey">
update t_journey
set employee_id = #{employeeId,jdbcType=BIGINT},
set user_id = #{userId,jdbcType=BIGINT},
trip_mode = #{tripMode,jdbcType=TINYINT},
car_no = #{carNo,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=BIGINT},

28
health/src/main/resources/mapper_raw/SiteClockInMapper.xml

@ -6,7 +6,7 @@
<result column="qrcode_id" jdbcType="BIGINT" property="qrcodeId" />
<result column="time" jdbcType="BIGINT" property="time" />
<result column="location" jdbcType="VARCHAR" property="location" />
<result column="employee_id" jdbcType="BIGINT" property="employeeId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
@ -70,7 +70,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, qrcode_id, time, location, employee_id, created_at, updated_at, rec_status
id, qrcode_id, time, location, user_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.SiteClockInExample" resultMap="BaseResultMap">
select
@ -104,10 +104,10 @@
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.SiteClockIn">
insert into t_site_clock_in (id, qrcode_id, time,
location, employee_id, created_at,
location, user_id, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{qrcodeId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT},
#{location,jdbcType=VARCHAR}, #{employeeId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{location,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.SiteClockIn">
@ -125,8 +125,8 @@
<if test="location != null">
location,
</if>
<if test="employeeId != null">
employee_id,
<if test="userId != null">
user_id,
</if>
<if test="createdAt != null">
created_at,
@ -151,8 +151,8 @@
<if test="location != null">
#{location,jdbcType=VARCHAR},
</if>
<if test="employeeId != null">
#{employeeId,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
@ -186,8 +186,8 @@
<if test="record.location != null">
location = #{record.location,jdbcType=VARCHAR},
</if>
<if test="record.employeeId != null">
employee_id = #{record.employeeId,jdbcType=BIGINT},
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -209,7 +209,7 @@
qrcode_id = #{record.qrcodeId,jdbcType=BIGINT},
time = #{record.time,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
employee_id = #{record.employeeId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
@ -229,8 +229,8 @@
<if test="location != null">
location = #{location,jdbcType=VARCHAR},
</if>
<if test="employeeId != null">
employee_id = #{employeeId,jdbcType=BIGINT},
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
@ -249,7 +249,7 @@
set qrcode_id = #{qrcodeId,jdbcType=BIGINT},
time = #{time,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
employee_id = #{employeeId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}

28
health/src/main/resources/mapper_raw/SiteMapper.xml

@ -7,6 +7,7 @@
<result column="site_code" jdbcType="VARCHAR" property="siteCode" />
<result column="longitude" jdbcType="DECIMAL" property="longitude" />
<result column="latitude" jdbcType="DECIMAL" property="latitude" />
<result column="parent_code" jdbcType="VARCHAR" property="parentCode" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
@ -70,7 +71,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, site_name, site_code, longitude, latitude, created_at, updated_at, rec_status
id, site_name, site_code, longitude, latitude, parent_code, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.SiteExample" resultMap="BaseResultMap">
select
@ -104,11 +106,13 @@
</delete>
<insert id="insert" parameterType="com.ccsens.health.bean.po.Site">
insert into t_site (id, site_name, site_code,
longitude, latitude, created_at,
updated_at, rec_status)
longitude, latitude, parent_code,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{siteName,jdbcType=VARCHAR}, #{siteCode,jdbcType=VARCHAR},
#{longitude,jdbcType=DECIMAL}, #{latitude,jdbcType=DECIMAL}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
#{longitude,jdbcType=DECIMAL}, #{latitude,jdbcType=DECIMAL}, #{parentCode,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.Site">
insert into t_site
@ -128,6 +132,9 @@
<if test="latitude != null">
latitude,
</if>
<if test="parentCode != null">
parent_code,
</if>
<if test="createdAt != null">
created_at,
</if>
@ -154,6 +161,9 @@
<if test="latitude != null">
#{latitude,jdbcType=DECIMAL},
</if>
<if test="parentCode != null">
#{parentCode,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
@ -189,6 +199,9 @@
<if test="record.latitude != null">
latitude = #{record.latitude,jdbcType=DECIMAL},
</if>
<if test="record.parentCode != null">
parent_code = #{record.parentCode,jdbcType=VARCHAR},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
@ -210,6 +223,7 @@
site_code = #{record.siteCode,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=DECIMAL},
latitude = #{record.latitude,jdbcType=DECIMAL},
parent_code = #{record.parentCode,jdbcType=VARCHAR},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
@ -232,6 +246,9 @@
<if test="latitude != null">
latitude = #{latitude,jdbcType=DECIMAL},
</if>
<if test="parentCode != null">
parent_code = #{parentCode,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
@ -250,6 +267,7 @@
site_code = #{siteCode,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=DECIMAL},
latitude = #{latitude,jdbcType=DECIMAL},
parent_code = #{parentCode,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}

6
util/home

@ -1 +1,5 @@
{"errcode":41030,"errmsg":"invalid page hint: [0r6Ija0174b464]"}
<<<<<<< HEAD
{"errcode":41030,"errmsg":"invalid page hint: [0r6Ija0174b464]"}
=======
{"errcode":41030,"errmsg":"invalid page hint: [foP7da0210b464]"}
>>>>>>> 3245c21b1c677d848347a4f83969fc4ddf818ca3

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

@ -96,6 +96,7 @@ public enum CodeEnum {
ALREADY_ATTENTION(79,"您已经关注了这个项目",true),
NOT_EMPLOYEE(80,"未找到成员信息",true),
NOT_SITE(81,"未找到该场所",true),
ALREADY_REAL_AUTH(82,"您已经完成认证",true),
LACK_CONFIG(82,"缺少配置",true),
;

5
util/src/main/java/com/ccsens/util/wx/WxXcxUtil.java

@ -16,6 +16,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.nio.Buffer;
import java.util.*;
@Data
@ -65,7 +66,7 @@ public class WxXcxUtil {
public String page;
public Integer width;
public Boolean auto_color;
public Boolean line_color;
public Object line_color;
public Boolean is_hyaline;
}
@ -226,10 +227,10 @@ public class WxXcxUtil {
WechatCode wechatCode = new WechatCode();
wechatCode.page = page;
wechatCode.scene = scene;
wechatCode.line_color = "#800080";
String postStr = JacksonUtil.beanToJson(wechatCode);
System.out.println(postStr);
HttpsUtil.httpsRequest(url,"POST",postStr,path);
}

1
util/src/test/java/com/ccsens/util/Base64Test.java

@ -35,7 +35,6 @@ public class Base64Test {
@Test
public void test01() throws Exception{
WxXcxUtil.getWxCode("123123","1011","home");
}

Loading…
Cancel
Save