Commit d9d4cea9 authored by 耿迪迪's avatar 耿迪迪

工业安检单

parent b2c1ee2b
......@@ -180,4 +180,20 @@ public class TTaskController extends BaseController
public AjaxResult taskInspectDangerDetailInfo(Long taskId){
return AjaxResult.success(tTaskService.taskInspectDangerDetailInfo(taskId));
}
/**
* 根据任务类型获取最新任务
* @param type 任务类型
* @param checkType 工业安检类型
* @param taskType 居民用户安检类型
* @return
*/
@GetMapping("/selectTaskByType")
public AjaxResult selectCurrentTaskByType(@RequestParam(value="type") Integer type,@RequestParam(value="checkType",required = false) Integer checkType,@RequestParam(value="taskType",required = false) Integer taskType){
Map<String,Object> param = new HashMap<>();
param.put("type",type);
param.put("checkType",checkType);
param.put("taskType",taskType);
return AjaxResult.success(tTaskService.selectTaskByType(param));
}
}
......@@ -102,4 +102,11 @@ public interface TTaskMapper
* @return int
*/
int taskIsHasInspect (Long taskId);
/**
* 根据任务类型获取任务
* @param param 参数
* @return
*/
List<TTask> selectTaskByType(Map<String,Object> param);
}
......@@ -95,4 +95,11 @@ public interface ITTaskService
* @return
*/
Map<String,Object> taskInspectDangerDetailInfo(Long taskId);
/**
* 根据任务类型获取最新任务
* @param param 参数
* @return
*/
List<TTask> selectTaskByType(Map<String,Object> param);
}
......@@ -205,4 +205,15 @@ public class TTaskServiceImpl implements ITTaskService
}
/**
* 根据任务类型获取最新任务
* @param param 参数
* @return
*/
@Override
public List<TTask> selectTaskByType(Map<String,Object> param){
return tTaskMapper.selectCurrentTaskByType(param);
}
}
......@@ -168,6 +168,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY task.id
ORDER BY create_time DESC
</select>
<select id="selectTaskByType" parameterType="Map" resultMap="TTaskResult">
SELECT
task.id,
task.title,
task.`describe`,
task.type,
task.check_type,
task.start_time,
task.end_time,
task. STATUS,
task.admin_id,
task.create_time,
task.remarks,
us.nick_name AS nickname
FROM
t_task task
LEFT JOIN sys_user us ON us.user_id = task.admin_id
<where>
task.status = 0
<if test="type != null">AND task.type = #{ type }</if>
<if test="checkType != null">AND task.check_type = #{ checkType }</if>
<if test="taskType != null and taskType != ''">AND task.task_type = #{ taskType }</if>
</where>
ORDER BY create_time DESC
</select>
<select id="selecttasknums" parameterType="TTask" resultMap="TTaskResult">
SELECT
t.*,p.`receive_id`,
......
......@@ -388,10 +388,10 @@ export default {
// 是否显示弹出层
open: false,
typeOptions: [
{
/*{
id: 1,
name: "月度巡检",
},
},*/
{
id: 2,
name: "季度巡检",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment