任务流转
This commit is contained in:
parent
e7289591db
commit
b5fb16dd28
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.rzyc.bean.task.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: ZQW
|
||||||
|
* @CreateTime: 2022/11/8 15:07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("任务流转人请求参数")
|
||||||
|
public class FlowUserDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务id",required = true)
|
||||||
|
private String OATaskId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务分配id",required = true)
|
||||||
|
private String OADistributionId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "发送人id",required = true)
|
||||||
|
private String send_id;
|
||||||
|
|
||||||
|
public String getOADistributionId() {
|
||||||
|
return OADistributionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOADistributionId(String OADistributionId) {
|
||||||
|
this.OADistributionId = OADistributionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOATaskId() {
|
||||||
|
return OATaskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOATaskId(String OATaskId) {
|
||||||
|
this.OATaskId = OATaskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSend_id() {
|
||||||
|
return send_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSend_id(String send_id) {
|
||||||
|
this.send_id = send_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
package com.rzyc.bean.task.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: ZQW
|
||||||
|
* @CreateTime: 2022/11/8 15:24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("任务流转人详情返回实体")
|
||||||
|
public class FlowDetailVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("主键id")
|
||||||
|
@TableId("OADistributionId")
|
||||||
|
private String oadistributionid;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务id")
|
||||||
|
@TableField("OATaskId")
|
||||||
|
private String oataskid;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务摘要")
|
||||||
|
@TableField("title")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务内容")
|
||||||
|
@TableField("subject")
|
||||||
|
private String subject;
|
||||||
|
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd ")
|
||||||
|
@TableField("start_time")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd ")
|
||||||
|
@TableField("end_time")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未执行 执行中 执行完成
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
||||||
|
private String appStatus;
|
||||||
|
|
||||||
|
public String getOadistributionid() {
|
||||||
|
return oadistributionid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOadistributionid(String oadistributionid) {
|
||||||
|
this.oadistributionid = oadistributionid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOataskid() {
|
||||||
|
return oataskid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOataskid(String oataskid) {
|
||||||
|
this.oataskid = oataskid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubject() {
|
||||||
|
return subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubject(String subject) {
|
||||||
|
this.subject = subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(Date startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(Date endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppStatus() {
|
||||||
|
return appStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppStatus(String appStatus) {
|
||||||
|
this.appStatus = appStatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.rzyc.bean.task.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: ZQW
|
||||||
|
* @CreateTime: 2022/11/8 14:59
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("任务流转人显示")
|
||||||
|
public class FlowUserVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("用户id")
|
||||||
|
private String OADistributionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("接收人id")
|
||||||
|
private String sysuserid;
|
||||||
|
|
||||||
|
@ApiModelProperty("职务")
|
||||||
|
private String sysdeptname;
|
||||||
|
|
||||||
|
@ApiModelProperty("中文名")
|
||||||
|
private String chinaname;
|
||||||
|
|
||||||
|
public String getOADistributionId() {
|
||||||
|
return OADistributionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOADistributionId(String OADistributionId) {
|
||||||
|
this.OADistributionId = OADistributionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSysuserid() {
|
||||||
|
return sysuserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSysuserid(String sysuserid) {
|
||||||
|
this.sysuserid = sysuserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSysdeptname() {
|
||||||
|
return sysdeptname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSysdeptname(String sysdeptname) {
|
||||||
|
this.sysdeptname = sysdeptname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChinaname() {
|
||||||
|
return chinaname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChinaname(String chinaname) {
|
||||||
|
this.chinaname = chinaname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -38,11 +38,6 @@ public class OADistributionVo {
|
||||||
@TableField("SysChinaName")
|
@TableField("SysChinaName")
|
||||||
private String syschinaname;
|
private String syschinaname;
|
||||||
|
|
||||||
/**
|
|
||||||
* 接收人名
|
|
||||||
*//*
|
|
||||||
@ApiModelProperty("接收人名")
|
|
||||||
private String receiveName;*/
|
|
||||||
|
|
||||||
@ApiModelProperty("任务摘要")
|
@ApiModelProperty("任务摘要")
|
||||||
@TableField("title")
|
@TableField("title")
|
||||||
|
|
@ -68,6 +63,42 @@ public class OADistributionVo {
|
||||||
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
||||||
private String appStatus;
|
private String appStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("收到任务通知时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String createdOn;
|
||||||
|
|
||||||
|
@ApiModelProperty("完成任务时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String modifiedOn;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务流转时间(未流转不显示)")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date flowTime;
|
||||||
|
|
||||||
|
public Date getFlowTime() {
|
||||||
|
return flowTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowTime(Date flowTime) {
|
||||||
|
this.flowTime = flowTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatedOn() {
|
||||||
|
return createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedOn(String createdOn) {
|
||||||
|
this.createdOn = createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModifiedOn() {
|
||||||
|
return modifiedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifiedOn(String modifiedOn) {
|
||||||
|
this.modifiedOn = modifiedOn;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOadistributionid() {
|
public String getOadistributionid() {
|
||||||
return oadistributionid;
|
return oadistributionid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import java.util.Date;
|
||||||
* @CreateTime: 2022/9/29 10:10
|
* @CreateTime: 2022/9/29 10:10
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ApiModel("任务返回实体")
|
@ApiModel("发布任务返回实体")
|
||||||
public class TaskVo {
|
public class TaskVo {
|
||||||
|
|
||||||
@ApiModelProperty("任务id")
|
@ApiModelProperty("任务id")
|
||||||
|
|
@ -36,11 +36,22 @@ public class TaskVo {
|
||||||
@ApiModelProperty("发送部门")
|
@ApiModelProperty("发送部门")
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
||||||
|
private String appStatus;
|
||||||
|
|
||||||
@TableField("EndDate")
|
@TableField("EndDate")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty("结束时间")
|
@ApiModelProperty("结束时间")
|
||||||
private Date enddate;
|
private Date enddate;
|
||||||
|
|
||||||
|
public String getAppStatus() {
|
||||||
|
return appStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppStatus(String appStatus) {
|
||||||
|
this.appStatus = appStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOadistributionid() {
|
public String getOadistributionid() {
|
||||||
return oadistributionid;
|
return oadistributionid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
package com.rzyc.mapper;
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.rzyc.bean.task.dto.IdDto;
|
import com.rzyc.bean.task.dto.*;
|
||||||
import com.rzyc.bean.task.dto.NameDto;
|
|
||||||
import com.rzyc.bean.task.dto.WorkDetailDto;
|
|
||||||
import com.rzyc.bean.task.dto.WorkDto;
|
|
||||||
import com.rzyc.bean.task.vo.*;
|
import com.rzyc.bean.task.vo.*;
|
||||||
import com.rzyc.model.OADistribution;
|
import com.rzyc.model.OADistribution;
|
||||||
import com.rzyc.model.oth.ManualLable;
|
import com.rzyc.model.oth.ManualLable;
|
||||||
|
|
@ -62,4 +59,12 @@ public interface OADistributionMapper extends BaseMapper<OADistribution> {
|
||||||
|
|
||||||
//分配任务
|
//分配任务
|
||||||
int deliverTask(@Param("distributions") List<OADistribution> list);
|
int deliverTask(@Param("distributions") List<OADistribution> list);
|
||||||
|
|
||||||
|
//任务流转人
|
||||||
|
List<FlowUserVo> selectFlowUser(@Param("flowUserDto") FlowUserDto flowUserDto);
|
||||||
|
|
||||||
|
//任务流转人任务详情
|
||||||
|
FlowDetailVo FlowUserDetail(@Param("idDto") IdDto idDto);
|
||||||
|
|
||||||
|
OADistribution selectDistribution(@Param("oaDistributionId") String oaDistributionId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@ package com.rzyc.model;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
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 java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author
|
* @author
|
||||||
|
|
@ -50,6 +52,14 @@ public class OADistribution implements Serializable {
|
||||||
@TableField("subject")
|
@TableField("subject")
|
||||||
private String subject;
|
private String subject;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务流转时间(未流转不显示)")
|
||||||
|
@TableField("flow_time")
|
||||||
|
private Date flowTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务流转状态:1.未流转 2.已流转")
|
||||||
|
@TableField("flow_state")
|
||||||
|
private Integer flowState;
|
||||||
|
|
||||||
@ApiModelProperty("开始时间")
|
@ApiModelProperty("开始时间")
|
||||||
@TableField("start_time")
|
@TableField("start_time")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
@ -83,6 +93,23 @@ public class OADistribution implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
public Date getFlowTime() {
|
||||||
|
return flowTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowTime(Date flowTime) {
|
||||||
|
this.flowTime = flowTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFlowState() {
|
||||||
|
return flowState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowState(Integer flowState) {
|
||||||
|
this.flowState = flowState;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSnedId() {
|
public String getSnedId() {
|
||||||
return snedId;
|
return snedId;
|
||||||
}
|
}
|
||||||
|
|
@ -216,64 +243,34 @@ public class OADistribution implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object that) {
|
public boolean equals(Object o) {
|
||||||
if (this == that) {
|
if (this == o) return true;
|
||||||
return true;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
}
|
OADistribution that = (OADistribution) o;
|
||||||
if (that == null) {
|
return Objects.equals(oadistributionid, that.oadistributionid) && Objects.equals(oataskid, that.oataskid) && Objects.equals(snedId, that.snedId) && Objects.equals(sysuserid, that.sysuserid) && Objects.equals(syschinaname, that.syschinaname) && Objects.equals(receiveName, that.receiveName) && Objects.equals(systelephone, that.systelephone) && Objects.equals(title, that.title) && Objects.equals(subject, that.subject) && Objects.equals(flowTime, that.flowTime) && Objects.equals(flowState, that.flowState) && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime) && Objects.equals(appstatus, that.appstatus) && Objects.equals(createdon, that.createdon) && Objects.equals(createdby, that.createdby) && Objects.equals(modifiedon, that.modifiedon) && Objects.equals(modifiedby, that.modifiedby);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (getClass() != that.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
OADistribution other = (OADistribution) that;
|
|
||||||
return (this.getOadistributionid() == null ? other.getOadistributionid() == null : this.getOadistributionid().equals(other.getOadistributionid()))
|
|
||||||
&& (this.getOataskid() == null ? other.getOataskid() == null : this.getOataskid().equals(other.getOataskid()))
|
|
||||||
&& (this.getSysuserid() == null ? other.getSysuserid() == null : this.getSysuserid().equals(other.getSysuserid()))
|
|
||||||
&& (this.getSyschinaname() == null ? other.getSyschinaname() == null : this.getSyschinaname().equals(other.getSyschinaname()))
|
|
||||||
&& (this.getSystelephone() == null ? other.getSystelephone() == null : this.getSystelephone().equals(other.getSystelephone()))
|
|
||||||
&& (this.getAppstatus() == null ? other.getAppstatus() == null : this.getAppstatus().equals(other.getAppstatus()))
|
|
||||||
&& (this.getCreatedon() == null ? other.getCreatedon() == null : this.getCreatedon().equals(other.getCreatedon()))
|
|
||||||
&& (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby()))
|
|
||||||
&& (this.getModifiedon() == null ? other.getModifiedon() == null : this.getModifiedon().equals(other.getModifiedon()))
|
|
||||||
&& (this.getModifiedby() == null ? other.getModifiedby() == null : this.getModifiedby().equals(other.getModifiedby()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
final int prime = 31;
|
|
||||||
int result = 1;
|
|
||||||
result = prime * result + ((getOadistributionid() == null) ? 0 : getOadistributionid().hashCode());
|
|
||||||
result = prime * result + ((getOataskid() == null) ? 0 : getOataskid().hashCode());
|
|
||||||
result = prime * result + ((getSysuserid() == null) ? 0 : getSysuserid().hashCode());
|
|
||||||
result = prime * result + ((getSyschinaname() == null) ? 0 : getSyschinaname().hashCode());
|
|
||||||
result = prime * result + ((getSystelephone() == null) ? 0 : getSystelephone().hashCode());
|
|
||||||
result = prime * result + ((getAppstatus() == null) ? 0 : getAppstatus().hashCode());
|
|
||||||
result = prime * result + ((getCreatedon() == null) ? 0 : getCreatedon().hashCode());
|
|
||||||
result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode());
|
|
||||||
result = prime * result + ((getModifiedon() == null) ? 0 : getModifiedon().hashCode());
|
|
||||||
result = prime * result + ((getModifiedby() == null) ? 0 : getModifiedby().hashCode());
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
return "OADistribution{" +
|
||||||
sb.append(getClass().getSimpleName());
|
"oadistributionid='" + oadistributionid + '\'' +
|
||||||
sb.append(" [");
|
", oataskid='" + oataskid + '\'' +
|
||||||
sb.append("Hash = ").append(hashCode());
|
", snedId='" + snedId + '\'' +
|
||||||
sb.append(", oadistributionid=").append(oadistributionid);
|
", sysuserid='" + sysuserid + '\'' +
|
||||||
sb.append(", oataskid=").append(oataskid);
|
", syschinaname='" + syschinaname + '\'' +
|
||||||
sb.append(", sysuserid=").append(sysuserid);
|
", receiveName='" + receiveName + '\'' +
|
||||||
sb.append(", syschinaname=").append(syschinaname);
|
", systelephone='" + systelephone + '\'' +
|
||||||
sb.append(", systelephone=").append(systelephone);
|
", title='" + title + '\'' +
|
||||||
sb.append(", appstatus=").append(appstatus);
|
", subject='" + subject + '\'' +
|
||||||
sb.append(", createdon=").append(createdon);
|
", flowTime='" + flowTime + '\'' +
|
||||||
sb.append(", createdby=").append(createdby);
|
", flowState=" + flowState +
|
||||||
sb.append(", modifiedon=").append(modifiedon);
|
", startTime=" + startTime +
|
||||||
sb.append(", modifiedby=").append(modifiedby);
|
", endTime=" + endTime +
|
||||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
", appstatus='" + appstatus + '\'' +
|
||||||
sb.append("]");
|
", createdon=" + createdon +
|
||||||
return sb.toString();
|
", createdby='" + createdby + '\'' +
|
||||||
|
", modifiedon=" + modifiedon +
|
||||||
|
", modifiedby='" + modifiedby + '\'' +
|
||||||
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,12 @@
|
||||||
<result column="SysUserId" jdbcType="VARCHAR" property="sysuserid" />
|
<result column="SysUserId" jdbcType="VARCHAR" property="sysuserid" />
|
||||||
<result column="SysChinaName" jdbcType="VARCHAR" property="syschinaname" />
|
<result column="SysChinaName" jdbcType="VARCHAR" property="syschinaname" />
|
||||||
<result column="SysTelephone" jdbcType="VARCHAR" property="systelephone" />
|
<result column="SysTelephone" jdbcType="VARCHAR" property="systelephone" />
|
||||||
<result column="AppStatus" jdbcType="VARCHAR" property="appstatus" />
|
<result column="title" property="title" />
|
||||||
<result column="AppStatus" jdbcType="VARCHAR" property="appstatus" />
|
<result column="subject" property="subject" />
|
||||||
|
<result column="flow_time" property="flowState" />
|
||||||
|
<result column="flow_state" property="flowState" />
|
||||||
|
<result column="start_time" property="startTime" />
|
||||||
|
<result column="end_time" property="endTime" />
|
||||||
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
||||||
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
||||||
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
||||||
|
|
@ -18,7 +22,7 @@
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
OADistributionId, OATaskId,sned_id, SysUserId, SysChinaName, SysTelephone, title,
|
OADistributionId, OATaskId,sned_id, SysUserId, SysChinaName, SysTelephone, title,
|
||||||
subject,start_time,end_time,AppStatus, CreatedOn,
|
subject,flow_time,flow_state,start_time,end_time,AppStatus, CreatedOn,
|
||||||
CreatedBy, ModifiedOn, ModifiedBy
|
CreatedBy, ModifiedOn, ModifiedBy
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -239,6 +243,10 @@
|
||||||
SysTelephone = #{oaDistribution.systelephone,jdbcType=VARCHAR},
|
SysTelephone = #{oaDistribution.systelephone,jdbcType=VARCHAR},
|
||||||
title = #{oaDistribution.title},
|
title = #{oaDistribution.title},
|
||||||
subject = #{oaDistribution.subject},
|
subject = #{oaDistribution.subject},
|
||||||
|
flow_time = #{oaDistribution.flowTime},
|
||||||
|
flow_state = #{oaDistribution.flowState},
|
||||||
|
start_time = #{oaDistribution.startTime},
|
||||||
|
end_time = #{oaDistribution.endTime},
|
||||||
AppStatus = #{oaDistribution.appstatus,jdbcType=VARCHAR},
|
AppStatus = #{oaDistribution.appstatus,jdbcType=VARCHAR},
|
||||||
CreatedOn = #{oaDistribution.createdon,jdbcType=TIMESTAMP},
|
CreatedOn = #{oaDistribution.createdon,jdbcType=TIMESTAMP},
|
||||||
CreatedBy = #{oaDistribution.createdby,jdbcType=VARCHAR},
|
CreatedBy = #{oaDistribution.createdby,jdbcType=VARCHAR},
|
||||||
|
|
@ -264,6 +272,7 @@
|
||||||
and ot.TaskType = #{nameDto.taskTypeId}
|
and ot.TaskType = #{nameDto.taskTypeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--分配任务-->
|
||||||
<insert id="deliverTask" parameterType="java.util.List">
|
<insert id="deliverTask" parameterType="java.util.List">
|
||||||
insert into
|
insert into
|
||||||
OADistribution (OADistributionId, OATaskId, sned_id,SysUserId,
|
OADistribution (OADistributionId, OATaskId, sned_id,SysUserId,
|
||||||
|
|
@ -277,4 +286,24 @@
|
||||||
#{item.modifiedby})
|
#{item.modifiedby})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<!--任务流转人-->
|
||||||
|
<select id="selectFlowUser" resultType="com.rzyc.bean.task.vo.FlowUserVo">
|
||||||
|
select od.OADistributionId,od.SysUserId,s.SysDeptName ,s.ChinaName
|
||||||
|
from OADistribution od
|
||||||
|
join sysuser s
|
||||||
|
on od.SysUserId = s.SysUserId
|
||||||
|
where od.OATaskId = #{flowUserDto.OATaskId} and od.sned_id = #{flowUserDto.send_id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--任务流转人任务详情-->
|
||||||
|
<select id="FlowUserDetail" resultType="com.rzyc.bean.task.vo.FlowDetailVo">
|
||||||
|
select od.OADistributionId,od.OATaskId,od.title,od.subject,od.start_time,od.end_time,od.AppStatus
|
||||||
|
from OADistribution od
|
||||||
|
where od.OADistributionId = #{idDto.id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDistribution" resultType="com.rzyc.model.OADistribution">
|
||||||
|
select od.* from OADistribution od where od.OADistributionId = #{oaDistributionId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -441,7 +441,7 @@
|
||||||
|
|
||||||
<!--查询我发布的任务-->
|
<!--查询我发布的任务-->
|
||||||
<select id="deliverTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
<select id="deliverTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
||||||
select ot.OATaskId,ty.name as taskTypeName,ot.title,u.SysUserName as send_name,u.SysDeptName as unit_name,ot.EndDate as enddate
|
select ot.OATaskId,ty.name as taskTypeName,ot.title,u.SysUserName as send_name,u.SysDeptName as unit_name,ot.AppStatus,ot.EndDate as enddate
|
||||||
from OATask ot
|
from OATask ot
|
||||||
left join sysuser u on ot.send_id = u.SysUserId
|
left join sysuser u on ot.send_id = u.SysUserId
|
||||||
left join oa_task_type ty on ot.TaskType = ty.type_id
|
left join oa_task_type ty on ot.TaskType = ty.type_id
|
||||||
|
|
@ -452,7 +452,7 @@
|
||||||
|
|
||||||
<!--查询我收到的任务-->
|
<!--查询我收到的任务-->
|
||||||
<select id="getTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
<select id="getTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
||||||
select ot.OATaskId,oa.OADistributionId,ty.name as taskTypeName,ot.title,u.SysUserName as send_name,u.SysDeptName as unit_name,ot.EndDate as enddate
|
select ot.OATaskId,oa.OADistributionId,ty.name as taskTypeName,ot.title,u.SysUserName as send_name,u.SysDeptName as unit_name,oa.AppStatus,ot.EndDate as enddate
|
||||||
from OADistribution oa
|
from OADistribution oa
|
||||||
left join OATask ot on ot.OATaskId = oa.OATaskId
|
left join OATask ot on ot.OATaskId = oa.OATaskId
|
||||||
left join sysuser u on ot.send_id = u.SysUserId
|
left join sysuser u on ot.send_id = u.SysUserId
|
||||||
|
|
@ -521,6 +521,8 @@
|
||||||
<result column="start_time" property="startTime"/>
|
<result column="start_time" property="startTime"/>
|
||||||
<result column="end_time" property="endTime"/>
|
<result column="end_time" property="endTime"/>
|
||||||
<result column="AppStatus" property="appStatus"/>
|
<result column="AppStatus" property="appStatus"/>
|
||||||
|
<result column="CreatedOn" property="createdOn"/>
|
||||||
|
<result column="ModifiedOn" property="modifiedOn"/>
|
||||||
</association>
|
</association>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!--收到任务详情-->
|
<!--收到任务详情-->
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@ public class WorkController extends BaseController{
|
||||||
oaDistribution.setSysuserid(uid);
|
oaDistribution.setSysuserid(uid);
|
||||||
/* oaDistribution.setStartTime(oaTask.getStartdate());
|
/* oaDistribution.setStartTime(oaTask.getStartdate());
|
||||||
oaDistribution.setEndTime(oaTask.getEnddate());*/
|
oaDistribution.setEndTime(oaTask.getEnddate());*/
|
||||||
|
oaDistribution.setFlowState(1);
|
||||||
oaDistribution.setAppstatus("1");
|
oaDistribution.setAppstatus("1");
|
||||||
oaDistribution.setCreatedby(getUserId());
|
oaDistribution.setCreatedby(getUserId());
|
||||||
oaDistribution.setCreatedon(new Date());
|
oaDistribution.setCreatedon(new Date());
|
||||||
|
|
@ -231,12 +232,15 @@ public class WorkController extends BaseController{
|
||||||
@PostMapping("addExecute")
|
@PostMapping("addExecute")
|
||||||
public SingleResult<String> addExecute(@Valid FinishWorkDto finishDto) throws Exception{
|
public SingleResult<String> addExecute(@Valid FinishWorkDto finishDto) throws Exception{
|
||||||
SingleResult<String> result = new SingleResult<>();
|
SingleResult<String> result = new SingleResult<>();
|
||||||
OADistribution oaDistribution = new OADistribution();
|
|
||||||
//日期格式转换
|
//日期格式转换
|
||||||
ConvertUtils.register(new DateConverter(null), Date.class);
|
ConvertUtils.register(new DateConverter(null), Date.class);
|
||||||
BeanUtils.copyProperties(oaDistribution,finishDto);
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(finishDto.getOadistributionid())){
|
if (StringUtils.isNotBlank(finishDto.getOadistributionid())){
|
||||||
|
OADistribution oaDistribution = oaDistributionMapper.selectByPrimaryKey(finishDto.getOadistributionid());
|
||||||
|
oaDistribution.setSubject(finishDto.getSubject());
|
||||||
|
oaDistribution.setTitle(finishDto.getTitle());
|
||||||
|
oaDistribution.setStartTime(finishDto.getStartTime());
|
||||||
|
oaDistribution.setEndTime(finishDto.getEndTime());
|
||||||
oaDistribution.setAppstatus("3");
|
oaDistribution.setAppstatus("3");
|
||||||
oaDistribution.setModifiedby(getUserId());
|
oaDistribution.setModifiedby(getUserId());
|
||||||
oaDistribution.setModifiedon(new Date());
|
oaDistribution.setModifiedon(new Date());
|
||||||
|
|
@ -269,7 +273,7 @@ public class WorkController extends BaseController{
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "收到任务详情",position = 11)
|
@ApiOperation(value = "收到任务详情",position = 11)
|
||||||
@ApiImplicitParams(value = {
|
@ApiImplicitParams(value = {
|
||||||
@ApiImplicitParam(name = "id",value = "任务id")
|
@ApiImplicitParam(name = "id",value = "任务分配id")
|
||||||
})
|
})
|
||||||
@GetMapping("receiveTaskDetail")
|
@GetMapping("receiveTaskDetail")
|
||||||
public SingleResult<ReceiveTaskVo> receiveTaskDetail(@Valid IdDto idDto){
|
public SingleResult<ReceiveTaskVo> receiveTaskDetail(@Valid IdDto idDto){
|
||||||
|
|
@ -289,38 +293,28 @@ public class WorkController extends BaseController{
|
||||||
@PostMapping("taskFlow")
|
@PostMapping("taskFlow")
|
||||||
public SingleResult<String> taskFlow(@Valid WorkFlowDto flowDto) throws Exception{
|
public SingleResult<String> taskFlow(@Valid WorkFlowDto flowDto) throws Exception{
|
||||||
SingleResult<String> result = new SingleResult<>();
|
SingleResult<String> result = new SingleResult<>();
|
||||||
OADistribution oaDistribution = new OADistribution();
|
|
||||||
//接收人id
|
|
||||||
String userId = flowDto.getSysUserId();
|
|
||||||
OADistribution work = oaDistributionMapper.selectByPrimaryKey(flowDto.getOaDistributionId());
|
OADistribution work = oaDistributionMapper.selectByPrimaryKey(flowDto.getOaDistributionId());
|
||||||
SysUser user = sysUserMapper.selectUser(userId);
|
|
||||||
|
|
||||||
if(null == work){
|
String[] sysuid = flowDto.getSysUserId().split(",");
|
||||||
result.setCode(0);
|
List<OADistribution> list = new ArrayList<>();
|
||||||
result.setMessage("未知任务");
|
for (String uid: sysuid) {
|
||||||
return result;
|
OADistribution oaDistribution = new OADistribution();
|
||||||
|
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
||||||
|
oaDistribution.setOataskid(work.getOataskid());
|
||||||
|
//发送人
|
||||||
|
oaDistribution.setSnedId(work.getSysuserid());
|
||||||
|
//接收人
|
||||||
|
oaDistribution.setSysuserid(uid);
|
||||||
|
oaDistribution.setFlowState(1);
|
||||||
|
oaDistribution.setAppstatus("1");
|
||||||
|
oaDistribution.setCreatedby(getUserId());
|
||||||
|
oaDistribution.setCreatedon(new Date());
|
||||||
|
list.add(oaDistribution);
|
||||||
|
System.err.println("插入的内容" + oaDistribution);
|
||||||
}
|
}
|
||||||
if(null == user){
|
work.setFlowTime(new Date());
|
||||||
result.setCode(0);
|
work.setFlowState(2);
|
||||||
result.setMessage("查无此人");
|
oaDistributionMapper.updateDistriubtion(work);
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
oaDistribution.setCreatedby(RandomNumber.getUUid());
|
|
||||||
oaDistribution.setOataskid(work.getOataskid());
|
|
||||||
//发送人
|
|
||||||
oaDistribution.setSnedId(work.getSysuserid());
|
|
||||||
//接收人
|
|
||||||
oaDistribution.setSysuserid(userId);
|
|
||||||
oaDistribution.setSyschinaname(user.getChinaname());
|
|
||||||
oaDistribution.setSystelephone(user.getMobiletel());
|
|
||||||
oaDistribution.setStartTime(work.getStartTime());
|
|
||||||
oaDistribution.setEndTime(work.getEndTime());
|
|
||||||
oaDistribution.setAppstatus("1");
|
|
||||||
oaDistribution.setCreatedby(getChinaName());
|
|
||||||
oaDistribution.setCreatedon(new Date());
|
|
||||||
oaDistributionMapper.insertOAdistribution(oaDistribution);
|
|
||||||
System.err.println("插入的内容" + oaDistribution);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -367,4 +361,76 @@ public class WorkController extends BaseController{
|
||||||
System.err.println("任务状态=======" + oaTask.getAppstatus());
|
System.err.println("任务状态=======" + oaTask.getAppstatus());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 任务流转接收人列表
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/11/8 15:00
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "任务流转接收人列表",position = 15)
|
||||||
|
@GetMapping ("selectFlowUser")
|
||||||
|
@PreAuthorize("hasAnyAuthority('selectFlowUser','selectFlowUser:update')")
|
||||||
|
@MethodAnnotation(authorizations = {"selectFlowUser","selectFlowUser:update"},name = "任务流转接收人列表")
|
||||||
|
public MultiResult<FlowUserVo> selectFlowUser(@Valid FlowUserDto flowUserDto){
|
||||||
|
MultiResult<FlowUserVo> result = new MultiResult();
|
||||||
|
OADistribution oaDistribution = oaDistributionMapper.selectDistribution(flowUserDto.getOADistributionId());
|
||||||
|
System.err.println("流转状态=====" + oaDistribution.getFlowState());
|
||||||
|
System.err.println("流转状态=====" + oaDistribution);
|
||||||
|
if(oaDistribution.getFlowState() == 2){
|
||||||
|
List<FlowUserVo> list = oaDistributionMapper.selectFlowUser(flowUserDto);
|
||||||
|
result.setData(list);
|
||||||
|
return result;
|
||||||
|
}else {
|
||||||
|
result.setMessage("未流转任务");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 任务流转人详情
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/11/8 15:21
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "任务流转人详情",position = 16)
|
||||||
|
@GetMapping ("FlowUserDetail")
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "id",value = "任务分配id")
|
||||||
|
})
|
||||||
|
@PreAuthorize("hasAnyAuthority('FlowUserDetail','FlowUserDetail:update')")
|
||||||
|
@MethodAnnotation(authorizations = {"FlowUserDetail","FlowUserDetail:update"},name = "任务流转人详情")
|
||||||
|
public SingleResult<FlowDetailVo> FlowUserDetail(@Valid IdDto idDto){
|
||||||
|
SingleResult<FlowDetailVo> result = new SingleResult();
|
||||||
|
OADistribution oaDistribution = oaDistributionMapper.selectByPrimaryKey(idDto.getId());
|
||||||
|
if((oaDistribution.getAppstatus().equals("1"))){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("该用户未完成任务");
|
||||||
|
return result;
|
||||||
|
}else{
|
||||||
|
FlowDetailVo detailVo = oaDistributionMapper.FlowUserDetail(idDto);
|
||||||
|
result.setData(detailVo);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 修改任务完成状态
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/11/8 17:31
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "修改任务完成状态",position = 15)
|
||||||
|
@PostMapping ("modifyState")
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "id",value = "任务id")
|
||||||
|
})
|
||||||
|
@PreAuthorize("hasAnyAuthority('modifyState','modifyState:update')")
|
||||||
|
@MethodAnnotation(authorizations = {"modifyState","modifyState:update"},name = "修改任务完成状态")
|
||||||
|
public SingleResult<String> modifyState(@Valid IdDto idDto){
|
||||||
|
SingleResult<String> result = new SingleResult<>();
|
||||||
|
OATask oaTask = oaTaskMapper.selectOATask(idDto.getId());
|
||||||
|
oaTask.setAppstatus("3");
|
||||||
|
oaTaskMapper.updateOATask(oaTask);
|
||||||
|
System.err.println("任务状态==== " + oaTask.getAppstatus());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user