28 changed files with 3963 additions and 18 deletions
@ -0,0 +1,78 @@ |
|||
package com.ccsens.ptccsens.api; |
|||
|
|||
import com.ccsens.ptccsens.annotation.MustLogin; |
|||
import com.ccsens.ptccsens.bean.dto.ClockingInDto; |
|||
import com.ccsens.ptccsens.bean.vo.ClockingInVo; |
|||
import com.ccsens.ptccsens.service.IClockingInService; |
|||
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 AUSU |
|||
*/ |
|||
@Api(tags = "考勤相关") |
|||
@RestController |
|||
@RequestMapping("/clock") |
|||
@Slf4j |
|||
public class ClockingInController { |
|||
|
|||
@Resource |
|||
private IClockingInService clockingInService; |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "查询考勤信息", notes = "") |
|||
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<ClockingInVo.ClockingInInfo>> queryDeliverOfTask(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.QueryClockingIn> params) throws Exception{ |
|||
log.info("查询打卡信息:{}",params); |
|||
List<ClockingInVo.ClockingInInfo> clockingInInfos = clockingInService.queryClockingIn(params.getParam(), params.getUserId()); |
|||
log.info("查询-打卡信息成功"); |
|||
return JsonResponse.newInstance().ok(clockingInInfos); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "打卡", notes = "") |
|||
@RequestMapping(value = "/punch", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse punchTheClock(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.PunchTheClock> params) throws Exception{ |
|||
log.info("打卡:{}",params); |
|||
clockingInService.punchTheClock(params.getParam(), params.getUserId()); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "审核打卡", notes = "") |
|||
@RequestMapping(value = "/audit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse auditRecord(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.Audit> params) throws Exception{ |
|||
log.info("审核打卡:{}",params); |
|||
// clockingInService.auditRecord(params.getParam(), params.getUserId());
|
|||
clockingInService.auditRecord1(params.getParam(), params.getUserId()); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "导出考勤excel", notes = "") |
|||
@RequestMapping(value = "/export", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<ClockingInVo.ExcelUrl> export(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.QueryClockingIn> params) throws Exception{ |
|||
ClockingInVo.ExcelUrl excelUrl = clockingInService.exportRecord(params.getParam(), params.getUserId()); |
|||
return JsonResponse.newInstance().ok(excelUrl); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "导出考勤excel", notes = "") |
|||
@RequestMapping(value = "/export1", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<ClockingInVo.ExcelUrl> export1(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.QueryClockingIn> params) throws Exception{ |
|||
ClockingInVo.ExcelUrl excelUrl = clockingInService.exportRecord1(params.getParam(), params.getUserId()); |
|||
return JsonResponse.newInstance().ok(excelUrl); |
|||
} |
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.ccsens.ptccsens.bean.dto; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
@Data |
|||
public class ClockingInDto { |
|||
|
|||
@Data |
|||
@ApiModel("查询考勤信息") |
|||
public static class QueryClockingIn{ |
|||
@NotNull(message = "请选择项目信息") |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@ApiModelProperty("开始时间") |
|||
private Long startTime; |
|||
@ApiModelProperty("结束时间") |
|||
private Long endTime; |
|||
@ApiModelProperty("打卡角色") |
|||
private Long roleId; |
|||
@ApiModelProperty("成员id数组") |
|||
private List<Long> memberIdList; |
|||
|
|||
public Long getStartTime() { |
|||
if(startTime.equals(endTime)){ |
|||
Date date = new Date(startTime); |
|||
return DateUtil.beginOfDay(date).getTime(); |
|||
} |
|||
return startTime; |
|||
} |
|||
|
|||
public Long getEndTime() { |
|||
if(startTime.equals(endTime)){ |
|||
Date date = new Date(endTime); |
|||
return DateUtil.endOfDay(date).getTime(); |
|||
} |
|||
return endTime; |
|||
} |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("进行打卡") |
|||
public static class PunchTheClock{ |
|||
@ApiModelProperty("记录id(没有则不传)") |
|||
private Long id; |
|||
@NotNull(message = "打卡时间不能为空") |
|||
@ApiModelProperty("打卡日期") |
|||
private Long dateTime; |
|||
@ApiModelProperty("打卡原因") |
|||
private String remark; |
|||
@NotNull(message = "成员id不能为空") |
|||
@ApiModelProperty("考勤信息中的成员id") |
|||
private Long memberId; |
|||
@NotNull(message = "审核员id不能为空") |
|||
@ApiModelProperty("审核员id") |
|||
private Long checkerId; |
|||
@ApiModelProperty("打卡类型(0-早,1-晚)") |
|||
private Byte clockType; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("检查人审核打卡") |
|||
public static class Audit{ |
|||
// @NotNull(message = "打卡信息错误")
|
|||
@ApiModelProperty("打卡记录id") |
|||
private Long id; |
|||
@NotNull(message = "项目信息错误") |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@ApiModelProperty("成员id") |
|||
private Long memberId; |
|||
@ApiModelProperty("审批类型(0-修改,1-驳回,2审核通过)") |
|||
private Byte type; |
|||
@ApiModelProperty("早打卡时间") |
|||
private Long morning; |
|||
@ApiModelProperty("晚打卡时间") |
|||
private Long night; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("导出打卡记录") |
|||
public static class ExportRecord{ |
|||
@NotNull(message = "项目信息错误") |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@ApiModelProperty("开始时间") |
|||
private Long startTime; |
|||
@ApiModelProperty("结束时间") |
|||
private Long endTime; |
|||
@ApiModelProperty("成员id数组") |
|||
private List<Long> memberIdList; |
|||
} |
|||
} |
@ -0,0 +1,150 @@ |
|||
package com.ccsens.ptccsens.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class PluClockingIn 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 String morningRemark; |
|||
|
|||
private String nightRemark; |
|||
|
|||
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; |
|||
} |
|||
|
|||
public String getMorningRemark() { |
|||
return morningRemark; |
|||
} |
|||
|
|||
public void setMorningRemark(String morningRemark) { |
|||
this.morningRemark = morningRemark == null ? null : morningRemark.trim(); |
|||
} |
|||
|
|||
public String getNightRemark() { |
|||
return nightRemark; |
|||
} |
|||
|
|||
public void setNightRemark(String nightRemark) { |
|||
this.nightRemark = nightRemark == null ? null : nightRemark.trim(); |
|||
} |
|||
|
|||
@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(", morningRemark=").append(morningRemark); |
|||
sb.append(", nightRemark=").append(nightRemark); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,941 @@ |
|||
package com.ccsens.ptccsens.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class PluClockingInExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public PluClockingInExample() { |
|||
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 Criteria andMorningRemarkIsNull() { |
|||
addCriterion("morning_remark is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkIsNotNull() { |
|||
addCriterion("morning_remark is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkEqualTo(String value) { |
|||
addCriterion("morning_remark =", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkNotEqualTo(String value) { |
|||
addCriterion("morning_remark <>", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkGreaterThan(String value) { |
|||
addCriterion("morning_remark >", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkGreaterThanOrEqualTo(String value) { |
|||
addCriterion("morning_remark >=", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkLessThan(String value) { |
|||
addCriterion("morning_remark <", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkLessThanOrEqualTo(String value) { |
|||
addCriterion("morning_remark <=", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkLike(String value) { |
|||
addCriterion("morning_remark like", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkNotLike(String value) { |
|||
addCriterion("morning_remark not like", value, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkIn(List<String> values) { |
|||
addCriterion("morning_remark in", values, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkNotIn(List<String> values) { |
|||
addCriterion("morning_remark not in", values, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkBetween(String value1, String value2) { |
|||
addCriterion("morning_remark between", value1, value2, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMorningRemarkNotBetween(String value1, String value2) { |
|||
addCriterion("morning_remark not between", value1, value2, "morningRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkIsNull() { |
|||
addCriterion("night_remark is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkIsNotNull() { |
|||
addCriterion("night_remark is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkEqualTo(String value) { |
|||
addCriterion("night_remark =", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkNotEqualTo(String value) { |
|||
addCriterion("night_remark <>", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkGreaterThan(String value) { |
|||
addCriterion("night_remark >", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkGreaterThanOrEqualTo(String value) { |
|||
addCriterion("night_remark >=", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkLessThan(String value) { |
|||
addCriterion("night_remark <", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkLessThanOrEqualTo(String value) { |
|||
addCriterion("night_remark <=", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkLike(String value) { |
|||
addCriterion("night_remark like", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkNotLike(String value) { |
|||
addCriterion("night_remark not like", value, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkIn(List<String> values) { |
|||
addCriterion("night_remark in", values, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkNotIn(List<String> values) { |
|||
addCriterion("night_remark not in", values, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkBetween(String value1, String value2) { |
|||
addCriterion("night_remark between", value1, value2, "nightRemark"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNightRemarkNotBetween(String value1, String value2) { |
|||
addCriterion("night_remark not between", value1, value2, "nightRemark"); |
|||
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,106 @@ |
|||
package com.ccsens.ptccsens.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysHolidays implements Serializable { |
|||
private Long id; |
|||
|
|||
private String year; |
|||
|
|||
private String holiday; |
|||
|
|||
private String workday; |
|||
|
|||
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 String getYear() { |
|||
return year; |
|||
} |
|||
|
|||
public void setYear(String year) { |
|||
this.year = year == null ? null : year.trim(); |
|||
} |
|||
|
|||
public String getHoliday() { |
|||
return holiday; |
|||
} |
|||
|
|||
public void setHoliday(String holiday) { |
|||
this.holiday = holiday == null ? null : holiday.trim(); |
|||
} |
|||
|
|||
public String getWorkday() { |
|||
return workday; |
|||
} |
|||
|
|||
public void setWorkday(String workday) { |
|||
this.workday = workday == null ? null : workday.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(", year=").append(year); |
|||
sb.append(", holiday=").append(holiday); |
|||
sb.append(", workday=").append(workday); |
|||
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(); |
|||
} |
|||
} |
@ -0,0 +1,711 @@ |
|||
package com.ccsens.ptccsens.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class SysHolidaysExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public SysHolidaysExample() { |
|||
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 andYearIsNull() { |
|||
addCriterion("year is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearIsNotNull() { |
|||
addCriterion("year is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearEqualTo(String value) { |
|||
addCriterion("year =", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearNotEqualTo(String value) { |
|||
addCriterion("year <>", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearGreaterThan(String value) { |
|||
addCriterion("year >", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearGreaterThanOrEqualTo(String value) { |
|||
addCriterion("year >=", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearLessThan(String value) { |
|||
addCriterion("year <", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearLessThanOrEqualTo(String value) { |
|||
addCriterion("year <=", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearLike(String value) { |
|||
addCriterion("year like", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearNotLike(String value) { |
|||
addCriterion("year not like", value, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearIn(List<String> values) { |
|||
addCriterion("year in", values, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearNotIn(List<String> values) { |
|||
addCriterion("year not in", values, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearBetween(String value1, String value2) { |
|||
addCriterion("year between", value1, value2, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andYearNotBetween(String value1, String value2) { |
|||
addCriterion("year not between", value1, value2, "year"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayIsNull() { |
|||
addCriterion("holiday is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayIsNotNull() { |
|||
addCriterion("holiday is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayEqualTo(String value) { |
|||
addCriterion("holiday =", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayNotEqualTo(String value) { |
|||
addCriterion("holiday <>", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayGreaterThan(String value) { |
|||
addCriterion("holiday >", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayGreaterThanOrEqualTo(String value) { |
|||
addCriterion("holiday >=", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayLessThan(String value) { |
|||
addCriterion("holiday <", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayLessThanOrEqualTo(String value) { |
|||
addCriterion("holiday <=", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayLike(String value) { |
|||
addCriterion("holiday like", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayNotLike(String value) { |
|||
addCriterion("holiday not like", value, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayIn(List<String> values) { |
|||
addCriterion("holiday in", values, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayNotIn(List<String> values) { |
|||
addCriterion("holiday not in", values, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayBetween(String value1, String value2) { |
|||
addCriterion("holiday between", value1, value2, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andHolidayNotBetween(String value1, String value2) { |
|||
addCriterion("holiday not between", value1, value2, "holiday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayIsNull() { |
|||
addCriterion("workday is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayIsNotNull() { |
|||
addCriterion("workday is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayEqualTo(String value) { |
|||
addCriterion("workday =", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayNotEqualTo(String value) { |
|||
addCriterion("workday <>", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayGreaterThan(String value) { |
|||
addCriterion("workday >", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayGreaterThanOrEqualTo(String value) { |
|||
addCriterion("workday >=", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayLessThan(String value) { |
|||
addCriterion("workday <", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayLessThanOrEqualTo(String value) { |
|||
addCriterion("workday <=", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayLike(String value) { |
|||
addCriterion("workday like", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayNotLike(String value) { |
|||
addCriterion("workday not like", value, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayIn(List<String> values) { |
|||
addCriterion("workday in", values, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayNotIn(List<String> values) { |
|||
addCriterion("workday not in", values, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayBetween(String value1, String value2) { |
|||
addCriterion("workday between", value1, value2, "workday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWorkdayNotBetween(String value1, String value2) { |
|||
addCriterion("workday not between", value1, value2, "workday"); |
|||
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); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,128 @@ |
|||
package com.ccsens.ptccsens.bean.vo; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.ArrayList; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Data |
|||
public class ClockingInVo { |
|||
|
|||
@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; |
|||
@JsonIgnore |
|||
@ApiModelProperty("成员UserId") |
|||
private Long memberUserId; |
|||
@ApiModelProperty("早打卡时间") |
|||
private Long morning; |
|||
@ApiModelProperty("早打卡状态") |
|||
private Byte morningStatus; |
|||
@ApiModelProperty("早打卡原因") |
|||
private String morningRemark; |
|||
@ApiModelProperty("晚打卡时间") |
|||
private Long night; |
|||
@ApiModelProperty("晚打卡状态") |
|||
private Byte nightStatus; |
|||
@ApiModelProperty("晚打卡原因") |
|||
private String nightRemark; |
|||
@ApiModelProperty("检查人id") |
|||
private Long checkerId; |
|||
@ApiModelProperty("检查人名字") |
|||
private String checkerName; |
|||
@ApiModelProperty("上次检查人id") |
|||
private Long lastCheckerId; |
|||
@ApiModelProperty("上次检查人名字") |
|||
private String lastCheckerName; |
|||
@ApiModelProperty("打卡人不是不是我(0-否,1-是)") |
|||
private Byte isMine = 0; |
|||
@ApiModelProperty("检查人是不是我(0-否,1-是)") |
|||
private Byte isChecker = 0; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("excel路径") |
|||
public static class ExcelUrl{ |
|||
@ApiModelProperty("文件路径") |
|||
private String url; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("上一次检查人") |
|||
public static class LastChecker{ |
|||
@ApiModelProperty("上一次检查人Id") |
|||
private Long lastCheckerId; |
|||
@ApiModelProperty("上次检查人名字") |
|||
private String lastCheckerName; |
|||
} |
|||
|
|||
|
|||
@Data |
|||
public static class ClockMember{ |
|||
private Long id; |
|||
private String name; |
|||
private Map<String,RecordMember> recordMemberMap; |
|||
private List<RecordMember> recordMemberList; |
|||
|
|||
public Map<String, RecordMember> getRecordMemberMap() { |
|||
Map<String, RecordMember> map = new HashMap<>(); |
|||
if(CollectionUtil.isNotEmpty(recordMemberList)){ |
|||
recordMemberList.forEach(recordMember -> { |
|||
if(recordMember.getMorning() != 0){ |
|||
map.put(new SimpleDateFormat("yyyy-MM-dd").format(recordMember.getMorning()),recordMember); |
|||
}else if(recordMember.night != 0){ |
|||
map.put(new SimpleDateFormat("yyyy-MM-dd").format(recordMember.getMorning()),recordMember); |
|||
} |
|||
}); |
|||
} |
|||
return map; |
|||
} |
|||
} |
|||
|
|||
@Data |
|||
public static class RecordMember{ |
|||
private Long recordId; |
|||
private Long morning; |
|||
private Long night; |
|||
} |
|||
|
|||
@Data |
|||
public static class NotClockingIn{ |
|||
private String time; |
|||
private String type; |
|||
|
|||
public NotClockingIn(String time, String type) { |
|||
this.time = time; |
|||
this.type = type; |
|||
} |
|||
public NotClockingIn() { |
|||
} |
|||
} |
|||
|
|||
@Data |
|||
public static class Holidays{ |
|||
private List<String> workday; |
|||
private List<String> nonWorkday; |
|||
} |
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.ccsens.ptccsens.persist.dao; |
|||
|
|||
|
|||
import com.ccsens.ptccsens.bean.po.PluClockingIn; |
|||
import com.ccsens.ptccsens.bean.vo.ClockingInVo; |
|||
import com.ccsens.ptccsens.persist.mapper.PluClockingInMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
@Repository |
|||
public interface PluClockingInDao extends PluClockingInMapper { |
|||
|
|||
/** |
|||
* 查询成员打卡记录 |
|||
* @param memberIdList 成员id列表 |
|||
* @return 打卡记录列表 |
|||
*/ |
|||
List<ClockingInVo.ClockRecord> queryByMemberId(@Param("memberIdList") List<Long> memberIdList, @Param("startTime") Long startTime, @Param("endTime") Long endTime); |
|||
|
|||
/** |
|||
* 查询该成员今天是否有打卡记录 |
|||
* @param memberId 成员id |
|||
* @param currentTimeMillis 当前时间时间戳 |
|||
* @return 打卡记录 |
|||
*/ |
|||
PluClockingIn queryHaveData(@Param("memberId") Long memberId, @Param("time") long currentTimeMillis); |
|||
|
|||
/** |
|||
* 查询上一次打卡的检查人 |
|||
* @param memberId 打卡人id |
|||
* @return 上一次检查人的信息 |
|||
*/ |
|||
ClockingInVo.LastChecker queryLastChecker(@Param("memberId") Long memberId); |
|||
|
|||
/** |
|||
* 查询需要打卡的成员,排除当前登录用户 |
|||
* @param projectId 项目id |
|||
* @param mineId 当前登录人的成员id |
|||
* @param roleId 角色id |
|||
* @return 打卡记录 |
|||
*/ |
|||
List<ClockingInVo.ClockRecord> queryMembersOfClock(@Param("projectId") Long projectId, @Param("mineId") Long mineId, @Param("roleId") Long roleId, @Param("memberIdList") List<Long> memberIdList); |
|||
|
|||
/** |
|||
* 通过成员idList查询成员信息 |
|||
* @param memberIdList 成员idList |
|||
* @param roleId 角色id |
|||
* @return 成员信息 |
|||
*/ |
|||
List<ClockingInVo.ClockRecord> queryMemberByIdList(@Param("memberIdList") List<Long> memberIdList, @Param("roleId") Long roleId); |
|||
|
|||
/** |
|||
* 根据角色id查询成员信息,成员id为空则查询全部 |
|||
* @param memberIdList 成员id列表 |
|||
* @param roleId 角色id |
|||
* @return 返回成员信息 |
|||
*/ |
|||
List<ClockingInVo.ClockMember> queryMemberClockingIn(@Param("memberIdList") List<Long> memberIdList, @Param("roleId") Long roleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.ptccsens.persist.mapper; |
|||
|
|||
import com.ccsens.ptccsens.bean.po.PluClockingIn; |
|||
import com.ccsens.ptccsens.bean.po.PluClockingInExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface PluClockingInMapper { |
|||
long countByExample(PluClockingInExample example); |
|||
|
|||
int deleteByExample(PluClockingInExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(PluClockingIn record); |
|||
|
|||
int insertSelective(PluClockingIn record); |
|||
|
|||
List<PluClockingIn> selectByExample(PluClockingInExample example); |
|||
|
|||
PluClockingIn selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") PluClockingIn record, @Param("example") PluClockingInExample example); |
|||
|
|||
int updateByExample(@Param("record") PluClockingIn record, @Param("example") PluClockingInExample example); |
|||
|
|||
int updateByPrimaryKeySelective(PluClockingIn record); |
|||
|
|||
int updateByPrimaryKey(PluClockingIn record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.ptccsens.persist.mapper; |
|||
|
|||
import com.ccsens.ptccsens.bean.po.SysHolidays; |
|||
import com.ccsens.ptccsens.bean.po.SysHolidaysExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysHolidaysMapper { |
|||
long countByExample(SysHolidaysExample example); |
|||
|
|||
int deleteByExample(SysHolidaysExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysHolidays record); |
|||
|
|||
int insertSelective(SysHolidays record); |
|||
|
|||
List<SysHolidays> selectByExample(SysHolidaysExample example); |
|||
|
|||
SysHolidays selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysHolidays record, @Param("example") SysHolidaysExample example); |
|||
|
|||
int updateByExample(@Param("record") SysHolidays record, @Param("example") SysHolidaysExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysHolidays record); |
|||
|
|||
int updateByPrimaryKey(SysHolidays record); |
|||
} |
@ -0,0 +1,614 @@ |
|||
package com.ccsens.ptccsens.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.ptccsens.bean.dto.ClockingInDto; |
|||
import com.ccsens.ptccsens.bean.po.PluClockingIn; |
|||
import com.ccsens.ptccsens.bean.po.ProMember; |
|||
import com.ccsens.ptccsens.bean.po.SysHolidays; |
|||
import com.ccsens.ptccsens.bean.po.SysHolidaysExample; |
|||
import com.ccsens.ptccsens.bean.vo.ClockingInVo; |
|||
import com.ccsens.ptccsens.persist.dao.PluClockingInDao; |
|||
import com.ccsens.ptccsens.persist.dao.ProMemberDao; |
|||
import com.ccsens.ptccsens.persist.mapper.SysHolidaysMapper; |
|||
import com.ccsens.ptccsens.util.BasicsCodeError; |
|||
import com.ccsens.util.PoiUtil; |
|||
import com.ccsens.util.PropUtil; |
|||
import com.ccsens.util.exception.BaseException; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.poi.ss.usermodel.Workbook; |
|||
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|||
import org.springframework.core.io.DefaultResourceLoader; |
|||
import org.springframework.core.io.ResourceLoader; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.io.*; |
|||
import java.text.DateFormat; |
|||
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 PluClockingInDao pluClockingInDao; |
|||
@Resource |
|||
private Snowflake snowflake; |
|||
@Resource |
|||
private IPowerService powerService; |
|||
@Resource |
|||
private SysHolidaysMapper holidaysMapper; |
|||
|
|||
@Override |
|||
public List<ClockingInVo.ClockingInInfo> queryClockingIn(ClockingInDto.QueryClockingIn params, Long userId) { |
|||
//返回值
|
|||
List<ClockingInVo.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); |
|||
ClockingInVo.ClockingInInfo start = new ClockingInVo.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(); |
|||
ClockingInVo.ClockingInInfo clockingInInfo = new ClockingInVo.ClockingInInfo(); |
|||
clockingInInfo.setDateTime(format.format(time)); |
|||
list.add(clockingInInfo); |
|||
} |
|||
ClockingInVo.ClockingInInfo end = new ClockingInVo.ClockingInInfo(); |
|||
end.setDateTime(format.format(endTimeParam)); |
|||
list.add(end); |
|||
|
|||
//添加成员信息
|
|||
//1.查询全部
|
|||
List<Long> memberIdList = new ArrayList<>(); |
|||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
|||
List<ClockingInVo.ClockRecord> clockRecordList = pluClockingInDao.queryMembersOfClock(params.getProjectId(), userOfMemberId, params.getRoleId(),params.getMemberIdList()); |
|||
if (CollectionUtil.isEmpty(params.getMemberIdList())) { |
|||
for (ClockingInVo.ClockingInInfo clockingInInfo : list) { |
|||
for (ClockingInVo.ClockRecord record : clockRecordList) { |
|||
ClockingInVo.ClockRecord otherClockRecord = new ClockingInVo.ClockRecord(); |
|||
otherClockRecord.setMemberId(record.getMemberId()); |
|||
otherClockRecord.setMemberName(record.getMemberName()); |
|||
otherClockRecord.setMemberUserId(record.getMemberUserId()); |
|||
otherClockRecord.setIsMine(record.getIsMine()); |
|||
clockingInInfo.getRecordList().add(otherClockRecord); |
|||
//添加成员id
|
|||
memberIdList.add(record.getMemberId()); |
|||
} |
|||
} |
|||
} else { |
|||
//2.筛选成员
|
|||
if (CollectionUtil.isNotEmpty(clockRecordList)) { |
|||
for (ClockingInVo.ClockingInInfo clockingInInfo : list) { |
|||
for (ClockingInVo.ClockRecord clockRecord : clockRecordList) { |
|||
ClockingInVo.ClockRecord filterRecord = new ClockingInVo.ClockRecord(); |
|||
filterRecord.setMemberId(clockRecord.getMemberId()); |
|||
filterRecord.setMemberName(clockRecord.getMemberName()); |
|||
filterRecord.setMemberUserId(clockRecord.getMemberUserId()); |
|||
filterRecord.setIsMine(clockRecord.getIsMine()); |
|||
clockingInInfo.getRecordList().add(filterRecord); |
|||
//添加成员id
|
|||
memberIdList.add(clockRecord.getMemberId()); |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
//查询所有成员打卡记录
|
|||
if (CollectionUtil.isNotEmpty(memberIdList)) { |
|||
List<ClockingInVo.ClockRecord> clockRecords = pluClockingInDao.queryByMemberId(memberIdList,params.getStartTime(),params.getEndTime()); |
|||
for (ClockingInVo.ClockingInInfo clockingInInfo2 : list) { |
|||
for (ClockingInVo.ClockRecord record : clockRecords) { |
|||
if (format.format(new Date(record.getMorning())).equals(clockingInInfo2.getDateTime()) || format.format(new Date(record.getNight())).equals(clockingInInfo2.getDateTime())) { |
|||
for (ClockingInVo.ClockRecord clockRecord : clockingInInfo2.getRecordList()) { |
|||
if (clockRecord.getMemberId().equals(record.getMemberId())) { |
|||
|
|||
clockRecord.setId(record.getId()); |
|||
clockRecord.setMemberName(record.getMemberName()); |
|||
clockRecord.setMemberId(record.getMemberId()); |
|||
clockRecord.setCheckerName(record.getCheckerName()); |
|||
clockRecord.setCheckerId(record.getCheckerId()); |
|||
clockRecord.setMorning(record.getMorning()); |
|||
clockRecord.setMorningStatus(record.getMorningStatus()); |
|||
clockRecord.setNight(record.getNight()); |
|||
clockRecord.setNightStatus(record.getNightStatus()); |
|||
if (ObjectUtil.isNotNull(userOfMemberId)) { |
|||
if (record.getCheckerId().equals(userOfMemberId)) { |
|||
clockRecord.setIsChecker((byte) 1); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
List<ClockingInVo.ClockingInInfo> collect = list.stream().distinct().collect(Collectors.toList()); |
|||
//查询上次检查人
|
|||
for (ClockingInVo.ClockingInInfo clockingInInfo : collect) { |
|||
if (clockingInInfo.getDateTime().equals(format.format(new Date(System.currentTimeMillis())))) { |
|||
for (ClockingInVo.ClockRecord clockRecord : clockingInInfo.getRecordList()) { |
|||
ClockingInVo.LastChecker lastChecker = pluClockingInDao.queryLastChecker(clockRecord.getMemberId()); |
|||
if (ObjectUtil.isNotNull(lastChecker)) { |
|||
clockRecord.setLastCheckerId(lastChecker.getLastCheckerId()); |
|||
clockRecord.setLastCheckerName(lastChecker.getLastCheckerName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return collect; |
|||
} |
|||
|
|||
@Override |
|||
public void punchTheClock(ClockingInDto.PunchTheClock params, Long userId) { |
|||
//判断选择打卡的成员和当前用户是否匹配
|
|||
ProMember proMember = memberDao.selectByPrimaryKey(params.getMemberId()); |
|||
if (ObjectUtil.isNull(proMember) || !proMember.getUserId().equals(userId)) { |
|||
throw new BaseException(BasicsCodeError.MEMBER_NOT_MINE); |
|||
} |
|||
//判断打卡时间是否在当前时间之前
|
|||
Date date = new Date(); |
|||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); |
|||
String now = simpleDateFormat.format(date); |
|||
String d = simpleDateFormat.format(new Date(params.getDateTime())); |
|||
if(Integer.parseInt(now) < Integer.parseInt(d)){ |
|||
log.info("系统时间:{}---打卡时间:{}",now,d); |
|||
throw new BaseException(BasicsCodeError.DATE_ERROR); |
|||
} |
|||
|
|||
// if (date.getTime() < params.getDateTime()) {
|
|||
// log.info("系统时间:{}---打卡时间:{}",date.getTime(),params.getDateTime());
|
|||
// throw new BaseException(BasicsCodeError.DATE_ERROR);
|
|||
// }
|
|||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
|||
String format = df.format(date); |
|||
log.info("获取今天的日期:{}", format); |
|||
if (!format.equalsIgnoreCase(df.format(new Date(params.getDateTime()))) && StrUtil.isBlank(params.getRemark())) { |
|||
//如果打卡日期不是今天,必须填写补卡原因
|
|||
throw new BaseException(BasicsCodeError.NOT_CLOCKING_IN_REMARK); |
|||
} |
|||
//判断是否有打卡记录
|
|||
PluClockingIn PluClockingIn = pluClockingInDao.queryHaveData(params.getMemberId(), params.getDateTime()); |
|||
if (ObjectUtil.isNotNull(PluClockingIn)) { |
|||
//如果有记录则查找记录并修改
|
|||
if (params.getClockType() == 0 && PluClockingIn.getMorningStatus() == 0) { |
|||
PluClockingIn.setMorning(params.getDateTime()); |
|||
PluClockingIn.setMorningStatus((byte) 1); |
|||
PluClockingIn.setMorningRemark(params.getRemark()); |
|||
} else if (params.getClockType() == 1 && PluClockingIn.getNightStatus() == 0) { |
|||
PluClockingIn.setNight(params.getDateTime()); |
|||
PluClockingIn.setNightStatus((byte) 1); |
|||
PluClockingIn.setNightRemark(params.getRemark()); |
|||
} |
|||
PluClockingIn.setCheckerId(params.getCheckerId()); |
|||
pluClockingInDao.updateByPrimaryKeySelective(PluClockingIn); |
|||
} else { |
|||
//如果没有记录,则添加一条新的记录
|
|||
PluClockingIn newClockingIn = new PluClockingIn(); |
|||
newClockingIn.setId(snowflake.nextId()); |
|||
newClockingIn.setMemberId(params.getMemberId()); |
|||
newClockingIn.setCheckerId(params.getCheckerId()); |
|||
if (params.getClockType() == 0) { |
|||
newClockingIn.setMorning(params.getDateTime()); |
|||
newClockingIn.setMorningStatus((byte) 1); |
|||
newClockingIn.setMorningRemark(params.getRemark()); |
|||
} else if (params.getClockType() == 1) { |
|||
newClockingIn.setNight(params.getDateTime()); |
|||
newClockingIn.setNightStatus((byte) 1); |
|||
newClockingIn.setNightRemark(params.getRemark()); |
|||
} |
|||
pluClockingInDao.insertSelective(newClockingIn); |
|||
} |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void auditRecord(ClockingInDto.Audit params, Long userId) { |
|||
PluClockingIn record = pluClockingInDao.selectByPrimaryKey(params.getId()); |
|||
log.info("查找打卡记录:{}", record); |
|||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
|||
if (!record.getCheckerId().equals(userOfMemberId)) { |
|||
throw new BaseException(BasicsCodeError.NO_POWER); |
|||
} |
|||
//修改
|
|||
if (0 == params.getType()) { |
|||
PluClockingIn PluClockingIn = new PluClockingIn(); |
|||
PluClockingIn.setId(params.getId()); |
|||
if (ObjectUtil.isNotNull(params.getMorning())) { |
|||
PluClockingIn.setMorning(params.getMorning()); |
|||
PluClockingIn.setMorningStatus((byte) 1); |
|||
} |
|||
if (ObjectUtil.isNotNull(params.getNight())) { |
|||
PluClockingIn.setNight(params.getNight()); |
|||
PluClockingIn.setNightStatus((byte) 1); |
|||
} |
|||
pluClockingInDao.updateByPrimaryKeySelective(PluClockingIn); |
|||
log.info("修改打卡记录:{}", PluClockingIn); |
|||
} |
|||
//驳回
|
|||
if (1 == params.getType()) { |
|||
PluClockingIn PluClockingIn = new PluClockingIn(); |
|||
PluClockingIn.setId(params.getId()); |
|||
if (ObjectUtil.isNotNull(params.getMorning())) { |
|||
PluClockingIn.setMorningStatus((byte) 2); |
|||
} |
|||
if (ObjectUtil.isNotNull(params.getNight())) { |
|||
PluClockingIn.setNightStatus((byte) 2); |
|||
} |
|||
pluClockingInDao.updateByPrimaryKeySelective(PluClockingIn); |
|||
log.info("驳回打卡记录:{}", PluClockingIn); |
|||
} |
|||
//审核通过
|
|||
if (2 == params.getType()) { |
|||
PluClockingIn PluClockingIn = new PluClockingIn(); |
|||
PluClockingIn.setId(params.getId()); |
|||
if (ObjectUtil.isNotNull(params.getMorning())) { |
|||
PluClockingIn.setMorningStatus((byte) 3); |
|||
} |
|||
if (ObjectUtil.isNotNull(params.getNight())) { |
|||
PluClockingIn.setNightStatus((byte) 3); |
|||
} |
|||
pluClockingInDao.updateByPrimaryKeySelective(PluClockingIn); |
|||
log.info("审核通过打卡记录:{}", PluClockingIn); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void auditRecord1(ClockingInDto.Audit params, Long userId) { |
|||
PluClockingIn PluClockingIn; |
|||
//查询当前用户所属的memberId
|
|||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
|||
//判断打卡记录id是否为空
|
|||
if (ObjectUtil.isNotNull(params.getId())) { |
|||
//不为空 查询打卡记录
|
|||
PluClockingIn record = pluClockingInDao.selectByPrimaryKey(params.getId()); |
|||
log.info("查找打卡记录:{}", record); |
|||
//如果是空返回错误信息
|
|||
if (ObjectUtil.isNull(record)) { |
|||
throw new BaseException(BasicsCodeError.NOT_CLOCKING_IN); |
|||
} |
|||
//判断当前用户是否是检查人
|
|||
if (!record.getCheckerId().equals(userOfMemberId)) { |
|||
throw new BaseException(BasicsCodeError.NO_POWER); |
|||
} |
|||
//需要操作的记录
|
|||
PluClockingIn = new PluClockingIn(); |
|||
PluClockingIn.setId(params.getId()); |
|||
} else { |
|||
//当前用户是否是项目经理
|
|||
Integer power = powerService.queryUserPower(params.getProjectId(), userId); |
|||
//根据memberId查询上一条打卡记录的检查人
|
|||
ClockingInVo.LastChecker lastChecker = pluClockingInDao.queryLastChecker(params.getMemberId()); |
|||
if (power < 1) { |
|||
//不是项目经理,且不是上一条信息的检查人,提示错误信息
|
|||
if (ObjectUtil.isNull(lastChecker)) { |
|||
throw new BaseException(BasicsCodeError.NO_POWER); |
|||
} |
|||
if (!lastChecker.getLastCheckerId().equals(userOfMemberId)) { |
|||
throw new BaseException(BasicsCodeError.NO_POWER); |
|||
} |
|||
} |
|||
//新建一个打卡记录
|
|||
PluClockingIn = new PluClockingIn(); |
|||
PluClockingIn.setId(snowflake.nextId()); |
|||
PluClockingIn.setCheckerId(userOfMemberId); |
|||
PluClockingIn.setMemberId(params.getMemberId()); |
|||
pluClockingInDao.insertSelective(PluClockingIn); |
|||
} |
|||
|
|||
//修改
|
|||
if (0 == params.getType()) { |
|||
if (ObjectUtil.isNotNull(params.getMorning())) { |
|||
PluClockingIn.setMorning(params.getMorning()); |
|||
PluClockingIn.setMorningStatus((byte) 1); |
|||
} |
|||
if (ObjectUtil.isNotNull(params.getNight())) { |
|||
PluClockingIn.setNight(params.getNight()); |
|||
PluClockingIn.setNightStatus((byte) 1); |
|||
} |
|||
log.info("修改打卡记录:{}", PluClockingIn); |
|||
} |
|||
//驳回
|
|||
if (1 == params.getType()) { |
|||
if (ObjectUtil.isNotNull(params.getMorning())) { |
|||
PluClockingIn.setMorningStatus((byte) 2); |
|||
} |
|||
if (ObjectUtil.isNotNull(params.getNight())) { |
|||
PluClockingIn.setNightStatus((byte) 2); |
|||
} |
|||
log.info("驳回打卡记录:{}", PluClockingIn); |
|||
} |
|||
//审核通过
|
|||
if (2 == params.getType()) { |
|||
if (ObjectUtil.isNotNull(params.getMorning())) { |
|||
PluClockingIn.setMorningStatus((byte) 3); |
|||
} |
|||
if (ObjectUtil.isNotNull(params.getNight())) { |
|||
PluClockingIn.setNightStatus((byte) 3); |
|||
} |
|||
log.info("审核通过打卡记录:{}", PluClockingIn); |
|||
} |
|||
pluClockingInDao.updateByPrimaryKeySelective(PluClockingIn); |
|||
|
|||
} |
|||
|
|||
|
|||
@Override |
|||
public ClockingInVo.ExcelUrl exportRecord(ClockingInDto.QueryClockingIn params, Long userId) throws IOException { |
|||
log.info("开始调用查询考勤方法"); |
|||
List<ClockingInVo.ClockingInInfo> clockingInInfos = queryClockingIn(params, userId); |
|||
log.info("调用查询考勤方法结束{}", clockingInInfos); |
|||
Workbook workbook = new XSSFWorkbook(); |
|||
//空白格
|
|||
PoiUtil.PoiUtilCell blank = new PoiUtil.PoiUtilCell(); |
|||
//excel
|
|||
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|||
//第一行list
|
|||
List<PoiUtil.PoiUtilCell> firstCells = new ArrayList<>(); |
|||
//第二行list
|
|||
List<PoiUtil.PoiUtilCell> secondCells = new ArrayList<>(); |
|||
//第一行开始
|
|||
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(); |
|||
poiUtilCell.setValue(""); |
|||
poiUtilCell.setColspan(1); |
|||
poiUtilCell.setRowspan(2); |
|||
firstCells.add(poiUtilCell); |
|||
//第二行开始
|
|||
secondCells.add(blank); |
|||
for (ClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) { |
|||
PoiUtil.PoiUtilCell cellOne = new PoiUtil.PoiUtilCell(); |
|||
cellOne.setValue(clockingInInfo.getDateTime()); |
|||
cellOne.setColspan(2); |
|||
cellOne.setRowspan(1); |
|||
firstCells.add(cellOne); |
|||
firstCells.add(blank); |
|||
PoiUtil.PoiUtilCell cellTwo = new PoiUtil.PoiUtilCell(); |
|||
cellTwo.setValue("早"); |
|||
secondCells.add(cellTwo); |
|||
PoiUtil.PoiUtilCell cellTwo2 = new PoiUtil.PoiUtilCell(); |
|||
cellTwo2.setValue("晚"); |
|||
secondCells.add(cellTwo2); |
|||
} |
|||
list.add(firstCells); |
|||
list.add(secondCells); |
|||
for (ClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) { |
|||
//添加考勤人员信息
|
|||
for (ClockingInVo.ClockRecord clockRecord : clockingInInfo.getRecordList()) { |
|||
List<PoiUtil.PoiUtilCell> memberCells = new ArrayList<>(); |
|||
PoiUtil.PoiUtilCell cell = new PoiUtil.PoiUtilCell(); |
|||
cell.setValue(clockRecord.getMemberName()); |
|||
memberCells.add(cell); |
|||
list.add(memberCells); |
|||
} |
|||
break; |
|||
} |
|||
|
|||
SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss"); |
|||
for (ClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) { |
|||
for (int i = 0; i < clockingInInfo.getRecordList().size(); i++) { |
|||
List<PoiUtil.PoiUtilCell> poiUtilCells = list.get(i + 2); |
|||
PoiUtil.PoiUtilCell morning = new PoiUtil.PoiUtilCell(); |
|||
if (ObjectUtil.isNull(clockingInInfo.getRecordList().get(i).getMorning()) || 0 == clockingInInfo.getRecordList().get(i).getMorning()) { |
|||
morning.setValue("未打卡"); |
|||
} else if (2 == clockingInInfo.getRecordList().get(i).getMorningStatus()) { |
|||
morning.setValue("已驳回"); |
|||
} else { |
|||
morning.setValue(format.format(new Date(clockingInInfo.getRecordList().get(i).getMorning()))); |
|||
} |
|||
poiUtilCells.add(morning); |
|||
PoiUtil.PoiUtilCell night = new PoiUtil.PoiUtilCell(); |
|||
if (ObjectUtil.isNull(clockingInInfo.getRecordList().get(i).getNight()) || 0 == clockingInInfo.getRecordList().get(i).getNight()) { |
|||
night.setValue("未打卡"); |
|||
} else if (2 == clockingInInfo.getRecordList().get(i).getNightStatus()) { |
|||
night.setValue("已驳回"); |
|||
} else { |
|||
night.setValue(format.format(new Date(clockingInInfo.getRecordList().get(i).getNight()))); |
|||
} |
|||
poiUtilCells.add(night); |
|||
|
|||
} |
|||
} |
|||
//写入数据
|
|||
Workbook wbs = PoiUtil.exportWB("Sheet1", list, workbook); |
|||
|
|||
return excelReport(wbs); |
|||
} |
|||
|
|||
@Override |
|||
public ClockingInVo.ExcelUrl exportRecord1(ClockingInDto.QueryClockingIn params, Long userId) throws Exception { |
|||
//根据时间生成日期列表(工作日)
|
|||
ClockingInVo.Holidays holidays = getDateList(params.getStartTime(), params.getEndTime()); |
|||
//查询需要的成员的记录
|
|||
List<ClockingInVo.ClockMember> clockMembers = pluClockingInDao.queryMemberClockingIn(params.getMemberIdList(), params.getRoleId(), params.getStartTime(), params.getEndTime()); |
|||
|
|||
//生成导入数据
|
|||
List<List<PoiUtil.PoiUtilCell>> list = createCell(holidays, clockMembers); |
|||
|
|||
//获取模板
|
|||
ResourceLoader resourceLoader = new DefaultResourceLoader(); |
|||
InputStream is = resourceLoader.getResource("classpath:templates/ClcokingIn.xlsx").getInputStream(); |
|||
Workbook workbook = new XSSFWorkbook(is); |
|||
//写入数据
|
|||
Workbook wbs = PoiUtil.exportWB("考勤统计", list, workbook); |
|||
|
|||
return excelReport(wbs); |
|||
} |
|||
|
|||
private ClockingInVo.ExcelUrl excelReport(Workbook wbs) throws IOException { |
|||
//生成导出文件
|
|||
String fileName = DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; |
|||
String path = PropUtil.path + fileName; |
|||
File tmpFile = new File(path); |
|||
if (!tmpFile.getParentFile().exists()) { |
|||
tmpFile.getParentFile().mkdirs(); |
|||
} |
|||
//将workBook写入文件
|
|||
OutputStream stream = new FileOutputStream(tmpFile); |
|||
wbs.write(stream); |
|||
stream.close(); |
|||
//返回文件路径
|
|||
ClockingInVo.ExcelUrl excelUrl = new ClockingInVo.ExcelUrl(); |
|||
String url = PropUtil.imgDomain+fileName; |
|||
excelUrl.setUrl(url); |
|||
return excelUrl; |
|||
} |
|||
|
|||
private List<List<PoiUtil.PoiUtilCell>> createCell(ClockingInVo.Holidays holidays, List<ClockingInVo.ClockMember> clockMembers) { |
|||
//整体数据
|
|||
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|||
//第一行(标题)
|
|||
list.add(new ArrayList<>()); |
|||
//第二三行(表头)
|
|||
list.add(new ArrayList<>()); |
|||
list.add(new ArrayList<>()); |
|||
//序号
|
|||
int a = 1; |
|||
//判断成员不为空
|
|||
if (CollectionUtil.isNotEmpty(clockMembers)) { |
|||
// 循环成员
|
|||
for (ClockingInVo.ClockMember clockMember : clockMembers) { |
|||
//计算工作日未打卡的记录
|
|||
List<ClockingInVo.NotClockingIn> notList = notClocking(holidays.getWorkday(), clockMember); |
|||
//实际出勤天数row
|
|||
List<PoiUtil.PoiUtilCell> clockingInTimes = new ArrayList<>(); |
|||
//序号
|
|||
clockingInTimes.add(new PoiUtil.PoiUtilCell(a + "", 1, 4 + (notList.size() == 0 ? 1 : notList.size()))); |
|||
//成员名
|
|||
clockingInTimes.add(new PoiUtil.PoiUtilCell(clockMember.getName(), 1, 4 + (notList.size() == 0 ? 1 : notList.size()))); |
|||
clockingInTimes.add(new PoiUtil.PoiUtilCell("实际考勤天数")); |
|||
clockingInTimes.add(new PoiUtil.PoiUtilCell(clockMember.getRecordMemberList().size() + "")); |
|||
list.add(clockingInTimes); |
|||
|
|||
//请假天数row
|
|||
list.add(getOneRow("请假天数",0 + "")); |
|||
//加班天数row
|
|||
list.add(getOneRow("加班天数",0 + " ")); |
|||
//出差天数row
|
|||
list.add(getOneRow("出差天数",0 + "")); |
|||
|
|||
//未打卡次数及时间
|
|||
if(CollectionUtil.isEmpty(notList)){ |
|||
List<PoiUtil.PoiUtilCell> notClocking = new ArrayList<>(); |
|||
notClocking.add(new PoiUtil.PoiUtilCell()); |
|||
notClocking.add(new PoiUtil.PoiUtilCell()); |
|||
notClocking.add(new PoiUtil.PoiUtilCell("未打卡次数及时间")); |
|||
notClocking.add(new PoiUtil.PoiUtilCell(0 + "次")); |
|||
list.add(notClocking); |
|||
}else { |
|||
for (int i = 0; i < notList.size(); i++) { |
|||
ClockingInVo.NotClockingIn notClockingIn = notList.get(i); |
|||
List<PoiUtil.PoiUtilCell> notClocking = new ArrayList<>(); |
|||
notClocking.add(new PoiUtil.PoiUtilCell()); |
|||
notClocking.add(new PoiUtil.PoiUtilCell()); |
|||
if(i == 0){ |
|||
notClocking.add(new PoiUtil.PoiUtilCell("未打卡次数及时间", 1, notList.size())); |
|||
notClocking.add(new PoiUtil.PoiUtilCell(notList.size() + "次", 1, notList.size())); |
|||
}else { |
|||
notClocking.add(new PoiUtil.PoiUtilCell()); |
|||
notClocking.add(new PoiUtil.PoiUtilCell()); |
|||
} |
|||
notClocking.add(new PoiUtil.PoiUtilCell(notClockingIn.getTime())); |
|||
notClocking.add(new PoiUtil.PoiUtilCell(notClockingIn.getType())); |
|||
list.add(notClocking); |
|||
} |
|||
} |
|||
|
|||
} |
|||
a++; |
|||
} |
|||
|
|||
return list; |
|||
} |
|||
|
|||
private List<PoiUtil.PoiUtilCell> getOneRow(String value, String times) { |
|||
List<PoiUtil.PoiUtilCell> row = new ArrayList<>(); |
|||
row.add(new PoiUtil.PoiUtilCell()); |
|||
row.add(new PoiUtil.PoiUtilCell()); |
|||
row.add(new PoiUtil.PoiUtilCell(value)); |
|||
row.add(new PoiUtil.PoiUtilCell(times)); |
|||
return row; |
|||
} |
|||
|
|||
private List<ClockingInVo.NotClockingIn> notClocking(List<String> dateList, ClockingInVo.ClockMember clockMember) { |
|||
List<ClockingInVo.NotClockingIn> notList = new ArrayList<>(); |
|||
Map<String, ClockingInVo.RecordMember> recordMemberMap = clockMember.getRecordMemberMap(); |
|||
if (CollectionUtil.isNotEmpty(dateList)) { |
|||
//循环计算未打卡的记录
|
|||
dateList.forEach(day -> { |
|||
ClockingInVo.RecordMember recordMember = recordMemberMap.get(day); |
|||
if (recordMember == null) { |
|||
//工作日未打卡,将记录存入数组
|
|||
ClockingInVo.NotClockingIn notMorning = new ClockingInVo.NotClockingIn(day, "早"); |
|||
ClockingInVo.NotClockingIn notNight = new ClockingInVo.NotClockingIn(day, "晚"); |
|||
notList.add(notMorning); |
|||
notList.add(notNight); |
|||
} else { |
|||
if (recordMember.getMorning() == null || recordMember.getMorning() == 0) { |
|||
ClockingInVo.NotClockingIn notMorning = new ClockingInVo.NotClockingIn(day, "早"); |
|||
notList.add(notMorning); |
|||
} |
|||
if (recordMember.getMorning() == null || recordMember.getMorning() == 0) { |
|||
ClockingInVo.NotClockingIn notNight = new ClockingInVo.NotClockingIn(day, "晚"); |
|||
notList.add(notNight); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
return notList; |
|||
} |
|||
|
|||
private ClockingInVo.Holidays getDateList(Long startTime, Long endTime) { |
|||
ClockingInVo.Holidays holidays = new ClockingInVo.Holidays(); |
|||
//工作日
|
|||
List<String> workday = new ArrayList<>(); |
|||
List<String> nonWorkday = new ArrayList<>(); |
|||
DateFormat df = new SimpleDateFormat("MM-dd"); |
|||
String isHoliday = ""; |
|||
String overDay = ""; |
|||
//获取假日调休信息
|
|||
SysHolidaysExample holidaysExample = new SysHolidaysExample(); |
|||
holidaysExample.createCriteria().andYearEqualTo(new SimpleDateFormat("yyyy").format(new Date())); |
|||
List<SysHolidays> sysHolidays = holidaysMapper.selectByExample(holidaysExample); |
|||
if (CollectionUtil.isNotEmpty(sysHolidays)) { |
|||
isHoliday = sysHolidays.get(0).getHoliday(); |
|||
overDay = sysHolidays.get(0).getWorkday(); |
|||
} |
|||
Calendar min = Calendar.getInstance(); |
|||
Calendar max = Calendar.getInstance(); |
|||
min.setTime(new Date(startTime)); |
|||
max.setTime(new Date(endTime)); |
|||
max.add(Calendar.DATE, 1); |
|||
while (max.after(min)) { |
|||
int i = min.get(Calendar.DAY_OF_WEEK); |
|||
//是调休 || (不是周末 && 不是节假日)
|
|||
if (overDay.contains(df.format(min.getTime())) || ((i != 1 && i != 7) && !isHoliday.contains(df.format(min.getTime())))) { |
|||
workday.add(new SimpleDateFormat("yyyy-MM-dd").format(min.getTime())); |
|||
}else { |
|||
nonWorkday.add(new SimpleDateFormat("yyyy-MM-dd").format(min.getTime())); |
|||
} |
|||
min.add(Calendar.DATE, 1); |
|||
} |
|||
holidays.setWorkday(workday); |
|||
holidays.setNonWorkday(nonWorkday); |
|||
return holidays; |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.ccsens.ptccsens.service; |
|||
|
|||
|
|||
import com.ccsens.ptccsens.bean.dto.ClockingInDto; |
|||
import com.ccsens.ptccsens.bean.vo.ClockingInVo; |
|||
|
|||
import java.io.IOException; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
public interface IClockingInService { |
|||
|
|||
/** |
|||
* 查询考勤信息 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
* @return 考勤信息 |
|||
*/ |
|||
List<ClockingInVo.ClockingInInfo> queryClockingIn(ClockingInDto.QueryClockingIn params, Long userId); |
|||
|
|||
/** |
|||
* 打卡 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
*/ |
|||
void punchTheClock(ClockingInDto.PunchTheClock params, Long userId); |
|||
|
|||
/** |
|||
* 审核打卡时间 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
*/ |
|||
void auditRecord(ClockingInDto.Audit params, Long userId); |
|||
|
|||
/** |
|||
* 导出考勤记录 |
|||
* @param params 参数 |
|||
* @param userId 当前用户userId |
|||
* @return excel的路径 |
|||
*/ |
|||
ClockingInVo.ExcelUrl exportRecord(ClockingInDto.QueryClockingIn params, Long userId) throws IOException; |
|||
|
|||
ClockingInVo.ExcelUrl exportRecord1(ClockingInDto.QueryClockingIn params, Long userId) throws Exception; |
|||
|
|||
void auditRecord1(ClockingInDto.Audit param, Long userId); |
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.ccsens.ptccsens.service; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
public interface IPowerService { |
|||
/** |
|||
* 查询项目内的权限 |
|||
* @param projectId 项目id |
|||
* @param userId 用户id |
|||
* @return 权限 |
|||
*/ |
|||
Integer queryUserPower(Long projectId, Long userId); |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.ccsens.ptccsens.service; |
|||
|
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import com.ccsens.ptccsens.persist.dao.ProRoleDao; |
|||
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; |
|||
|
|||
/** |
|||
* @author AUSU |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
|||
public class PowerService implements IPowerService{ |
|||
|
|||
@Resource |
|||
private ProRoleDao proRoleDao; |
|||
|
|||
|
|||
@Override |
|||
public Integer queryUserPower(Long projectId, Long userId) { |
|||
Integer power = proRoleDao.isPmByUserId(userId, projectId); |
|||
if (ObjectUtil.isNull(power)) { |
|||
return 0; |
|||
} |
|||
return power; |
|||
} |
|||
} |
@ -0,0 +1,193 @@ |
|||
<?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.ptccsens.persist.dao.PluClockingInDao"> |
|||
|
|||
<select id="queryByMemberId" resultType="com.ccsens.ptccsens.bean.vo.ClockingInVo$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.morning_remark, |
|||
c.night, |
|||
c.night_status, |
|||
c.night_remark, |
|||
if(morning != 0,FROM_UNIXTIME(morning / 1000, '%Y-%m-%d'),FROM_UNIXTIME(night / 1000, '%Y-%m-%d')) as `day` |
|||
FROM |
|||
t_pro_clocking_in AS c |
|||
LEFT JOIN t_pro_member AS m ON m.id = c.member_id and m.rec_status = 0 |
|||
LEFT JOIN t_pro_member AS m2 ON m2.id = c.checker_id and m2.rec_status = 0 |
|||
WHERE |
|||
c.rec_status = 0 |
|||
and |
|||
( |
|||
( |
|||
morning != 0 |
|||
and morning >= #{startTime} |
|||
and morning <= #{endTime} |
|||
) |
|||
or |
|||
( |
|||
night != 0 |
|||
and night >= #{startTime} |
|||
and night <= #{endTime} |
|||
) |
|||
) |
|||
AND member_id IN |
|||
<foreach collection="memberIdList" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
GROUP BY member_id, `day` |
|||
</select> |
|||
|
|||
<select id="queryHaveData" resultType="com.ccsens.ptccsens.bean.po.PluClockingIn"> |
|||
SELECT |
|||
id, |
|||
member_id, |
|||
checker_id, |
|||
morning, |
|||
morning_status, |
|||
night, |
|||
night_status, |
|||
created_at |
|||
FROM |
|||
t_pro_clocking_in |
|||
WHERE |
|||
rec_status = 0 |
|||
AND member_id = #{memberId} |
|||
and |
|||
( |
|||
( |
|||
morning != 0 |
|||
and |
|||
FROM_UNIXTIME(morning / 1000, '%Y-%m-%d') = FROM_UNIXTIME(#{time} / 1000, '%Y-%m-%d') |
|||
) |
|||
or |
|||
( |
|||
night != 0 |
|||
and |
|||
FROM_UNIXTIME(night / 1000, '%Y-%m-%d') = FROM_UNIXTIME(#{time} / 1000, '%Y-%m-%d') |
|||
) |
|||
) |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
<select id="queryLastChecker" resultType="com.ccsens.ptccsens.bean.vo.ClockingInVo$LastChecker"> |
|||
SELECT |
|||
checker_id AS lastCheckerId, |
|||
m.`name` AS lastCheckerName |
|||
FROM |
|||
t_pro_clocking_in AS c |
|||
LEFT JOIN t_pro_member AS m ON m.id = c.checker_id |
|||
WHERE |
|||
c.rec_status = 0 |
|||
AND m.rec_status = 0 |
|||
AND c.member_id = #{memberId} |
|||
ORDER BY |
|||
c.created_at DESC |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
<select id="queryMembersOfClock" resultType="com.ccsens.ptccsens.bean.vo.ClockingInVo$ClockRecord"> |
|||
SELECT |
|||
m.id AS memberId, |
|||
m.`name` AS memberName, |
|||
m.user_id AS memberUserId, |
|||
if(m.id = #{mineId},1,0) as isMine |
|||
FROM |
|||
t_pro_member AS m |
|||
LEFT JOIN t_pro_role_member AS rm ON m.id = rm.member_id and rm.rec_status = 0 |
|||
WHERE |
|||
m.rec_status = 0 |
|||
AND m.project_id = #{projectId} |
|||
AND rm.role_id = #{roleId} |
|||
<if test="memberIdList != null and memberIdList.size != 0"> |
|||
AND m.id IN |
|||
<foreach collection="memberIdList" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</if> |
|||
ORDER BY isMine desc |
|||
</select> |
|||
|
|||
<select id="queryChecker" resultType="com.ccsens.ptccsens.bean.vo.DeliverVo$Checker"> |
|||
SELECT |
|||
id AS memberId, |
|||
`name` |
|||
FROM |
|||
t_pro_member |
|||
WHERE |
|||
rec_status = 0 |
|||
AND project_id = #{projectId} |
|||
</select> |
|||
<select id="queryMemberByIdList" resultType="com.ccsens.ptccsens.bean.vo.ClockingInVo$ClockRecord"> |
|||
SELECT |
|||
m.id AS memberId, |
|||
m.`name` AS memberName, |
|||
m.user_id AS memberUserId |
|||
FROM |
|||
t_pro_member AS m |
|||
LEFT JOIN t_pro_role_member AS rm ON m.id = rm.member_id |
|||
WHERE |
|||
m.rec_status = 0 AND rm.rec_status = 0 |
|||
AND rm.role_id = #{roleId} |
|||
AND m.id IN |
|||
<foreach collection="memberIdList" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
|
|||
</select> |
|||
|
|||
<resultMap id="queryMemberRecord" type="com.ccsens.ptccsens.bean.vo.ClockingInVo$ClockMember"> |
|||
<id column="id" property="id"/> |
|||
<result column="name" property="name"/> |
|||
<collection property="recordMemberList" ofType="com.ccsens.ptccsens.bean.vo.ClockingInVo$RecordMember" > |
|||
<id column="recordId" property="recordId"/> |
|||
<result column="morning" property="morning"/> |
|||
<result column="night" property="night"/> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="queryMemberClockingIn" resultMap="queryMemberRecord"> |
|||
SELECT |
|||
m.id, |
|||
m.`name`, |
|||
c.id, |
|||
c.morning, |
|||
c.night |
|||
FROM |
|||
t_pro_member m |
|||
LEFT JOIN t_pro_role_member rm ON m.id = rm.member_id |
|||
LEFT JOIN t_pro_clocking_in c on m.id = c.member_id and c.rec_status = 0 |
|||
WHERE |
|||
rm.role_id = #{roleId} |
|||
<if test="memberIdList != null and memberIdList.size() > 0" > |
|||
AND m.id IN |
|||
<foreach collection="memberIdList" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</if> |
|||
and m.rec_status = 0 |
|||
and rm.rec_status = 0 |
|||
and |
|||
( |
|||
( |
|||
(c.morning_status = 1 or c.morning_status = 3) |
|||
and c.morning >= #{startTime} |
|||
and c.morning < #{endTime} |
|||
) |
|||
or |
|||
( |
|||
(c.night_status = 1 or c.night_status = 3) |
|||
and c.night >= #{startTime} |
|||
and c.night < #{endTime} |
|||
) |
|||
) |
|||
</select> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,323 @@ |
|||
<?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.ptccsens.persist.mapper.PluClockingInMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptccsens.bean.po.PluClockingIn"> |
|||
<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" /> |
|||
<result column="morning_remark" jdbcType="VARCHAR" property="morningRemark" /> |
|||
<result column="night_remark" jdbcType="VARCHAR" property="nightRemark" /> |
|||
</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, morning_remark, night_remark |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptccsens.bean.po.PluClockingInExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_plu_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_plu_clocking_in |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_plu_clocking_in |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptccsens.bean.po.PluClockingInExample"> |
|||
delete from t_plu_clocking_in |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptccsens.bean.po.PluClockingIn"> |
|||
insert into t_plu_clocking_in (id, member_id, checker_id, |
|||
morning, morning_status, night, |
|||
night_status, created_at, updated_at, |
|||
rec_status, morning_remark, night_remark |
|||
) |
|||
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}, #{morningRemark,jdbcType=VARCHAR}, #{nightRemark,jdbcType=VARCHAR} |
|||
) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptccsens.bean.po.PluClockingIn"> |
|||
insert into t_plu_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> |
|||
<if test="morningRemark != null"> |
|||
morning_remark, |
|||
</if> |
|||
<if test="nightRemark != null"> |
|||
night_remark, |
|||
</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> |
|||
<if test="morningRemark != null"> |
|||
#{morningRemark,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="nightRemark != null"> |
|||
#{nightRemark,jdbcType=VARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptccsens.bean.po.PluClockingInExample" resultType="java.lang.Long"> |
|||
select count(*) from t_plu_clocking_in |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_plu_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> |
|||
<if test="record.morningRemark != null"> |
|||
morning_remark = #{record.morningRemark,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.nightRemark != null"> |
|||
night_remark = #{record.nightRemark,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_plu_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}, |
|||
morning_remark = #{record.morningRemark,jdbcType=VARCHAR}, |
|||
night_remark = #{record.nightRemark,jdbcType=VARCHAR} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptccsens.bean.po.PluClockingIn"> |
|||
update t_plu_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> |
|||
<if test="morningRemark != null"> |
|||
morning_remark = #{morningRemark,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="nightRemark != null"> |
|||
night_remark = #{nightRemark,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptccsens.bean.po.PluClockingIn"> |
|||
update t_plu_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}, |
|||
morning_remark = #{morningRemark,jdbcType=VARCHAR}, |
|||
night_remark = #{nightRemark,jdbcType=VARCHAR} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,258 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptccsens.persist.mapper.SysHolidaysMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptccsens.bean.po.SysHolidays"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="year" jdbcType="VARCHAR" property="year" /> |
|||
<result column="holiday" jdbcType="VARCHAR" property="holiday" /> |
|||
<result column="workday" jdbcType="VARCHAR" property="workday" /> |
|||
<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, year, holiday, workday, operator, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptccsens.bean.po.SysHolidaysExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_holidays |
|||
<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_sys_holidays |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_holidays |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptccsens.bean.po.SysHolidaysExample"> |
|||
delete from t_sys_holidays |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptccsens.bean.po.SysHolidays"> |
|||
insert into t_sys_holidays (id, year, holiday, |
|||
workday, operator, created_at, |
|||
updated_at, rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{year,jdbcType=VARCHAR}, #{holiday,jdbcType=VARCHAR}, |
|||
#{workday,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, |
|||
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptccsens.bean.po.SysHolidays"> |
|||
insert into t_sys_holidays |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="year != null"> |
|||
year, |
|||
</if> |
|||
<if test="holiday != null"> |
|||
holiday, |
|||
</if> |
|||
<if test="workday != null"> |
|||
workday, |
|||
</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="year != null"> |
|||
#{year,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="holiday != null"> |
|||
#{holiday,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="workday != null"> |
|||
#{workday,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.ptccsens.bean.po.SysHolidaysExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_holidays |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_holidays |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.year != null"> |
|||
year = #{record.year,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.holiday != null"> |
|||
holiday = #{record.holiday,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.workday != null"> |
|||
workday = #{record.workday,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_sys_holidays |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
year = #{record.year,jdbcType=VARCHAR}, |
|||
holiday = #{record.holiday,jdbcType=VARCHAR}, |
|||
workday = #{record.workday,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.ptccsens.bean.po.SysHolidays"> |
|||
update t_sys_holidays |
|||
<set> |
|||
<if test="year != null"> |
|||
year = #{year,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="holiday != null"> |
|||
holiday = #{holiday,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="workday != null"> |
|||
workday = #{workday,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.ptccsens.bean.po.SysHolidays"> |
|||
update t_sys_holidays |
|||
set year = #{year,jdbcType=VARCHAR}, |
|||
holiday = #{holiday,jdbcType=VARCHAR}, |
|||
workday = #{workday,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> |
Loading…
Reference in new issue