Commit cbcd53db authored by W_Y's avatar W_Y

修改创建体系审查任务

parent 9e6848ee
......@@ -13,4 +13,7 @@ public interface StandardMapper extends BaseMapper<Standard> {
// 分页查询
List<Standard> findList(@Param("params") StandardListRequest request);
// 根据id查询
Standard findListById(@Param("id") Long Id);
}
......@@ -13,4 +13,7 @@ public interface StandardService extends IService<Standard> {
// 分页查询
List<Standard> findList(StandardListRequest request);
//根据id查询
Standard findListById(Long id);
}
......@@ -25,4 +25,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
public List<Standard> findList(StandardListRequest 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
@Autowired
private ISysUserService sysUserService;
@Autowired
private StandardService standardService;
@Override
public void createTaskTest(SystemReviewTaskCreateRequest request) {
......@@ -49,6 +52,7 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
// 构建任务创建者
LoginUser loginUser = SecurityUtils.getLoginUser();
SysUser initiator = sysUserService.selectUserById(loginUser.getUserId());
Standard standard = standardService.findListById(request.getStandardId());
// 找到审查组长
SystemReviewTaskUserRelation leader = null;
......@@ -69,7 +73,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
.setBizInfo(request.getBizInfo())
.setLeaderId(leader.getUserId())
.setLeader(leader.getName())
.setCreateTime(new Date());
.setCreateTime(new Date())
.setStandardId(standard.getId())
.setName(standard.getName())
.setStandardNo(standard.getStandardNo())
.setFile(standard.getFile());
systemReviewTaskService.save(task);
......
......@@ -24,4 +24,9 @@
</where>
</select>
<select id="findListById" resultMap="BaseResultMap">
SELECT id, name, standard_no, file
FROM t_standard WHERE id = #{id}
</select>
</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