优化查询

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) @ApiModelProperty(value = "任务内容",required = true)
private String subject; 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() { public String getOataskid() {
return oataskid; return oataskid;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -418,7 +418,7 @@
SysPercent, SysPercent,
StartDate, EndDate, PlanEndDate, StartDate, EndDate, PlanEndDate,
AppStatus,title, Subject, Frequency, AppStatus,title, Subject, Frequency,
IsFinish, del_state, IsFinish, del_state,file,
CreatedOn, CreatedBy, CreatedOn, CreatedBy,
ModifiedOn, ModifiedBy ModifiedOn, ModifiedBy
) )
@ -433,7 +433,7 @@
#{oaTask.title,jdbcType=VARCHAR}, #{oaTask.title,jdbcType=VARCHAR},
#{oaTask.subject,jdbcType=VARCHAR}, #{oaTask.subject,jdbcType=VARCHAR},
#{oaTask.frequency,jdbcType=BIGINT}, #{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.delState,jdbcType=VARCHAR},#{oaTask.createdon,jdbcType=TIMESTAMP}, #{oaTask.createdby,jdbcType=VARCHAR},
#{oaTask.modifiedon,jdbcType=TIMESTAMP}, #{oaTask.modifiedby,jdbcType=VARCHAR} #{oaTask.modifiedon,jdbcType=TIMESTAMP}, #{oaTask.modifiedby,jdbcType=VARCHAR}
) )
@ -447,7 +447,8 @@
on od.OATaskId = ot.OATaskId on od.OATaskId = ot.OATaskId
join sysuser u on ot.send_id = u.SysUserId join sysuser u on ot.send_id = u.SysUserId
join oa_task_type ty on ot.TaskType = ty.type_id 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 order by ot.EndDate asc
</select> </select>
@ -513,6 +514,7 @@
<result column="EndDate" property="enddate"/> <result column="EndDate" property="enddate"/>
<result column="remark" property="remark"/> <result column="remark" property="remark"/>
<result column="content" property="content"/> <result column="content" property="content"/>
<result column="taskState" property="taskState"/>
<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"/>
@ -531,7 +533,7 @@
</resultMap> </resultMap>
<!--收到任务详情--> <!--收到任务详情-->
<select id="selectReceive" resultMap="ReceiveTail"> <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 from OADistribution od
join OATask ot join OATask ot
on ot.oataskid = od.oataskid on ot.oataskid = od.oataskid
@ -612,7 +614,7 @@
ot.user_id = #{OATask.userId},ot.SysPercent = #{OATask.syspercent},ot.StartDate = #{OATask.startdate}, 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.EndDate = #{OATask.enddate},ot.PlanEndDate = #{OATask.planenddate},ot.AppStatus = #{OATask.appstatus},
ot.title = #{OATask.title},ot.Subject = #{OATask.subject},ot.Frequency = #{OATask.frequency}, 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} ot.CreatedOn = #{OATask.createdon},ot.CreatedBy = #{OATask.createdby},ot.ModifiedOn = #{OATask.modifiedon},ot.ModifiedBy = #{OATask.modifiedby}
where ot.OATaskId = #{OATask.oataskid} where ot.OATaskId = #{OATask.oataskid}
</update> </update>

View File

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