30 changed files with 4152 additions and 5172 deletions
@ -1,82 +1,82 @@ |
|||||
package com.ccsens.common.bean.dto; |
//package com.ccsens.common.bean.dto;
|
||||
|
//
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
//import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel; |
//import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty; |
//import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data; |
//import lombok.Data;
|
||||
|
//
|
||||
import javax.validation.constraints.NotNull; |
//import javax.validation.constraints.NotNull;
|
||||
import java.util.Date; |
//import java.util.Date;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author AUSU |
// * @author AUSU
|
||||
*/ |
// */
|
||||
@Data |
//@Data
|
||||
public class CClockingInDto { |
//public class CClockingInDto {
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("查询考勤信息") |
// @ApiModel("查询考勤信息")
|
||||
public static class QueryClockingIn{ |
// public static class QueryClockingIn{
|
||||
@NotNull(message = "请选择项目信息") |
// @NotNull(message = "请选择项目信息")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
@ApiModelProperty("开始时间") |
// @ApiModelProperty("开始时间")
|
||||
private Long startTime; |
// private Long startTime;
|
||||
@ApiModelProperty("结束时间") |
// @ApiModelProperty("结束时间")
|
||||
private Long endTime; |
// private Long endTime;
|
||||
@ApiModelProperty("打卡角色") |
// @ApiModelProperty("打卡角色")
|
||||
private Long roleId; |
// private Long roleId;
|
||||
@ApiModelProperty("成员id数组") |
// @ApiModelProperty("成员id数组")
|
||||
private List<Long> memberIdList; |
// private List<Long> memberIdList;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("进行打卡") |
// @ApiModel("进行打卡")
|
||||
public static class PunchTheClock{ |
// public static class PunchTheClock{
|
||||
@ApiModelProperty("记录id(没有则不传)") |
// @ApiModelProperty("记录id(没有则不传)")
|
||||
private Long id; |
// private Long id;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd") |
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("打卡日期") |
// @ApiModelProperty("打卡日期")
|
||||
private Long dateTime; |
// private Long dateTime;
|
||||
@NotNull(message = "成员id不能为空") |
// @NotNull(message = "成员id不能为空")
|
||||
@ApiModelProperty("考勤信息中的成员id") |
// @ApiModelProperty("考勤信息中的成员id")
|
||||
private Long memberId; |
// private Long memberId;
|
||||
@NotNull(message = "审核员id不能为空") |
// @NotNull(message = "审核员id不能为空")
|
||||
@ApiModelProperty("审核员id") |
// @ApiModelProperty("审核员id")
|
||||
private Long checkerId; |
// private Long checkerId;
|
||||
@ApiModelProperty("打卡类型(0-早,1-晚)") |
// @ApiModelProperty("打卡类型(0-早,1-晚)")
|
||||
private Byte clockType; |
// private Byte clockType;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("检查人审核打卡") |
// @ApiModel("检查人审核打卡")
|
||||
public static class Audit{ |
// public static class Audit{
|
||||
@NotNull(message = "打卡信息错误") |
// @NotNull(message = "打卡信息错误")
|
||||
@ApiModelProperty("打卡记录id") |
// @ApiModelProperty("打卡记录id")
|
||||
private Long id; |
// private Long id;
|
||||
@NotNull(message = "项目信息错误") |
// @NotNull(message = "项目信息错误")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
@ApiModelProperty("审批类型(0-修改,1-驳回,2审核通过)") |
// @ApiModelProperty("审批类型(0-修改,1-驳回,2审核通过)")
|
||||
private Byte type; |
// private Byte type;
|
||||
@ApiModelProperty("早打卡时间") |
// @ApiModelProperty("早打卡时间")
|
||||
private Long morning; |
// private Long morning;
|
||||
@ApiModelProperty("晚打卡时间") |
// @ApiModelProperty("晚打卡时间")
|
||||
private Long night; |
// private Long night;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("导出打卡记录") |
// @ApiModel("导出打卡记录")
|
||||
public static class ExportRecord{ |
// public static class ExportRecord{
|
||||
@NotNull(message = "项目信息错误") |
// @NotNull(message = "项目信息错误")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
@ApiModelProperty("开始时间") |
// @ApiModelProperty("开始时间")
|
||||
private Long startTime; |
// private Long startTime;
|
||||
@ApiModelProperty("结束时间") |
// @ApiModelProperty("结束时间")
|
||||
private Long endTime; |
// private Long endTime;
|
||||
@ApiModelProperty("成员id数组") |
// @ApiModelProperty("成员id数组")
|
||||
private List<Long> memberIdList; |
// private List<Long> memberIdList;
|
||||
} |
// }
|
||||
} |
//}
|
||||
|
|||||
@ -1,80 +1,80 @@ |
|||||
package com.ccsens.common.bean.dto; |
//package com.ccsens.common.bean.dto;
|
||||
|
//
|
||||
import io.swagger.annotations.ApiModel; |
//import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty; |
//import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data; |
//import lombok.Data;
|
||||
|
//
|
||||
import javax.validation.constraints.Max; |
//import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min; |
//import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull; |
//import javax.validation.constraints.NotNull;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
@Data |
//@Data
|
||||
public class CDeliverDto { |
//public class CDeliverDto {
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("查询所有检查人") |
// @ApiModel("查询所有检查人")
|
||||
public static class QueryChecker{ |
// public static class QueryChecker{
|
||||
@NotNull(message = "请选择项目") |
// @NotNull(message = "请选择项目")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("检查交付物") |
// @ApiModel("检查交付物")
|
||||
public static class CheckDeliver{ |
// public static class CheckDeliver{
|
||||
@NotNull(message = "检查信息错误") |
// @NotNull(message = "检查信息错误")
|
||||
@ApiModelProperty("检查记录id") |
// @ApiModelProperty("检查记录id")
|
||||
private Long checkId; |
// private Long checkId;
|
||||
@NotNull(message = "项目信息错误") |
// @NotNull(message = "项目信息错误")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
@ApiModelProperty("检查状态(1-通过,2-驳回)") |
// @ApiModelProperty("检查状态(1-通过,2-驳回)")
|
||||
private Byte status; |
// private Byte status;
|
||||
@ApiModelProperty("分数") |
// @ApiModelProperty("分数")
|
||||
private String score; |
// private String score;
|
||||
@ApiModelProperty("评论") |
// @ApiModelProperty("评论")
|
||||
private String remark; |
// private String remark;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("提交交付物") |
// @ApiModel("提交交付物")
|
||||
public static class SaveDeliver{ |
// public static class SaveDeliver{
|
||||
@NotNull(message = "请选择项目") |
// @NotNull(message = "请选择项目")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
@NotNull(message = "请选择任务") |
// @NotNull(message = "请选择任务")
|
||||
@ApiModelProperty("分解任务id") |
// @ApiModelProperty("分解任务id")
|
||||
private Long taskSubId; |
// private Long taskSubId;
|
||||
@ApiModelProperty("文本内容") |
// @ApiModelProperty("文本内容")
|
||||
private String content; |
// private String content;
|
||||
@ApiModelProperty("检查人列表") |
// @ApiModelProperty("检查人列表")
|
||||
private List<Long> checkerList; |
// private List<Long> checkerList;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("查询任务的交付物历史") |
// @ApiModel("查询任务的交付物历史")
|
||||
public static class QueryDeliverOfTask{ |
// public static class QueryDeliverOfTask{
|
||||
@NotNull(message = "请选择项目信息") |
// @NotNull(message = "请选择项目信息")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
@NotNull(message = "请选择任务") |
// @NotNull(message = "请选择任务")
|
||||
@ApiModelProperty("任务分解id") |
// @ApiModelProperty("任务分解id")
|
||||
private Long taskSubId; |
// private Long taskSubId;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("查询项目的交付物历史") |
// @ApiModel("查询项目的交付物历史")
|
||||
public static class QueryDeliverOfProject { |
// public static class QueryDeliverOfProject {
|
||||
@NotNull(message = "请选择项目信息") |
// @NotNull(message = "请选择项目信息")
|
||||
@ApiModelProperty("项目id") |
// @ApiModelProperty("项目id")
|
||||
private Long projectId; |
// private Long projectId;
|
||||
@ApiModelProperty("第几页") |
// @ApiModelProperty("第几页")
|
||||
@Min(value = 1) |
// @Min(value = 1)
|
||||
private int pageNum = 1; |
// private int pageNum = 1;
|
||||
@ApiModelProperty("每页多少条") |
// @ApiModelProperty("每页多少条")
|
||||
@Min(value = 1) |
// @Min(value = 1)
|
||||
@Max(value=100) |
// @Max(value=100)
|
||||
private int pageSize = 10; |
// private int pageSize = 10;
|
||||
} |
// }
|
||||
} |
//}
|
||||
|
|||||
@ -1,52 +1,52 @@ |
|||||
package com.ccsens.common.bean.message; |
//package com.ccsens.common.bean.message;
|
||||
|
//
|
||||
import com.ccsens.common.util.Constant; |
//import com.ccsens.common.util.Constant;
|
||||
import lombok.Data; |
//import lombok.Data;
|
||||
import lombok.Getter; |
//import lombok.Getter;
|
||||
import lombok.Setter; |
//import lombok.Setter;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author 逗 |
// * @author 逗
|
||||
*/ |
// */
|
||||
@Data |
//@Data
|
||||
public class DeliverMessageWithChecker { |
//public class DeliverMessageWithChecker {
|
||||
private String type = Constant.MessageType.CHECKER_DELIVER; |
// private String type = Constant.MessageType.CHECKER_DELIVER;
|
||||
private String event; |
// private String event;
|
||||
|
//
|
||||
public DeliverMessageWithChecker() { |
// public DeliverMessageWithChecker() {
|
||||
|
//
|
||||
} |
// }
|
||||
|
//
|
||||
private Data data; |
// private Data data;
|
||||
|
//
|
||||
@Setter |
// @Setter
|
||||
@Getter |
// @Getter
|
||||
public static class Data{ |
// public static class Data{
|
||||
//任务分解id
|
// //任务分解id
|
||||
Long taskId; |
// Long taskId;
|
||||
//任务详情id
|
// //任务详情id
|
||||
Long taskDetailId; |
// Long taskDetailId;
|
||||
//交付物id
|
// //交付物id
|
||||
Long deliverId; |
// Long deliverId;
|
||||
//角色id(上传的任务所属的角色id)
|
// //角色id(上传的任务所属的角色id)
|
||||
Long roleId; |
// Long roleId;
|
||||
//检查人id(memberId)
|
// //检查人id(memberId)
|
||||
Long memberId; |
// Long memberId;
|
||||
//检查人名字(成员名)
|
// //检查人名字(成员名)
|
||||
String memberName; |
// String memberName;
|
||||
|
//
|
||||
} |
// }
|
||||
|
//
|
||||
public DeliverMessageWithChecker(Long taskId, Long taskDetailId, Long deliverId, Long roleId, Long memberId, String memberName){ |
// public DeliverMessageWithChecker(Long taskId, Long taskDetailId, Long deliverId, Long roleId, Long memberId, String memberName){
|
||||
this(); |
// this();
|
||||
Data d = new Data(); |
// Data d = new Data();
|
||||
d.setTaskId(taskId); |
// d.setTaskId(taskId);
|
||||
d.setTaskDetailId(taskDetailId); |
// d.setTaskDetailId(taskDetailId);
|
||||
d.setDeliverId(deliverId); |
// d.setDeliverId(deliverId);
|
||||
d.setRoleId(roleId); |
// d.setRoleId(roleId);
|
||||
d.setMemberId(memberId); |
// d.setMemberId(memberId);
|
||||
d.setMemberName(memberName); |
// d.setMemberName(memberName);
|
||||
setData(d); |
// setData(d);
|
||||
} |
// }
|
||||
|
//
|
||||
} |
//}
|
||||
|
|||||
@ -1,52 +1,52 @@ |
|||||
package com.ccsens.common.bean.message; |
//package com.ccsens.common.bean.message;
|
||||
|
//
|
||||
import com.ccsens.common.util.Constant; |
//import com.ccsens.common.util.Constant;
|
||||
import lombok.Data; |
//import lombok.Data;
|
||||
import lombok.Getter; |
//import lombok.Getter;
|
||||
import lombok.Setter; |
//import lombok.Setter;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author 逗 |
// * @author 逗
|
||||
*/ |
// */
|
||||
@Data |
//@Data
|
||||
public class DeliverMessageWithUpload { |
//public class DeliverMessageWithUpload {
|
||||
private String type = Constant.MessageType.UPLOAD_DELIVER; |
// private String type = Constant.MessageType.UPLOAD_DELIVER;
|
||||
private String event; |
// private String event;
|
||||
|
//
|
||||
public DeliverMessageWithUpload() { |
// public DeliverMessageWithUpload() {
|
||||
|
//
|
||||
} |
// }
|
||||
|
//
|
||||
private Data data; |
// private Data data;
|
||||
|
//
|
||||
@Setter |
// @Setter
|
||||
@Getter |
// @Getter
|
||||
public static class Data{ |
// public static class Data{
|
||||
//任务分解id
|
// //任务分解id
|
||||
Long taskId; |
// Long taskId;
|
||||
//任务详情id
|
// //任务详情id
|
||||
Long taskDetailId; |
// Long taskDetailId;
|
||||
//交付物id
|
// //交付物id
|
||||
Long deliverId; |
// Long deliverId;
|
||||
//角色id(上传的任务所属的角色id)
|
// //角色id(上传的任务所属的角色id)
|
||||
Long roleId; |
// Long roleId;
|
||||
//上传者/检查者 id(memberId)
|
// //上传者/检查者 id(memberId)
|
||||
Long memberId; |
// Long memberId;
|
||||
//上传者/检查者 名字(成员名)
|
// //上传者/检查者 名字(成员名)
|
||||
String memberName; |
// String memberName;
|
||||
|
//
|
||||
} |
// }
|
||||
|
//
|
||||
public DeliverMessageWithUpload(Long taskId, Long taskDetailId, Long deliverId, Long roleId, Long memberId, String memberName){ |
// public DeliverMessageWithUpload(Long taskId, Long taskDetailId, Long deliverId, Long roleId, Long memberId, String memberName){
|
||||
this(); |
// this();
|
||||
Data d = new Data(); |
// Data d = new Data();
|
||||
d.setTaskId(taskId); |
// d.setTaskId(taskId);
|
||||
d.setTaskDetailId(taskDetailId); |
// d.setTaskDetailId(taskDetailId);
|
||||
d.setDeliverId(deliverId); |
// d.setDeliverId(deliverId);
|
||||
d.setRoleId(roleId); |
// d.setRoleId(roleId);
|
||||
d.setMemberId(memberId); |
// d.setMemberId(memberId);
|
||||
d.setMemberName(memberName); |
// d.setMemberName(memberName);
|
||||
setData(d); |
// setData(d);
|
||||
} |
// }
|
||||
|
//
|
||||
} |
//}
|
||||
|
|||||
@ -1,128 +1,128 @@ |
|||||
package com.ccsens.common.bean.po; |
//package com.ccsens.common.bean.po;
|
||||
|
//
|
||||
import java.io.Serializable; |
//import java.io.Serializable;
|
||||
import java.util.Date; |
//import java.util.Date;
|
||||
|
//
|
||||
public class ProClockingIn implements Serializable { |
//public class ProClockingIn implements Serializable {
|
||||
private Long id; |
// private Long id;
|
||||
|
//
|
||||
private Long memberId; |
// private Long memberId;
|
||||
|
//
|
||||
private Long checkerId; |
// private Long checkerId;
|
||||
|
//
|
||||
private Long morning; |
// private Long morning;
|
||||
|
//
|
||||
private Byte morningStatus; |
// private Byte morningStatus;
|
||||
|
//
|
||||
private Long night; |
// private Long night;
|
||||
|
//
|
||||
private Byte nightStatus; |
// private Byte nightStatus;
|
||||
|
//
|
||||
private Date createdAt; |
// private Date createdAt;
|
||||
|
//
|
||||
private Date updatedAt; |
// private Date updatedAt;
|
||||
|
//
|
||||
private Byte recStatus; |
// private Byte recStatus;
|
||||
|
//
|
||||
private static final long serialVersionUID = 1L; |
// private static final long serialVersionUID = 1L;
|
||||
|
//
|
||||
public Long getId() { |
// public Long getId() {
|
||||
return id; |
// return id;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setId(Long id) { |
// public void setId(Long id) {
|
||||
this.id = id; |
// this.id = id;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getMemberId() { |
// public Long getMemberId() {
|
||||
return memberId; |
// return memberId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setMemberId(Long memberId) { |
// public void setMemberId(Long memberId) {
|
||||
this.memberId = memberId; |
// this.memberId = memberId;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getCheckerId() { |
// public Long getCheckerId() {
|
||||
return checkerId; |
// return checkerId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setCheckerId(Long checkerId) { |
// public void setCheckerId(Long checkerId) {
|
||||
this.checkerId = checkerId; |
// this.checkerId = checkerId;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getMorning() { |
// public Long getMorning() {
|
||||
return morning; |
// return morning;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setMorning(Long morning) { |
// public void setMorning(Long morning) {
|
||||
this.morning = morning; |
// this.morning = morning;
|
||||
} |
// }
|
||||
|
//
|
||||
public Byte getMorningStatus() { |
// public Byte getMorningStatus() {
|
||||
return morningStatus; |
// return morningStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setMorningStatus(Byte morningStatus) { |
// public void setMorningStatus(Byte morningStatus) {
|
||||
this.morningStatus = morningStatus; |
// this.morningStatus = morningStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getNight() { |
// public Long getNight() {
|
||||
return night; |
// return night;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setNight(Long night) { |
// public void setNight(Long night) {
|
||||
this.night = night; |
// this.night = night;
|
||||
} |
// }
|
||||
|
//
|
||||
public Byte getNightStatus() { |
// public Byte getNightStatus() {
|
||||
return nightStatus; |
// return nightStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setNightStatus(Byte nightStatus) { |
// public void setNightStatus(Byte nightStatus) {
|
||||
this.nightStatus = nightStatus; |
// this.nightStatus = nightStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
public Date getCreatedAt() { |
// public Date getCreatedAt() {
|
||||
return createdAt; |
// return createdAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setCreatedAt(Date createdAt) { |
// public void setCreatedAt(Date createdAt) {
|
||||
this.createdAt = createdAt; |
// this.createdAt = createdAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public Date getUpdatedAt() { |
// public Date getUpdatedAt() {
|
||||
return updatedAt; |
// return updatedAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setUpdatedAt(Date updatedAt) { |
// public void setUpdatedAt(Date updatedAt) {
|
||||
this.updatedAt = updatedAt; |
// this.updatedAt = updatedAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public Byte getRecStatus() { |
// public Byte getRecStatus() {
|
||||
return recStatus; |
// return recStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setRecStatus(Byte recStatus) { |
// public void setRecStatus(Byte recStatus) {
|
||||
this.recStatus = recStatus; |
// this.recStatus = recStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public String toString() { |
// public String toString() {
|
||||
StringBuilder sb = new StringBuilder(); |
// StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName()); |
// sb.append(getClass().getSimpleName());
|
||||
sb.append(" ["); |
// sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode()); |
// sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id); |
// sb.append(", id=").append(id);
|
||||
sb.append(", memberId=").append(memberId); |
// sb.append(", memberId=").append(memberId);
|
||||
sb.append(", checkerId=").append(checkerId); |
// sb.append(", checkerId=").append(checkerId);
|
||||
sb.append(", morning=").append(morning); |
// sb.append(", morning=").append(morning);
|
||||
sb.append(", morningStatus=").append(morningStatus); |
// sb.append(", morningStatus=").append(morningStatus);
|
||||
sb.append(", night=").append(night); |
// sb.append(", night=").append(night);
|
||||
sb.append(", nightStatus=").append(nightStatus); |
// sb.append(", nightStatus=").append(nightStatus);
|
||||
sb.append(", createdAt=").append(createdAt); |
// sb.append(", createdAt=").append(createdAt);
|
||||
sb.append(", updatedAt=").append(updatedAt); |
// sb.append(", updatedAt=").append(updatedAt);
|
||||
sb.append(", recStatus=").append(recStatus); |
// sb.append(", recStatus=").append(recStatus);
|
||||
sb.append("]"); |
// sb.append("]");
|
||||
return sb.toString(); |
// return sb.toString();
|
||||
} |
// }
|
||||
} |
//}
|
||||
File diff suppressed because it is too large
@ -1,139 +1,139 @@ |
|||||
package com.ccsens.common.bean.po; |
//package com.ccsens.common.bean.po;
|
||||
|
//
|
||||
import java.io.Serializable; |
//import java.io.Serializable;
|
||||
import java.util.Date; |
//import java.util.Date;
|
||||
|
//
|
||||
public class ProDeliver implements Serializable { |
//public class ProDeliver implements Serializable {
|
||||
private Long id; |
// private Long id;
|
||||
|
//
|
||||
private Long taskSubId; |
// private Long taskSubId;
|
||||
|
//
|
||||
private Long memberId; |
// private Long memberId;
|
||||
|
//
|
||||
private Long fileId; |
// private Long fileId;
|
||||
|
//
|
||||
private String filePath; |
// private String filePath;
|
||||
|
//
|
||||
private String content; |
// private String content;
|
||||
|
//
|
||||
private Long projectId; |
// private Long projectId;
|
||||
|
//
|
||||
private Long time; |
// private Long time;
|
||||
|
//
|
||||
private Date createdAt; |
// private Date createdAt;
|
||||
|
//
|
||||
private Date updatedAt; |
// private Date updatedAt;
|
||||
|
//
|
||||
private Byte recStatus; |
// private Byte recStatus;
|
||||
|
//
|
||||
private static final long serialVersionUID = 1L; |
// private static final long serialVersionUID = 1L;
|
||||
|
//
|
||||
public Long getId() { |
// public Long getId() {
|
||||
return id; |
// return id;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setId(Long id) { |
// public void setId(Long id) {
|
||||
this.id = id; |
// this.id = id;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getTaskSubId() { |
// public Long getTaskSubId() {
|
||||
return taskSubId; |
// return taskSubId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setTaskSubId(Long taskSubId) { |
// public void setTaskSubId(Long taskSubId) {
|
||||
this.taskSubId = taskSubId; |
// this.taskSubId = taskSubId;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getMemberId() { |
// public Long getMemberId() {
|
||||
return memberId; |
// return memberId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setMemberId(Long memberId) { |
// public void setMemberId(Long memberId) {
|
||||
this.memberId = memberId; |
// this.memberId = memberId;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getFileId() { |
// public Long getFileId() {
|
||||
return fileId; |
// return fileId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setFileId(Long fileId) { |
// public void setFileId(Long fileId) {
|
||||
this.fileId = fileId; |
// this.fileId = fileId;
|
||||
} |
// }
|
||||
|
//
|
||||
public String getFilePath() { |
// public String getFilePath() {
|
||||
return filePath; |
// return filePath;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setFilePath(String filePath) { |
// public void setFilePath(String filePath) {
|
||||
this.filePath = filePath == null ? null : filePath.trim(); |
// this.filePath = filePath == null ? null : filePath.trim();
|
||||
} |
// }
|
||||
|
//
|
||||
public String getContent() { |
// public String getContent() {
|
||||
return content; |
// return content;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setContent(String content) { |
// public void setContent(String content) {
|
||||
this.content = content == null ? null : content.trim(); |
// this.content = content == null ? null : content.trim();
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getProjectId() { |
// public Long getProjectId() {
|
||||
return projectId; |
// return projectId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setProjectId(Long projectId) { |
// public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId; |
// this.projectId = projectId;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getTime() { |
// public Long getTime() {
|
||||
return time; |
// return time;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setTime(Long time) { |
// public void setTime(Long time) {
|
||||
this.time = time; |
// this.time = time;
|
||||
} |
// }
|
||||
|
//
|
||||
public Date getCreatedAt() { |
// public Date getCreatedAt() {
|
||||
return createdAt; |
// return createdAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setCreatedAt(Date createdAt) { |
// public void setCreatedAt(Date createdAt) {
|
||||
this.createdAt = createdAt; |
// this.createdAt = createdAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public Date getUpdatedAt() { |
// public Date getUpdatedAt() {
|
||||
return updatedAt; |
// return updatedAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setUpdatedAt(Date updatedAt) { |
// public void setUpdatedAt(Date updatedAt) {
|
||||
this.updatedAt = updatedAt; |
// this.updatedAt = updatedAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public Byte getRecStatus() { |
// public Byte getRecStatus() {
|
||||
return recStatus; |
// return recStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setRecStatus(Byte recStatus) { |
// public void setRecStatus(Byte recStatus) {
|
||||
this.recStatus = recStatus; |
// this.recStatus = recStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public String toString() { |
// public String toString() {
|
||||
StringBuilder sb = new StringBuilder(); |
// StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName()); |
// sb.append(getClass().getSimpleName());
|
||||
sb.append(" ["); |
// sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode()); |
// sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id); |
// sb.append(", id=").append(id);
|
||||
sb.append(", taskSubId=").append(taskSubId); |
// sb.append(", taskSubId=").append(taskSubId);
|
||||
sb.append(", memberId=").append(memberId); |
// sb.append(", memberId=").append(memberId);
|
||||
sb.append(", fileId=").append(fileId); |
// sb.append(", fileId=").append(fileId);
|
||||
sb.append(", filePath=").append(filePath); |
// sb.append(", filePath=").append(filePath);
|
||||
sb.append(", content=").append(content); |
// sb.append(", content=").append(content);
|
||||
sb.append(", projectId=").append(projectId); |
// sb.append(", projectId=").append(projectId);
|
||||
sb.append(", time=").append(time); |
// sb.append(", time=").append(time);
|
||||
sb.append(", createdAt=").append(createdAt); |
// sb.append(", createdAt=").append(createdAt);
|
||||
sb.append(", updatedAt=").append(updatedAt); |
// sb.append(", updatedAt=").append(updatedAt);
|
||||
sb.append(", recStatus=").append(recStatus); |
// sb.append(", recStatus=").append(recStatus);
|
||||
sb.append("]"); |
// sb.append("]");
|
||||
return sb.toString(); |
// return sb.toString();
|
||||
} |
// }
|
||||
} |
//}
|
||||
@ -1,117 +1,117 @@ |
|||||
package com.ccsens.common.bean.po; |
//package com.ccsens.common.bean.po;
|
||||
|
//
|
||||
import java.io.Serializable; |
//import java.io.Serializable;
|
||||
import java.util.Date; |
//import java.util.Date;
|
||||
|
//
|
||||
public class ProDeliverChecker implements Serializable { |
//public class ProDeliverChecker implements Serializable {
|
||||
private Long id; |
// private Long id;
|
||||
|
//
|
||||
private Long deliverId; |
// private Long deliverId;
|
||||
|
//
|
||||
private Long memberId; |
// private Long memberId;
|
||||
|
//
|
||||
private String score; |
// private String score;
|
||||
|
//
|
||||
private String remark; |
// private String remark;
|
||||
|
//
|
||||
private Byte status; |
// private Byte status;
|
||||
|
//
|
||||
private Date createdAt; |
// private Date createdAt;
|
||||
|
//
|
||||
private Date updatedAt; |
// private Date updatedAt;
|
||||
|
//
|
||||
private Byte recStatus; |
// private Byte recStatus;
|
||||
|
//
|
||||
private static final long serialVersionUID = 1L; |
// private static final long serialVersionUID = 1L;
|
||||
|
//
|
||||
public Long getId() { |
// public Long getId() {
|
||||
return id; |
// return id;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setId(Long id) { |
// public void setId(Long id) {
|
||||
this.id = id; |
// this.id = id;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getDeliverId() { |
// public Long getDeliverId() {
|
||||
return deliverId; |
// return deliverId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setDeliverId(Long deliverId) { |
// public void setDeliverId(Long deliverId) {
|
||||
this.deliverId = deliverId; |
// this.deliverId = deliverId;
|
||||
} |
// }
|
||||
|
//
|
||||
public Long getMemberId() { |
// public Long getMemberId() {
|
||||
return memberId; |
// return memberId;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setMemberId(Long memberId) { |
// public void setMemberId(Long memberId) {
|
||||
this.memberId = memberId; |
// this.memberId = memberId;
|
||||
} |
// }
|
||||
|
//
|
||||
public String getScore() { |
// public String getScore() {
|
||||
return score; |
// return score;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setScore(String score) { |
// public void setScore(String score) {
|
||||
this.score = score == null ? null : score.trim(); |
// this.score = score == null ? null : score.trim();
|
||||
} |
// }
|
||||
|
//
|
||||
public String getRemark() { |
// public String getRemark() {
|
||||
return remark; |
// return remark;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setRemark(String remark) { |
// public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim(); |
// this.remark = remark == null ? null : remark.trim();
|
||||
} |
// }
|
||||
|
//
|
||||
public Byte getStatus() { |
// public Byte getStatus() {
|
||||
return status; |
// return status;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setStatus(Byte status) { |
// public void setStatus(Byte status) {
|
||||
this.status = status; |
// this.status = status;
|
||||
} |
// }
|
||||
|
//
|
||||
public Date getCreatedAt() { |
// public Date getCreatedAt() {
|
||||
return createdAt; |
// return createdAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setCreatedAt(Date createdAt) { |
// public void setCreatedAt(Date createdAt) {
|
||||
this.createdAt = createdAt; |
// this.createdAt = createdAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public Date getUpdatedAt() { |
// public Date getUpdatedAt() {
|
||||
return updatedAt; |
// return updatedAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setUpdatedAt(Date updatedAt) { |
// public void setUpdatedAt(Date updatedAt) {
|
||||
this.updatedAt = updatedAt; |
// this.updatedAt = updatedAt;
|
||||
} |
// }
|
||||
|
//
|
||||
public Byte getRecStatus() { |
// public Byte getRecStatus() {
|
||||
return recStatus; |
// return recStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
public void setRecStatus(Byte recStatus) { |
// public void setRecStatus(Byte recStatus) {
|
||||
this.recStatus = recStatus; |
// this.recStatus = recStatus;
|
||||
} |
// }
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public String toString() { |
// public String toString() {
|
||||
StringBuilder sb = new StringBuilder(); |
// StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName()); |
// sb.append(getClass().getSimpleName());
|
||||
sb.append(" ["); |
// sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode()); |
// sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id); |
// sb.append(", id=").append(id);
|
||||
sb.append(", deliverId=").append(deliverId); |
// sb.append(", deliverId=").append(deliverId);
|
||||
sb.append(", memberId=").append(memberId); |
// sb.append(", memberId=").append(memberId);
|
||||
sb.append(", score=").append(score); |
// sb.append(", score=").append(score);
|
||||
sb.append(", remark=").append(remark); |
// sb.append(", remark=").append(remark);
|
||||
sb.append(", status=").append(status); |
// sb.append(", status=").append(status);
|
||||
sb.append(", createdAt=").append(createdAt); |
// sb.append(", createdAt=").append(createdAt);
|
||||
sb.append(", updatedAt=").append(updatedAt); |
// sb.append(", updatedAt=").append(updatedAt);
|
||||
sb.append(", recStatus=").append(recStatus); |
// sb.append(", recStatus=").append(recStatus);
|
||||
sb.append("]"); |
// sb.append("]");
|
||||
return sb.toString(); |
// return sb.toString();
|
||||
} |
// }
|
||||
} |
//}
|
||||
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,72 +1,72 @@ |
|||||
package com.ccsens.common.bean.vo; |
//package com.ccsens.common.bean.vo;
|
||||
|
//
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
//import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModel; |
//import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty; |
//import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data; |
//import lombok.Data;
|
||||
|
//
|
||||
import javax.validation.constraints.NotNull; |
//import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList; |
//import java.util.ArrayList;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
@Data |
//@Data
|
||||
public class CClockingInVo { |
//public class CClockingInVo {
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("考勤信息") |
// @ApiModel("考勤信息")
|
||||
public static class ClockingInInfo{ |
// public static class ClockingInInfo{
|
||||
@ApiModelProperty("时间") |
// @ApiModelProperty("时间")
|
||||
private String dateTime; |
// private String dateTime;
|
||||
@ApiModelProperty("打卡记录") |
// @ApiModelProperty("打卡记录")
|
||||
private List<ClockRecord> recordList = new ArrayList<>(); |
// private List<ClockRecord> recordList = new ArrayList<>();
|
||||
} |
// }
|
||||
@Data |
// @Data
|
||||
@ApiModel("打卡记录") |
// @ApiModel("打卡记录")
|
||||
public static class ClockRecord{ |
// public static class ClockRecord{
|
||||
@ApiModelProperty("记录id") |
// @ApiModelProperty("记录id")
|
||||
private Long id; |
// private Long id;
|
||||
@ApiModelProperty("成员id") |
// @ApiModelProperty("成员id")
|
||||
private Long memberId; |
// private Long memberId;
|
||||
@ApiModelProperty("成员名称") |
// @ApiModelProperty("成员名称")
|
||||
private String memberName; |
// private String memberName;
|
||||
@JsonIgnore |
// @JsonIgnore
|
||||
@ApiModelProperty("成员UserId") |
// @ApiModelProperty("成员UserId")
|
||||
private Long memberUserId; |
// private Long memberUserId;
|
||||
@ApiModelProperty("早打卡时间") |
// @ApiModelProperty("早打卡时间")
|
||||
private Long morning; |
// private Long morning;
|
||||
@ApiModelProperty("早打卡状态") |
// @ApiModelProperty("早打卡状态")
|
||||
private Byte morningStatus; |
// private Byte morningStatus;
|
||||
@ApiModelProperty("晚打卡时间") |
// @ApiModelProperty("晚打卡时间")
|
||||
private Long night; |
// private Long night;
|
||||
@ApiModelProperty("晚打卡状态") |
// @ApiModelProperty("晚打卡状态")
|
||||
private Byte nightStatus; |
// private Byte nightStatus;
|
||||
@ApiModelProperty("检查人id") |
// @ApiModelProperty("检查人id")
|
||||
private Long checkerId; |
// private Long checkerId;
|
||||
@ApiModelProperty("检查人名字") |
// @ApiModelProperty("检查人名字")
|
||||
private String checkerName; |
// private String checkerName;
|
||||
@ApiModelProperty("上次检查人id") |
// @ApiModelProperty("上次检查人id")
|
||||
private Long lastCheckerId; |
// private Long lastCheckerId;
|
||||
@ApiModelProperty("上次检查人名字") |
// @ApiModelProperty("上次检查人名字")
|
||||
private String lastCheckerName; |
// private String lastCheckerName;
|
||||
@ApiModelProperty("打卡人不是不是我(0-否,1-是)") |
// @ApiModelProperty("打卡人不是不是我(0-否,1-是)")
|
||||
private Byte isMine = 0; |
// private Byte isMine = 0;
|
||||
@ApiModelProperty("检查人是不是我(0-否,1-是)") |
// @ApiModelProperty("检查人是不是我(0-否,1-是)")
|
||||
private Byte isChecker = 0; |
// private Byte isChecker = 0;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("excel路径") |
// @ApiModel("excel路径")
|
||||
public static class ExcelUrl{ |
// public static class ExcelUrl{
|
||||
@ApiModelProperty("文件路径") |
// @ApiModelProperty("文件路径")
|
||||
private String url; |
// private String url;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("上一次检查人") |
// @ApiModel("上一次检查人")
|
||||
public static class LastChecker{ |
// public static class LastChecker{
|
||||
@ApiModelProperty("上一次检查人Id") |
// @ApiModelProperty("上一次检查人Id")
|
||||
private Long lastCheckerId; |
// private Long lastCheckerId;
|
||||
@ApiModelProperty("上次检查人名字") |
// @ApiModelProperty("上次检查人名字")
|
||||
private String lastCheckerName; |
// private String lastCheckerName;
|
||||
} |
// }
|
||||
} |
//}
|
||||
|
|||||
@ -1,68 +1,68 @@ |
|||||
package com.ccsens.common.bean.vo; |
//package com.ccsens.common.bean.vo;
|
||||
|
//
|
||||
import io.swagger.annotations.ApiModel; |
//import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty; |
//import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data; |
//import lombok.Data;
|
||||
|
//
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
@Data |
//@Data
|
||||
public class CDeliverVo { |
//public class CDeliverVo {
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("所有检查人信息") |
// @ApiModel("所有检查人信息")
|
||||
public static class Checker{ |
// public static class Checker{
|
||||
@ApiModelProperty("检查人id") |
// @ApiModelProperty("检查人id")
|
||||
private Long memberId; |
// private Long memberId;
|
||||
@ApiModelProperty("检查人名字") |
// @ApiModelProperty("检查人名字")
|
||||
private String name; |
// private String name;
|
||||
} |
// }
|
||||
|
//
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("项目下的交付物记录") |
// @ApiModel("项目下的交付物记录")
|
||||
public static class DeliverOfProject{ |
// public static class DeliverOfProject{
|
||||
@ApiModelProperty("项目名称") |
// @ApiModelProperty("项目名称")
|
||||
private String projectName; |
// private String projectName;
|
||||
@ApiModelProperty("任务列表") |
// @ApiModelProperty("任务列表")
|
||||
private List<DeliverOfTask> deliverOfTaskList; |
// private List<DeliverOfTask> deliverOfTaskList;
|
||||
} |
// }
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("任务的交付物历史") |
// @ApiModel("任务的交付物历史")
|
||||
public static class DeliverOfTask{ |
// public static class DeliverOfTask{
|
||||
@ApiModelProperty("交付物id") |
// @ApiModelProperty("交付物id")
|
||||
private String id; |
// private String id;
|
||||
@ApiModelProperty("上传人名字") |
// @ApiModelProperty("上传人名字")
|
||||
private String name; |
// private String name;
|
||||
@ApiModelProperty("任务名称") |
// @ApiModelProperty("任务名称")
|
||||
private String taskName; |
// private String taskName;
|
||||
@ApiModelProperty("上传时间") |
// @ApiModelProperty("上传时间")
|
||||
private Long time; |
// private Long time;
|
||||
@ApiModelProperty("文本内容") |
// @ApiModelProperty("文本内容")
|
||||
private String content; |
// private String content;
|
||||
@ApiModelProperty("检查人列表") |
// @ApiModelProperty("检查人列表")
|
||||
private List<CheckerInfo> checkerList; |
// private List<CheckerInfo> checkerList;
|
||||
} |
// }
|
||||
|
//
|
||||
|
//
|
||||
@Data |
// @Data
|
||||
@ApiModel("检查人信息") |
// @ApiModel("检查人信息")
|
||||
public static class CheckerInfo{ |
// public static class CheckerInfo{
|
||||
@ApiModelProperty("检查记录id") |
// @ApiModelProperty("检查记录id")
|
||||
private String checkId; |
// private String checkId;
|
||||
@ApiModelProperty("检查人id") |
// @ApiModelProperty("检查人id")
|
||||
private Long checkerId; |
// private Long checkerId;
|
||||
@ApiModelProperty("检查人名字") |
// @ApiModelProperty("检查人名字")
|
||||
private String checkerName; |
// private String checkerName;
|
||||
@ApiModelProperty("检查状态(0-未审核,1-通过,2-驳回)") |
// @ApiModelProperty("检查状态(0-未审核,1-通过,2-驳回)")
|
||||
private Byte status; |
// private Byte status;
|
||||
@ApiModelProperty("分数") |
// @ApiModelProperty("分数")
|
||||
private String score; |
// private String score;
|
||||
@ApiModelProperty("备注") |
// @ApiModelProperty("备注")
|
||||
private String remark; |
// private String remark;
|
||||
@ApiModelProperty("是不是我(0-否,1-是)") |
// @ApiModelProperty("是不是我(0-否,1-是)")
|
||||
private Byte isMine; |
// private Byte isMine;
|
||||
|
//
|
||||
} |
// }
|
||||
} |
//}
|
||||
|
|||||
@ -1,38 +1,38 @@ |
|||||
package com.ccsens.common.persist.dao; |
//package com.ccsens.common.persist.dao;
|
||||
|
//
|
||||
import com.ccsens.common.bean.po.ProClockingIn; |
//import com.ccsens.common.bean.po.ProClockingIn;
|
||||
import com.ccsens.common.bean.vo.CClockingInVo; |
//import com.ccsens.common.bean.vo.CClockingInVo;
|
||||
import com.ccsens.common.persist.mapper.ProClockingInMapper; |
//import com.ccsens.common.persist.mapper.ProClockingInMapper;
|
||||
import org.apache.ibatis.annotations.Param; |
//import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository; |
//import org.springframework.stereotype.Repository;
|
||||
|
//
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author AUSU |
// * @author AUSU
|
||||
*/ |
// */
|
||||
@Repository |
//@Repository
|
||||
public interface ProClockingInDao extends ProClockingInMapper { |
//public interface ProClockingInDao extends ProClockingInMapper {
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询成员打卡记录 |
// * 查询成员打卡记录
|
||||
* @param memberIdList 成员id列表 |
// * @param memberIdList 成员id列表
|
||||
* @return 打卡记录列表 |
// * @return 打卡记录列表
|
||||
*/ |
// */
|
||||
List<CClockingInVo.ClockRecord> queryByMemberId(@Param("memberIdList") List<Long> memberIdList); |
// List<CClockingInVo.ClockRecord> queryByMemberId(@Param("memberIdList") List<Long> memberIdList);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询该成员今天是否有打卡记录 |
// * 查询该成员今天是否有打卡记录
|
||||
* @param memberId 成员id |
// * @param memberId 成员id
|
||||
* @param currentTimeMillis 当前时间时间戳 |
// * @param currentTimeMillis 当前时间时间戳
|
||||
* @return 打卡记录 |
// * @return 打卡记录
|
||||
*/ |
// */
|
||||
ProClockingIn queryHaveData(@Param("memberId") Long memberId,@Param("time") long currentTimeMillis); |
// ProClockingIn queryHaveData(@Param("memberId") Long memberId,@Param("time") long currentTimeMillis);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询上一次打卡的检查人 |
// * 查询上一次打卡的检查人
|
||||
* @param memberId 打卡人id |
// * @param memberId 打卡人id
|
||||
* @return 上一次检查人的信息 |
// * @return 上一次检查人的信息
|
||||
*/ |
// */
|
||||
CClockingInVo.LastChecker queryLastChecker(@Param("memberId") Long memberId); |
// CClockingInVo.LastChecker queryLastChecker(@Param("memberId") Long memberId);
|
||||
} |
//}
|
||||
|
|||||
@ -1,9 +1,9 @@ |
|||||
package com.ccsens.common.persist.dao; |
//package com.ccsens.common.persist.dao;
|
||||
|
//
|
||||
import com.ccsens.common.persist.mapper.ProDeliverCheckerMapper; |
//import com.ccsens.common.persist.mapper.ProDeliverCheckerMapper;
|
||||
import org.springframework.stereotype.Repository; |
//import org.springframework.stereotype.Repository;
|
||||
|
//
|
||||
@Repository |
//@Repository
|
||||
public interface ProDeliverCheckerDao extends ProDeliverCheckerMapper { |
//public interface ProDeliverCheckerDao extends ProDeliverCheckerMapper {
|
||||
|
//
|
||||
} |
//}
|
||||
|
|||||
@ -1,26 +1,26 @@ |
|||||
package com.ccsens.common.persist.dao; |
//package com.ccsens.common.persist.dao;
|
||||
|
//
|
||||
import com.ccsens.common.bean.dto.CDeliverDto; |
//import com.ccsens.common.bean.dto.CDeliverDto;
|
||||
import com.ccsens.common.bean.vo.CDeliverVo; |
//import com.ccsens.common.bean.vo.CDeliverVo;
|
||||
import com.ccsens.common.persist.mapper.ProDeliverMapper; |
//import com.ccsens.common.persist.mapper.ProDeliverMapper;
|
||||
import org.springframework.stereotype.Repository; |
//import org.springframework.stereotype.Repository;
|
||||
|
//
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
@Repository |
//@Repository
|
||||
public interface ProDeliverDao extends ProDeliverMapper { |
//public interface ProDeliverDao extends ProDeliverMapper {
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 根据任务id查询交付物记录 |
// * 根据任务id查询交付物记录
|
||||
* @param params 任务id |
// * @param params 任务id
|
||||
* @return 交付物记录列表 |
// * @return 交付物记录列表
|
||||
*/ |
// */
|
||||
List<CDeliverVo.DeliverOfTask> queryDeliverOfTask(CDeliverDto.QueryDeliverOfTask params); |
// List<CDeliverVo.DeliverOfTask> queryDeliverOfTask(CDeliverDto.QueryDeliverOfTask params);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询项目下的所有任务交付记录 |
// * 查询项目下的所有任务交付记录
|
||||
* @param params 项目id |
// * @param params 项目id
|
||||
* @return 所有项目及交付物 |
// * @return 所有项目及交付物
|
||||
*/ |
// */
|
||||
List<CDeliverVo.DeliverOfTask> queryDeliverOfProject(CDeliverDto.QueryDeliverOfProject params); |
// List<CDeliverVo.DeliverOfTask> queryDeliverOfProject(CDeliverDto.QueryDeliverOfProject params);
|
||||
} |
//}
|
||||
|
|||||
@ -1,30 +1,30 @@ |
|||||
package com.ccsens.common.persist.mapper; |
//package com.ccsens.common.persist.mapper;
|
||||
|
//
|
||||
import com.ccsens.common.bean.po.ProClockingIn; |
//import com.ccsens.common.bean.po.ProClockingIn;
|
||||
import com.ccsens.common.bean.po.ProClockingInExample; |
//import com.ccsens.common.bean.po.ProClockingInExample;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param; |
//import org.apache.ibatis.annotations.Param;
|
||||
|
//
|
||||
public interface ProClockingInMapper { |
//public interface ProClockingInMapper {
|
||||
long countByExample(ProClockingInExample example); |
// long countByExample(ProClockingInExample example);
|
||||
|
//
|
||||
int deleteByExample(ProClockingInExample example); |
// int deleteByExample(ProClockingInExample example);
|
||||
|
//
|
||||
int deleteByPrimaryKey(Long id); |
// int deleteByPrimaryKey(Long id);
|
||||
|
//
|
||||
int insert(ProClockingIn record); |
// int insert(ProClockingIn record);
|
||||
|
//
|
||||
int insertSelective(ProClockingIn record); |
// int insertSelective(ProClockingIn record);
|
||||
|
//
|
||||
List<ProClockingIn> selectByExample(ProClockingInExample example); |
// List<ProClockingIn> selectByExample(ProClockingInExample example);
|
||||
|
//
|
||||
ProClockingIn selectByPrimaryKey(Long id); |
// ProClockingIn selectByPrimaryKey(Long id);
|
||||
|
//
|
||||
int updateByExampleSelective(@Param("record") ProClockingIn record, @Param("example") ProClockingInExample example); |
// int updateByExampleSelective(@Param("record") ProClockingIn record, @Param("example") ProClockingInExample example);
|
||||
|
//
|
||||
int updateByExample(@Param("record") ProClockingIn record, @Param("example") ProClockingInExample example); |
// int updateByExample(@Param("record") ProClockingIn record, @Param("example") ProClockingInExample example);
|
||||
|
//
|
||||
int updateByPrimaryKeySelective(ProClockingIn record); |
// int updateByPrimaryKeySelective(ProClockingIn record);
|
||||
|
//
|
||||
int updateByPrimaryKey(ProClockingIn record); |
// int updateByPrimaryKey(ProClockingIn record);
|
||||
} |
//}
|
||||
@ -1,30 +1,30 @@ |
|||||
package com.ccsens.common.persist.mapper; |
//package com.ccsens.common.persist.mapper;
|
||||
|
//
|
||||
import com.ccsens.common.bean.po.ProDeliverChecker; |
//import com.ccsens.common.bean.po.ProDeliverChecker;
|
||||
import com.ccsens.common.bean.po.ProDeliverCheckerExample; |
//import com.ccsens.common.bean.po.ProDeliverCheckerExample;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param; |
//import org.apache.ibatis.annotations.Param;
|
||||
|
//
|
||||
public interface ProDeliverCheckerMapper { |
//public interface ProDeliverCheckerMapper {
|
||||
long countByExample(ProDeliverCheckerExample example); |
// long countByExample(ProDeliverCheckerExample example);
|
||||
|
//
|
||||
int deleteByExample(ProDeliverCheckerExample example); |
// int deleteByExample(ProDeliverCheckerExample example);
|
||||
|
//
|
||||
int deleteByPrimaryKey(Long id); |
// int deleteByPrimaryKey(Long id);
|
||||
|
//
|
||||
int insert(ProDeliverChecker record); |
// int insert(ProDeliverChecker record);
|
||||
|
//
|
||||
int insertSelective(ProDeliverChecker record); |
// int insertSelective(ProDeliverChecker record);
|
||||
|
//
|
||||
List<ProDeliverChecker> selectByExample(ProDeliverCheckerExample example); |
// List<ProDeliverChecker> selectByExample(ProDeliverCheckerExample example);
|
||||
|
//
|
||||
ProDeliverChecker selectByPrimaryKey(Long id); |
// ProDeliverChecker selectByPrimaryKey(Long id);
|
||||
|
//
|
||||
int updateByExampleSelective(@Param("record") ProDeliverChecker record, @Param("example") ProDeliverCheckerExample example); |
// int updateByExampleSelective(@Param("record") ProDeliverChecker record, @Param("example") ProDeliverCheckerExample example);
|
||||
|
//
|
||||
int updateByExample(@Param("record") ProDeliverChecker record, @Param("example") ProDeliverCheckerExample example); |
// int updateByExample(@Param("record") ProDeliverChecker record, @Param("example") ProDeliverCheckerExample example);
|
||||
|
//
|
||||
int updateByPrimaryKeySelective(ProDeliverChecker record); |
// int updateByPrimaryKeySelective(ProDeliverChecker record);
|
||||
|
//
|
||||
int updateByPrimaryKey(ProDeliverChecker record); |
// int updateByPrimaryKey(ProDeliverChecker record);
|
||||
} |
//}
|
||||
@ -1,30 +1,30 @@ |
|||||
package com.ccsens.common.persist.mapper; |
//package com.ccsens.common.persist.mapper;
|
||||
|
//
|
||||
import com.ccsens.common.bean.po.ProDeliver; |
//import com.ccsens.common.bean.po.ProDeliver;
|
||||
import com.ccsens.common.bean.po.ProDeliverExample; |
//import com.ccsens.common.bean.po.ProDeliverExample;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param; |
//import org.apache.ibatis.annotations.Param;
|
||||
|
//
|
||||
public interface ProDeliverMapper { |
//public interface ProDeliverMapper {
|
||||
long countByExample(ProDeliverExample example); |
// long countByExample(ProDeliverExample example);
|
||||
|
//
|
||||
int deleteByExample(ProDeliverExample example); |
// int deleteByExample(ProDeliverExample example);
|
||||
|
//
|
||||
int deleteByPrimaryKey(Long id); |
// int deleteByPrimaryKey(Long id);
|
||||
|
//
|
||||
int insert(ProDeliver record); |
// int insert(ProDeliver record);
|
||||
|
//
|
||||
int insertSelective(ProDeliver record); |
// int insertSelective(ProDeliver record);
|
||||
|
//
|
||||
List<ProDeliver> selectByExample(ProDeliverExample example); |
// List<ProDeliver> selectByExample(ProDeliverExample example);
|
||||
|
//
|
||||
ProDeliver selectByPrimaryKey(Long id); |
// ProDeliver selectByPrimaryKey(Long id);
|
||||
|
//
|
||||
int updateByExampleSelective(@Param("record") ProDeliver record, @Param("example") ProDeliverExample example); |
// int updateByExampleSelective(@Param("record") ProDeliver record, @Param("example") ProDeliverExample example);
|
||||
|
//
|
||||
int updateByExample(@Param("record") ProDeliver record, @Param("example") ProDeliverExample example); |
// int updateByExample(@Param("record") ProDeliver record, @Param("example") ProDeliverExample example);
|
||||
|
//
|
||||
int updateByPrimaryKeySelective(ProDeliver record); |
// int updateByPrimaryKeySelective(ProDeliver record);
|
||||
|
//
|
||||
int updateByPrimaryKey(ProDeliver record); |
// int updateByPrimaryKey(ProDeliver record);
|
||||
} |
//}
|
||||
@ -1,356 +1,356 @@ |
|||||
package com.ccsens.common.service; |
//package com.ccsens.common.service;
|
||||
|
//
|
||||
import cn.hutool.core.bean.BeanUtil; |
//import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil; |
//import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil; |
//import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Snowflake; |
//import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.ObjectUtil; |
//import cn.hutool.core.util.ObjectUtil;
|
||||
import com.ccsens.common.bean.dto.CClockingInDto; |
//import com.ccsens.common.bean.dto.CClockingInDto;
|
||||
import com.ccsens.common.bean.po.ProClockingIn; |
//import com.ccsens.common.bean.po.ProClockingIn;
|
||||
import com.ccsens.common.bean.po.ProMember; |
//import com.ccsens.common.bean.po.ProMember;
|
||||
import com.ccsens.common.bean.vo.CClockingInVo; |
//import com.ccsens.common.bean.vo.CClockingInVo;
|
||||
import com.ccsens.common.persist.dao.ProClockingInDao; |
//import com.ccsens.common.persist.dao.ProClockingInDao;
|
||||
import com.ccsens.common.persist.dao.ProMemberDao; |
//import com.ccsens.common.persist.dao.ProMemberDao;
|
||||
import com.ccsens.common.util.CommonCodeError; |
//import com.ccsens.common.util.CommonCodeError;
|
||||
import com.ccsens.util.PoiUtil; |
//import com.ccsens.util.PoiUtil;
|
||||
import com.ccsens.util.PropUtil; |
//import com.ccsens.util.PropUtil;
|
||||
import com.ccsens.util.WebConstant; |
//import com.ccsens.util.WebConstant;
|
||||
import com.ccsens.util.exception.BaseException; |
//import com.ccsens.util.exception.BaseException;
|
||||
import lombok.Data; |
//import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j; |
//import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook; |
//import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
//import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.stereotype.Service; |
//import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation; |
//import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional; |
//import org.springframework.transaction.annotation.Transactional;
|
||||
|
//
|
||||
import javax.annotation.Resource; |
//import javax.annotation.Resource;
|
||||
import java.io.File; |
//import java.io.File;
|
||||
import java.io.FileOutputStream; |
//import java.io.FileOutputStream;
|
||||
import java.io.IOException; |
//import java.io.IOException;
|
||||
import java.io.OutputStream; |
//import java.io.OutputStream;
|
||||
import java.text.DateFormat; |
//import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat; |
//import java.text.SimpleDateFormat;
|
||||
import java.util.*; |
//import java.util.*;
|
||||
import java.util.stream.Collectors; |
//import java.util.stream.Collectors;
|
||||
|
//
|
||||
@Slf4j |
//@Slf4j
|
||||
@Service |
//@Service
|
||||
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
//@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
|
||||
public class ClockingInService implements IClockingInService { |
//public class ClockingInService implements IClockingInService {
|
||||
|
//
|
||||
@Resource |
// @Resource
|
||||
private ProMemberDao memberDao; |
// private ProMemberDao memberDao;
|
||||
@Resource |
// @Resource
|
||||
private ProClockingInDao clockingInDao; |
// private ProClockingInDao clockingInDao;
|
||||
@Resource |
// @Resource
|
||||
private Snowflake snowflake; |
// private Snowflake snowflake;
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public List<CClockingInVo.ClockingInInfo> queryClockingIn(CClockingInDto.QueryClockingIn params, Long userId) { |
// public List<CClockingInVo.ClockingInInfo> queryClockingIn(CClockingInDto.QueryClockingIn params, Long userId) {
|
||||
//返回值
|
// //返回值
|
||||
List<CClockingInVo.ClockingInInfo> list = new ArrayList<>(); |
// List<CClockingInVo.ClockingInInfo> list = new ArrayList<>();
|
||||
//创建时间
|
// //创建时间
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date startTimeParam = new Date(params.getStartTime()); |
// Date startTimeParam = new Date(params.getStartTime());
|
||||
Date endTimeParam = new Date(params.getEndTime()); |
// Date endTimeParam = new Date(params.getEndTime());
|
||||
long dayDifference = DateUtil.betweenDay(startTimeParam, endTimeParam, false)+1; |
// long dayDifference = DateUtil.betweenDay(startTimeParam, endTimeParam, false)+1;
|
||||
GregorianCalendar calendar = new GregorianCalendar(); |
// GregorianCalendar calendar = new GregorianCalendar();
|
||||
calendar.setTime(startTimeParam); |
// calendar.setTime(startTimeParam);
|
||||
CClockingInVo.ClockingInInfo start = new CClockingInVo.ClockingInInfo(); |
// CClockingInVo.ClockingInInfo start = new CClockingInVo.ClockingInInfo();
|
||||
start.setDateTime(format.format(startTimeParam)); |
// start.setDateTime(format.format(startTimeParam));
|
||||
list.add(start); |
// list.add(start);
|
||||
for (long i = 1; i < dayDifference; i++) { |
// for (long i = 1; i < dayDifference; i++) {
|
||||
calendar.add(Calendar.DATE,1); |
// calendar.add(Calendar.DATE,1);
|
||||
Date time = calendar.getTime(); |
// Date time = calendar.getTime();
|
||||
CClockingInVo.ClockingInInfo clockingInInfo = new CClockingInVo.ClockingInInfo(); |
// CClockingInVo.ClockingInInfo clockingInInfo = new CClockingInVo.ClockingInInfo();
|
||||
clockingInInfo.setDateTime(format.format(time)); |
// clockingInInfo.setDateTime(format.format(time));
|
||||
list.add(clockingInInfo); |
// list.add(clockingInInfo);
|
||||
} |
// }
|
||||
CClockingInVo.ClockingInInfo end = new CClockingInVo.ClockingInInfo(); |
// CClockingInVo.ClockingInInfo end = new CClockingInVo.ClockingInInfo();
|
||||
end.setDateTime(format.format(endTimeParam)); |
// end.setDateTime(format.format(endTimeParam));
|
||||
list.add(end); |
// list.add(end);
|
||||
|
//
|
||||
//添加成员信息
|
// //添加成员信息
|
||||
//1.查询全部
|
// //1.查询全部
|
||||
|
//
|
||||
List<Long> memberIdList = new ArrayList<>(); |
// List<Long> memberIdList = new ArrayList<>();
|
||||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
// Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId);
|
||||
memberIdList.add(userOfMemberId); |
// memberIdList.add(userOfMemberId);
|
||||
ProMember member = memberDao.queryMemberOfRole(userOfMemberId,params.getRoleId()); |
// ProMember member = memberDao.queryMemberOfRole(userOfMemberId,params.getRoleId());
|
||||
if (CollectionUtil.isEmpty(params.getMemberIdList())){ |
// if (CollectionUtil.isEmpty(params.getMemberIdList())){
|
||||
List<CClockingInVo.ClockRecord> clockRecordList = memberDao.queryMembersOfClock(params.getProjectId(),userOfMemberId,params.getRoleId()); |
// List<CClockingInVo.ClockRecord> clockRecordList = memberDao.queryMembersOfClock(params.getProjectId(),userOfMemberId,params.getRoleId());
|
||||
memberIdList.addAll(clockRecordList.stream().map(CClockingInVo.ClockRecord::getMemberId).collect(Collectors.toList())); |
// memberIdList.addAll(clockRecordList.stream().map(CClockingInVo.ClockRecord::getMemberId).collect(Collectors.toList()));
|
||||
for (CClockingInVo.ClockingInInfo clockingInInfo : list) { |
// for (CClockingInVo.ClockingInInfo clockingInInfo : list) {
|
||||
if (ObjectUtil.isNotNull(member)) { |
// if (ObjectUtil.isNotNull(member)) {
|
||||
CClockingInVo.ClockRecord clockRecord = new CClockingInVo.ClockRecord(); |
// CClockingInVo.ClockRecord clockRecord = new CClockingInVo.ClockRecord();
|
||||
clockRecord.setMemberId(member.getId()); |
// clockRecord.setMemberId(member.getId());
|
||||
clockRecord.setMemberName(member.getName()); |
// clockRecord.setMemberName(member.getName());
|
||||
clockRecord.setMemberUserId(member.getUserId()); |
// clockRecord.setMemberUserId(member.getUserId());
|
||||
clockingInInfo.getRecordList().add(clockRecord); |
// clockingInInfo.getRecordList().add(clockRecord);
|
||||
if (member.getUserId().equals(clockRecord.getMemberUserId())) { |
// if (member.getUserId().equals(clockRecord.getMemberUserId())) {
|
||||
clockRecord.setIsMine((byte)1); |
// clockRecord.setIsMine((byte)1);
|
||||
} |
// }
|
||||
} |
// }
|
||||
for (CClockingInVo.ClockRecord record : clockRecordList) { |
// for (CClockingInVo.ClockRecord record : clockRecordList) {
|
||||
CClockingInVo.ClockRecord otherClockRecord = new CClockingInVo.ClockRecord(); |
// CClockingInVo.ClockRecord otherClockRecord = new CClockingInVo.ClockRecord();
|
||||
otherClockRecord.setMemberId(record.getMemberId()); |
// otherClockRecord.setMemberId(record.getMemberId());
|
||||
otherClockRecord.setMemberName(record.getMemberName()); |
// otherClockRecord.setMemberName(record.getMemberName());
|
||||
otherClockRecord.setMemberUserId(record.getMemberUserId()); |
// otherClockRecord.setMemberUserId(record.getMemberUserId());
|
||||
clockingInInfo.getRecordList().add(otherClockRecord); |
// clockingInInfo.getRecordList().add(otherClockRecord);
|
||||
if (member.getUserId().equals(otherClockRecord.getMemberUserId())) { |
// if (member.getUserId().equals(otherClockRecord.getMemberUserId())) {
|
||||
record.setIsMine((byte)1); |
// record.setIsMine((byte)1);
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
}else { |
// }else {
|
||||
//2.筛选成员
|
// //2.筛选成员
|
||||
List<CClockingInVo.ClockRecord> clockRecordList = memberDao.queryMemberByIdList(params.getMemberIdList(),params.getRoleId()); |
// List<CClockingInVo.ClockRecord> clockRecordList = memberDao.queryMemberByIdList(params.getMemberIdList(),params.getRoleId());
|
||||
if (CollectionUtil.isNotEmpty(clockRecordList)) { |
// if (CollectionUtil.isNotEmpty(clockRecordList)) {
|
||||
memberIdList.addAll(clockRecordList.stream().map(CClockingInVo.ClockRecord::getMemberId).collect(Collectors.toList())); |
// memberIdList.addAll(clockRecordList.stream().map(CClockingInVo.ClockRecord::getMemberId).collect(Collectors.toList()));
|
||||
for (CClockingInVo.ClockingInInfo clockingInInfo : list) { |
// for (CClockingInVo.ClockingInInfo clockingInInfo : list) {
|
||||
for (CClockingInVo.ClockRecord clockRecord : clockRecordList) { |
// for (CClockingInVo.ClockRecord clockRecord : clockRecordList) {
|
||||
CClockingInVo.ClockRecord filterRecord = new CClockingInVo.ClockRecord(); |
// CClockingInVo.ClockRecord filterRecord = new CClockingInVo.ClockRecord();
|
||||
filterRecord.setMemberId(clockRecord.getMemberId()); |
// filterRecord.setMemberId(clockRecord.getMemberId());
|
||||
filterRecord.setMemberName(clockRecord.getMemberName()); |
// filterRecord.setMemberName(clockRecord.getMemberName());
|
||||
filterRecord.setMemberUserId(clockRecord.getMemberUserId()); |
// filterRecord.setMemberUserId(clockRecord.getMemberUserId());
|
||||
if (filterRecord.getMemberUserId().equals(userId)) { |
// if (filterRecord.getMemberUserId().equals(userId)) {
|
||||
filterRecord.setIsMine((byte)1); |
// filterRecord.setIsMine((byte)1);
|
||||
} |
// }
|
||||
clockingInInfo.getRecordList().add(filterRecord); |
// clockingInInfo.getRecordList().add(filterRecord);
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
|
//
|
||||
} |
// }
|
||||
|
//
|
||||
//查询所有成员打卡记录
|
// //查询所有成员打卡记录
|
||||
if (CollectionUtil.isNotEmpty(memberIdList)) { |
// if (CollectionUtil.isNotEmpty(memberIdList)) {
|
||||
List<CClockingInVo.ClockRecord> clockRecords = clockingInDao.queryByMemberId(memberIdList); |
// List<CClockingInVo.ClockRecord> clockRecords = clockingInDao.queryByMemberId(memberIdList);
|
||||
for (CClockingInVo.ClockingInInfo clockingInInfo2 : list) { |
// for (CClockingInVo.ClockingInInfo clockingInInfo2 : list) {
|
||||
for (CClockingInVo.ClockRecord record : clockRecords) { |
// for (CClockingInVo.ClockRecord record : clockRecords) {
|
||||
if (format.format(new Date(record.getMorning())).equals(clockingInInfo2.getDateTime()) || format.format(new Date(record.getNight())).equals(clockingInInfo2.getDateTime())) { |
// if (format.format(new Date(record.getMorning())).equals(clockingInInfo2.getDateTime()) || format.format(new Date(record.getNight())).equals(clockingInInfo2.getDateTime())) {
|
||||
for (CClockingInVo.ClockRecord clockRecord : clockingInInfo2.getRecordList()) { |
// for (CClockingInVo.ClockRecord clockRecord : clockingInInfo2.getRecordList()) {
|
||||
if (clockRecord.getMemberId().equals(record.getMemberId())) { |
// if (clockRecord.getMemberId().equals(record.getMemberId())) {
|
||||
|
//
|
||||
clockRecord.setId(record.getId()); |
// clockRecord.setId(record.getId());
|
||||
clockRecord.setMemberName(record.getMemberName()); |
// clockRecord.setMemberName(record.getMemberName());
|
||||
clockRecord.setMemberId(record.getMemberId()); |
// clockRecord.setMemberId(record.getMemberId());
|
||||
clockRecord.setCheckerName(record.getCheckerName()); |
// clockRecord.setCheckerName(record.getCheckerName());
|
||||
clockRecord.setCheckerId(record.getCheckerId()); |
// clockRecord.setCheckerId(record.getCheckerId());
|
||||
clockRecord.setMorning(record.getMorning()); |
// clockRecord.setMorning(record.getMorning());
|
||||
clockRecord.setMorningStatus(record.getMorningStatus()); |
// clockRecord.setMorningStatus(record.getMorningStatus());
|
||||
clockRecord.setNight(record.getNight()); |
// clockRecord.setNight(record.getNight());
|
||||
clockRecord.setNightStatus(record.getNightStatus()); |
// clockRecord.setNightStatus(record.getNightStatus());
|
||||
if (record.getCheckerId().equals(member.getId())) { |
// if (record.getCheckerId().equals(member.getId())) {
|
||||
clockRecord.setIsChecker((byte)1); |
// clockRecord.setIsChecker((byte)1);
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
|
//
|
||||
List<CClockingInVo.ClockingInInfo> collect = list.stream().distinct().collect(Collectors.toList()); |
// List<CClockingInVo.ClockingInInfo> collect = list.stream().distinct().collect(Collectors.toList());
|
||||
//查询上次检查人
|
// //查询上次检查人
|
||||
for (CClockingInVo.ClockingInInfo clockingInInfo : collect) { |
// for (CClockingInVo.ClockingInInfo clockingInInfo : collect) {
|
||||
if (clockingInInfo.getDateTime().equals(format.format(new Date(System.currentTimeMillis())))) { |
// if (clockingInInfo.getDateTime().equals(format.format(new Date(System.currentTimeMillis())))) {
|
||||
for (CClockingInVo.ClockRecord clockRecord : clockingInInfo.getRecordList()) { |
// for (CClockingInVo.ClockRecord clockRecord : clockingInInfo.getRecordList()) {
|
||||
CClockingInVo.LastChecker lastChecker = clockingInDao.queryLastChecker(clockRecord.getMemberId()); |
// CClockingInVo.LastChecker lastChecker = clockingInDao.queryLastChecker(clockRecord.getMemberId());
|
||||
if (ObjectUtil.isNotNull(lastChecker)) { |
// if (ObjectUtil.isNotNull(lastChecker)) {
|
||||
clockRecord.setLastCheckerId(lastChecker.getLastCheckerId()); |
// clockRecord.setLastCheckerId(lastChecker.getLastCheckerId());
|
||||
clockRecord.setLastCheckerName(lastChecker.getLastCheckerName()); |
// clockRecord.setLastCheckerName(lastChecker.getLastCheckerName());
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
return collect; |
// return collect;
|
||||
} |
// }
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public void punchTheClock(CClockingInDto.PunchTheClock params, Long userId) { |
// public void punchTheClock(CClockingInDto.PunchTheClock params, Long userId) {
|
||||
//判断选择打卡的成员和当前用户是否匹配
|
// //判断选择打卡的成员和当前用户是否匹配
|
||||
ProMember proMember = memberDao.selectByPrimaryKey(params.getMemberId()); |
// ProMember proMember = memberDao.selectByPrimaryKey(params.getMemberId());
|
||||
if(ObjectUtil.isNull(proMember) || !proMember.getUserId().equals(userId)){ |
// if(ObjectUtil.isNull(proMember) || !proMember.getUserId().equals(userId)){
|
||||
throw new BaseException(CommonCodeError.MEMBER_NOT_MINE); |
// throw new BaseException(CommonCodeError.MEMBER_NOT_MINE);
|
||||
} |
// }
|
||||
//验证打卡日期是否是今天
|
// //验证打卡日期是否是今天
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
// DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String format = df.format(new Date()); |
// String format = df.format(new Date());
|
||||
log.info("获取今天的日期:{}",format); |
// log.info("获取今天的日期:{}",format);
|
||||
if(!format.equalsIgnoreCase(df.format(new Date(params.getDateTime())))){ |
// if(!format.equalsIgnoreCase(df.format(new Date(params.getDateTime())))){
|
||||
throw new BaseException(CommonCodeError.DATE_ERROR); |
// throw new BaseException(CommonCodeError.DATE_ERROR);
|
||||
} |
// }
|
||||
//判断是否有打卡记录
|
// //判断是否有打卡记录
|
||||
ProClockingIn proClockingIn = clockingInDao.queryHaveData(params.getMemberId(),System.currentTimeMillis()); |
// ProClockingIn proClockingIn = clockingInDao.queryHaveData(params.getMemberId(),System.currentTimeMillis());
|
||||
if(ObjectUtil.isNotNull(proClockingIn)){ |
// if(ObjectUtil.isNotNull(proClockingIn)){
|
||||
//如果有记录则查找记录并修改
|
// //如果有记录则查找记录并修改
|
||||
// ProClockingIn proClockingIn = clockingInDao.selectByPrimaryKey(params.getId());
|
//// ProClockingIn proClockingIn = clockingInDao.selectByPrimaryKey(params.getId());
|
||||
if(params.getClockType() == 0 && proClockingIn.getMorningStatus() == 0){ |
// if(params.getClockType() == 0 && proClockingIn.getMorningStatus() == 0){
|
||||
proClockingIn.setMorning(System.currentTimeMillis()); |
// proClockingIn.setMorning(System.currentTimeMillis());
|
||||
proClockingIn.setMorningStatus((byte) 1); |
// proClockingIn.setMorningStatus((byte) 1);
|
||||
}else if(params.getClockType() == 1 && proClockingIn.getNightStatus() == 0){ |
// }else if(params.getClockType() == 1 && proClockingIn.getNightStatus() == 0){
|
||||
proClockingIn.setNight(System.currentTimeMillis()); |
// proClockingIn.setNight(System.currentTimeMillis());
|
||||
proClockingIn.setNightStatus((byte) 1); |
// proClockingIn.setNightStatus((byte) 1);
|
||||
} |
// }
|
||||
proClockingIn.setCheckerId(params.getCheckerId()); |
// proClockingIn.setCheckerId(params.getCheckerId());
|
||||
clockingInDao.updateByPrimaryKeySelective(proClockingIn); |
// clockingInDao.updateByPrimaryKeySelective(proClockingIn);
|
||||
}else { |
// }else {
|
||||
//如果没有记录,则添加一条新的记录
|
// //如果没有记录,则添加一条新的记录
|
||||
ProClockingIn newClockingIn = new ProClockingIn(); |
// ProClockingIn newClockingIn = new ProClockingIn();
|
||||
newClockingIn.setId(snowflake.nextId()); |
// newClockingIn.setId(snowflake.nextId());
|
||||
newClockingIn.setMemberId(params.getMemberId()); |
// newClockingIn.setMemberId(params.getMemberId());
|
||||
newClockingIn.setCheckerId(params.getCheckerId()); |
// newClockingIn.setCheckerId(params.getCheckerId());
|
||||
if(params.getClockType() == 0){ |
// if(params.getClockType() == 0){
|
||||
newClockingIn.setMorning(System.currentTimeMillis()); |
// newClockingIn.setMorning(System.currentTimeMillis());
|
||||
newClockingIn.setMorningStatus((byte) 1); |
// newClockingIn.setMorningStatus((byte) 1);
|
||||
}else if(params.getClockType() == 1){ |
// }else if(params.getClockType() == 1){
|
||||
newClockingIn.setNight(System.currentTimeMillis()); |
// newClockingIn.setNight(System.currentTimeMillis());
|
||||
newClockingIn.setNightStatus((byte) 1); |
// newClockingIn.setNightStatus((byte) 1);
|
||||
} |
// }
|
||||
clockingInDao.insertSelective(newClockingIn); |
// clockingInDao.insertSelective(newClockingIn);
|
||||
} |
// }
|
||||
|
//
|
||||
} |
// }
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public void auditRecord(CClockingInDto.Audit params, Long userId) { |
// public void auditRecord(CClockingInDto.Audit params, Long userId) {
|
||||
ProClockingIn record = clockingInDao.selectByPrimaryKey(params.getId()); |
// ProClockingIn record = clockingInDao.selectByPrimaryKey(params.getId());
|
||||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
// Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId);
|
||||
if (!record.getCheckerId().equals(userOfMemberId)) { |
// if (!record.getCheckerId().equals(userOfMemberId)) {
|
||||
throw new BaseException(CommonCodeError.NO_POWER); |
// throw new BaseException(CommonCodeError.NO_POWER);
|
||||
} |
// }
|
||||
//修改
|
// //修改
|
||||
if (0 == params.getType()) { |
// if (0 == params.getType()) {
|
||||
ProClockingIn proClockingIn = new ProClockingIn(); |
// ProClockingIn proClockingIn = new ProClockingIn();
|
||||
proClockingIn.setId(params.getId()); |
// proClockingIn.setId(params.getId());
|
||||
if (ObjectUtil.isNotNull(params.getMorning())) { |
// if (ObjectUtil.isNotNull(params.getMorning())) {
|
||||
proClockingIn.setMorning(params.getMorning()); |
// proClockingIn.setMorning(params.getMorning());
|
||||
} |
// }
|
||||
if (ObjectUtil.isNotNull(params.getNight())) { |
// if (ObjectUtil.isNotNull(params.getNight())) {
|
||||
proClockingIn.setNight(params.getNight()); |
// proClockingIn.setNight(params.getNight());
|
||||
} |
// }
|
||||
clockingInDao.updateByPrimaryKeySelective(proClockingIn); |
// clockingInDao.updateByPrimaryKeySelective(proClockingIn);
|
||||
} |
// }
|
||||
//驳回
|
// //驳回
|
||||
if (1 == params.getType()) { |
// if (1 == params.getType()) {
|
||||
ProClockingIn proClockingIn = new ProClockingIn(); |
// ProClockingIn proClockingIn = new ProClockingIn();
|
||||
proClockingIn.setId(params.getId()); |
// proClockingIn.setId(params.getId());
|
||||
if (ObjectUtil.isNotNull(params.getMorning())) { |
// if (ObjectUtil.isNotNull(params.getMorning())) {
|
||||
proClockingIn.setMorningStatus((byte)2); |
// proClockingIn.setMorningStatus((byte)2);
|
||||
} |
// }
|
||||
if (ObjectUtil.isNotNull(params.getNight())) { |
// if (ObjectUtil.isNotNull(params.getNight())) {
|
||||
proClockingIn.setNightStatus((byte)2); |
// proClockingIn.setNightStatus((byte)2);
|
||||
} |
// }
|
||||
clockingInDao.updateByPrimaryKeySelective(proClockingIn); |
// clockingInDao.updateByPrimaryKeySelective(proClockingIn);
|
||||
} |
// }
|
||||
//审核通过
|
// //审核通过
|
||||
if (2 == params.getType()) { |
// if (2 == params.getType()) {
|
||||
ProClockingIn proClockingIn = new ProClockingIn(); |
// ProClockingIn proClockingIn = new ProClockingIn();
|
||||
proClockingIn.setId(params.getId()); |
// proClockingIn.setId(params.getId());
|
||||
if (ObjectUtil.isNotNull(params.getMorning())) { |
// if (ObjectUtil.isNotNull(params.getMorning())) {
|
||||
proClockingIn.setMorningStatus((byte)3); |
// proClockingIn.setMorningStatus((byte)3);
|
||||
} |
// }
|
||||
if (ObjectUtil.isNotNull(params.getNight())) { |
// if (ObjectUtil.isNotNull(params.getNight())) {
|
||||
proClockingIn.setNightStatus((byte)3); |
// proClockingIn.setNightStatus((byte)3);
|
||||
} |
// }
|
||||
clockingInDao.updateByPrimaryKeySelective(proClockingIn); |
// clockingInDao.updateByPrimaryKeySelective(proClockingIn);
|
||||
} |
// }
|
||||
} |
// }
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public CClockingInVo.ExcelUrl exportRecord(CClockingInDto.QueryClockingIn params, Long userId) throws IOException { |
// public CClockingInVo.ExcelUrl exportRecord(CClockingInDto.QueryClockingIn params, Long userId) throws IOException {
|
||||
log.info("开始调用查询考勤方法"); |
// log.info("开始调用查询考勤方法");
|
||||
List<CClockingInVo.ClockingInInfo> clockingInInfos = queryClockingIn(params, userId); |
// List<CClockingInVo.ClockingInInfo> clockingInInfos = queryClockingIn(params, userId);
|
||||
log.info("调用查询考勤方法结束{}",clockingInInfos); |
// log.info("调用查询考勤方法结束{}",clockingInInfos);
|
||||
Workbook workbook = new XSSFWorkbook(); |
// Workbook workbook = new XSSFWorkbook();
|
||||
//空白格
|
// //空白格
|
||||
PoiUtil.PoiUtilCell blank = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell blank = new PoiUtil.PoiUtilCell();
|
||||
//excel
|
// //excel
|
||||
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
// List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
|
||||
//第一行list
|
// //第一行list
|
||||
List<PoiUtil.PoiUtilCell> firstCells = new ArrayList<>(); |
// List<PoiUtil.PoiUtilCell> firstCells = new ArrayList<>();
|
||||
//第二行list
|
// //第二行list
|
||||
List<PoiUtil.PoiUtilCell> secondCells = new ArrayList<>(); |
// List<PoiUtil.PoiUtilCell> secondCells = new ArrayList<>();
|
||||
//第一行开始
|
// //第一行开始
|
||||
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell();
|
||||
poiUtilCell.setValue(""); |
// poiUtilCell.setValue("");
|
||||
poiUtilCell.setColspan(1); |
// poiUtilCell.setColspan(1);
|
||||
poiUtilCell.setRowspan(2); |
// poiUtilCell.setRowspan(2);
|
||||
firstCells.add(poiUtilCell); |
// firstCells.add(poiUtilCell);
|
||||
//第二行开始
|
// //第二行开始
|
||||
secondCells.add(blank); |
// secondCells.add(blank);
|
||||
for (CClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) { |
// for (CClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) {
|
||||
PoiUtil.PoiUtilCell cellOne = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell cellOne = new PoiUtil.PoiUtilCell();
|
||||
cellOne.setValue(clockingInInfo.getDateTime()); |
// cellOne.setValue(clockingInInfo.getDateTime());
|
||||
cellOne.setColspan(2); |
// cellOne.setColspan(2);
|
||||
cellOne.setRowspan(1); |
// cellOne.setRowspan(1);
|
||||
firstCells.add(cellOne); |
// firstCells.add(cellOne);
|
||||
firstCells.add(blank); |
// firstCells.add(blank);
|
||||
PoiUtil.PoiUtilCell cellTwo = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell cellTwo = new PoiUtil.PoiUtilCell();
|
||||
cellTwo.setValue("早"); |
// cellTwo.setValue("早");
|
||||
secondCells.add(cellTwo); |
// secondCells.add(cellTwo);
|
||||
PoiUtil.PoiUtilCell cellTwo2 = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell cellTwo2 = new PoiUtil.PoiUtilCell();
|
||||
cellTwo2.setValue("晚"); |
// cellTwo2.setValue("晚");
|
||||
secondCells.add(cellTwo2); |
// secondCells.add(cellTwo2);
|
||||
} |
// }
|
||||
list.add(firstCells); |
// list.add(firstCells);
|
||||
list.add(secondCells); |
// list.add(secondCells);
|
||||
for (CClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) { |
// for (CClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) {
|
||||
//添加考勤人员信息
|
// //添加考勤人员信息
|
||||
for (CClockingInVo.ClockRecord clockRecord : clockingInInfo.getRecordList()) { |
// for (CClockingInVo.ClockRecord clockRecord : clockingInInfo.getRecordList()) {
|
||||
List<PoiUtil.PoiUtilCell> memberCells = new ArrayList<>(); |
// List<PoiUtil.PoiUtilCell> memberCells = new ArrayList<>();
|
||||
PoiUtil.PoiUtilCell cell = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell cell = new PoiUtil.PoiUtilCell();
|
||||
cell.setValue(clockRecord.getMemberName()); |
// cell.setValue(clockRecord.getMemberName());
|
||||
memberCells.add(cell); |
// memberCells.add(cell);
|
||||
list.add(memberCells); |
// list.add(memberCells);
|
||||
} |
// }
|
||||
break; |
// break;
|
||||
} |
// }
|
||||
|
//
|
||||
SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss"); |
// SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
|
||||
for (CClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) { |
// for (CClockingInVo.ClockingInInfo clockingInInfo : clockingInInfos) {
|
||||
for (int i = 0; i < clockingInInfo.getRecordList().size(); i++) { |
// for (int i = 0; i < clockingInInfo.getRecordList().size(); i++) {
|
||||
List<PoiUtil.PoiUtilCell> poiUtilCells = list.get(i + 2); |
// List<PoiUtil.PoiUtilCell> poiUtilCells = list.get(i + 2);
|
||||
PoiUtil.PoiUtilCell morning = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell morning = new PoiUtil.PoiUtilCell();
|
||||
if (ObjectUtil.isNull(clockingInInfo.getRecordList().get(i).getMorning()) || 0 == clockingInInfo.getRecordList().get(i).getMorning()){ |
// if (ObjectUtil.isNull(clockingInInfo.getRecordList().get(i).getMorning()) || 0 == clockingInInfo.getRecordList().get(i).getMorning()){
|
||||
morning.setValue("未打卡"); |
// morning.setValue("未打卡");
|
||||
}else if (2 == clockingInInfo.getRecordList().get(i).getMorningStatus()){ |
// }else if (2 == clockingInInfo.getRecordList().get(i).getMorningStatus()){
|
||||
morning.setValue("已驳回"); |
// morning.setValue("已驳回");
|
||||
}else { |
// }else {
|
||||
morning.setValue(format.format(new Date(clockingInInfo.getRecordList().get(i).getMorning()))); |
// morning.setValue(format.format(new Date(clockingInInfo.getRecordList().get(i).getMorning())));
|
||||
} |
// }
|
||||
poiUtilCells.add(morning); |
// poiUtilCells.add(morning);
|
||||
PoiUtil.PoiUtilCell night = new PoiUtil.PoiUtilCell(); |
// PoiUtil.PoiUtilCell night = new PoiUtil.PoiUtilCell();
|
||||
if (ObjectUtil.isNull(clockingInInfo.getRecordList().get(i).getNight()) || 0 == clockingInInfo.getRecordList().get(i).getNight()){ |
// if (ObjectUtil.isNull(clockingInInfo.getRecordList().get(i).getNight()) || 0 == clockingInInfo.getRecordList().get(i).getNight()){
|
||||
night.setValue("未打卡"); |
// night.setValue("未打卡");
|
||||
}else if (2 == clockingInInfo.getRecordList().get(i).getNightStatus()){ |
// }else if (2 == clockingInInfo.getRecordList().get(i).getNightStatus()){
|
||||
night.setValue("已驳回"); |
// night.setValue("已驳回");
|
||||
}else { |
// }else {
|
||||
night.setValue(format.format(new Date(clockingInInfo.getRecordList().get(i).getNight()))); |
// night.setValue(format.format(new Date(clockingInInfo.getRecordList().get(i).getNight())));
|
||||
} |
// }
|
||||
poiUtilCells.add(night); |
// poiUtilCells.add(night);
|
||||
|
//
|
||||
} |
// }
|
||||
} |
// }
|
||||
|
//
|
||||
|
//
|
||||
//导出操作
|
// //导出操作
|
||||
String fileName = cn.hutool.core.date.DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; |
// String fileName = cn.hutool.core.date.DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
|
||||
String path = PropUtil.path + fileName; |
// String path = PropUtil.path + fileName;
|
||||
File tmpFile = new File(path); |
// File tmpFile = new File(path);
|
||||
if (!tmpFile.getParentFile().exists()) { |
// if (!tmpFile.getParentFile().exists()) {
|
||||
tmpFile.getParentFile().mkdirs(); |
// tmpFile.getParentFile().mkdirs();
|
||||
} |
// }
|
||||
|
//
|
||||
Workbook wbs = PoiUtil.exportWB("Sheet1", list, workbook); |
// Workbook wbs = PoiUtil.exportWB("Sheet1", list, workbook);
|
||||
OutputStream stream = new FileOutputStream(tmpFile); |
// OutputStream stream = new FileOutputStream(tmpFile);
|
||||
wbs.write(stream); |
// wbs.write(stream);
|
||||
stream.close(); |
// stream.close();
|
||||
CClockingInVo.ExcelUrl excelUrl = new CClockingInVo.ExcelUrl(); |
// CClockingInVo.ExcelUrl excelUrl = new CClockingInVo.ExcelUrl();
|
||||
String url = PropUtil.imgDomain+fileName; |
// String url = PropUtil.imgDomain+fileName;
|
||||
excelUrl.setUrl(url); |
// excelUrl.setUrl(url);
|
||||
return excelUrl; |
// return excelUrl;
|
||||
} |
// }
|
||||
} |
//}
|
||||
|
|||||
@ -1,245 +1,245 @@ |
|||||
package com.ccsens.common.service; |
//package com.ccsens.common.service;
|
||||
|
//
|
||||
import cn.hutool.core.collection.CollectionUtil; |
//import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Snowflake; |
//import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.ObjectUtil; |
//import cn.hutool.core.util.ObjectUtil;
|
||||
import com.ccsens.common.bean.dto.CDeliverDto; |
//import com.ccsens.common.bean.dto.CDeliverDto;
|
||||
import com.ccsens.common.bean.message.DeliverMessageWithChecker; |
//import com.ccsens.common.bean.message.DeliverMessageWithChecker;
|
||||
import com.ccsens.common.bean.message.DeliverMessageWithUpload; |
//import com.ccsens.common.bean.message.DeliverMessageWithUpload;
|
||||
import com.ccsens.common.bean.po.ProDeliver; |
//import com.ccsens.common.bean.po.ProDeliver;
|
||||
import com.ccsens.common.bean.po.ProDeliverChecker; |
//import com.ccsens.common.bean.po.ProDeliverChecker;
|
||||
import com.ccsens.common.bean.po.ProMember; |
//import com.ccsens.common.bean.po.ProMember;
|
||||
import com.ccsens.common.bean.po.ProTaskSub; |
//import com.ccsens.common.bean.po.ProTaskSub;
|
||||
import com.ccsens.common.bean.vo.CDeliverVo; |
//import com.ccsens.common.bean.vo.CDeliverVo;
|
||||
import com.ccsens.common.bean.vo.CMemberVo; |
//import com.ccsens.common.bean.vo.CMemberVo;
|
||||
import com.ccsens.common.bean.vo.CProjectVo; |
//import com.ccsens.common.bean.vo.CProjectVo;
|
||||
import com.ccsens.common.persist.dao.*; |
//import com.ccsens.common.persist.dao.*;
|
||||
import com.ccsens.common.util.CommonCodeError; |
//import com.ccsens.common.util.CommonCodeError;
|
||||
import com.ccsens.util.JacksonUtil; |
//import com.ccsens.util.JacksonUtil;
|
||||
import com.ccsens.util.bean.message.common.InMessage; |
//import com.ccsens.util.bean.message.common.InMessage;
|
||||
import com.ccsens.util.bean.message.common.MessageConstant; |
//import com.ccsens.util.bean.message.common.MessageConstant;
|
||||
import com.ccsens.util.config.RabbitMQConfig; |
//import com.ccsens.util.config.RabbitMQConfig;
|
||||
import com.ccsens.util.exception.BaseException; |
//import com.ccsens.util.exception.BaseException;
|
||||
import com.github.pagehelper.PageHelper; |
//import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo; |
//import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j; |
//import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.core.AmqpTemplate; |
//import org.springframework.amqp.core.AmqpTemplate;
|
||||
import org.springframework.stereotype.Service; |
//import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation; |
//import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional; |
//import org.springframework.transaction.annotation.Transactional;
|
||||
|
//
|
||||
import javax.annotation.Resource; |
//import javax.annotation.Resource;
|
||||
import java.util.HashSet; |
//import java.util.HashSet;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
import java.util.Set; |
//import java.util.Set;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author AUSU |
// * @author AUSU
|
||||
*/ |
// */
|
||||
@Slf4j |
//@Slf4j
|
||||
@Service |
//@Service
|
||||
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
//@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
|
||||
public class DeliverService implements IDeliverService{ |
//public class DeliverService implements IDeliverService{
|
||||
|
//
|
||||
@Resource |
// @Resource
|
||||
private ProMemberDao memberDao; |
// private ProMemberDao memberDao;
|
||||
@Resource |
// @Resource
|
||||
private ProProjectDao projectDao; |
// private ProProjectDao projectDao;
|
||||
@Resource |
// @Resource
|
||||
private ProTaskSubDao taskSubDao; |
// private ProTaskSubDao taskSubDao;
|
||||
@Resource |
// @Resource
|
||||
private ProDeliverDao deliverDao; |
// private ProDeliverDao deliverDao;
|
||||
@Resource |
// @Resource
|
||||
private ProDeliverCheckerDao deliverCheckerDao; |
// private ProDeliverCheckerDao deliverCheckerDao;
|
||||
@Resource |
// @Resource
|
||||
private ProRoleTaskDao roleTaskDao; |
// private ProRoleTaskDao roleTaskDao;
|
||||
@Resource |
// @Resource
|
||||
private ProRoleDao roleDao; |
// private ProRoleDao roleDao;
|
||||
@Resource |
// @Resource
|
||||
private ProRoleMemberDao roleMemberDao; |
// private ProRoleMemberDao roleMemberDao;
|
||||
@Resource |
// @Resource
|
||||
private Snowflake snowflake; |
// private Snowflake snowflake;
|
||||
@Resource |
// @Resource
|
||||
private AmqpTemplate rabbitTemplate; |
// private AmqpTemplate rabbitTemplate;
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public List<CDeliverVo.Checker> queryChecker(CDeliverDto.QueryChecker params, Long userId) { |
// public List<CDeliverVo.Checker> queryChecker(CDeliverDto.QueryChecker params, Long userId) {
|
||||
return memberDao.queryChecker(params.getProjectId()); |
// return memberDao.queryChecker(params.getProjectId());
|
||||
} |
// }
|
||||
|
//
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public void saveDeliver(CDeliverDto.SaveDeliver params, Long userId) throws Exception { |
// public void saveDeliver(CDeliverDto.SaveDeliver params, Long userId) throws Exception {
|
||||
if (CollectionUtil.isEmpty(params.getCheckerList())) { |
// if (CollectionUtil.isEmpty(params.getCheckerList())) {
|
||||
throw new BaseException(CommonCodeError.CHECKER_DONT_NULL); |
// throw new BaseException(CommonCodeError.CHECKER_DONT_NULL);
|
||||
} |
// }
|
||||
CProjectVo.ProjectInfo projectById = projectDao.findProjectById(params.getProjectId()); |
// CProjectVo.ProjectInfo projectById = projectDao.findProjectById(params.getProjectId());
|
||||
if (ObjectUtil.isNull(projectById)) { |
// if (ObjectUtil.isNull(projectById)) {
|
||||
throw new BaseException(CommonCodeError.PROJECT_NOT_FOUND); |
// throw new BaseException(CommonCodeError.PROJECT_NOT_FOUND);
|
||||
} |
// }
|
||||
ProTaskSub taskSub = taskSubDao.selectByPrimaryKey(params.getTaskSubId()); |
// ProTaskSub taskSub = taskSubDao.selectByPrimaryKey(params.getTaskSubId());
|
||||
if (ObjectUtil.isNull(taskSub)) { |
// if (ObjectUtil.isNull(taskSub)) {
|
||||
throw new BaseException(CommonCodeError.NOT_TASK); |
// throw new BaseException(CommonCodeError.NOT_TASK);
|
||||
} |
// }
|
||||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
// Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId);
|
||||
if (ObjectUtil.isNull(userOfMemberId)) { |
// if (ObjectUtil.isNull(userOfMemberId)) {
|
||||
throw new BaseException(CommonCodeError.NO_POWER); |
// throw new BaseException(CommonCodeError.NO_POWER);
|
||||
} |
// }
|
||||
List<Long> userOfRoles = roleMemberDao.findMemberOfRoleIds(userOfMemberId); |
// List<Long> userOfRoles = roleMemberDao.findMemberOfRoleIds(userOfMemberId);
|
||||
//查看是否是我负责的任务
|
// //查看是否是我负责的任务
|
||||
if (CollectionUtil.isNotEmpty(userOfRoles)) { |
// if (CollectionUtil.isNotEmpty(userOfRoles)) {
|
||||
List<Long> isMyTask = roleTaskDao.isMyTask(taskSub.getTaskDetailId(), userOfRoles); |
// List<Long> isMyTask = roleTaskDao.isMyTask(taskSub.getTaskDetailId(), userOfRoles);
|
||||
if (CollectionUtil.isEmpty(isMyTask)) { |
// if (CollectionUtil.isEmpty(isMyTask)) {
|
||||
throw new BaseException(CommonCodeError.NO_POWER); |
// throw new BaseException(CommonCodeError.NO_POWER);
|
||||
} |
// }
|
||||
}else { |
// }else {
|
||||
throw new BaseException(CommonCodeError.NO_POWER); |
// throw new BaseException(CommonCodeError.NO_POWER);
|
||||
} |
// }
|
||||
|
//
|
||||
ProDeliver proDeliver = new ProDeliver(); |
// ProDeliver proDeliver = new ProDeliver();
|
||||
proDeliver.setId(snowflake.nextId()); |
// proDeliver.setId(snowflake.nextId());
|
||||
proDeliver.setTaskSubId(params.getTaskSubId()); |
// proDeliver.setTaskSubId(params.getTaskSubId());
|
||||
proDeliver.setMemberId(userOfMemberId); |
// proDeliver.setMemberId(userOfMemberId);
|
||||
proDeliver.setContent(params.getContent()); |
// proDeliver.setContent(params.getContent());
|
||||
proDeliver.setProjectId(params.getProjectId()); |
// proDeliver.setProjectId(params.getProjectId());
|
||||
proDeliver.setTime(System.currentTimeMillis()); |
// proDeliver.setTime(System.currentTimeMillis());
|
||||
deliverDao.insertSelective(proDeliver); |
// deliverDao.insertSelective(proDeliver);
|
||||
for (Long checkerId : params.getCheckerList()) { |
// for (Long checkerId : params.getCheckerList()) {
|
||||
ProDeliverChecker deliverChecker = new ProDeliverChecker(); |
// ProDeliverChecker deliverChecker = new ProDeliverChecker();
|
||||
deliverChecker.setId(snowflake.nextId()); |
// deliverChecker.setId(snowflake.nextId());
|
||||
deliverChecker.setDeliverId(proDeliver.getId()); |
// deliverChecker.setDeliverId(proDeliver.getId());
|
||||
deliverChecker.setMemberId(checkerId); |
// deliverChecker.setMemberId(checkerId);
|
||||
deliverChecker.setStatus((byte)0); |
// deliverChecker.setStatus((byte)0);
|
||||
deliverCheckerDao.insertSelective(deliverChecker); |
// deliverCheckerDao.insertSelective(deliverChecker);
|
||||
} |
// }
|
||||
//TODO 发送消息
|
// //TODO 发送消息
|
||||
sendToDeliverUploadMessage(params, userId, taskSub.getTaskDetailId(), proDeliver.getId()); |
// sendToDeliverUploadMessage(params, userId, taskSub.getTaskDetailId(), proDeliver.getId());
|
||||
} |
// }
|
||||
|
//
|
||||
public void sendToDeliverUploadMessage(CDeliverDto.SaveDeliver params, Long userId, Long taskDetailId, Long deliverId) throws Exception { |
// public void sendToDeliverUploadMessage(CDeliverDto.SaveDeliver params, Long userId, Long taskDetailId, Long deliverId) throws Exception {
|
||||
//获取任务所属的角色id
|
// //获取任务所属的角色id
|
||||
Long roleId = roleDao.getRoleIdByTaskDetailId(taskDetailId); |
// Long roleId = roleDao.getRoleIdByTaskDetailId(taskDetailId);
|
||||
//获取成员id和成员名
|
// //获取成员id和成员名
|
||||
CMemberVo.MemberIdAndName memberIdAndName = memberDao.getByUserIdAndProjectId(params.getProjectId(), userId); |
// CMemberVo.MemberIdAndName memberIdAndName = memberDao.getByUserIdAndProjectId(params.getProjectId(), userId);
|
||||
Long memberId = null; |
// Long memberId = null;
|
||||
String memberName = null; |
// String memberName = null;
|
||||
if(ObjectUtil.isNotNull(memberIdAndName)){ |
// if(ObjectUtil.isNotNull(memberIdAndName)){
|
||||
memberId = memberIdAndName.getId(); |
// memberId = memberIdAndName.getId();
|
||||
memberName = memberIdAndName.getName(); |
// memberName = memberIdAndName.getName();
|
||||
} |
// }
|
||||
//发送的消息内容
|
// //发送的消息内容
|
||||
DeliverMessageWithUpload message = new DeliverMessageWithUpload(params.getTaskSubId(), |
// DeliverMessageWithUpload message = new DeliverMessageWithUpload(params.getTaskSubId(),
|
||||
taskDetailId,deliverId,roleId,memberId,memberName); |
// taskDetailId,deliverId,roleId,memberId,memberName);
|
||||
//通过成员id批量获取userId
|
// //通过成员id批量获取userId
|
||||
List<String> userIdList = memberDao.queryUserIdByMemberId(params.getCheckerList()); |
// List<String> userIdList = memberDao.queryUserIdByMemberId(params.getCheckerList());
|
||||
if(CollectionUtil.isNotEmpty(userIdList)){ |
// if(CollectionUtil.isNotEmpty(userIdList)){
|
||||
//获取接受者的userId
|
// //获取接受者的userId
|
||||
Set<String> userIdSet = new HashSet<>(userIdList); |
// Set<String> userIdSet = new HashSet<>(userIdList);
|
||||
//封装成inMessage
|
// //封装成inMessage
|
||||
InMessage inMessage = new InMessage(); |
// InMessage inMessage = new InMessage();
|
||||
inMessage.setToDomain(MessageConstant.DomainType.User); |
// inMessage.setToDomain(MessageConstant.DomainType.User);
|
||||
inMessage.setTos(userIdSet); |
// inMessage.setTos(userIdSet);
|
||||
inMessage.setData(JacksonUtil.beanToJson(message)); |
// inMessage.setData(JacksonUtil.beanToJson(message));
|
||||
log.info("发送消息--上传交付物--:{}",inMessage); |
// log.info("发送消息--上传交付物--:{}",inMessage);
|
||||
rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, |
// rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,
|
||||
JacksonUtil.beanToJson(inMessage)); |
// JacksonUtil.beanToJson(inMessage));
|
||||
} |
// }
|
||||
} |
// }
|
||||
|
//
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public List<CDeliverVo.DeliverOfTask> queryDeliverOfTask(CDeliverDto.QueryDeliverOfTask params, Long userId) { |
// public List<CDeliverVo.DeliverOfTask> queryDeliverOfTask(CDeliverDto.QueryDeliverOfTask params, Long userId) {
|
||||
ProTaskSub taskSub = taskSubDao.selectByPrimaryKey(params.getTaskSubId()); |
// ProTaskSub taskSub = taskSubDao.selectByPrimaryKey(params.getTaskSubId());
|
||||
if (ObjectUtil.isNull(taskSub)) { |
// if (ObjectUtil.isNull(taskSub)) {
|
||||
throw new BaseException(CommonCodeError.NOT_TASK); |
// throw new BaseException(CommonCodeError.NOT_TASK);
|
||||
} |
// }
|
||||
List<CDeliverVo.DeliverOfTask> deliverOfTask = deliverDao.queryDeliverOfTask(params); |
// List<CDeliverVo.DeliverOfTask> deliverOfTask = deliverDao.queryDeliverOfTask(params);
|
||||
if (CollectionUtil.isNotEmpty(deliverOfTask)) { |
// if (CollectionUtil.isNotEmpty(deliverOfTask)) {
|
||||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
// Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId);
|
||||
// 判断检查人是否是当前用户
|
// // 判断检查人是否是当前用户
|
||||
for (CDeliverVo.DeliverOfTask deliver : deliverOfTask) { |
// for (CDeliverVo.DeliverOfTask deliver : deliverOfTask) {
|
||||
if (CollectionUtil.isNotEmpty(deliver.getCheckerList())) { |
// if (CollectionUtil.isNotEmpty(deliver.getCheckerList())) {
|
||||
for (CDeliverVo.CheckerInfo checkerInfo : deliver.getCheckerList()) { |
// for (CDeliverVo.CheckerInfo checkerInfo : deliver.getCheckerList()) {
|
||||
checkerInfo.setIsMine((byte)0); |
// checkerInfo.setIsMine((byte)0);
|
||||
if (checkerInfo.getCheckerId().equals(userOfMemberId)){ |
// if (checkerInfo.getCheckerId().equals(userOfMemberId)){
|
||||
checkerInfo.setIsMine((byte)1); |
// checkerInfo.setIsMine((byte)1);
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
} |
// }
|
||||
return deliverOfTask; |
// return deliverOfTask;
|
||||
} |
// }
|
||||
|
//
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public void checkDeliver(CDeliverDto.CheckDeliver params, Long userId) throws Exception { |
// public void checkDeliver(CDeliverDto.CheckDeliver params, Long userId) throws Exception {
|
||||
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId); |
// Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId);
|
||||
ProDeliverChecker deliverChecker = deliverCheckerDao.selectByPrimaryKey(params.getCheckId()); |
// ProDeliverChecker deliverChecker = deliverCheckerDao.selectByPrimaryKey(params.getCheckId());
|
||||
if (!userOfMemberId.equals(deliverChecker.getMemberId())) { |
// if (!userOfMemberId.equals(deliverChecker.getMemberId())) {
|
||||
throw new BaseException(CommonCodeError.NO_POWER); |
// throw new BaseException(CommonCodeError.NO_POWER);
|
||||
} |
// }
|
||||
ProDeliverChecker deliverCheck = new ProDeliverChecker(); |
// ProDeliverChecker deliverCheck = new ProDeliverChecker();
|
||||
deliverCheck.setId(params.getCheckId()); |
// deliverCheck.setId(params.getCheckId());
|
||||
deliverCheck.setStatus(params.getStatus()); |
// deliverCheck.setStatus(params.getStatus());
|
||||
deliverCheck.setRemark(params.getRemark()); |
// deliverCheck.setRemark(params.getRemark());
|
||||
deliverCheck.setScore(params.getScore()); |
// deliverCheck.setScore(params.getScore());
|
||||
deliverCheckerDao.updateByPrimaryKeySelective(deliverCheck); |
// deliverCheckerDao.updateByPrimaryKeySelective(deliverCheck);
|
||||
//TODO 发送消息
|
// //TODO 发送消息
|
||||
sendToDeliverCheckerMessage(deliverChecker.getDeliverId(),params.getProjectId(),userId); |
// sendToDeliverCheckerMessage(deliverChecker.getDeliverId(),params.getProjectId(),userId);
|
||||
} |
// }
|
||||
|
//
|
||||
private void sendToDeliverCheckerMessage(Long deliverId, Long projectId, Long userId) throws Exception { |
// private void sendToDeliverCheckerMessage(Long deliverId, Long projectId, Long userId) throws Exception {
|
||||
Long subTaskId = null; |
// Long subTaskId = null;
|
||||
Long taskDetailId = null; |
// Long taskDetailId = null;
|
||||
Long roleId = null; |
// Long roleId = null;
|
||||
Long memberId = null; |
// Long memberId = null;
|
||||
String memberName = null; |
// String memberName = null;
|
||||
//获取任务信息
|
// //获取任务信息
|
||||
ProDeliver deliver = deliverDao.selectByPrimaryKey(deliverId); |
// ProDeliver deliver = deliverDao.selectByPrimaryKey(deliverId);
|
||||
if(ObjectUtil.isNotNull(deliver)){ |
// if(ObjectUtil.isNotNull(deliver)){
|
||||
subTaskId = deliver.getTaskSubId(); |
// subTaskId = deliver.getTaskSubId();
|
||||
ProTaskSub taskSub = taskSubDao.selectByPrimaryKey(deliver.getTaskSubId()); |
// ProTaskSub taskSub = taskSubDao.selectByPrimaryKey(deliver.getTaskSubId());
|
||||
if(ObjectUtil.isNotNull(taskSub)){ |
// if(ObjectUtil.isNotNull(taskSub)){
|
||||
taskDetailId = taskSub.getTaskDetailId(); |
// taskDetailId = taskSub.getTaskDetailId();
|
||||
//获取任务所属的角色id
|
// //获取任务所属的角色id
|
||||
roleId = roleDao.getRoleIdByTaskDetailId(taskDetailId); |
// roleId = roleDao.getRoleIdByTaskDetailId(taskDetailId);
|
||||
} |
// }
|
||||
} |
// }
|
||||
//获取成员id和成员名
|
// //获取成员id和成员名
|
||||
CMemberVo.MemberIdAndName memberIdAndName = memberDao.getByUserIdAndProjectId(projectId, userId); |
// CMemberVo.MemberIdAndName memberIdAndName = memberDao.getByUserIdAndProjectId(projectId, userId);
|
||||
if(ObjectUtil.isNotNull(memberIdAndName)){ |
// if(ObjectUtil.isNotNull(memberIdAndName)){
|
||||
memberId = memberIdAndName.getId(); |
// memberId = memberIdAndName.getId();
|
||||
memberName = memberIdAndName.getName(); |
// memberName = memberIdAndName.getName();
|
||||
} |
// }
|
||||
//发送的消息内容
|
// //发送的消息内容
|
||||
DeliverMessageWithChecker checkerMessage = new DeliverMessageWithChecker(subTaskId,taskDetailId,deliverId,roleId,memberId,memberName); |
// DeliverMessageWithChecker checkerMessage = new DeliverMessageWithChecker(subTaskId,taskDetailId,deliverId,roleId,memberId,memberName);
|
||||
//获取上传者的userId(消息接收者)
|
// //获取上传者的userId(消息接收者)
|
||||
ProMember uploadMember = memberDao.selectByPrimaryKey(deliver.getMemberId()); |
// ProMember uploadMember = memberDao.selectByPrimaryKey(deliver.getMemberId());
|
||||
if(ObjectUtil.isNotNull(uploadMember)){ |
// if(ObjectUtil.isNotNull(uploadMember)){
|
||||
Set<String> userIdSet = new HashSet<>(); |
// Set<String> userIdSet = new HashSet<>();
|
||||
userIdSet.add(uploadMember.getUserId().toString()); |
// userIdSet.add(uploadMember.getUserId().toString());
|
||||
//封装成inMessage
|
// //封装成inMessage
|
||||
InMessage inMessage = new InMessage(); |
// InMessage inMessage = new InMessage();
|
||||
inMessage.setToDomain(MessageConstant.DomainType.User); |
// inMessage.setToDomain(MessageConstant.DomainType.User);
|
||||
inMessage.setTos(userIdSet); |
// inMessage.setTos(userIdSet);
|
||||
inMessage.setData(JacksonUtil.beanToJson(checkerMessage)); |
// inMessage.setData(JacksonUtil.beanToJson(checkerMessage));
|
||||
log.info("发送消息--检查交付物--:{}",inMessage); |
// log.info("发送消息--检查交付物--:{}",inMessage);
|
||||
rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, |
// rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,
|
||||
JacksonUtil.beanToJson(inMessage)); |
// JacksonUtil.beanToJson(inMessage));
|
||||
} |
// }
|
||||
} |
// }
|
||||
|
//
|
||||
|
//
|
||||
@Override |
// @Override
|
||||
public PageInfo<CDeliverVo.DeliverOfTask> queryDeliverOfProject(CDeliverDto.QueryDeliverOfProject params, Long userId) { |
// public PageInfo<CDeliverVo.DeliverOfTask> queryDeliverOfProject(CDeliverDto.QueryDeliverOfProject params, Long userId) {
|
||||
CProjectVo.ProjectInfo projectById = projectDao.findProjectById(params.getProjectId()); |
// CProjectVo.ProjectInfo projectById = projectDao.findProjectById(params.getProjectId());
|
||||
if (ObjectUtil.isNull(projectById)) { |
// if (ObjectUtil.isNull(projectById)) {
|
||||
throw new BaseException(CommonCodeError.PROJECT_NOT_FOUND); |
// throw new BaseException(CommonCodeError.PROJECT_NOT_FOUND);
|
||||
} |
// }
|
||||
PageHelper.startPage(params.getPageNum(),params.getPageSize()); |
// PageHelper.startPage(params.getPageNum(),params.getPageSize());
|
||||
List<CDeliverVo.DeliverOfTask> deliverOfTask = deliverDao.queryDeliverOfProject(params); |
// List<CDeliverVo.DeliverOfTask> deliverOfTask = deliverDao.queryDeliverOfProject(params);
|
||||
return new PageInfo<>(deliverOfTask); |
// return new PageInfo<>(deliverOfTask);
|
||||
} |
// }
|
||||
|
//
|
||||
} |
//}
|
||||
|
|||||
@ -1,43 +1,43 @@ |
|||||
package com.ccsens.common.service; |
//package com.ccsens.common.service;
|
||||
|
//
|
||||
import com.ccsens.common.bean.dto.CClockingInDto; |
//import com.ccsens.common.bean.dto.CClockingInDto;
|
||||
import com.ccsens.common.bean.vo.CClockingInVo; |
//import com.ccsens.common.bean.vo.CClockingInVo;
|
||||
|
//
|
||||
import java.io.IOException; |
//import java.io.IOException;
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author AUSU |
// * @author AUSU
|
||||
*/ |
// */
|
||||
public interface IClockingInService { |
//public interface IClockingInService {
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询考勤信息 |
// * 查询考勤信息
|
||||
* @param params 参数 |
// * @param params 参数
|
||||
* @param userId 当前用户userId |
// * @param userId 当前用户userId
|
||||
* @return 考勤信息 |
// * @return 考勤信息
|
||||
*/ |
// */
|
||||
List<CClockingInVo.ClockingInInfo> queryClockingIn(CClockingInDto.QueryClockingIn params,Long userId); |
// List<CClockingInVo.ClockingInInfo> queryClockingIn(CClockingInDto.QueryClockingIn params,Long userId);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 打卡 |
// * 打卡
|
||||
* @param params 参数 |
// * @param params 参数
|
||||
* @param userId 当前用户userId |
// * @param userId 当前用户userId
|
||||
*/ |
// */
|
||||
void punchTheClock(CClockingInDto.PunchTheClock params,Long userId); |
// void punchTheClock(CClockingInDto.PunchTheClock params,Long userId);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 审核打卡时间 |
// * 审核打卡时间
|
||||
* @param params 参数 |
// * @param params 参数
|
||||
* @param userId 当前用户userId |
// * @param userId 当前用户userId
|
||||
*/ |
// */
|
||||
void auditRecord(CClockingInDto.Audit params,Long userId); |
// void auditRecord(CClockingInDto.Audit params,Long userId);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 导出考勤记录 |
// * 导出考勤记录
|
||||
* @param params 参数 |
// * @param params 参数
|
||||
* @param userId 当前用户userId |
// * @param userId 当前用户userId
|
||||
* @return excel的路径 |
// * @return excel的路径
|
||||
*/ |
// */
|
||||
CClockingInVo.ExcelUrl exportRecord(CClockingInDto.QueryClockingIn params,Long userId) throws IOException; |
// CClockingInVo.ExcelUrl exportRecord(CClockingInDto.QueryClockingIn params,Long userId) throws IOException;
|
||||
} |
//}
|
||||
|
|||||
@ -1,51 +1,51 @@ |
|||||
package com.ccsens.common.service; |
//package com.ccsens.common.service;
|
||||
|
//
|
||||
import com.ccsens.common.bean.dto.CDeliverDto; |
//import com.ccsens.common.bean.dto.CDeliverDto;
|
||||
import com.ccsens.common.bean.vo.CDeliverVo; |
//import com.ccsens.common.bean.vo.CDeliverVo;
|
||||
import com.github.pagehelper.PageInfo; |
//import com.github.pagehelper.PageInfo;
|
||||
|
//
|
||||
import java.util.List; |
//import java.util.List;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author AUSU |
// * @author AUSU
|
||||
*/ |
// */
|
||||
public interface IDeliverService { |
//public interface IDeliverService {
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询所有检查人 |
// * 查询所有检查人
|
||||
* @param params 项目id |
// * @param params 项目id
|
||||
* @param userId 用户id |
// * @param userId 用户id
|
||||
* @return 检查人列表 |
// * @return 检查人列表
|
||||
*/ |
// */
|
||||
List<CDeliverVo.Checker> queryChecker(CDeliverDto.QueryChecker params, Long userId); |
// List<CDeliverVo.Checker> queryChecker(CDeliverDto.QueryChecker params, Long userId);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 提交交付物 |
// * 提交交付物
|
||||
* @param params 项目id |
// * @param params 项目id
|
||||
* @param userId 用户id |
// * @param userId 用户id
|
||||
*/ |
// */
|
||||
void saveDeliver(CDeliverDto.SaveDeliver params, Long userId) throws Exception; |
// void saveDeliver(CDeliverDto.SaveDeliver params, Long userId) throws Exception;
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询任务的交付物历史记录 |
// * 查询任务的交付物历史记录
|
||||
* @param params 任务分解id |
// * @param params 任务分解id
|
||||
* @param userId 用户id |
// * @param userId 用户id
|
||||
* @return 检查人列表 |
// * @return 检查人列表
|
||||
*/ |
// */
|
||||
List<CDeliverVo.DeliverOfTask> queryDeliverOfTask(CDeliverDto.QueryDeliverOfTask params, Long userId); |
// List<CDeliverVo.DeliverOfTask> queryDeliverOfTask(CDeliverDto.QueryDeliverOfTask params, Long userId);
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 检查交付物 |
// * 检查交付物
|
||||
* @param params 检查记录id |
// * @param params 检查记录id
|
||||
* @param userId 当前登录用户 |
// * @param userId 当前登录用户
|
||||
*/ |
// */
|
||||
void checkDeliver(CDeliverDto.CheckDeliver params, Long userId) throws Exception; |
// void checkDeliver(CDeliverDto.CheckDeliver params, Long userId) throws Exception;
|
||||
|
//
|
||||
/** |
// /**
|
||||
* 查询项目的交付物历史记录 |
// * 查询项目的交付物历史记录
|
||||
* @param params 项目id |
// * @param params 项目id
|
||||
* @param userId 用户id |
// * @param userId 用户id
|
||||
* @return 检查人列表 |
// * @return 检查人列表
|
||||
*/ |
// */
|
||||
PageInfo<CDeliverVo.DeliverOfTask> queryDeliverOfProject(CDeliverDto.QueryDeliverOfProject params, Long userId); |
// PageInfo<CDeliverVo.DeliverOfTask> queryDeliverOfProject(CDeliverDto.QueryDeliverOfProject params, Long userId);
|
||||
} |
//}
|
||||
|
|||||
@ -1,66 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.ccsens.common.persist.dao.ProClockingInDao"> |
|
||||
|
|
||||
<select id="queryByMemberId" resultType="com.ccsens.common.bean.vo.CClockingInVo$ClockRecord"> |
|
||||
SELECT |
|
||||
c.id AS id, |
|
||||
c.member_id, |
|
||||
m.`name` AS memberName, |
|
||||
c.checker_id, |
|
||||
m2.`name` AS checkerName, |
|
||||
c.morning, |
|
||||
c.morning_status, |
|
||||
c.night, |
|
||||
c.night_status |
|
||||
FROM |
|
||||
t_pro_clocking_in AS c |
|
||||
LEFT JOIN t_pro_member AS m ON m.id = c.member_id |
|
||||
LEFT JOIN t_pro_member AS m2 ON m2.id = c.checker_id |
|
||||
WHERE |
|
||||
c.rec_status = 0 |
|
||||
AND member_id IN |
|
||||
<foreach collection="memberIdList" item="item" open="(" separator="," close=")"> |
|
||||
#{item} |
|
||||
</foreach> |
|
||||
</select> |
|
||||
|
|
||||
<select id="queryHaveData" resultType="com.ccsens.common.bean.po.ProClockingIn"> |
|
||||
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 DATE_FORMAT(created_at, '%Y-%m-%d') = FROM_UNIXTIME( |
|
||||
#{time} / 1000, |
|
||||
'%Y-%m-%d' |
|
||||
) |
|
||||
LIMIT 1 |
|
||||
</select> |
|
||||
|
|
||||
<select id="queryLastChecker" resultType="com.ccsens.common.bean.vo.CClockingInVo$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> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,5 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.ccsens.common.persist.dao.ProDeliverCheckerDao"> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,75 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.ccsens.common.persist.dao.ProDeliverDao"> |
|
||||
|
|
||||
<resultMap id="deliverOfTask" type="com.ccsens.common.bean.vo.CDeliverVo$DeliverOfTask"> |
|
||||
<result column="id" property="id"/> |
|
||||
<result column="name" property="name"/> |
|
||||
<result column="taskName" property="taskName"/> |
|
||||
<result column="time" property="time"/> |
|
||||
<result column="content" property="content"/> |
|
||||
<collection property="checkerList" ofType="com.ccsens.common.bean.vo.CDeliverVo$CheckerInfo"> |
|
||||
<result column="checkId" property="checkId"/> |
|
||||
<result column="checkerName" property="checkerName"/> |
|
||||
<result column="checkerId" property="checkerId"/> |
|
||||
<result column="status" property="status"/> |
|
||||
<result column="score" property="score"/> |
|
||||
<result column="remark" property="remark"/> |
|
||||
</collection> |
|
||||
</resultMap> |
|
||||
|
|
||||
<select id="queryDeliverOfTask" resultMap="deliverOfTask"> |
|
||||
SELECT |
|
||||
d.id, |
|
||||
m.`name`, |
|
||||
td.`name` AS taskName, |
|
||||
d.time, |
|
||||
d.content, |
|
||||
c.id As checkId, |
|
||||
m1.`name` AS checkerName, |
|
||||
m1.id AS checkerId, |
|
||||
c.`status`, |
|
||||
c.score, |
|
||||
c.remark |
|
||||
FROM |
|
||||
t_pro_deliver AS d |
|
||||
LEFT JOIN t_pro_deliver_checker AS c ON d.id = c.deliver_id |
|
||||
LEFT JOIN t_pro_task_sub AS ts ON ts.id = d.task_sub_id |
|
||||
LEFT JOIN t_pro_task_detail AS td ON td.id = ts.task_detail_id |
|
||||
LEFT JOIN t_pro_member AS m ON m.id = d.member_id AND m.rec_status = 0 |
|
||||
LEFT JOIN t_pro_member AS m1 ON m1.id = c.member_id AND m1.rec_status = 0 |
|
||||
WHERE |
|
||||
d.rec_status = 0 AND c.rec_status = 0 AND ts.rec_status = 0 AND td.rec_status = 0 |
|
||||
AND c.rec_status = 0 |
|
||||
AND d.task_sub_id = #{taskSubId} |
|
||||
ORDER BY d.time DESC |
|
||||
</select> |
|
||||
|
|
||||
<select id="queryDeliverOfProject" resultMap="deliverOfTask"> |
|
||||
SELECT |
|
||||
d.id, |
|
||||
m.`name`, |
|
||||
td.`name` AS taskName, |
|
||||
d.time, |
|
||||
d.content, |
|
||||
c.id As checkId, |
|
||||
m1.`name` AS checkerName, |
|
||||
m1.id AS checkerId, |
|
||||
c.`status`, |
|
||||
c.score, |
|
||||
c.remark |
|
||||
FROM |
|
||||
t_pro_deliver AS d |
|
||||
LEFT JOIN t_pro_deliver_checker AS c ON d.id = c.deliver_id |
|
||||
LEFT JOIN t_pro_task_sub AS ts ON ts.id = d.task_sub_id |
|
||||
LEFT JOIN t_pro_task_detail AS td ON td.id = ts.task_detail_id |
|
||||
LEFT JOIN t_pro_member AS m ON m.id = d.member_id AND m.rec_status = 0 |
|
||||
LEFT JOIN t_pro_member AS m1 ON m1.id = c.member_id AND m1.rec_status = 0 |
|
||||
WHERE |
|
||||
d.rec_status = 0 AND c.rec_status = 0 AND ts.rec_status = 0 AND td.rec_status = 0 |
|
||||
AND c.rec_status = 0 |
|
||||
AND d.project_id = #{projectId} |
|
||||
ORDER BY d.time DESC |
|
||||
</select> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,291 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.ccsens.common.persist.mapper.ProClockingInMapper"> |
|
||||
<resultMap id="BaseResultMap" type="com.ccsens.common.bean.po.ProClockingIn"> |
|
||||
<id column="id" jdbcType="BIGINT" property="id" /> |
|
||||
<result column="member_id" jdbcType="BIGINT" property="memberId" /> |
|
||||
<result column="checker_id" jdbcType="BIGINT" property="checkerId" /> |
|
||||
<result column="morning" jdbcType="BIGINT" property="morning" /> |
|
||||
<result column="morning_status" jdbcType="TINYINT" property="morningStatus" /> |
|
||||
<result column="night" jdbcType="BIGINT" property="night" /> |
|
||||
<result column="night_status" jdbcType="TINYINT" property="nightStatus" /> |
|
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|
||||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|
||||
</resultMap> |
|
||||
<sql id="Example_Where_Clause"> |
|
||||
<where> |
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|
||||
<if test="criteria.valid"> |
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|
||||
<foreach collection="criteria.criteria" item="criterion"> |
|
||||
<choose> |
|
||||
<when test="criterion.noValue"> |
|
||||
and ${criterion.condition} |
|
||||
</when> |
|
||||
<when test="criterion.singleValue"> |
|
||||
and ${criterion.condition} #{criterion.value} |
|
||||
</when> |
|
||||
<when test="criterion.betweenValue"> |
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|
||||
</when> |
|
||||
<when test="criterion.listValue"> |
|
||||
and ${criterion.condition} |
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|
||||
#{listItem} |
|
||||
</foreach> |
|
||||
</when> |
|
||||
</choose> |
|
||||
</foreach> |
|
||||
</trim> |
|
||||
</if> |
|
||||
</foreach> |
|
||||
</where> |
|
||||
</sql> |
|
||||
<sql id="Update_By_Example_Where_Clause"> |
|
||||
<where> |
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|
||||
<if test="criteria.valid"> |
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|
||||
<foreach collection="criteria.criteria" item="criterion"> |
|
||||
<choose> |
|
||||
<when test="criterion.noValue"> |
|
||||
and ${criterion.condition} |
|
||||
</when> |
|
||||
<when test="criterion.singleValue"> |
|
||||
and ${criterion.condition} #{criterion.value} |
|
||||
</when> |
|
||||
<when test="criterion.betweenValue"> |
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|
||||
</when> |
|
||||
<when test="criterion.listValue"> |
|
||||
and ${criterion.condition} |
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|
||||
#{listItem} |
|
||||
</foreach> |
|
||||
</when> |
|
||||
</choose> |
|
||||
</foreach> |
|
||||
</trim> |
|
||||
</if> |
|
||||
</foreach> |
|
||||
</where> |
|
||||
</sql> |
|
||||
<sql id="Base_Column_List"> |
|
||||
id, member_id, checker_id, morning, morning_status, night, night_status, created_at, |
|
||||
updated_at, rec_status |
|
||||
</sql> |
|
||||
<select id="selectByExample" parameterType="com.ccsens.common.bean.po.ProClockingInExample" resultMap="BaseResultMap"> |
|
||||
select |
|
||||
<if test="distinct"> |
|
||||
distinct |
|
||||
</if> |
|
||||
<include refid="Base_Column_List" /> |
|
||||
from t_pro_clocking_in |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
<if test="orderByClause != null"> |
|
||||
order by ${orderByClause} |
|
||||
</if> |
|
||||
</select> |
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|
||||
select |
|
||||
<include refid="Base_Column_List" /> |
|
||||
from t_pro_clocking_in |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</select> |
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|
||||
delete from t_pro_clocking_in |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</delete> |
|
||||
<delete id="deleteByExample" parameterType="com.ccsens.common.bean.po.ProClockingInExample"> |
|
||||
delete from t_pro_clocking_in |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</delete> |
|
||||
<insert id="insert" parameterType="com.ccsens.common.bean.po.ProClockingIn"> |
|
||||
insert into t_pro_clocking_in (id, member_id, checker_id, |
|
||||
morning, morning_status, night, |
|
||||
night_status, created_at, updated_at, |
|
||||
rec_status) |
|
||||
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{checkerId,jdbcType=BIGINT}, |
|
||||
#{morning,jdbcType=BIGINT}, #{morningStatus,jdbcType=TINYINT}, #{night,jdbcType=BIGINT}, |
|
||||
#{nightStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
#{recStatus,jdbcType=TINYINT}) |
|
||||
</insert> |
|
||||
<insert id="insertSelective" parameterType="com.ccsens.common.bean.po.ProClockingIn"> |
|
||||
insert into t_pro_clocking_in |
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||
<if test="id != null"> |
|
||||
id, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
member_id, |
|
||||
</if> |
|
||||
<if test="checkerId != null"> |
|
||||
checker_id, |
|
||||
</if> |
|
||||
<if test="morning != null"> |
|
||||
morning, |
|
||||
</if> |
|
||||
<if test="morningStatus != null"> |
|
||||
morning_status, |
|
||||
</if> |
|
||||
<if test="night != null"> |
|
||||
night, |
|
||||
</if> |
|
||||
<if test="nightStatus != null"> |
|
||||
night_status, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
created_at, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
updated_at, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
rec_status, |
|
||||
</if> |
|
||||
</trim> |
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||
<if test="id != null"> |
|
||||
#{id,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
#{memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="checkerId != null"> |
|
||||
#{checkerId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="morning != null"> |
|
||||
#{morning,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="morningStatus != null"> |
|
||||
#{morningStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="night != null"> |
|
||||
#{night,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="nightStatus != null"> |
|
||||
#{nightStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
#{createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
#{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
#{recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</trim> |
|
||||
</insert> |
|
||||
<select id="countByExample" parameterType="com.ccsens.common.bean.po.ProClockingInExample" resultType="java.lang.Long"> |
|
||||
select count(*) from t_pro_clocking_in |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</select> |
|
||||
<update id="updateByExampleSelective" parameterType="map"> |
|
||||
update t_pro_clocking_in |
|
||||
<set> |
|
||||
<if test="record.id != null"> |
|
||||
id = #{record.id,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.memberId != null"> |
|
||||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.checkerId != null"> |
|
||||
checker_id = #{record.checkerId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.morning != null"> |
|
||||
morning = #{record.morning,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.morningStatus != null"> |
|
||||
morning_status = #{record.morningStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="record.night != null"> |
|
||||
night = #{record.night,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.nightStatus != null"> |
|
||||
night_status = #{record.nightStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="record.createdAt != null"> |
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="record.updatedAt != null"> |
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="record.recStatus != null"> |
|
||||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</set> |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Update_By_Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</update> |
|
||||
<update id="updateByExample" parameterType="map"> |
|
||||
update t_pro_clocking_in |
|
||||
set id = #{record.id,jdbcType=BIGINT}, |
|
||||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|
||||
checker_id = #{record.checkerId,jdbcType=BIGINT}, |
|
||||
morning = #{record.morning,jdbcType=BIGINT}, |
|
||||
morning_status = #{record.morningStatus,jdbcType=TINYINT}, |
|
||||
night = #{record.night,jdbcType=BIGINT}, |
|
||||
night_status = #{record.nightStatus,jdbcType=TINYINT}, |
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
||||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Update_By_Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</update> |
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.common.bean.po.ProClockingIn"> |
|
||||
update t_pro_clocking_in |
|
||||
<set> |
|
||||
<if test="memberId != null"> |
|
||||
member_id = #{memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="checkerId != null"> |
|
||||
checker_id = #{checkerId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="morning != null"> |
|
||||
morning = #{morning,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="morningStatus != null"> |
|
||||
morning_status = #{morningStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="night != null"> |
|
||||
night = #{night,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="nightStatus != null"> |
|
||||
night_status = #{nightStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</set> |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</update> |
|
||||
<update id="updateByPrimaryKey" parameterType="com.ccsens.common.bean.po.ProClockingIn"> |
|
||||
update t_pro_clocking_in |
|
||||
set member_id = #{memberId,jdbcType=BIGINT}, |
|
||||
checker_id = #{checkerId,jdbcType=BIGINT}, |
|
||||
morning = #{morning,jdbcType=BIGINT}, |
|
||||
morning_status = #{morningStatus,jdbcType=TINYINT}, |
|
||||
night = #{night,jdbcType=BIGINT}, |
|
||||
night_status = #{nightStatus,jdbcType=TINYINT}, |
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
rec_status = #{recStatus,jdbcType=TINYINT} |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</update> |
|
||||
</mapper> |
|
||||
@ -1,275 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.ccsens.common.persist.mapper.ProDeliverCheckerMapper"> |
|
||||
<resultMap id="BaseResultMap" type="com.ccsens.common.bean.po.ProDeliverChecker"> |
|
||||
<id column="id" jdbcType="BIGINT" property="id" /> |
|
||||
<result column="deliver_id" jdbcType="BIGINT" property="deliverId" /> |
|
||||
<result column="member_id" jdbcType="BIGINT" property="memberId" /> |
|
||||
<result column="score" jdbcType="VARCHAR" property="score" /> |
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" /> |
|
||||
<result column="status" jdbcType="TINYINT" property="status" /> |
|
||||
<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, deliver_id, member_id, score, remark, status, created_at, updated_at, rec_status |
|
||||
</sql> |
|
||||
<select id="selectByExample" parameterType="com.ccsens.common.bean.po.ProDeliverCheckerExample" resultMap="BaseResultMap"> |
|
||||
select |
|
||||
<if test="distinct"> |
|
||||
distinct |
|
||||
</if> |
|
||||
<include refid="Base_Column_List" /> |
|
||||
from t_pro_deliver_checker |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
<if test="orderByClause != null"> |
|
||||
order by ${orderByClause} |
|
||||
</if> |
|
||||
</select> |
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|
||||
select |
|
||||
<include refid="Base_Column_List" /> |
|
||||
from t_pro_deliver_checker |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</select> |
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|
||||
delete from t_pro_deliver_checker |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</delete> |
|
||||
<delete id="deleteByExample" parameterType="com.ccsens.common.bean.po.ProDeliverCheckerExample"> |
|
||||
delete from t_pro_deliver_checker |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</delete> |
|
||||
<insert id="insert" parameterType="com.ccsens.common.bean.po.ProDeliverChecker"> |
|
||||
insert into t_pro_deliver_checker (id, deliver_id, member_id, |
|
||||
score, remark, status, |
|
||||
created_at, updated_at, rec_status |
|
||||
) |
|
||||
values (#{id,jdbcType=BIGINT}, #{deliverId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, |
|
||||
#{score,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, |
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|
||||
) |
|
||||
</insert> |
|
||||
<insert id="insertSelective" parameterType="com.ccsens.common.bean.po.ProDeliverChecker"> |
|
||||
insert into t_pro_deliver_checker |
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||
<if test="id != null"> |
|
||||
id, |
|
||||
</if> |
|
||||
<if test="deliverId != null"> |
|
||||
deliver_id, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
member_id, |
|
||||
</if> |
|
||||
<if test="score != null"> |
|
||||
score, |
|
||||
</if> |
|
||||
<if test="remark != null"> |
|
||||
remark, |
|
||||
</if> |
|
||||
<if test="status != null"> |
|
||||
status, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
created_at, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
updated_at, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
rec_status, |
|
||||
</if> |
|
||||
</trim> |
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||
<if test="id != null"> |
|
||||
#{id,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="deliverId != null"> |
|
||||
#{deliverId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
#{memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="score != null"> |
|
||||
#{score,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="remark != null"> |
|
||||
#{remark,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="status != null"> |
|
||||
#{status,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
#{createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
#{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
#{recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</trim> |
|
||||
</insert> |
|
||||
<select id="countByExample" parameterType="com.ccsens.common.bean.po.ProDeliverCheckerExample" resultType="java.lang.Long"> |
|
||||
select count(*) from t_pro_deliver_checker |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</select> |
|
||||
<update id="updateByExampleSelective" parameterType="map"> |
|
||||
update t_pro_deliver_checker |
|
||||
<set> |
|
||||
<if test="record.id != null"> |
|
||||
id = #{record.id,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.deliverId != null"> |
|
||||
deliver_id = #{record.deliverId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.memberId != null"> |
|
||||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.score != null"> |
|
||||
score = #{record.score,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="record.remark != null"> |
|
||||
remark = #{record.remark,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="record.status != null"> |
|
||||
status = #{record.status,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="record.createdAt != null"> |
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="record.updatedAt != null"> |
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="record.recStatus != null"> |
|
||||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</set> |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Update_By_Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</update> |
|
||||
<update id="updateByExample" parameterType="map"> |
|
||||
update t_pro_deliver_checker |
|
||||
set id = #{record.id,jdbcType=BIGINT}, |
|
||||
deliver_id = #{record.deliverId,jdbcType=BIGINT}, |
|
||||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|
||||
score = #{record.score,jdbcType=VARCHAR}, |
|
||||
remark = #{record.remark,jdbcType=VARCHAR}, |
|
||||
status = #{record.status,jdbcType=TINYINT}, |
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
||||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Update_By_Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</update> |
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.common.bean.po.ProDeliverChecker"> |
|
||||
update t_pro_deliver_checker |
|
||||
<set> |
|
||||
<if test="deliverId != null"> |
|
||||
deliver_id = #{deliverId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
member_id = #{memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="score != null"> |
|
||||
score = #{score,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="remark != null"> |
|
||||
remark = #{remark,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="status != null"> |
|
||||
status = #{status,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</set> |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</update> |
|
||||
<update id="updateByPrimaryKey" parameterType="com.ccsens.common.bean.po.ProDeliverChecker"> |
|
||||
update t_pro_deliver_checker |
|
||||
set deliver_id = #{deliverId,jdbcType=BIGINT}, |
|
||||
member_id = #{memberId,jdbcType=BIGINT}, |
|
||||
score = #{score,jdbcType=VARCHAR}, |
|
||||
remark = #{remark,jdbcType=VARCHAR}, |
|
||||
status = #{status,jdbcType=TINYINT}, |
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
rec_status = #{recStatus,jdbcType=TINYINT} |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</update> |
|
||||
</mapper> |
|
||||
@ -1,306 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.ccsens.common.persist.mapper.ProDeliverMapper"> |
|
||||
<resultMap id="BaseResultMap" type="com.ccsens.common.bean.po.ProDeliver"> |
|
||||
<id column="id" jdbcType="BIGINT" property="id" /> |
|
||||
<result column="task_sub_id" jdbcType="BIGINT" property="taskSubId" /> |
|
||||
<result column="member_id" jdbcType="BIGINT" property="memberId" /> |
|
||||
<result column="file_id" jdbcType="BIGINT" property="fileId" /> |
|
||||
<result column="file_path" jdbcType="VARCHAR" property="filePath" /> |
|
||||
<result column="content" jdbcType="VARCHAR" property="content" /> |
|
||||
<result column="project_id" jdbcType="BIGINT" property="projectId" /> |
|
||||
<result column="time" jdbcType="BIGINT" property="time" /> |
|
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|
||||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|
||||
</resultMap> |
|
||||
<sql id="Example_Where_Clause"> |
|
||||
<where> |
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|
||||
<if test="criteria.valid"> |
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|
||||
<foreach collection="criteria.criteria" item="criterion"> |
|
||||
<choose> |
|
||||
<when test="criterion.noValue"> |
|
||||
and ${criterion.condition} |
|
||||
</when> |
|
||||
<when test="criterion.singleValue"> |
|
||||
and ${criterion.condition} #{criterion.value} |
|
||||
</when> |
|
||||
<when test="criterion.betweenValue"> |
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|
||||
</when> |
|
||||
<when test="criterion.listValue"> |
|
||||
and ${criterion.condition} |
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|
||||
#{listItem} |
|
||||
</foreach> |
|
||||
</when> |
|
||||
</choose> |
|
||||
</foreach> |
|
||||
</trim> |
|
||||
</if> |
|
||||
</foreach> |
|
||||
</where> |
|
||||
</sql> |
|
||||
<sql id="Update_By_Example_Where_Clause"> |
|
||||
<where> |
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|
||||
<if test="criteria.valid"> |
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|
||||
<foreach collection="criteria.criteria" item="criterion"> |
|
||||
<choose> |
|
||||
<when test="criterion.noValue"> |
|
||||
and ${criterion.condition} |
|
||||
</when> |
|
||||
<when test="criterion.singleValue"> |
|
||||
and ${criterion.condition} #{criterion.value} |
|
||||
</when> |
|
||||
<when test="criterion.betweenValue"> |
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|
||||
</when> |
|
||||
<when test="criterion.listValue"> |
|
||||
and ${criterion.condition} |
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|
||||
#{listItem} |
|
||||
</foreach> |
|
||||
</when> |
|
||||
</choose> |
|
||||
</foreach> |
|
||||
</trim> |
|
||||
</if> |
|
||||
</foreach> |
|
||||
</where> |
|
||||
</sql> |
|
||||
<sql id="Base_Column_List"> |
|
||||
id, task_sub_id, member_id, file_id, file_path, content, project_id, time, created_at, |
|
||||
updated_at, rec_status |
|
||||
</sql> |
|
||||
<select id="selectByExample" parameterType="com.ccsens.common.bean.po.ProDeliverExample" resultMap="BaseResultMap"> |
|
||||
select |
|
||||
<if test="distinct"> |
|
||||
distinct |
|
||||
</if> |
|
||||
<include refid="Base_Column_List" /> |
|
||||
from t_pro_deliver |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
<if test="orderByClause != null"> |
|
||||
order by ${orderByClause} |
|
||||
</if> |
|
||||
</select> |
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|
||||
select |
|
||||
<include refid="Base_Column_List" /> |
|
||||
from t_pro_deliver |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</select> |
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|
||||
delete from t_pro_deliver |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</delete> |
|
||||
<delete id="deleteByExample" parameterType="com.ccsens.common.bean.po.ProDeliverExample"> |
|
||||
delete from t_pro_deliver |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</delete> |
|
||||
<insert id="insert" parameterType="com.ccsens.common.bean.po.ProDeliver"> |
|
||||
insert into t_pro_deliver (id, task_sub_id, member_id, |
|
||||
file_id, file_path, content, |
|
||||
project_id, time, created_at, |
|
||||
updated_at, rec_status) |
|
||||
values (#{id,jdbcType=BIGINT}, #{taskSubId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, |
|
||||
#{fileId,jdbcType=BIGINT}, #{filePath,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, |
|
||||
#{projectId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, |
|
||||
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
|
||||
</insert> |
|
||||
<insert id="insertSelective" parameterType="com.ccsens.common.bean.po.ProDeliver"> |
|
||||
insert into t_pro_deliver |
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||
<if test="id != null"> |
|
||||
id, |
|
||||
</if> |
|
||||
<if test="taskSubId != null"> |
|
||||
task_sub_id, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
member_id, |
|
||||
</if> |
|
||||
<if test="fileId != null"> |
|
||||
file_id, |
|
||||
</if> |
|
||||
<if test="filePath != null"> |
|
||||
file_path, |
|
||||
</if> |
|
||||
<if test="content != null"> |
|
||||
content, |
|
||||
</if> |
|
||||
<if test="projectId != null"> |
|
||||
project_id, |
|
||||
</if> |
|
||||
<if test="time != null"> |
|
||||
time, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
created_at, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
updated_at, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
rec_status, |
|
||||
</if> |
|
||||
</trim> |
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||
<if test="id != null"> |
|
||||
#{id,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="taskSubId != null"> |
|
||||
#{taskSubId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
#{memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="fileId != null"> |
|
||||
#{fileId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="filePath != null"> |
|
||||
#{filePath,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="content != null"> |
|
||||
#{content,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="projectId != null"> |
|
||||
#{projectId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="time != null"> |
|
||||
#{time,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
#{createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
#{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
#{recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</trim> |
|
||||
</insert> |
|
||||
<select id="countByExample" parameterType="com.ccsens.common.bean.po.ProDeliverExample" resultType="java.lang.Long"> |
|
||||
select count(*) from t_pro_deliver |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</select> |
|
||||
<update id="updateByExampleSelective" parameterType="map"> |
|
||||
update t_pro_deliver |
|
||||
<set> |
|
||||
<if test="record.id != null"> |
|
||||
id = #{record.id,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.taskSubId != null"> |
|
||||
task_sub_id = #{record.taskSubId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.memberId != null"> |
|
||||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.fileId != null"> |
|
||||
file_id = #{record.fileId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.filePath != null"> |
|
||||
file_path = #{record.filePath,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="record.content != null"> |
|
||||
content = #{record.content,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="record.projectId != null"> |
|
||||
project_id = #{record.projectId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.time != null"> |
|
||||
time = #{record.time,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="record.createdAt != null"> |
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="record.updatedAt != null"> |
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="record.recStatus != null"> |
|
||||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</set> |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Update_By_Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</update> |
|
||||
<update id="updateByExample" parameterType="map"> |
|
||||
update t_pro_deliver |
|
||||
set id = #{record.id,jdbcType=BIGINT}, |
|
||||
task_sub_id = #{record.taskSubId,jdbcType=BIGINT}, |
|
||||
member_id = #{record.memberId,jdbcType=BIGINT}, |
|
||||
file_id = #{record.fileId,jdbcType=BIGINT}, |
|
||||
file_path = #{record.filePath,jdbcType=VARCHAR}, |
|
||||
content = #{record.content,jdbcType=VARCHAR}, |
|
||||
project_id = #{record.projectId,jdbcType=BIGINT}, |
|
||||
time = #{record.time,jdbcType=BIGINT}, |
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
||||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
||||
<if test="_parameter != null"> |
|
||||
<include refid="Update_By_Example_Where_Clause" /> |
|
||||
</if> |
|
||||
</update> |
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.common.bean.po.ProDeliver"> |
|
||||
update t_pro_deliver |
|
||||
<set> |
|
||||
<if test="taskSubId != null"> |
|
||||
task_sub_id = #{taskSubId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="memberId != null"> |
|
||||
member_id = #{memberId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="fileId != null"> |
|
||||
file_id = #{fileId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="filePath != null"> |
|
||||
file_path = #{filePath,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="content != null"> |
|
||||
content = #{content,jdbcType=VARCHAR}, |
|
||||
</if> |
|
||||
<if test="projectId != null"> |
|
||||
project_id = #{projectId,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="time != null"> |
|
||||
time = #{time,jdbcType=BIGINT}, |
|
||||
</if> |
|
||||
<if test="createdAt != null"> |
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="updatedAt != null"> |
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
</if> |
|
||||
<if test="recStatus != null"> |
|
||||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|
||||
</if> |
|
||||
</set> |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</update> |
|
||||
<update id="updateByPrimaryKey" parameterType="com.ccsens.common.bean.po.ProDeliver"> |
|
||||
update t_pro_deliver |
|
||||
set task_sub_id = #{taskSubId,jdbcType=BIGINT}, |
|
||||
member_id = #{memberId,jdbcType=BIGINT}, |
|
||||
file_id = #{fileId,jdbcType=BIGINT}, |
|
||||
file_path = #{filePath,jdbcType=VARCHAR}, |
|
||||
content = #{content,jdbcType=VARCHAR}, |
|
||||
project_id = #{projectId,jdbcType=BIGINT}, |
|
||||
time = #{time,jdbcType=BIGINT}, |
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
||||
rec_status = #{recStatus,jdbcType=TINYINT} |
|
||||
where id = #{id,jdbcType=BIGINT} |
|
||||
</update> |
|
||||
</mapper> |
|
||||
Loading…
Reference in new issue