Browse Source

20210914新建微信工具包

tall3
zy_Java 4 years ago
parent
commit
e46e4f0108
  1. 27
      beneficiation/src/main/java/com/ccsens/beneficiation/BeneficiationApplication.java
  2. 53
      beneficiation/src/main/java/com/ccsens/beneficiation/api/ParameterController.java
  3. 52
      beneficiation/src/main/java/com/ccsens/beneficiation/api/WeightController.java
  4. 66
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/Message/BaseMessageDto.java
  5. 35
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/Message/BeneficiationMessageDto.java
  6. 31
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/Message/PendingMessage.java
  7. 69
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/ParameterDto.java
  8. 54
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/WeightDto.java
  9. 150
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/AdjustRecord.java
  10. 951
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/AdjustRecordExample.java
  11. 106
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/Equipment.java
  12. 701
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/EquipmentExample.java
  13. 106
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/EquipmentType.java
  14. 681
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/EquipmentTypeExample.java
  15. 117
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/Record.java
  16. 741
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/RecordExample.java
  17. 117
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/ThresholdValue.java
  18. 741
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/ThresholdValueExample.java
  19. 106
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/Weight.java
  20. 691
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/WeightExample.java
  21. 39
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/MessageVo.java
  22. 166
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/ParameterVo.java
  23. 37
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/WeightVo.java
  24. 31
      beneficiation/src/main/java/com/ccsens/beneficiation/config/BeanConfig.java
  25. 169
      beneficiation/src/main/java/com/ccsens/beneficiation/config/SpringConfig.java
  26. 56
      beneficiation/src/main/java/com/ccsens/beneficiation/config/SwaggerConfigure.java
  27. 159
      beneficiation/src/main/java/com/ccsens/beneficiation/intercept/MybatisInterceptor.java
  28. 55
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/dao/RecordDao.java
  29. 30
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/dao/WeightDao.java
  30. 30
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/AdjustRecordMapper.java
  31. 30
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/EquipmentMapper.java
  32. 30
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/EquipmentTypeMapper.java
  33. 30
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/RecordMapper.java
  34. 30
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/ThresholdValueMapper.java
  35. 30
      beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/WeightMapper.java
  36. 66
      beneficiation/src/main/java/com/ccsens/beneficiation/rabbitMQ/RabbitController.java
  37. 7
      beneficiation/src/main/java/com/ccsens/beneficiation/service/IMessageService.java
  38. 23
      beneficiation/src/main/java/com/ccsens/beneficiation/service/IParameterService.java
  39. 20
      beneficiation/src/main/java/com/ccsens/beneficiation/service/IRecordService.java
  40. 25
      beneficiation/src/main/java/com/ccsens/beneficiation/service/IWeightService.java
  41. 28
      beneficiation/src/main/java/com/ccsens/beneficiation/service/MessageService.java
  42. 294
      beneficiation/src/main/java/com/ccsens/beneficiation/service/ParameterService.java
  43. 166
      beneficiation/src/main/java/com/ccsens/beneficiation/service/RecordService.java
  44. 33
      beneficiation/src/main/java/com/ccsens/beneficiation/service/WeightService.java
  45. 56
      beneficiation/src/main/java/com/ccsens/beneficiation/util/Constant.java
  46. 30
      beneficiation/src/main/resources/application-common.yml
  47. 37
      beneficiation/src/main/resources/application-dev.yml
  48. 40
      beneficiation/src/main/resources/application-prod.yml
  49. 36
      beneficiation/src/main/resources/application-test.yml
  50. 6
      beneficiation/src/main/resources/application.yml
  51. 36
      beneficiation/src/main/resources/druid-dev.yml
  52. 33
      beneficiation/src/main/resources/druid-prod.yml
  53. 33
      beneficiation/src/main/resources/druid-test.yml
  54. 148
      beneficiation/src/main/resources/mapper_dao/RecordDao.xml
  55. 72
      beneficiation/src/main/resources/mapper_dao/WeightDao.xml
  56. 323
      beneficiation/src/main/resources/mapper_raw/AdjustRecordMapper.xml
  57. 258
      beneficiation/src/main/resources/mapper_raw/EquipmentMapper.xml
  58. 258
      beneficiation/src/main/resources/mapper_raw/EquipmentTypeMapper.xml
  59. 275
      beneficiation/src/main/resources/mapper_raw/RecordMapper.xml
  60. 275
      beneficiation/src/main/resources/mapper_raw/ThresholdValueMapper.xml
  61. 258
      beneficiation/src/main/resources/mapper_raw/WeightMapper.xml
  62. 73
      ct/pom.xml
  63. 24
      ct/src/main/java/com/ccsens/ct/CtApplication.java
  64. 54
      ct/src/main/java/com/ccsens/ct/api/BusinessController.java
  65. 51
      ct/src/main/java/com/ccsens/ct/api/ClockController.java
  66. 56
      ct/src/main/java/com/ccsens/ct/api/DebugController.java
  67. 88
      ct/src/main/java/com/ccsens/ct/api/SiteController.java
  68. 57
      ct/src/main/java/com/ccsens/ct/bean/dto/BusinessDto.java
  69. 22
      ct/src/main/java/com/ccsens/ct/bean/dto/ClockDto.java
  70. 70
      ct/src/main/java/com/ccsens/ct/bean/dto/SiteDto.java
  71. 161
      ct/src/main/java/com/ccsens/ct/bean/po/Business.java
  72. 1051
      ct/src/main/java/com/ccsens/ct/bean/po/BusinessExample.java
  73. 118
      ct/src/main/java/com/ccsens/ct/bean/po/Site.java
  74. 118
      ct/src/main/java/com/ccsens/ct/bean/po/SiteClockIn.java
  75. 742
      ct/src/main/java/com/ccsens/ct/bean/po/SiteClockInExample.java
  76. 762
      ct/src/main/java/com/ccsens/ct/bean/po/SiteExample.java
  77. 106
      ct/src/main/java/com/ccsens/ct/bean/po/SiteQrcode.java
  78. 701
      ct/src/main/java/com/ccsens/ct/bean/po/SiteQrcodeExample.java
  79. 29
      ct/src/main/java/com/ccsens/ct/bean/vo/BusinessVo.java
  80. 19
      ct/src/main/java/com/ccsens/ct/bean/vo/ClockVo.java
  81. 65
      ct/src/main/java/com/ccsens/ct/bean/vo/SiteVo.java
  82. 164
      ct/src/main/java/com/ccsens/ct/config/SpringConfig.java
  83. 154
      ct/src/main/java/com/ccsens/ct/intercept/MybatisInterceptor.java
  84. 8
      ct/src/main/java/com/ccsens/ct/persist/dao/BusinessDao.java
  85. 14
      ct/src/main/java/com/ccsens/ct/persist/dao/SiteClockInDao.java
  86. 11
      ct/src/main/java/com/ccsens/ct/persist/dao/SiteDao.java
  87. 9
      ct/src/main/java/com/ccsens/ct/persist/dao/SiteQrcodeDao.java
  88. 30
      ct/src/main/java/com/ccsens/ct/persist/mapper/BusinessMapper.java
  89. 30
      ct/src/main/java/com/ccsens/ct/persist/mapper/SiteClockInMapper.java
  90. 30
      ct/src/main/java/com/ccsens/ct/persist/mapper/SiteMapper.java
  91. 30
      ct/src/main/java/com/ccsens/ct/persist/mapper/SiteQrcodeMapper.java
  92. 170
      ct/src/main/java/com/ccsens/ct/service/BusinessService.java
  93. 58
      ct/src/main/java/com/ccsens/ct/service/ClockService.java
  94. 13
      ct/src/main/java/com/ccsens/ct/service/IBusinessService.java
  95. 14
      ct/src/main/java/com/ccsens/ct/service/IClockService.java
  96. 23
      ct/src/main/java/com/ccsens/ct/service/ISiteService.java
  97. 261
      ct/src/main/java/com/ccsens/ct/service/SiteService.java
  98. 30
      ct/src/main/resources/application-common.yml
  99. 29
      ct/src/main/resources/application-dev.yml
  100. 32
      ct/src/main/resources/application-test.yml

27
beneficiation/src/main/java/com/ccsens/beneficiation/BeneficiationApplication.java

@ -1,27 +0,0 @@
package com.ccsens.beneficiation;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
/**
* @author
*/
@MapperScan(basePackages = {"com.ccsens.beneficiation.persist.*"})
@ServletComponentScan
@EnableAsync
//开启断路器功能
@EnableCircuitBreaker
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign")
@SpringBootApplication(scanBasePackages = "com.ccsens")
public class BeneficiationApplication {
public static void main(String[] args) {
SpringApplication.run(BeneficiationApplication.class, args);
}
}

53
beneficiation/src/main/java/com/ccsens/beneficiation/api/ParameterController.java

@ -1,53 +0,0 @@
package com.ccsens.beneficiation.api;
import com.ccsens.beneficiation.bean.dto.ParameterDto;
import com.ccsens.beneficiation.bean.dto.WeightDto;
import com.ccsens.beneficiation.bean.vo.ParameterVo;
import com.ccsens.beneficiation.bean.vo.WeightVo;
import com.ccsens.beneficiation.service.IParameterService;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author
*/
@Slf4j
@Api(tags = "查看设置参数" , description = "")
@RestController
@RequestMapping("/parameter")
public class ParameterController {
@Resource
private IParameterService parameterService;
@MustLogin
@ApiOperation(value = "查看各个设备的参数", notes = "")
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ParameterVo.QueryParameter> queryParameter(@ApiParam @Validated @RequestBody QueryDto params) {
log.info("查看各个设备的参数:{}",params);
ParameterVo.QueryParameter parameterInfo = parameterService.queryParameter(params.getParam());
log.info("各个设备的参数:{}",parameterInfo);
return JsonResponse.newInstance().ok(parameterInfo);
}
@MustLogin
@ApiOperation(value = "修改设备的参数", notes = "")
@RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse updateParameter(@ApiParam @Validated @RequestBody QueryDto<ParameterDto.ParameterInfo> params) throws Exception {
log.info("修改设备的参数:{}",params);
parameterService.updateParameter(params.getParam());
log.info("修改设备的参数成功");
return JsonResponse.newInstance().ok();
}
}

52
beneficiation/src/main/java/com/ccsens/beneficiation/api/WeightController.java

