修改任务详情显示bug
This commit is contained in:
parent
d3fec656bf
commit
0db404563a
|
|
@ -46,11 +46,11 @@ public class OADistributionVo {
|
||||||
|
|
||||||
@ApiModelProperty("任务摘要")
|
@ApiModelProperty("任务摘要")
|
||||||
@TableField("title")
|
@TableField("title")
|
||||||
private String remark;
|
private String title;
|
||||||
|
|
||||||
@ApiModelProperty("任务内容")
|
@ApiModelProperty("任务内容")
|
||||||
@TableField("subject")
|
@TableField("subject")
|
||||||
private String content;
|
private String subject;
|
||||||
|
|
||||||
@ApiModelProperty("开始时间")
|
@ApiModelProperty("开始时间")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd ")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd ")
|
||||||
|
|
@ -66,8 +66,7 @@ public class OADistributionVo {
|
||||||
* 未执行 执行中 执行完成
|
* 未执行 执行中 执行完成
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
||||||
@TableField("AppStatus")
|
private String appStatus;
|
||||||
private String appstatus;
|
|
||||||
|
|
||||||
public String getOadistributionid() {
|
public String getOadistributionid() {
|
||||||
return oadistributionid;
|
return oadistributionid;
|
||||||
|
|
@ -110,20 +109,20 @@ public class OADistributionVo {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getRemark() {
|
public String getTitle() {
|
||||||
return remark;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRemark(String remark) {
|
public void setTitle(String title) {
|
||||||
this.remark = remark;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getContent() {
|
public String getSubject() {
|
||||||
return content;
|
return subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContent(String content) {
|
public void setSubject(String subject) {
|
||||||
this.content = content;
|
this.subject = subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStartTime() {
|
public Date getStartTime() {
|
||||||
|
|
@ -142,11 +141,11 @@ public class OADistributionVo {
|
||||||
this.endTime = endTime;
|
this.endTime = endTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAppstatus() {
|
public String getAppStatus() {
|
||||||
return appstatus;
|
return appStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAppstatus(String appstatus) {
|
public void setAppStatus(String appStatus) {
|
||||||
this.appstatus = appstatus;
|
this.appStatus = appStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,16 +37,17 @@ public class ReceiveTaskVo {
|
||||||
|
|
||||||
@TableField("title")
|
@TableField("title")
|
||||||
@ApiModelProperty("任务名称")
|
@ApiModelProperty("任务名称")
|
||||||
private String title;
|
private String remark;
|
||||||
|
|
||||||
@TableField("Subject")
|
@TableField("Subject")
|
||||||
@ApiModelProperty("任务要求")
|
@ApiModelProperty("任务要求")
|
||||||
private String subject;
|
private String content;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("任务接收人完成情况")
|
@ApiModelProperty("任务接收人完成情况")
|
||||||
private OADistributionVo oaDistributionVo;
|
private OADistributionVo oaDistributionVo;
|
||||||
|
|
||||||
|
|
||||||
public OADistributionVo getOaDistributionVo() {
|
public OADistributionVo getOaDistributionVo() {
|
||||||
return oaDistributionVo;
|
return oaDistributionVo;
|
||||||
}
|
}
|
||||||
|
|
@ -79,19 +80,19 @@ public class ReceiveTaskVo {
|
||||||
this.enddate = enddate;
|
this.enddate = enddate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getRemark() {
|
||||||
return title;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String title) {
|
public void setRemark(String remark) {
|
||||||
this.title = title;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSubject() {
|
public String getContent() {
|
||||||
return subject;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubject(String subject) {
|
public void setContent(String content) {
|
||||||
this.subject = subject;
|
this.content = content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,26 +36,24 @@ public class TaskDetailVo {
|
||||||
private Date enddate;
|
private Date enddate;
|
||||||
|
|
||||||
|
|
||||||
@TableField("title")
|
|
||||||
@ApiModelProperty("任务名称")
|
@ApiModelProperty("任务名称")
|
||||||
private String title;
|
private String remark;
|
||||||
|
|
||||||
@TableField("Subject")
|
|
||||||
@ApiModelProperty("任务要求")
|
@ApiModelProperty("任务要求")
|
||||||
private String subject;
|
private String content;
|
||||||
|
|
||||||
@ApiModelProperty("任务状态:1、执行中 2、执行完成 3、已超时")
|
@ApiModelProperty("任务状态:1、执行中 2、执行完成 3、已超时")
|
||||||
private String appStatus;
|
private String workState;
|
||||||
|
|
||||||
@ApiModelProperty("任务接收人完成情况")
|
@ApiModelProperty("任务接收人完成情况")
|
||||||
private List<OADistributionVo> distributions = new ArrayList<>();
|
private List<OADistributionVo> distributions = new ArrayList<>();
|
||||||
|
|
||||||
public String getAppStatus() {
|
public String getWorkState() {
|
||||||
return appStatus;
|
return workState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAppStatus(String appStatus) {
|
public void setWorkState(String workState) {
|
||||||
this.appStatus = appStatus;
|
this.workState = workState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOataskid() {
|
public String getOataskid() {
|
||||||
|
|
@ -83,20 +81,20 @@ public class TaskDetailVo {
|
||||||
this.enddate = enddate;
|
this.enddate = enddate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getRemark() {
|
||||||
return title;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String title) {
|
public void setRemark(String remark) {
|
||||||
this.title = title;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSubject() {
|
public String getContent() {
|
||||||
return subject;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubject(String subject) {
|
public void setContent(String content) {
|
||||||
this.subject = subject;
|
this.content = content;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OADistributionVo> getDistributions() {
|
public List<OADistributionVo> getDistributions() {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.rzyc.bean.task.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: ZQW
|
||||||
|
* @CreateTime: 2022/11/3 11:23
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("任务分配人状返回实体类")
|
||||||
|
public class WorkStateVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("任务状态")
|
||||||
|
private String AppStatus;
|
||||||
|
|
||||||
|
public String getAppStatus() {
|
||||||
|
return AppStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppStatus(String appStatus) {
|
||||||
|
AppStatus = appStatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -146,4 +146,6 @@ public interface OATaskMapper extends BaseMapper<OATask> {
|
||||||
List<NameVo> selectName(@Param("id") String id);
|
List<NameVo> selectName(@Param("id") String id);
|
||||||
|
|
||||||
List<UserVo> getUserNameList(@Param("ids") String ids);
|
List<UserVo> getUserNameList(@Param("ids") String ids);
|
||||||
|
|
||||||
|
List<WorkStateVo> selectWorkState(@Param("id") String id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -474,9 +474,9 @@
|
||||||
<id column="OATaskId" property="oataskid"/>
|
<id column="OATaskId" property="oataskid"/>
|
||||||
<result column="StartDate" property="startdate"/>
|
<result column="StartDate" property="startdate"/>
|
||||||
<result column="EndDate" property="enddate"/>
|
<result column="EndDate" property="enddate"/>
|
||||||
<result column="title" property="title"/>
|
<result column="remark" property="remark"/>
|
||||||
<result column="Subject" property="subject"/>
|
<result column="content" property="content"/>
|
||||||
<result column="AppStatus" property="appStatus"/>
|
<result column="workState" property="workState"/>
|
||||||
<collection property="distributions" resultMap="OADistributionVo"/>
|
<collection property="distributions" resultMap="OADistributionVo"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
@ -486,17 +486,17 @@
|
||||||
<result column="sned_id" property="snedId"/>
|
<result column="sned_id" property="snedId"/>
|
||||||
<result column="SysUserId" property="sysuserid"/>
|
<result column="SysUserId" property="sysuserid"/>
|
||||||
<result column="SysChinaName" property="syschinaname"/>
|
<result column="SysChinaName" property="syschinaname"/>
|
||||||
<result column="remark" property="remark"/>
|
<result column="title" property="title"/>
|
||||||
<result column="content" property="content"/>
|
<result column="Subject" property="subject"/>
|
||||||
<result column="start_time" property="startTime"/>
|
<result column="start_time" property="startTime"/>
|
||||||
<result column="end_time" property="endTime"/>
|
<result column="end_time" property="endTime"/>
|
||||||
<result column="AppStatus" property="appstatus"/>
|
<result column="AppStatus" property="appStatus"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!--发布任务详情-->
|
<!--发布任务详情-->
|
||||||
<select id="selectDetail" resultMap="TaskDetail">
|
<select id="selectDetail" resultMap="TaskDetail">
|
||||||
select ot.oataskid,ot.title,ot.subject,ot.startdate,ot.enddate,ot.AppStatus,od.*
|
select ot.oataskid,ot.title as remark,ot.subject as content,ot.startdate,ot.enddate,ot.AppStatus as workState,od.*
|
||||||
from OATask ot
|
from OATask ot
|
||||||
left join OADistribution od
|
left join OADistribution od
|
||||||
on ot.oataskid = od.oataskid
|
on ot.oataskid = od.oataskid
|
||||||
|
|
@ -508,24 +508,24 @@
|
||||||
<id column="OATaskId" property="oataskid"/>
|
<id column="OATaskId" property="oataskid"/>
|
||||||
<result column="StartDate" property="startdate"/>
|
<result column="StartDate" property="startdate"/>
|
||||||
<result column="EndDate" property="enddate"/>
|
<result column="EndDate" property="enddate"/>
|
||||||
<result column="title" property="title"/>
|
<result column="remark" property="remark"/>
|
||||||
<result column="Subject" property="subject"/>
|
<result column="content" property="content"/>
|
||||||
<association property="oaDistributionVo" javaType="com.rzyc.bean.task.vo.OADistributionVo">
|
<association property="oaDistributionVo" javaType="com.rzyc.bean.task.vo.OADistributionVo">
|
||||||
<id column="OADistributionId" property="oadistributionid"/>
|
<id column="OADistributionId" property="oadistributionid"/>
|
||||||
<result column="OATaskId" property="oataskid"/>
|
<result column="OATaskId" property="oataskid"/>
|
||||||
<result column="sned_id" property="snedId"/>
|
<result column="sned_id" property="snedId"/>
|
||||||
<result column="SysUserId" property="sysuserid"/>
|
<result column="SysUserId" property="sysuserid"/>
|
||||||
<result column="SysChinaName" property="syschinaname"/>
|
<result column="SysChinaName" property="syschinaname"/>
|
||||||
<result column="remark" property="remark"/>
|
<result column="title" property="title"/>
|
||||||
<result column="content" property="content"/>
|
<result column="Subject" property="subject"/>
|
||||||
<result column="start_time" property="startTime"/>
|
<result column="start_time" property="startTime"/>
|
||||||
<result column="end_time" property="endTime"/>
|
<result column="end_time" property="endTime"/>
|
||||||
<result column="AppStatus" property="appstatus"/>
|
<result column="AppStatus" property="appStatus"/>
|
||||||
</association>
|
</association>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!--收到任务详情-->
|
<!--收到任务详情-->
|
||||||
<select id="selectReceive" resultMap="ReceiveTail">
|
<select id="selectReceive" resultMap="ReceiveTail">
|
||||||
select ot.oataskid,ot.title,ot.subject,ot.startdate,ot.enddate,od.*
|
select ot.oataskid,ot.title as remark,ot.subject as content,ot.startdate,ot.enddate,od.*
|
||||||
from OADistribution od
|
from OADistribution od
|
||||||
join OATask ot
|
join OATask ot
|
||||||
on ot.oataskid = od.oataskid
|
on ot.oataskid = od.oataskid
|
||||||
|
|
@ -533,13 +533,6 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!--<select id="selectReceive" resultMap="ReceiveTail">
|
|
||||||
select *
|
|
||||||
from OADistribution od
|
|
||||||
join OATask ot
|
|
||||||
on ot.oataskid = od.oataskid
|
|
||||||
where od.OADistributionId = #{OADistributionId}
|
|
||||||
</select>-->
|
|
||||||
<!--查询待办事项-->
|
<!--查询待办事项-->
|
||||||
<select id="workList" resultMap="ReceiveTail">
|
<select id="workList" resultMap="ReceiveTail">
|
||||||
select ot.OATaskId,od.OADistributionId,ot.title,ot.TaskType
|
select ot.OATaskId,od.OADistributionId,ot.title,ot.TaskType
|
||||||
|
|
@ -559,6 +552,7 @@
|
||||||
</if>
|
</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,ty.name as tasktype,ot.Subject,ot.StartDate,ot.EndDate
|
select ot.OATaskId,ty.name as tasktype,ot.Subject,ot.StartDate,ot.EndDate
|
||||||
|
|
@ -622,7 +616,16 @@
|
||||||
on ot.send_id = s.SysUserId
|
on ot.send_id = s.SysUserId
|
||||||
where ot.send_id = #{id}
|
where ot.send_id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserNameList" resultType="com.rzyc.bean.task.vo.UserVo">
|
<select id="getUserNameList" resultType="com.rzyc.bean.task.vo.UserVo">
|
||||||
select SysUserId,ChinaName from sysuser where SysUserId in(#{ids})
|
select SysUserId,ChinaName from sysuser where SysUserId in(#{ids})
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWorkState" resultType="com.rzyc.bean.task.vo.WorkStateVo">
|
||||||
|
select od.AppStatus
|
||||||
|
from OADistribution od
|
||||||
|
join oatask ot
|
||||||
|
on ot.OATaskId = od.OATaskId
|
||||||
|
where ot.OATaskId = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,8 @@ public class WorkController extends BaseController{
|
||||||
oaDistribution.setOataskid(addTaskDto.getOataskid());
|
oaDistribution.setOataskid(addTaskDto.getOataskid());
|
||||||
oaDistribution.setSnedId(oaTask.getSendId());
|
oaDistribution.setSnedId(oaTask.getSendId());
|
||||||
oaDistribution.setSysuserid(uid);
|
oaDistribution.setSysuserid(uid);
|
||||||
oaDistribution.setStartTime(oaTask.getStartdate());
|
/* oaDistribution.setStartTime(oaTask.getStartdate());
|
||||||
oaDistribution.setEndTime(oaTask.getEnddate());
|
oaDistribution.setEndTime(oaTask.getEnddate());*/
|
||||||
oaDistribution.setAppstatus("1");
|
oaDistribution.setAppstatus("1");
|
||||||
oaDistribution.setCreatedby(getUserId());
|
oaDistribution.setCreatedby(getUserId());
|
||||||
oaDistribution.setCreatedon(new Date());
|
oaDistribution.setCreatedon(new Date());
|
||||||
|
|
@ -145,30 +145,6 @@ public class WorkController extends BaseController{
|
||||||
}
|
}
|
||||||
|
|
||||||
oaDistributionMapper.deliverTask(list);
|
oaDistributionMapper.deliverTask(list);
|
||||||
// List<TaskAddOrUpdateDto> list = new ArrayList<>();
|
|
||||||
// for (TaskAddOrUpdateDto taskDto : list) {
|
|
||||||
// String sysuserid = addTaskDto.getSysuserid();
|
|
||||||
// String[] split = sysuserid.split(",");
|
|
||||||
// for (String s : split) {
|
|
||||||
// SysUser sysUser = sysUserMapper.selectByPrimaryKey(s);
|
|
||||||
// OADistribution oaDistribution = new OADistribution();
|
|
||||||
// BeanUtils.copyProperties(oaDistribution,taskDto);
|
|
||||||
// //日期格式转换
|
|
||||||
// ConvertUtils.register(new DateConverter(null), Date.class);
|
|
||||||
// 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());
|
|
||||||
// list.add(taskDto);
|
|
||||||
// }
|
|
||||||
// oaDistributionMapper.deliverTask(list);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -363,4 +339,32 @@ public class WorkController extends BaseController{
|
||||||
result.setData(userVoList);
|
result.setData(userVoList);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 查询任务是否完成
|
||||||
|
* @Author ZQW
|
||||||
|
* @CreateTime 2022/11/3 11:14
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查询任务是否完成",position = 14)
|
||||||
|
@GetMapping ("checkFinish")
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "id",value = "任务id")
|
||||||
|
})
|
||||||
|
@PreAuthorize("hasAnyAuthority('checkFinish','checkFinish:update')")
|
||||||
|
@MethodAnnotation(authorizations = {"checkFinish","checkFinish:update"},name = "查询任务是否完成")
|
||||||
|
public SingleResult<String> checkFinish(@Valid IdDto idDto){
|
||||||
|
SingleResult<String> result = new SingleResult<>();
|
||||||
|
List<WorkStateVo> stateVoList = oaTaskMapper.selectWorkState(idDto.getId());
|
||||||
|
OATask oaTask = oaTaskMapper.selectOATask(idDto.getId());
|
||||||
|
for (WorkStateVo list : stateVoList) {
|
||||||
|
if ((list.getAppStatus()).equals("3")){
|
||||||
|
oaTask.setAppstatus("3");
|
||||||
|
}else {
|
||||||
|
oaTask.setAppstatus("2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oaTaskMapper.updateOATask(oaTask);
|
||||||
|
System.err.println("任务状态=======" + oaTask.getAppstatus());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user