优化查询

This commit is contained in:
zhengqiaowen 2022-11-23 13:40:07 +08:00
parent cc27b45249
commit 6f1e42009f
8 changed files with 57 additions and 10 deletions

View File

@ -63,6 +63,17 @@ public class AddTaskDto {
@ApiModelProperty(value = "任务内容",required = true)
private String subject;
@TableField("file")
@ApiModelProperty("文件地址")
private String file;
public String getFile() {
return file;
}
public void setFile(String file) {
this.file = file;
}
public String getOataskid() {
return oataskid;

View File

@ -15,7 +15,7 @@ public class DeliverDto {
@ApiModelProperty(value = "任务id",required = true)
private String OATaskId;
@ApiModelProperty(value = "发送人id",required = true)
@ApiModelProperty(value = "发送人id",required = false)
private String send_id;
public String getOATaskId() {

View File

@ -43,6 +43,8 @@ public class ReceiveTaskVo {
@ApiModelProperty("任务要求")
private String content;
@ApiModelProperty("1、未执行 2、执行中 3、执行完成")
private String taskState;
@ApiModelProperty("任务接收人完成情况")
private OADistributionVo oaDistributionVo;
@ -52,6 +54,14 @@ public class ReceiveTaskVo {
return oaDistributionVo;
}
public String getTaskState() {
return taskState;
}
public void setTaskState(String taskState) {
this.taskState = taskState;
}
public void setOaDistributionVo(OADistributionVo oaDistributionVo) {
this.oaDistributionVo = oaDistributionVo;
}

View File

@ -75,6 +75,10 @@ public class OADistribution implements Serializable {
@TableField("AppStatus")
private String appstatus;
@TableField("file")
@ApiModelProperty("文件地址")
private String file;
@ApiModelProperty("创建时间")
@TableField("CreatedOn")
private Date createdon;
@ -94,6 +98,14 @@ public class OADistribution implements Serializable {
private static final long serialVersionUID = 1L;
public String getFile() {
return file;
}
public void setFile(String file) {
this.file = file;
}
public Date getFlowTime() {
return flowTime;
}

View File

@ -96,6 +96,9 @@ public class OATask implements Serializable {
@ApiModelProperty("任务完成状态")
private String isfinish;
@TableField("file")
@ApiModelProperty("文件地址")
private String file;
@TableField("CreatedOn")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@ -159,6 +162,15 @@ public class OATask implements Serializable {
@ApiModelProperty("任务接收人")
private List<OADistribution> distributions = new ArrayList<>();
public String getFile() {
return file;
}
public void setFile(String file) {
this.file = file;
}
public String getUserId() {
return userId;
}

View File

@ -167,7 +167,7 @@
<!--批量添加-->
<insert id="insertList" parameterType="com.rzyc.model.check.ChkGovBillDetailWithBLOBs">
insert into OADistribution (OADistributionId, OATaskId, SysUserId,
SysChinaName, SysTelephone, title,subject,flow_time,flow_state,start_time,end_time,AppStatus,
SysChinaName, SysTelephone, title,subject,flow_time,flow_state,start_time,end_time,AppStatus,file
CreatedOn, CreatedBy, ModifiedOn,
ModifiedBy)
values
@ -175,7 +175,7 @@
(#{record.oadistributionid,jdbcType=VARCHAR}, #{record.oataskid,jdbcType=VARCHAR},
#{record.sysuserid,jdbcType=VARCHAR},
#{record.syschinaname,jdbcType=VARCHAR}, #{record.systelephone,jdbcType=VARCHAR}, #{record.title},#{record,subject},
#{record.flowTime},#{record.flowState},#{record.startTime},#{record.endTime},#{record.appstatus,jdbcType=VARCHAR},
#{record.flowTime},#{record.flowState},#{record.startTime},#{record.endTime},#{record.appstatus,jdbcType=VARCHAR},#{record.file},
#{record.createdon,jdbcType=TIMESTAMP}, #{record.createdby,jdbcType=VARCHAR},
#{record.modifiedon,jdbcType=TIMESTAMP},
#{record.modifiedby,jdbcType=VARCHAR})
@ -322,7 +322,7 @@
from OADistribution od
join sysuser su
on od.SysUserId = su.SysUserId
where od.sned_id = #{deliverDto.send_id} and od.OATaskId = #{deliverDto.OATaskId}
where od.OATaskId = #{deliverDto.OATaskId}
</select>
<!--查询任务参与人姓名-->

View File

@ -418,7 +418,7 @@
SysPercent,
StartDate, EndDate, PlanEndDate,
AppStatus,title, Subject, Frequency,
IsFinish, del_state,
IsFinish, del_state,file,
CreatedOn, CreatedBy,
ModifiedOn, ModifiedBy
)
@ -433,7 +433,7 @@
#{oaTask.title,jdbcType=VARCHAR},
#{oaTask.subject,jdbcType=VARCHAR},
#{oaTask.frequency,jdbcType=BIGINT},
#{oaTask.isfinish,jdbcType=VARCHAR},
#{oaTask.isfinish,jdbcType=VARCHAR},#{oaTask.file},
#{oaTask.delState,jdbcType=VARCHAR},#{oaTask.createdon,jdbcType=TIMESTAMP}, #{oaTask.createdby,jdbcType=VARCHAR},
#{oaTask.modifiedon,jdbcType=TIMESTAMP}, #{oaTask.modifiedby,jdbcType=VARCHAR}
)
@ -447,7 +447,8 @@
on od.OATaskId = ot.OATaskId
join sysuser u on ot.send_id = u.SysUserId
join oa_task_type ty on ot.TaskType = ty.type_id
where ot.subject like #{condition} and od.sned_id = #{sendId}
where ot.subject like #{condition} and ot.send_id = #{sendId}
GROUP BY ot.OATaskId
order by ot.EndDate asc
</select>
@ -513,6 +514,7 @@
<result column="EndDate" property="enddate"/>
<result column="remark" property="remark"/>
<result column="content" property="content"/>
<result column="taskState" property="taskState"/>
<association property="oaDistributionVo" javaType="com.rzyc.bean.task.vo.OADistributionVo">
<id column="OADistributionId" property="oadistributionid"/>
<result column="OATaskId" property="oataskid"/>
@ -531,7 +533,7 @@
</resultMap>
<!--收到任务详情-->
<select id="selectReceive" resultMap="ReceiveTail">
select ot.oataskid,ot.title as remark,ot.subject as content,ot.startdate,ot.enddate,od.*
select ot.oataskid,ot.title as remark,ot.subject as content,ot.startdate,ot.enddate,ot.AppStatus as taskState,od.*
from OADistribution od
join OATask ot
on ot.oataskid = od.oataskid
@ -612,7 +614,7 @@
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.IsFinish = #{OATask.isfinish},ot.del_state = #{OATask.delState},ot.file = #{OATask.file},
ot.CreatedOn = #{OATask.createdon},ot.CreatedBy = #{OATask.createdby},ot.ModifiedOn = #{OATask.modifiedon},ot.ModifiedBy = #{OATask.modifiedby}
where ot.OATaskId = #{OATask.oataskid}
</update>

View File

@ -36,7 +36,7 @@ import java.util.List;
* @CreateTime: 2022/10/20 9:37
*/
@Api(tags = "小程序待办事项")
@Api(tags = "政府端小程序待办事项")
@CrossOrigin("*")
@RequestMapping("applets")
@RestController