待办事项
This commit is contained in:
parent
e2d4699a4a
commit
1904b3257e
|
|
@ -20,29 +20,34 @@ import java.util.List;
|
|||
@ApiModel("待办事项返回参数")
|
||||
public class ThingVo {
|
||||
|
||||
@TableId("OATaskId")
|
||||
@ApiModelProperty("任务id")
|
||||
private String oataskid;
|
||||
|
||||
@ApiModelProperty("任务分配id")
|
||||
private String oADistributionId;
|
||||
|
||||
@TableField("TaskType")
|
||||
@ApiModelProperty("任务类型")
|
||||
private String tasktype;
|
||||
|
||||
@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("Subject")
|
||||
@ApiModelProperty("任务内容")
|
||||
private String subject;
|
||||
|
||||
public String getoADistributionId() {
|
||||
return oADistributionId;
|
||||
}
|
||||
|
||||
public void setoADistributionId(String oADistributionId) {
|
||||
this.oADistributionId = oADistributionId;
|
||||
}
|
||||
|
||||
public String getOataskid() {
|
||||
return oataskid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,8 @@ public interface OATaskMapper extends BaseMapper<OATask> {
|
|||
List<OATask> taskList(@Param("condition") String condition);
|
||||
|
||||
//待办事项列表
|
||||
List<ThingVo> thingsList(@Param("idDto") IdDto idDto);
|
||||
List<ThingVo> thingsList(@Param("idDto") IdDto idDto,
|
||||
@Param("userId") String userId);
|
||||
|
||||
//插入任务
|
||||
int insertTask(@Param("oaTask") OATask oaTask);
|
||||
|
|
|
|||
|
|
@ -561,9 +561,9 @@
|
|||
|
||||
<!--待办事项列表-->
|
||||
<select id="thingsList" resultType="com.rzyc.bean.task.vo.ThingVo">
|
||||
select ot.OATaskId,ty.name as tasktype,ot.Subject,ot.StartDate,ot.EndDate
|
||||
select ot.OATaskId,oa.OADistributionId,ty.name as tasktype,ot.Subject,ot.StartDate,ot.EndDate
|
||||
from oatask ot
|
||||
left join oa_task_type ty
|
||||
join oa_task_type ty
|
||||
on ot.TaskType = ty.type_id
|
||||
join OADistribution oa
|
||||
on ot.OATaskId = oa.OATaskId
|
||||
|
|
@ -574,6 +574,9 @@
|
|||
<if test="idDto.id != null and idDto.id != ''">
|
||||
and ot.TaskType like #{idDto.id}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''" >
|
||||
and oa.SysUserId = #{userId}
|
||||
</if>
|
||||
order by ot.EndDate asc
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,59 +43,16 @@ import java.util.List;
|
|||
@Validated
|
||||
public class TaskController 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());
|
||||
|
||||
//接收人
|
||||
//SysUser receiveUser = sysUserMapper.selectByPrimaryKey(addTaskDto.getUserId());
|
||||
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);
|
||||
}
|
||||
|
||||
/* //增加默认任务执行情况
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 待办事项列表
|
||||
* @Author ZQW
|
||||
* @CreateTime 2022/9/23 10:20
|
||||
*/
|
||||
@ApiOperation(value = "待办事项列表",position = 2)
|
||||
/* @ApiOperation(value = "待办事项列表",position = 2)
|
||||
@GetMapping("thingsList")
|
||||
@ApiImplicitParams(value = {
|
||||
@ApiImplicitParam(name = "id",value = "任务类型id")
|
||||
|
|
@ -106,7 +63,7 @@ public class TaskController extends BaseController{
|
|||
System.out.println("查询的数据=====" + thingVos);
|
||||
result.setData(thingVos);
|
||||
return result;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @return: 查询我发布的任务
|
||||
|
|
@ -162,24 +119,7 @@ public class TaskController extends BaseController{
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description:查询任务名称
|
||||
* @Author ZQW
|
||||
* @CreateTime 2022/9/29 9:44
|
||||
*/
|
||||
/*@ApiOperation(value = "查询任务名称",position = 5)
|
||||
@ApiImplicitParams(value = {
|
||||
@ApiImplicitParam(name = "id",value = "任务类型1id")
|
||||
})
|
||||
@GetMapping("getTaskName")
|
||||
public SingleResult<TaskNameVo> getTaskName(@Valid IdDto idDto){
|
||||
SingleResult<TaskNameVo> result = new SingleResult<>();
|
||||
TaskNameVo taskNameVo = new TaskNameVo();
|
||||
OaTaskType oaTaskType = oaTaskTypeMapper.selectById(idDto.getId());
|
||||
taskNameVo.setName(oaTaskType.getName());
|
||||
result.setData(taskNameVo);
|
||||
return result;
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
* @return: 新增任务执行情况
|
||||
|
|
|
|||
|
|
@ -159,11 +159,14 @@ public class WorkController extends BaseController{
|
|||
@ApiOperation(value = "待办事项列表",position = 4)
|
||||
@GetMapping("thingsList")
|
||||
@ApiImplicitParams(value = {
|
||||
@ApiImplicitParam(name = "id",value = "任务类型id")
|
||||
@ApiImplicitParam(name = "id",value = "任务类型id"),
|
||||
@ApiImplicitParam(name = "userId", value = "用户id",required = true, dataType = "string"),
|
||||
})
|
||||
public MultiResult<ThingVo> thingsList(@Valid IdDto idDto){
|
||||
@PreAuthorize("hasAnyAuthority('thingsList','thingsList:update')")
|
||||
@MethodAnnotation(authorizations = {"thingsList","thingsList:update"},name = "待办事项列表")
|
||||
public MultiResult<ThingVo> thingsList(@Valid IdDto idDto,@RequestParam(required = true) String userId){
|
||||
MultiResult<ThingVo> result = new MultiResult<>();
|
||||
List<ThingVo> thingVos = oaTaskMapper.thingsList(idDto);
|
||||
List<ThingVo> thingVos = oaTaskMapper.thingsList(idDto,userId);
|
||||
System.out.println("查询的数据=====" + thingVos);
|
||||
result.setData(thingVos);
|
||||
return result;
|
||||
|
|
@ -505,11 +508,10 @@ public class WorkController extends BaseController{
|
|||
@MethodAnnotation(authorizations = {"selectName","selectName:update"},name = "查询参与人员姓名")
|
||||
public MultiResult<NameVo> selectName(@Valid AddWorkDto addWorkDto){
|
||||
MultiResult<NameVo> result = new MultiResult();
|
||||
|
||||
List<NameVo> nameVos = new ArrayList<>();
|
||||
List<NameVo> list = oaDistributionMapper.selectJoinUser(addWorkDto);
|
||||
|
||||
result.setData(list);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user