pc小程序政府端修改
This commit is contained in:
parent
d233efcb55
commit
afeaea4c60
|
|
@ -0,0 +1,37 @@
|
|||
package com.rzyc.bean.task.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: ZQW
|
||||
* @CreateTime: 2022/10/28 13:53
|
||||
*/
|
||||
|
||||
@ApiModel("姓名显示请求参数")
|
||||
public class NameDto {
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("任务类型id")
|
||||
private String taskTypeId;
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskTypeId() {
|
||||
return taskTypeId;
|
||||
}
|
||||
|
||||
public void setTaskTypeId(String taskTypeId) {
|
||||
this.taskTypeId = taskTypeId;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,20 +17,19 @@ import java.util.Date;
|
|||
@ApiModel("新增履职记录请求参数")
|
||||
public class PerRecordDto {
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
@TableId("OADistributionId")
|
||||
private String oadistributionid;
|
||||
@ApiModelProperty(value = "工作记录id")
|
||||
@TableId("record_id")
|
||||
private String recordId;
|
||||
|
||||
@ApiModelProperty(value = "任务id",required = true)
|
||||
@TableField("OATaskId")
|
||||
private String oataskid;
|
||||
@ApiModelProperty(value = "任务接收id",required = true)
|
||||
@TableField("OADistributionId")
|
||||
private String OADistributionId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "任务摘要")
|
||||
@ApiModelProperty(value = "工作摘要")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
@ApiModelProperty(value = "工作内容")
|
||||
@TableField("subject")
|
||||
private String subject;
|
||||
|
||||
|
|
@ -44,20 +43,20 @@ public class PerRecordDto {
|
|||
@TableField("end_time")
|
||||
private Date endTime;
|
||||
|
||||
public String getOadistributionid() {
|
||||
return oadistributionid;
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setOadistributionid(String oadistributionid) {
|
||||
this.oadistributionid = oadistributionid;
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getOataskid() {
|
||||
return oataskid;
|
||||
public String getOADistributionId() {
|
||||
return OADistributionId;
|
||||
}
|
||||
|
||||
public void setOataskid(String oataskid) {
|
||||
this.oataskid = oataskid;
|
||||
public void setOADistributionId(String OADistributionId) {
|
||||
this.OADistributionId = OADistributionId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
@ApiModel("专项工作请求参数")
|
||||
public class SpeWorkDto {
|
||||
|
||||
@ApiModelProperty(value = "任务id",required = true)
|
||||
@ApiModelProperty(value = "任务类型id",required = true)
|
||||
private String taskTypeId;
|
||||
|
||||
@ApiModelProperty(value = "任务发布人id",required = true)
|
||||
@ApiModelProperty(value = "任务接收人id",required = true)
|
||||
private String sendId;
|
||||
|
||||
@ApiModelProperty(value = "关键词")
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
@ApiModel("待办任务详情请求参数")
|
||||
public class WorkDetailDto {
|
||||
|
||||
@ApiModelProperty(value = "任务id",required = true)
|
||||
@ApiModelProperty(value = "任务接收id",required = true)
|
||||
private String oaTaskId;
|
||||
|
||||
@ApiModelProperty(value = "任务发布人id",required = true)
|
||||
@ApiModelProperty(value = "任务发布人id")
|
||||
private String sendId;
|
||||
|
||||
public String getOaTaskId() {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
@ApiModel("待办任务请求参数")
|
||||
public class WorkDto {
|
||||
|
||||
@ApiModelProperty(value = "任务id",required = true)
|
||||
@ApiModelProperty(value = "任务类型id",required = true)
|
||||
private String taskTypeId;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@ public class SingleWorkVo {
|
|||
@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("开始时间")
|
||||
|
|
@ -79,14 +75,6 @@ public class SingleWorkVo {
|
|||
this.sendId = sendId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Date getStartdate() {
|
||||
return startdate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ public class SpecialWorkVo {
|
|||
@ApiModelProperty("任务id")
|
||||
private String oataskid;
|
||||
|
||||
@ApiModelProperty("任务接收id")
|
||||
private String OADistributionId;
|
||||
|
||||
@TableField("TaskType")
|
||||
@ApiModelProperty("任务类型")
|
||||
private String tasktype;
|
||||
|
|
@ -58,6 +61,14 @@ public class SpecialWorkVo {
|
|||
@ApiModelProperty("发布人")
|
||||
private String sendName;
|
||||
|
||||
public String getOADistributionId() {
|
||||
return OADistributionId;
|
||||
}
|
||||
|
||||
public void setOADistributionId(String OADistributionId) {
|
||||
this.OADistributionId = OADistributionId;
|
||||
}
|
||||
|
||||
public String getOataskid() {
|
||||
return oataskid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ public class WorkPriorityVo {
|
|||
@ApiModelProperty("任务id")
|
||||
private String oataskid;
|
||||
|
||||
@ApiModelProperty("任务接收id")
|
||||
private String OADistributionId;
|
||||
|
||||
@ApiModelProperty("任务摘要")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
|
@ -35,6 +38,14 @@ public class WorkPriorityVo {
|
|||
@TableField("totalNum")
|
||||
private Integer totalNum = 4;
|
||||
|
||||
public String getOADistributionId() {
|
||||
return OADistributionId;
|
||||
}
|
||||
|
||||
public void setOADistributionId(String OADistributionId) {
|
||||
this.OADistributionId = OADistributionId;
|
||||
}
|
||||
|
||||
public String getTasktype() {
|
||||
return tasktype;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ package com.rzyc.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.rzyc.bean.task.dto.IdDto;
|
||||
import com.rzyc.bean.task.dto.NameDto;
|
||||
import com.rzyc.bean.task.dto.WorkDetailDto;
|
||||
import com.rzyc.bean.task.dto.WorkDto;
|
||||
import com.rzyc.bean.task.vo.PerformanceVo;
|
||||
import com.rzyc.bean.task.vo.ThingVo;
|
||||
import com.rzyc.bean.task.vo.WorkPriorityVo;
|
||||
import com.rzyc.bean.task.vo.*;
|
||||
import com.rzyc.model.OADistribution;
|
||||
import com.rzyc.model.oth.ManualLable;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -50,12 +50,12 @@ public interface OADistributionMapper extends BaseMapper<OADistribution> {
|
|||
@Param("snedId")String snedId);
|
||||
|
||||
|
||||
//履职记录详情
|
||||
List<PerformanceVo> preList(@Param("id") String id);
|
||||
|
||||
//统计完成次数
|
||||
int countNum(@Param("taskTypeId")String taskTypeId);
|
||||
|
||||
//跟新任务执行表
|
||||
int updateDistriubtion(@Param("oaDistribution")OADistribution oaDistribution);
|
||||
|
||||
//专项工作详情
|
||||
SingleWorkVo singleWorkDetail(@Param("idDto")IdDto idDto);
|
||||
|
||||
//人员姓名显示
|
||||
List<NameVo> selectName(@Param("nameDto") NameDto nameDto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,12 +130,9 @@ 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);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package com.rzyc.mapper;
|
||||
|
||||
import com.rzyc.bean.task.vo.PerformanceVo;
|
||||
import com.rzyc.model.TaskRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任务记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author
|
||||
* @since 2022-10-28
|
||||
*/
|
||||
@Repository
|
||||
public interface TaskRecordMapper extends BaseMapper<TaskRecord> {
|
||||
|
||||
//履职记录详情
|
||||
List<PerformanceVo> preList(@Param("id") String id);
|
||||
|
||||
//统计完成次数
|
||||
int countNum(@Param("taskTypeId")String taskTypeId);
|
||||
}
|
||||
/**/
|
||||
151
inventory-dao/src/main/java/com/rzyc/model/TaskRecord.java
Normal file
151
inventory-dao/src/main/java/com/rzyc/model/TaskRecord.java
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
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-28
|
||||
*/
|
||||
@TableName("task_record")
|
||||
@ApiModel(value="TaskRecord对象", description="任务记录表")
|
||||
public class TaskRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "工作记录id")
|
||||
@TableId("record_id")
|
||||
private String recordId;
|
||||
|
||||
@ApiModelProperty(value = "任务接收id")
|
||||
@TableField("OADistributionId")
|
||||
private String OADistributionId;
|
||||
|
||||
@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;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("create_time")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@TableField("create_by")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("modfiy_time")
|
||||
private Date modfiyTime;
|
||||
|
||||
@ApiModelProperty(value = "修改人")
|
||||
@TableField("modfiy_by")
|
||||
private String modfiyBy;
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
public String getOADistributionId() {
|
||||
return OADistributionId;
|
||||
}
|
||||
|
||||
public void setOADistributionId(String OADistributionId) {
|
||||
this.OADistributionId = OADistributionId;
|
||||
}
|
||||
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 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 getModfiyTime() {
|
||||
return modfiyTime;
|
||||
}
|
||||
|
||||
public void setModfiyTime(Date modfiyTime) {
|
||||
this.modfiyTime = modfiyTime;
|
||||
}
|
||||
public String getModfiyBy() {
|
||||
return modfiyBy;
|
||||
}
|
||||
|
||||
public void setModfiyBy(String modfiyBy) {
|
||||
this.modfiyBy = modfiyBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TaskRecord{" +
|
||||
"recordId=" + recordId +
|
||||
", OADistributionId=" + OADistributionId +
|
||||
", title=" + title +
|
||||
", subject=" + subject +
|
||||
", startTime=" + startTime +
|
||||
", endTime=" + endTime +
|
||||
", createTime=" + createTime +
|
||||
", createBy=" + createBy +
|
||||
", modfiyTime=" + modfiyTime +
|
||||
", modfiyBy=" + modfiyBy +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
|
|
@ -26,31 +26,10 @@ public class TaskAddOrUpdateDto {
|
|||
@TableField("OATaskId")
|
||||
private String oataskid;
|
||||
|
||||
@ApiModelProperty(value = "接收用户id")
|
||||
@ApiModelProperty(value = "接收用户id",required = true)
|
||||
@TableField("SysUserId")
|
||||
private String sysuserid;
|
||||
|
||||
/**
|
||||
* 接收人名
|
||||
*/
|
||||
@ApiModelProperty(value = "接收人名")
|
||||
private String receiveName;
|
||||
|
||||
|
||||
/* @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;*/
|
||||
|
||||
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
|
||||
@TableField("AppStatus")
|
||||
private String appstatus ;
|
||||
|
||||
public String getOadistributionid() {
|
||||
return oadistributionid;
|
||||
}
|
||||
|
|
@ -74,20 +53,4 @@ public class TaskAddOrUpdateDto {
|
|||
public void setSysuserid(String sysuserid) {
|
||||
this.sysuserid = sysuserid;
|
||||
}
|
||||
|
||||
public String getReceiveName() {
|
||||
return receiveName;
|
||||
}
|
||||
|
||||
public void setReceiveName(String receiveName) {
|
||||
this.receiveName = receiveName;
|
||||
}
|
||||
|
||||
public String getAppstatus() {
|
||||
return appstatus;
|
||||
}
|
||||
|
||||
public void setAppstatus(String appstatus) {
|
||||
this.appstatus = appstatus;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,22 +236,6 @@
|
|||
order by ob.end_time asc
|
||||
</select>-->
|
||||
|
||||
<select id="preList" resultType="com.rzyc.bean.task.vo.PerformanceVo">
|
||||
select od.title,od.start_time
|
||||
from OADistribution od
|
||||
join oatask ot
|
||||
on ot.OATaskId = od.OATaskId
|
||||
where ot.OATaskId = #{id}
|
||||
order by od.start_time asc
|
||||
</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
|
||||
|
|
@ -269,4 +253,21 @@
|
|||
ModifiedBy = #{oaDistribution.modifiedby,jdbcType=VARCHAR}
|
||||
where OADistributionId = #{oaDistribution.oadistributionid}
|
||||
</update>
|
||||
|
||||
<!--专项工作详情-->
|
||||
<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
|
||||
from oatask ot
|
||||
join OADistribution od on ot.OATaskId = od.OATaskId
|
||||
where od.OADistributionId = #{idDto.id}
|
||||
</select>
|
||||
|
||||
<select id="selectName" resultType="com.rzyc.bean.task.vo.NameVo">
|
||||
select od.SysChinaName as name
|
||||
from OADistribution od
|
||||
join oatask ot
|
||||
on ot.OATaskId = od.OATaskId
|
||||
where od.OATaskId = #{nameDto.taskId}
|
||||
and ot.TaskType = #{nameDto.taskTypeId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -505,8 +505,9 @@
|
|||
|
||||
<!--查询待办事项-->
|
||||
<select id="workList" resultType="com.rzyc.bean.task.vo.WorkPriorityVo">
|
||||
select ot.OATaskId,ot.title,ot.TaskType
|
||||
select ot.OATaskId,od.OADistributionId,ot.title,ot.TaskType
|
||||
from oatask ot
|
||||
join OADistribution od on ot.OATaskId = od.OATaskId
|
||||
left join oa_task_type ty
|
||||
on ot.TaskType = ty.type_id
|
||||
where 1=1
|
||||
|
|
@ -517,7 +518,7 @@
|
|||
and ot.TaskType = #{workDto.taskTypeId}
|
||||
</if>
|
||||
<if test="workDto.sysUserId != null and workDto.sysUserId != ''">
|
||||
and ot.user_id = #{workDto.sysUserId}
|
||||
and od.SysUserId = #{workDto.sysUserId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
@ -540,39 +541,26 @@
|
|||
</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
|
||||
select ot.OATaskId,od.OADistributionId,ot.TaskType,ot.Subject,ot.send_id,ot.AppStatus,ot.title,ot.CreatedOn,sys.SysUserName as sendName
|
||||
from oatask ot
|
||||
join OADistribution od on ot.OATaskId = od.OATaskId
|
||||
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}
|
||||
and ot.title 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}
|
||||
and od.SysUserId = #{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}
|
||||
|
|
|
|||
40
inventory-dao/src/main/resources/mapper/TaskRecordMapper.xml
Normal file
40
inventory-dao/src/main/resources/mapper/TaskRecordMapper.xml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?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.TaskRecordMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.rzyc.model.TaskRecord">
|
||||
<id column="record_id" property="recordId" />
|
||||
<result column="OADistributionId" property="OADistributionId" />
|
||||
<result column="title" property="title" />
|
||||
<result column="subject" property="subject" />
|
||||
<result column="start_time" property="startTime" />
|
||||
<result column="end_time" property="endTime" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="modfiy_time" property="modfiyTime" />
|
||||
<result column="modfiy_by" property="modfiyBy" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
record_id, OADistributionId, title, subject, start_time, end_time, create_time, create_by, modfiy_time, modfiy_by
|
||||
</sql>
|
||||
|
||||
<select id="preList" resultType="com.rzyc.bean.task.vo.PerformanceVo">
|
||||
select t.title,t.start_time
|
||||
from task_record t
|
||||
join OADistribution od
|
||||
on t.OADistributionId = od.OADistributionId
|
||||
where t.OADistributionId = #{id}
|
||||
order by t.start_time asc
|
||||
</select>
|
||||
|
||||
<!--统计完成次数
|
||||
resultType="int":返回值类型
|
||||
parameterType="string":参数类型
|
||||
-->
|
||||
<select id="countNum" resultType="int" parameterType="string">
|
||||
select count(t.OADistributionId) from task_record t where t.OADistributionId = #{taskTypeId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -5,15 +5,13 @@ import com.common.utils.StringUtils;
|
|||
import com.common.utils.model.MultiResult;
|
||||
import com.common.utils.model.SingleResult;
|
||||
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.bean.task.vo.*;
|
||||
import com.rzyc.config.MethodAnnotation;
|
||||
import com.rzyc.enums.TaskState;
|
||||
import com.rzyc.model.OADistribution;
|
||||
import com.rzyc.model.OATask;
|
||||
import com.rzyc.model.OaTaskUser;
|
||||
import com.rzyc.model.TaskRecord;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
|
|
@ -57,8 +55,10 @@ public class AppletsTaskController extends BaseController{
|
|||
public MultiResult<WorkPriorityVo> workList(@Valid WorkDto workDto){
|
||||
MultiResult<WorkPriorityVo> result = new MultiResult<>();
|
||||
List<WorkPriorityVo> workList = oaTaskMapper.workList(workDto);
|
||||
int finishNum = oaDistributionMapper.countNum(workDto.getTaskTypeId());
|
||||
|
||||
for (WorkPriorityVo priorityVo : workList) {
|
||||
String oaDistributionId = priorityVo.getOADistributionId();
|
||||
int finishNum = taskRecordMapper.countNum(oaDistributionId);
|
||||
priorityVo.setFinishNum(finishNum);
|
||||
}
|
||||
result.setData(workList);
|
||||
|
|
@ -76,35 +76,34 @@ public class AppletsTaskController extends BaseController{
|
|||
@MethodAnnotation(authorizations = {"addExecute","addExecute:update"},name = "工作要务列表")
|
||||
public SingleResult<String> addExecute(@Valid PerRecordDto perRecordDto) throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
OADistribution oaDistribution = new OADistribution();
|
||||
BeanUtils.copyProperties(oaDistribution,perRecordDto);
|
||||
TaskRecord taskRecord = new TaskRecord();
|
||||
BeanUtils.copyProperties(taskRecord,perRecordDto);
|
||||
//日期格式转换
|
||||
ConvertUtils.register(new DateConverter(null), Date.class);
|
||||
|
||||
OATask oaTask = oaTaskMapper.findById(perRecordDto.getOataskid());
|
||||
System.out.println("任务 ========" + oaTask);
|
||||
OADistribution oaDistribution = oaDistributionMapper.selectByPrimaryKey(perRecordDto.getOADistributionId());
|
||||
System.out.println("任务 ========" + oaDistribution);
|
||||
|
||||
if(null == oaTask){
|
||||
if(null == oaDistribution){
|
||||
result.setCode(0);
|
||||
result.setMessage("未知任务");
|
||||
return result;
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(perRecordDto.getOadistributionid())){
|
||||
oaDistribution.setOadistributionid(RandomNumber.getUUid());
|
||||
oaDistribution.setCreatedby(getUserId());
|
||||
oaDistribution.setCreatedon(new Date());
|
||||
oaDistributionMapper.insert(oaDistribution);
|
||||
System.out.println("插入的数据===" + oaDistribution);
|
||||
if(StringUtils.isBlank(perRecordDto.getRecordId())){
|
||||
taskRecord.setRecordId(RandomNumber.getUUid());
|
||||
taskRecord.setOADistributionId(taskRecord.getOADistributionId());
|
||||
taskRecord.setCreateBy(getUserId());
|
||||
taskRecord.setCreateTime(new Date());
|
||||
taskRecordMapper.insert(taskRecord);
|
||||
System.err.println("插入的数据===" + taskRecord);
|
||||
}else {
|
||||
oaDistribution.setModifiedby(getUserId());
|
||||
oaDistribution.setModifiedon(new Date());
|
||||
oaDistributionMapper.updateById(oaDistribution);
|
||||
System.out.println("修改的数据===" + oaDistribution);
|
||||
taskRecord.setModfiyBy(getUserId());
|
||||
taskRecord.setModfiyTime(new Date());
|
||||
taskRecordMapper.updateById(taskRecord);
|
||||
System.err.println("修改的数据===" + taskRecord);
|
||||
}
|
||||
|
||||
oaTask.setAppstatus(TaskState.FINISH.getState());
|
||||
oaTaskMapper.updateById(oaTask);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -115,14 +114,14 @@ public class AppletsTaskController extends BaseController{
|
|||
*/
|
||||
@ApiOperation(value = "履职记录列表",position = 3)
|
||||
@ApiImplicitParams(value = {
|
||||
@ApiImplicitParam(name = "id",value = "任务1id")
|
||||
@ApiImplicitParam(name = "id",value = "任务接收id")
|
||||
})
|
||||
@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());
|
||||
List<PerformanceVo> preList = taskRecordMapper.preList(idDto.getId());
|
||||
result.setData(preList);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -150,12 +149,21 @@ public class AppletsTaskController extends BaseController{
|
|||
*/
|
||||
@ApiOperation(value = "专项工作任务详情",position = 12)
|
||||
@GetMapping("singleWorkDetail")
|
||||
@ApiImplicitParams(value = {
|
||||
@ApiImplicitParam(name = "id",value = "任务接收id")
|
||||
})
|
||||
@PreAuthorize("hasAnyAuthority('singleWorkDetail','singleWorkDetail:update')")
|
||||
@MethodAnnotation(authorizations = {"singleWorkDetail","singleWorkDetail:update"},name = "工作要务列表")
|
||||
public SingleResult<SingleWorkVo> singleWorkDetail(@Valid WorkDetailDto workDetailDto){
|
||||
public SingleResult<SingleWorkVo> singleWorkDetail(@Valid IdDto idDto){
|
||||
SingleResult<SingleWorkVo> result = new SingleResult();
|
||||
SingleWorkVo specialWorkVos = oaTaskMapper.singleWorkDetail(workDetailDto);
|
||||
OADistribution oaDistribution = oaDistributionMapper.selectByPrimaryKey(idDto.getId());
|
||||
String sendUser = oaDistribution.getSysuserid();
|
||||
SysUser user = sysUserMapper.selectUser(sendUser);
|
||||
|
||||
SingleWorkVo specialWorkVos = oaDistributionMapper.singleWorkDetail(idDto);
|
||||
specialWorkVos.setSendName(user.getSysusername());
|
||||
result.setData(specialWorkVos);
|
||||
System.err.println("任务详情========" + specialWorkVos);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -194,67 +202,22 @@ public class AppletsTaskController extends BaseController{
|
|||
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)
|
||||
@ApiOperation(value = "参与人员姓名显示",position = 14)
|
||||
@GetMapping("nameList")
|
||||
@PreAuthorize("hasAnyAuthority('nameList','nameList:update')")
|
||||
@MethodAnnotation(authorizations = {"nameList","nameList:update"},name = "参与人员姓名显示")
|
||||
public MultiResult<NameVo> nameList(@Valid IdDto idDto){
|
||||
public MultiResult<NameVo> nameList(@Valid NameDto nameDto){
|
||||
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();
|
||||
}
|
||||
}*//*
|
||||
|
||||
List<NameVo> nameVoList = oaDistributionMapper.selectName(nameDto);
|
||||
System.err.println("输出====" + nameVoList);
|
||||
result.setData(nameVoList);
|
||||
return result;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -461,6 +461,9 @@ public class BaseController {
|
|||
@Autowired
|
||||
protected OaTaskUserMapper oaTaskUserMapper;
|
||||
|
||||
//任务记录
|
||||
@Autowired
|
||||
protected TaskRecordMapper taskRecordMapper;
|
||||
/**
|
||||
* 岗位不需要的字符串
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ public class WorkController extends BaseController{
|
|||
|
||||
if(StringUtils.isBlank(addTaskDto.getOataskid())){
|
||||
oaTask.setOataskid(RandomNumber.getUUid());
|
||||
oaTask.setAppstatus("1");
|
||||
oaTask.setCreatedby(getUserId());
|
||||
oaTask.setCreatedon(new Date());
|
||||
oaTaskMapper.insertTask(oaTask);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user