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