小程序待办事项
This commit is contained in:
parent
b3de4b95ca
commit
6c53ff824b
|
|
@ -25,14 +25,6 @@ public class PerRecordDto {
|
|||
@TableField("OATaskId")
|
||||
private String oataskid;
|
||||
|
||||
/* @ApiModelProperty(value = "指派用户id")
|
||||
@TableField("sned_id")
|
||||
private String snedId;
|
||||
|
||||
@ApiModelProperty(value = "接收用户id")
|
||||
@TableField("SysUserId")
|
||||
private String sysuserid;*/
|
||||
|
||||
|
||||
@ApiModelProperty(value = "任务摘要")
|
||||
@TableField("title")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
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;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: ZQW
|
||||
* @CreateTime: 2022/10/20 14:37
|
||||
*/
|
||||
|
||||
@ApiModel("专项工作完成请求参数")
|
||||
public class SinWorkDto {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "任务id",required = true)
|
||||
@TableField("OATaskId")
|
||||
private String oataskid;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "任务摘要")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
@TableField("subject")
|
||||
private String subject;
|
||||
|
||||
@ApiModelProperty(value = "开始时间,格式 yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("start_time")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间,格式 yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("end_time")
|
||||
private Date endTime;
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.rzyc.bean.task.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: ZQW
|
||||
* @CreateTime: 2022/10/21 9:54
|
||||
*/
|
||||
|
||||
|
||||
@ApiModel("专项工作请求参数")
|
||||
public class SpeWorkDto {
|
||||
|
||||
@ApiModelProperty(value = "任务id",required = true)
|
||||
private String taskTypeId;
|
||||
|
||||
@ApiModelProperty(value = "任务发布人id",required = true)
|
||||
private String sendId;
|
||||
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String condition;
|
||||
|
||||
public String getTaskTypeId() {
|
||||
return taskTypeId;
|
||||
}
|
||||
|
||||
public void setTaskTypeId(String taskTypeId) {
|
||||
this.taskTypeId = taskTypeId;
|
||||
}
|
||||
|
||||
public String getSendId() {
|
||||
return sendId;
|
||||
}
|
||||
|
||||
public void setSendId(String sendId) {
|
||||
this.sendId = sendId;
|
||||
}
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public void setCondition(String condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
}
|
||||
|
|
@ -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/21 10:25
|
||||
*/
|
||||
|
||||
@ApiModel("待办任务详情请求参数")
|
||||
public class WorkDetailDto {
|
||||
|
||||
@ApiModelProperty(value = "任务id",required = true)
|
||||
private String oaTaskId;
|
||||
|
||||
@ApiModelProperty(value = "任务发布人id",required = true)
|
||||
private String sendId;
|
||||
|
||||
public String getOaTaskId() {
|
||||
return oaTaskId;
|
||||
}
|
||||
|
||||
public void setOaTaskId(String oaTaskId) {
|
||||
this.oaTaskId = oaTaskId;
|
||||
}
|
||||
|
||||
public String getSendId() {
|
||||
return sendId;
|
||||
}
|
||||
|
||||
public void setSendId(String sendId) {
|
||||
this.sendId = sendId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
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/10/21 10:21
|
||||
*/
|
||||
|
||||
@ApiModel("专项工作任务详情")
|
||||
public class SingleWorkVo {
|
||||
|
||||
@TableId("OATaskId")
|
||||
@ApiModelProperty("任务id")
|
||||
private String oataskid;
|
||||
|
||||
@TableField("send_id")
|
||||
@ApiModelProperty("任务发布人")
|
||||
private String sendId;
|
||||
|
||||
@ApiModelProperty(value = "接收用户id",required = true)
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("StartDate")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("开始时间")
|
||||
private Date startdate;
|
||||
|
||||
@TableField("EndDate")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("结束时间")
|
||||
private Date enddate;
|
||||
|
||||
@TableField("AppStatus")
|
||||
@ApiModelProperty("任务状态:1、执行中 2、执行完成 3、已超时")
|
||||
private String appstatus;
|
||||
|
||||
@TableField("title")
|
||||
@ApiModelProperty("任务名称")
|
||||
private String title;
|
||||
|
||||
@TableField("Subject")
|
||||
@ApiModelProperty("任务内容")
|
||||
private String subject;
|
||||
|
||||
@TableField("CreatedOn")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createdon;
|
||||
|
||||
/**
|
||||
* 发布人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("发布人")
|
||||
private String sendName;
|
||||
|
||||
public String getOataskid() {
|
||||
return oataskid;
|
||||
}
|
||||
|
||||
public void setOataskid(String oataskid) {
|
||||
this.oataskid = oataskid;
|
||||
}
|
||||
|
||||
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 getStartdate() {
|
||||
return startdate;
|
||||
}
|
||||
|
||||
public void setStartdate(Date startdate) {
|
||||
this.startdate = startdate;
|
||||
}
|
||||
|
||||
public Date getEnddate() {
|
||||
return enddate;
|
||||
}
|
||||
|
||||
public void setEnddate(Date enddate) {
|
||||
this.enddate = enddate;
|
||||
}
|
||||
|
||||
public String getAppstatus() {
|
||||
return appstatus;
|
||||
}
|
||||
|
||||
public void setAppstatus(String appstatus) {
|
||||
this.appstatus = appstatus;
|
||||
}
|
||||
|
||||
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 getCreatedon() {
|
||||
return createdon;
|
||||
}
|
||||
|
||||
public void setCreatedon(Date createdon) {
|
||||
this.createdon = createdon;
|
||||
}
|
||||
|
||||
public String getSendName() {
|
||||
return sendName;
|
||||
}
|
||||
|
||||
public void setSendName(String sendName) {
|
||||
this.sendName = sendName;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
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/10/21 9:43
|
||||
*/
|
||||
|
||||
|
||||
@ApiModel("专项工作返回实体")
|
||||
public class SpecialWorkVo {
|
||||
|
||||
@TableId("OATaskId")
|
||||
@ApiModelProperty("任务id")
|
||||
private String oataskid;
|
||||
|
||||
@TableField("TaskType")
|
||||
@ApiModelProperty("任务类型")
|
||||
private String tasktype;
|
||||
|
||||
@TableField("send_id")
|
||||
@ApiModelProperty("任务发布人")
|
||||
private String sendId;
|
||||
|
||||
|
||||
@TableField("AppStatus")
|
||||
@ApiModelProperty("任务状态:1、执行中 2、执行完成 3、已超时")
|
||||
private String appstatus;
|
||||
|
||||
|
||||
@TableField("title")
|
||||
@ApiModelProperty("任务名称")
|
||||
private String title;
|
||||
|
||||
@TableField("Subject")
|
||||
@ApiModelProperty("任务内容")
|
||||
private String subject;
|
||||
|
||||
|
||||
|
||||
@TableField("CreatedOn")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createdon;
|
||||
|
||||
/**
|
||||
* 发布人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("发布人")
|
||||
private String sendName;
|
||||
|
||||
public String getOataskid() {
|
||||
return oataskid;
|
||||
}
|
||||
|
||||
public void setOataskid(String oataskid) {
|
||||
this.oataskid = oataskid;
|
||||
}
|
||||
|
||||
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 getAppstatus() {
|
||||
return appstatus;
|
||||
}
|
||||
|
||||
public void setAppstatus(String appstatus) {
|
||||
this.appstatus = appstatus;
|
||||
}
|
||||
|
||||
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 getCreatedon() {
|
||||
return createdon;
|
||||
}
|
||||
|
||||
public void setCreatedon(Date createdon) {
|
||||
this.createdon = createdon;
|
||||
}
|
||||
|
||||
public String getSendName() {
|
||||
return sendName;
|
||||
}
|
||||
|
||||
public void setSendName(String sendName) {
|
||||
this.sendName = sendName;
|
||||
}
|
||||
}
|
||||
25
inventory-dao/src/main/java/com/rzyc/enums/TaskState.java
Normal file
25
inventory-dao/src/main/java/com/rzyc/enums/TaskState.java
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package com.rzyc.enums;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
@ApiModel("任务状态:1、执行中 2、执行完成 3、已超时")
|
||||
public enum TaskState {
|
||||
|
||||
EXECUTING("1"),
|
||||
FINISH("2"),
|
||||
OVERTIME("3");
|
||||
|
||||
private String state;
|
||||
|
||||
TaskState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,14 @@ package com.rzyc.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.rzyc.bean.task.dto.IdDto;
|
||||
import com.rzyc.bean.task.dto.SpeWorkDto;
|
||||
import com.rzyc.bean.task.dto.WorkDetailDto;
|
||||
import com.rzyc.bean.task.dto.WorkDto;
|
||||
import com.rzyc.bean.task.vo.*;
|
||||
import com.rzyc.model.OADistribution;
|
||||
import com.rzyc.model.OATask;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -126,4 +129,15 @@ public interface OATaskMapper extends BaseMapper<OATask> {
|
|||
List<WorkPriorityVo> workList(@Param("workDto") WorkDto workDto);
|
||||
|
||||
|
||||
//待办任务列表
|
||||
List<SpecialWorkVo> speWorkList(@Param("speWorkDto")SpeWorkDto speWorkDto);
|
||||
|
||||
//待办任务详情
|
||||
SingleWorkVo singleWorkDetail(@Param("workDetailDto")WorkDetailDto workDetailDto);
|
||||
|
||||
//查找oaTask
|
||||
OATask selectOATask(@Param("oaTaskId") String oaTaskId);
|
||||
|
||||
//跟新OAtask
|
||||
int updateOATask(@Param("OATask") OATask OATask);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,11 +59,9 @@ public class OATask implements Serializable {
|
|||
@ApiModelProperty("计划完成时间")
|
||||
private Date planenddate;
|
||||
|
||||
/**
|
||||
* 未执行 执行中 执行完成
|
||||
*/
|
||||
@TableField("AppStatus")
|
||||
private String appstatus;
|
||||
@ApiModelProperty("任务状态:1、执行中 2、执行完成 3、已超时")
|
||||
private String appstatus = "1";
|
||||
|
||||
/**
|
||||
* 发送部门
|
||||
|
|
|
|||
|
|
@ -498,6 +498,7 @@
|
|||
where ot.oataskid = #{OATaskId}
|
||||
</select>
|
||||
|
||||
<!--查询待办事项-->
|
||||
<select id="workList" resultType="com.rzyc.bean.task.vo.WorkPriorityVo">
|
||||
select ot.OATaskId,ot.title,ot.TaskType
|
||||
from oatask ot
|
||||
|
|
@ -526,5 +527,54 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="speWorkList" resultType="com.rzyc.bean.task.vo.SpecialWorkVo">
|
||||
select ot.OATaskId,ot.TaskType,ot.Subject,ot.send_id,ot.AppStatus,ot.title,ot.CreatedOn,sys.SysUserName as sendName
|
||||
from oatask ot
|
||||
join oa_task_type ty
|
||||
on ot.TaskType = ty.type_id
|
||||
join sysuser sys
|
||||
on ot.send_id = sys.SysUserId
|
||||
where 1=1
|
||||
<if test="speWorkDto.condition != null and speWorkDto.condition != ''">
|
||||
and ot.TaskType like #{speWorkDto.condition}
|
||||
</if>
|
||||
<if test="speWorkDto.taskTypeId != null and speWorkDto.taskTypeId != ''">
|
||||
and ot.TaskType = #{speWorkDto.taskTypeId}
|
||||
</if>
|
||||
<if test="speWorkDto.sendId != null and speWorkDto.sendId != ''">
|
||||
and ot.send_id = #{speWorkDto.sendId}
|
||||
</if>
|
||||
order by ot.CreatedOn desc
|
||||
</select>
|
||||
|
||||
<!--待办任务详情-->
|
||||
<select id="singleWorkDetail" resultType="com.rzyc.bean.task.vo.SingleWorkVo">
|
||||
select ot.OATaskId,ot.send_id,ot.StartDate,ot.EndDate,ot.Subject,ot.send_id,ot.AppStatus,ot.title,ot.CreatedOn,sys.SysUserName as sendName
|
||||
from oatask ot
|
||||
join sysuser sys
|
||||
on ot.send_id = sys.SysUserId
|
||||
where 1=1
|
||||
<if test="workDetailDto.oaTaskId != null and workDetailDto.oaTaskId != ''">
|
||||
and ot.OATaskId = #{workDetailDto.oaTaskId}
|
||||
</if>
|
||||
<if test="workDetailDto.sendId != null and workDetailDto.sendId != ''">
|
||||
and ot.send_id = #{workDetailDto.sendId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectOATask" resultType="com.rzyc.model.OATask">
|
||||
select ot.* from oatask ot where ot.OATaskId = #{oaTaskId}
|
||||
</select>
|
||||
|
||||
<update id="updateOATask" parameterType="com.rzyc.model.OATask">
|
||||
update oatask ot
|
||||
set ot.TaskType = #{OATask.tasktype},ot.OTCId = #{OATask.otcid},ot.send_id = #{OATask.sendId},
|
||||
ot.user_id = #{OATask.userId},ot.SysPercent = #{OATask.syspercent},ot.StartDate = #{OATask.startdate},
|
||||
ot.EndDate = #{OATask.enddate},ot.PlanEndDate = #{OATask.planenddate},ot.AppStatus = #{OATask.appstatus},
|
||||
ot.title = #{OATask.title},ot.Subject = #{OATask.subject},ot.Frequency = #{OATask.frequency},
|
||||
ot.IsFinish = #{OATask.isfinish},ot.del_state = #{OATask.delState},
|
||||
ot.CreatedOn = #{OATask.createdon},ot.CreatedBy = #{OATask.createdby},ot.ModifiedOn = #{OATask.modifiedon},ot.ModifiedBy = #{OATask.modifiedby}
|
||||
where ot.OATaskId = #{OATask.oataskid}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
* @return 企业设备类型列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备类型列表", notes = "企业设备类型列表")
|
||||
/*@ApiOperation(value = "企业设备类型列表", notes = "企业设备类型列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseId", value = "公司id", required = true, dataType = "string")
|
||||
})
|
||||
|
|
@ -54,7 +54,7 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
@ResponseBody
|
||||
public SingleResult<List<EntDeviceType>> entEquipmentTypeList(@NotNull(message = "公司id不能为null") String enterpriseId)throws Exception{
|
||||
return pcBusinessService.entEquipmentTypeList(enterpriseId);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,12 +4,15 @@ 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.IdDto;
|
||||
import com.rzyc.bean.task.dto.PerRecordDto;
|
||||
import com.rzyc.bean.task.dto.WorkDto;
|
||||
import com.rzyc.bean.task.dto.*;
|
||||
import com.rzyc.bean.task.vo.PerformanceVo;
|
||||
import com.rzyc.bean.task.vo.SingleWorkVo;
|
||||
import com.rzyc.bean.task.vo.SpecialWorkVo;
|
||||
import com.rzyc.bean.task.vo.WorkPriorityVo;
|
||||
import com.rzyc.config.MethodAnnotation;
|
||||
import com.rzyc.enums.TaskState;
|
||||
import com.rzyc.mapper.OADistributionMapper;
|
||||
import com.rzyc.mapper.OATaskMapper;
|
||||
import com.rzyc.model.OADistribution;
|
||||
import com.rzyc.model.OATask;
|
||||
import com.rzyc.model.task.dto.TaskAddOrUpdateDto;
|
||||
|
|
@ -21,10 +24,14 @@ 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 javax.validation.constraints.NotNull;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -48,6 +55,8 @@ public class AppletsTaskController extends BaseController{
|
|||
*/
|
||||
@ApiOperation(value = "工作要务列表",position = 1)
|
||||
@GetMapping("workList")
|
||||
@PreAuthorize("hasAnyAuthority('workList','workList:update')")
|
||||
@MethodAnnotation(authorizations = {"workList","workList:update"},name = "工作要务列表")
|
||||
public MultiResult<WorkPriorityVo> workList(@Valid WorkDto workDto){
|
||||
MultiResult<WorkPriorityVo> result = new MultiResult<>();
|
||||
List<WorkPriorityVo> workList = oaTaskMapper.workList(workDto);
|
||||
|
|
@ -63,6 +72,8 @@ public class AppletsTaskController extends BaseController{
|
|||
*/
|
||||
@ApiOperation(value = "新增或修改履职记录",position = 2)
|
||||
@PostMapping("addExecute")
|
||||
@PreAuthorize("hasAnyAuthority('addExecute','addExecute:update')")
|
||||
@MethodAnnotation(authorizations = {"addExecute","addExecute:update"},name = "工作要务列表")
|
||||
public SingleResult<String> addExecute(@Valid PerRecordDto perRecordDto) throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
OADistribution oaDistribution = new OADistribution();
|
||||
|
|
@ -92,6 +103,8 @@ public class AppletsTaskController extends BaseController{
|
|||
System.out.println("修改的数据===" + oaDistribution);
|
||||
}
|
||||
|
||||
oaTask.setAppstatus(TaskState.FINISH.getState());
|
||||
oaTaskMapper.updateById(oaTask);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -105,10 +118,115 @@ public class AppletsTaskController extends BaseController{
|
|||
@ApiImplicitParam(name = "id",value = "任务1id")
|
||||
})
|
||||
@GetMapping("preList")
|
||||
@PreAuthorize("hasAnyAuthority('preList','preList:update')")
|
||||
@MethodAnnotation(authorizations = {"preList","preList:update"},name = "工作要务列表")
|
||||
public MultiResult<PerformanceVo> preList(@Valid IdDto idDto){
|
||||
MultiResult<PerformanceVo> result = new MultiResult<>();
|
||||
List<PerformanceVo> preList = oaDistributionMapper.preList(idDto.getId());
|
||||
result.setData(preList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 专项工作列表
|
||||
* @Author ZQW
|
||||
* @CreateTime 2022/10/20 10:19
|
||||
*/
|
||||
@ApiOperation(value = "专项工作列表",position = 11)
|
||||
@GetMapping("speWorkList")
|
||||
@PreAuthorize("hasAnyAuthority('speWorkList','speWorkList:update')")
|
||||
@MethodAnnotation(authorizations = {"speWorkList","speWorkList:update"},name = "工作要务列表")
|
||||
public MultiResult<SpecialWorkVo> speWorkList(@Valid SpeWorkDto SpeWorkDto){
|
||||
MultiResult<SpecialWorkVo> result = new MultiResult<>();
|
||||
List<SpecialWorkVo> workList = oaTaskMapper.speWorkList(SpeWorkDto);
|
||||
result.setData(workList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 专项工作任务详情
|
||||
* @Author ZQW
|
||||
* @CreateTime 2022/10/21 10:17
|
||||
*/
|
||||
@ApiOperation(value = "专项工作任务详情",position = 12)
|
||||
@GetMapping("singleWorkDetail")
|
||||
@PreAuthorize("hasAnyAuthority('singleWorkDetail','singleWorkDetail:update')")
|
||||
@MethodAnnotation(authorizations = {"singleWorkDetail","singleWorkDetail:update"},name = "工作要务列表")
|
||||
public SingleResult<SingleWorkVo> singleWorkDetail(@Valid WorkDetailDto workDetailDto){
|
||||
SingleResult<SingleWorkVo> result = new SingleResult();
|
||||
SingleWorkVo specialWorkVos = oaTaskMapper.singleWorkDetail(workDetailDto);
|
||||
result.setData(specialWorkVos);
|
||||
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: 判断当前任务是否过期
|
||||
* @Author ZQW
|
||||
* @CreateTime 2022/10/21 14:52
|
||||
*/
|
||||
@ApiOperation(value = "判断当前任务是否过期",position = 2)
|
||||
@PostMapping("judgeTask")
|
||||
@PreAuthorize("hasAnyAuthority('judgeTask:update')")
|
||||
@MethodAnnotation(authorizations = {"judgeTask:update"},name = "判断当前任务是否过期")
|
||||
public SingleResult<String> judgeTask(@Valid IdDto idDto){
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
OATask oaTask = oaTaskMapper.selectOATask(idDto.getId());
|
||||
System.out.println("任务=====" + oaTask);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date nowDate = new Date();
|
||||
Date endDate = oaTask.getEnddate();
|
||||
|
||||
Calendar nowTime = Calendar.getInstance();
|
||||
Calendar endTime = Calendar.getInstance();
|
||||
nowTime.setTime(nowDate);
|
||||
endTime.setTime(endDate);
|
||||
|
||||
//任务状态不是过期的才会执行以下代码且当前时间在结束时间之后
|
||||
if(oaTask.getAppstatus() != TaskState.OVERTIME.getState() && nowTime.after(endTime)){
|
||||
oaTask.setAppstatus(TaskState.OVERTIME.getState());
|
||||
}
|
||||
|
||||
oaTaskMapper.updateOATask(oaTask);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user