工作任务
This commit is contained in:
parent
c690a97a5f
commit
fc57df3f7d
|
|
@ -364,4 +364,7 @@ public class OATask implements Serializable {
|
|||
public void setDistributions(List<OADistribution> distributions) {
|
||||
this.distributions = distributions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,170 @@
|
|||
package com.rzyc.model.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;
|
||||
|
||||
/**
|
||||
* @ClassName: AddTaskDto
|
||||
* @description:
|
||||
* @author: ZQW
|
||||
* * @create: 2022-09-20 15:58
|
||||
**/
|
||||
|
||||
@ApiModel("发布任务参数")
|
||||
public class AddTaskDto {
|
||||
|
||||
@ApiModelProperty(value = "任务接受id")
|
||||
@TableId("OADistributionId")
|
||||
private String oadistributionid;
|
||||
|
||||
@ApiModelProperty(value = "任务id")
|
||||
@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("SysChinaName")
|
||||
private String syschinaname;
|
||||
|
||||
/**
|
||||
* 接收人名
|
||||
*/
|
||||
@ApiModelProperty(value = "接收人名")
|
||||
private String receiveName;
|
||||
|
||||
@ApiModelProperty(value = "接收用户电话")
|
||||
@TableField("SysTelephone")
|
||||
private String systelephone;
|
||||
|
||||
@ApiModelProperty(value = "任务摘要")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
@TableField("subject")
|
||||
private String subject;
|
||||
|
||||
@ApiModelProperty(value = "开始时间,格式 yyyy-MM-dd HH:mm:ss",required = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
@TableField("start_time")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间,格式 yyyy-MM-dd HH:mm:ss",required = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
@TableField("end_time")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 未执行 执行中 执行完成
|
||||
*/
|
||||
@TableField("AppStatus")
|
||||
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 getSnedId() {
|
||||
return snedId;
|
||||
}
|
||||
|
||||
public void setSnedId(String snedId) {
|
||||
this.snedId = snedId;
|
||||
}
|
||||
|
||||
public String getSysuserid() {
|
||||
return sysuserid;
|
||||
}
|
||||
|
||||
public void setSysuserid(String sysuserid) {
|
||||
this.sysuserid = sysuserid;
|
||||
}
|
||||
|
||||
public String getSyschinaname() {
|
||||
return syschinaname;
|
||||
}
|
||||
|
||||
public void setSyschinaname(String syschinaname) {
|
||||
this.syschinaname = syschinaname;
|
||||
}
|
||||
|
||||
public String getReceiveName() {
|
||||
return receiveName;
|
||||
}
|
||||
|
||||
public void setReceiveName(String receiveName) {
|
||||
this.receiveName = receiveName;
|
||||
}
|
||||
|
||||
public String getSystelephone() {
|
||||
return systelephone;
|
||||
}
|
||||
|
||||
public void setSystelephone(String systelephone) {
|
||||
this.systelephone = systelephone;
|
||||
}
|
||||
|
||||
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,167 @@
|
|||
package com.rzyc.model.task.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName: OADistributionVo
|
||||
* @description:
|
||||
* @author: ZQW
|
||||
* * @create: 2022-09-20 17:36
|
||||
**/
|
||||
|
||||
@ApiModel(value = "任务返回参数显示")
|
||||
public class OADistributionVo {
|
||||
|
||||
@ApiModelProperty(value = "任务接受id")
|
||||
@TableId("OADistributionId")
|
||||
private String oadistributionid;
|
||||
|
||||
@ApiModelProperty(value = "任务id")
|
||||
@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("SysChinaName")
|
||||
private String syschinaname;
|
||||
|
||||
/**
|
||||
* 接收人名
|
||||
*/
|
||||
@ApiModelProperty(value = "接收人名")
|
||||
private String receiveName;
|
||||
|
||||
@ApiModelProperty(value = "接收用户电话")
|
||||
@TableField("SysTelephone")
|
||||
private String systelephone;
|
||||
|
||||
@ApiModelProperty(value = "任务摘要")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
@TableField("subject")
|
||||
private String subject;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@TableField("start_time")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@TableField("end_time")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 未执行 执行中 执行完成
|
||||
*/
|
||||
@TableField("AppStatus")
|
||||
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 getSnedId() {
|
||||
return snedId;
|
||||
}
|
||||
|
||||
public void setSnedId(String snedId) {
|
||||
this.snedId = snedId;
|
||||
}
|
||||
|
||||
public String getSysuserid() {
|
||||
return sysuserid;
|
||||
}
|
||||
|
||||
public void setSysuserid(String sysuserid) {
|
||||
this.sysuserid = sysuserid;
|
||||
}
|
||||
|
||||
public String getSyschinaname() {
|
||||
return syschinaname;
|
||||
}
|
||||
|
||||
public void setSyschinaname(String syschinaname) {
|
||||
this.syschinaname = syschinaname;
|
||||
}
|
||||
|
||||
public String getReceiveName() {
|
||||
return receiveName;
|
||||
}
|
||||
|
||||
public void setReceiveName(String receiveName) {
|
||||
this.receiveName = receiveName;
|
||||
}
|
||||
|
||||
public String getSystelephone() {
|
||||
return systelephone;
|
||||
}
|
||||
|
||||
public void setSystelephone(String systelephone) {
|
||||
this.systelephone = systelephone;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -2555,7 +2555,7 @@ public class BaseController {
|
|||
* @param sysUserId
|
||||
* @throws Exception
|
||||
*/
|
||||
protected void getTaskDetail(OATask oaTask,String sysUserId)throws Exception{
|
||||
/* protected void getTaskDetail(OATask oaTask,String sysUserId)throws Exception{
|
||||
//发布人名
|
||||
SysUser sysUser = sysUserMapper.selectByPrimaryKey(oaTask.getCreatedby());
|
||||
if(null != sysUser){
|
||||
|
|
@ -2579,7 +2579,7 @@ public class BaseController {
|
|||
oaTaskMapper.changeIsFinish(taskIds);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* 生成企业二维码
|
||||
* @param entId
|
||||
|
|
|
|||
|
|
@ -1702,7 +1702,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@LoginAuth
|
||||
/*@LoginAuth
|
||||
@ApiOperation(value = "任务详情", notes = "任务详情")
|
||||
@PostMapping(value = "taskDetail")
|
||||
@ResponseBody
|
||||
|
|
@ -1719,7 +1719,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
result.setMessage(Message.NO_DATA);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 认证日志分页
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
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.model.OADistribution;
|
||||
import com.rzyc.model.task.dto.AddTaskDto;
|
||||
import com.rzyc.model.task.vo.OADistributionVo;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName: TaskController
|
||||
* @description:
|
||||
* @author: ZQW
|
||||
* * @create: 2022-09-20 15:21
|
||||
**/
|
||||
|
||||
@Api(tags = "工作任务")
|
||||
@CrossOrigin("*")
|
||||
@RequestMapping("task")
|
||||
@RestController
|
||||
@Validated
|
||||
public class TaskController extends BaseController{
|
||||
|
||||
/**
|
||||
* @return: 新增任务
|
||||
* @Author: ZQW
|
||||
* @Date: 2022/9/20
|
||||
*/
|
||||
@ApiOperation(value = "新增任务")
|
||||
@PostMapping()
|
||||
public SingleResult<String> addTask(@Valid AddTaskDto addTaskDto) throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
OADistribution oaDistribution = new OADistribution();
|
||||
BeanUtils.copyProperties(oaDistribution,addTaskDto);
|
||||
SysUser sysUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getSysuserid());
|
||||
if(null == sysUser){
|
||||
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(getChinaName());
|
||||
oaDistribution.setCreatedon(new Date());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return: 查询任务
|
||||
* @Author: ZQW
|
||||
* @Date: 2022/9/20
|
||||
*/
|
||||
/*public MultiResult<OADistributionVo> taskList(){
|
||||
|
||||
}*/
|
||||
}
|
||||
|
|
@ -1,12 +1,16 @@
|
|||
package com.common.utils.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 接口返回数据
|
||||
*/
|
||||
public class Result {
|
||||
|
||||
@ApiModelProperty(value = "状态码,1成功、0失败")
|
||||
private int code = Code.SUCCESS.getCode();
|
||||
|
||||
@ApiModelProperty(value = "提示信息")
|
||||
private String message = Message.SUCCESS;
|
||||
|
||||
private Integer number = Code.SUCCESS.getCode();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user