Commit a0c2da41 authored by 盖献康's avatar 盖献康

Merge branch 'dev' of...

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wangfei/vehicle-quality-review into gaixiankang
parents f6fd3269 e200ebf3
...@@ -13,4 +13,7 @@ public interface StandardMapper extends BaseMapper<Standard> { ...@@ -13,4 +13,7 @@ public interface StandardMapper extends BaseMapper<Standard> {
// 分页查询 // 分页查询
List<Standard> findList(@Param("params") StandardListRequest request); List<Standard> findList(@Param("params") StandardListRequest request);
// 根据id查询
Standard findListById(@Param("id") Long Id);
} }
...@@ -10,4 +10,7 @@ import java.util.List; ...@@ -10,4 +10,7 @@ import java.util.List;
@Repository @Repository
public interface SystemReviewTaskMapper extends BaseMapper<SystemReviewTask> { public interface SystemReviewTaskMapper extends BaseMapper<SystemReviewTask> {
List<SystemReviewTask> findListByStatus(@Param("status") String status); List<SystemReviewTask> findListByStatus(@Param("status") String status);
// 查询处理中的任务
List<SystemReviewTask> findListInProcess();
} }
...@@ -13,4 +13,7 @@ public interface StandardService extends IService<Standard> { ...@@ -13,4 +13,7 @@ public interface StandardService extends IService<Standard> {
// 分页查询 // 分页查询
List<Standard> findList(StandardListRequest request); List<Standard> findList(StandardListRequest request);
//根据id查询
Standard findListById(Long id);
} }
...@@ -40,4 +40,10 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> { ...@@ -40,4 +40,10 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> {
*/ */
List<SystemReviewTask> findListByStatus(String status); List<SystemReviewTask> findListByStatus(String status);
/**
* 查询处理中的任务
* @return
*/
List<SystemReviewTask> findListInProcess();
} }
...@@ -25,4 +25,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i ...@@ -25,4 +25,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
public List<Standard> findList(StandardListRequest request) { public List<Standard> findList(StandardListRequest request) {
return standardMapper.findList(request); return standardMapper.findList(request);
} }
/**
* 根据id查询
* @param id
* @return
*/
@Override
public Standard findListById(Long id) {
return standardMapper.findListById(id);
}
} }
...@@ -42,6 +42,9 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap ...@@ -42,6 +42,9 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired
private StandardService standardService;
@Override @Override
public void createTaskTest(SystemReviewTaskCreateRequest request) { public void createTaskTest(SystemReviewTaskCreateRequest request) {
...@@ -49,6 +52,7 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap ...@@ -49,6 +52,7 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
// 构建任务创建者 // 构建任务创建者
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
SysUser initiator = sysUserService.selectUserById(loginUser.getUserId()); SysUser initiator = sysUserService.selectUserById(loginUser.getUserId());
Standard standard = standardService.findListById(request.getStandardId());
// 找到审查组长 // 找到审查组长
SystemReviewTaskUserRelation leader = null; SystemReviewTaskUserRelation leader = null;
...@@ -69,7 +73,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap ...@@ -69,7 +73,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
.setBizInfo(request.getBizInfo()) .setBizInfo(request.getBizInfo())
.setLeaderId(leader.getUserId()) .setLeaderId(leader.getUserId())
.setLeader(leader.getName()) .setLeader(leader.getName())
.setCreateTime(new Date()); .setCreateTime(new Date())
.setStandardId(standard.getId())
.setName(standard.getName())
.setStandardNo(standard.getStandardNo())
.setFile(standard.getFile());
systemReviewTaskService.save(task); systemReviewTaskService.save(task);
...@@ -98,6 +106,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap ...@@ -98,6 +106,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
return systemReviewTaskMapper.findListByStatus(status); return systemReviewTaskMapper.findListByStatus(status);
} }
@Override
public List<SystemReviewTask> findListInProcess() {
return systemReviewTaskMapper.findListInProcess();
}
} }
......
...@@ -4,11 +4,11 @@ import com.ruoyi.common.annotation.Log; ...@@ -4,11 +4,11 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.service.SystemReviewTaskService; import com.ruoyi.service.SystemReviewTaskService;
import com.ruoyi.web.request.SystemReviewTaskCreateRequest; import com.ruoyi.web.request.*;
import com.ruoyi.web.request.SystemReviewTaskStartRequest;
import com.ruoyi.web.request.SystemReviewTaskViewRequest;
import com.ruoyi.web.response.SystemReviewTaskViewResponse; import com.ruoyi.web.response.SystemReviewTaskViewResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -22,6 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -22,6 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@Api("体系审查任务") @Api("体系审查任务")
@RestController @RestController
@RequestMapping("/system/review/task") @RequestMapping("/system/review/task")
...@@ -57,4 +60,22 @@ public class SystemReviewTaskController extends BaseController { ...@@ -57,4 +60,22 @@ public class SystemReviewTaskController extends BaseController {
systemReviewTaskService.start(request); systemReviewTaskService.start(request);
return R.ok(); return R.ok();
} }
@ApiOperation("查询处理中的任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findInProcess")
public TableDataInfo<SystemReviewTask> findInProcess(@Validated @RequestBody SystemReviewTaskFindInProcessRequest request) {
startPage(request);
return getDataTable(systemReviewTaskService.findListInProcess());
}
@ApiOperation("查询处理完成的任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findInFinish")
public TableDataInfo<SystemReviewTask> findInFinish(@Validated @RequestBody SystemReviewTaskFindFinishRequest request) {
startPage(request);
return getDataTable(systemReviewTaskService.findListByStatus(SystemReviewTask.STATUS_FINISH));
}
} }
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
@ApiModel
public class SystemReviewTaskFindFinishRequest extends PageDomain {
}
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
@ApiModel
public class SystemReviewTaskFindInProcessRequest extends PageDomain {
}
...@@ -24,4 +24,9 @@ ...@@ -24,4 +24,9 @@
</where> </where>
</select> </select>
<select id="findListById" resultMap="BaseResultMap">
SELECT id, name, standard_no, file
FROM t_standard WHERE id = #{id}
</select>
</mapper> </mapper>
...@@ -25,6 +25,13 @@ ...@@ -25,6 +25,13 @@
<select id="findListByStatus" resultMap="BaseResultMap"> <select id="findListByStatus" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time, standard_id, name, standard_no, file SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time, standard_id, name, standard_no, file
FROM t_system_review_task WHERE task_status = #{status} FROM t_system_review_task WHERE task_status = #{status}
ORDER BY create_time DESC
</select>
<select id="findListInProcess" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time, standard_id, name, standard_no, file
FROM t_system_review_task WHERE task_status IN ('NEW','PENDING')
ORDER BY create_time DESC
</select> </select>
</mapper> </mapper>
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