12 changed files with 1589 additions and 0 deletions
@ -0,0 +1,68 @@ |
|||
package com.ccsens.common.bean.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
@Data |
|||
public class CClockingInDto { |
|||
|
|||
@Data |
|||
@ApiModel("查询考勤信息") |
|||
public static class QueryClockingIn{ |
|||
@NotNull(message = "请选择项目信息") |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@ApiModelProperty("开始时间") |
|||
private Long startTime; |
|||
@ApiModelProperty("结束时间") |
|||
private Long endTime; |
|||
@ApiModelProperty("成员id数组") |
|||
private List<Long> memberIdList; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("进行打卡") |
|||
public static class PunchTheClock{ |
|||
@ApiModelProperty("记录id(没有则不传)") |
|||
private Long id; |
|||
@ApiModelProperty("打卡时间") |
|||
private Long dateTime; |
|||
@ApiModelProperty("考勤信息中的成员id") |
|||
private Long memberId; |
|||
@ApiModelProperty("审核员id") |
|||
private Long checkerId; |
|||
@ApiModelProperty("打卡类型(0-早,1-晚)") |
|||
private Byte clockType; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("检查人审核打卡") |
|||
public static class Audit{ |
|||
@ApiModelProperty("打卡记录id") |
|||
private Long id; |
|||
@ApiModelProperty("审批类型(0-修改,1-驳回)") |
|||
private Byte type; |
|||
@ApiModelProperty("早打卡时间") |
|||
private Long morning; |
|||
@ApiModelProperty("晚打卡时间") |
|||
private Long night; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("导出打卡记录") |
|||
public static class ExportRecord{ |
|||
@ApiModelProperty("开始时间") |
|||
private Long startTime; |
|||
@ApiModelProperty("结束时间") |
|||
private Long endTime; |
|||
@ApiModelProperty("成员id数组") |
|||
private List<Long> memberIdList; |
|||
} |
|||
} |
@ -0,0 +1,128 @@ |
|||
package com.ccsens.common.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class ProClockingIn implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long memberId; |
|||
|
|||
private Long checkerId; |
|||
|
|||
private Long morning; |
|||
|
|||
private Byte morningStatus; |
|||
|
|||
private Long night; |
|||
|
|||
private Byte nightStatus; |
|||
|
|||
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 getMemberId() { |
|||
return memberId; |
|||
} |
|||
|
|||
public void setMemberId(Long memberId) { |
|||
this.memberId = memberId; |
|||
} |
|||
|
|||
public Long getCheckerId() { |
|||
return checkerId; |
|||
} |
|||
|
|||
public void setCheckerId(Long checkerId) { |
|||
this.checkerId = checkerId; |
|||
} |
|||
|
|||
public Long getMorning() { |
|||
return morning; |
|||
} |
|||
|
|||
public void setMorning(Long morning) { |
|||
this.morning = morning; |
|||
} |
|||
|
|||
public Byte getMorningStatus() { |
|||
return morningStatus; |
|||
} |
|||
|
|||
public void setMorningStatus(Byte morningStatus) { |
|||
this.morningStatus = morningStatus; |
|||
} |
|||
|
|||
public Long getNight() { |
|||
return night; |
|||
} |
|||
|
|||
public void setNight(Long night) { |
|||
this.night = night; |
|||
} |
|||
|
|||
public Byte getNightStatus() { |
|||
return nightStatus; |
|||
} |
|||
|
|||
public void setNightStatus(Byte nightStatus) { |
|||
this.nightStatus = nightStatus; |
|||
} |
|||
|
|||
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(", memberId=").append(memberId); |
|||
sb.append(", checkerId=").append(checkerId); |
|||
sb.append(", morning=").append(morning); |
|||
sb.append(", morningStatus=").append(morningStatus); |
|||
sb.append(", night=").append(night); |
|||
sb.append(", nightStatus=").append(nightStatus); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,801 @@ |
|||
package com.ccsens.common.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class ProClockingInExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public ProClockingInExample() { |
|||
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 andMemberIdIsNull() { |
|||
addCriterion("member_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdIsNotNull() { |
|||
addCriterion("member_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdEqualTo(Long value) { |
|||
addCriterion("member_id =", value, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdNotEqualTo(Long value) { |
|||
addCriterion("member_id <>", value, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdGreaterThan(Long value) { |
|||
addCriterion("member_id >", value, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("member_id >=", value, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdLessThan(Long value) { |
|||
addCriterion("member_id <", value, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("member_id <=", value, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdIn(List<Long> values) { |
|||
addCriterion("member_id in", values, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdNotIn(List<Long> values) { |
|||
addCriterion("member_id not in", values, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdBetween(Long value1, Long value2) { |
|||
addCriterion("member_id between", value1, value2, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMemberIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("member_id not between", value1, value2, "memberId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdIsNull() { |
|||
addCriterion("checker_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdIsNotNull() { |
|||
addCriterion("checker_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdEqualTo(Long value) { |
|||
addCriterion("checker_id =", value, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdNotEqualTo(Long value) { |
|||
addCriterion("checker_id <>", value, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdGreaterThan(Long value) { |
|||
addCriterion("checker_id >", value, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("checker_id >=", value, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdLessThan(Long value) { |
|||
addCriterion("checker_id <", value, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("checker_id <=", value, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdIn(List<Long> values) { |
|||
addCriterion("checker_id in", values, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdNotIn(List<Long> values) { |
|||
addCriterion("checker_id not in", values, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdBetween(Long value1, Long value2) { |
|||
addCriterion("checker_id between", value1, value2, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCheckerIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("checker_id not between", value1, value2, "checkerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningIsNull() { |
|||
addCriterion("morning is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningIsNotNull() { |
|||
addCriterion("morning is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningEqualTo(Long value) { |
|||
addCriterion("morning =", value, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningNotEqualTo(Long value) { |
|||
addCriterion("morning <>", value, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningGreaterThan(Long value) { |
|||
addCriterion("morning >", value, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("morning >=", value, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningLessThan(Long value) { |
|||
addCriterion("morning <", value, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningLessThanOrEqualTo(Long value) { |
|||
addCriterion("morning <=", value, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningIn(List<Long> values) { |
|||
addCriterion("morning in", values, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningNotIn(List<Long> values) { |
|||
addCriterion("morning not in", values, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningBetween(Long value1, Long value2) { |
|||
addCriterion("morning between", value1, value2, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningNotBetween(Long value1, Long value2) { |
|||
addCriterion("morning not between", value1, value2, "morning"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusIsNull() { |
|||
addCriterion("morning_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusIsNotNull() { |
|||
addCriterion("morning_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusEqualTo(Byte value) { |
|||
addCriterion("morning_status =", value, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusNotEqualTo(Byte value) { |
|||
addCriterion("morning_status <>", value, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusGreaterThan(Byte value) { |
|||
addCriterion("morning_status >", value, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("morning_status >=", value, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusLessThan(Byte value) { |
|||
addCriterion("morning_status <", value, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("morning_status <=", value, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusIn(List<Byte> values) { |
|||
addCriterion("morning_status in", values, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusNotIn(List<Byte> values) { |
|||
addCriterion("morning_status not in", values, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("morning_status between", value1, value2, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("morning_status not between", value1, value2, "morningStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightIsNull() { |
|||
addCriterion("night is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightIsNotNull() { |
|||
addCriterion("night is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightEqualTo(Long value) { |
|||
addCriterion("night =", value, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightNotEqualTo(Long value) { |
|||
addCriterion("night <>", value, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightGreaterThan(Long value) { |
|||
addCriterion("night >", value, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("night >=", value, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightLessThan(Long value) { |
|||
addCriterion("night <", value, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightLessThanOrEqualTo(Long value) { |
|||
addCriterion("night <=", value, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightIn(List<Long> values) { |
|||
addCriterion("night in", values, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightNotIn(List<Long> values) { |
|||
addCriterion("night not in", values, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightBetween(Long value1, Long value2) { |
|||
addCriterion("night between", value1, value2, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightNotBetween(Long value1, Long value2) { |
|||
addCriterion("night not between", value1, value2, "night"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusIsNull() { |
|||
addCriterion("night_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusIsNotNull() { |
|||
addCriterion("night_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusEqualTo(Byte value) { |
|||
addCriterion("night_status =", value, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusNotEqualTo(Byte value) { |
|||
addCriterion("night_status <>", value, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusGreaterThan(Byte value) { |
|||
addCriterion("night_status >", value, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("night_status >=", value, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusLessThan(Byte value) { |
|||
addCriterion("night_status <", value, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("night_status <=", value, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusIn(List<Byte> values) { |
|||
addCriterion("night_status in", values, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusNotIn(List<Byte> values) { |
|||
addCriterion("night_status not in", values, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("night_status between", value1, value2, "nightStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("night_status not between", value1, value2, "nightStatus"); |
|||
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); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.ccsens.common.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class CClockingInVo { |
|||
|
|||
@Data |
|||
@ApiModel("考勤信息") |
|||
public static class ClockingInInfo{ |
|||
@ApiModelProperty("时间") |
|||
private String dateTime; |
|||
@ApiModelProperty("打卡记录") |
|||
private List<ClockRecord> recordList = new ArrayList<>(); |
|||
} |
|||
@Data |
|||
@ApiModel("打卡记录") |
|||
public static class ClockRecord{ |
|||
@ApiModelProperty("记录id") |
|||
private Long id; |
|||
@ApiModelProperty("成员id") |
|||
private Long memberId; |
|||
@ApiModelProperty("成员名称") |
|||
private String memberName; |
|||
@ApiModelProperty("早打卡时间") |
|||
private Long morning; |
|||
@ApiModelProperty("早打卡状态") |
|||
private Byte morningStatus; |
|||
@ApiModelProperty("晚打卡时间") |
|||
private Long night; |
|||
@ApiModelProperty("晚打卡状态") |
|||
private Byte nightStatus; |
|||
@ApiModelProperty("检查人id") |
|||
private Long checkerId; |
|||
@ApiModelProperty("检查人名字") |
|||
private String checkerName; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("excel路径") |
|||
public static class ExcelUrl{ |
|||
@ApiModelProperty("文件路径") |
|||
private String url; |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.ccsens.common.persist.dao; |
|||
|
|||
import com.ccsens.common.bean.vo.CClockingInVo; |
|||
import com.ccsens.common.persist.mapper.ProClockingInMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
@Repository |
|||
public interface ProClockingInDao extends ProClockingInMapper { |
|||
|
|||
/** |
|||
* 查询成员打卡记录 |
|||
* @param memberIdList 成员id列表 |
|||
* @return 打卡记录列表 |
|||
*/ |
|||
List<CClockingInVo.ClockRecord> queryByMemberId(@Param("memberIdList") List<Long> memberIdList); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.common.persist.mapper; |
|||
|
|||
import com.ccsens.common.bean.po.ProClockingIn; |
|||
import com.ccsens.common.bean.po.ProClockingInExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface ProClockingInMapper { |
|||
long countByExample(ProClockingInExample example); |
|||
|
|||
int deleteByExample(ProClockingInExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(ProClockingIn record); |
|||
|
|||
int insertSelective(ProClockingIn record); |
|||
|
|||
List<ProClockingIn> selectByExample(ProClockingInExample example); |
|||
|
|||
ProClockingIn selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") ProClockingIn record, @Param("example") ProClockingInExample example); |
|||
|
|||
int updateByExample(@Param("record") ProClockingIn record, @Param("example") ProClockingInExample example); |
|||
|
|||
int updateByPrimaryKeySelective(ProClockingIn record); |
|||
|
|||
int updateByPrimaryKey(ProClockingIn record); |
|||
} |
@ -0,0 +1,106 @@ |
|||
package com.ccsens.common.service; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import com.ccsens.common.bean.dto.CClockingInDto; |
|||
import com.ccsens.common.bean.po.ProClockingIn; |
|||
import com.ccsens.common.bean.po.ProMember; |
|||
import com.ccsens.common.bean.vo.CClockingInVo; |
|||
import com.ccsens.common.persist.dao.ProClockingInDao; |
|||
import com.ccsens.common.persist.dao.ProMemberDao; |
|||
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.text.SimpleDateFormat; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
|||
public class ClockingInService implements IClockingInService { |
|||
|
|||
@Resource |
|||
private ProMemberDao memberDao; |
|||
@Resource |
|||
private ProClockingInDao clockingInDao; |
|||
|
|||
@Override |
|||
public List<CClockingInVo.ClockingInInfo> queryClockingIn(CClockingInDto.QueryClockingIn params, Long userId) { |
|||
//创建时间
|
|||
List<CClockingInVo.ClockingInInfo> list = new ArrayList<>(); |
|||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|||
Date startTimeParam = new Date(params.getStartTime()); |
|||
Date endTimeParam = new Date(params.getEndTime()); |
|||
long dayDifference = DateUtil.betweenDay(startTimeParam, endTimeParam, false)+1; |
|||
GregorianCalendar calendar = new GregorianCalendar(); |
|||
calendar.setTime(startTimeParam); |
|||
CClockingInVo.ClockingInInfo start = new CClockingInVo.ClockingInInfo(); |
|||
start.setDateTime(format.format(startTimeParam)); |
|||
list.add(start); |
|||
for (long i = 1; i < dayDifference; i++) { |
|||
calendar.add(Calendar.DATE,1); |
|||
Date time = calendar.getTime(); |
|||
CClockingInVo.ClockingInInfo clockingInInfo = new CClockingInVo.ClockingInInfo(); |
|||
clockingInInfo.setDateTime(format.format(time)); |
|||
list.add(clockingInInfo); |
|||
} |
|||
CClockingInVo.ClockingInInfo end = new CClockingInVo.ClockingInInfo(); |
|||
end.setDateTime(format.format(endTimeParam)); |
|||
list.add(end); |
|||
|
|||
//添加成员信息
|
|||
List<Long> memberIdList = new ArrayList<>(); |
|||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
|||
memberIdList.add(userOfMemberId); |
|||
ProMember member = memberDao.selectByPrimaryKey(userOfMemberId); |
|||
List<CClockingInVo.ClockRecord> clockRecordList = memberDao.queryMembersOfClock(params.getProjectId(),userOfMemberId); |
|||
memberIdList.addAll(clockRecordList.stream().map(CClockingInVo.ClockRecord::getMemberId).collect(Collectors.toList())); |
|||
for (CClockingInVo.ClockingInInfo clockingInInfo : list) { |
|||
CClockingInVo.ClockRecord clockRecord = new CClockingInVo.ClockRecord(); |
|||
clockRecord.setMemberId(member.getId()); |
|||
clockRecord.setMemberName(member.getName()); |
|||
clockingInInfo.getRecordList().add(clockRecord); |
|||
clockingInInfo.getRecordList().addAll(clockRecordList); |
|||
} |
|||
List<CClockingInVo.ClockingInInfo> newList = list.stream().distinct().collect(Collectors.toList()); |
|||
|
|||
//查询所有成员打卡记录
|
|||
List<CClockingInVo.ClockRecord> clockRecords = clockingInDao.queryByMemberId(memberIdList); |
|||
if(CollectionUtil.isNotEmpty(clockRecords)) { |
|||
for (CClockingInVo.ClockRecord clockRecord : clockRecords) { |
|||
String morning = format.format(new Date(clockRecord.getMorning())); |
|||
for (CClockingInVo.ClockingInInfo clockingInInfo : newList) { |
|||
if (clockingInInfo.getDateTime().equals(morning)) { |
|||
for (CClockingInVo.ClockRecord record : clockingInInfo.getRecordList()) { |
|||
if (clockRecord.getMemberId().equals(record.getMemberId())){ |
|||
BeanUtil.copyProperties(clockRecord,record); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return newList; |
|||
} |
|||
|
|||
@Override |
|||
public void punchTheClock(CClockingInDto.PunchTheClock params, Long userId) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void auditRecord(CClockingInDto.Audit params, Long userId) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public CClockingInVo.ExcelUrl exportRecord(CClockingInDto.ExportRecord params, Long userId) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.ccsens.common.service; |
|||
|
|||
import com.ccsens.common.bean.dto.CClockingInDto; |
|||
import com.ccsens.common.bean.vo.CClockingInVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
public interface IClockingInService { |
|||
|
|||
/** |
|||
* 查询考勤信息 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
* @return 考勤信息 |
|||
*/ |
|||
List<CClockingInVo.ClockingInInfo> queryClockingIn(CClockingInDto.QueryClockingIn params,Long userId); |
|||
|
|||
/** |
|||
* 打卡 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
*/ |
|||
void punchTheClock(CClockingInDto.PunchTheClock params,Long userId); |
|||
|
|||
/** |
|||
* 审核打卡时间 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
*/ |
|||
void auditRecord(CClockingInDto.Audit params,Long userId); |
|||
|
|||
/** |
|||
* 导出考勤记录 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
* @return excel的路径 |
|||
*/ |
|||
CClockingInVo.ExcelUrl exportRecord(CClockingInDto.ExportRecord params,Long userId); |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?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.common.persist.dao.ProClockingInDao"> |
|||
|
|||
<select id="queryByMemberId" resultType="com.ccsens.common.bean.vo.CClockingInVo$ClockRecord"> |
|||
SELECT |
|||
c.id AS id, |
|||
c.member_id, |
|||
m.`name` AS memberName, |
|||
c.checker_id, |
|||
m2.`name` AS checkerName, |
|||
c.morning, |
|||
c.morning_status, |
|||
c.night, |
|||
c.night_status |
|||
FROM |
|||
t_pro_clocking_in AS c |
|||
LEFT JOIN t_pro_member AS m ON m.id = c.member_id |
|||
LEFT JOIN t_pro_member AS m2 ON m2.id = c.checker_id |
|||
WHERE |
|||
c.rec_status = 0 |
|||
AND member_id IN |
|||
<foreach collection="memberIdList" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,291 @@ |
|||
<?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.common.persist.mapper.ProClockingInMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.common.bean.po.ProClockingIn"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="member_id" jdbcType="BIGINT" property="memberId" /> |
|||
<result column="checker_id" jdbcType="BIGINT" property="checkerId" /> |
|||
<result column="morning" jdbcType="BIGINT" property="morning" /> |
|||
<result column="morning_status" jdbcType="TINYINT" property="morningStatus" /> |
|||
<result column="night" jdbcType="BIGINT" property="night" /> |
|||
<result column="night_status" jdbcType="TINYINT" property="nightStatus" /> |
|||
<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, member_id, checker_id, morning, morning_status, night, night_status, created_at, |
|||
updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.common.bean.po.ProClockingInExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_pro_clocking_in |
|||
<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_pro_clocking_in |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_pro_clocking_in |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.common.bean.po.ProClockingInExample"> |
|||
delete from t_pro_clocking_in |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.common.bean.po.ProClockingIn"> |
|||
insert into t_pro_clocking_in (id, member_id, checker_id, |
|||
morning, morning_status, night, |
|||
night_status, created_at, updated_at, |
|||
rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{checkerId,jdbcType=BIGINT}, |
|||
#{morning,jdbcType=BIGINT}, #{morningStatus,jdbcType=TINYINT}, #{night,jdbcType=BIGINT}, |
|||
#{nightStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.common.bean.po.ProClockingIn"> |
|||
insert into t_pro_clocking_in |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="memberId != null"> |
|||
member_id, |
|||
</if> |
|||
<if test="checkerId != null"> |
|||
checker_id, |
|||
</if> |
|||
<if test="morning != null"> |
|||
morning, |
|||
</if> |
|||
<if test="morningStatus != null"> |
|||
morning_status, |
|||
</if> |
|||
<if test="night != null"> |
|||
night, |
|||
</if> |
|||
<if test="nightStatus != null"> |
|||
night_status, |
|||
</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="memberId != null"> |
|||
#{memberId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="checkerId != null"> |
|||
#{checkerId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="morning != null"> |
|||
#{morning,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="morningStatus != null"> |
|||
#{morningStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="night != null"> |
|||
#{night,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="nightStatus != null"> |
|||
#{nightStatus,jdbcType=TINYINT}, |
|||
</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.common.bean.po.ProClockingInExample" resultType="java.lang.Long"> |
|||
select count(*) from t_pro_clocking_in |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_pro_clocking_in |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.memberId != null"> |
|||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.checkerId != null"> |
|||
checker_id = #{record.checkerId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.morning != null"> |
|||
morning = #{record.morning,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.morningStatus != null"> |
|||
morning_status = #{record.morningStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.night != null"> |
|||
night = #{record.night,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.nightStatus != null"> |
|||
night_status = #{record.nightStatus,jdbcType=TINYINT}, |
|||
</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_pro_clocking_in |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|||
checker_id = #{record.checkerId,jdbcType=BIGINT}, |
|||
morning = #{record.morning,jdbcType=BIGINT}, |
|||
morning_status = #{record.morningStatus,jdbcType=TINYINT}, |
|||
night = #{record.night,jdbcType=BIGINT}, |
|||
night_status = #{record.nightStatus,jdbcType=TINYINT}, |
|||
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.common.bean.po.ProClockingIn"> |
|||
update t_pro_clocking_in |
|||
<set> |
|||
<if test="memberId != null"> |
|||
member_id = #{memberId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="checkerId != null"> |
|||
checker_id = #{checkerId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="morning != null"> |
|||
morning = #{morning,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="morningStatus != null"> |
|||
morning_status = #{morningStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="night != null"> |
|||
night = #{night,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="nightStatus != null"> |
|||
night_status = #{nightStatus,jdbcType=TINYINT}, |
|||
</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.common.bean.po.ProClockingIn"> |
|||
update t_pro_clocking_in |
|||
set member_id = #{memberId,jdbcType=BIGINT}, |
|||
checker_id = #{checkerId,jdbcType=BIGINT}, |
|||
morning = #{morning,jdbcType=BIGINT}, |
|||
morning_status = #{morningStatus,jdbcType=TINYINT}, |
|||
night = #{night,jdbcType=BIGINT}, |
|||
night_status = #{nightStatus,jdbcType=TINYINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue