Commit 62693996 by 284718418@qq.com

合并华颐 审批流程 代码

parent 5b52fe85
...@@ -26,7 +26,7 @@ import cn.hutool.core.net.NetUtil; ...@@ -26,7 +26,7 @@ import cn.hutool.core.net.NetUtil;
public class Application { public class Application {
public static void main(String[] args) { public static void main(String[] args) {
final Integer port = 8089; final Integer port = 8189;
if (!NetUtil.isUsableLocalPort(port)) { if (!NetUtil.isUsableLocalPort(port)) {
System.err.printf("端口%d被占用了,无法启动%n", port); System.err.printf("端口%d被占用了,无法启动%n", port);
System.exit(1); System.exit(1);
......
...@@ -3,8 +3,10 @@ package cn.timer.api.bean.kqmk; ...@@ -3,8 +3,10 @@ package cn.timer.api.bean.kqmk;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
...@@ -15,6 +17,8 @@ import lombok.Builder; ...@@ -15,6 +17,8 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.List;
/** /**
* @author LAL 2020-05-09 * @author LAL 2020-05-09
*/ */
...@@ -27,7 +31,7 @@ import lombok.NoArgsConstructor; ...@@ -27,7 +31,7 @@ import lombok.NoArgsConstructor;
public class KqglAssoLeaveBalance extends Model<KqglAssoLeaveBalance> { public class KqglAssoLeaveBalance extends Model<KqglAssoLeaveBalance> {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -67,4 +71,9 @@ public class KqglAssoLeaveBalance extends Model<KqglAssoLeaveBalance> { ...@@ -67,4 +71,9 @@ public class KqglAssoLeaveBalance extends Model<KqglAssoLeaveBalance> {
@ApiModelProperty(value = "是否为系统自动 0:否;1:是", example = "101") @ApiModelProperty(value = "是否为系统自动 0:否;1:是", example = "101")
private Integer isAutomatic; private Integer isAutomatic;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "假期统调用户ID")
private List<Integer> userIds;
} }
\ No newline at end of file
...@@ -35,115 +35,115 @@ public class CmsContent extends Model<CmsContent>{ ...@@ -35,115 +35,115 @@ public class CmsContent extends Model<CmsContent>{
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号", example = "1") @ApiModelProperty(value = "编号", example = "1")
private Integer id; private Integer id;
@ApiModelProperty(value = "讯息ID", example = "101") @ApiModelProperty(value = "讯息ID", example = "101")
private String xxbh;// 内容类型ID private String xxbh;// 内容类型ID
@ApiModelProperty(value = "内容类型ID", example = "101") @ApiModelProperty(value = "内容类型ID", example = "101")
private String contenttypeid;// 内容类型ID private String contenttypeid;// 内容类型ID
@ApiModelProperty(value = "标题", example = "101") @ApiModelProperty(value = "标题", example = "101")
private String title;// 标题 private String title;// 标题
@ApiModelProperty(value = "作者", example = "101") @ApiModelProperty(value = "作者", example = "101")
private String author;// 作者 private String author;// 作者
@ApiModelProperty(value = "内容", example = "101") @ApiModelProperty(value = "内容", example = "101")
private String summary;// 内容 private String summary;// 内容
@ApiModelProperty(value = "摘要", example = "101") @ApiModelProperty(value = "摘要", example = "101")
private String introduction;// 摘要 private String introduction;// 摘要
@ApiModelProperty(value = "链接", example = "101") @ApiModelProperty(value = "链接", example = "101")
private String linkaddress;// 链接 private String linkaddress;// 链接
@ApiModelProperty(value = "录入日期", example = "101") @ApiModelProperty(value = "录入日期", example = "101")
private Long addeddate;// 录入日期 private Long addeddate;// 录入日期
@ApiModelProperty(value = "发布状态", example = "101") @ApiModelProperty(value = "发布状态", example = "101")
private Integer releasestate;// 发布状态 private Integer releasestate;// 发布状态
@ApiModelProperty(value = "审核状态", example = "101") @ApiModelProperty(value = "审核状态", example = "101")
private Integer status;// 审核状态 private Integer status;// 审核状态
@ApiModelProperty(value = "添加人---责任编辑人姓名", example = "101") @ApiModelProperty(value = "添加人---责任编辑人姓名", example = "101")
private Integer userid;// 添加人---责任编辑人姓名 private Integer userid;// 添加人---责任编辑人姓名
@ApiModelProperty(value = "org_code", example = "101") @ApiModelProperty(value = "org_code", example = "101")
private Integer organizationId;// 归属商户id private Integer organizationId;// 归属商户id
// @ApiModelProperty(value = "有效起始时间", example = "101") // @ApiModelProperty(value = "有效起始时间", example = "101")
// private String starttime;// 有效起始时间 // private String starttime;// 有效起始时间
// //
// @ApiModelProperty(value = "有效结束时间", example = "101") // @ApiModelProperty(value = "有效结束时间", example = "101")
// private String endtime;// 有效结束时间 // private String endtime;// 有效结束时间
@ApiModelProperty(value = "状态 1:正常 2:删除", example = "101") @ApiModelProperty(value = "状态 1:正常 2:删除", example = "101")
private Integer existencestatus;// 状态 1:正常 2:删除 private Integer existencestatus;// 状态 1:正常 2:删除
@ApiModelProperty(value = "审核人姓名", example = "101") @ApiModelProperty(value = "审核人姓名", example = "101")
private String auditor;// 审核人(用户ID) private String auditor;// 审核人(用户ID)
@ApiModelProperty(value = "审核时间", example = "101") @ApiModelProperty(value = "审核时间", example = "101")
private String audittime;// 审核时间 private String audittime;// 审核时间
@ApiModelProperty(value = "上级审核意见", example = "101") @ApiModelProperty(value = "上级审核意见", example = "101")
private String auditopinion;// 上级审核意见 private String auditopinion;// 上级审核意见
@ApiModelProperty(value = "评论内容", example = "101") @ApiModelProperty(value = "评论内容", example = "101")
private String reviewcontent;// 评论内容 private String reviewcontent;// 评论内容
@ApiModelProperty(value = "评论时间", example = "101") @ApiModelProperty(value = "评论时间", example = "101")
private Long reviewtime;// 评论时间 private Long reviewtime;// 评论时间
// @ApiModelProperty(value = "评论人", example = "101") // @ApiModelProperty(value = "评论人", example = "101")
// private String commentator;// 评论人 // private String commentator;// 评论人
@ApiModelProperty(value = "发布人(用户ID)", example = "101") @ApiModelProperty(value = "发布人(用户ID)", example = "101")
private Integer publisher;// 发布人(用户ID) private Integer publisher;// 发布人(用户ID)
@ApiModelProperty(value = "发布时间", example = "101") @ApiModelProperty(value = "发布时间", example = "101")
private String releasetime;// 发布时间 private String releasetime;// 发布时间
// @ApiModelProperty(value = "归属人", example = "101") // @ApiModelProperty(value = "归属人", example = "101")
// private Integer belonger;// 归属人 // private Integer belonger;// 归属人
// @ApiModelProperty(value = "提醒时间", example = "101") // @ApiModelProperty(value = "提醒时间", example = "101")
// private Long eventremindingtime;// 提醒时间 // private Long eventremindingtime;// 提醒时间
// @ApiModelProperty(value = "发送人-0:默认全部人员,1:批量人员", example = "101") // @ApiModelProperty(value = "发送人-0:默认全部人员,1:批量人员", example = "101")
// private Integer sender;// 发送人-0:默认全部人员,1:批量人员 // private Integer sender;// 发送人-0:默认全部人员,1:批量人员
@ApiModelProperty(value = "所属模块ID", example = "101") @ApiModelProperty(value = "所属模块ID", example = "101")
private Integer modularid;// 所属模块ID private Integer modularid;// 所属模块ID
@ApiModelProperty(value = "发布方式:1-编辑文本;2-文本识别", example = "101") @ApiModelProperty(value = "发布方式:1-编辑文本;2-文本识别", example = "101")
private Integer releasemode;// 发布方式:1-编辑文本;2-文本识别 private Integer releasemode;// 发布方式:1-编辑文本;2-文本识别
// @ApiModelProperty(value = "别名-0:已过期;1:未到期", example = "101") // @ApiModelProperty(value = "别名-0:已过期;1:未到期", example = "101")
// private int termstate;// 别名-0:已过期;1:未到期 // private int termstate;// 别名-0:已过期;1:未到期
@ApiModelProperty(value = "别名-用户名", example = "101") @ApiModelProperty(value = "别名-用户名", example = "101")
private String uname;// 别名-用户名 private String uname;// 别名-用户名
@ApiModelProperty(value = "封面文件路径", example = "101") @ApiModelProperty(value = "封面文件路径", example = "101")
private String fmtpath;// private String fmtpath;//
@ApiModelProperty(value = "附件文件路径", example = "101") @ApiModelProperty(value = "附件文件路径", example = "101")
private String filepath;// private String filepath;//
@ApiModelProperty(value = "发布者姓名", example = "101") @ApiModelProperty(value = "发布者姓名", example = "101")
private String publisherName;// 发布者姓名 private String publisherName;// 发布者姓名
@ApiModelProperty(value = "发布方式:1,审核通过后立即发布,2定时发布,3手动发布", example = "101") @ApiModelProperty(value = "发布方式:1,审核通过后立即发布,2定时发布,3手动发布", example = "101")
private Integer releasetype;// 发布方式:1,审核通过后立即发布,2定时发布,3手动发布 private Integer releasetype;// 发布方式:1,审核通过后立即发布,2定时发布,3手动发布
@ApiModelProperty(value = "收回人(用户ID)", example = "101") @ApiModelProperty(value = "收回人(用户ID)", example = "101")
private Integer takeBack;// 收回人(用户ID) private Integer takeBack;// 收回人(用户ID)
@ApiModelProperty(value = "收回时间", example = "101") @ApiModelProperty(value = "收回时间", example = "101")
private String takeBackTime;// 收回时间 private String takeBackTime;// 收回时间
@ApiModelProperty(value = "定时发布时间", example = "101") @ApiModelProperty(value = "定时发布时间", example = "101")
private Long fixedTime;// 定时发布时间 private Long fixedTime;// 定时发布时间
......
...@@ -54,7 +54,7 @@ public class CmsContentModular extends Model<CmsContentModular> { ...@@ -54,7 +54,7 @@ public class CmsContentModular extends Model<CmsContentModular> {
@ApiModelProperty(value = "0- 开启 1-关闭", example = "0") @ApiModelProperty(value = "0- 开启 1-关闭", example = "0")
private Integer isOpen; private Integer isOpen;
@ApiModelProperty(value = "排序:升序", example = "0") @ApiModelProperty(value = "排序", example = "0")
private Integer sort; private Integer sort;
} }
...@@ -39,13 +39,13 @@ public class CmsContentRead extends Model<CmsContentRead>{ ...@@ -39,13 +39,13 @@ public class CmsContentRead extends Model<CmsContentRead>{
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号", example = "1") @ApiModelProperty(value = "编号", example = "1")
private Integer id; private Integer id;
@ApiModelProperty(value = "企业讯息主表ID", example = "101") @ApiModelProperty(value = "企业讯息主表ID", example = "101")
private Integer cmsContentId; private Integer cmsContentId;
@ApiModelProperty(value = "留言/意见反馈", example = "") @ApiModelProperty(value = "留言/意见反馈", example = "")
private String reviewContent; private String reviewContent;
@ApiModelProperty(value = "留言/意见反馈时间", example = "") @ApiModelProperty(value = "留言/意见反馈时间", example = "")
private Date reviewTime; private Date reviewTime;
...@@ -69,6 +69,6 @@ public class CmsContentRead extends Model<CmsContentRead>{ ...@@ -69,6 +69,6 @@ public class CmsContentRead extends Model<CmsContentRead>{
@ApiModelProperty(value = "更新时间", example = "") @ApiModelProperty(value = "更新时间", example = "")
private Date updateTime; private Date updateTime;
} }
...@@ -34,7 +34,7 @@ import lombok.NoArgsConstructor; ...@@ -34,7 +34,7 @@ import lombok.NoArgsConstructor;
public class SpmkApprovalG extends Model<SpmkApprovalG> { public class SpmkApprovalG extends Model<SpmkApprovalG> {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -58,5 +58,4 @@ public class SpmkApprovalG extends Model<SpmkApprovalG> { ...@@ -58,5 +58,4 @@ public class SpmkApprovalG extends Model<SpmkApprovalG> {
@ApiModelProperty(value = "是否可编辑 0是 1否", example = "101") @ApiModelProperty(value = "是否可编辑 0是 1否", example = "101")
private Integer isEditable; private Integer isEditable;
}
}
\ No newline at end of file
package cn.timer.api.bean.spmk;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Table;
/**
* 审批草稿详情
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "spmk_approve_detail_drafts")
@ApiModel("审批草稿详情")
public class SpmkApproveDetailDrafts extends Model<SpmkApproveDetailDrafts> {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private Integer id;
/**
* 审批汇总id
*/
private Integer approveSummaryId;
/**
* 标题
*/
private String name;
/**
* 所在部门名称
*/
private String departmentName;
/**
* 申请数据
*/
private String requestData;
/**
* 审批表单
*/
private String froms;
/**
* 审批流程
*/
private String router;
/**
* 通过节点
*/
private String flowChildren;
/**
* 设置:编号
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:编号
*/
public Integer getId() {
return id;
}
/**
* 设置:审批汇总id
*/
public void setApproveSummaryId(Integer approveSummaryId) {
this.approveSummaryId = approveSummaryId;
}
/**
* 获取:审批汇总id
*/
public Integer getApproveSummaryId() {
return approveSummaryId;
}
/**
* 设置:标题
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取:标题
*/
public String getName() {
return name;
}
/**
* 设置:所在部门名称
*/
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
/**
* 获取:所在部门名称
*/
public String getDepartmentName() {
return departmentName;
}
/**
* 设置:申请数据
*/
public void setRequestData(String requestData) {
this.requestData = requestData;
}
/**
* 获取:申请数据
*/
public String getRequestData() {
return requestData;
}
/**
* 设置:审批表单
*/
public void setFroms(String froms) {
this.froms = froms;
}
/**
* 获取:审批表单
*/
public String getFroms() {
return froms;
}
/**
* 设置:审批流程
*/
public void setRouter(String router) {
this.router = router;
}
/**
* 获取:审批流程
*/
public String getRouter() {
return router;
}
/**
* 设置:通过节点
*/
public void setFlowChildren(String flowChildren) {
this.flowChildren = flowChildren;
}
/**
* 获取:通过节点
*/
public String getFlowChildren() {
return flowChildren;
}
}
package cn.timer.api.bean.spmk;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 审批草稿箱
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "spmk_approve_drafts")
@ApiModel("审批草稿箱")
public class SpmkApproveDrafts extends Model<SpmkApproveDrafts> implements Serializable{
private static final long serialVersionUID = 1L;
/**
* 审批编号
*/
private Integer id;
/**
* 企业组织代码
*/
private Integer orgCode;
/**
* 发起人id 用于搜索(所在部门)
*/
private Integer empNum;
/**
* 标题
*/
private String title;
/**
* 所在部门名称
*/
private String departmentName;
/**
* 发起人名称
*/
private String initiator;
/**
* 发起时间
*/
private Date createTime;
/**
* 审批名称
*/
private String approveName;
/**
* 状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝
*/
private Integer sts;
/**
* 当前审批人
*/
private String currentApprover;
/**
* 历史审批人
*/
private String historyApprover;
/**
* assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪
*/
private Integer assoType;
/**
* 最近处理时间
*/
private Date updateTime;
/**
* 结束时间
*/
private Date endTime;
/**
* 摘要
*/
private String digest;
/**
* 是否删除 0-否 1-是
*/
private Integer isDelete;
/**
* 是否加急 0-否 1-是
*/
private Integer isUrgent;
/**
* 设置:审批编号
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:审批编号
*/
public Integer getId() {
return id;
}
/**
* 设置:企业组织代码
*/
public void setOrgCode(Integer orgCode) {
this.orgCode = orgCode;
}
/**
* 获取:企业组织代码
*/
public Integer getOrgCode() {
return orgCode;
}
/**
* 设置:发起人id 用于搜索(所在部门)
*/
public void setEmpNum(Integer empNum) {
this.empNum = empNum;
}
/**
* 获取:发起人id 用于搜索(所在部门)
*/
public Integer getEmpNum() {
return empNum;
}
/**
* 设置:标题
*/
public void setTitle(String title) {
this.title = title;
}
/**
* 获取:标题
*/
public String getTitle() {
return title;
}
/**
* 设置:所在部门名称
*/
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
/**
* 获取:所在部门名称
*/
public String getDepartmentName() {
return departmentName;
}
/**
* 设置:发起人名称
*/
public void setInitiator(String initiator) {
this.initiator = initiator;
}
/**
* 获取:发起人名称
*/
public String getInitiator() {
return initiator;
}
/**
* 设置:发起时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:发起时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:审批名称
*/
public void setApproveName(String approveName) {
this.approveName = approveName;
}
/**
* 获取:审批名称
*/
public String getApproveName() {
return approveName;
}
/**
* 设置:状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝
*/
public void setSts(Integer sts) {
this.sts = sts;
}
/**
* 获取:状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝
*/
public Integer getSts() {
return sts;
}
/**
* 设置:当前审批人
*/
public void setCurrentApprover(String currentApprover) {
this.currentApprover = currentApprover;
}
/**
* 获取:当前审批人
*/
public String getCurrentApprover() {
return currentApprover;
}
/**
* 设置:历史审批人
*/
public void setHistoryApprover(String historyApprover) {
this.historyApprover = historyApprover;
}
/**
* 获取:历史审批人
*/
public String getHistoryApprover() {
return historyApprover;
}
/**
* 设置:assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪
*/
public void setAssoType(Integer assoType) {
this.assoType = assoType;
}
/**
* 获取:assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪
*/
public Integer getAssoType() {
return assoType;
}
/**
* 设置:最近处理时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取:最近处理时间
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* 设置:结束时间
*/
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
/**
* 获取:结束时间
*/
public Date getEndTime() {
return endTime;
}
/**
* 设置:摘要
*/
public void setDigest(String digest) {
this.digest = digest;
}
/**
* 获取:摘要
*/
public String getDigest() {
return digest;
}
/**
* 设置:是否删除 0-否 1-是
*/
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
/**
* 获取:是否删除 0-否 1-是
*/
public Integer getIsDelete() {
return isDelete;
}
/**
* 设置:是否加急 0-否 1-是
*/
public void setIsUrgent(Integer isUrgent) {
this.isUrgent = isUrgent;
}
/**
* 获取:是否加急 0-否 1-是
*/
public Integer getIsUrgent() {
return isUrgent;
}
}
...@@ -19,6 +19,7 @@ import lombok.AllArgsConstructor; ...@@ -19,6 +19,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;
/** /**
* @author Tang 2020-04-17 * @author Tang 2020-04-17
...@@ -32,7 +33,7 @@ import lombok.NoArgsConstructor; ...@@ -32,7 +33,7 @@ import lombok.NoArgsConstructor;
public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> { public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -57,11 +58,14 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> { ...@@ -57,11 +58,14 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> {
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "操作时间 ", example = "操作时间") @ApiModelProperty(value = "操作时间 ", example = "操作时间")
private Date updateTime; private Date updateTime;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "")
private List<SpmkExecutor> spmkExecutors; private List<SpmkExecutor> spmkExecutors;
} }
\ No newline at end of file
package cn.timer.api.bean.spmk;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 审批执行记录 发起人、抄送人、审批人操作记录--草稿
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-19 14:53:36
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "spmk_approve_execute_record_drafts")
@ApiModel("审批执行记录 发起人、抄送人、审批人操作记录--草稿")
public class SpmkApproveExecuteRecordDrafts extends Model<SpmkApproveExecuteRecordDrafts> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private Integer id;
/**
* 审批汇总id
*/
private Integer approveSummaryId;
/**
* 名称 发起申请 1抄送人 审批人 连续多级主管
*/
private String name;
/**
* 类型 0发起申请 1抄送人 2审批人 3连续多级主管
*/
private Integer type;
/**
* 状态 0未执行 1审批中 2同意 3拒绝
*/
private Integer sts;
/**
* 创建时间
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 设置:编号
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:编号
*/
public Integer getId() {
return id;
}
/**
* 设置:审批汇总id
*/
public void setApproveSummaryId(Integer approveSummaryId) {
this.approveSummaryId = approveSummaryId;
}
/**
* 获取:审批汇总id
*/
public Integer getApproveSummaryId() {
return approveSummaryId;
}
/**
* 设置:名称 发起申请 1抄送人 审批人 连续多级主管
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取:名称 发起申请 1抄送人 审批人 连续多级主管
*/
public String getName() {
return name;
}
/**
* 设置:类型 0发起申请 1抄送人 2审批人 3连续多级主管
*/
public void setType(Integer type) {
this.type = type;
}
/**
* 获取:类型 0发起申请 1抄送人 2审批人 3连续多级主管
*/
public Integer getType() {
return type;
}
/**
* 设置:状态 0未执行 1审批中 2同意 3拒绝
*/
public void setSts(Integer sts) {
this.sts = sts;
}
/**
* 获取:状态 0未执行 1审批中 2同意 3拒绝
*/
public Integer getSts() {
return sts;
}
/**
* 设置:创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取:
*/
public Date getUpdateTime() {
return updateTime;
}
}
...@@ -32,7 +32,7 @@ import lombok.NoArgsConstructor; ...@@ -32,7 +32,7 @@ import lombok.NoArgsConstructor;
public class SpmkApproveSummary extends Model<SpmkApproveSummary> { public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -73,7 +73,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -73,7 +73,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty(value = "历史审批人 ", example = "历史审批人") @ApiModelProperty(value = "历史审批人 ", example = "历史审批人")
private String historyApprover; private String historyApprover;
@ApiModelProperty(value = "1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "1") @ApiModelProperty(value = "1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "1")
private Integer assoType; private Integer assoType;
...@@ -89,7 +89,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -89,7 +89,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty(value = "是否删除", example = "0-否 1-是") @ApiModelProperty(value = "是否删除", example = "0-否 1-是")
private Integer isDelete; private Integer isDelete;
@ApiModelProperty(value = "岗位名称", example = "岗位名称") @ApiModelProperty(value = "岗位名称", example = "岗位名称")
private String gwName; private String gwName;
@ApiModelProperty(value = "部门id", example = "1") @ApiModelProperty(value = "部门id", example = "1")
...@@ -99,8 +99,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -99,8 +99,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty(value = "是否加急", example = "0-否 1-是") @ApiModelProperty(value = "是否加急", example = "0-否 1-是")
private Integer isUrgent; private Integer isUrgent;
} }
\ No newline at end of file
...@@ -33,7 +33,7 @@ import lombok.NoArgsConstructor; ...@@ -33,7 +33,7 @@ import lombok.NoArgsConstructor;
public class SpmkExecutor extends Model<SpmkExecutor> { public class SpmkExecutor extends Model<SpmkExecutor> {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -61,10 +61,13 @@ public class SpmkExecutor extends Model<SpmkExecutor> { ...@@ -61,10 +61,13 @@ public class SpmkExecutor extends Model<SpmkExecutor> {
@ApiModelProperty(value = "状态 0未执行 1执行中 2同意 3拒接 4转派", example = "101") @ApiModelProperty(value = "状态 0未执行 1执行中 2同意 3拒接 4转派", example = "101")
private Integer sts; private Integer sts;
@ApiModelProperty(value = "阅读标记0.未读 1.已读", example = "0")
private Integer readStatus;
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date updateTime; private Date updateTime;
......
...@@ -63,9 +63,18 @@ public class DiskFilesController { ...@@ -63,9 +63,18 @@ public class DiskFilesController {
@Autowired @Autowired
private SftpConfiguration config; private SftpConfiguration config;
@Value("${sftp.client.targetPath}")
private String targetPath;
@Value("${sftp.client.reservedName}")
private boolean reservedName;
@Value("${sftp.client.serverUrl}")
private String serverUrl;
@Autowired @Autowired
private OSSService ossService; private OSSService ossService;
@ResponseBody @ResponseBody
@PostMapping("/upload") @PostMapping("/upload")
@ApiOperation(value = "上传普通文件", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "上传普通文件", httpMethod = "POST", notes = "接口发布说明")
...@@ -326,7 +335,7 @@ public class DiskFilesController { ...@@ -326,7 +335,7 @@ public class DiskFilesController {
@ApiOperation(value = "查询文件是否存在", httpMethod = "GET", notes = "查询文件是否存在") @ApiOperation(value = "查询文件是否存在", httpMethod = "GET", notes = "查询文件是否存在")
@GetMapping(value = "/query_file_isExist") @GetMapping(value = "/query_file_isExist")
public Result<Object> queryFileIsExist(@CurrentUser UserBean userBean,@ApiParam("文件ID") @RequestParam(required = true) Integer fileId, public Result<Object> queryFileIsExist(@CurrentUser UserBean userBean,@ApiParam("文件ID") @RequestParam(required = true) Integer fileId,
@ApiParam("默认不传,我收到的列表查询传type=1") @RequestParam(required = false) Integer type){ @ApiParam("默认不传,我收到的列表查询传type=1") @RequestParam(required = false) Integer type){
DiskFiles diskFiles = DiskFiles.builder().id(fileId).build().selectById(); DiskFiles diskFiles = DiskFiles.builder().id(fileId).build().selectById();
DiskFilesLog diskFilesLog = DiskFilesLog.builder().build(); DiskFilesLog diskFilesLog = DiskFilesLog.builder().build();
if(StringUtils.isEmpty(diskFiles)){ if(StringUtils.isEmpty(diskFiles)){
......
...@@ -18,4 +18,4 @@ public class FileAddressConstant { ...@@ -18,4 +18,4 @@ public class FileAddressConstant {
*/ */
public static final String PHYSICS_OSS = "physics-oss"; public static final String PHYSICS_OSS = "physics-oss";
} }
\ No newline at end of file
package cn.timer.api.controller.spmk;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.spmk.SpmkApproveDetailSummary;
import cn.timer.api.bean.spmk.SpmkApproveExecuteRecord;
import cn.timer.api.bean.spmk.SpmkApproveSummary;
import cn.timer.api.bean.spmk.SpmkExecutor;
import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.enums.SysRoleType;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper;
import cn.timer.api.dao.spmk.SpmkApproveSummaryMapper;
import cn.timer.api.dao.spmk.SpmkExecutorMapper;
import cn.timer.api.dto.spmk.AdminApprovingDto;
import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import cn.timer.api.utils.redis.RedisUtil;
import cn.timer.api.utils.router.RouterUtils;
import cn.timer.api.utils.router.business.SpmkAssoBusiness;
import cn.timer.api.utils.router.business.SpmkAssoBusinessFactory;
import cn.timer.api.utils.router.enums.ApproveEnum;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Slf4j
@Api(tags = "3.0Admin审批模块")
@RestController
@Transactional
@RequestMapping(value = "/admin/spmk", produces = { "application/json","multipart/form-data" })
public class AdminSpmkController {
@Autowired
private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper;
@Autowired
private SpmkApproveSummaryMapper spmkApproveSummaryMapper;
@Autowired
private SpmkExecutorMapper spmkExecutorMapper;
@Autowired
private SpmkAssoBusinessFactory spmkAssoBusinessFactory;
@Autowired
private SpmkApproveExecuteRecordMapper spmkApproveExecuteRecordMapper;
private static com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
@Resource
private RedisUtil redisUtil;
//TODO 管理员审批
/**
* 管理员审批
*/
@PostMapping(value = "/approving")
@ApiOperation(value = "1.审批人审批", httpMethod = "POST", notes = "审批人审批")
@Transactional(rollbackFor = Exception.class)
@ApiOperationSupport(order = 20)
@Log(title = "审批-审批流程", businessType = BusinessType.UPDATE)
public Result<Object> approving(@CurrentUser UserBean userBean,@Validated @RequestBody AdminApprovingDto approvingDto) throws Exception {
/*判断是否有权限转派*/
//if(approvingDto.getSts()==4){
QyzxEmpEntAsso ent = QyzxEmpEntAsso.builder().build().selectOne(new QueryWrapper<QyzxEmpEntAsso>().lambda().eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode()).eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
if(ent != null) {
/*超管和管理员不受权限控制*/
if(ent.getUserType() == 2) {
ZzglAuth zzglAuth = ZzglAuth.builder().build().selectOne(new QueryWrapper<ZzglAuth>().lambda().eq(ZzglAuth::getBmgwId, userBean.getUserInfo().getBmgwId())
.eq(ZzglAuth::getMenuId, "/Approvalspbutonspbuton020102"));
if (zzglAuth == null) {
return ResultUtil.error("您没有权限");
}
}
}
//}
Integer asId = approvingDto.getAsId();
//查询redis中当前有没有在被审批执行中,0是没有在执行,1是在执行
Integer approStatus=Integer.parseInt(redisUtil.get(asId.toString())==null?"0":redisUtil.get(asId.toString()).toString());
if(approStatus==1){
return ResultUtil.error("该审批已在审批中!");
}else{
redisUtil.set(asId.toString(),1,2);
}
SpmkApproveDetailSummary ad = SpmkApproveDetailSummary.builder().build().selectOne(new QueryWrapper<SpmkApproveDetailSummary>()
.lambda()
.select(SpmkApproveDetailSummary::getId,
SpmkApproveDetailSummary::getRequestData,
SpmkApproveDetailSummary::getFroms,
SpmkApproveDetailSummary::getFlowChildren)
.eq(SpmkApproveDetailSummary::getApproveSummaryId, asId));
// 查询 SpmkApproveSummary 状态,
SpmkApproveSummary aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda()
.select(SpmkApproveSummary::getSts)
.eq(SpmkApproveSummary::getId, asId));
// if (aSummary.getSts() > ApproveSummarySts.IN.ordinal()) {
// redisUtil.set(asId.toString(),0,500);
// return ResultUtil.error("该审批已结束!");
// }
//
// // 查询该 审批的状态 是否为 1 审批中
// Integer count = SpmkExecutor.builder().build().selectCount(new QueryWrapper<SpmkExecutor>().lambda()
// .eq(SpmkExecutor::getId, approvingDto.getExecutorId())
// .eq(SpmkExecutor::getSts, ExecutorSts.IN_EXECUTION.ordinal()));
//
// if (count == 0) {
// redisUtil.set(asId.toString(),0,500);
// return ResultUtil.error("您已审批过!");
// }
if ( spmkExecutorMapper.selectCount(new QueryWrapper<SpmkExecutor>().lambda()
.eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getEmpNum, userBean.getEmpNum())
.eq(SpmkExecutor::getSts, ExecutorSts.IN_EXECUTION.ordinal())) == 0) {
Integer adminNum = new LambdaQueryChainWrapper<QyzxEmpEntAsso>(qyzxEmpEntAssoMapper)
.eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum())
.eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode())
.in(QyzxEmpEntAsso::getUserType, SysRoleType.U_TYPE_ADMIN,SysRoleType.U_TYPE_C_ADMIN)
.count();
if (adminNum <= 0) {
redisUtil.set(asId.toString(),0,500);
return ResultUtil.error("非当前审批人 或 管理员,无法操作!");
}
}
//如果是再次审批
SpmkApproveExecuteRecord spmkApproveExecuteRecord = SpmkApproveExecuteRecord.builder().id(approvingDto.getExecuteRecordId()).build().selectById();
if(spmkApproveExecuteRecord.getSts()>1){
spmkApproveExecuteRecordMapper.delExecuteRecord(approvingDto.getExecuteRecordId(), asId);
}
List<FlowChildren> listFlowChildren = jsonObject.parseArray(ad.getFlowChildren(),FlowChildren.class);
RouterUtils.updateRefuseToAgree(
listFlowChildren,
asId,
approvingDto.getExecuteRecordId(),
approvingDto.getExecutorId(),
approvingDto.getOpinion(),
approvingDto.getSts(),
aSummary.getSts(),
approvingDto.getUser(),
approvingDto.getSignatureImg(),
userBean.getEmpNum(),
approvingDto.getUserList(),
approvingDto.getTypeIndex(),
approvingDto.getUserIndex()
);
// 更新 flowChildren
SpmkApproveDetailSummary sadsUpdate = SpmkApproveDetailSummary.builder().id(ad.getId()).flowChildren(JSONArray.fromObject(listFlowChildren).toString()).build();
/*// 审批详情 审批时添加 附件
if(RequestDataUtils.addFileList(ad,approvingDto.getFileList())){
sadsUpdate.setRequestData(ad.getRequestData());
}*/
sadsUpdate.updateById();
//最后一条数据
FlowChildren fc = CollUtil.getLast(listFlowChildren);
if (fc.getExecute() == "2") {
// 查询 SpmkApproveSummary 状态
aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda()
.select(SpmkApproveSummary::getSts,SpmkApproveSummary::getAssoType)
.eq(SpmkApproveSummary::getId, asId));
// if (aSummary.getSts() != ApproveSummarySts.REFUSE.ordinal()) {
SpmkApproveSummary.builder().id(asId).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById();
JSONObject jSONObject = jsonObject.parseObject(ad.getRequestData(),JSONObject.class);
jSONObject.set("approveId", FromData.builder().value(String.valueOf(asId)).build());
jSONObject.set("orgCode", userBean.getOrgCode());
//审批完成后 业务
SpmkAssoBusiness sab = spmkAssoBusinessFactory.createSpmkService(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null){
log.info("1----------{}",sab);
}
log.info("2----------{}", jSONObject);
sab.handleApprove(jSONObject);
}
// }
// }else {
// redisUtil.set(asId.toString(),0,500);
// return ResultUtil.error("该审批已结束!");
// }
redisUtil.set(asId.toString(),0,500);
return ResultUtil.success();
}
/**
* 删除-考核模板
@DeleteMapping(value = "/del_appraisal_t/{id}")
@ApiOperation(value = "2.移除-审批人", httpMethod = "DELETE", notes = "移除-审批人")
@ApiOperationSupport(order = 6)
@Role
public Result<Object> delAT(@CurrentUser UserBean userBean,@Validated @RequestBody AdminApprovingDto approvingDto) throws Exception {
jxglAppraisalTMapper.delete(new QueryWrapper<JxglAppraisalT>().lambda().eq(JxglAppraisalT::getId, id)
.eq(JxglAppraisalT::getOrgCode, userBean.getOrgCode()));
return ResultUtil.success();
}*/
}
...@@ -9,11 +9,13 @@ import cn.timer.api.dto.spmk.SpmkApproveDetailDto; ...@@ -9,11 +9,13 @@ import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
public interface SpmkService { public interface SpmkService {
boolean createCustomApproval(Integer orgCode); boolean createCustomApproval(Integer orgCode);
SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId); SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId,Integer empNum);
List<SpmkApprovalG> selectListAg(UserBean userBean); List<SpmkApprovalG> selectListAg(UserBean userBean);
String addApproveDetail(); String addApproveDetail();
SpmkApproveDetailDto selectDraftsDetailByAsId(Integer asId);
} }
...@@ -2,6 +2,7 @@ package cn.timer.api.dao.kqmk; ...@@ -2,6 +2,7 @@ package cn.timer.api.dao.kqmk;
import java.util.List; import java.util.List;
import cn.timer.api.dto.kqmk.*;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -9,30 +10,28 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -9,30 +10,28 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
import cn.timer.api.dto.kqmk.AdditionalDto;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.EmployeeLeaveBalanceDto;
import cn.timer.api.dto.kqmk.JiaqibalanceDto;
/** /**
* 员工假期余额 * 员工假期余额
* *
* @author LAL 2020-05-09 * @author LAL 2020-05-09
*/ */
@Repository @Repository
public interface KqglAssoLeaveBalanceMapper extends BaseMapper<KqglAssoLeaveBalance> { public interface KqglAssoLeaveBalanceMapper extends BaseMapper<KqglAssoLeaveBalance> {
IPage<EmployeeLeaveBalanceDto> selectPageByQueryLeaveBalance(IPage<EmployeeLeaveBalanceDto> page,@Param("param") AttqueryCriteriaDto attquerycriteriadto); IPage<EmployeeLeaveBalanceDto> selectPageByQueryLeaveBalance(IPage<EmployeeLeaveBalanceDto> page,@Param("param") AttqueryCriteriaDto attquerycriteriadto);
AdditionalDto selectAdditional(int orgcode,int empnum); AdditionalDto selectAdditional(int orgcode,int empnum);
List<AdditionalDto> selectAdditionalList(int orgcode); List<AdditionalDto> selectAdditionalList(int orgcode);
// JiaqibalanceDto selectleavebalanceList(int leaverulesid,int userid); // JiaqibalanceDto selectleavebalanceList(int leaverulesid,int userid);
Double Sumbalancedays(int userid,int orgcode,int leaverulesid); Double Sumbalancedays(int userid,int orgcode,int leaverulesid);
List<AdditionalDto> RealTimeUpdate(int orgcode,int kqzid); List<AdditionalDto> RealTimeUpdate(int orgcode,int kqzid);
List<AdditionalDto> selectAdditionalByempnum(int orgcode,int empnum); List<AdditionalDto> selectAdditionalByempnum(int orgcode,int empnum);
List<ExportEmployeeLeaveBalanceDto> selectLeaveBalance(@Param("param") AttqueryCriteriaDto attquerycriteriadto);
} }
...@@ -3,12 +3,11 @@ package cn.timer.api.dao.qyxx; ...@@ -3,12 +3,11 @@ package cn.timer.api.dao.qyxx;
import com.github.yulichang.base.MPJBaseMapper; import com.github.yulichang.base.MPJBaseMapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import cn.timer.api.bean.qyxx.CmsContent; import cn.timer.api.bean.qyxx.CmsContent;
/** /**
* OA消息内容表 * OA消息内容表
* *
* @author dsc 2019-12-10 * @author dsc 2019-12-10
*/ */
@Repository @Repository
......
package cn.timer.api.dao.qyxx; package cn.timer.api.dao.qyxx;
import cn.timer.api.bean.qyxx.CmsContent;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -8,9 +9,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -8,9 +9,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.qyxx.CmsIsRead; import cn.timer.api.bean.qyxx.CmsIsRead;
import cn.timer.api.dto.qyxx.QyxxIsReadDto; import cn.timer.api.dto.qyxx.QyxxIsReadDto;
import java.util.List;
/** /**
* OA消息内容表 * OA消息内容表
* *
* @author dsc 2019-12-12 * @author dsc 2019-12-12
*/ */
@Repository @Repository
...@@ -18,11 +21,12 @@ public interface CmsIsReadMapper extends BaseMapper<CmsIsRead> { ...@@ -18,11 +21,12 @@ public interface CmsIsReadMapper extends BaseMapper<CmsIsRead> {
/** /**
* 查询已读人 * 查询已读人
* *
* @param mid * @param mid
* @param orgCode * @param orgCode
* @return * @return
*/ */
QyxxIsReadDto queryIsReadEmp(@Param(value = "orgCode") Integer orgCode, @Param(value = "mid") Integer mid); QyxxIsReadDto queryIsReadEmp(@Param(value = "orgCode") Integer orgCode, @Param(value = "mid") Integer mid);
List<CmsContent> getUnreadList(@Param(value="userId")Integer userId);
} }
package cn.timer.api.dao.spmk;
import cn.timer.api.bean.spmk.SpmkApproveDetailDrafts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 审批草稿详情
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Repository
public interface SpmkApproveDetailDraftsMapper extends BaseMapper<SpmkApproveDetailDrafts> {
}
package cn.timer.api.dao.spmk;
import cn.timer.api.bean.spmk.SpmkApproveDrafts;
import cn.timer.api.dto.spmk.MySummaryQueryDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* 审批草稿箱
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Repository
public interface SpmkApproveDraftsMapper extends BaseMapper<SpmkApproveDrafts> {
IPage<SpmkApproveDrafts> selectPageByQueryForEmpNum(IPage<SpmkApproveDrafts> page, @Param("param") MySummaryQueryDto mySummaryQueryDto);
}
package cn.timer.api.dao.spmk;
import cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 审批执行记录 发起人、抄送人、审批人操作记录--草稿
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-19 14:53:36
*/
public interface SpmkApproveExecuteRecordDraftsMapper extends BaseMapper<SpmkApproveExecuteRecordDrafts> {
}
...@@ -2,6 +2,7 @@ package cn.timer.api.dao.spmk; ...@@ -2,6 +2,7 @@ package cn.timer.api.dao.spmk;
import java.util.List; import java.util.List;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -11,12 +12,16 @@ import cn.timer.api.bean.spmk.SpmkApproveExecuteRecord; ...@@ -11,12 +12,16 @@ import cn.timer.api.bean.spmk.SpmkApproveExecuteRecord;
/** /**
* 审批执行记录 * 审批执行记录
* *
* @author Tang 2020-04-17 * @author Tang 2020-04-17
*/ */
@Repository @Repository
public interface SpmkApproveExecuteRecordMapper extends BaseMapper<SpmkApproveExecuteRecord> { public interface SpmkApproveExecuteRecordMapper extends BaseMapper<SpmkApproveExecuteRecord> {
List<SpmkApproveExecuteRecord> selectListByAsId(@Param("id") Integer id); List<SpmkApproveExecuteRecord> selectListByAsId(@Param("id") Integer id);
int delExecuteRecord(@Param("recordId") Integer recordId,@Param("approveSummaryId") Integer approveSummaryId);
SpmkApproveExecuteRecord selectExecuteRecordById(@Param("userId") Integer userId,@Param("approveSummaryId") Integer approveSummaryId);
int delExecuteRecordByRecordIds(@Param("id") Integer id, @Param("uid")Integer uid);
SpmkApproveExecuteRecord selectExecuteRecordReoId(@Param("reoId") Integer reoId,@Param("approveSummaryId") Integer approveSummaryId);
} }
...@@ -13,14 +13,14 @@ import lombok.NoArgsConstructor; ...@@ -13,14 +13,14 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class BalanceSheetDataDto implements Serializable{ public class BalanceSheetDataDto implements Serializable{
/** /**
* *
*/ */
private static final long serialVersionUID = -6994914131126332691L; private static final long serialVersionUID = -6994914131126332691L;
/** /**
* *
*/ */
@ApiModelProperty(value = "id id", example = "101") @ApiModelProperty(value = "id id", example = "101")
...@@ -29,6 +29,9 @@ public class BalanceSheetDataDto implements Serializable{ ...@@ -29,6 +29,9 @@ public class BalanceSheetDataDto implements Serializable{
@ApiModelProperty(value = "假期规则id", example = "字段说明") @ApiModelProperty(value = "假期规则id", example = "字段说明")
private Integer leaverulesid; private Integer leaverulesid;
@ApiModelProperty(value = "假期name", example = "字段说明")
private String name;
@ApiModelProperty(value = "余额天数 ", example = "字段说明") @ApiModelProperty(value = "余额天数 ", example = "字段说明")
private double balancedays; private double balancedays;
} }
package cn.timer.api.dto.kqmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExportEmployeeLeaveBalanceDto {
@ApiModelProperty(value = "员工工号 ", example = "字段说明")
private Integer empnum;
@ApiModelProperty(value = "员工名称 ", example = "字段说明")
private String empname;
@ApiModelProperty(value = "部门 ", example = "字段说明")
private String department;
@ApiModelProperty(value = "入职日期 ", example = "字段说明")
private String rztime;
@ApiModelProperty(value = "企业组织代码 ", example = "字段说明")
private Integer orgcode;
private Integer turnover_status;
@ApiModelProperty(value = "表数据", example = "字段说明")
List<BalanceSheetDataDto> balanceTo;
}
...@@ -5,9 +5,11 @@ import java.util.List; ...@@ -5,9 +5,11 @@ import java.util.List;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Transient;
import cn.timer.api.bean.qyxx.CmsContentRead; import cn.timer.api.bean.qyxx.CmsContentRead;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import cn.timer.api.utils.Page; import cn.timer.api.utils.Page;
...@@ -33,110 +35,110 @@ public class CmsContentDto extends Page implements Serializable{ ...@@ -33,110 +35,110 @@ public class CmsContentDto extends Page implements Serializable{
@ApiModelProperty(value = "内容类型ID", example = "101") @ApiModelProperty(value = "内容类型ID", example = "101")
private String contenttypeid;// 内容类型ID private String contenttypeid;// 内容类型ID
@ApiModelProperty(value = "标题", example = "101") @ApiModelProperty(value = "标题", example = "101")
private String title;// 标题 private String title;// 标题
@ApiModelProperty(value = "作者", example = "101") @ApiModelProperty(value = "作者", example = "101")
private String author;// 作者 private String author;// 作者
@ApiModelProperty(value = "内容", example = "101") @ApiModelProperty(value = "内容", example = "101")
private String summary;// 内容 private String summary;// 内容
@ApiModelProperty(value = "摘要", example = "101") @ApiModelProperty(value = "摘要", example = "101")
private String introduction;// 摘要 private String introduction;// 摘要
@ApiModelProperty(value = "链接", example = "101") @ApiModelProperty(value = "链接", example = "101")
private String linkaddress;// 链接 private String linkaddress;// 链接
@ApiModelProperty(value = "录入日期", example = "101") @ApiModelProperty(value = "录入日期", example = "101")
private Long addeddate;// 录入日期 private Long addeddate;// 录入日期
@ApiModelProperty(value = "发布状态", example = "101") @ApiModelProperty(value = "发布状态", example = "101")
private Integer releasestate;// 发布状态 private Integer releasestate;// 发布状态
@ApiModelProperty(value = "审核状态", example = "101") @ApiModelProperty(value = "审核状态", example = "101")
private Integer status;// 审核状态 private Integer status;// 审核状态
@ApiModelProperty(value = "添加人---责任编辑人姓名", example = "101") @ApiModelProperty(value = "添加人---责任编辑人姓名", example = "101")
private Integer userid;// 添加人---责任编辑人姓名 private Integer userid;// 添加人---责任编辑人姓名
@ApiModelProperty(value = "org_code", example = "101") @ApiModelProperty(value = "org_code", example = "101")
private Integer organizationId;// 归属商户id private Integer organizationId;// 归属商户id
// @ApiModelProperty(value = "有效起始时间", example = "101") // @ApiModelProperty(value = "有效起始时间", example = "101")
// private String starttime;// 有效起始时间 // private String starttime;// 有效起始时间
// //
// @ApiModelProperty(value = "有效结束时间", example = "101") // @ApiModelProperty(value = "有效结束时间", example = "101")
// private String endtime;// 有效结束时间 // private String endtime;// 有效结束时间
@ApiModelProperty(value = "状态 1:正常 2:删除", example = "101") @ApiModelProperty(value = "状态 1:正常 2:删除", example = "101")
private Integer existencestatus;// 状态 1:正常 2:删除 private Integer existencestatus;// 状态 1:正常 2:删除
@ApiModelProperty(value = "审核人姓名", example = "101") @ApiModelProperty(value = "审核人姓名", example = "101")
private String auditor;// 审核人(用户ID) private String auditor;// 审核人(用户ID)
@ApiModelProperty(value = "审核时间", example = "101") @ApiModelProperty(value = "审核时间", example = "101")
private String audittime;// 审核时间 private String audittime;// 审核时间
@ApiModelProperty(value = "上级审核意见", example = "101") @ApiModelProperty(value = "上级审核意见", example = "101")
private String auditopinion;// 上级审核意见 private String auditopinion;// 上级审核意见
@ApiModelProperty(value = "评论内容", example = "101") @ApiModelProperty(value = "评论内容", example = "101")
private String reviewcontent;// 评论内容 private String reviewcontent;// 评论内容
@ApiModelProperty(value = "评论时间", example = "101") @ApiModelProperty(value = "评论时间", example = "101")
private Long reviewtime;// 评论时间 private Long reviewtime;// 评论时间
// @ApiModelProperty(value = "评论人", example = "101") // @ApiModelProperty(value = "评论人", example = "101")
// private String commentator;// 评论人 // private String commentator;// 评论人
@ApiModelProperty(value = "发布人(用户ID)", example = "101") @ApiModelProperty(value = "发布人(用户ID)", example = "101")
private Integer publisher;// 发布人(用户ID) private Integer publisher;// 发布人(用户ID)
@ApiModelProperty(value = "发布时间", example = "101") @ApiModelProperty(value = "发布时间", example = "101")
private String releasetime;// 发布时间 private String releasetime;// 发布时间
// @ApiModelProperty(value = "归属人", example = "101") // @ApiModelProperty(value = "归属人", example = "101")
// private Integer belonger;// 归属人 // private Integer belonger;// 归属人
// @ApiModelProperty(value = "提醒时间", example = "101") // @ApiModelProperty(value = "提醒时间", example = "101")
// private Long eventremindingtime;// 提醒时间 // private Long eventremindingtime;// 提醒时间
// @ApiModelProperty(value = "发送人-0:默认全部人员,1:批量人员", example = "101") // @ApiModelProperty(value = "发送人-0:默认全部人员,1:批量人员", example = "101")
// private Integer sender;// 发送人-0:默认全部人员,1:批量人员 // private Integer sender;// 发送人-0:默认全部人员,1:批量人员
@ApiModelProperty(value = "所属模块ID", example = "101") @ApiModelProperty(value = "所属模块ID", example = "101")
private Integer modularid;// 所属模块ID private Integer modularid;// 所属模块ID
@ApiModelProperty(value = "发布方式:1-编辑文本;2-文本识别", example = "101") @ApiModelProperty(value = "发布方式:1-编辑文本;2-文本识别", example = "101")
private Integer releasemode;// 发布方式:1-编辑文本;2-文本识别 private Integer releasemode;// 发布方式:1-编辑文本;2-文本识别
// @ApiModelProperty(value = "别名-0:已过期;1:未到期", example = "101") // @ApiModelProperty(value = "别名-0:已过期;1:未到期", example = "101")
// private int termstate;// 别名-0:已过期;1:未到期 // private int termstate;// 别名-0:已过期;1:未到期
@ApiModelProperty(value = "别名-用户名", example = "101") @ApiModelProperty(value = "别名-用户名", example = "101")
private String uname;// 别名-用户名 private String uname;// 别名-用户名
@ApiModelProperty(value = "封面文件路径", example = "101") @ApiModelProperty(value = "封面文件路径", example = "101")
private String fmtpath;// private String fmtpath;//
@ApiModelProperty(value = "附件文件路径", example = "101") @ApiModelProperty(value = "附件文件路径", example = "101")
private String filepath;// private String filepath;//
// private String[] filepath;// // private String[] filepath;//
@ApiModelProperty(value = "发布者姓名", example = "101") @ApiModelProperty(value = "发布者姓名", example = "101")
private String publisherName;// 发布者姓名 private String publisherName;// 发布者姓名
@ApiModelProperty(value = "发布方式:1,审核通过后立即发布,2定时发布,3手动发布", example = "101") @ApiModelProperty(value = "发布方式:1,审核通过后立即发布,2定时发布,3手动发布", example = "101")
private Integer releasetype;// 发布方式:1,审核通过后立即发布,2定时发布,3手动发布 private Integer releasetype;// 发布方式:1,审核通过后立即发布,2定时发布,3手动发布
@ApiModelProperty(value = "收回人(用户ID)", example = "101") @ApiModelProperty(value = "收回人(用户ID)", example = "101")
private Integer takeBack;// 收回人(用户ID) private Integer takeBack;// 收回人(用户ID)
@ApiModelProperty(value = "收回时间", example = "101") @ApiModelProperty(value = "收回时间", example = "101")
private String takeBackTime;// 收回时间 private String takeBackTime;// 收回时间
@ApiModelProperty(value = "定时发布时间", example = "101") @ApiModelProperty(value = "定时发布时间", example = "101")
private Long fixedTime;// 定时发布时间 private Long fixedTime;// 定时发布时间
......
...@@ -4,6 +4,7 @@ import cn.timer.api.utils.Page; ...@@ -4,6 +4,7 @@ import cn.timer.api.utils.Page;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -53,4 +54,7 @@ public class CmsContentReadDto extends Page implements Serializable { ...@@ -53,4 +54,7 @@ public class CmsContentReadDto extends Page implements Serializable {
@ApiModelProperty(value = "更新时间", example = "") @ApiModelProperty(value = "更新时间", example = "")
private Date updateTime; private Date updateTime;
@ApiModelProperty(value = "附件索引", example = "")
private Integer fileIndex;
} }
package cn.timer.api.dto.spmk;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AdminApprovingDto {
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批汇总id", example = "2", required = true)
private Integer asId;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批执行记录id", example = "10", required = true)
private Integer executeRecordId;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "执行人记录id", example = "10", required = true)
private Integer executorId;
@ApiModelProperty(value = "意见", example = "同意、拒绝")
private String opinion;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "状态 2同意 3拒绝 4转派", example = "2", required = true)
private Integer sts;
@ApiModelProperty(value = "被转派人 ", example = "对象")
private User user;
@ApiModelProperty(value = "签字图片 ", example = "签字图片")
private String signatureImg;
@ApiModelProperty(value = "被转派人数组 ", example = "数组")
private List<User> userList;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "申请数据 ", example = "申请数据", required = true)
private Integer execute;
@ApiModelProperty(value = "节点索引 ", example = "节点索引", required = true)
private Integer typeIndex;
@ApiModelProperty(value = "节点用户索引 ", example = "节点用户索引", required = true)
private Integer userIndex;
}
...@@ -3,12 +3,15 @@ package cn.timer.api.dto.spmk; ...@@ -3,12 +3,15 @@ package cn.timer.api.dto.spmk;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg; import cn.timer.api.config.exception.ValidationMsg;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.List;
@Data @Data
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
...@@ -40,4 +43,10 @@ public class ApprovingDto { ...@@ -40,4 +43,10 @@ public class ApprovingDto {
@ApiModelProperty(value = "签字图片 ", example = "签字图片") @ApiModelProperty(value = "签字图片 ", example = "签字图片")
private String signatureImg; private String signatureImg;
@ApiModelProperty(value = "被转派人数组 ", example = "数组")
private List<User> userList;
@ApiModelProperty(value = "申请数据 ", example = "申请数据", required = true)
private List<JSONObject> fileList;
} }
package cn.timer.api.dto.spmk;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FromsFileValueData implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private String file;
private String name;
}
...@@ -26,6 +26,9 @@ public class SpmkApproveDetailDto { ...@@ -26,6 +26,9 @@ public class SpmkApproveDetailDto {
@ApiModelProperty(value = "标题 ", example = "标题") @ApiModelProperty(value = "标题 ", example = "标题")
private String name; private String name;
@ApiModelProperty(value = "副标题 ", example = "副标题")
private String digest;
@ApiModelProperty(value = "所在部门名称 ", example = "所在部门名称") @ApiModelProperty(value = "所在部门名称 ", example = "所在部门名称")
private String departmentName; private String departmentName;
...@@ -43,19 +46,23 @@ public class SpmkApproveDetailDto { ...@@ -43,19 +46,23 @@ public class SpmkApproveDetailDto {
@ApiModelProperty(value = "审批执行记录 ", example = "审批执行记录") @ApiModelProperty(value = "审批执行记录 ", example = "审批执行记录")
private List<SpmkApproveExecuteRecord> approveExecuteRecord; private List<SpmkApproveExecuteRecord> approveExecuteRecord;
private Integer empNum; private Integer empNum;
private Integer sts; private Integer sts;
private Integer executeEmpNum;//当前审批中 当前执行人的id private Integer executeEmpNum;//当前审批中 当前执行人的id
private Integer executeSts; private Integer executeSts;
private Integer exeid; private Integer exeid;
private Integer exereid; private Integer exereid;
private Date launchTime; //审批发起时间 private Date launchTime; //审批发起时间
private Integer index;//插入审批人的索引
private Integer userIndex;//插入审批人的当前用户索引
} }
...@@ -10,6 +10,7 @@ import javax.validation.constraints.NotNull; ...@@ -10,6 +10,7 @@ import javax.validation.constraints.NotNull;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.config.exception.ValidationMsg; import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -24,6 +25,7 @@ import lombok.NoArgsConstructor; ...@@ -24,6 +25,7 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
public class SpmkApproveSummaryDto{ public class SpmkApproveSummaryDto{
@NotBlank(message = ValidationMsg.NOTBLANK) @NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "标题 ", example = "标题", required = true) @ApiModelProperty(value = "标题 ", example = "标题", required = true)
private String title; private String title;
...@@ -34,17 +36,17 @@ public class SpmkApproveSummaryDto{ ...@@ -34,17 +36,17 @@ public class SpmkApproveSummaryDto{
@ApiModelProperty(value = "摘要", example = "摘要", required = true) @ApiModelProperty(value = "摘要", example = "摘要", required = true)
private String digest; private String digest;
@NotBlank(message = ValidationMsg.NOTBLANK) @NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "发起人名称 ", example = "发起人名称", required = true) @ApiModelProperty(value = "发起人名称 ", example = "发起人名称", required = true)
private String initiator; private String initiator;
@NotNull(message = ValidationMsg.NOTNULL) @NotNull(message = ValidationMsg.NOTNULL)
@DecimalMax(value = "11",message = ValidationMsg.DECIMALMAX +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪 11录用 ") @DecimalMax(value = "9",message = ValidationMsg.DECIMALMAX +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪 11录用") @DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪 11录用", example = "1") @ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡", example = "1")
private Integer assoType; private Integer assoType;
@NotNull(message = ValidationMsg.NOTNULL) @NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "申请数据 ", example = "申请数据", required = true) @ApiModelProperty(value = "申请数据 ", example = "申请数据", required = true)
private JSONObject requestData; private JSONObject requestData;
...@@ -60,4 +62,7 @@ public class SpmkApproveSummaryDto{ ...@@ -60,4 +62,7 @@ public class SpmkApproveSummaryDto{
@ApiModelProperty(value = "是否加急", example = "是否加急", required = true) @ApiModelProperty(value = "是否加急", example = "是否加急", required = true)
private Integer isUrgent; private Integer isUrgent;
@ApiModelProperty
private Integer id;
} }
package cn.timer.api.utils.router;
import cn.timer.api.bean.spmk.SpmkApproveDetailSummary;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.List;
/**
* 申请数据工具类
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-07-13 10:05:49
*/
@Slf4j
public class RequestDataUtils {
/**
* 表单file类型
*/
private final static String FORMS_CLASS_NAME_KEY = "className";
private final static String FORMS_CLASS_NAME_VALUE = "file";
/**
* 表单label类型
*/
private final static String FORMS_DISPLAY_NAME_KEY = "displayName";
private final static String FORMS_DISPLAY_NAME_VALUE = "上传附件";
/**
* 表单inputId
*/
private final static String FORMS_INPUTID_KEY = "inputId";
/**
* 申请数据 file* value
*/
private final static String FORMS_INPUTID_KEY_VALUE = "value";
private static JSONObject jsonObject = new JSONObject();
/**
* 审批详情 审批时添加 附件
*
* @param spmkApproveDetailSummary 审批详情数据
* @param fileList 新增数据
* @throws Exception
*/
public static Boolean addFileList(SpmkApproveDetailSummary spmkApproveDetailSummary, List<JSONObject> fileList) throws Exception {
if (CollectionUtils.isEmpty(fileList)) {
return false;
}
log.info("fileList = {}", fileList);
List<JSONObject> forms = jsonObject.parseArray(spmkApproveDetailSummary.getFroms(), JSONObject.class);
if (CollectionUtils.isEmpty(forms)) {
return false;
}
String inputId = "";
// 找到审批表单对应的附件节点 inputId
for (JSONObject object : forms) {
if (FORMS_CLASS_NAME_VALUE.equals(object.get(FORMS_CLASS_NAME_KEY)) /*&& FORMS_DISPLAY_NAME_VALUE.equals(object.get(FORMS_DISPLAY_NAME_KEY))*/) {
inputId = object.get(FORMS_INPUTID_KEY).toString();
break;
}
}
if (StringUtils.isEmpty(inputId) || inputId.length() <= 0) {
log.info("审批详情 >审批时添加附件 forms not file point.");
return false;
}
log.info("forms = {}", forms);
JSONObject requestData = jsonObject.parseObject(spmkApproveDetailSummary.getRequestData(), JSONObject.class);
if (StringUtils.isEmpty(requestData)) {
return false;
}
// 找到 申请数据 对应节点 的数据
JSONObject value = (JSONObject) requestData.get(inputId);
JSONArray v = (JSONArray) value.get(FORMS_INPUTID_KEY_VALUE);
// 添加 申请数据 对应节点 的数据
v.addAll(fileList);
log.info("requestData = {}", requestData);
spmkApproveDetailSummary.setRequestData(requestData.toJSONString());
return true;
}
/**
* 审批详情 审批时添加 附件
*
* @param spmkApproveDetailSummary 审批详情数据
* @param fileList 新增数据
* @throws Exception
*/
public static Boolean delFileList(SpmkApproveDetailSummary spmkApproveDetailSummary, List<JSONObject> fileList) throws Exception {
log.info("fileList = {}", fileList);
List<JSONObject> forms = jsonObject.parseArray(spmkApproveDetailSummary.getFroms(), JSONObject.class);
if (CollectionUtils.isEmpty(forms)) {
return false;
}
String inputId = "";
// 找到审批表单对应的附件节点 inputId
for (JSONObject object : forms) {
if (FORMS_CLASS_NAME_VALUE.equals(object.get(FORMS_CLASS_NAME_KEY)) /*&& FORMS_DISPLAY_NAME_VALUE.equals(object.get(FORMS_DISPLAY_NAME_KEY))*/) {
inputId = object.get(FORMS_INPUTID_KEY).toString();
break;
}
}
if (StringUtils.isEmpty(inputId) || inputId.length() <= 0) {
log.info("审批详情 >审批时添加附件 forms not file point.");
return false;
}
log.info("forms = {}", forms);
JSONObject requestData = jsonObject.parseObject(spmkApproveDetailSummary.getRequestData(), JSONObject.class);
if (StringUtils.isEmpty(requestData)) {
return false;
}
// 找到 申请数据 对应节点 的数据
JSONObject value = (JSONObject) requestData.get(inputId);
JSONArray v = (JSONArray) value.get(FORMS_INPUTID_KEY_VALUE);
v.clear();
if(fileList.size()>=0) {
v.addAll(fileList);
}
spmkApproveDetailSummary.setRequestData(requestData.toJSONString());
return true;
}
}
...@@ -244,8 +244,8 @@ config-8timer: ...@@ -244,8 +244,8 @@ config-8timer:
# 文件存储地址类型:aliyun-oss(阿里云OSS),physics-oss(物理机器OSS) # 文件存储地址类型:aliyun-oss(阿里云OSS),physics-oss(物理机器OSS)
# 默认存储物理机器OSS # 默认存储物理机器OSS
file-address: file-address:
type: physics-oss #type: physics-oss
#type: aliyun-oss type: aliyun-oss
#导出zip临时地址 #导出zip临时地址
zip: zip:
......
...@@ -107,7 +107,7 @@ spring: ...@@ -107,7 +107,7 @@ spring:
port: 465 port: 465
class: javax.net.ssl.SSLSocketFactor class: javax.net.ssl.SSLSocketFactor
redis: redis:
database: 4 # Redis数据库索引(默认为0),如果设置为1,那么存入的key-value都存放在select 1中 database: 2 # Redis数据库索引(默认为0),如果设置为1,那么存入的key-value都存放在select 1中
host: 120.78.162.177 host: 120.78.162.177
port: 7788 port: 7788
password: (!0YouLingRcRedis0!) password: (!0YouLingRcRedis0!)
...@@ -219,8 +219,8 @@ config-8timer: ...@@ -219,8 +219,8 @@ config-8timer:
# 文件存储地址类型:aliyun-oss(阿里云OSS),physics-oss(物理机器OSS) # 文件存储地址类型:aliyun-oss(阿里云OSS),physics-oss(物理机器OSS)
# 默认存储物理机器OSS # 默认存储物理机器OSS
file-address: file-address:
type: physics-oss #type: physics-oss
#type: aliyun-oss type: aliyun-oss
#导出zip临时地址 #导出zip临时地址
zip: zip:
......
spring: spring:
profiles: profiles:
active: dev active: test
#active: '@environment@' #active: '@environment@'
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.qyxx.CmsIsReadMapper"> <mapper namespace="cn.timer.api.dao.qyxx.CmsIsReadMapper">
<resultMap id="BaseResultMap" <resultMap id="BaseResultMap"
type="cn.timer.api.bean.qyxx.CmsIsRead"> type="cn.timer.api.bean.qyxx.CmsIsRead">
<id column="id" property="id" /> <id column="id" property="id" />
<result column="mid" property="mid" /> <result column="mid" property="mid" />
<result column="uid" property="uid" /> <result column="uid" property="uid" />
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<!-- 查询全部已读人 --> <!-- 查询全部已读人 -->
<select id="queryIsReadEmp" parameterType="java.lang.Integer" <select id="queryIsReadEmp" parameterType="java.lang.Integer"
resultType="cn.timer.api.dto.qyxx.QyxxIsReadDto"> resultType="cn.timer.api.dto.qyxx.QyxxIsReadDto">
SELECT SELECT
a.mid mid, a.mid mid,
a.uid uid, a.uid uid,
...@@ -45,19 +45,27 @@ ...@@ -45,19 +45,27 @@
a.read_time ASC a.read_time ASC
</select> </select>
<!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.cmsI.CmsIsRead"> <select id="getUnreadList" resultType="cn.timer.api.bean.qyxx.CmsContent">
INSERT INTO cms_is_read <trim prefix="(" suffix=")" suffixOverrides=","> select cc.* from cms_content cc
<if test ='null != mid'> mid, </if> <if test ='null != uid'> uid </if> </trim> left JOIN cms_content_read ccs on ccs.cms_content_id=cc.id
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test ='null != WHERE ccs.read_status = 0 and ccs.user_id=#{userId}
mid'> #{mid}, </if> <if test ='null != uid'> #{uid} </if> </trim> </insert> order by ccs.create_time desc
<delete id="delete" > DELETE FROM cms_is_read WHERE id = #{id} </delete> limit 10
<update id="update" parameterType="cn.timer.api.bean.cmsI.CmsIsRead"> UPDATE </select>
cms_is_read <set> <if test ='null != mid'>mid = #{mid},</if> <if test ='null
!= uid'>uid = #{uid}</if> </set> WHERE id = #{id} </update> <select id="load" <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.cmsI.CmsIsRead">
resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM INSERT INTO cms_is_read <trim prefix="(" suffix=")" suffixOverrides=",">
cms_is_read WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap"> <if test ='null != mid'> mid, </if> <if test ='null != uid'> uid </if> </trim>
SELECT <include refid="Base_Column_List" /> FROM cms_is_read LIMIT #{offset}, <trim prefix="values (" suffix=")" suffixOverrides=","> <if test ='null !=
#{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer"> mid'> #{mid}, </if> <if test ='null != uid'> #{uid} </if> </trim> </insert>
<delete id="delete" > DELETE FROM cms_is_read WHERE id = #{id} </delete>
<update id="update" parameterType="cn.timer.api.bean.cmsI.CmsIsRead"> UPDATE
cms_is_read <set> <if test ='null != mid'>mid = #{mid},</if> <if test ='null
!= uid'>uid = #{uid}</if> </set> WHERE id = #{id} </update> <select id="load"
resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM
cms_is_read WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM cms_is_read LIMIT #{offset},
#{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) FROM cms_is_read </select> --> SELECT count(1) FROM cms_is_read </select> -->
</mapper> </mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.spmk.SpmkApproveDetailDraftsMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.spmk.SpmkApproveDetailDrafts" id="spmkApproveDetailDraftsMap">
<result property="id" column="id"/>
<result property="approveSummaryId" column="approve_summary_id"/>
<result property="name" column="name"/>
<result property="departmentName" column="department_name"/>
<result property="requestData" column="request_data"/>
<result property="froms" column="froms"/>
<result property="router" column="router"/>
<result property="flowChildren" column="flow_children"/>
</resultMap>
<select id="queryObject" resultType="cn.timer.api.bean.spmk.SpmkApproveDetailDrafts">
select *
from spmk_approve_detail_drafts
where id = #{value}
</select>
<select id="queryList" resultType="cn.timer.api.bean.spmk.SpmkApproveDetailDrafts">
select * from spmk_approve_detail_drafts
<where>
<if test="approveSummaryId != null and approveSummaryId != ''">AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if test="name != null and name != ''">AND `name` = #{name}</if>
<if test="departmentName != null and departmentName != ''">AND `department_name` = #{departmentName}</if>
<if test="requestData != null and requestData != ''">AND `request_data` = #{requestData}</if>
<if test="froms != null and froms != ''">AND `froms` = #{froms}</if>
<if test="router != null and router != ''">AND `router` = #{router}</if>
<if test="flowChildren != null and flowChildren != ''">AND `flow_children` = #{flowChildren}</if>
</where>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from spmk_approve_detail_drafts
<where>
<if test="approveSummaryId != null and approveSummaryId != ''">AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if test="name != null and name != ''">AND `name` = #{name}</if>
<if test="departmentName != null and departmentName != ''">AND `department_name` = #{departmentName}</if>
<if test="requestData != null and requestData != ''">AND `request_data` = #{requestData}</if>
<if test="froms != null and froms != ''">AND `froms` = #{froms}</if>
<if test="router != null and router != ''">AND `router` = #{router}</if>
<if test="flowChildren != null and flowChildren != ''">AND `flow_children` = #{flowChildren}</if>
</where>
</select>
<insert id="save" parameterType="cn.timer.api.bean.spmk.SpmkApproveDetailDrafts" useGeneratedKeys="true"
keyProperty="id">
insert into spmk_approve_detail_drafts
(`approve_summary_id`,
`name`,
`department_name`,
`request_data`,
`froms`,
`router`,
`flow_children`)
values (#{approveSummaryId},
#{name},
#{departmentName},
#{requestData},
#{froms},
#{router},
#{flowChildren})
</insert>
<insert id="saveSelective" parameterType="cn.timer.api.bean.spmk.SpmkApproveDetailDrafts" useGeneratedKeys="true"
keyProperty="id">
insert into spmk_approve_detail_drafts
(
<if test="approveSummaryId != null">,`approve_summary_id`</if>
<if test="name != null">,`name`</if>
<if test="departmentName != null">,`department_name`</if>
<if test="requestData != null">,`request_data`</if>
<if test="froms != null">,`froms`</if>
<if test="router != null">,`router`</if>
<if test="flowChildren != null">,`flow_children`</if>
)
values
(
<if test="approveSummaryId != null">,#{approveSummaryId}</if>
<if test="name != null">,#{name}</if>
<if test="departmentName != null">,#{departmentName}</if>
<if test="requestData != null">,#{requestData}</if>
<if test="froms != null">,#{froms}</if>
<if test="router != null">,#{router}</if>
<if test="flowChildren != null">,#{flowChildren}</if>
)
</insert>
<insert id="saveList" parameterType="cn.timer.api.bean.spmk.SpmkApproveDetailDrafts" useGeneratedKeys="true"
keyProperty="id">
insert into spmk_approve_detail_drafts
(
`approve_summary_id`,
`name`,
`department_name`,
`request_data`,
`froms`,
`router`,
`flow_children`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.approveSummaryId},
#{item.name},
#{item.departmentName},
#{item.requestData},
#{item.froms},
#{item.router},
#{item.flowChildren}
)
</foreach>
</insert>
<update id="update" parameterType="cn.timer.api.bean.spmk.SpmkApproveDetailDrafts">
update spmk_approve_detail_drafts
<set>
<if test="approveSummaryId != null">`approve_summary_id` = #{approveSummaryId},</if>
<if test="name != null">`name` = #{name},</if>
<if test="departmentName != null">`department_name` = #{departmentName},</if>
<if test="requestData != null">`request_data` = #{requestData},</if>
<if test="froms != null">`froms` = #{froms},</if>
<if test="router != null">`router` = #{router},</if>
<if test="flowChildren != null">`flow_children` = #{flowChildren}</if>
</set>
where id = #{id}
</update>
<delete id="delete">
delete
from spmk_approve_detail_drafts
where id = #{value}
</delete>
<delete id="deleteBatch">
delete from spmk_approve_detail_drafts where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
<?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="cn.timer.api.dao.spmk.SpmkApproveDraftsMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.spmk.SpmkApproveDrafts" id="spmkApproveDraftsMap">
<result property="id" column="id"/>
<result property="orgCode" column="org_code"/>
<result property="empNum" column="emp_num"/>
<result property="title" column="title"/>
<result property="departmentName" column="department_name"/>
<result property="initiator" column="initiator"/>
<result property="createTime" column="create_time"/>
<result property="approveName" column="approve_name"/>
<result property="sts" column="sts"/>
<result property="currentApprover" column="current_approver"/>
<result property="historyApprover" column="history_approver"/>
<result property="assoType" column="asso_type"/>
<result property="updateTime" column="update_time"/>
<result property="endTime" column="end_time"/>
<result property="digest" column="digest"/>
<result property="isDelete" column="is_delete"/>
<result property="isUrgent" column="is_urgent"/>
</resultMap>
<select id="selectPageByQueryForEmpNum" resultMap="spmkApproveDraftsMap" >
SELECT
*
FROM spmk_approve_drafts a
WHERE a.org_code = #{param.orgCode} and a.is_delete=0 and a.emp_num=#{param.empNum}
ORDER BY a.id DESC
</select>
</mapper>
<?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="cn.timer.api.dao.spmk.SpmkApproveExecuteRecordDraftsMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts" id="spmkApproveExecuteRecordDraftsMap">
<result property="id" column="id"/>
<result property="approveSummaryId" column="approve_summary_id"/>
<result property="name" column="name"/>
<result property="type" column="type"/>
<result property="sts" column="sts"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<select id="queryObject" resultType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts">
select *
from spmk_approve_execute_record_drafts
where id = #{value}
</select>
<select id="queryList" resultType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts">
select * from spmk_approve_execute_record_drafts
<where>
<if test="approveSummaryId != null and approveSummaryId != ''">AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if test="name != null and name != ''">AND `name` = #{name}</if>
<if test="type != null and type != ''">AND `type` = #{type}</if>
<if test="sts != null and sts != ''">AND `sts` = #{sts}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="updateTime != null and updateTime != ''">AND `update_time` = #{updateTime}</if>
</where>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from spmk_approve_execute_record_drafts
<where>
<if test="approveSummaryId != null and approveSummaryId != ''">AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if test="name != null and name != ''">AND `name` = #{name}</if>
<if test="type != null and type != ''">AND `type` = #{type}</if>
<if test="sts != null and sts != ''">AND `sts` = #{sts}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="updateTime != null and updateTime != ''">AND `update_time` = #{updateTime}</if>
</where>
</select>
<insert id="save" parameterType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts" useGeneratedKeys="true"
keyProperty="id">
insert into spmk_approve_execute_record_drafts
(`approve_summary_id`,
`name`,
`type`,
`sts`,
`create_time`,
`update_time`)
values (#{approveSummaryId},
#{name},
#{type},
#{sts},
#{createTime},
#{updateTime})
</insert>
<insert id="saveSelective" parameterType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
useGeneratedKeys="true" keyProperty="id">
insert into spmk_approve_execute_record_drafts
(
<if test="approveSummaryId != null">,`approve_summary_id`</if>
<if test="name != null">,`name`</if>
<if test="type != null">,`type`</if>
<if test="sts != null">,`sts`</if>
<if test="createTime != null">,`create_time`</if>
<if test="updateTime != null">,`update_time`</if>
)
values
(
<if test="approveSummaryId != null">,#{approveSummaryId}</if>
<if test="name != null">,#{name}</if>
<if test="type != null">,#{type}</if>
<if test="sts != null">,#{sts}</if>
<if test="createTime != null">,#{createTime}</if>
<if test="updateTime != null">,#{updateTime}</if>
)
</insert>
<insert id="saveList" parameterType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts" useGeneratedKeys="true"
keyProperty="id">
insert into spmk_approve_execute_record_drafts
(
`approve_summary_id`,
`name`,
`type`,
`sts`,
`create_time`,
`update_time`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.approveSummaryId},
#{item.name},
#{item.type},
#{item.sts},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
<update id="update" parameterType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts">
update spmk_approve_execute_record_drafts
<set>
<if test="approveSummaryId != null">`approve_summary_id` = #{approveSummaryId},</if>
<if test="name != null">`name` = #{name},</if>
<if test="type != null">`type` = #{type},</if>
<if test="sts != null">`sts` = #{sts},</if>
<if test="createTime != null">`create_time` = #{createTime},</if>
<if test="updateTime != null">`update_time` = #{updateTime}</if>
</set>
where id = #{id}
</update>
<delete id="delete">
delete
from spmk_approve_execute_record_drafts
where id = #{value}
</delete>
<delete id="deleteBatch">
delete from spmk_approve_execute_record_drafts where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
...@@ -4,26 +4,26 @@ ...@@ -4,26 +4,26 @@
<mapper namespace="cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper"> <mapper namespace="cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" > <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="approve_summary_id" property="approveSummaryId" /> <result column="approve_summary_id" property="approveSummaryId" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="type" property="type" /> <result column="type" property="type" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="BaseResultMapDto" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" > <resultMap id="BaseResultMapDto" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="approve_summary_id" property="approveSummaryId" /> <result column="approve_summary_id" property="approveSummaryId" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="type" property="type" /> <result column="type" property="type" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<collection column="SpmkExecutor_id" property="spmkExecutors" ofType="cn.timer.api.bean.spmk.SpmkExecutor" <collection column="SpmkExecutor_id" property="spmkExecutors" ofType="cn.timer.api.bean.spmk.SpmkExecutor"
resultMap="cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap" columnPrefix="SpmkExecutor_"> resultMap="cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap" columnPrefix="SpmkExecutor_">
</collection> </collection>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
create_time, create_time,
update_time update_time
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
a.id, a.id,
a.approve_summary_id, a.approve_summary_id,
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
a.create_time, a.create_time,
a.update_time a.update_time
</sql> </sql>
<sql id="Base_Column_List_Alias_b"> <sql id="Base_Column_List_Alias_b">
b.id SpmkExecutor_id, b.id SpmkExecutor_id,
b.approve_execute_record_id SpmkExecutor_approve_execute_record_id, b.approve_execute_record_id SpmkExecutor_approve_execute_record_id,
...@@ -54,11 +54,12 @@ ...@@ -54,11 +54,12 @@
b.operator_header_url SpmkExecutor_operator_header_url, b.operator_header_url SpmkExecutor_operator_header_url,
b.opinion SpmkExecutor_opinion, b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts, b.sts SpmkExecutor_sts,
b.read_status SpmkExecutor_read_status,
b.create_time SpmkExecutor_create_time, b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time, b.update_time SpmkExecutor_update_time,
b.signature_img SpmkExecutor_signature_img b.signature_img SpmkExecutor_signature_img
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
id SpmkApproveExecuteRecord_id, id SpmkApproveExecuteRecord_id,
approve_summary_id SpmkApproveExecuteRecord_approve_summary_id, approve_summary_id SpmkApproveExecuteRecord_approve_summary_id,
...@@ -68,21 +69,21 @@ ...@@ -68,21 +69,21 @@
create_time SpmkApproveExecuteRecord_create_time, create_time SpmkApproveExecuteRecord_create_time,
update_time SpmkApproveExecuteRecord_update_time update_time SpmkApproveExecuteRecord_update_time
</sql> </sql>
<select id="selectListByAsId" resultMap="BaseResultMapDto"> <select id="selectListByAsId" resultMap="BaseResultMapDto">
SELECT SELECT
<include refid="Base_Column_List_a" />, <include refid="Base_Column_List_a" />,
<include refid="Base_Column_List_Alias_b" /> <include refid="Base_Column_List_Alias_b" />
FROM spmk_approve_execute_record a FROM spmk_approve_execute_record a
LEFT JOIN spmk_executor b ON a.id = b.approve_execute_record_id LEFT JOIN spmk_executor b ON a.id = b.approve_execute_record_id
WHERE a.approve_summary_id = #{id} WHERE a.approve_summary_id = #{id}
ORDER BY a.id, b.id ORDER BY a.id, b.id
</select> </select>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord">
INSERT INTO spmk_approve_execute_record INSERT INTO spmk_approve_execute_record
...@@ -164,6 +165,29 @@ ...@@ -164,6 +165,29 @@
FROM spmk_approve_execute_record FROM spmk_approve_execute_record
</select> </select>
--> -->
<select id="selectExecuteRecordById" resultType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord">
SELECT sr.id FROM spmk_approve_execute_record sr
LEFT JOIN spmk_executor se ON se.approve_execute_record_id=sr.id
WHERE sr.approve_summary_id = #{approveSummaryId} and se.emp_num = #{userId}
</select>
<select id="selectExecuteRecordReoId" resultType="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord">
SELECT sr.id FROM spmk_approve_execute_record sr
LEFT JOIN spmk_executor se ON se.approve_execute_record_id=sr.id
WHERE sr.approve_summary_id = #{approveSummaryId} and se.uid = #{reoId}
</select>
<delete id="delExecuteRecord">
DELETE sr,se FROM spmk_approve_execute_record sr
LEFT JOIN spmk_executor se on sr.id=se.approve_execute_record_id
WHERE sr.approve_summary_id = #{approveSummaryId} and sr.id <![CDATA[ > ]]> #{recordId}
</delete>
<delete id="delExecuteRecordByRecordIds">
DELETE sr,se FROM spmk_approve_execute_record sr
LEFT JOIN spmk_executor se on sr.id=se.approve_execute_record_id
WHERE sr.id =#{id} and se.emp_num =#{uid}
</delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -4,16 +4,17 @@ ...@@ -4,16 +4,17 @@
<mapper namespace="cn.timer.api.dao.spmk.SpmkExecutorMapper"> <mapper namespace="cn.timer.api.dao.spmk.SpmkExecutorMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkExecutor" > <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkExecutor" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="approve_execute_record_id" property="approveExecuteRecordId" /> <result column="approve_execute_record_id" property="approveExecuteRecordId" />
<result column="emp_num" property="empNum" /> <result column="emp_num" property="empNum" />
<result column="executor_name" property="executorName" /> <result column="executor_name" property="executorName" />
<result column="operator_header_url" property="operatorHeaderUrl" /> <result column="operator_header_url" property="operatorHeaderUrl" />
<result column="opinion" property="opinion" /> <result column="opinion" property="opinion" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="read_status" property="readStatus" />
<result column="update_time" property="updateTime" /> <result column="create_time" property="createTime" />
<result column="signature_img" property="signatureImg" /> <result column="update_time" property="updateTime" />
<result column="signature_img" property="signatureImg" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -24,11 +25,12 @@ ...@@ -24,11 +25,12 @@
operator_header_url, operator_header_url,
opinion, opinion,
sts, sts,
read_status,
create_time, create_time,
update_time, update_time,
signature_img, signature_img,
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
id SpmkExecutor_id, id SpmkExecutor_id,
approve_execute_record_id SpmkExecutor_approve_execute_record_id, approve_execute_record_id SpmkExecutor_approve_execute_record_id,
...@@ -41,7 +43,7 @@ ...@@ -41,7 +43,7 @@
update_time SpmkExecutor_update_time update_time SpmkExecutor_update_time
</sql> </sql>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkExecutor"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkExecutor">
INSERT INTO spmk_executor INSERT INTO spmk_executor
...@@ -137,6 +139,10 @@ ...@@ -137,6 +139,10 @@
FROM spmk_executor FROM spmk_executor
</select> </select>
--> -->
<select id="executor" resultMap="BaseResultMap">
select
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment