| | |
| | | <mapper namespace="org.springblade.modules.task.mapper.TaskMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="taskResultMap" type="org.springblade.modules.task.entity.Task"> |
| | | <resultMap id="taskResultMap" type="org.springblade.modules.task.vo.TaskVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | |
| | | <result column="remark" property="remark"/> |
| | | <result column="tp" property="tp"/> |
| | | <result column="farm" property="farm"/> |
| | | <result column="landname" property="landname"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectTaskPage" resultMap="taskResultMap"> |
| | | select * from sys_task where is_deleted = 0 |
| | | select t.*, l.land_name as landname,f.agricultural_name as argname, |
| | | u.real_name as reaname |
| | | from sys_task t |
| | | LEFT JOIN sys_land l ON t.land_id = l.id |
| | | LEFT JOIN sys_stockfactory f ON f.id=t.stock_id |
| | | LEFT JOIN blade_user u ON u.id=t.task_user |
| | | where t.is_deleted = 0 |
| | | <if test="task.status!=null and task.status!=''"> |
| | | and t.status=#{task.status} |
| | | </if> |
| | | <if test="task.taskUser!=null and task.taskUser!=''"> |
| | | and t.create_user=#{task.taskUser} |
| | | </if> |
| | | <if test="task.createUser!=null and task.createUser!=''"> |
| | | and t.create_user=#{task.createUser} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--统计待处理任务数量--> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) |
| | | FROM `sys_task` |
| | | WHERE status = 2 |
| | | AND is_deleted = 0 |
| | | AND task_user = #{taskuser} |
| | | </select> |
| | | </mapper> |