Commit cbcd53db authored by W_Y's avatar W_Y

修改创建体系审查任务

parent 9e6848ee
...@@ -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);
} }
...@@ -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);
} }
...@@ -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);
......
...@@ -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>
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