pc政府端修改
This commit is contained in:
parent
eef2b7be47
commit
9afc67c50d
|
|
@ -25,10 +25,6 @@ public class AddTaskDto {
|
||||||
@ApiModelProperty("任务id")
|
@ApiModelProperty("任务id")
|
||||||
private String oataskid;
|
private String oataskid;
|
||||||
|
|
||||||
@TableField("OTCId")
|
|
||||||
@ApiModelProperty("来源id")
|
|
||||||
private String otcid;
|
|
||||||
|
|
||||||
@TableField("TaskType")
|
@TableField("TaskType")
|
||||||
@ApiModelProperty(value = "任务类型id",required = true)
|
@ApiModelProperty(value = "任务类型id",required = true)
|
||||||
private String tasktype;
|
private String tasktype;
|
||||||
|
|
@ -37,10 +33,6 @@ public class AddTaskDto {
|
||||||
@ApiModelProperty(value = "任务发布人id",required = true)
|
@ApiModelProperty(value = "任务发布人id",required = true)
|
||||||
private String sendId;
|
private String sendId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "接收用户id",required = true)
|
|
||||||
@TableField("user_id")
|
|
||||||
private String userId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0刚发出来 100已完成
|
* 0刚发出来 100已完成
|
||||||
*/
|
*/
|
||||||
|
|
@ -69,7 +61,7 @@ public class AddTaskDto {
|
||||||
*/
|
*/
|
||||||
@TableField("AppStatus")
|
@TableField("AppStatus")
|
||||||
@ApiModelProperty("任务状态:1、执行中 2、执行完成 3、已超时")
|
@ApiModelProperty("任务状态:1、执行中 2、执行完成 3、已超时")
|
||||||
private String appstatus;
|
private String appstatus = "1";
|
||||||
|
|
||||||
@TableField("title")
|
@TableField("title")
|
||||||
@ApiModelProperty(value = "任务名称",required = true)
|
@ApiModelProperty(value = "任务名称",required = true)
|
||||||
|
|
@ -84,7 +76,7 @@ public class AddTaskDto {
|
||||||
*/
|
*/
|
||||||
@TableField("Frequency")
|
@TableField("Frequency")
|
||||||
@ApiModelProperty("已完成次数")
|
@ApiModelProperty("已完成次数")
|
||||||
private Long frequency;
|
private Long frequency = 0L;
|
||||||
|
|
||||||
|
|
||||||
@TableField("IsFinish")
|
@TableField("IsFinish")
|
||||||
|
|
@ -96,14 +88,6 @@ public class AddTaskDto {
|
||||||
private Integer delState = 1;
|
private Integer delState = 1;
|
||||||
|
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDelState() {
|
public Integer getDelState() {
|
||||||
return delState;
|
return delState;
|
||||||
}
|
}
|
||||||
|
|
@ -120,14 +104,6 @@ public class AddTaskDto {
|
||||||
this.oataskid = oataskid;
|
this.oataskid = oataskid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOtcid() {
|
|
||||||
return otcid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOtcid(String otcid) {
|
|
||||||
this.otcid = otcid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTasktype() {
|
public String getTasktype() {
|
||||||
return tasktype;
|
return tasktype;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.rzyc.bean.task.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: ZQW
|
||||||
|
* @CreateTime: 2022/10/27 11:16
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("分配任务请求参数")
|
||||||
|
public class AddWorkDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务id",required = true)
|
||||||
|
private String oaTaskId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务接收人id",required = true)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
public String getOaTaskId() {
|
||||||
|
return oaTaskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOaTaskId(String oaTaskId) {
|
||||||
|
this.oaTaskId = oaTaskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -17,9 +17,20 @@ public class WorkDto {
|
||||||
@ApiModelProperty(value = "任务id",required = true)
|
@ApiModelProperty(value = "任务id",required = true)
|
||||||
private String taskTypeId;
|
private String taskTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private String sysUserId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "关键词")
|
@ApiModelProperty(value = "关键词")
|
||||||
private String condition;
|
private String condition;
|
||||||
|
|
||||||
|
public String getSysUserId() {
|
||||||
|
return sysUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSysUserId(String sysUserId) {
|
||||||
|
this.sysUserId = sysUserId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTaskTypeId() {
|
public String getTaskTypeId() {
|
||||||
return taskTypeId;
|
return taskTypeId;
|
||||||
}
|
}
|
||||||
|
|
@ -35,4 +46,6 @@ public class WorkDto {
|
||||||
public void setCondition(String condition) {
|
public void setCondition(String condition) {
|
||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.rzyc.bean.task.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: ZQW
|
||||||
|
* @CreateTime: 2022/10/24 11:09
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("任务流转请求参数")
|
||||||
|
public class WorkFlowDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务id",required = true)
|
||||||
|
private String oaDistributionId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务接收人id",required = true)
|
||||||
|
private String SysUserId;
|
||||||
|
|
||||||
|
public String getOaDistributionId() {
|
||||||
|
return oaDistributionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOaDistributionId(String oaDistributionId) {
|
||||||
|
this.oaDistributionId = oaDistributionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSysUserId() {
|
||||||
|
return SysUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSysUserId(String sysUserId) {
|
||||||
|
SysUserId = sysUserId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.rzyc.bean.task.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: ZQW
|
||||||
|
* @CreateTime: 2022/10/25 11:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("参与人员姓名返回实体类")
|
||||||
|
public class NameVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("姓名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -25,11 +25,6 @@ public class TaskDetailVo {
|
||||||
private String oataskid;
|
private String oataskid;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "接收用户id",required = true)
|
|
||||||
@TableField("user_id")
|
|
||||||
private String userId;
|
|
||||||
|
|
||||||
|
|
||||||
@TableField("StartDate")
|
@TableField("StartDate")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty("开始时间")
|
@ApiModelProperty("开始时间")
|
||||||
|
|
@ -50,7 +45,7 @@ public class TaskDetailVo {
|
||||||
private String subject;
|
private String subject;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("任务接收人")
|
@ApiModelProperty("任务接收人完成情况")
|
||||||
private List<OADistributionVo> distributions = new ArrayList<>();
|
private List<OADistributionVo> distributions = new ArrayList<>();
|
||||||
|
|
||||||
public String getOataskid() {
|
public String getOataskid() {
|
||||||
|
|
@ -61,13 +56,6 @@ public class TaskDetailVo {
|
||||||
this.oataskid = oataskid;
|
this.oataskid = oataskid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getStartdate() {
|
public Date getStartdate() {
|
||||||
return startdate;
|
return startdate;
|
||||||
|
|
|
||||||
|
|
@ -20,46 +20,24 @@ public class TaskVo {
|
||||||
@ApiModelProperty("任务id")
|
@ApiModelProperty("任务id")
|
||||||
private String oataskid;
|
private String oataskid;
|
||||||
|
|
||||||
@ApiModelProperty("来源id")
|
|
||||||
private String otcid;
|
|
||||||
|
|
||||||
@ApiModelProperty("任务类型")
|
|
||||||
private String tasktype;
|
|
||||||
|
|
||||||
@ApiModelProperty("任务类型名称")
|
@ApiModelProperty("任务类型名称")
|
||||||
private String taskTypeName;
|
private String taskTypeName;
|
||||||
|
|
||||||
@ApiModelProperty("任务发布人")
|
|
||||||
private String sendId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "接收用户id",required = true)
|
|
||||||
@TableField("user_id")
|
|
||||||
private String userId;
|
|
||||||
|
|
||||||
@TableField("EndDate")
|
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@ApiModelProperty("结束时间")
|
|
||||||
private Date enddate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发送部门
|
|
||||||
*/
|
|
||||||
@ApiModelProperty("发送部门")
|
|
||||||
private String unitName;
|
|
||||||
|
|
||||||
@TableField("title")
|
@TableField("title")
|
||||||
@ApiModelProperty("任务名称")
|
@ApiModelProperty("任务名称")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@ApiModelProperty("任务内容")
|
|
||||||
private String subject;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布人
|
|
||||||
*/
|
|
||||||
@ApiModelProperty("发布人")
|
@ApiModelProperty("发布人")
|
||||||
private String sendName;
|
private String sendName;
|
||||||
|
|
||||||
|
@ApiModelProperty("发送部门")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@TableField("EndDate")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
private Date enddate;
|
||||||
|
|
||||||
public String getOataskid() {
|
public String getOataskid() {
|
||||||
return oataskid;
|
return oataskid;
|
||||||
}
|
}
|
||||||
|
|
@ -68,52 +46,12 @@ public class TaskVo {
|
||||||
this.oataskid = oataskid;
|
this.oataskid = oataskid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOtcid() {
|
public String getTaskTypeName() {
|
||||||
return otcid;
|
return taskTypeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOtcid(String otcid) {
|
public void setTaskTypeName(String taskTypeName) {
|
||||||
this.otcid = otcid;
|
this.taskTypeName = taskTypeName;
|
||||||
}
|
|
||||||
|
|
||||||
public String getTasktype() {
|
|
||||||
return tasktype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTasktype(String tasktype) {
|
|
||||||
this.tasktype = tasktype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSendId() {
|
|
||||||
return sendId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSendId(String sendId) {
|
|
||||||
this.sendId = sendId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEnddate() {
|
|
||||||
return enddate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnddate(Date enddate) {
|
|
||||||
this.enddate = enddate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUnitName() {
|
|
||||||
return unitName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUnitName(String unitName) {
|
|
||||||
this.unitName = unitName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
|
|
@ -124,14 +62,6 @@ public class TaskVo {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSubject() {
|
|
||||||
return subject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubject(String subject) {
|
|
||||||
this.subject = subject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSendName() {
|
public String getSendName() {
|
||||||
return sendName;
|
return sendName;
|
||||||
}
|
}
|
||||||
|
|
@ -140,11 +70,19 @@ public class TaskVo {
|
||||||
this.sendName = sendName;
|
this.sendName = sendName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTaskTypeName() {
|
public String getUnitName() {
|
||||||
return taskTypeName;
|
return unitName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTaskTypeName(String taskTypeName) {
|
public void setUnitName(String unitName) {
|
||||||
this.taskTypeName = taskTypeName;
|
this.unitName = unitName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEnddate() {
|
||||||
|
return enddate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnddate(Date enddate) {
|
||||||
|
this.enddate = enddate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,11 @@ public class ThingVo {
|
||||||
@ApiModelProperty("任务id")
|
@ApiModelProperty("任务id")
|
||||||
private String oataskid;
|
private String oataskid;
|
||||||
|
|
||||||
@TableField("OTCId")
|
|
||||||
@ApiModelProperty("来源id")
|
|
||||||
private String otcid;
|
|
||||||
|
|
||||||
@TableField("TaskType")
|
@TableField("TaskType")
|
||||||
@ApiModelProperty("任务类型")
|
@ApiModelProperty("任务类型")
|
||||||
private String tasktype;
|
private String tasktype;
|
||||||
|
|
||||||
|
|
||||||
@TableField("StartDate")
|
@TableField("StartDate")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty("开始时间")
|
@ApiModelProperty("开始时间")
|
||||||
|
|
@ -55,14 +51,6 @@ public class ThingVo {
|
||||||
this.oataskid = oataskid;
|
this.oataskid = oataskid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOtcid() {
|
|
||||||
return otcid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOtcid(String otcid) {
|
|
||||||
this.otcid = otcid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTasktype() {
|
public String getTasktype() {
|
||||||
return tasktype;
|
return tasktype;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public interface OADistributionMapper extends BaseMapper<OADistribution> {
|
||||||
|
|
||||||
int deleteByPrimaryKey(String oadistributionid);
|
int deleteByPrimaryKey(String oadistributionid);
|
||||||
|
|
||||||
int insert(OADistribution record);
|
int insertOAdistribution(OADistribution record);
|
||||||
|
|
||||||
int insertSelective(OADistribution record);
|
int insertSelective(OADistribution record);
|
||||||
|
|
||||||
|
|
@ -52,4 +52,10 @@ public interface OADistributionMapper extends BaseMapper<OADistribution> {
|
||||||
|
|
||||||
//履职记录详情
|
//履职记录详情
|
||||||
List<PerformanceVo> preList(@Param("id") String id);
|
List<PerformanceVo> preList(@Param("id") String id);
|
||||||
|
|
||||||
|
//统计完成次数
|
||||||
|
int countNum(@Param("taskTypeId")String taskTypeId);
|
||||||
|
|
||||||
|
//跟新任务执行表
|
||||||
|
int updateDistriubtion(@Param("oaDistribution")OADistribution oaDistribution);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ public interface OATaskMapper extends BaseMapper<OATask> {
|
||||||
List<TaskVo> getTaskList(@Param("condition")String condition,
|
List<TaskVo> getTaskList(@Param("condition")String condition,
|
||||||
@Param("sendId")String sendId);
|
@Param("sendId")String sendId);
|
||||||
|
|
||||||
|
//发布(收到)任务详情
|
||||||
TaskDetailVo selectDetail(@Param("OATaskId") String OATaskId);
|
TaskDetailVo selectDetail(@Param("OATaskId") String OATaskId);
|
||||||
|
|
||||||
//查询待办事项
|
//查询待办事项
|
||||||
|
|
@ -140,4 +141,7 @@ public interface OATaskMapper extends BaseMapper<OATask> {
|
||||||
|
|
||||||
//跟新OAtask
|
//跟新OAtask
|
||||||
int updateOATask(@Param("OATask") OATask OATask);
|
int updateOATask(@Param("OATask") OATask OATask);
|
||||||
|
|
||||||
|
//查询接收人姓名
|
||||||
|
List<NameVo> selectName(@Param("id") String id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
|
import com.rzyc.model.OaTaskUser;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 任务用户关联表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2022-10-25
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface OaTaskUserMapper extends BaseMapper<OaTaskUser> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -186,4 +186,6 @@ public interface SysUserMapper {
|
||||||
@Param("state") String state);
|
@Param("state") String state);
|
||||||
|
|
||||||
SysUser findByUnitOrEntId(@Param("unitOrEntId") String unitOrEntId);
|
SysUser findByUnitOrEntId(@Param("unitOrEntId") String unitOrEntId);
|
||||||
|
|
||||||
|
SysUser selectUser(@Param("sysUserId")String sysUserId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
127
inventory-dao/src/main/java/com/rzyc/model/OaTaskUser.java
Normal file
127
inventory-dao/src/main/java/com/rzyc/model/OaTaskUser.java
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.rzyc.model;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 任务用户关联表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2022-10-25
|
||||||
|
*/
|
||||||
|
@TableName("oa_task_user")
|
||||||
|
@ApiModel(value="OaTaskUser对象", description="任务用户关联表")
|
||||||
|
public class OaTaskUser implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务关联id")
|
||||||
|
@TableId("relation_id")
|
||||||
|
private String relationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务id")
|
||||||
|
@TableField("OATaskId")
|
||||||
|
private String OATaskId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "任务接收人id")
|
||||||
|
@TableField("SysUserId")
|
||||||
|
private String SysUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "参与人姓名")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
@TableField("create_by")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
@TableField("modify_time")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改人")
|
||||||
|
@TableField("modify_by")
|
||||||
|
private String modifyBy;
|
||||||
|
|
||||||
|
public String getRelationId() {
|
||||||
|
return relationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRelationId(String relationId) {
|
||||||
|
this.relationId = relationId;
|
||||||
|
}
|
||||||
|
public String getOATaskId() {
|
||||||
|
return OATaskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOATaskId(String OATaskId) {
|
||||||
|
this.OATaskId = OATaskId;
|
||||||
|
}
|
||||||
|
public String getSysUserId() {
|
||||||
|
return SysUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSysUserId(String SysUserId) {
|
||||||
|
this.SysUserId = SysUserId;
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
public String getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(String createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
public Date getModifyTime() {
|
||||||
|
return modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyTime(Date modifyTime) {
|
||||||
|
this.modifyTime = modifyTime;
|
||||||
|
}
|
||||||
|
public String getModifyBy() {
|
||||||
|
return modifyBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyBy(String modifyBy) {
|
||||||
|
this.modifyBy = modifyBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "OaTaskUser{" +
|
||||||
|
"relationId=" + relationId +
|
||||||
|
", OATaskId=" + OATaskId +
|
||||||
|
", SysUserId=" + SysUserId +
|
||||||
|
", name=" + name +
|
||||||
|
", createTime=" + createTime +
|
||||||
|
", createBy=" + createBy +
|
||||||
|
", modifyTime=" + modifyTime +
|
||||||
|
", modifyBy=" + modifyBy +
|
||||||
|
"}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -26,10 +26,6 @@ public class TaskAddOrUpdateDto {
|
||||||
@TableField("OATaskId")
|
@TableField("OATaskId")
|
||||||
private String oataskid;
|
private String oataskid;
|
||||||
|
|
||||||
@ApiModelProperty(value = "指派用户id")
|
|
||||||
@TableField("sned_id")
|
|
||||||
private String snedId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "接收用户id")
|
@ApiModelProperty(value = "接收用户id")
|
||||||
@TableField("SysUserId")
|
@TableField("SysUserId")
|
||||||
private String sysuserid;
|
private String sysuserid;
|
||||||
|
|
@ -40,23 +36,16 @@ public class TaskAddOrUpdateDto {
|
||||||
@ApiModelProperty(value = "接收人名")
|
@ApiModelProperty(value = "接收人名")
|
||||||
private String receiveName;
|
private String receiveName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "任务摘要")
|
|
||||||
@TableField("title")
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "任务内容")
|
/* @ApiModelProperty(value = "开始时间,格式 yyyy-MM-dd HH:mm:ss")
|
||||||
@TableField("subject")
|
|
||||||
private String subject;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "开始时间,格式 yyyy-MM-dd HH:mm:ss")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@TableField("start_time")
|
@TableField("start_time")
|
||||||
private Date startTime;
|
private Date startTime;*/
|
||||||
|
|
||||||
@ApiModelProperty(value = "结束时间,格式 yyyy-MM-dd HH:mm:ss")
|
/*@ApiModelProperty(value = "结束时间,格式 yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@TableField("end_time")
|
@TableField("end_time")
|
||||||
private Date endTime;
|
private Date endTime;*/
|
||||||
|
|
||||||
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
||||||
@TableField("AppStatus")
|
@TableField("AppStatus")
|
||||||
|
|
@ -78,14 +67,6 @@ public class TaskAddOrUpdateDto {
|
||||||
this.oataskid = oataskid;
|
this.oataskid = oataskid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSnedId() {
|
|
||||||
return snedId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSnedId(String snedId) {
|
|
||||||
this.snedId = snedId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSysuserid() {
|
public String getSysuserid() {
|
||||||
return sysuserid;
|
return sysuserid;
|
||||||
}
|
}
|
||||||
|
|
@ -102,38 +83,6 @@ public class TaskAddOrUpdateDto {
|
||||||
this.receiveName = receiveName;
|
this.receiveName = receiveName;
|
||||||
}
|
}
|
||||||
|
|
||||||
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() {
|
public String getAppstatus() {
|
||||||
return appstatus;
|
return appstatus;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.rzyc.model.user;
|
package com.rzyc.model.user;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.common.utils.excel.ExcelColumn;
|
import com.common.utils.excel.ExcelColumn;
|
||||||
import com.rzyc.bean.user.IndexNum;
|
import com.rzyc.bean.user.IndexNum;
|
||||||
import com.rzyc.model.ent.SysEntUser;
|
import com.rzyc.model.ent.SysEntUser;
|
||||||
|
|
@ -47,10 +48,12 @@ public class SysUser implements Serializable {
|
||||||
private String sysunitorentname;
|
private String sysunitorentname;
|
||||||
|
|
||||||
@ApiModelProperty("职务")
|
@ApiModelProperty("职务")
|
||||||
|
@TableField("SysDeptName")
|
||||||
private String sysdeptname;
|
private String sysdeptname;
|
||||||
|
|
||||||
@ExcelColumn(value = "用户名", col = 1)
|
@ExcelColumn(value = "用户名", col = 1)
|
||||||
@ApiModelProperty("用户名")
|
@ApiModelProperty("用户名")
|
||||||
|
@TableField("SysUserName")
|
||||||
private String sysusername;
|
private String sysusername;
|
||||||
|
|
||||||
@ApiModelProperty("用户密码")
|
@ApiModelProperty("用户密码")
|
||||||
|
|
@ -742,6 +745,7 @@ public class SysUser implements Serializable {
|
||||||
this.createdon = createdon;
|
this.createdon = createdon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object that) {
|
public boolean equals(Object that) {
|
||||||
if (this == that) {
|
if (this == that) {
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,12 @@
|
||||||
where OADistributionId = #{oadistributionid,jdbcType=VARCHAR}
|
where OADistributionId = #{oadistributionid,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insert" parameterType="com.rzyc.model.OADistribution">
|
<insert id="insertOAdistribution" parameterType="com.rzyc.model.OADistribution">
|
||||||
insert into OADistribution (OADistributionId, OATaskId, SysUserId,
|
insert into OADistribution (OADistributionId, OATaskId, sned_id,SysUserId,
|
||||||
SysChinaName, SysTelephone, AppStatus,title,subject,start_time,end_time,
|
SysChinaName, SysTelephone, AppStatus,title,subject,start_time,end_time,
|
||||||
CreatedOn, CreatedBy, ModifiedOn,
|
CreatedOn, CreatedBy, ModifiedOn,
|
||||||
ModifiedBy)
|
ModifiedBy)
|
||||||
values (#{oadistributionid,jdbcType=VARCHAR}, #{oataskid,jdbcType=VARCHAR}, #{sysuserid,jdbcType=VARCHAR},
|
values (#{oadistributionid,jdbcType=VARCHAR}, #{oataskid,jdbcType=VARCHAR}, #{snedId},#{sysuserid,jdbcType=VARCHAR},
|
||||||
#{syschinaname,jdbcType=VARCHAR}, #{systelephone,jdbcType=VARCHAR}, #{appstatus,jdbcType=VARCHAR},#{title},#{subject},#{startTime},#{endTime},
|
#{syschinaname,jdbcType=VARCHAR}, #{systelephone,jdbcType=VARCHAR}, #{appstatus,jdbcType=VARCHAR},#{title},#{subject},#{startTime},#{endTime},
|
||||||
#{createdon,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR}, #{modifiedon,jdbcType=TIMESTAMP},
|
#{createdon,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR}, #{modifiedon,jdbcType=TIMESTAMP},
|
||||||
#{modifiedby,jdbcType=VARCHAR})
|
#{modifiedby,jdbcType=VARCHAR})
|
||||||
|
|
@ -244,4 +244,29 @@
|
||||||
where ot.OATaskId = #{id}
|
where ot.OATaskId = #{id}
|
||||||
order by od.start_time asc
|
order by od.start_time asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--统计完成次数
|
||||||
|
resultType="int":返回值类型
|
||||||
|
parameterType="string":参数类型
|
||||||
|
-->
|
||||||
|
<select id="countNum" resultType="int" parameterType="string">
|
||||||
|
select count(od.OATaskId) from OADistribution od where od.OATaskId = #{taskTypeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateDistriubtion" parameterType="com.rzyc.model.OADistribution">
|
||||||
|
update OADistribution
|
||||||
|
set OATaskId = #{oaDistribution.oataskid,jdbcType=VARCHAR},
|
||||||
|
sned_id = #{oaDistribution.snedId,jdbcType=VARCHAR},
|
||||||
|
SysUserId = #{oaDistribution.sysuserid,jdbcType=VARCHAR},
|
||||||
|
SysChinaName = #{oaDistribution.syschinaname,jdbcType=VARCHAR},
|
||||||
|
SysTelephone = #{oaDistribution.systelephone,jdbcType=VARCHAR},
|
||||||
|
title = #{oaDistribution.title},
|
||||||
|
subject = #{oaDistribution.subject},
|
||||||
|
AppStatus = #{oaDistribution.appstatus,jdbcType=VARCHAR},
|
||||||
|
CreatedOn = #{oaDistribution.createdon,jdbcType=TIMESTAMP},
|
||||||
|
CreatedBy = #{oaDistribution.createdby,jdbcType=VARCHAR},
|
||||||
|
ModifiedOn = #{oaDistribution.modifiedon,jdbcType=TIMESTAMP},
|
||||||
|
ModifiedBy = #{oaDistribution.modifiedby,jdbcType=VARCHAR}
|
||||||
|
where OADistributionId = #{oaDistribution.oadistributionid}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -439,21 +439,26 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<!--查询我发布的任务-->
|
||||||
<select id="deliverTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
<select id="deliverTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
||||||
select ot.*,u.SysUserName as send_name,u.SysDeptName as unit_name,ott.name as task_type_name from OATask ot
|
select ot.OATaskId,ty.name as taskTypeName,ot.title,u.SysUserName as send_name,u.SysDeptName as unit_name,ot.EndDate as enddate
|
||||||
|
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 ott on ot.TaskType = ott.type_id
|
left join oa_task_type ty on ot.TaskType = ty.type_id
|
||||||
where ot.subject like #{condition}
|
where ot.subject like #{condition}
|
||||||
and ot.send_id = #{sendId}
|
and ot.send_id = #{sendId}
|
||||||
order by ot.EndDate asc
|
order by ot.EndDate asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--查询我收到的任务-->
|
||||||
<select id="getTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
<select id="getTaskList" resultType="com.rzyc.bean.task.vo.TaskVo">
|
||||||
select ot.*,u.SysUserName as send_name,u.SysDeptName as unit_name,ott.name as task_type_name from OATask ot
|
select ot.OATaskId,ty.name as taskTypeName,ot.title,u.SysUserName as send_name,u.SysDeptName as unit_name,ot.EndDate as enddate
|
||||||
|
from OADistribution oa
|
||||||
|
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
|
||||||
left join oa_task_type ott on ot.TaskType = ott.type_id
|
left join oa_task_type ty on ot.TaskType = ty.type_id
|
||||||
where ot.subject like #{condition}
|
where ot.subject like #{condition}
|
||||||
and ot.user_id = #{sendId}
|
and oa.SysUserId = #{sendId}
|
||||||
order by ot.EndDate asc
|
order by ot.EndDate asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -491,10 +496,10 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectDetail" resultMap="TaskDetail">
|
<select id="selectDetail" resultMap="TaskDetail">
|
||||||
select ot.oataskid,ot.startdate,ot.enddate,ot.title,ot.subject,od.SysChinaName,od.title,od.Subject,od.start_time,od.end_time,od.AppStatus
|
select ot.oataskid,ot.title,ot.subject,ot.startdate,ot.enddate,od.*
|
||||||
from OATask ot
|
from OATask ot
|
||||||
left join OADistribution od
|
left join OADistribution od
|
||||||
on ot.send_id = od.sned_id
|
on ot.oataskid = od.oataskid
|
||||||
where ot.oataskid = #{OATaskId}
|
where ot.oataskid = #{OATaskId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -506,18 +511,24 @@
|
||||||
on ot.TaskType = ty.type_id
|
on ot.TaskType = ty.type_id
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="workDto.condition != null and workDto.condition != ''">
|
<if test="workDto.condition != null and workDto.condition != ''">
|
||||||
and ot.TaskType like #{workDto.condition}
|
and ot.title like #{workDto.condition}
|
||||||
</if>
|
</if>
|
||||||
<if test="workDto.taskTypeId != null and workDto.taskTypeId != ''">
|
<if test="workDto.taskTypeId != null and workDto.taskTypeId != ''">
|
||||||
and ot.TaskType = #{workDto.taskTypeId}
|
and ot.TaskType = #{workDto.taskTypeId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="workDto.sysUserId != null and workDto.sysUserId != ''">
|
||||||
|
and ot.user_id = #{workDto.sysUserId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--待办事项列表-->
|
||||||
<select id="thingsList" resultType="com.rzyc.bean.task.vo.ThingVo">
|
<select id="thingsList" resultType="com.rzyc.bean.task.vo.ThingVo">
|
||||||
select ot.OATaskId,ot.TaskType,ot.Subject,ot.StartDate,ot.EndDate
|
select ot.OATaskId,ty.name as tasktype,ot.Subject,ot.StartDate,ot.EndDate
|
||||||
from oatask ot
|
from oatask ot
|
||||||
left join oa_task_type ty
|
left join oa_task_type ty
|
||||||
on ot.TaskType = ty.type_id
|
on ot.TaskType = ty.type_id
|
||||||
|
join OADistribution oa
|
||||||
|
on ot.OATaskId = oa.OATaskId
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="idDto.condition != null and idDto.condition != ''">
|
<if test="idDto.condition != null and idDto.condition != ''">
|
||||||
and ot.TaskType like #{idDto.condition}
|
and ot.TaskType like #{idDto.condition}
|
||||||
|
|
@ -525,6 +536,7 @@
|
||||||
<if test="idDto.id != null and idDto.id != ''">
|
<if test="idDto.id != null and idDto.id != ''">
|
||||||
and ot.TaskType like #{idDto.id}
|
and ot.TaskType like #{idDto.id}
|
||||||
</if>
|
</if>
|
||||||
|
order by ot.EndDate asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="speWorkList" resultType="com.rzyc.bean.task.vo.SpecialWorkVo">
|
<select id="speWorkList" resultType="com.rzyc.bean.task.vo.SpecialWorkVo">
|
||||||
|
|
@ -577,4 +589,12 @@
|
||||||
where ot.OATaskId = #{OATask.oataskid}
|
where ot.OATaskId = #{OATask.oataskid}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!--查询接收人姓名-->
|
||||||
|
<select id="selectName" resultType="com.rzyc.model.OATask">
|
||||||
|
select s.SysUserName
|
||||||
|
from oatask ot
|
||||||
|
join sysuser s
|
||||||
|
on ot.send_id = s.SysUserId
|
||||||
|
where ot.send_id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
22
inventory-dao/src/main/resources/mapper/OaTaskUserMapper.xml
Normal file
22
inventory-dao/src/main/resources/mapper/OaTaskUserMapper.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.rzyc.mapper.OaTaskUserMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.rzyc.model.OaTaskUser">
|
||||||
|
<id column="relation_id" property="relationId" />
|
||||||
|
<result column="OATaskId" property="OATaskId" />
|
||||||
|
<result column="SysUserId" property="SysUserId" />
|
||||||
|
<result column="name" property="name" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="modify_time" property="modifyTime" />
|
||||||
|
<result column="modify_by" property="modifyBy" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 通用查询结果列 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
relation_id, OATaskId, SysUserId, name, create_time, create_by, modify_time, modify_by
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -1382,4 +1382,7 @@
|
||||||
SELECT * FROM SysUser su WHERE su.`SysUnitOrEntId` = #{unitOrEntId} limit 1
|
SELECT * FROM SysUser su WHERE su.`SysUnitOrEntId` = #{unitOrEntId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUser" resultType="com.rzyc.model.user.SysUser">
|
||||||
|
SELECT su.* FROM SysUser su where su.SysUserId = #{sysUserId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,9 @@ import com.rzyc.bean.task.vo.SpecialWorkVo;
|
||||||
import com.rzyc.bean.task.vo.WorkPriorityVo;
|
import com.rzyc.bean.task.vo.WorkPriorityVo;
|
||||||
import com.rzyc.config.MethodAnnotation;
|
import com.rzyc.config.MethodAnnotation;
|
||||||
import com.rzyc.enums.TaskState;
|
import com.rzyc.enums.TaskState;
|
||||||
import com.rzyc.mapper.OADistributionMapper;
|
|
||||||
import com.rzyc.mapper.OATaskMapper;
|
|
||||||
import com.rzyc.model.OADistribution;
|
import com.rzyc.model.OADistribution;
|
||||||
import com.rzyc.model.OATask;
|
import com.rzyc.model.OATask;
|
||||||
import com.rzyc.model.task.dto.TaskAddOrUpdateDto;
|
import com.rzyc.model.OaTaskUser;
|
||||||
import com.rzyc.model.user.SysUser;
|
import com.rzyc.model.user.SysUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
|
@ -29,7 +27,6 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -60,7 +57,10 @@ public class AppletsTaskController extends BaseController{
|
||||||
public MultiResult<WorkPriorityVo> workList(@Valid WorkDto workDto){
|
public MultiResult<WorkPriorityVo> workList(@Valid WorkDto workDto){
|
||||||
MultiResult<WorkPriorityVo> result = new MultiResult<>();
|
MultiResult<WorkPriorityVo> result = new MultiResult<>();
|
||||||
List<WorkPriorityVo> workList = oaTaskMapper.workList(workDto);
|
List<WorkPriorityVo> workList = oaTaskMapper.workList(workDto);
|
||||||
System.out.println("查询的数据=====" + workList);
|
int finishNum = oaDistributionMapper.countNum(workDto.getTaskTypeId());
|
||||||
|
for (WorkPriorityVo priorityVo : workList) {
|
||||||
|
priorityVo.setFinishNum(finishNum);
|
||||||
|
}
|
||||||
result.setData(workList);
|
result.setData(workList);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -92,12 +92,12 @@ public class AppletsTaskController extends BaseController{
|
||||||
|
|
||||||
if(StringUtils.isBlank(perRecordDto.getOadistributionid())){
|
if(StringUtils.isBlank(perRecordDto.getOadistributionid())){
|
||||||
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
||||||
oaDistribution.setCreatedby(getChinaName());
|
oaDistribution.setCreatedby(getUserId());
|
||||||
oaDistribution.setCreatedon(new Date());
|
oaDistribution.setCreatedon(new Date());
|
||||||
oaDistributionMapper.insert(oaDistribution);
|
oaDistributionMapper.insert(oaDistribution);
|
||||||
System.out.println("插入的数据===" + oaDistribution);
|
System.out.println("插入的数据===" + oaDistribution);
|
||||||
}else {
|
}else {
|
||||||
oaDistribution.setModifiedby(getChinaName());
|
oaDistribution.setModifiedby(getUserId());
|
||||||
oaDistribution.setModifiedon(new Date());
|
oaDistribution.setModifiedon(new Date());
|
||||||
oaDistributionMapper.updateById(oaDistribution);
|
oaDistributionMapper.updateById(oaDistribution);
|
||||||
System.out.println("修改的数据===" + oaDistribution);
|
System.out.println("修改的数据===" + oaDistribution);
|
||||||
|
|
@ -159,52 +159,14 @@ public class AppletsTaskController extends BaseController{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 完成任务
|
|
||||||
* @Author ZQW
|
|
||||||
* @CreateTime 2022/10/21 11:20
|
|
||||||
*/
|
|
||||||
/* @ApiOperation(value = "新增或修改履职记录",position = 13)
|
|
||||||
@PostMapping("finishWork")
|
|
||||||
@PreAuthorize("hasAnyAuthority('finishWork','finishWork:update')")
|
|
||||||
@MethodAnnotation(authorizations = {"finishWork","finishWork:update"},name = "工作要务列表")
|
|
||||||
public SingleResult<String> finishWork(@Valid SinWorkDto sinWorkDto) throws Exception{
|
|
||||||
SingleResult<String> result = new SingleResult<>();
|
|
||||||
OADistribution oaDistribution = new OADistribution();
|
|
||||||
BeanUtils.copyProperties(oaDistribution,sinWorkDto);
|
|
||||||
//日期格式转换
|
|
||||||
ConvertUtils.register(new DateConverter(null), Date.class);
|
|
||||||
|
|
||||||
OATask oaTask = oaTaskMapper.findById(sinWorkDto.getOataskid());
|
|
||||||
System.out.println("任务 ========" + oaTask);
|
|
||||||
|
|
||||||
if(null == oaTask){
|
|
||||||
result.setCode(0);
|
|
||||||
result.setMessage("未知任务");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(StringUtils.isBlank(sinWorkDto.getOadistributionid())){
|
|
||||||
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
|
||||||
oaDistribution.setCreatedby(getChinaName());
|
|
||||||
oaDistribution.setCreatedon(new Date());
|
|
||||||
oaDistributionMapper.insert(oaDistribution);
|
|
||||||
System.out.println("插入的数据===" + oaDistribution);
|
|
||||||
}else {
|
|
||||||
oaDistribution.setModifiedby(getChinaName());
|
|
||||||
oaDistribution.setModifiedon(new Date());
|
|
||||||
oaDistributionMapper.updateById(oaDistribution);
|
|
||||||
System.out.println("修改的数据===" + oaDistribution);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 判断当前任务是否过期
|
* @Description: 判断当前任务是否过期
|
||||||
* @Author ZQW
|
* @Author ZQW
|
||||||
* @CreateTime 2022/10/21 14:52
|
* @CreateTime 2022/10/21 14:52
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "判断当前任务是否过期",position = 2)
|
@ApiOperation(value = "判断当前任务是否过期",position = 13)
|
||||||
@PostMapping("judgeTask")
|
@PostMapping("judgeTask")
|
||||||
@PreAuthorize("hasAnyAuthority('judgeTask:update')")
|
@PreAuthorize("hasAnyAuthority('judgeTask:update')")
|
||||||
@MethodAnnotation(authorizations = {"judgeTask:update"},name = "判断当前任务是否过期")
|
@MethodAnnotation(authorizations = {"judgeTask:update"},name = "判断当前任务是否过期")
|
||||||
|
|
@ -213,7 +175,9 @@ public class AppletsTaskController extends BaseController{
|
||||||
OATask oaTask = oaTaskMapper.selectOATask(idDto.getId());
|
OATask oaTask = oaTaskMapper.selectOATask(idDto.getId());
|
||||||
System.out.println("任务=====" + oaTask);
|
System.out.println("任务=====" + oaTask);
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
//当前时间
|
||||||
Date nowDate = new Date();
|
Date nowDate = new Date();
|
||||||
|
//任务截止时间
|
||||||
Date endDate = oaTask.getEnddate();
|
Date endDate = oaTask.getEnddate();
|
||||||
|
|
||||||
Calendar nowTime = Calendar.getInstance();
|
Calendar nowTime = Calendar.getInstance();
|
||||||
|
|
@ -229,4 +193,68 @@ public class AppletsTaskController extends BaseController{
|
||||||
oaTaskMapper.updateOATask(oaTask);
|
oaTaskMapper.updateOATask(oaTask);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 任务流转
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/10/24 10:23
|
||||||
|
*/
|
||||||
|
/* @ApiOperation(value = "任务流转",position = 14)
|
||||||
|
@PostMapping("taskFlow")
|
||||||
|
@PreAuthorize("hasAnyAuthority('taskFlow:update')")
|
||||||
|
@MethodAnnotation(authorizations = {"taskFlow:update"},name = "任务流转")
|
||||||
|
public SingleResult<String> taskFlow(@Valid WorkFlowDto flowDto) throws Exception{
|
||||||
|
SingleResult<String> result = new SingleResult<>();
|
||||||
|
OaTaskUser oaTaskUser = new OaTaskUser();
|
||||||
|
OATask oaTask = oaTaskMapper.selectOATask(flowDto.getOaDistributionId());
|
||||||
|
SysUser user = sysUserMapper.selectUser(flowDto.getSysUserId());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(null == oaTask){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("未知任务");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(null == user){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("查无此人");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
oaTask.setOataskid(RandomNumber.getUUid());
|
||||||
|
oaTask.setSendId(oaTask.getUserId());
|
||||||
|
oaTask.setUserId(flowDto.getSysUserId());
|
||||||
|
oaTaskUser.setCreateTime(new Date());
|
||||||
|
oaTaskUser.setCreateBy(getUserId());
|
||||||
|
oaTaskMapper.insertTask(oaTask);
|
||||||
|
System.err.println("插入的内容" + oaTask);
|
||||||
|
return result;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 参与人员姓名显示
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/10/25 11:00
|
||||||
|
*/
|
||||||
|
/* @ApiOperation(value = "参与人员姓名显示",position = 15)
|
||||||
|
@GetMapping("nameList")
|
||||||
|
@PreAuthorize("hasAnyAuthority('nameList','nameList:update')")
|
||||||
|
@MethodAnnotation(authorizations = {"nameList","nameList:update"},name = "参与人员姓名显示")
|
||||||
|
public MultiResult<NameVo> nameList(@Valid IdDto idDto){
|
||||||
|
MultiResult<NameVo> result = new MultiResult<>();
|
||||||
|
oaTaskMapper.selectName(workDto);
|
||||||
|
//查询任务
|
||||||
|
*//*List<OATask> taskList = (List<OATask>) oaTaskMapper.selectOATask(workDto.getTaskTypeId());
|
||||||
|
for (OATask oaTask : taskList) {
|
||||||
|
String sendId = oaTask.getSendId();
|
||||||
|
List<NameVo> nameVo = oaTaskMapper.selectName(sendId);
|
||||||
|
for (NameVo name : nameVo) {
|
||||||
|
name.setName();
|
||||||
|
}
|
||||||
|
}*//*
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,9 @@ public class BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
protected EntCertificatesMapper entCertificatesMapper;
|
protected EntCertificatesMapper entCertificatesMapper;
|
||||||
|
|
||||||
|
//用户任务关联
|
||||||
|
@Autowired
|
||||||
|
protected OaTaskUserMapper oaTaskUserMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位不需要的字符串
|
* 岗位不需要的字符串
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,11 @@ public class TaskController extends BaseController{
|
||||||
//日期格式转换
|
//日期格式转换
|
||||||
ConvertUtils.register(new DateConverter(null), Date.class);
|
ConvertUtils.register(new DateConverter(null), Date.class);
|
||||||
|
|
||||||
|
//发布人
|
||||||
SysUser sysUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getSendId());
|
SysUser sysUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getSendId());
|
||||||
|
|
||||||
|
//接收人
|
||||||
|
//SysUser receiveUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getUserId());
|
||||||
if(null == sysUser){
|
if(null == sysUser){
|
||||||
result.setCode(0);
|
result.setCode(0);
|
||||||
result.setMessage("未知错误");
|
result.setMessage("未知错误");
|
||||||
|
|
@ -66,15 +70,23 @@ public class TaskController extends BaseController{
|
||||||
|
|
||||||
if(StringUtils.isBlank(addTaskDto.getOataskid())){
|
if(StringUtils.isBlank(addTaskDto.getOataskid())){
|
||||||
oaTask.setOataskid(RandomNumber.getUUid());
|
oaTask.setOataskid(RandomNumber.getUUid());
|
||||||
oaTask.setCreatedby(getChinaName());
|
oaTask.setCreatedby(getUserId());
|
||||||
oaTask.setCreatedon(new Date());
|
oaTask.setCreatedon(new Date());
|
||||||
oaTaskMapper.insertTask(oaTask);
|
oaTaskMapper.insertTask(oaTask);
|
||||||
System.out.println("用户id======" + oaTask.getUserId());
|
System.out.println("用户id======" + oaTask.getUserId());
|
||||||
}else {
|
}else {
|
||||||
oaTask.setModifiedby(getChinaName());
|
oaTask.setModifiedby(getUserId());
|
||||||
oaTask.setModifiedon(new Date());
|
oaTask.setModifiedon(new Date());
|
||||||
oaTaskMapper.updateById(oaTask);
|
oaTaskMapper.updateById(oaTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* //增加默认任务执行情况
|
||||||
|
OADistribution oaDistribution = new OADistribution();
|
||||||
|
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
||||||
|
oaDistribution.setSnedId(addTaskDto.getSendId());
|
||||||
|
oaDistribution.setSyschinaname(receiveUser.getChinaname());
|
||||||
|
oaDistribution.setCreatedby(getUserId());
|
||||||
|
oaDistribution.setCreatedon(new Date());*/
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -155,7 +167,7 @@ public class TaskController extends BaseController{
|
||||||
* @Author ZQW
|
* @Author ZQW
|
||||||
* @CreateTime 2022/9/29 9:44
|
* @CreateTime 2022/9/29 9:44
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询任务名称",position = 5)
|
/*@ApiOperation(value = "查询任务名称",position = 5)
|
||||||
@ApiImplicitParams(value = {
|
@ApiImplicitParams(value = {
|
||||||
@ApiImplicitParam(name = "id",value = "任务类型1id")
|
@ApiImplicitParam(name = "id",value = "任务类型1id")
|
||||||
})
|
})
|
||||||
|
|
@ -167,7 +179,7 @@ public class TaskController extends BaseController{
|
||||||
taskNameVo.setName(oaTaskType.getName());
|
taskNameVo.setName(oaTaskType.getName());
|
||||||
result.setData(taskNameVo);
|
result.setData(taskNameVo);
|
||||||
return result;
|
return result;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return: 新增任务执行情况
|
* @return: 新增任务执行情况
|
||||||
|
|
@ -202,11 +214,11 @@ public class TaskController extends BaseController{
|
||||||
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
||||||
oaDistribution.setSyschinaname(sysUser.getChinaname());
|
oaDistribution.setSyschinaname(sysUser.getChinaname());
|
||||||
oaDistribution.setSystelephone(sysUser.getMobiletel());
|
oaDistribution.setSystelephone(sysUser.getMobiletel());
|
||||||
oaDistribution.setCreatedby(getChinaName());
|
oaDistribution.setCreatedby(getUserId());
|
||||||
oaDistribution.setCreatedon(new Date());
|
oaDistribution.setCreatedon(new Date());
|
||||||
oaDistributionMapper.insert(oaDistribution);
|
oaDistributionMapper.insert(oaDistribution);
|
||||||
}else {
|
}else {
|
||||||
oaDistribution.setModifiedby(getChinaName());
|
oaDistribution.setModifiedby(getUserId());
|
||||||
oaDistribution.setModifiedon(new Date());
|
oaDistribution.setModifiedon(new Date());
|
||||||
oaDistributionMapper.updateById(oaDistribution);
|
oaDistributionMapper.updateById(oaDistribution);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -370,8 +370,4 @@ public class UploadController extends com.rzyc.controller.BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
package com.rzyc.controller;
|
||||||
|
|
||||||
|
import com.common.utils.RandomNumber;
|
||||||
|
import com.common.utils.StringUtils;
|
||||||
|
import com.common.utils.model.MultiResult;
|
||||||
|
import com.common.utils.model.SingleResult;
|
||||||
|
import com.rzyc.bean.task.dto.AddTaskDto;
|
||||||
|
import com.rzyc.bean.task.dto.AddWorkDto;
|
||||||
|
import com.rzyc.bean.task.dto.IdDto;
|
||||||
|
import com.rzyc.bean.task.dto.WorkFlowDto;
|
||||||
|
import com.rzyc.bean.task.vo.TaskDetailVo;
|
||||||
|
import com.rzyc.bean.task.vo.TaskVo;
|
||||||
|
import com.rzyc.bean.task.vo.ThingVo;
|
||||||
|
import com.rzyc.config.MethodAnnotation;
|
||||||
|
import com.rzyc.model.OADistribution;
|
||||||
|
import com.rzyc.model.OATask;
|
||||||
|
import com.rzyc.model.OaTaskUser;
|
||||||
|
import com.rzyc.model.task.dto.TaskAddOrUpdateDto;
|
||||||
|
import com.rzyc.model.user.SysUser;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.beanutils.BeanUtils;
|
||||||
|
import org.apache.commons.beanutils.ConvertUtils;
|
||||||
|
import org.apache.commons.beanutils.converters.DateConverter;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: TaskController
|
||||||
|
* @description:
|
||||||
|
* @author: ZQW
|
||||||
|
* * @create: 2022-09-20 15:21
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Api(tags = "任务")
|
||||||
|
@CrossOrigin("*")
|
||||||
|
@RequestMapping("work")
|
||||||
|
@RestController
|
||||||
|
@Validated
|
||||||
|
public class WorkController extends BaseController{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 新增任务
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/9/23 14:38
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "新增任务",position = 1)
|
||||||
|
@PostMapping("addTask")
|
||||||
|
public SingleResult<String> addTask(@Valid AddTaskDto addTaskDto) throws Exception{
|
||||||
|
SingleResult<String> result = new SingleResult<>();
|
||||||
|
OATask oaTask = new OATask();
|
||||||
|
BeanUtils.copyProperties(oaTask,addTaskDto);
|
||||||
|
//日期格式转换
|
||||||
|
ConvertUtils.register(new DateConverter(null), Date.class);
|
||||||
|
|
||||||
|
//发布人
|
||||||
|
SysUser sysUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getSendId());
|
||||||
|
|
||||||
|
if(null == sysUser){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("未知错误");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(addTaskDto.getOataskid())){
|
||||||
|
oaTask.setOataskid(RandomNumber.getUUid());
|
||||||
|
oaTask.setCreatedby(getUserId());
|
||||||
|
oaTask.setCreatedon(new Date());
|
||||||
|
oaTaskMapper.insertTask(oaTask);
|
||||||
|
System.out.println("用户id======" + oaTask.getUserId());
|
||||||
|
}else {
|
||||||
|
oaTask.setModifiedby(getUserId());
|
||||||
|
oaTask.setModifiedon(new Date());
|
||||||
|
oaTaskMapper.updateById(oaTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分配任务
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/10/27 11:08
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "分配任务",position = 2)
|
||||||
|
@PostMapping("distributeWork")
|
||||||
|
public SingleResult<String> distributeWork(@Valid TaskAddOrUpdateDto addTaskDto) throws Exception{
|
||||||
|
SingleResult<String> result = new SingleResult<>();
|
||||||
|
OADistribution oaDistribution = new OADistribution();
|
||||||
|
BeanUtils.copyProperties(oaDistribution,addTaskDto);
|
||||||
|
//日期格式转换
|
||||||
|
//ConvertUtils.register(new DateConverter(null), Date.class);
|
||||||
|
|
||||||
|
SysUser sysUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getSysuserid());
|
||||||
|
OATask oaTask = oaTaskMapper.findById(addTaskDto.getOataskid());
|
||||||
|
System.out.println("任务 ========" + oaTask);
|
||||||
|
if(null == sysUser){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("用户不存在");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(null == oaTask){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("未知任务");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(addTaskDto.getOadistributionid())){
|
||||||
|
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
||||||
|
oaDistribution.setSnedId(oaTask.getSendId());
|
||||||
|
oaDistribution.setSyschinaname(sysUser.getChinaname());
|
||||||
|
oaDistribution.setSystelephone(sysUser.getMobiletel());
|
||||||
|
oaDistribution.setStartTime(oaTask.getStartdate());
|
||||||
|
oaDistribution.setEndTime(oaTask.getEnddate());
|
||||||
|
oaDistribution.setAppstatus("1");
|
||||||
|
oaDistribution.setCreatedby(getUserId());
|
||||||
|
oaDistribution.setCreatedon(new Date());
|
||||||
|
oaDistributionMapper.insertOAdistribution(oaDistribution);
|
||||||
|
}else {
|
||||||
|
oaDistribution.setModifiedby(getUserId());
|
||||||
|
oaDistribution.setModifiedon(new Date());
|
||||||
|
oaDistribution.setAppstatus("3");
|
||||||
|
oaDistributionMapper.updateDistriubtion(oaDistribution);
|
||||||
|
System.err.println(oaDistribution);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @Description: 待办事项列表
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/9/23 10:20
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "待办事项列表",position = 3)
|
||||||
|
@GetMapping("thingsList")
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "id",value = "任务类型id")
|
||||||
|
})
|
||||||
|
public MultiResult<ThingVo> thingsList(@Valid IdDto idDto){
|
||||||
|
MultiResult<ThingVo> result = new MultiResult<>();
|
||||||
|
List<ThingVo> thingVos = oaTaskMapper.thingsList(idDto);
|
||||||
|
System.out.println("查询的数据=====" + thingVos);
|
||||||
|
result.setData(thingVos);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return: 查询我发布的任务
|
||||||
|
* @Author: ZQW
|
||||||
|
* @Date: 2022/9/20
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查询我发布的任务",position = 4)
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "id",value = "发布人id")
|
||||||
|
})
|
||||||
|
@GetMapping("deliverTaskList")
|
||||||
|
public MultiResult<TaskVo> deliverTaskList(@Valid IdDto idDto) throws Exception{
|
||||||
|
MultiResult<TaskVo> result = new MultiResult<>();
|
||||||
|
SysUser user = sysUserMapper.selectByPrimaryKey(idDto.getId());
|
||||||
|
System.out.println("user=========" + user);
|
||||||
|
List<TaskVo> oaTasks = oaTaskMapper.deliverTaskList("%%",idDto.getId());
|
||||||
|
|
||||||
|
if(null == user){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("未知错误");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if(oaTasks != null){
|
||||||
|
result.setData(oaTasks);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 查询我收到的任务
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/9/26 9:34
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查询我收到的任务",position = 4)
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "id",value = "接收用户id")
|
||||||
|
})
|
||||||
|
@GetMapping("getTaskList")
|
||||||
|
public MultiResult<TaskVo> getTaskList(@Valid IdDto idDto){
|
||||||
|
MultiResult<TaskVo> result = new MultiResult<>();
|
||||||
|
SysUser user = sysUserMapper.selectByPrimaryKey(idDto.getId());
|
||||||
|
List<TaskVo> oaTasks = oaTaskMapper.getTaskList("%%",idDto.getId());
|
||||||
|
|
||||||
|
if(null == user){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("未知错误");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if(oaTasks != null){
|
||||||
|
result.setData(oaTasks);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return: 新增任务执行情况
|
||||||
|
* @Author: ZQW
|
||||||
|
* @Date: 2022/9/20
|
||||||
|
*/
|
||||||
|
/* @ApiOperation(value = "新增或修改任务执行情况",position = 10)
|
||||||
|
@PostMapping("addExecute")
|
||||||
|
public SingleResult<String> addExecute(@Valid TaskAddOrUpdateDto addTaskDto) throws Exception{
|
||||||
|
SingleResult<String> result = new SingleResult<>();
|
||||||
|
OADistribution oaDistribution = new OADistribution();
|
||||||
|
BeanUtils.copyProperties(oaDistribution,addTaskDto);
|
||||||
|
//日期格式转换
|
||||||
|
ConvertUtils.register(new DateConverter(null), Date.class);
|
||||||
|
|
||||||
|
SysUser sysUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getSysuserid());
|
||||||
|
OATask oaTask = oaTaskMapper.findById(addTaskDto.getOataskid());
|
||||||
|
System.out.println("任务 ========" + oaTask);
|
||||||
|
if(null == sysUser){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("用户不存在");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(null == oaTask){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("未知任务");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(addTaskDto.getOadistributionid())){
|
||||||
|
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
||||||
|
oaDistribution.setSyschinaname(sysUser.getChinaname());
|
||||||
|
oaDistribution.setSystelephone(sysUser.getMobiletel());
|
||||||
|
oaDistribution.setCreatedby(getUserId());
|
||||||
|
oaDistribution.setCreatedon(new Date());
|
||||||
|
oaDistributionMapper.insert(oaDistribution);
|
||||||
|
}else {
|
||||||
|
oaDistribution.setModifiedby(getUserId());
|
||||||
|
oaDistribution.setModifiedon(new Date());
|
||||||
|
oaDistributionMapper.updateById(oaDistribution);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 发布任务详情
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/9/29 13:56
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "发布(收到)任务详情",position = 10)
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "id",value = "任务1id")
|
||||||
|
})
|
||||||
|
@GetMapping("deliverTaskDetail")
|
||||||
|
public SingleResult<TaskDetailVo> deliverTaskDetail(@Valid IdDto idDto){
|
||||||
|
SingleResult<TaskDetailVo> result = new SingleResult<>();
|
||||||
|
TaskDetailVo detailVo = oaTaskMapper.selectDetail(idDto.getId());
|
||||||
|
result.setData(detailVo);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 任务流转
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/10/27 15:34
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "任务流转",position = 14)
|
||||||
|
@PostMapping("taskFlow")
|
||||||
|
public SingleResult<String> taskFlow(@Valid WorkFlowDto flowDto) throws Exception{
|
||||||
|
SingleResult<String> result = new SingleResult<>();
|
||||||
|
OADistribution oaDistribution = new OADistribution();
|
||||||
|
//接收人id
|
||||||
|
String userId = flowDto.getSysUserId();
|
||||||
|
OADistribution work = oaDistributionMapper.selectByPrimaryKey(flowDto.getOaDistributionId());
|
||||||
|
SysUser user = sysUserMapper.selectUser(userId);
|
||||||
|
|
||||||
|
if(null == work){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("未知任务");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if(null == user){
|
||||||
|
result.setCode(0);
|
||||||
|
result.setMessage("查无此人");
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user