@ -1,52 +0,0 @@
package com.ccsens.beneficiation.api;
import com.ccsens.beneficiation.bean.dto.WeightDto;
import com.ccsens.beneficiation.bean.vo.WeightVo;
import com.ccsens.beneficiation.service.IWeightService;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "皮带秤每天上传的重量统计相关" , description = "")
@RestController
@RequestMapping("/weight")
public class WeightController {
@Resource
private IWeightService weightService;
@MustLogin
@ApiOperation(value = "重量统计折线图", notes = "")
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<WeightVo.WeightDay>> queryWeight(@ApiParam @Validated @RequestBody QueryDto<WeightDto.GetWeightByDay> params) {
log.info("统计每天的重量:{}",params);
List<WeightVo.WeightDay> weightDay = weightService.queryWeightDay(params.getParam());
log.info("统计每天的重量成功");
return JsonResponse.newInstance().ok(weightDay);
}
@MustLogin
@ApiOperation(value = "重量累计表格", notes = "")
@RequestMapping(value = "/total", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<WeightVo.WeightTotal> queryWeightTotal(@ApiParam @Validated @RequestBody QueryDto<WeightDto.GetWeightTotal> params) {
log.info("重量累计表格:{}",params);
WeightVo.WeightTotal weightTotal = weightService.queryWeightTotal(params.getParam());
log.info("重量累计表格返回");
return JsonResponse.newInstance().ok(weightTotal);
}
}

66
beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/Message/BaseMessageDto.java

@ -1,66 +0,0 @@
package com.ccsens.beneficiation.bean.dto.Message;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.util.bean.message.common.InMessage;
import lombok.Data;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@Data
public class BaseMessageDto {
@Data
public static class MessageUser {
private Long id;
private Long userId; //本质上是authId //20190507 本质上是userId
private String nickname;
private String avatarUrl;
private boolean hasRead;
public MessageUser(){
hasRead = false;
}
public MessageUser(Long userId){
hasRead = false;
this.userId = userId;
}
public MessageUser(Long id,Long userId,String nickname,String avatarUrl){
this();
this.id = id;
this.userId = userId;
this.nickname = nickname;
this.avatarUrl = avatarUrl;
}
public static List<MessageUser> userIdToUsers(List<Long> userIds) {
List<MessageUser> users = new ArrayList<>();
userIds.forEach(userId ->{
users.add(new MessageUser(userId));
});
return users;
}
}
private Long time;
private String type;
private String event;
private Long projectId;
private MessageUser sender;
private List<MessageUser> receivers;
// private Object data;
public Set<String> receiversTransTos() {
Set<String> tos = new HashSet<>();
if (CollectionUtil.isEmpty(receivers)) {
return tos;
}
receivers.forEach(receiver -> {
InMessage.To to = new InMessage.To(receiver.getUserId());
tos.add(JSONObject.toJSONString(to));
});
return tos;
}
}

35
beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/Message/BeneficiationMessageDto.java

@ -1,35 +0,0 @@
package com.ccsens.beneficiation.bean.dto.Message;
import lombok.Data;
/**
* @author
*/
@Data
public class BeneficiationMessageDto {
/**
* 设备编号
*/
private String authId;
/**
*
*/
private Byte type;
/**
* 寄存器地址
*/
private int addr;
/**
* 类型对应的值
*/
private int value;
/**
* 版本号
*/
private String version;
/**
* 时间
*/
private Long time = System.currentTimeMillis();
}

31
beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/Message/PendingMessage.java

@ -1,31 +0,0 @@
package com.ccsens.beneficiation.bean.dto.Message;
import lombok.Data;
/**
* @author
*/
@Data
public class PendingMessage {
/**
* 设备编号
*/
private String authId;
/**
* 寄存器地址
*/
private int addr;
/**
* 类型对应的值
*/
private String value;
/**
* 版本号
*/
private String version;
/**
* 时间
*/
private Long time = System.currentTimeMillis();
}

69
beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/ParameterDto.java

@ -1,69 +0,0 @@
package com.ccsens.beneficiation.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* @author
*/
@Data
public class ParameterDto {
@Data
@ApiModel("修改仪器的参数")
public static class ParameterInfo{
@ApiModelProperty("电耳1")
private ParameterThreshold electricEar1;
@ApiModelProperty("电耳2")
private ParameterThreshold electricEar2;
@ApiModelProperty("电磁阀1")
private Parameter solenoidValue1;
@ApiModelProperty("电磁阀2")
private Parameter solenoidValue2;
@ApiModelProperty("变频器1")
private Parameter transducer1;
@ApiModelProperty("变频器2")
private Parameter transducer2;
@ApiModelProperty("变频器3")
private Parameter transducer3;
@ApiModelProperty("变频器4")
private Parameter transducer4;
}
@Data
@ApiModel("单个仪器的参数")
public static class Parameter{
@NotNull
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("设置值")
private BigDecimal settingValue;
}
@Data
@ApiModel("电耳的阀值")
public static class ParameterThreshold{
@NotNull
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("阀值1")
private Threshold thresholdValue1;
@ApiModelProperty("阀值2")
private Threshold thresholdValue2;
@ApiModelProperty("阀值3")
private Threshold thresholdValue3;
}
@Data
@ApiModel("阀值的最大最小值")
public static class Threshold{
@ApiModelProperty("最小")
private BigDecimal minValue;
@ApiModelProperty("最大")
private BigDecimal maxValue;
}
}

54
beneficiation/src/main/java/com/ccsens/beneficiation/bean/dto/WeightDto.java

@ -1,54 +0,0 @@
package com.ccsens.beneficiation.bean.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author
*/
@Data
public class WeightDto {
@Data
@ApiModel("统计重量信息")
public static class GetWeightByDay {
@ApiModelProperty("设备id(皮带秤id)默认1")
private Long equipmentId = 1L;
@ApiModelProperty("开始时间 不传默认查询全部")
private Date startTime;
@ApiModelProperty("结束时间 不传默认查询全部")
private Date endTime;
@ApiModelProperty("查询颗粒度 0天 1周 2月 3年 默认天")
private int dateType;
@JsonIgnore
private String dateTypeStr;
public String getDateTypeStr() {
switch (dateType){
case 1:
return "%Y-%u";
case 2:
return "%Y-%m";
case 3:
return "%Y";
default:
return "%Y-%m-%d";
}
}
}
@Data
@ApiModel("查询重量累计")
public static class GetWeightTotal {
@ApiModelProperty("日期 为空则默认当前")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date datetime;
}
}

150
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/AdjustRecord.java

@ -1,150 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.io.Serializable;
import java.util.Date;
public class AdjustRecord implements Serializable {
private Long id;
private Long time;
private Long monitoringId;
private String monitoringValue;
private Long thresholdId;
private Long equipmentId;
private String beforeValue;
private String afterValue;
private Long operator;
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 getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
public Long getMonitoringId() {
return monitoringId;
}
public void setMonitoringId(Long monitoringId) {
this.monitoringId = monitoringId;
}
public String getMonitoringValue() {
return monitoringValue;
}
public void setMonitoringValue(String monitoringValue) {
this.monitoringValue = monitoringValue == null ? null : monitoringValue.trim();
}
public Long getThresholdId() {
return thresholdId;
}
public void setThresholdId(Long thresholdId) {
this.thresholdId = thresholdId;
}
public Long getEquipmentId() {
return equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public String getBeforeValue() {
return beforeValue;
}
public void setBeforeValue(String beforeValue) {
this.beforeValue = beforeValue == null ? null : beforeValue.trim();
}
public String getAfterValue() {
return afterValue;
}
public void setAfterValue(String afterValue) {
this.afterValue = afterValue == null ? null : afterValue.trim();
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
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(", time=").append(time);
sb.append(", monitoringId=").append(monitoringId);
sb.append(", monitoringValue=").append(monitoringValue);
sb.append(", thresholdId=").append(thresholdId);
sb.append(", equipmentId=").append(equipmentId);
sb.append(", beforeValue=").append(beforeValue);
sb.append(", afterValue=").append(afterValue);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

951
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/AdjustRecordExample.java

@ -1,951 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class AdjustRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public AdjustRecordExample() {
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 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 andMonitoringIdIsNull() {
addCriterion("monitoring_id is null");
return (Criteria) this;
}
public Criteria andMonitoringIdIsNotNull() {
addCriterion("monitoring_id is not null");
return (Criteria) this;
}
public Criteria andMonitoringIdEqualTo(Long value) {
addCriterion("monitoring_id =", value, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdNotEqualTo(Long value) {
addCriterion("monitoring_id <>", value, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdGreaterThan(Long value) {
addCriterion("monitoring_id >", value, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdGreaterThanOrEqualTo(Long value) {
addCriterion("monitoring_id >=", value, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdLessThan(Long value) {
addCriterion("monitoring_id <", value, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdLessThanOrEqualTo(Long value) {
addCriterion("monitoring_id <=", value, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdIn(List<Long> values) {
addCriterion("monitoring_id in", values, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdNotIn(List<Long> values) {
addCriterion("monitoring_id not in", values, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdBetween(Long value1, Long value2) {
addCriterion("monitoring_id between", value1, value2, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringIdNotBetween(Long value1, Long value2) {
addCriterion("monitoring_id not between", value1, value2, "monitoringId");
return (Criteria) this;
}
public Criteria andMonitoringValueIsNull() {
addCriterion("monitoring_value is null");
return (Criteria) this;
}
public Criteria andMonitoringValueIsNotNull() {
addCriterion("monitoring_value is not null");
return (Criteria) this;
}
public Criteria andMonitoringValueEqualTo(String value) {
addCriterion("monitoring_value =", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueNotEqualTo(String value) {
addCriterion("monitoring_value <>", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueGreaterThan(String value) {
addCriterion("monitoring_value >", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueGreaterThanOrEqualTo(String value) {
addCriterion("monitoring_value >=", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueLessThan(String value) {
addCriterion("monitoring_value <", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueLessThanOrEqualTo(String value) {
addCriterion("monitoring_value <=", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueLike(String value) {
addCriterion("monitoring_value like", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueNotLike(String value) {
addCriterion("monitoring_value not like", value, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueIn(List<String> values) {
addCriterion("monitoring_value in", values, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueNotIn(List<String> values) {
addCriterion("monitoring_value not in", values, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueBetween(String value1, String value2) {
addCriterion("monitoring_value between", value1, value2, "monitoringValue");
return (Criteria) this;
}
public Criteria andMonitoringValueNotBetween(String value1, String value2) {
addCriterion("monitoring_value not between", value1, value2, "monitoringValue");
return (Criteria) this;
}
public Criteria andThresholdIdIsNull() {
addCriterion("threshold_id is null");
return (Criteria) this;
}
public Criteria andThresholdIdIsNotNull() {
addCriterion("threshold_id is not null");
return (Criteria) this;
}
public Criteria andThresholdIdEqualTo(Long value) {
addCriterion("threshold_id =", value, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdNotEqualTo(Long value) {
addCriterion("threshold_id <>", value, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdGreaterThan(Long value) {
addCriterion("threshold_id >", value, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdGreaterThanOrEqualTo(Long value) {
addCriterion("threshold_id >=", value, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdLessThan(Long value) {
addCriterion("threshold_id <", value, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdLessThanOrEqualTo(Long value) {
addCriterion("threshold_id <=", value, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdIn(List<Long> values) {
addCriterion("threshold_id in", values, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdNotIn(List<Long> values) {
addCriterion("threshold_id not in", values, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdBetween(Long value1, Long value2) {
addCriterion("threshold_id between", value1, value2, "thresholdId");
return (Criteria) this;
}
public Criteria andThresholdIdNotBetween(Long value1, Long value2) {
addCriterion("threshold_id not between", value1, value2, "thresholdId");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNull() {
addCriterion("equipment_id is null");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNotNull() {
addCriterion("equipment_id is not null");
return (Criteria) this;
}
public Criteria andEquipmentIdEqualTo(Long value) {
addCriterion("equipment_id =", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotEqualTo(Long value) {
addCriterion("equipment_id <>", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThan(Long value) {
addCriterion("equipment_id >", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThanOrEqualTo(Long value) {
addCriterion("equipment_id >=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThan(Long value) {
addCriterion("equipment_id <", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThanOrEqualTo(Long value) {
addCriterion("equipment_id <=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdIn(List<Long> values) {
addCriterion("equipment_id in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotIn(List<Long> values) {
addCriterion("equipment_id not in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdBetween(Long value1, Long value2) {
addCriterion("equipment_id between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotBetween(Long value1, Long value2) {
addCriterion("equipment_id not between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andBeforeValueIsNull() {
addCriterion("before_value is null");
return (Criteria) this;
}
public Criteria andBeforeValueIsNotNull() {
addCriterion("before_value is not null");
return (Criteria) this;
}
public Criteria andBeforeValueEqualTo(String value) {
addCriterion("before_value =", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueNotEqualTo(String value) {
addCriterion("before_value <>", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueGreaterThan(String value) {
addCriterion("before_value >", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueGreaterThanOrEqualTo(String value) {
addCriterion("before_value >=", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueLessThan(String value) {
addCriterion("before_value <", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueLessThanOrEqualTo(String value) {
addCriterion("before_value <=", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueLike(String value) {
addCriterion("before_value like", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueNotLike(String value) {
addCriterion("before_value not like", value, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueIn(List<String> values) {
addCriterion("before_value in", values, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueNotIn(List<String> values) {
addCriterion("before_value not in", values, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueBetween(String value1, String value2) {
addCriterion("before_value between", value1, value2, "beforeValue");
return (Criteria) this;
}
public Criteria andBeforeValueNotBetween(String value1, String value2) {
addCriterion("before_value not between", value1, value2, "beforeValue");
return (Criteria) this;
}
public Criteria andAfterValueIsNull() {
addCriterion("after_value is null");
return (Criteria) this;
}
public Criteria andAfterValueIsNotNull() {
addCriterion("after_value is not null");
return (Criteria) this;
}
public Criteria andAfterValueEqualTo(String value) {
addCriterion("after_value =", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueNotEqualTo(String value) {
addCriterion("after_value <>", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueGreaterThan(String value) {
addCriterion("after_value >", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueGreaterThanOrEqualTo(String value) {
addCriterion("after_value >=", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueLessThan(String value) {
addCriterion("after_value <", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueLessThanOrEqualTo(String value) {
addCriterion("after_value <=", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueLike(String value) {
addCriterion("after_value like", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueNotLike(String value) {
addCriterion("after_value not like", value, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueIn(List<String> values) {
addCriterion("after_value in", values, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueNotIn(List<String> values) {
addCriterion("after_value not in", values, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueBetween(String value1, String value2) {
addCriterion("after_value between", value1, value2, "afterValue");
return (Criteria) this;
}
public Criteria andAfterValueNotBetween(String value1, String value2) {
addCriterion("after_value not between", value1, value2, "afterValue");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
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);
}
}
}

106
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/Equipment.java

@ -1,106 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.io.Serializable;
import java.util.Date;
public class Equipment implements Serializable {
private Long id;
private Byte type;
private String authId;
private String verion;
private Long operator;
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 Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public String getAuthId() {
return authId;
}
public void setAuthId(String authId) {
this.authId = authId == null ? null : authId.trim();
}
public String getVerion() {
return verion;
}
public void setVerion(String verion) {
this.verion = verion == null ? null : verion.trim();
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
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(", type=").append(type);
sb.append(", authId=").append(authId);
sb.append(", verion=").append(verion);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

701
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/EquipmentExample.java

@ -1,701 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class EquipmentExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public EquipmentExample() {
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 andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Byte value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Byte value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Byte value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Byte value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Byte value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Byte> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Byte> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Byte value1, Byte value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Byte value1, Byte value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andAuthIdIsNull() {
addCriterion("auth_id is null");
return (Criteria) this;
}
public Criteria andAuthIdIsNotNull() {
addCriterion("auth_id is not null");
return (Criteria) this;
}
public Criteria andAuthIdEqualTo(String value) {
addCriterion("auth_id =", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdNotEqualTo(String value) {
addCriterion("auth_id <>", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdGreaterThan(String value) {
addCriterion("auth_id >", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdGreaterThanOrEqualTo(String value) {
addCriterion("auth_id >=", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdLessThan(String value) {
addCriterion("auth_id <", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdLessThanOrEqualTo(String value) {
addCriterion("auth_id <=", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdLike(String value) {
addCriterion("auth_id like", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdNotLike(String value) {
addCriterion("auth_id not like", value, "authId");
return (Criteria) this;
}
public Criteria andAuthIdIn(List<String> values) {
addCriterion("auth_id in", values, "authId");
return (Criteria) this;
}
public Criteria andAuthIdNotIn(List<String> values) {
addCriterion("auth_id not in", values, "authId");
return (Criteria) this;
}
public Criteria andAuthIdBetween(String value1, String value2) {
addCriterion("auth_id between", value1, value2, "authId");
return (Criteria) this;
}
public Criteria andAuthIdNotBetween(String value1, String value2) {
addCriterion("auth_id not between", value1, value2, "authId");
return (Criteria) this;
}
public Criteria andVerionIsNull() {
addCriterion("verion is null");
return (Criteria) this;
}
public Criteria andVerionIsNotNull() {
addCriterion("verion is not null");
return (Criteria) this;
}
public Criteria andVerionEqualTo(String value) {
addCriterion("verion =", value, "verion");
return (Criteria) this;
}
public Criteria andVerionNotEqualTo(String value) {
addCriterion("verion <>", value, "verion");
return (Criteria) this;
}
public Criteria andVerionGreaterThan(String value) {
addCriterion("verion >", value, "verion");
return (Criteria) this;
}
public Criteria andVerionGreaterThanOrEqualTo(String value) {
addCriterion("verion >=", value, "verion");
return (Criteria) this;
}
public Criteria andVerionLessThan(String value) {
addCriterion("verion <", value, "verion");
return (Criteria) this;
}
public Criteria andVerionLessThanOrEqualTo(String value) {
addCriterion("verion <=", value, "verion");
return (Criteria) this;
}
public Criteria andVerionLike(String value) {
addCriterion("verion like", value, "verion");
return (Criteria) this;
}
public Criteria andVerionNotLike(String value) {
addCriterion("verion not like", value, "verion");
return (Criteria) this;
}
public Criteria andVerionIn(List<String> values) {
addCriterion("verion in", values, "verion");
return (Criteria) this;
}
public Criteria andVerionNotIn(List<String> values) {
addCriterion("verion not in", values, "verion");
return (Criteria) this;
}
public Criteria andVerionBetween(String value1, String value2) {
addCriterion("verion between", value1, value2, "verion");
return (Criteria) this;
}
public Criteria andVerionNotBetween(String value1, String value2) {
addCriterion("verion not between", value1, value2, "verion");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
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);
}
}
}

106
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/EquipmentType.java

@ -1,106 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.io.Serializable;
import java.util.Date;
public class EquipmentType implements Serializable {
private Long id;
private Long equipmentId;
private Byte type;
private Integer addr;
private Long operator;
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 getEquipmentId() {
return equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public Integer getAddr() {
return addr;
}
public void setAddr(Integer addr) {
this.addr = addr;
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
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(", equipmentId=").append(equipmentId);
sb.append(", type=").append(type);
sb.append(", addr=").append(addr);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

681
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/EquipmentTypeExample.java

@ -1,681 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class EquipmentTypeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public EquipmentTypeExample() {
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 andEquipmentIdIsNull() {
addCriterion("equipment_id is null");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNotNull() {
addCriterion("equipment_id is not null");
return (Criteria) this;
}
public Criteria andEquipmentIdEqualTo(Long value) {
addCriterion("equipment_id =", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotEqualTo(Long value) {
addCriterion("equipment_id <>", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThan(Long value) {
addCriterion("equipment_id >", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThanOrEqualTo(Long value) {
addCriterion("equipment_id >=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThan(Long value) {
addCriterion("equipment_id <", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThanOrEqualTo(Long value) {
addCriterion("equipment_id <=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdIn(List<Long> values) {
addCriterion("equipment_id in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotIn(List<Long> values) {
addCriterion("equipment_id not in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdBetween(Long value1, Long value2) {
addCriterion("equipment_id between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotBetween(Long value1, Long value2) {
addCriterion("equipment_id not between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Byte value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Byte value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Byte value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Byte value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Byte value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Byte> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Byte> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Byte value1, Byte value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Byte value1, Byte value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andAddrIsNull() {
addCriterion("addr is null");
return (Criteria) this;
}
public Criteria andAddrIsNotNull() {
addCriterion("addr is not null");
return (Criteria) this;
}
public Criteria andAddrEqualTo(Integer value) {
addCriterion("addr =", value, "addr");
return (Criteria) this;
}
public Criteria andAddrNotEqualTo(Integer value) {
addCriterion("addr <>", value, "addr");
return (Criteria) this;
}
public Criteria andAddrGreaterThan(Integer value) {
addCriterion("addr >", value, "addr");
return (Criteria) this;
}
public Criteria andAddrGreaterThanOrEqualTo(Integer value) {
addCriterion("addr >=", value, "addr");
return (Criteria) this;
}
public Criteria andAddrLessThan(Integer value) {
addCriterion("addr <", value, "addr");
return (Criteria) this;
}
public Criteria andAddrLessThanOrEqualTo(Integer value) {
addCriterion("addr <=", value, "addr");
return (Criteria) this;
}
public Criteria andAddrIn(List<Integer> values) {
addCriterion("addr in", values, "addr");
return (Criteria) this;
}
public Criteria andAddrNotIn(List<Integer> values) {
addCriterion("addr not in", values, "addr");
return (Criteria) this;
}
public Criteria andAddrBetween(Integer value1, Integer value2) {
addCriterion("addr between", value1, value2, "addr");
return (Criteria) this;
}
public Criteria andAddrNotBetween(Integer value1, Integer value2) {
addCriterion("addr not between", value1, value2, "addr");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
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);
}
}
}

117
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/Record.java

@ -1,117 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.io.Serializable;
import java.util.Date;
public class Record implements Serializable {
private Long id;
private Long equipmentId;
private Integer value;
private Date time;
private Long operator;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private Byte type;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getEquipmentId() {
return equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
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;
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
@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(", equipmentId=").append(equipmentId);
sb.append(", value=").append(value);
sb.append(", time=").append(time);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", type=").append(type);
sb.append("]");
return sb.toString();
}
}

741
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/RecordExample.java

@ -1,741 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public RecordExample() {
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 andEquipmentIdIsNull() {
addCriterion("equipment_id is null");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNotNull() {
addCriterion("equipment_id is not null");
return (Criteria) this;
}
public Criteria andEquipmentIdEqualTo(Long value) {
addCriterion("equipment_id =", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotEqualTo(Long value) {
addCriterion("equipment_id <>", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThan(Long value) {
addCriterion("equipment_id >", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThanOrEqualTo(Long value) {
addCriterion("equipment_id >=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThan(Long value) {
addCriterion("equipment_id <", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThanOrEqualTo(Long value) {
addCriterion("equipment_id <=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdIn(List<Long> values) {
addCriterion("equipment_id in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotIn(List<Long> values) {
addCriterion("equipment_id not in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdBetween(Long value1, Long value2) {
addCriterion("equipment_id between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotBetween(Long value1, Long value2) {
addCriterion("equipment_id not between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andValueIsNull() {
addCriterion("value is null");
return (Criteria) this;
}
public Criteria andValueIsNotNull() {
addCriterion("value is not null");
return (Criteria) this;
}
public Criteria andValueEqualTo(Integer value) {
addCriterion("value =", value, "value");
return (Criteria) this;
}
public Criteria andValueNotEqualTo(Integer value) {
addCriterion("value <>", value, "value");
return (Criteria) this;
}
public Criteria andValueGreaterThan(Integer value) {
addCriterion("value >", value, "value");
return (Criteria) this;
}
public Criteria andValueGreaterThanOrEqualTo(Integer value) {
addCriterion("value >=", value, "value");
return (Criteria) this;
}
public Criteria andValueLessThan(Integer value) {
addCriterion("value <", value, "value");
return (Criteria) this;
}
public Criteria andValueLessThanOrEqualTo(Integer value) {
addCriterion("value <=", value, "value");
return (Criteria) this;
}
public Criteria andValueIn(List<Integer> values) {
addCriterion("value in", values, "value");
return (Criteria) this;
}
public Criteria andValueNotIn(List<Integer> values) {
addCriterion("value not in", values, "value");
return (Criteria) this;
}
public Criteria andValueBetween(Integer value1, Integer value2) {
addCriterion("value between", value1, value2, "value");
return (Criteria) this;
}
public Criteria andValueNotBetween(Integer value1, Integer value2) {
addCriterion("value not between", value1, value2, "value");
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(Date value) {
addCriterion("time =", value, "time");
return (Criteria) this;
}
public Criteria andTimeNotEqualTo(Date value) {
addCriterion("time <>", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThan(Date value) {
addCriterion("time >", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThanOrEqualTo(Date value) {
addCriterion("time >=", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThan(Date value) {
addCriterion("time <", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThanOrEqualTo(Date value) {
addCriterion("time <=", value, "time");
return (Criteria) this;
}
public Criteria andTimeIn(List<Date> values) {
addCriterion("time in", values, "time");
return (Criteria) this;
}
public Criteria andTimeNotIn(List<Date> values) {
addCriterion("time not in", values, "time");
return (Criteria) this;
}
public Criteria andTimeBetween(Date value1, Date value2) {
addCriterion("time between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andTimeNotBetween(Date value1, Date value2) {
addCriterion("time not between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
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 Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Byte value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Byte value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Byte value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Byte value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Byte value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Byte> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Byte> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Byte value1, Byte value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Byte value1, Byte value2) {
addCriterion("type not between", value1, value2, "type");
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);
}
}
}

117
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/ThresholdValue.java

@ -1,117 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.io.Serializable;
import java.util.Date;
public class ThresholdValue implements Serializable {
private Long id;
private Long equipmentId;
private Byte stages;
private Integer max;
private Integer min;
private Long operator;
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 getEquipmentId() {
return equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public Byte getStages() {
return stages;
}
public void setStages(Byte stages) {
this.stages = stages;
}
public Integer getMax() {
return max;
}
public void setMax(Integer max) {
this.max = max;
}
public Integer getMin() {
return min;
}
public void setMin(Integer min) {
this.min = min;
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
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(", equipmentId=").append(equipmentId);
sb.append(", stages=").append(stages);
sb.append(", max=").append(max);
sb.append(", min=").append(min);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

741
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/ThresholdValueExample.java

@ -1,741 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ThresholdValueExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ThresholdValueExample() {
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 andEquipmentIdIsNull() {
addCriterion("equipment_id is null");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNotNull() {
addCriterion("equipment_id is not null");
return (Criteria) this;
}
public Criteria andEquipmentIdEqualTo(Long value) {
addCriterion("equipment_id =", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotEqualTo(Long value) {
addCriterion("equipment_id <>", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThan(Long value) {
addCriterion("equipment_id >", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThanOrEqualTo(Long value) {
addCriterion("equipment_id >=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThan(Long value) {
addCriterion("equipment_id <", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThanOrEqualTo(Long value) {
addCriterion("equipment_id <=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdIn(List<Long> values) {
addCriterion("equipment_id in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotIn(List<Long> values) {
addCriterion("equipment_id not in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdBetween(Long value1, Long value2) {
addCriterion("equipment_id between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotBetween(Long value1, Long value2) {
addCriterion("equipment_id not between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andStagesIsNull() {
addCriterion("stages is null");
return (Criteria) this;
}
public Criteria andStagesIsNotNull() {
addCriterion("stages is not null");
return (Criteria) this;
}
public Criteria andStagesEqualTo(Byte value) {
addCriterion("stages =", value, "stages");
return (Criteria) this;
}
public Criteria andStagesNotEqualTo(Byte value) {
addCriterion("stages <>", value, "stages");
return (Criteria) this;
}
public Criteria andStagesGreaterThan(Byte value) {
addCriterion("stages >", value, "stages");
return (Criteria) this;
}
public Criteria andStagesGreaterThanOrEqualTo(Byte value) {
addCriterion("stages >=", value, "stages");
return (Criteria) this;
}
public Criteria andStagesLessThan(Byte value) {
addCriterion("stages <", value, "stages");
return (Criteria) this;
}
public Criteria andStagesLessThanOrEqualTo(Byte value) {
addCriterion("stages <=", value, "stages");
return (Criteria) this;
}
public Criteria andStagesIn(List<Byte> values) {
addCriterion("stages in", values, "stages");
return (Criteria) this;
}
public Criteria andStagesNotIn(List<Byte> values) {
addCriterion("stages not in", values, "stages");
return (Criteria) this;
}
public Criteria andStagesBetween(Byte value1, Byte value2) {
addCriterion("stages between", value1, value2, "stages");
return (Criteria) this;
}
public Criteria andStagesNotBetween(Byte value1, Byte value2) {
addCriterion("stages not between", value1, value2, "stages");
return (Criteria) this;
}
public Criteria andMaxIsNull() {
addCriterion("max is null");
return (Criteria) this;
}
public Criteria andMaxIsNotNull() {
addCriterion("max is not null");
return (Criteria) this;
}
public Criteria andMaxEqualTo(Integer value) {
addCriterion("max =", value, "max");
return (Criteria) this;
}
public Criteria andMaxNotEqualTo(Integer value) {
addCriterion("max <>", value, "max");
return (Criteria) this;
}
public Criteria andMaxGreaterThan(Integer value) {
addCriterion("max >", value, "max");
return (Criteria) this;
}
public Criteria andMaxGreaterThanOrEqualTo(Integer value) {
addCriterion("max >=", value, "max");
return (Criteria) this;
}
public Criteria andMaxLessThan(Integer value) {
addCriterion("max <", value, "max");
return (Criteria) this;
}
public Criteria andMaxLessThanOrEqualTo(Integer value) {
addCriterion("max <=", value, "max");
return (Criteria) this;
}
public Criteria andMaxIn(List<Integer> values) {
addCriterion("max in", values, "max");
return (Criteria) this;
}
public Criteria andMaxNotIn(List<Integer> values) {
addCriterion("max not in", values, "max");
return (Criteria) this;
}
public Criteria andMaxBetween(Integer value1, Integer value2) {
addCriterion("max between", value1, value2, "max");
return (Criteria) this;
}
public Criteria andMaxNotBetween(Integer value1, Integer value2) {
addCriterion("max not between", value1, value2, "max");
return (Criteria) this;
}
public Criteria andMinIsNull() {
addCriterion("min is null");
return (Criteria) this;
}
public Criteria andMinIsNotNull() {
addCriterion("min is not null");
return (Criteria) this;
}
public Criteria andMinEqualTo(Integer value) {
addCriterion("min =", value, "min");
return (Criteria) this;
}
public Criteria andMinNotEqualTo(Integer value) {
addCriterion("min <>", value, "min");
return (Criteria) this;
}
public Criteria andMinGreaterThan(Integer value) {
addCriterion("min >", value, "min");
return (Criteria) this;
}
public Criteria andMinGreaterThanOrEqualTo(Integer value) {
addCriterion("min >=", value, "min");
return (Criteria) this;
}
public Criteria andMinLessThan(Integer value) {
addCriterion("min <", value, "min");
return (Criteria) this;
}
public Criteria andMinLessThanOrEqualTo(Integer value) {
addCriterion("min <=", value, "min");
return (Criteria) this;
}
public Criteria andMinIn(List<Integer> values) {
addCriterion("min in", values, "min");
return (Criteria) this;
}
public Criteria andMinNotIn(List<Integer> values) {
addCriterion("min not in", values, "min");
return (Criteria) this;
}
public Criteria andMinBetween(Integer value1, Integer value2) {
addCriterion("min between", value1, value2, "min");
return (Criteria) this;
}
public Criteria andMinNotBetween(Integer value1, Integer value2) {
addCriterion("min not between", value1, value2, "min");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
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);
}
}
}

106
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/Weight.java

@ -1,106 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.io.Serializable;
import java.util.Date;
public class Weight implements Serializable {
private Long id;
private Long equipmentId;
private String weight;
private Date time;
private Long operator;
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 getEquipmentId() {
return equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public String getWeight() {
return weight;
}
public void setWeight(String weight) {
this.weight = weight == null ? null : weight.trim();
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
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(", equipmentId=").append(equipmentId);
sb.append(", weight=").append(weight);
sb.append(", time=").append(time);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

691
beneficiation/src/main/java/com/ccsens/beneficiation/bean/po/WeightExample.java

@ -1,691 +0,0 @@
package com.ccsens.beneficiation.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class WeightExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public WeightExample() {
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 andEquipmentIdIsNull() {
addCriterion("equipment_id is null");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNotNull() {
addCriterion("equipment_id is not null");
return (Criteria) this;
}
public Criteria andEquipmentIdEqualTo(Long value) {
addCriterion("equipment_id =", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotEqualTo(Long value) {
addCriterion("equipment_id <>", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThan(Long value) {
addCriterion("equipment_id >", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThanOrEqualTo(Long value) {
addCriterion("equipment_id >=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThan(Long value) {
addCriterion("equipment_id <", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThanOrEqualTo(Long value) {
addCriterion("equipment_id <=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdIn(List<Long> values) {
addCriterion("equipment_id in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotIn(List<Long> values) {
addCriterion("equipment_id not in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdBetween(Long value1, Long value2) {
addCriterion("equipment_id between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotBetween(Long value1, Long value2) {
addCriterion("equipment_id not between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andWeightIsNull() {
addCriterion("weight is null");
return (Criteria) this;
}
public Criteria andWeightIsNotNull() {
addCriterion("weight is not null");
return (Criteria) this;
}
public Criteria andWeightEqualTo(String value) {
addCriterion("weight =", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotEqualTo(String value) {
addCriterion("weight <>", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThan(String value) {
addCriterion("weight >", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThanOrEqualTo(String value) {
addCriterion("weight >=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThan(String value) {
addCriterion("weight <", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThanOrEqualTo(String value) {
addCriterion("weight <=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLike(String value) {
addCriterion("weight like", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotLike(String value) {
addCriterion("weight not like", value, "weight");
return (Criteria) this;
}
public Criteria andWeightIn(List<String> values) {
addCriterion("weight in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightNotIn(List<String> values) {
addCriterion("weight not in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightBetween(String value1, String value2) {
addCriterion("weight between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andWeightNotBetween(String value1, String value2) {
addCriterion("weight not between", value1, value2, "weight");
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(Date value) {
addCriterion("time =", value, "time");
return (Criteria) this;
}
public Criteria andTimeNotEqualTo(Date value) {
addCriterion("time <>", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThan(Date value) {
addCriterion("time >", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThanOrEqualTo(Date value) {
addCriterion("time >=", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThan(Date value) {
addCriterion("time <", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThanOrEqualTo(Date value) {
addCriterion("time <=", value, "time");
return (Criteria) this;
}
public Criteria andTimeIn(List<Date> values) {
addCriterion("time in", values, "time");
return (Criteria) this;
}
public Criteria andTimeNotIn(List<Date> values) {
addCriterion("time not in", values, "time");
return (Criteria) this;
}
public Criteria andTimeBetween(Date value1, Date value2) {
addCriterion("time between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andTimeNotBetween(Date value1, Date value2) {
addCriterion("time not between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
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);
}
}
}

39
beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/MessageVo.java

@ -1,39 +0,0 @@
package com.ccsens.beneficiation.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author
*/
@Data
public class MessageVo {
@Data
public static class AddrDispose{
private Long id;
private Integer startAddr;
private Integer endAddr;
private Integer contentNum;
private String contentLength;
}
@Data
public static class AchieveMessage{
private Integer addr;
private Integer value;
}
@Data
public static class EquipmentType{
//设备id
private Long id;
//设备类型
private Byte equipmentType;
//消息类型
private Byte messageType;
}
}

166
beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/ParameterVo.java

@ -1,166 +0,0 @@
package com.ccsens.beneficiation.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @author
*/
@Data
public class ParameterVo {
@Data
@ApiModel("查看每个仪器的参数")
public static class QueryParameter{
@ApiModelProperty("只有实时值 能修改,例:变频器")
private List<Transducer> transducers;
@ApiModelProperty("实时值累计值,不能修改,例:皮带秤")
private List<BeltWeigher> beltWeigher;
@ApiModelProperty("有阀值能设置 例:电耳")
private List<Parameter> parameter;
}
@Data
@ApiModel("只有实时值 能修改,例:变频器")
public static class Transducer{
@ApiModelProperty("设备名")
private String title;
@ApiModelProperty("参数")
private List<TransducerValue> values;
}
@Data
@ApiModel("只有实时值 能修改,例:变频器")
public static class TransducerValue{
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("修改时用的类型")
private String type;
@ApiModelProperty("名字")
private String key;
@ApiModelProperty("实时值")
private BigDecimal currentTimeValue;
@ApiModelProperty("设定值")
private BigDecimal setTimeValue;
public TransducerValue(Long id, String type, String key, BigDecimal currentTimeValue) {
this.id = id;
this.type = type;
this.key = key;
this.currentTimeValue = currentTimeValue;
}
public TransducerValue() {
}
}
@Data
@ApiModel("实时值累计值,不能修改,例:皮带秤")
public static class BeltWeigher{
@ApiModelProperty("设备名")
private String title;
@ApiModelProperty("参数")
private List<BeltWeigherValue> values;
}
@Data
@ApiModel("实时值累计值,不能修改,例:皮带秤")
public static class BeltWeigherValue{
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("名字")
private String key;
@ApiModelProperty("修改时用的类型")
private String type;
@ApiModelProperty("实时值")
private BigDecimal currentTimeValue;
@ApiModelProperty("累计值")
private BigDecimal totalValue;
public BeltWeigherValue(Long id, String key, BigDecimal currentTimeValue, BigDecimal totalValue) {
this.id = id;
this.key = key;
this.currentTimeValue = currentTimeValue;
this.totalValue = totalValue;
}
public BeltWeigherValue() {
}
}
@Data
@ApiModel("实时值累计值,不能修改,例:皮带秤")
public static class Parameter{
@ApiModelProperty("设备名")
private String title;
@ApiModelProperty("参数")
private List<ParameterThreshold> values;
}
@Data
@ApiModel("单个仪器的参数带阀值")
public static class ParameterThreshold{
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("修改时用的类型")
private String type;
@ApiModelProperty("key")
private String key;
@ApiModelProperty("实时值")
private BigDecimal currentTimeValue;
@ApiModelProperty("阀值1")
private ThresholdValue thresholdValue1;
@ApiModelProperty("阀值2")
private ThresholdValue thresholdValue2;
@ApiModelProperty("阀值3")
private ThresholdValue thresholdValue3;
public ParameterThreshold(Long id, String type, String key, BigDecimal currentTimeValue, ThresholdValue thresholdValue1, ThresholdValue thresholdValue2, ThresholdValue thresholdValue3) {
this.id = id;
this.type = type;
this.key = key;
this.currentTimeValue = currentTimeValue;
this.thresholdValue1 = thresholdValue1;
this.thresholdValue2 = thresholdValue2;
this.thresholdValue3 = thresholdValue3;
}
public ParameterThreshold() {
}
}
@Data
@ApiModel("阀值")
public static class ThresholdValue{
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("修改时用的类型")
private String type;
@ApiModelProperty("key")
private String key;
@ApiModelProperty("最小")
private BigDecimal minValue;
@ApiModelProperty("最大")
private BigDecimal maxValue;
public ThresholdValue(Long id, String type, String key, BigDecimal minValue, BigDecimal maxValue) {
this.id = id;
this.type = type;
this.key = key;
this.minValue = minValue;
this.maxValue = maxValue;
}
public ThresholdValue(String type, String key) {
this.type = type;
this.key = key;
}
public ThresholdValue() {
}
}
}

37
beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/WeightVo.java

@ -1,37 +0,0 @@
package com.ccsens.beneficiation.bean.vo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author
*/
@Data
public class WeightVo {
@Data
@ApiModel("查看的称重数据折线图")
public static class WeightDay {
@ApiModelProperty("日期")
private String date;
@ApiModelProperty("重量")
private double weight;
}
@Data
@ApiModel("重量累计")
public static class WeightTotal {
@ApiModelProperty("当天累计")
private double weightDay;
@ApiModelProperty("本周累计")
private double weightWeek;
@ApiModelProperty("本月累计")
private double weightMonth;
@ApiModelProperty("本年累计")
private double weightYear;
}
}

31
beneficiation/src/main/java/com/ccsens/beneficiation/config/BeanConfig.java

@ -1,31 +0,0 @@
package com.ccsens.beneficiation.config;
import com.ccsens.beneficiation.intercept.MybatisInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/03 18:01
*/
@Configuration
public class BeanConfig {
// @Bean
// public static PropertySourcesPlaceholderConfigurer properties(){
// PropertySourcesPlaceholderConfigurer conf = new PropertySourcesPlaceholderConfigurer();
// YamlPropertiesFactoryBean yml = new YamlPropertiesFactoryBean();
// yml.setResources(new ClassPathResource("business.yml"));
// conf.setProperties(yml.getObject());
// return conf;
// }
/**
* 注册拦截器
*/
@Bean
public MybatisInterceptor mybatisInterceptor() {
MybatisInterceptor interceptor = new MybatisInterceptor();
return interceptor;
}
}

169
beneficiation/src/main/java/com/ccsens/beneficiation/config/SpringConfig.java

@ -1,169 +0,0 @@
package com.ccsens.beneficiation.config;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.ccsens.util.config.DruidProps;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.*;
import javax.annotation.Resource;
import javax.sql.DataSource;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
@Configuration
//public class SpringConfig extends WebMvcConfigurationSupport {
public class SpringConfig implements WebMvcConfigurer {
@Resource
private DruidProps druidPropsUtil;
@Value("${spring.snowflake.workerId}")
private String workerId;
@Value("${spring.snowflake.datacenterId}")
private String datacenterId;
/**
* 配置Converter
* @return
*/
@Bean
public HttpMessageConverter<String> responseStringConverter() {
StringHttpMessageConverter converter = new StringHttpMessageConverter(
Charset.forName("UTF-8"));
return converter;
}
@Bean
public HttpMessageConverter<Object> responseJsonConverter(){
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
List<MediaType> mediaTypeList = new ArrayList<>();
mediaTypeList.add(MediaType.TEXT_HTML);
mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8);
converter.setSupportedMediaTypes(mediaTypeList);
//converter.setObjectMapper();
ObjectMapper objectMapper = new ObjectMapper();
SimpleModule simpleModule = new SimpleModule();
simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
converter.setObjectMapper(objectMapper);
return converter;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
//super.configureMessageConverters(converters);
converters.add(responseStringConverter());
converters.add(responseJsonConverter());
}
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
// .allowedMethods("*") // 允许提交请求的方法,*表示全部允许
.allowedOrigins("*") // #允许向该服务器提交请求的URI,*表示全部允许
.allowCredentials(true) // 允许cookies跨域
.allowedHeaders("*") // #允许访问的头信息,*表示全部
.maxAge(18000L); // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
}
/**
* 配置视图解析器 SpringBoot建议使用Thymeleaf代替jsp动态页面默认路径resources/template静态页面默认路径: resources/static
* @return
*/
// @Bean
// public ViewResolver getViewResolver() {
// InternalResourceViewResolver resolver = new InternalResourceViewResolver();
// resolver.setPrefix("/WEB-INF/views/");
// resolver.setSuffix(".jsp");
// return resolver;
// }
// @Override
// public void configureDefaultServletHandling(
// DefaultServletHandlerConfigurer configurer) {
// configurer.enable();
// }
/**
* 配置静态资源
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/beneficiation/uploads/");
//super.addResourceHandlers(registry);
}
/**
* 配置拦截器
* @param registry
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
//addPathPatterns 用于添加拦截规则
//excludePathPatterns 用于排除拦截
// registry.addInterceptor(tokenInterceptor())
// .addPathPatterns("/projects/**")
// .addPathPatterns("/messages/**")
// .addPathPatterns("/users/**")
// .excludePathPatterns("/users/signin")
// .excludePathPatterns("/users/smscode")
// .excludePathPatterns("/users/signup")
// .excludePathPatterns("/users/password")
// .excludePathPatterns("/users/account")
// .excludePathPatterns("/users/token")
// .excludePathPatterns("/users/claims")
// .addPathPatterns("/plugins/**")
// .addPathPatterns("/delivers/**")
// .addPathPatterns("/tasks/**")
// .addPathPatterns("/members/**")
// .addPathPatterns("/templates/**")
// .addPathPatterns("/hardware/**");
//super.addInterceptors(registry);
}
//
// @Bean
// public TokenInterceptor tokenInterceptor(){
// return new TokenInterceptor();
// }
/**
* 配置数据源单数据源
*/
@Bean
public DataSource dataSource(){
return druidPropsUtil.createDruidDataSource();
}
@Bean
public Snowflake snowflake(){
// return new Snowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
return IdUtil.createSnowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
}
}

56
beneficiation/src/main/java/com/ccsens/beneficiation/config/SwaggerConfigure.java

@ -1,56 +0,0 @@
package com.ccsens.beneficiation.config;
import com.ccsens.util.WebConstant;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
import java.util.List;
@Configuration
@EnableSwagger2
@ConditionalOnExpression("${swagger.enable}")
//public class SwaggerConfigure extends WebMvcConfigurationSupport {
public class SwaggerConfigure /*implements WebMvcConfigurer*/ {
@Bean
public Docket customDocket() {
//
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors
.basePackage("com.ccsens.beneficiation.api"))
.build()
.globalOperationParameters(setHeaderToken());
}
private ApiInfo apiInfo() {
return new ApiInfo("Swagger Tall-game",//大标题 title
"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题
"1.0.0",//版本
"http://swagger.io/terms/",//termsOfServiceUrl
"zhangsan",//作者
"Apache 2.0",//链接显示文字
"http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接
);
}
private List<Parameter> setHeaderToken() {
ParameterBuilder tokenPar = new ParameterBuilder();
List<Parameter> pars = new ArrayList<>();
tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token")
.defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX)
.modelRef(new ModelRef("string")).parameterType("header").required(false).build();
pars.add(tokenPar.build());
return pars;
}
}

159
beneficiation/src/main/java/com/ccsens/beneficiation/intercept/MybatisInterceptor.java

@ -1,159 +0,0 @@
package com.ccsens.beneficiation.intercept;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.util.WebConstant;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.plugin.*;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/11 10:58
*/
@Intercepts({
@Signature(
type = Executor.class,
method = "query",
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}
)
})
public class MybatisInterceptor implements Interceptor {
@Override
public Object intercept(Invocation invocation) throws Throwable {
String selectByExample = "selectByExample";
String countByExample = "countByExample";
String countByExample2 = "selectByExample_COUNT";
String selectByPrimaryKey = "selectByPrimaryKey";
Object[] args = invocation.getArgs();
MappedStatement statement = (MappedStatement) args[0];
if (statement.getId().endsWith(selectByExample)
|| statement.getId().endsWith(countByExample)
|| statement.getId().endsWith(countByExample2)) {
//XXXExample
Object example = args[1];
addCondition(statement, example);
} else if (statement.getId().endsWith(selectByPrimaryKey)) {
BoundSql boundSql = statement.getBoundSql(args[1]);
String sql = boundSql.getSql() + " and rec_status = 0";
MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql));
MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory());
msObject.setValue("sqlSource.boundSql.sql", sql);
args[0] = newStatement;
}
return invocation.proceed();
}
private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException {
if (example instanceof Map) {
example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT");
}
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List) method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List) getCriteria.invoke(criteria);
boolean hasDel = false;
for (Object param : params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("rec_status =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
}
}
}
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
@Override
public void setProperties(Properties properties) {
}
private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) {
MappedStatement.Builder builder =
new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType());
builder.resource(ms.getResource());
builder.fetchSize(ms.getFetchSize());
builder.statementType(ms.getStatementType());
builder.keyGenerator(ms.getKeyGenerator());
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) {
StringBuilder keyProperties = new StringBuilder();
for (String keyProperty : ms.getKeyProperties()) {
keyProperties.append(keyProperty).append(",");
}
keyProperties.delete(keyProperties.length() - 1, keyProperties.length());
builder.keyProperty(keyProperties.toString());
}
builder.timeout(ms.getTimeout());
builder.parameterMap(ms.getParameterMap());
builder.resultMaps(ms.getResultMaps());
builder.resultSetType(ms.getResultSetType());
builder.cache(ms.getCache());
builder.flushCacheRequired(ms.isFlushCacheRequired());
builder.useCache(ms.isUseCache());
return builder.build();
}
// 定义一个内部辅助类,作用是包装sq
class BoundSqlSqlSource implements SqlSource {
private BoundSql boundSql;
public BoundSqlSqlSource(BoundSql boundSql) {
this.boundSql = boundSql;
}
@Override
public BoundSql getBoundSql(Object parameterObject) {
return boundSql;
}
}
}

55
beneficiation/src/main/java/com/ccsens/beneficiation/persist/dao/RecordDao.java

@ -1,55 +0,0 @@
package com.ccsens.beneficiation.persist.dao;
import com.ccsens.beneficiation.bean.po.Record;
import com.ccsens.beneficiation.bean.vo.MessageVo;
import com.ccsens.beneficiation.bean.vo.ParameterVo;
import com.ccsens.beneficiation.persist.mapper.RecordMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface RecordDao extends RecordMapper {
Record getByTypeAndAuthId(@Param("type") byte type,@Param("authId")String authId);
/**
* 查找tall内的设备信息处理的配置信息
* @param startAddr 开始的addr
* @return 返回配置信息
*/
MessageVo.AddrDispose getByStartAddr(@Param("startAddr")int startAddr,@Param("project")byte project);
/**
* 根据addr查找设备和信息类型
* @param addr 寄存器地址
* @return 返回设备类型和消息类型
*/
MessageVo.EquipmentType getEquipmentTypeByAddr(@Param("addr")int addr);
/**
* 查询皮带秤和流量计的数据
* @return
*/
List<ParameterVo.BeltWeigher> queryBeltWeigher();
/**
* 查询变频器和电磁阀的数据
* @return
*/
List<ParameterVo.Transducer> queryTransducer();
/**
* 查询电耳的数据
* @return
*/
List<ParameterVo.Parameter> queryParameter();
/**
*
* @param equipmentId
* @param stages
* @return
*/
ParameterVo.ThresholdValue getThresholdValue(@Param("equipmentId")Long equipmentId, @Param("stages")int stages);
}

30
beneficiation/src/main/java/com/ccsens/beneficiation/persist/dao/WeightDao.java

@ -1,30 +0,0 @@
package com.ccsens.beneficiation.persist.dao;
import com.ccsens.beneficiation.bean.dto.WeightDto;
import com.ccsens.beneficiation.bean.vo.WeightVo;
import com.ccsens.beneficiation.persist.mapper.WeightMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
/**
* @author
*/
@Repository
public interface WeightDao extends WeightMapper {
/**
* 统计称重数据
* @param param
* @return
*/
List<WeightVo.WeightDay> queryWeightDay(WeightDto.GetWeightByDay param);
/**
* 重量累计
* @param datetime
* @return
*/
WeightVo.WeightTotal queryWeightTotal(@Param("datetime") Date datetime);
}

30
beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/AdjustRecordMapper.java

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

30
beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/EquipmentMapper.java

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

30
beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/EquipmentTypeMapper.java

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

30
beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/RecordMapper.java

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

30
beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/ThresholdValueMapper.java

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

30
beneficiation/src/main/java/com/ccsens/beneficiation/persist/mapper/WeightMapper.java

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

66
beneficiation/src/main/java/com/ccsens/beneficiation/rabbitMQ/RabbitController.java

@ -1,66 +0,0 @@
package com.ccsens.beneficiation.rabbitMQ;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.beneficiation.bean.dto.Message.BeneficiationMessageDto;
import com.ccsens.beneficiation.bean.vo.MessageVo;
import com.ccsens.beneficiation.service.IRecordService;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.bean.message.common.OutMessage;
import com.ccsens.util.bean.message.common.OutMessageSet;
import com.ccsens.util.config.RabbitMQConfig;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.*;
/**
* @author
*/
@Slf4j
@Component
@RabbitListener(queues = RabbitMQConfig.BENEFICIATION)
public class RabbitController {
@Resource
private IRecordService recordService;
private Logger logger = LoggerFactory.getLogger(RabbitController.class);
@RabbitHandler
public void process(String messageJson) {
logger.info("上传消息数据: {}", messageJson);
try {
OutMessageSet outMessageSet = JSONObject.parseObject(messageJson, OutMessageSet.class);
if (ObjectUtil.isNull(outMessageSet)) {
return;
}
Set<OutMessage> messageSet = outMessageSet.getMessageSet();
if (CollectionUtil.isEmpty(messageSet)) {
return;
}
List<BeneficiationMessageDto> pendingMessage = new ArrayList<>();
messageSet.forEach(outMessage -> {
BeneficiationMessageDto carRecordMessageDto = JSONObject.parseObject(outMessage.getData(), BeneficiationMessageDto.class);
pendingMessage.add(carRecordMessageDto);
});
pendingMessage.sort(Comparator.comparingInt(BeneficiationMessageDto::getAddr));
log.info("接收到的list:{}",pendingMessage);
//处理下位机的信息
List<MessageVo.AchieveMessage> achieveMessages = recordService.processMessage(pendingMessage);
log.info("处理后的消息:{}",achieveMessages);
//根据业务处理保存消息
recordService.saveRecord(achieveMessages);
} catch (Exception e) {
log.error("消息JSON转换异常", e);
}
}
}

7
beneficiation/src/main/java/com/ccsens/beneficiation/service/IMessageService.java

@ -1,7 +0,0 @@
package com.ccsens.beneficiation.service;
import com.ccsens.util.bean.message.common.InMessage;
public interface IMessageService {
void sendToCarRecord(InMessage inMessage) throws Exception;
}

23
beneficiation/src/main/java/com/ccsens/beneficiation/service/IParameterService.java

@ -1,23 +0,0 @@
package com.ccsens.beneficiation.service;
import com.ccsens.beneficiation.bean.dto.ParameterDto;
import com.ccsens.beneficiation.bean.vo.ParameterVo;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* @author
*/
public interface IParameterService {
/**
* 查询每个设备的参数
* @param param 没有参数
* @return 返回每个设备的数据
*/
ParameterVo.QueryParameter queryParameter(Object param);
/**
* 修改一起的参数
* @param param 参数
*/
void updateParameter(ParameterDto.ParameterInfo param) throws JsonProcessingException, Exception;
}

20
beneficiation/src/main/java/com/ccsens/beneficiation/service/IRecordService.java

@ -1,20 +0,0 @@
package com.ccsens.beneficiation.service;
import com.ccsens.beneficiation.bean.dto.Message.BeneficiationMessageDto;
import com.ccsens.beneficiation.bean.vo.MessageVo;
import java.util.List;
public interface IRecordService {
/**
* 处理消息消息
*/
List<MessageVo.AchieveMessage> processMessage(List<BeneficiationMessageDto> carRecordMessageDto);
/**
* 根据业务保存处理插件
* @param achieveMessages
*/
void saveRecord(List<MessageVo.AchieveMessage> achieveMessages);
}

25
beneficiation/src/main/java/com/ccsens/beneficiation/service/IWeightService.java

@ -1,25 +0,0 @@
package com.ccsens.beneficiation.service;
import com.ccsens.beneficiation.bean.dto.WeightDto;
import com.ccsens.beneficiation.bean.vo.WeightVo;
import java.util.List;
/**
* @author
*/
public interface IWeightService {
/**
* 统计每天的重量数据
* @param param 设备id和开始结束时间
* @return 返回每天的称重信息
*/
List<WeightVo.WeightDay> queryWeightDay(WeightDto.GetWeightByDay param);
/**
* 重量累计
* @param param 日期
* @return 返回 分别的累计
*/
WeightVo.WeightTotal queryWeightTotal(WeightDto.GetWeightTotal param);
}

28
beneficiation/src/main/java/com/ccsens/beneficiation/service/MessageService.java

@ -1,28 +0,0 @@
package com.ccsens.beneficiation.service;
import com.ccsens.util.JacksonUtil;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.config.RabbitMQConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class MessageService implements IMessageService{
@Autowired
private AmqpTemplate rabbitTemplate;
@Override
public void sendToCarRecord(InMessage inMessage) throws Exception{
// log.info(JacksonUtil.beanToJson(inMessage));
//FixMe 发送到消息队列
rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,
JacksonUtil.beanToJson(inMessage));
log.info("发送到消息队列:{}",JacksonUtil.beanToJson(inMessage));
}
}

294
beneficiation/src/main/java/com/ccsens/beneficiation/service/ParameterService.java

@ -1,294 +0,0 @@
package com.ccsens.beneficiation.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.ccsens.beneficiation.bean.dto.ParameterDto;
import com.ccsens.beneficiation.bean.po.EquipmentType;
import com.ccsens.beneficiation.bean.po.EquipmentTypeExample;
import com.ccsens.beneficiation.bean.vo.ParameterVo;
import com.ccsens.beneficiation.persist.dao.RecordDao;
import com.ccsens.beneficiation.persist.mapper.EquipmentTypeMapper;
import com.ccsens.beneficiation.util.Constant;
import com.ccsens.util.CRCUtil;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.bean.message.common.MessageConstant;
import com.ccsens.util.bean.message.common.MessageRule;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class ParameterService implements IParameterService{
@Resource
private RecordDao recordDao;
@Resource
private EquipmentTypeMapper equipmentTypeMapper;
@Resource
private IMessageService messageService;
@Override
public ParameterVo.QueryParameter queryParameter(Object param) {
//查询电耳,皮带秤,流量计,电磁阀,变频器的数据
ParameterVo.QueryParameter parameterInfo = new ParameterVo.QueryParameter();
//查询皮带秤和流量计的数据
List<ParameterVo.BeltWeigher> beltWeighers = recordDao.queryBeltWeigher();
if(CollectionUtil.isNotEmpty(beltWeighers)){
beltWeighers.forEach(beltWeigher -> {
if(CollectionUtil.isNotEmpty(beltWeigher.getValues())){
int i = beltWeigher.getValues().size() <= 1 ? 0 : 1;
for (ParameterVo.BeltWeigherValue value : beltWeigher.getValues()) {
String a = i == 0 ? "" : Integer.toString(i);
value.setKey("实时/累计" + a);
i++;
}
}
});
}
parameterInfo.setBeltWeigher(beltWeighers);
//查询变频器和电磁阀
List<ParameterVo.Transducer> transducers = recordDao.queryTransducer();
if(CollectionUtil.isNotEmpty(transducers)){
transducers.forEach(transducer -> {
String type = "变频器".equalsIgnoreCase(transducer.getTitle()) ? "transducer" : "solenoidValue";
int x = "变频器".equalsIgnoreCase(transducer.getTitle()) ? 0 : 1;
if(CollectionUtil.isNotEmpty(transducer.getValues())){
int i = transducer.getValues().size() <= 1 ? 0 : 1;
for (ParameterVo.TransducerValue value : transducer.getValues()) {
String a = i == 0 ? "" : Integer.toString(i);
value.setKey("实时/设置" + a);
value.setType(type + a);
BigDecimal currentTime;
if(x == 0){
currentTime = value.getCurrentTimeValue().divide(BigDecimal.valueOf(100), 0, BigDecimal.ROUND_HALF_UP);
}else {
currentTime = value.getCurrentTimeValue().divide(BigDecimal.valueOf(10),1,BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(4));
}
value.setCurrentTimeValue(currentTime);
i++;
}
}
});
}
parameterInfo.setTransducers(transducers);
//查询电耳
List<ParameterVo.Parameter> parameters = recordDao.queryParameter();
if(CollectionUtil.isNotEmpty(parameters)){
parameters.forEach(parameter -> {
if(CollectionUtil.isNotEmpty(parameter.getValues())){
int i = parameter.getValues().size() <= 1 ? 0 : 1;
for (ParameterVo.ParameterThreshold value : parameter.getValues()) {
String a = i == 0 ? "" : Integer.toString(i);
value.setKey("实时" + a);
value.setType("thresholdValue" + a);
//查询设备的阀值1
ParameterVo.ThresholdValue thresholdValue1 = recordDao.getThresholdValue(value.getId(), 1);
if(ObjectUtil.isNull(thresholdValue1)){
thresholdValue1 = new ParameterVo.ThresholdValue("thresholdValue1","阀值1");
}
value.setThresholdValue1(thresholdValue1);
//阀值2
ParameterVo.ThresholdValue thresholdValue2 = recordDao.getThresholdValue(value.getId(), 1);
if(ObjectUtil.isNull(thresholdValue2)){
thresholdValue2 = new ParameterVo.ThresholdValue("thresholdValue2","阀值2");
}
value.setThresholdValue2(thresholdValue2);
//阀值3
ParameterVo.ThresholdValue thresholdValue3 = recordDao.getThresholdValue(value.getId(), 1);
if(ObjectUtil.isNull(thresholdValue3)){
thresholdValue3 = new ParameterVo.ThresholdValue("thresholdValue3","阀值3");
}
value.setThresholdValue3(thresholdValue3);
i++;
}
}
});
}
parameterInfo.setParameter(parameters);
return parameterInfo;
}
@Override
public void updateParameter(ParameterDto.ParameterInfo param) throws Exception {
if(ObjectUtil.isNull(param)){
return;
}
//电磁阀1
ParameterDto.Parameter solenoidValue1 = param.getSolenoidValue1();
if(ObjectUtil.isNotNull(solenoidValue1)) {
if (ObjectUtil.isNotNull(solenoidValue1.getSettingValue())) {
solenoidValue1.setSettingValue(solenoidValue1.getSettingValue().multiply(BigDecimal.valueOf(100)));
}
transducer(solenoidValue1);
}
//电磁阀2
ParameterDto.Parameter solenoidValue2 = param.getSolenoidValue2();
if(ObjectUtil.isNotNull(solenoidValue2)){
if(ObjectUtil.isNotNull(solenoidValue2.getSettingValue())){
solenoidValue2.setSettingValue(solenoidValue2.getSettingValue().multiply(BigDecimal.valueOf(100)));
}
transducer(solenoidValue2);
}
//变频器1
ParameterDto.Parameter transducer1 = param.getTransducer1();
if(ObjectUtil.isNotNull(transducer1)) {
if (ObjectUtil.isNotNull(transducer1.getSettingValue())) {
transducer1.setSettingValue(transducer1.getSettingValue().add(BigDecimal.valueOf(4)));
}
transducer(transducer1);
}
//变频器2
ParameterDto.Parameter transducer2 = param.getTransducer1();
if(ObjectUtil.isNotNull(transducer2)) {
if (ObjectUtil.isNotNull(transducer2.getSettingValue())) {
transducer2.setSettingValue(transducer2.getSettingValue().add(BigDecimal.valueOf(4)));
}
transducer(transducer2);
}
//变频器3
ParameterDto.Parameter transducer3 = param.getTransducer1();
if(ObjectUtil.isNotNull(transducer3)) {
if (ObjectUtil.isNotNull(transducer3.getSettingValue())) {
transducer3.setSettingValue(transducer3.getSettingValue().add(BigDecimal.valueOf(4)));
}
transducer(transducer3);
}
//变频器4
ParameterDto.Parameter transducer4 = param.getTransducer1();
if(ObjectUtil.isNotNull(transducer4)) {
if (ObjectUtil.isNotNull(transducer4.getSettingValue())) {
transducer4.setSettingValue(transducer4.getSettingValue().add(BigDecimal.valueOf(4)));
}
transducer(transducer4);
}
//电耳1
ParameterDto.ParameterThreshold electricEar1 = param.getElectricEar1();
electric(electricEar1);
//电耳2
ParameterDto.ParameterThreshold electricEar2 = param.getElectricEar2();
electric(electricEar2);
}
private void transducer(ParameterDto.Parameter transducer3) throws Exception {
if (ObjectUtil.isNotNull(transducer3)) {
if (ObjectUtil.isNotNull(transducer3.getSettingValue())) {
getBytes(transducer3.getId(), transducer3.getSettingValue().intValue(), Constant.Type.SET_VALUE);
}
}
}
private void electric(ParameterDto.ParameterThreshold electricEar) throws Exception {
if (ObjectUtil.isNotNull(electricEar)) {
//最低值
if (ObjectUtil.isNotNull(electricEar.getThresholdValue1())) {
ParameterDto.Threshold threshold = electricEar.getThresholdValue1();
//低
if (ObjectUtil.isNotNull(threshold.getMinValue())) {
getBytes(electricEar.getId(), threshold.getMinValue().intValue(), Constant.Type.MINIMUM_VALUE_MIN);
}
//高
if (ObjectUtil.isNotNull(threshold.getMaxValue())) {
getBytes(electricEar.getId(), threshold.getMaxValue().intValue(), Constant.Type.MINIMUM_VALUE_MAX);
}
}
//理想值
if (ObjectUtil.isNotNull(electricEar.getThresholdValue2())) {
ParameterDto.Threshold threshold = electricEar.getThresholdValue2();
//低
if (ObjectUtil.isNotNull(threshold.getMinValue())) {
getBytes(electricEar.getId(), threshold.getMinValue().intValue(), Constant.Type.MINIMUM_VALUE_MIN);
}
//高
if (ObjectUtil.isNotNull(threshold.getMaxValue())) {
getBytes(electricEar.getId(), threshold.getMaxValue().intValue(), Constant.Type.MINIMUM_VALUE_MAX);
}
}
//最高值
if (ObjectUtil.isNotNull(electricEar.getThresholdValue3())) {
ParameterDto.Threshold threshold = electricEar.getThresholdValue3();
//低
if (ObjectUtil.isNotNull(threshold.getMinValue())) {
getBytes(electricEar.getId(), threshold.getMinValue().intValue(), Constant.Type.MINIMUM_VALUE_MIN);
}
//高
if (ObjectUtil.isNotNull(threshold.getMaxValue())) {
getBytes(electricEar.getId(), threshold.getMaxValue().intValue(), Constant.Type.MINIMUM_VALUE_MAX);
}
}
}
}
/**
* 获取设置值的byte数组 并发送消息
*/
private void getBytes(Long id, int value,byte type) throws Exception {
//根据id和数据类型 查找该设备的addr 设置值是1
EquipmentTypeExample equipmentTypeExample = new EquipmentTypeExample();
equipmentTypeExample.createCriteria().andEquipmentIdEqualTo(id).andTypeEqualTo(type);
List<EquipmentType> equipmentTypes = equipmentTypeMapper.selectByExample(equipmentTypeExample);
if(CollectionUtil.isNotEmpty(equipmentTypes)){
EquipmentType equipmentType = equipmentTypes.get(0);
log.info("查找设备配置信息:{}",equipmentType);
byte[] header = new byte[]{(byte)0xff,(byte)0xfe,(byte)0x00};
byte uc1 = (byte) (value >> 8);
byte uc2 = (byte) (value & 0xff);
log.info("计算value的高低值:{}---{}",uc1,uc2);
byte addr1 = (byte) (equipmentType.getAddr() >> 8);
byte addr2 = (byte) (equipmentType.getAddr() & 0xff);
log.info("计算addr的高低值:{}---{}",addr1,addr2);
// byte[] center = new byte[]{(byte)0x10,(byte)0x10,addr1,addr2,uc1,uc2};
byte[] center = new byte[]{(byte)0x10,(byte)0x10,addr1,addr2,0x00,0x01,0x02,uc1,uc2};
byte[] crc = new byte[2];
CRCUtil.crc16(crc,center,0,center.length);
log.info("计算crc校验:{}---{}",crc[0],crc[1]);
byte[] all = new byte[header.length + center.length + crc.length];
System.arraycopy(header,0,all,0,header.length);
System.arraycopy(center,0,all,header.length,center.length);
System.arraycopy(crc,0,all,header.length + center.length,crc.length);
all[2] = (byte) (all.length - 3);
for (int i = 0; i < all.length; i++) {
log.info("发送数据:{}",Integer.toHexString(all[i] & 0xFF));
}
sendInMessage(all);
}
}
/**
* 生成InMessage消息并发送
*/
private void sendInMessage(byte[] all) throws Exception {
Set<String> userIdSet = new HashSet<>();
// userIdSet.add(String.valueOf(1));
userIdSet.add(String.valueOf(2));
MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User);
messageRule.setAckRule(MessageRule.AckRule.NONE);
messageRule.setOfflineDiscard((byte) 1);
String s = Arrays.toString(all);
InMessage inMessage = InMessage.newToUserMessage(null,userIdSet,null,messageRule,s);
//发送消息
messageService.sendToCarRecord(inMessage);
}
}

166
beneficiation/src/main/java/com/ccsens/beneficiation/service/RecordService.java

@ -1,166 +0,0 @@
package com.ccsens.beneficiation.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import com.ccsens.beneficiation.bean.dto.Message.BeneficiationMessageDto;
import com.ccsens.beneficiation.bean.po.*;
import com.ccsens.beneficiation.bean.po.Record;
import com.ccsens.beneficiation.bean.vo.MessageVo;
import com.ccsens.beneficiation.persist.dao.RecordDao;
import com.ccsens.beneficiation.persist.mapper.ThresholdValueMapper;
import com.ccsens.beneficiation.persist.mapper.WeightMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class RecordService implements IRecordService{
@Resource
private RecordDao recordDao;
@Resource
private Snowflake snowflake;
@Resource
private WeightMapper weightMapper;
@Resource
private ThresholdValueMapper thresholdValueMapper;
/**
* 处理下位机消息
*/
@Override
public List<MessageVo.AchieveMessage> processMessage(List<BeneficiationMessageDto> messageDtoList) {
List<MessageVo.AchieveMessage> achieveMessages = new ArrayList<>();
log.info("");
int i = 0;
while (i < messageDtoList.size()){
BeneficiationMessageDto messageDto = messageDtoList.get(i);
//获取该设备的消息处理配置
MessageVo.AddrDispose addrDispose = recordDao.getByStartAddr(messageDto.getAddr(), (byte) 1);
String[] split = addrDispose.getContentLength().split(",");
if(split.length == 0){
i++;
continue;
}
for (String s : split) {
if(Integer.parseInt(s) == 0){
i++;
continue;
}
MessageVo.AchieveMessage achieveMessage = new MessageVo.AchieveMessage();
achieveMessage.setAddr(messageDto.getAddr());
int value = 0;
for (int j = 0; j < Integer.parseInt(s); j++) {
value += messageDtoList.get(i + j).getValue();
}
achieveMessage.setValue(value);
achieveMessages.add(achieveMessage);
i += Integer.parseInt(s);
}
}
return achieveMessages;
}
@Override
public void saveRecord(List<MessageVo.AchieveMessage> achieveMessages) {
if(CollectionUtil.isNotEmpty(achieveMessages)){
achieveMessages.forEach(achieveMessage -> {
//根据addr查找消息类型和设备类型
MessageVo.EquipmentType equipmentType = recordDao.getEquipmentTypeByAddr(achieveMessage.getAddr());
if(ObjectUtil.isNull(equipmentType)){
return;
}
log.info("每条数据都存入记录表");
saveRecord(achieveMessage.getValue(), equipmentType.getId(),equipmentType.getMessageType());
//皮带秤的累计值
if(equipmentType.getEquipmentType() == 4){
//累计值存入重量表
if(equipmentType.getMessageType() == 2){
log.info("保存皮带秤累计值");
Weight weight = new Weight();
weight.setId(snowflake.nextId());
weight.setTime(new Date());
weight.setEquipmentId(equipmentType.getId());
weight.setWeight(achieveMessage.getValue().toString());
weightMapper.insertSelective(weight);
}
}
//阀值
Integer min;
Integer max;
switch (equipmentType.getMessageType()){
case 3:
case 8:
min = equipmentType.getMessageType() == 3 ? achieveMessage.getValue() : null;
max = equipmentType.getMessageType() == 8 ? achieveMessage.getValue() : null;
setThreshold(equipmentType.getId(), (byte) 1, min, max);
break;
case 4:
case 9:
min = equipmentType.getMessageType() == 4 ? achieveMessage.getValue() : null;
max = equipmentType.getMessageType() == 9 ? achieveMessage.getValue() : null;
setThreshold(equipmentType.getId(), (byte) 2, min, max);
break;
case 5:
case 10:
min = equipmentType.getMessageType() == 5 ? achieveMessage.getValue() : null;
max = equipmentType.getMessageType() == 10 ? achieveMessage.getValue() : null;
setThreshold(equipmentType.getId(), (byte) 3, min, max);
break;
default:
break;
}
});
}
}
private void setThreshold(Long equipmentId, byte stages, Integer min, Integer max) {
ThresholdValue thresholdValue;
ThresholdValueExample thresholdValueExample = new ThresholdValueExample();
thresholdValueExample.createCriteria().andEquipmentIdEqualTo(equipmentId).andStagesEqualTo(stages);
thresholdValueExample.setOrderByClause("created_at DESC limit 1");
List<ThresholdValue> thresholdValueList = thresholdValueMapper.selectByExample(thresholdValueExample);
if(CollectionUtil.isNotEmpty(thresholdValueList)){
thresholdValue = thresholdValueList.get(0);
thresholdValue.setMin(min);
thresholdValue.setMax(max);
thresholdValueMapper.updateByPrimaryKeySelective(thresholdValue);
}else {
thresholdValue = new ThresholdValue();
thresholdValue.setId(snowflake.nextId());
thresholdValue.setEquipmentId(equipmentId);
thresholdValue.setStages(stages);
thresholdValue.setMin(min);
thresholdValue.setMax(max);
thresholdValueMapper.insertSelective(thresholdValue);
}
}
private void saveRecord(int value, Long equipmentId, Byte messageType) {
Record record = new Record();
record.setId(snowflake.nextId());
record.setTime(new Date());
record.setEquipmentId(equipmentId);
record.setValue(value);
record.setType(messageType);
log.info("存入记录表:{}",record);
recordDao.insertSelective(record);
}
}

33
beneficiation/src/main/java/com/ccsens/beneficiation/service/WeightService.java

@ -1,33 +0,0 @@
package com.ccsens.beneficiation.service;
import com.ccsens.beneficiation.bean.dto.WeightDto;
import com.ccsens.beneficiation.bean.vo.WeightVo;
import com.ccsens.beneficiation.persist.dao.WeightDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class WeightService implements IWeightService{
@Resource
private WeightDao weightDao;
@Override
public List<WeightVo.WeightDay> queryWeightDay(WeightDto.GetWeightByDay param) {
return weightDao.queryWeightDay(param);
}
@Override
public WeightVo.WeightTotal queryWeightTotal(WeightDto.GetWeightTotal param) {
return weightDao.queryWeightTotal(param.getDatetime());
}
}

56
beneficiation/src/main/java/com/ccsens/beneficiation/util/Constant.java

@ -1,56 +0,0 @@
package com.ccsens.beneficiation.util;
/**
* @author
*/
public class Constant {
/**注册来源*/
public static final class Type {
/**
* 实时值
*/
public final static byte REAL_VALUE = 0;
/**
* 设置值
*/
public final static byte SET_VALUE = 1;
/**
* 累计值
*/
public final static byte AGGREGATE_VALUE = 2;
/**
* 最低值
*/
public final static byte MINIMUM_VALUE_MIN = 3;
/**
* 最低值
*/
public final static byte MINIMUM_VALUE_MAX = 8;
/**
* 理想值
*/
public final static byte IDEAL_VALUE_MIN = 4;
/**
* 理想值
*/
public final static byte IDEAL_VALUE_MAX = 9;
/**
* 最高值
*/
public final static byte MAXIMUM_VALUE_MIN = 5;
/**
* 最高值
*/
public final static byte MAXIMUM_VALUE_MAX = 10;
/**
* 迟滞
*/
public final static byte HYSTERESIS = 6;
/**
* 迟滞
*/
public final static byte OTHER = 7;
}
}

30
beneficiation/src/main/resources/application-common.yml

@ -1,30 +0,0 @@
logging:
level:
com:
favorites: DEBUG
org:
hibernate: ERROR
springframework:
web: DEBUG
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath*:mapper_*/*.xml
type-aliases-package: com.ccsens.mtpro.bean
#server:
# tomcat:
# uri-encoding: UTF-8
spring:
http:
encoding:
charset: UTF-8
enabled: true
force: true
log-request-details: true
servlet:
multipart:
max-file-size: 10MB
max-request-size: 100MB
snowflake:
datacenterId: 2
workerId: 2

37
beneficiation/src/main/resources/application-dev.yml

@ -1,37 +0,0 @@
server:
port: 7140
servlet:
context-path:
spring:
application:
name: beneficiation
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
# host: 192.144.182.42
# host: test.tall.wiki
host: 127.0.0.1
password: guest
port: 5672
username: guest
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
file:
path: /home/cloud/beneficiation/uploads/
domain: https://test.tall.wiki/gateway/mt/
imgDomain: https://test.tall.wiki/gateway/beneficiation/uploads/
#gameMqName: game_status_wisdom
logging:
path:

40
beneficiation/src/main/resources/application-prod.yml

@ -1,40 +0,0 @@
server:
port: 7140
servlet:
context-path:
spring:
application:
name: beneficiation
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
# password: ''
password: 'areowqr!@43ef'
port: 6379
timeout: 1000ms
swagger:
enable: true
eureka:
instance:
ip-address: 121.36.3.207
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/
file:
path: /home/cloud/beneficiation/uploads/
signUpUrl: https://www.tall.wiki/compete/
domain: https://www.tall.wiki/gateway/beneficiation/
imgDomain: https://www.tall.wiki/gateway/beneficiation/uploads/

36
beneficiation/src/main/resources/application-test.yml

@ -1,36 +0,0 @@
server:
port: 7140
servlet:
context-path:
spring:
application:
name: beneficiation
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: guest
port: 5672
username: guest
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
eureka:
instance:
ip-address: 127.0.0.1
file:
path: /home/cloud/beneficiation/uploads/
signUpUrl: https://test.tall.wiki/compete/
domain: https://test.tall.wiki/gateway/beneficiation/
imgDomain: https://test.tall.wiki/gateway/beneficiation/uploads/

6
beneficiation/src/main/resources/application.yml

@ -1,6 +0,0 @@
spring:
profiles:
active: test
include: common, util-test

36
beneficiation/src/main/resources/druid-dev.yml

@ -1,36 +0,0 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
driverClassName: com.mysql.cj.jdbc.Driver
dynamicUrl: jdbc:mysql://localhost:3306/${schema}
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filterName: druidFilter
filterProfileEnable: true
filterUrlPattern: /*
filters: stat,wall
initialSize: 5
maxActive: 20
maxPoolPreparedStatementPerConnectionSize: 20
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
# password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
servletLoginUsername: druid
servletName: druidServlet
servletResetEnable: true
servletUrlMapping: /druid/*
testOnBorrow: false
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://49.233.89.188:3306/beneficiation?useUnicode=true&characterEncoding=UTF-8
# url: jdbc:mysql://127.0.0.1/mt?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL
# env: CCSENS_GAME
env: CCSENS_TALL

33
beneficiation/src/main/resources/druid-prod.yml

@ -1,33 +0,0 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
driverClassName: com.mysql.cj.jdbc.Driver
dynamicUrl: jdbc:mysql://localhost:3306/${schema}
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filterName: druidFilter
filterProfileEnable: true
filterUrlPattern: /*
filters: stat,wall
initialSize: 5
maxActive: 20
maxPoolPreparedStatementPerConnectionSize: 20
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
password:
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
servletLoginUsername: druid
servletName: druidServlet
servletResetEnable: true
servletUrlMapping: /druid/*
testOnBorrow: false
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://127.0.0.1/beneficiation?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_GAME

33
beneficiation/src/main/resources/druid-test.yml

@ -1,33 +0,0 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
driverClassName: com.mysql.cj.jdbc.Driver
dynamicUrl: jdbc:mysql://localhost:3306/${schema}
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filterName: druidFilter
filterProfileEnable: true
filterUrlPattern: /*
filters: stat,wall
initialSize: 5
maxActive: 20
maxPoolPreparedStatementPerConnectionSize: 20
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
servletLoginUsername: druid
servletName: druidServlet
servletResetEnable: true
servletUrlMapping: /druid/*
testOnBorrow: false
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://test.tall.wiki/beneficiation?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_TALL

148
beneficiation/src/main/resources/mapper_dao/RecordDao.xml

@ -1,148 +0,0 @@
<?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.beneficiation.persist.dao.RecordDao">
<select id="getByTypeAndAuthId" resultType="com.ccsens.beneficiation.bean.po.Record">
SELECT
*
FROM
t_record r LEFT JOIN t_equipment e on r.equipment_id = e.id
WHERE
e.type = #{type}
and e.auth_id = #{authId}
and r.rec_status = 0
and e.rec_status = 0
ORDER BY r.time DESC
LIMIT 1
</select>
<select id="getByStartAddr" resultType="com.ccsens.beneficiation.bean.vo.MessageVo$AddrDispose">
SELECT
id,
start_addr,
end_addr,
content_num,
content_length
FROM
tall.t_util_addr_dispose
WHERE
start_addr = #{startAddr}
and project = #{project}
and rec_status = 0
limit 1
</select>
<select id="getEquipmentTypeByAddr" resultType="com.ccsens.beneficiation.bean.vo.MessageVo$EquipmentType">
SELECT
e.id,
e.type as equipmentType,
t.type as messageType
from
t_equipment_type t
LEFT JOIN t_equipment e
on t.equipment_id = e.id and e.rec_status = 0
WHERE
t.addr = #{addr}
and t.rec_status = 0
</select>
<resultMap id="queryBeltWeigher" type="com.ccsens.beneficiation.bean.vo.ParameterVo$BeltWeigher">
<id column="title" property="title"/>
<collection property="values" ofType="com.ccsens.beneficiation.bean.vo.ParameterVo$BeltWeigherValue">
<id column="id" property="id"/>
<result column="currentTimeValue" property="currentTimeValue"/>
<result column="totalValue" property="totalValue"/>
</collection>
</resultMap>
<select id="queryBeltWeigher" resultMap="queryBeltWeigher">
SELECT
e.id,
if(e.type = 3,'流量计','皮带秤') as title,
(
SELECT `value` FROM t_record WHERE
equipment_id = e.id and type = 0 and rec_status = 0
ORDER BY time DESC
limit 1
) as currentTimeValue,
(
SELECT `value` FROM t_record WHERE
equipment_id = e.id and type = 2 and rec_status = 0
ORDER BY time DESC
limit 1
) as totalValue
FROM
t_equipment e
WHERE
(e.type = 4 or e.type = 3)
and e.rec_status = 0
</select>
<resultMap id="queryTransducer" type="com.ccsens.beneficiation.bean.vo.ParameterVo$Transducer">
<id column="title" property="title"/>
<collection property="values" ofType="com.ccsens.beneficiation.bean.vo.ParameterVo$TransducerValue">
<id column="id" property="id"/>
<result column="currentTimeValue" property="currentTimeValue"/>
<result column="setTimeValue" property="setTimeValue"/>
</collection>
</resultMap>
<select id="queryTransducer" resultMap="queryTransducer">
SELECT
e.id,
if(e.type = 2,'电磁阀','变频器') as title,
(
SELECT `value` FROM t_record WHERE
equipment_id = e.id and type = 0 and rec_status = 0
ORDER BY time DESC
limit 1
) as currentTimeValue,
(
SELECT `value` FROM t_record WHERE
equipment_id = e.id and type = 1 and rec_status = 0
ORDER BY time DESC
limit 1
) as setTimeValue
FROM
t_equipment e
WHERE
(e.type = 2 or e.type = 5)
and e.rec_status = 0
</select>
<resultMap id="queryParameter" type="com.ccsens.beneficiation.bean.vo.ParameterVo$Parameter">
<id column="title" property="title"/>
<collection property="values" ofType="com.ccsens.beneficiation.bean.vo.ParameterVo$ParameterThreshold">
<id column="id" property="id"/>
<result column="currentTimeValue" property="currentTimeValue"/>
</collection>
</resultMap>
<select id="queryParameter" resultMap="queryParameter">
SELECT
e.id,
'电耳' as title,
(
SELECT `value` FROM t_record WHERE
equipment_id = e.id and type = 0 and rec_status = 0
ORDER BY time DESC
limit 1
) as currentTimeValue
FROM
t_equipment e
WHERE
e.type = 1
and e.rec_status = 0
</select>
<select id="getThresholdValue" resultType="com.ccsens.beneficiation.bean.vo.ParameterVo$ThresholdValue">
SELECT
id,
CONCAT('thresholdValue',stages) as type,
CONCAT('阀值',stages) as `key`,
min as minValue,
max as `maxValue`
FROM
t_threshold_value
WHERE
equipment_id = #{equipmentId}
and stages = #{stages}
and rec_status = 0
ORDER BY created_at DESC
LIMIT 1
</select>
</mapper>

72
beneficiation/src/main/resources/mapper_dao/WeightDao.xml

@ -1,72 +0,0 @@
<?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.beneficiation.persist.dao.WeightDao">
<select id="queryWeightDay" resultType="com.ccsens.beneficiation.bean.vo.WeightVo$WeightDay">
SELECT
if(#{dateType} = 1,
CONCAT(DATE_FORMAT(time, '%Y'),'-',DATE_FORMAT(time, '%u')+1),
DATE_FORMAT(time, #{dateTypeStr})
)
as date,
sum(weight) as weight
FROM
t_weight
WHERE
equipment_id = #{equipmentId}
and rec_status = 0
<if test="startTime != null">
and time &gt;= startTime
</if>
<if test="endTime != null">
and time &lt;= endTime
</if>
GROUP BY DATE_FORMAT(time, #{dateTypeStr})
</select>
<select id="queryWeightTotal" resultType="com.ccsens.beneficiation.bean.vo.WeightVo$WeightTotal">
SELECT
SUM(CASE a.t WHEN 'day' THEN a.weight ELSE 0 END) as weightDay,
SUM(CASE a.t WHEN 'week' THEN a.weight ELSE 0 END) as weightWeek,
SUM(CASE a.t WHEN 'month' THEN a.weight ELSE 0 END) as weightMonth,
SUM(CASE a.t WHEN 'year' THEN a.weight ELSE 0 END) as weightYear
FROM
(
SELECT
sum(weight) as weight,
'day' as t
FROM
t_weight
WHERE
rec_status = 0
and DATE_FORMAT(time, '%Y-%m-%d') = DATE_FORMAT(#{datetime}, '%Y-%m-%d')
UNION ALL
SELECT
sum(weight) as weight,
'week' as t
FROM
t_weight
WHERE
rec_status = 0
and DATE_FORMAT(time, '%Y-%u') = DATE_FORMAT(#{datetime}, '%Y-%u')
UNION ALL
SELECT
sum(weight) as weight,
'month' as t
FROM
t_weight
WHERE
rec_status = 0
and DATE_FORMAT(time, '%Y-%m') = DATE_FORMAT(#{datetime}, '%Y-%m')
UNION ALL
SELECT
sum(weight) as weight,
'year' as t
FROM
t_weight
WHERE
rec_status = 0
and DATE_FORMAT(time, '%Y') = DATE_FORMAT(#{datetime}, '%Y')
) a
</select>
</mapper>

323
beneficiation/src/main/resources/mapper_raw/AdjustRecordMapper.xml

@ -1,323 +0,0 @@
<?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.beneficiation.persist.mapper.AdjustRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.beneficiation.bean.po.AdjustRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="time" jdbcType="BIGINT" property="time" />
<result column="monitoring_id" jdbcType="BIGINT" property="monitoringId" />
<result column="monitoring_value" jdbcType="VARCHAR" property="monitoringValue" />
<result column="threshold_id" jdbcType="BIGINT" property="thresholdId" />
<result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
<result column="before_value" jdbcType="VARCHAR" property="beforeValue" />
<result column="after_value" jdbcType="VARCHAR" property="afterValue" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<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, time, monitoring_id, monitoring_value, threshold_id, equipment_id, before_value,
after_value, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.beneficiation.bean.po.AdjustRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_adjust_record
<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_adjust_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_adjust_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.beneficiation.bean.po.AdjustRecordExample">
delete from t_adjust_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.beneficiation.bean.po.AdjustRecord">
insert into t_adjust_record (id, time, monitoring_id,
monitoring_value, threshold_id, equipment_id,
before_value, after_value, operator,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{time,jdbcType=BIGINT}, #{monitoringId,jdbcType=BIGINT},
#{monitoringValue,jdbcType=VARCHAR}, #{thresholdId,jdbcType=BIGINT}, #{equipmentId,jdbcType=BIGINT},
#{beforeValue,jdbcType=VARCHAR}, #{afterValue,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.beneficiation.bean.po.AdjustRecord">
insert into t_adjust_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="time != null">
time,
</if>
<if test="monitoringId != null">
monitoring_id,
</if>
<if test="monitoringValue != null">
monitoring_value,
</if>
<if test="thresholdId != null">
threshold_id,
</if>
<if test="equipmentId != null">
equipment_id,
</if>
<if test="beforeValue != null">
before_value,
</if>
<if test="afterValue != null">
after_value,
</if>
<if test="operator != null">
operator,
</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="time != null">
#{time,jdbcType=BIGINT},
</if>
<if test="monitoringId != null">
#{monitoringId,jdbcType=BIGINT},
</if>
<if test="monitoringValue != null">
#{monitoringValue,jdbcType=VARCHAR},
</if>
<if test="thresholdId != null">
#{thresholdId,jdbcType=BIGINT},
</if>
<if test="equipmentId != null">
#{equipmentId,jdbcType=BIGINT},
</if>
<if test="beforeValue != null">
#{beforeValue,jdbcType=VARCHAR},
</if>
<if test="afterValue != null">
#{afterValue,jdbcType=VARCHAR},
</if>
<if test="operator != null">
#{operator,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.beneficiation.bean.po.AdjustRecordExample" resultType="java.lang.Long">
select count(*) from t_adjust_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_adjust_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=BIGINT},
</if>
<if test="record.monitoringId != null">
monitoring_id = #{record.monitoringId,jdbcType=BIGINT},
</if>
<if test="record.monitoringValue != null">
monitoring_value = #{record.monitoringValue,jdbcType=VARCHAR},
</if>
<if test="record.thresholdId != null">
threshold_id = #{record.thresholdId,jdbcType=BIGINT},
</if>
<if test="record.equipmentId != null">
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
</if>
<if test="record.beforeValue != null">
before_value = #{record.beforeValue,jdbcType=VARCHAR},
</if>
<if test="record.afterValue != null">
after_value = #{record.afterValue,jdbcType=VARCHAR},
</if>
<if test="record.operator != null">
operator = #{record.operator,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_adjust_record
set id = #{record.id,jdbcType=BIGINT},
time = #{record.time,jdbcType=BIGINT},
monitoring_id = #{record.monitoringId,jdbcType=BIGINT},
monitoring_value = #{record.monitoringValue,jdbcType=VARCHAR},
threshold_id = #{record.thresholdId,jdbcType=BIGINT},
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
before_value = #{record.beforeValue,jdbcType=VARCHAR},
after_value = #{record.afterValue,jdbcType=VARCHAR},
operator = #{record.operator,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.beneficiation.bean.po.AdjustRecord">
update t_adjust_record
<set>
<if test="time != null">
time = #{time,jdbcType=BIGINT},
</if>
<if test="monitoringId != null">
monitoring_id = #{monitoringId,jdbcType=BIGINT},
</if>
<if test="monitoringValue != null">
monitoring_value = #{monitoringValue,jdbcType=VARCHAR},
</if>
<if test="thresholdId != null">
threshold_id = #{thresholdId,jdbcType=BIGINT},
</if>
<if test="equipmentId != null">
equipment_id = #{equipmentId,jdbcType=BIGINT},
</if>
<if test="beforeValue != null">
before_value = #{beforeValue,jdbcType=VARCHAR},
</if>
<if test="afterValue != null">
after_value = #{afterValue,jdbcType=VARCHAR},
</if>
<if test="operator != null">
operator = #{operator,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.beneficiation.bean.po.AdjustRecord">
update t_adjust_record
set time = #{time,jdbcType=BIGINT},
monitoring_id = #{monitoringId,jdbcType=BIGINT},
monitoring_value = #{monitoringValue,jdbcType=VARCHAR},
threshold_id = #{thresholdId,jdbcType=BIGINT},
equipment_id = #{equipmentId,jdbcType=BIGINT},
before_value = #{beforeValue,jdbcType=VARCHAR},
after_value = #{afterValue,jdbcType=VARCHAR},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

258
beneficiation/src/main/resources/mapper_raw/EquipmentMapper.xml

@ -1,258 +0,0 @@
<?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.beneficiation.persist.mapper.EquipmentMapper">
<resultMap id="BaseResultMap" type="com.ccsens.beneficiation.bean.po.Equipment">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="auth_id" jdbcType="VARCHAR" property="authId" />
<result column="verion" jdbcType="VARCHAR" property="verion" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<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, type, auth_id, verion, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.beneficiation.bean.po.EquipmentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_equipment
<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_equipment
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_equipment
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.beneficiation.bean.po.EquipmentExample">
delete from t_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.beneficiation.bean.po.Equipment">
insert into t_equipment (id, type, auth_id,
verion, operator, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{authId,jdbcType=VARCHAR},
#{verion,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.beneficiation.bean.po.Equipment">
insert into t_equipment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="authId != null">
auth_id,
</if>
<if test="verion != null">
verion,
</if>
<if test="operator != null">
operator,
</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="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="authId != null">
#{authId,jdbcType=VARCHAR},
</if>
<if test="verion != null">
#{verion,jdbcType=VARCHAR},
</if>
<if test="operator != null">
#{operator,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.beneficiation.bean.po.EquipmentExample" resultType="java.lang.Long">
select count(*) from t_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_equipment
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.authId != null">
auth_id = #{record.authId,jdbcType=VARCHAR},
</if>
<if test="record.verion != null">
verion = #{record.verion,jdbcType=VARCHAR},
</if>
<if test="record.operator != null">
operator = #{record.operator,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_equipment
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=TINYINT},
auth_id = #{record.authId,jdbcType=VARCHAR},
verion = #{record.verion,jdbcType=VARCHAR},
operator = #{record.operator,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.beneficiation.bean.po.Equipment">
update t_equipment
<set>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="authId != null">
auth_id = #{authId,jdbcType=VARCHAR},
</if>
<if test="verion != null">
verion = #{verion,jdbcType=VARCHAR},
</if>
<if test="operator != null">
operator = #{operator,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.beneficiation.bean.po.Equipment">
update t_equipment
set type = #{type,jdbcType=TINYINT},
auth_id = #{authId,jdbcType=VARCHAR},
verion = #{verion,jdbcType=VARCHAR},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

258
beneficiation/src/main/resources/mapper_raw/EquipmentTypeMapper.xml

@ -1,258 +0,0 @@
<?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.beneficiation.persist.mapper.EquipmentTypeMapper">
<resultMap id="BaseResultMap" type="com.ccsens.beneficiation.bean.po.EquipmentType">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="addr" jdbcType="INTEGER" property="addr" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<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, equipment_id, type, addr, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.beneficiation.bean.po.EquipmentTypeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_equipment_type
<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_equipment_type
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_equipment_type
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.beneficiation.bean.po.EquipmentTypeExample">
delete from t_equipment_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.beneficiation.bean.po.EquipmentType">
insert into t_equipment_type (id, equipment_id, type,
addr, operator, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{equipmentId,jdbcType=BIGINT}, #{type,jdbcType=TINYINT},
#{addr,jdbcType=INTEGER}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.beneficiation.bean.po.EquipmentType">
insert into t_equipment_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="equipmentId != null">
equipment_id,
</if>
<if test="type != null">
type,
</if>
<if test="addr != null">
addr,
</if>
<if test="operator != null">
operator,
</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="equipmentId != null">
#{equipmentId,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="addr != null">
#{addr,jdbcType=INTEGER},
</if>
<if test="operator != null">
#{operator,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.beneficiation.bean.po.EquipmentTypeExample" resultType="java.lang.Long">
select count(*) from t_equipment_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_equipment_type
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.equipmentId != null">
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.addr != null">
addr = #{record.addr,jdbcType=INTEGER},
</if>
<if test="record.operator != null">
operator = #{record.operator,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_equipment_type
set id = #{record.id,jdbcType=BIGINT},
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
type = #{record.type,jdbcType=TINYINT},
addr = #{record.addr,jdbcType=INTEGER},
operator = #{record.operator,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.beneficiation.bean.po.EquipmentType">
update t_equipment_type
<set>
<if test="equipmentId != null">
equipment_id = #{equipmentId,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="addr != null">
addr = #{addr,jdbcType=INTEGER},
</if>
<if test="operator != null">
operator = #{operator,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.beneficiation.bean.po.EquipmentType">
update t_equipment_type
set equipment_id = #{equipmentId,jdbcType=BIGINT},
type = #{type,jdbcType=TINYINT},
addr = #{addr,jdbcType=INTEGER},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

275
beneficiation/src/main/resources/mapper_raw/RecordMapper.xml

@ -1,275 +0,0 @@
<?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.beneficiation.persist.mapper.RecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.beneficiation.bean.po.Record">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
<result column="value" jdbcType="INTEGER" property="value" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="type" jdbcType="TINYINT" property="type" />
</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, equipment_id, value, time, operator, created_at, updated_at, rec_status, type
</sql>
<select id="selectByExample" parameterType="com.ccsens.beneficiation.bean.po.RecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_record
<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_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.beneficiation.bean.po.RecordExample">
delete from t_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.beneficiation.bean.po.Record">
insert into t_record (id, equipment_id, value,
time, operator, created_at,
updated_at, rec_status, type
)
values (#{id,jdbcType=BIGINT}, #{equipmentId,jdbcType=BIGINT}, #{value,jdbcType=INTEGER},
#{time,jdbcType=TIMESTAMP}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{type,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.beneficiation.bean.po.Record">
insert into t_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="equipmentId != null">
equipment_id,
</if>
<if test="value != null">
value,
</if>
<if test="time != null">
time,
</if>
<if test="operator != null">
operator,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
<if test="type != null">
type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="equipmentId != null">
#{equipmentId,jdbcType=BIGINT},
</if>
<if test="value != null">
#{value,jdbcType=INTEGER},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="operator != null">
#{operator,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>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.beneficiation.bean.po.RecordExample" resultType="java.lang.Long">
select count(*) from t_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.equipmentId != null">
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=INTEGER},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.operator != null">
operator = #{record.operator,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>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_record
set id = #{record.id,jdbcType=BIGINT},
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
value = #{record.value,jdbcType=INTEGER},
time = #{record.time,jdbcType=TIMESTAMP},
operator = #{record.operator,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT},
type = #{record.type,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.beneficiation.bean.po.Record">
update t_record
<set>
<if test="equipmentId != null">
equipment_id = #{equipmentId,jdbcType=BIGINT},
</if>
<if test="value != null">
value = #{value,jdbcType=INTEGER},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="operator != null">
operator = #{operator,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>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.beneficiation.bean.po.Record">
update t_record
set equipment_id = #{equipmentId,jdbcType=BIGINT},
value = #{value,jdbcType=INTEGER},
time = #{time,jdbcType=TIMESTAMP},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT},
type = #{type,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

275
beneficiation/src/main/resources/mapper_raw/ThresholdValueMapper.xml

@ -1,275 +0,0 @@
<?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.beneficiation.persist.mapper.ThresholdValueMapper">
<resultMap id="BaseResultMap" type="com.ccsens.beneficiation.bean.po.ThresholdValue">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
<result column="stages" jdbcType="TINYINT" property="stages" />
<result column="max" jdbcType="INTEGER" property="max" />
<result column="min" jdbcType="INTEGER" property="min" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<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, equipment_id, stages, max, min, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.beneficiation.bean.po.ThresholdValueExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_threshold_value
<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_threshold_value
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_threshold_value
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.beneficiation.bean.po.ThresholdValueExample">
delete from t_threshold_value
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.beneficiation.bean.po.ThresholdValue">
insert into t_threshold_value (id, equipment_id, stages,
max, min, operator,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{equipmentId,jdbcType=BIGINT}, #{stages,jdbcType=TINYINT},
#{max,jdbcType=INTEGER}, #{min,jdbcType=INTEGER}, #{operator,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.beneficiation.bean.po.ThresholdValue">
insert into t_threshold_value
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="equipmentId != null">
equipment_id,
</if>
<if test="stages != null">
stages,
</if>
<if test="max != null">
max,
</if>
<if test="min != null">
min,
</if>
<if test="operator != null">
operator,
</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="equipmentId != null">
#{equipmentId,jdbcType=BIGINT},
</if>
<if test="stages != null">
#{stages,jdbcType=TINYINT},
</if>
<if test="max != null">
#{max,jdbcType=INTEGER},
</if>
<if test="min != null">
#{min,jdbcType=INTEGER},
</if>
<if test="operator != null">
#{operator,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.beneficiation.bean.po.ThresholdValueExample" resultType="java.lang.Long">
select count(*) from t_threshold_value
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_threshold_value
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.equipmentId != null">
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
</if>
<if test="record.stages != null">
stages = #{record.stages,jdbcType=TINYINT},
</if>
<if test="record.max != null">
max = #{record.max,jdbcType=INTEGER},
</if>
<if test="record.min != null">
min = #{record.min,jdbcType=INTEGER},
</if>
<if test="record.operator != null">
operator = #{record.operator,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_threshold_value
set id = #{record.id,jdbcType=BIGINT},
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
stages = #{record.stages,jdbcType=TINYINT},
max = #{record.max,jdbcType=INTEGER},
min = #{record.min,jdbcType=INTEGER},
operator = #{record.operator,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.beneficiation.bean.po.ThresholdValue">
update t_threshold_value
<set>
<if test="equipmentId != null">
equipment_id = #{equipmentId,jdbcType=BIGINT},
</if>
<if test="stages != null">
stages = #{stages,jdbcType=TINYINT},
</if>
<if test="max != null">
max = #{max,jdbcType=INTEGER},
</if>
<if test="min != null">
min = #{min,jdbcType=INTEGER},
</if>
<if test="operator != null">
operator = #{operator,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.beneficiation.bean.po.ThresholdValue">
update t_threshold_value
set equipment_id = #{equipmentId,jdbcType=BIGINT},
stages = #{stages,jdbcType=TINYINT},
max = #{max,jdbcType=INTEGER},
min = #{min,jdbcType=INTEGER},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

258
beneficiation/src/main/resources/mapper_raw/WeightMapper.xml

@ -1,258 +0,0 @@
<?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.beneficiation.persist.mapper.WeightMapper">
<resultMap id="BaseResultMap" type="com.ccsens.beneficiation.bean.po.Weight">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
<result column="weight" jdbcType="VARCHAR" property="weight" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<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, equipment_id, weight, time, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.beneficiation.bean.po.WeightExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_weight
<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_weight
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_weight
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.beneficiation.bean.po.WeightExample">
delete from t_weight
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.beneficiation.bean.po.Weight">
insert into t_weight (id, equipment_id, weight,
time, operator, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{equipmentId,jdbcType=BIGINT}, #{weight,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.beneficiation.bean.po.Weight">
insert into t_weight
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="equipmentId != null">
equipment_id,
</if>
<if test="weight != null">
weight,
</if>
<if test="time != null">
time,
</if>
<if test="operator != null">
operator,
</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="equipmentId != null">
#{equipmentId,jdbcType=BIGINT},
</if>
<if test="weight != null">
#{weight,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="operator != null">
#{operator,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.beneficiation.bean.po.WeightExample" resultType="java.lang.Long">
select count(*) from t_weight
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_weight
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.equipmentId != null">
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
</if>
<if test="record.weight != null">
weight = #{record.weight,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.operator != null">
operator = #{record.operator,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_weight
set id = #{record.id,jdbcType=BIGINT},
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
weight = #{record.weight,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
operator = #{record.operator,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.beneficiation.bean.po.Weight">
update t_weight
<set>
<if test="equipmentId != null">
equipment_id = #{equipmentId,jdbcType=BIGINT},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="operator != null">
operator = #{operator,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.beneficiation.bean.po.Weight">
update t_weight
set equipment_id = #{equipmentId,jdbcType=BIGINT},
weight = #{weight,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

73
ct/pom.xml

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ccsenscloud</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ct</artifactId>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!--cloud 工具类-->
<dependency>
<artifactId>cloudutil</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--util 工具类-->
<dependency>
<artifactId>util</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<configurationFile>${basedir}/src/main/resources/mbg.xml</configurationFile>
<overwrite>true</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.ccsens.ct.CtApplication</mainClass>
<!--<skip>true</skip>-->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

24
ct/src/main/java/com/ccsens/ct/CtApplication.java

@ -1,24 +0,0 @@
package com.ccsens.ct;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
@MapperScan(basePackages = {"com.ccsens.ct.persist.*"})
@ServletComponentScan
@EnableAsync
//开启断路器功能
@EnableCircuitBreaker
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign")
@SpringBootApplication(scanBasePackages = "com.ccsens")
public class CtApplication {
public static void main(String[] args) {
SpringApplication.run(CtApplication.class, args);
}
}

54
ct/src/main/java/com/ccsens/ct/api/BusinessController.java

@ -1,54 +0,0 @@
package com.ccsens.ct.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.vo.BusinessVo;
import com.ccsens.ct.service.IBusinessService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@Api(tags = "商户相关" , description = "")
@RestController
@RequestMapping("/business")
public class BusinessController {
@Autowired
private IBusinessService businessService;
@MustLogin
@ApiOperation(value = "上传商户信息", notes = "")
@RequestMapping(value = "upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<BusinessVo.BusinessInfo> uploadBusiness(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessInfo> params) throws Exception {
log.info("上传商户信息:{}",params);
BusinessVo.BusinessInfo businessInfo = businessService.uploadBusiness(params);
return JsonResponse.newInstance().ok(businessInfo);
}
@MustLogin
@ApiOperation(value = "查询商户信息", notes = "")
@RequestMapping(value = "info", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<BusinessVo.BusinessInfo> selectBusiness(@ApiParam @Validated @RequestBody QueryDto params) throws Exception {
log.info("查询商户信息:{}",params);
BusinessVo.BusinessInfo businessInfo = businessService.selectBusiness(params);
return JsonResponse.newInstance().ok(businessInfo);
}
@MustLogin
@ApiOperation(value = "修改商户信息", notes = "")
@RequestMapping(value = "update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<BusinessVo.BusinessInfo> updateBusiness(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.UpdateBusiness> params) throws Exception {
log.info("修改商户信息:{}",params);
BusinessVo.BusinessInfo businessInfo = businessService.updateBusiness(params);
return JsonResponse.newInstance().ok(businessInfo);
}
}

51
ct/src/main/java/com/ccsens/ct/api/ClockController.java

@ -1,51 +0,0 @@
package com.ccsens.ct.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.dto.ClockDto;
import com.ccsens.ct.bean.dto.SiteDto;
import com.ccsens.ct.bean.vo.ClockVo;
import com.ccsens.ct.bean.vo.SiteVo;
import com.ccsens.ct.service.IClockService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
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
@RequestMapping("/clock")
public class ClockController {
@Autowired
private IClockService clockService;
@MustLogin
@ApiOperation(value = "打卡", notes = "")
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse clockIn(@ApiParam @Validated @RequestBody QueryDto<ClockDto.ClockIn> params) throws Exception {
log.info("打卡:{}",params);
clockService.clockIn(params);
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "统计", notes = "")
@RequestMapping(value = "statistics", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ClockVo.ClockStatistics>> clockStatistics(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessId> params) throws Exception {
log.info("打卡:{}",params);
List<ClockVo.ClockStatistics> clockStatisticsList = clockService.clockStatistics(params.getParam().getId(),params.getUserId());
return JsonResponse.newInstance().ok(clockStatisticsList);
}
}

56
ct/src/main/java/com/ccsens/ct/api/DebugController.java

File diff suppressed because one or more lines are too long

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

@ -1,88 +0,0 @@
package com.ccsens.ct.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.dto.SiteDto;
import com.ccsens.ct.bean.po.Site;
import com.ccsens.ct.bean.vo.BusinessVo;
import com.ccsens.ct.bean.vo.SiteVo;
import com.ccsens.ct.service.ISiteService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
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
@RequestMapping("/sites")
public class SiteController {
@Autowired
private ISiteService siteService;
@MustLogin
@ApiOperation(value = "添加场所", notes = "")
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteInfoVo> uploadSite(@ApiParam @Validated @RequestBody QueryDto<SiteDto.SiteInfoDto> params) throws Exception {
log.info("添加场所:{}",params);
SiteVo.SiteInfoVo siteInfoVo = siteService.addSite(params);
return JsonResponse.newInstance().ok(siteInfoVo);
}
@MustLogin
@ApiOperation(value = "通过过id查看单个场所的信息", notes = "")
@RequestMapping(value = "siteId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteInfo> selectSite(@ApiParam @Validated @RequestBody QueryDto<SiteDto.SiteId> params) throws Exception {
log.info("透过id查看单个场所的信息:{}",params);
SiteVo.SiteInfo siteInfo = siteService.selectSiteById(params.getParam().getId());
return JsonResponse.newInstance().ok(siteInfo);
}
@MustLogin
@ApiOperation(value = "修改场所信息", notes = "")
@RequestMapping(value = "update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteInfoVo> updateSiteInfo(@ApiParam @Validated @RequestBody QueryDto<SiteDto.UpdateSite> params) throws Exception {
log.info("修改场所信息:{}",params);
SiteVo.SiteInfo siteInfoVo = siteService.updateSiteInfo(params);
return JsonResponse.newInstance().ok(siteInfoVo);
}
@MustLogin
@ApiOperation(value = "通过商户id查看所有场所的信息", notes = "")
@RequestMapping(value = "siteAll", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteInfoVo> selectSiteAllByBusinessId(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessId> params) throws Exception {
log.info("透过商户id查看所有场所的信息:{}",params);
SiteVo.SiteInfoVo siteInfoVo = siteService.selectSiteAllByBusinessId(params.getParam().getId());
return JsonResponse.newInstance().ok(siteInfoVo);
}
// @MustLogin
// @ApiOperation(value = "下载二维码", notes = "")
// @RequestMapping(value = "qrcode", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<String> downloadQrCode(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessId> params) throws Exception {
// log.info("下载二维码:{}",params);
// String path = siteService.downloadQrCode(params.getParam().getId());
// return JsonResponse.newInstance().ok(path);
// }
@MustLogin
@ApiOperation(value = "通过打卡扫码得到的id,获取场所信息和商户信息", notes = "")
@RequestMapping(value = "siteInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<SiteVo.SiteClockVo> selectSiteInfoByClockId(@ApiParam @Validated @RequestBody QueryDto<SiteDto.SiteClockId> params) throws Exception {
log.info("通过打卡扫码得到的id,获取场所信息和商户信息:{}",params);
SiteVo.SiteClockVo siteClockVo = siteService.selectSiteInfoByClockId(params.getParam().getId());
return JsonResponse.newInstance().ok(siteClockVo);
}
}

57
ct/src/main/java/com/ccsens/ct/bean/dto/BusinessDto.java

@ -1,57 +0,0 @@
package com.ccsens.ct.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BusinessDto {
@Data
@ApiModel("上传商户信息")
public static class BusinessInfo{
@ApiModelProperty("商户名称")
private String name;
@ApiModelProperty("详细地址")
private String address;
@ApiModelProperty("申请人姓名")
private String applicantName;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("营业执照")
private String businessLicense;
@ApiModelProperty("公众号二维码")
private String qrCode;
}
@Data
@ApiModel("商户id")
public static class BusinessId{
@ApiModelProperty("商户id")
private Long id;
}
@Data
@ApiModel("修改商户信息")
public static class UpdateBusiness{
@ApiModelProperty("商户id")
private Long id;
@ApiModelProperty("商户名称")
private String name;
@ApiModelProperty("详细地址")
private String address;
@ApiModelProperty("申请人姓名")
private String applicantName;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("营业执照")
private String businessLicense;
@ApiModelProperty("公众号二维码")
private String qrCode;
}
}

22
ct/src/main/java/com/ccsens/ct/bean/dto/ClockDto.java

@ -1,22 +0,0 @@
package com.ccsens.ct.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class ClockDto {
@Data
@ApiModel("打卡")
public static class ClockIn{
@ApiModelProperty("二维码的id")
private Long id;
@ApiModelProperty("经度")
private BigDecimal longitude;
@ApiModelProperty("纬度")
private BigDecimal latitude;
}
}

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

@ -1,70 +0,0 @@
package com.ccsens.ct.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
@Data
public class SiteDto {
@Data
@ApiModel("添加场所")
public static class SiteInfoDto{
@ApiModelProperty("所属商户id")
@NotNull(message = "商户id不能为空")
private Long id;
@ApiModelProperty("场所名")
@NotEmpty(message = "场所名不能为空")
private String siteName;
@ApiModelProperty("经度")
private BigDecimal longitude;
@ApiModelProperty("纬度")
private BigDecimal latitude;
// @ApiModelProperty("场所信息")
// private List<SiteInfo> siteInfo;
}
@Data
@ApiModel("添加时场所信息")
public static class SiteInfo{
@ApiModelProperty("场所名")
@NotEmpty(message = "场所名不能为空")
private String siteName;
@ApiModelProperty("经度")
private BigDecimal longitude;
@ApiModelProperty("纬度")
private BigDecimal latitude;
}
@Data
@ApiModel("修改场所信息")
public static class UpdateSite{
@ApiModelProperty("场所id")
private Long id;
@ApiModelProperty("场所名")
private String siteName;
@ApiModelProperty("经度")
private BigDecimal longitude;
@ApiModelProperty("纬度")
private BigDecimal latitude;
}
@Data
@ApiModel("场所id")
public static class SiteId{
@ApiModelProperty("场所id")
private Long id;
}
@Data
@ApiModel("扫码时获取的场所进出id")
public static class SiteClockId{
@ApiModelProperty("扫码时获取的场所进出id")
private Long id;
}
}

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

@ -1,161 +0,0 @@
package com.ccsens.ct.bean.po;
import java.io.Serializable;
import java.util.Date;
public class Business implements Serializable {
private Long id;
private String name;
private String address;
private String applicantName;
private String applicantIdCard;
private String applicantPhone;
private String businessLicense;
private String qrCode;
private Long userId;
private Byte passed;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address == null ? null : address.trim();
}
public String getApplicantName() {
return applicantName;
}
public void setApplicantName(String applicantName) {
this.applicantName = applicantName == null ? null : applicantName.trim();
}
public String getApplicantIdCard() {
return applicantIdCard;
}
public void setApplicantIdCard(String applicantIdCard) {
this.applicantIdCard = applicantIdCard == null ? null : applicantIdCard.trim();
}
public String getApplicantPhone() {
return applicantPhone;
}
public void setApplicantPhone(String applicantPhone) {
this.applicantPhone = applicantPhone == null ? null : applicantPhone.trim();
}
public String getBusinessLicense() {
return businessLicense;
}
public void setBusinessLicense(String businessLicense) {
this.businessLicense = businessLicense == null ? null : businessLicense.trim();
}
public String getQrCode() {
return qrCode;
}
public void setQrCode(String qrCode) {
this.qrCode = qrCode == null ? null : qrCode.trim();
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Byte getPassed() {
return passed;
}
public void setPassed(Byte passed) {
this.passed = passed;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", address=").append(address);
sb.append(", applicantName=").append(applicantName);
sb.append(", applicantIdCard=").append(applicantIdCard);
sb.append(", applicantPhone=").append(applicantPhone);
sb.append(", businessLicense=").append(businessLicense);
sb.append(", qrCode=").append(qrCode);
sb.append(", userId=").append(userId);
sb.append(", passed=").append(passed);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

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

File diff suppressed because it is too large

118
ct/src/main/java/com/ccsens/ct/bean/po/Site.java

@ -1,118 +0,0 @@
package com.ccsens.ct.bean.po;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class Site implements Serializable {
private Long id;
private Long businessId;
private String siteName;
private String siteCode;
private BigDecimal longitude;
private BigDecimal latitude;
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 getBusinessId() {
return businessId;
}
public void setBusinessId(Long businessId) {
this.businessId = businessId;
}
public String getSiteName() {
return siteName;
}
public void setSiteName(String siteName) {
this.siteName = siteName == null ? null : siteName.trim();
}
public String getSiteCode() {
return siteCode;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode == null ? null : siteCode.trim();
}
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
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(", businessId=").append(businessId);
sb.append(", siteName=").append(siteName);
sb.append(", siteCode=").append(siteCode);
sb.append(", longitude=").append(longitude);
sb.append(", latitude=").append(latitude);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

118
ct/src/main/java/com/ccsens/ct/bean/po/SiteClockIn.java

@ -1,118 +0,0 @@
package com.ccsens.ct.bean.po;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class SiteClockIn implements Serializable {
private Long id;
private Long qrcodeId;
private Long time;
private BigDecimal longitude;
private BigDecimal latitude;
private Long userId;
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 getQrcodeId() {
return qrcodeId;
}
public void setQrcodeId(Long qrcodeId) {
this.qrcodeId = qrcodeId;
}
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
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(", qrcodeId=").append(qrcodeId);
sb.append(", time=").append(time);
sb.append(", longitude=").append(longitude);
sb.append(", latitude=").append(latitude);
sb.append(", userId=").append(userId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

742
ct/src/main/java/com/ccsens/ct/bean/po/SiteClockInExample.java

@ -1,742 +0,0 @@
package com.ccsens.ct.bean.po;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SiteClockInExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SiteClockInExample() {
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 andQrcodeIdIsNull() {
addCriterion("qrcode_id is null");
return (Criteria) this;
}
public Criteria andQrcodeIdIsNotNull() {
addCriterion("qrcode_id is not null");
return (Criteria) this;
}
public Criteria andQrcodeIdEqualTo(Long value) {
addCriterion("qrcode_id =", value, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdNotEqualTo(Long value) {
addCriterion("qrcode_id <>", value, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdGreaterThan(Long value) {
addCriterion("qrcode_id >", value, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdGreaterThanOrEqualTo(Long value) {
addCriterion("qrcode_id >=", value, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdLessThan(Long value) {
addCriterion("qrcode_id <", value, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdLessThanOrEqualTo(Long value) {
addCriterion("qrcode_id <=", value, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdIn(List<Long> values) {
addCriterion("qrcode_id in", values, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdNotIn(List<Long> values) {
addCriterion("qrcode_id not in", values, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdBetween(Long value1, Long value2) {
addCriterion("qrcode_id between", value1, value2, "qrcodeId");
return (Criteria) this;
}
public Criteria andQrcodeIdNotBetween(Long value1, Long value2) {
addCriterion("qrcode_id not between", value1, value2, "qrcodeId");
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 andLongitudeIsNull() {
addCriterion("longitude is null");
return (Criteria) this;
}
public Criteria andLongitudeIsNotNull() {
addCriterion("longitude is not null");
return (Criteria) this;
}
public Criteria andLongitudeEqualTo(BigDecimal value) {
addCriterion("longitude =", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotEqualTo(BigDecimal value) {
addCriterion("longitude <>", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThan(BigDecimal value) {
addCriterion("longitude >", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("longitude >=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThan(BigDecimal value) {
addCriterion("longitude <", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThanOrEqualTo(BigDecimal value) {
addCriterion("longitude <=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeIn(List<BigDecimal> values) {
addCriterion("longitude in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotIn(List<BigDecimal> values) {
addCriterion("longitude not in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("longitude between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("longitude not between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLatitudeIsNull() {
addCriterion("latitude is null");
return (Criteria) this;
}
public Criteria andLatitudeIsNotNull() {
addCriterion("latitude is not null");
return (Criteria) this;
}
public Criteria andLatitudeEqualTo(BigDecimal value) {
addCriterion("latitude =", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotEqualTo(BigDecimal value) {
addCriterion("latitude <>", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThan(BigDecimal value) {
addCriterion("latitude >", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("latitude >=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThan(BigDecimal value) {
addCriterion("latitude <", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThanOrEqualTo(BigDecimal value) {
addCriterion("latitude <=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeIn(List<BigDecimal> values) {
addCriterion("latitude in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotIn(List<BigDecimal> values) {
addCriterion("latitude not in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("latitude between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("latitude not between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
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);
}
}
}

762
ct/src/main/java/com/ccsens/ct/bean/po/SiteExample.java

@ -1,762 +0,0 @@
package com.ccsens.ct.bean.po;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SiteExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SiteExample() {
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 andBusinessIdIsNull() {
addCriterion("business_id is null");
return (Criteria) this;
}
public Criteria andBusinessIdIsNotNull() {
addCriterion("business_id is not null");
return (Criteria) this;
}
public Criteria andBusinessIdEqualTo(Long value) {
addCriterion("business_id =", value, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdNotEqualTo(Long value) {
addCriterion("business_id <>", value, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdGreaterThan(Long value) {
addCriterion("business_id >", value, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdGreaterThanOrEqualTo(Long value) {
addCriterion("business_id >=", value, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdLessThan(Long value) {
addCriterion("business_id <", value, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdLessThanOrEqualTo(Long value) {
addCriterion("business_id <=", value, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdIn(List<Long> values) {
addCriterion("business_id in", values, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdNotIn(List<Long> values) {
addCriterion("business_id not in", values, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdBetween(Long value1, Long value2) {
addCriterion("business_id between", value1, value2, "businessId");
return (Criteria) this;
}
public Criteria andBusinessIdNotBetween(Long value1, Long value2) {
addCriterion("business_id not between", value1, value2, "businessId");
return (Criteria) this;
}
public Criteria andSiteNameIsNull() {
addCriterion("site_name is null");
return (Criteria) this;
}
public Criteria andSiteNameIsNotNull() {
addCriterion("site_name is not null");
return (Criteria) this;
}
public Criteria andSiteNameEqualTo(String value) {
addCriterion("site_name =", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotEqualTo(String value) {
addCriterion("site_name <>", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameGreaterThan(String value) {
addCriterion("site_name >", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameGreaterThanOrEqualTo(String value) {
addCriterion("site_name >=", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameLessThan(String value) {
addCriterion("site_name <", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameLessThanOrEqualTo(String value) {
addCriterion("site_name <=", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameLike(String value) {
addCriterion("site_name like", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotLike(String value) {
addCriterion("site_name not like", value, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameIn(List<String> values) {
addCriterion("site_name in", values, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotIn(List<String> values) {
addCriterion("site_name not in", values, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameBetween(String value1, String value2) {
addCriterion("site_name between", value1, value2, "siteName");
return (Criteria) this;
}
public Criteria andSiteNameNotBetween(String value1, String value2) {
addCriterion("site_name not between", value1, value2, "siteName");
return (Criteria) this;
}
public Criteria andSiteCodeIsNull() {
addCriterion("site_code is null");
return (Criteria) this;
}
public Criteria andSiteCodeIsNotNull() {
addCriterion("site_code is not null");
return (Criteria) this;
}
public Criteria andSiteCodeEqualTo(String value) {
addCriterion("site_code =", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeNotEqualTo(String value) {
addCriterion("site_code <>", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeGreaterThan(String value) {
addCriterion("site_code >", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeGreaterThanOrEqualTo(String value) {
addCriterion("site_code >=", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeLessThan(String value) {
addCriterion("site_code <", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeLessThanOrEqualTo(String value) {
addCriterion("site_code <=", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeLike(String value) {
addCriterion("site_code like", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeNotLike(String value) {
addCriterion("site_code not like", value, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeIn(List<String> values) {
addCriterion("site_code in", values, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeNotIn(List<String> values) {
addCriterion("site_code not in", values, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeBetween(String value1, String value2) {
addCriterion("site_code between", value1, value2, "siteCode");
return (Criteria) this;
}
public Criteria andSiteCodeNotBetween(String value1, String value2) {
addCriterion("site_code not between", value1, value2, "siteCode");
return (Criteria) this;
}
public Criteria andLongitudeIsNull() {
addCriterion("longitude is null");
return (Criteria) this;
}
public Criteria andLongitudeIsNotNull() {
addCriterion("longitude is not null");
return (Criteria) this;
}
public Criteria andLongitudeEqualTo(BigDecimal value) {
addCriterion("longitude =", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotEqualTo(BigDecimal value) {
addCriterion("longitude <>", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThan(BigDecimal value) {
addCriterion("longitude >", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("longitude >=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThan(BigDecimal value) {
addCriterion("longitude <", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThanOrEqualTo(BigDecimal value) {
addCriterion("longitude <=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeIn(List<BigDecimal> values) {
addCriterion("longitude in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotIn(List<BigDecimal> values) {
addCriterion("longitude not in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("longitude between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("longitude not between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLatitudeIsNull() {
addCriterion("latitude is null");
return (Criteria) this;
}
public Criteria andLatitudeIsNotNull() {
addCriterion("latitude is not null");
return (Criteria) this;
}
public Criteria andLatitudeEqualTo(BigDecimal value) {
addCriterion("latitude =", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotEqualTo(BigDecimal value) {
addCriterion("latitude <>", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThan(BigDecimal value) {
addCriterion("latitude >", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("latitude >=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThan(BigDecimal value) {
addCriterion("latitude <", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThanOrEqualTo(BigDecimal value) {
addCriterion("latitude <=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeIn(List<BigDecimal> values) {
addCriterion("latitude in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotIn(List<BigDecimal> values) {
addCriterion("latitude not in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("latitude between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("latitude not between", value1, value2, "latitude");
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);
}
}
}

106
ct/src/main/java/com/ccsens/ct/bean/po/SiteQrcode.java

@ -1,106 +0,0 @@
package com.ccsens.ct.bean.po;
import java.io.Serializable;
import java.util.Date;
public class SiteQrcode implements Serializable {
private Long id;
private Long siteId;
private Byte outOrIn;
private String qrcodePath;
private String bigQrcodePath;
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 getSiteId() {
return siteId;
}
public void setSiteId(Long siteId) {
this.siteId = siteId;
}
public Byte getOutOrIn() {
return outOrIn;
}
public void setOutOrIn(Byte outOrIn) {
this.outOrIn = outOrIn;
}
public String getQrcodePath() {
return qrcodePath;
}
public void setQrcodePath(String qrcodePath) {
this.qrcodePath = qrcodePath == null ? null : qrcodePath.trim();
}
public String getBigQrcodePath() {
return bigQrcodePath;
}
public void setBigQrcodePath(String bigQrcodePath) {
this.bigQrcodePath = bigQrcodePath == null ? null : bigQrcodePath.trim();
}
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(", siteId=").append(siteId);
sb.append(", outOrIn=").append(outOrIn);
sb.append(", qrcodePath=").append(qrcodePath);
sb.append(", bigQrcodePath=").append(bigQrcodePath);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

701
ct/src/main/java/com/ccsens/ct/bean/po/SiteQrcodeExample.java

@ -1,701 +0,0 @@
package com.ccsens.ct.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SiteQrcodeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SiteQrcodeExample() {
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 andSiteIdIsNull() {
addCriterion("site_id is null");
return (Criteria) this;
}
public Criteria andSiteIdIsNotNull() {
addCriterion("site_id is not null");
return (Criteria) this;
}
public Criteria andSiteIdEqualTo(Long value) {
addCriterion("site_id =", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdNotEqualTo(Long value) {
addCriterion("site_id <>", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdGreaterThan(Long value) {
addCriterion("site_id >", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdGreaterThanOrEqualTo(Long value) {
addCriterion("site_id >=", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdLessThan(Long value) {
addCriterion("site_id <", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdLessThanOrEqualTo(Long value) {
addCriterion("site_id <=", value, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdIn(List<Long> values) {
addCriterion("site_id in", values, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdNotIn(List<Long> values) {
addCriterion("site_id not in", values, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdBetween(Long value1, Long value2) {
addCriterion("site_id between", value1, value2, "siteId");
return (Criteria) this;
}
public Criteria andSiteIdNotBetween(Long value1, Long value2) {
addCriterion("site_id not between", value1, value2, "siteId");
return (Criteria) this;
}
public Criteria andOutOrInIsNull() {
addCriterion("out_or_in is null");
return (Criteria) this;
}
public Criteria andOutOrInIsNotNull() {
addCriterion("out_or_in is not null");
return (Criteria) this;
}
public Criteria andOutOrInEqualTo(Byte value) {
addCriterion("out_or_in =", value, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInNotEqualTo(Byte value) {
addCriterion("out_or_in <>", value, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInGreaterThan(Byte value) {
addCriterion("out_or_in >", value, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInGreaterThanOrEqualTo(Byte value) {
addCriterion("out_or_in >=", value, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInLessThan(Byte value) {
addCriterion("out_or_in <", value, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInLessThanOrEqualTo(Byte value) {
addCriterion("out_or_in <=", value, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInIn(List<Byte> values) {
addCriterion("out_or_in in", values, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInNotIn(List<Byte> values) {
addCriterion("out_or_in not in", values, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInBetween(Byte value1, Byte value2) {
addCriterion("out_or_in between", value1, value2, "outOrIn");
return (Criteria) this;
}
public Criteria andOutOrInNotBetween(Byte value1, Byte value2) {
addCriterion("out_or_in not between", value1, value2, "outOrIn");
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 andBigQrcodePathIsNull() {
addCriterion("big_qrcode_path is null");
return (Criteria) this;
}
public Criteria andBigQrcodePathIsNotNull() {
addCriterion("big_qrcode_path is not null");
return (Criteria) this;
}
public Criteria andBigQrcodePathEqualTo(String value) {
addCriterion("big_qrcode_path =", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathNotEqualTo(String value) {
addCriterion("big_qrcode_path <>", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathGreaterThan(String value) {
addCriterion("big_qrcode_path >", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathGreaterThanOrEqualTo(String value) {
addCriterion("big_qrcode_path >=", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathLessThan(String value) {
addCriterion("big_qrcode_path <", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathLessThanOrEqualTo(String value) {
addCriterion("big_qrcode_path <=", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathLike(String value) {
addCriterion("big_qrcode_path like", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathNotLike(String value) {
addCriterion("big_qrcode_path not like", value, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathIn(List<String> values) {
addCriterion("big_qrcode_path in", values, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathNotIn(List<String> values) {
addCriterion("big_qrcode_path not in", values, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathBetween(String value1, String value2) {
addCriterion("big_qrcode_path between", value1, value2, "bigQrcodePath");
return (Criteria) this;
}
public Criteria andBigQrcodePathNotBetween(String value1, String value2) {
addCriterion("big_qrcode_path not between", value1, value2, "bigQrcodePath");
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);
}
}
}

29
ct/src/main/java/com/ccsens/ct/bean/vo/BusinessVo.java

@ -1,29 +0,0 @@
package com.ccsens.ct.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BusinessVo {
@Data
@ApiModel("返回商户的信息")
public static class BusinessInfo{
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("商户名称")
private String name;
@ApiModelProperty("详细地址")
private String address;
@ApiModelProperty("申请人姓名")
private String applicantName;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("营业执照")
private String businessLicense;
@ApiModelProperty("公众号二维码")
private String qrCode;
}
}

19
ct/src/main/java/com/ccsens/ct/bean/vo/ClockVo.java

@ -1,19 +0,0 @@
package com.ccsens.ct.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ClockVo {
@Data
@ApiModel("打卡统计")
public static class ClockStatistics{
@ApiModelProperty("场所名称")
private String siteName;
@ApiModelProperty("进or出 0进 1出")
private Integer type;
@ApiModelProperty("打卡时间")
private Long time;
}
}

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

@ -1,65 +0,0 @@
package com.ccsens.ct.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class SiteVo {
@Data
@ApiModel("返回场所信息")
public static class SiteInfoVo{
@ApiModelProperty("所属商户id")
private Long businessId;
@ApiModelProperty("所属商户名称")
private String businessName;
@ApiModelProperty("统计页面的链接")
private String path;
@ApiModelProperty("打包下载二维码路径")
private String downloadPath;
@ApiModelProperty("场所信息")
private List<SiteInfo> site;
}
@Data
@ApiModel("场所信息")
public static class SiteInfo{
@ApiModelProperty("场所id")
private Long id;
@ApiModelProperty("场所名称")
private String name;
@ApiModelProperty("进二维码")
private String outQrCode;
@ApiModelProperty("出二维码")
private String inQrCode;
@ApiModelProperty("经度")
private BigDecimal longitude;
@ApiModelProperty("纬度")
private BigDecimal latitude;
}
@Data
@ApiModel("通过场所进出的二维码id查询的场所和商户信息")
public static class SiteClockVo{
@ApiModelProperty("场所id")
private Long siteId;
@ApiModelProperty("场所名称")
private String siteName;
@ApiModelProperty("进出类型 0进 1出")
private int type;
@ApiModelProperty("经度")
private BigDecimal longitude;
@ApiModelProperty("纬度")
private BigDecimal latitude;
@ApiModelProperty("所属商户id")
private Long businessId;
@ApiModelProperty("所属商户名称")
private String businessName;
@ApiModelProperty("所属商户公众号的二维码")
private String businessQrCode;
}
}

164
ct/src/main/java/com/ccsens/ct/config/SpringConfig.java

@ -1,164 +0,0 @@
package com.ccsens.ct.config;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.ccsens.util.config.DruidProps;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.*;
import javax.sql.DataSource;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
@Configuration
//public class SpringConfig extends WebMvcConfigurationSupport {
public class SpringConfig implements WebMvcConfigurer {
@Autowired
private DruidProps druidPropsUtil;
@Value("${spring.snowflake.workerId}")
private String workerId;
@Value("${spring.snowflake.datacenterId}")
private String datacenterId;
/**
* 配置Converter
* @return
*/
@Bean
public HttpMessageConverter<String> responseStringConverter() {
StringHttpMessageConverter converter = new StringHttpMessageConverter(
Charset.forName("UTF-8"));
return converter;
}
@Bean
public HttpMessageConverter<Object> responseJsonConverter(){
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
List<MediaType> mediaTypeList = new ArrayList<>();
mediaTypeList.add(MediaType.TEXT_HTML);
mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8);
converter.setSupportedMediaTypes(mediaTypeList);
//converter.setObjectMapper();
ObjectMapper objectMapper = new ObjectMapper();
SimpleModule simpleModule = new SimpleModule();
simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
converter.setObjectMapper(objectMapper);
return converter;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
//super.configureMessageConverters(converters);
converters.add(responseStringConverter());
converters.add(responseJsonConverter());
}
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS");
}
/**
* 配置视图解析器 SpringBoot建议使用Thymeleaf代替jsp动态页面默认路径resources/template静态页面默认路径: resources/static
* @return
*/
// @Bean
// public ViewResolver getViewResolver() {
// InternalResourceViewResolver resolver = new InternalResourceViewResolver();
// resolver.setPrefix("/WEB-INF/views/");
// resolver.setSuffix(".jsp");
// return resolver;
// }
// @Override
// public void configureDefaultServletHandling(
// DefaultServletHandlerConfigurer configurer) {
// configurer.enable();
// }
/**
* 配置静态资源
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/ct/uploads/");
//super.addResourceHandlers(registry);
}
/**
* 配置拦截器
* @param registry
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
//addPathPatterns 用于添加拦截规则
//excludePathPatterns 用于排除拦截
// registry.addInterceptor(tokenInterceptor())
// .addPathPatterns("/projects/**")
// .addPathPatterns("/messages/**")
// .addPathPatterns("/users/**")
// .excludePathPatterns("/users/signin")
// .excludePathPatterns("/users/smscode")
// .excludePathPatterns("/users/signup")
// .excludePathPatterns("/users/password")
// .excludePathPatterns("/users/account")
// .excludePathPatterns("/users/token")
// .excludePathPatterns("/users/claims")
// .addPathPatterns("/plugins/**")
// .addPathPatterns("/delivers/**")
// .addPathPatterns("/tasks/**")
// .addPathPatterns("/members/**")
// .addPathPatterns("/templates/**")
// .addPathPatterns("/hardware/**");
//super.addInterceptors(registry);
}
//
// @Bean
// public TokenInterceptor tokenInterceptor(){
// return new TokenInterceptor();
// }
/**
* 配置数据源单数据源
*/
@Bean
public DataSource dataSource(){
return druidPropsUtil.createDruidDataSource();
}
@Bean
public Snowflake snowflake(){
// return new Snowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
return IdUtil.createSnowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
}
}

154
ct/src/main/java/com/ccsens/ct/intercept/MybatisInterceptor.java

@ -1,154 +0,0 @@
package com.ccsens.ct.intercept;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.util.WebConstant;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.*;
import org.apache.ibatis.plugin.*;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Properties;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/11 10:58
*/
@Intercepts({
@Signature(
type = Executor.class,
method = "query",
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}
)
})
public class MybatisInterceptor implements Interceptor {
@Override
public Object intercept(Invocation invocation) throws Throwable {
String selectByExample = "selectByExample";
String selectByPrimaryKey = "selectByPrimaryKey";
Object[] args = invocation.getArgs();
MappedStatement statement = (MappedStatement) args[0];
if (statement.getId().endsWith(selectByExample)) {
//XXXExample
Object example = args[1];
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List)method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap)statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List)getCriteria.invoke(criteria);
boolean hasDel = false;
for(Object param: params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("iis_del =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
}
}
} else if (statement.getId().endsWith(selectByPrimaryKey)) {
BoundSql boundSql = statement.getBoundSql(args[1]);
String sql = boundSql.getSql() + " and rec_status = 0";
MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql));
MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory());
msObject.setValue("sqlSource.boundSql.sql", sql);
args[0] = newStatement;
}
return invocation.proceed();
}
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
@Override
public void setProperties(Properties properties) {
}
private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) {
MappedStatement.Builder builder =
new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType());
builder.resource(ms.getResource());
builder.fetchSize(ms.getFetchSize());
builder.statementType(ms.getStatementType());
builder.keyGenerator(ms.getKeyGenerator());
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) {
StringBuilder keyProperties = new StringBuilder();
for (String keyProperty : ms.getKeyProperties()) {
keyProperties.append(keyProperty).append(",");
}
keyProperties.delete(keyProperties.length() - 1, keyProperties.length());
builder.keyProperty(keyProperties.toString());
}
builder.timeout(ms.getTimeout());
builder.parameterMap(ms.getParameterMap());
builder.resultMaps(ms.getResultMaps());
builder.resultSetType(ms.getResultSetType());
builder.cache(ms.getCache());
builder.flushCacheRequired(ms.isFlushCacheRequired());
builder.useCache(ms.isUseCache());
return builder.build();
}
private String getOperateType(Invocation invocation) {
final Object[] args = invocation.getArgs();
MappedStatement ms = (MappedStatement) args[0];
SqlCommandType commondType = ms.getSqlCommandType();
if (commondType.compareTo(SqlCommandType.SELECT) == 0) {
return "select";
}
if (commondType.compareTo(SqlCommandType.INSERT) == 0) {
return "insert";
}
if (commondType.compareTo(SqlCommandType.UPDATE) == 0) {
return "update";
}
if (commondType.compareTo(SqlCommandType.DELETE) == 0) {
return "delete";
}
return null;
}
// 定义一个内部辅助类,作用是包装sq
class BoundSqlSqlSource implements SqlSource {
private BoundSql boundSql;
public BoundSqlSqlSource(BoundSql boundSql) {
this.boundSql = boundSql;
}
@Override
public BoundSql getBoundSql(Object parameterObject) {
return boundSql;
}
}
}

8
ct/src/main/java/com/ccsens/ct/persist/dao/BusinessDao.java

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

14
ct/src/main/java/com/ccsens/ct/persist/dao/SiteClockInDao.java

@ -1,14 +0,0 @@
package com.ccsens.ct.persist.dao;
import com.ccsens.ct.bean.po.SiteClockIn;
import com.ccsens.ct.bean.vo.ClockVo;
import com.ccsens.ct.persist.mapper.SiteClockInMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface SiteClockInDao extends SiteClockInMapper {
List<ClockVo.ClockStatistics> selectClockStatistics(@Param("businessId") Long businessId, @Param("userId") Long userId);
}

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

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

9
ct/src/main/java/com/ccsens/ct/persist/dao/SiteQrcodeDao.java

@ -1,9 +0,0 @@
package com.ccsens.ct.persist.dao;
import com.ccsens.ct.bean.po.SiteQrcode;
import com.ccsens.ct.persist.mapper.SiteQrcodeMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface SiteQrcodeDao extends SiteQrcodeMapper {
}

30
ct/src/main/java/com/ccsens/ct/persist/mapper/BusinessMapper.java

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

30
ct/src/main/java/com/ccsens/ct/persist/mapper/SiteClockInMapper.java

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

30
ct/src/main/java/com/ccsens/ct/persist/mapper/SiteMapper.java

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

30
ct/src/main/java/com/ccsens/ct/persist/mapper/SiteQrcodeMapper.java

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

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

@ -1,170 +0,0 @@
package com.ccsens.ct.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.po.Business;
import com.ccsens.ct.bean.po.BusinessExample;
import com.ccsens.ct.bean.vo.BusinessVo;
import com.ccsens.ct.persist.dao.BusinessDao;
import com.ccsens.util.Base64FileUtil;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import com.ccsens.util.wx.WxXcxUtil;
import net.bytebuddy.asm.Advice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class BusinessService implements IBusinessService{
@Autowired
private Snowflake snowflake;
@Autowired
private BusinessDao businessDao;
/**
* 上传商户的信息
* @param params
* @return
*/
@Override
public BusinessVo.BusinessInfo uploadBusiness(QueryDto<BusinessDto.BusinessInfo> params) throws Exception {
BusinessDto.BusinessInfo businessInfo = params.getParam();
Long userId = params.getUserId();
//将base64转化为文件并存入服务器,将路径存入商户信息
String path = WebConstant.UPLOAD_PATH_BASE + "/business/";
String fileName = DateUtil.today() + "/";
//营业执照
String businessLicensePath = "";
if(StrUtil.isNotEmpty(businessInfo.getBusinessLicense())) {
String businessLicenseName = Base64FileUtil.base64ToFile(businessInfo.getBusinessLicense(), path, fileName);
businessLicensePath = WebConstant.TEST_URL_BASE_CT + "/business/" + businessLicenseName;
}
//公众号二维码
String qrCodePath = "";
if(StrUtil.isNotEmpty(businessInfo.getQrCode())) {
String qrCodeName = Base64FileUtil.base64ToFile(businessInfo.getQrCode(), path, fileName);
qrCodePath = WebConstant.TEST_URL_BASE_CT + "/business/" + qrCodeName;
}
//将商户信息存入数据库
Business business = new Business();
business.setId(snowflake.nextId());
business.setName(businessInfo.getName());
business.setAddress(businessInfo.getAddress());
business.setApplicantName(businessInfo.getApplicantName());
business.setApplicantIdCard(businessInfo.getIdCard());
business.setApplicantPhone(businessInfo.getPhone());
business.setBusinessLicense(businessLicensePath);
business.setQrCode(qrCodePath);
business.setUserId(userId);
businessDao.insertSelective(business);
//返回
BusinessVo.BusinessInfo businessInfoVo = new BusinessVo.BusinessInfo();
businessInfoVo.setId(business.getId());
businessInfoVo.setName(business.getName());
businessInfoVo.setAddress(business.getAddress());
businessInfoVo.setApplicantName(business.getApplicantName());
businessInfoVo.setIdCard(business.getApplicantIdCard());
businessInfoVo.setPhone(business.getApplicantPhone());
businessInfoVo.setBusinessLicense(business.getBusinessLicense());
businessInfoVo.setQrCode(business.getQrCode());
return businessInfoVo;
}
/**
* 查询商户的信息
* @param params
* @return
*/
@Override
public BusinessVo.BusinessInfo selectBusiness(QueryDto params) {
BusinessVo.BusinessInfo businessInfo = null;
Long userId = params.getUserId();
BusinessExample businessExample = new BusinessExample();
businessExample.createCriteria().andUserIdEqualTo(userId);
List<Business> businessList = businessDao.selectByExample(businessExample);
if(CollectionUtil.isNotEmpty(businessList)){
Business business = businessList.get(0);
businessInfo = new BusinessVo.BusinessInfo();
businessInfo.setId(business.getId());
businessInfo.setName(business.getName());
businessInfo.setAddress(business.getAddress());
businessInfo.setIdCard(business.getApplicantIdCard());
businessInfo.setApplicantName(business.getApplicantName());
businessInfo.setPhone(business.getApplicantPhone());
businessInfo.setBusinessLicense(business.getBusinessLicense());
businessInfo.setQrCode(business.getQrCode());
}
return businessInfo;
}
/**
* 修改商户的信息
* @param params
* @return
*/
@Override
public BusinessVo.BusinessInfo updateBusiness(QueryDto<BusinessDto.UpdateBusiness> params) throws Exception {
BusinessDto.UpdateBusiness updateBusiness = params.getParam();
//查找到原来的商户信息
Business business = businessDao.selectByPrimaryKey(updateBusiness.getId());
if(ObjectUtil.isNull(business)){
throw new BaseException(CodeEnum.NOT_BUSINESS);
}
if(StrUtil.isNotEmpty(updateBusiness.getName())){
business.setName(updateBusiness.getName());
}
if(StrUtil.isNotEmpty(updateBusiness.getAddress())){
business.setAddress(updateBusiness.getAddress());
}
if(StrUtil.isNotEmpty(updateBusiness.getApplicantName())){
business.setApplicantName(updateBusiness.getApplicantName());
}
if(StrUtil.isNotEmpty(updateBusiness.getIdCard())){
business.setApplicantIdCard(updateBusiness.getIdCard());
}
if(StrUtil.isNotEmpty(updateBusiness.getPhone())){
business.setApplicantPhone(updateBusiness.getPhone());
}
//如果文件重新上传 重新生成图片和路径
String path = WebConstant.UPLOAD_PATH_BASE + "/business/";
String fileName = DateUtil.today() + "/";
//营业执照
if(StrUtil.isNotEmpty(updateBusiness.getBusinessLicense())){
String businessLicenseName = Base64FileUtil.base64ToFile(updateBusiness.getBusinessLicense(),path,fileName);
String businessLicensePath = WebConstant.TEST_URL_BASE_CT + "/business/" + businessLicenseName;
business.setBusinessLicense(businessLicensePath);
}
//公众号二维码
if(StrUtil.isNotEmpty(updateBusiness.getQrCode())){
String qrCodeName = Base64FileUtil.base64ToFile(updateBusiness.getQrCode(),path,fileName);
String qrCodePath = WebConstant.TEST_URL_BASE_CT + "/business/" + qrCodeName;
business.setQrCode(qrCodePath);
}
businessDao.updateByPrimaryKeySelective(business);
//返回
BusinessVo.BusinessInfo businessInfoVo = new BusinessVo.BusinessInfo();
businessInfoVo.setId(business.getId());
businessInfoVo.setName(business.getName());
businessInfoVo.setApplicantName(business.getApplicantName());
businessInfoVo.setAddress(business.getAddress());
businessInfoVo.setIdCard(business.getApplicantIdCard());
businessInfoVo.setPhone(business.getApplicantPhone());
businessInfoVo.setBusinessLicense(business.getBusinessLicense());
businessInfoVo.setQrCode(business.getQrCode());
return businessInfoVo;
}
}

58
ct/src/main/java/com/ccsens/ct/service/ClockService.java

@ -1,58 +0,0 @@
package com.ccsens.ct.service;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.dto.ClockDto;
import com.ccsens.ct.bean.po.Business;
import com.ccsens.ct.bean.po.SiteClockIn;
import com.ccsens.ct.bean.vo.ClockVo;
import com.ccsens.ct.persist.dao.SiteClockInDao;
import com.ccsens.util.bean.dto.QueryDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ClockService implements IClockService{
@Autowired
private SiteClockInDao siteClockInDao;
@Autowired
private Snowflake snowflake;
/**
* 打卡
* @param params
*/
@Override
public void clockIn(QueryDto<ClockDto.ClockIn> params) {
ClockDto.ClockIn clockIn = params.getParam();
Long userId = params.getUserId();
//TODO 判断用户是否在打卡的场所附近
//添加打卡记录
SiteClockIn siteClockIn = new SiteClockIn();
siteClockIn.setId(snowflake.nextId());
siteClockIn.setQrcodeId(clockIn.getId());
siteClockIn.setUserId(userId);
siteClockIn.setTime(System.currentTimeMillis());
siteClockIn.setLongitude(clockIn.getLongitude());
siteClockIn.setLatitude(clockIn.getLatitude());
siteClockInDao.insertSelective(siteClockIn);
}
/**
* 统计打卡记录
* @param
* @return
*/
@Override
public List<ClockVo.ClockStatistics> clockStatistics(Long businessId,Long userId) {
//如果商户id不为空,则查询用户在此商户下的打卡记录,否则查询此用户所有的打卡记录
List<ClockVo.ClockStatistics> clockStatisticsList = siteClockInDao.selectClockStatistics(businessId,userId);
return clockStatisticsList;
}
}

13
ct/src/main/java/com/ccsens/ct/service/IBusinessService.java

@ -1,13 +0,0 @@
package com.ccsens.ct.service;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.vo.BusinessVo;
import com.ccsens.util.bean.dto.QueryDto;
public interface IBusinessService {
BusinessVo.BusinessInfo uploadBusiness(QueryDto<BusinessDto.BusinessInfo> params) throws Exception;
BusinessVo.BusinessInfo selectBusiness(QueryDto params);
BusinessVo.BusinessInfo updateBusiness(QueryDto<BusinessDto.UpdateBusiness> params) throws Exception;
}

14
ct/src/main/java/com/ccsens/ct/service/IClockService.java

@ -1,14 +0,0 @@
package com.ccsens.ct.service;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.dto.ClockDto;
import com.ccsens.ct.bean.vo.ClockVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.util.List;
public interface IClockService {
void clockIn(QueryDto<ClockDto.ClockIn> params);
List<ClockVo.ClockStatistics> clockStatistics(Long businessId,Long userId);
}

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

@ -1,23 +0,0 @@
package com.ccsens.ct.service;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.dto.SiteDto;
import com.ccsens.ct.bean.vo.SiteVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.io.IOException;
import java.util.List;
public interface ISiteService {
SiteVo.SiteInfoVo addSite(QueryDto<SiteDto.SiteInfoDto> params) throws IOException;
SiteVo.SiteInfo selectSiteById(Long siteId);
SiteVo.SiteInfo updateSiteInfo(QueryDto<SiteDto.UpdateSite> params);
SiteVo.SiteInfoVo selectSiteAllByBusinessId(Long businessId);
// String downloadQrCode(Long businessId);
SiteVo.SiteClockVo selectSiteInfoByClockId(Long id);
}

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

@ -1,261 +0,0 @@
package com.ccsens.ct.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 cn.hutool.core.util.ZipUtil;
import com.ccsens.ct.bean.dto.BusinessDto;
import com.ccsens.ct.bean.dto.SiteDto;
import com.ccsens.ct.bean.po.*;
import com.ccsens.ct.bean.vo.SiteVo;
import com.ccsens.ct.persist.dao.BusinessDao;
import com.ccsens.ct.persist.dao.SiteDao;
import com.ccsens.ct.persist.dao.SiteQrcodeDao;
import com.ccsens.util.CodeEnum;
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;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@Service
public class SiteService implements ISiteService {
@Autowired
private SiteDao siteDao;
@Autowired
private Snowflake snowflake;
@Autowired
private SiteQrcodeDao siteQrcodeDao;
@Autowired
private BusinessDao businessDao;
/**
* 添加场所
*
* @param params
* @return
*/
@Override
public SiteVo.SiteInfoVo addSite(QueryDto<SiteDto.SiteInfoDto> params) throws IOException {
SiteVo.SiteInfoVo siteInfoVo = new SiteVo.SiteInfoVo();
List<SiteVo.SiteInfo> siteInfos = new ArrayList<>();
SiteDto.SiteInfoDto siteInfoDto = params.getParam();
// if (CollectionUtil.isNotEmpty(siteInfoDto.getSiteInfo())){
// if(siteInfoDto.getSiteInfo().size() > 5){
// throw new BaseException(CodeEnum.SITE_EXCEED);
// }
//查找该商户下已有场所
SiteExample siteExample = new SiteExample();
siteExample.createCriteria().andBusinessIdEqualTo(siteInfoDto.getId());
List<Site> siteList = siteDao.selectByExample(siteExample);
//目前一个商户只能添加五个场所
if(CollectionUtil.isNotEmpty(siteList)) {
if (siteList.size() >= 5) {
throw new BaseException(CodeEnum.SITE_EXCEED);
}
}
//添加场所
// for (SiteDto.SiteInfo siteInfo : siteInfoDto.getSiteInfo()) {
SiteExample siteName = new SiteExample();
siteName.createCriteria().andBusinessIdEqualTo(siteInfoDto.getId()).andSiteNameEqualTo(siteInfoDto.getSiteName());
List<Site> sites = siteDao.selectByExample(siteName);
if(CollectionUtil.isNotEmpty(sites)){
throw new BaseException(CodeEnum.SITE_NAME_REPETITION);
}
Site site = new Site();
site.setId(snowflake.nextId());
site.setBusinessId(siteInfoDto.getId());
site.setSiteName(siteInfoDto.getSiteName());
site.setLongitude(siteInfoDto.getLongitude());
site.setLatitude(siteInfoDto.getLatitude());
siteDao.insertSelective(site);
String path = WebConstant.UPLOAD_PATH_BASE + "/business/" + siteInfoDto.getId() + "/siteqrcode/" + site.getSiteName();
//生成进二维码
SiteQrcode inSiteQrcode = new SiteQrcode();
inSiteQrcode.setId(snowflake.nextId());
inSiteQrcode.setSiteId(site.getId());
inSiteQrcode.setOutOrIn((byte) 0);
String inFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + inSiteQrcode.getId(), path + "/in/",0);
String bigInFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + inSiteQrcode.getId(), path + "/in/",1);
inSiteQrcode.setQrcodePath(WebConstant.TEST_URL_BASE_CT +"/business/" + siteInfoDto.getId() + "/siteqrcode/" + site.getSiteName() + "/in/" + inFileName);
inSiteQrcode.setBigQrcodePath(WebConstant.TEST_URL_BASE_CT + "/business/" + siteInfoDto.getId() + "/siteqrcode/" + site.getSiteName() + "/in" + bigInFileName);
siteQrcodeDao.insertSelective(inSiteQrcode);
//生成出二维码
SiteQrcode outSiteQrcode = new SiteQrcode();
outSiteQrcode.setId(snowflake.nextId());
outSiteQrcode.setSiteId(site.getId());
outSiteQrcode.setOutOrIn((byte) 1);
String outFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + outSiteQrcode.getId(), path + "/out/",0);
String bigOutFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + outSiteQrcode.getId(), path + "/out/",1);
outSiteQrcode.setQrcodePath(WebConstant.TEST_URL_BASE_CT +"/business/" + siteInfoDto.getId() + "/siteqrcode/" + site.getSiteName() + "/out/" + outFileName);
outSiteQrcode.setBigQrcodePath(WebConstant.TEST_URL_BASE_CT + "/business/" + siteInfoDto.getId() + "/siteqrcode/" + site.getSiteName() + "/out/" + bigOutFileName);
siteQrcodeDao.insertSelective(outSiteQrcode);
// //获取返回的场所信息
//// SiteVo.SiteInfo siteInfo1 = new SiteVo.SiteInfo();
//// siteInfo1.setId(site.getId());
//// siteInfo1.setName(site.getSiteName());
//// siteInfo1.setLongitude(site.getLongitude());
//// siteInfo1.setLatitude(site.getLatitude());
//// siteInfo1.setInQrCode(inSiteQrcode.getQrcodePath());
//// siteInfo1.setOutQrCode(outSiteQrcode.getQrcodePath());
//// siteInfos.add(siteInfo1);
// }
// }
//生成场所二维码压缩包并返回下载路径
ZipUtil.zip(WebConstant.UPLOAD_PATH_BASE + "/business/" + siteInfoDto.getId() + "/siteqrcode",WebConstant.UPLOAD_PATH_BASE + "/business/" + siteInfoDto.getId() + "/QrCode.zip");
//查找商户信息
// Business business = businessDao.selectByPrimaryKey(siteInfoDto.getId());
// siteInfoVo.setBusinessId(business.getId());
// siteInfoVo.setBusinessName(business.getName());
// siteInfoVo.setSite(siteInfos);
// siteInfoVo.setDownloadPath(WebConstant.TEST_URL_BASE_CT + "/business/" + siteInfoDto.getId() + "/QrCode.zip");
// siteInfoVo.setPath("http://test.tall.wiki/ct-dev/sign-history");
siteInfoVo = selectSiteAllByBusinessId(siteInfoDto.getId());
return siteInfoVo;
}
/**
* 通过id查找场所信息
*
* @param siteId
* @return
*/
@Override
public SiteVo.SiteInfo selectSiteById(Long siteId) {
SiteVo.SiteInfo siteInfo = new SiteVo.SiteInfo();
String inQrCode = "";
String outQrCode = "";
Site site = siteDao.selectByPrimaryKey(siteId);
if (ObjectUtil.isNotNull(site)) {
//进二维码
SiteQrcodeExample inQrcodeExample = new SiteQrcodeExample();
inQrcodeExample.createCriteria().andSiteIdEqualTo(site.getId()).andOutOrInEqualTo((byte) 0);
List<SiteQrcode> inQrcodeList = siteQrcodeDao.selectByExample(inQrcodeExample);
if (CollectionUtil.isNotEmpty(inQrcodeList)) {
inQrCode = inQrcodeList.get(0).getQrcodePath();
}
//进二维码
SiteQrcodeExample outQrcodeExample = new SiteQrcodeExample();
outQrcodeExample.createCriteria().andSiteIdEqualTo(site.getId());
List<SiteQrcode> outQrcodeList = siteQrcodeDao.selectByExample(outQrcodeExample);
if (CollectionUtil.isNotEmpty(outQrcodeList)) {
outQrCode = outQrcodeList.get(0).getQrcodePath();
}
}
siteInfo.setId(site.getId());
siteInfo.setName(site.getSiteName());
siteInfo.setLongitude(site.getLongitude());
siteInfo.setLatitude(site.getLatitude());
siteInfo.setInQrCode(inQrCode);
siteInfo.setOutQrCode(outQrCode);
return siteInfo;
}
/**
* 修改场所的信息
*
* @param params
* @return
*/
@Override
public SiteVo.SiteInfo updateSiteInfo(QueryDto<SiteDto.UpdateSite> params) {
SiteDto.UpdateSite updateSite = params.getParam();
//查找场所信息
Site site = siteDao.selectByPrimaryKey(updateSite.getId());
if (ObjectUtil.isNull(site)) {
throw new BaseException(CodeEnum.NOT_SITE);
}
//修改场所信息
if (StrUtil.isNotEmpty(updateSite.getSiteName())) {
SiteExample siteName = new SiteExample();
siteName.createCriteria().andBusinessIdEqualTo(updateSite.getId()).andSiteNameEqualTo(updateSite.getSiteName());
List<Site> sites = siteDao.selectByExample(siteName);
if(CollectionUtil.isNotEmpty(sites)){
throw new BaseException(CodeEnum.SITE_NAME_REPETITION);
}
site.setSiteName(updateSite.getSiteName());
}
if (ObjectUtil.isNotNull(updateSite.getLongitude())) {
site.setLongitude(updateSite.getLongitude());
}
if (ObjectUtil.isNotNull(updateSite.getLatitude())) {
site.setLongitude(updateSite.getLatitude());
}
siteDao.updateByPrimaryKeySelective(site);
//获取返回值
SiteVo.SiteInfo siteInfo = selectSiteById(site.getId());
return siteInfo;
}
/**
* 通过商户id查询所有的场所信息
*
* @param businessId
* @return
*/
@Override
public SiteVo.SiteInfoVo selectSiteAllByBusinessId(Long businessId) {
SiteVo.SiteInfoVo siteInfoVo = new SiteVo.SiteInfoVo();
//获取商户信息
Business business = businessDao.selectByPrimaryKey(businessId);
if (ObjectUtil.isNull(business)) {
throw new BaseException(CodeEnum.NOT_BUSINESS);
}
siteInfoVo.setBusinessId(business.getId());
siteInfoVo.setBusinessName(business.getName());
//TODO
siteInfoVo.setPath("http://test.tall.wiki/ct-dev/sign-history?id="+business.getId());
siteInfoVo.setDownloadPath(WebConstant.TEST_URL_BASE_CT + "/business/" + business.getId() + "/QrCode.zip");
//获取场所信息
List<SiteVo.SiteInfo> siteInfoList = new ArrayList<>();
SiteExample siteExample = new SiteExample();
siteExample.createCriteria().andBusinessIdEqualTo(business.getId());
List<Site> siteList = siteDao.selectByExample(siteExample);
if (CollectionUtil.isNotEmpty(siteList)) {
for (Site site : siteList) {
SiteVo.SiteInfo siteInfo = selectSiteById(site.getId());
siteInfoList.add(siteInfo);
}
}
siteInfoVo.setSite(siteInfoList);
return siteInfoVo;
}
/**
* 通过扫码获取的场所进出id获取场所和商户的信息
* @param id
* @return
*/
@Override
public SiteVo.SiteClockVo selectSiteInfoByClockId(Long id) {
SiteVo.SiteClockVo siteClockVo = siteDao.selectSiteInfoByClockId(id);
return siteClockVo;
}
// /**
// * 下载商户下的所有场所的二维码
// * @param businessId
// * @return
// */
// @Override
// public String downloadQrCode(Long businessId) {
// return null;
// }
}

30
ct/src/main/resources/application-common.yml

@ -1,30 +0,0 @@
logging:
level:
com:
favorites: DEBUG
org:
hibernate: ERROR
springframework:
web: DEBUG
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath*:mapper_*/*.xml
type-aliases-package: com.ccsens.mtpro.bean
#server:
# tomcat:
# uri-encoding: UTF-8
spring:
http:
encoding:
charset: UTF-8
enabled: true
force: true
log-request-details: true
servlet:
multipart:
max-file-size: 10MB
max-request-size: 100MB
snowflake:
datacenterId: 1
workerId: 1

29
ct/src/main/resources/application-dev.yml

@ -1,29 +0,0 @@
server:
port: 7090
servlet:
context-path:
spring:
application:
name: ct
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 49.233.89.188
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true

32
ct/src/main/resources/application-test.yml

@ -1,32 +0,0 @@
server:
port: 7090
servlet:
context-path:
spring:
application:
name: ct
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
# host: api.ccsens.com
host: 127.0.0.1
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
eureka:
instance:
ip-address: 192.168.0.99

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save