Commit eed88514 authored by yf's avatar yf

Merge branch 'develop' of http://git.censoft.com.cn/rongtong/ruoyi-vue-master into dev-yf

parents d3381f8e 99caf090
......@@ -533,4 +533,19 @@ public class RiskPlanAppController extends BaseController {
public R<RiskAssessmentMatrixLevel> getRiskAssessmentMatrixLevelByScore(@PathVariable BigDecimal score) {
return R.ok(riskAssessmentMatrixLevelService.getRiskAssessmentMatrixLevelByScore(score));
}
/**
* 任务台账列表
*
* @real_return {@link R<List<RiskPlanAppListDto>>}
*/
@GetMapping("/details/list")
public R<List<RiskPlanAppListDto>> getRiskPlanAppListDtoListByCreateUserDeptId() {
Long deptId = getLoginUser().getDeptId();
List<RiskPlanAppListDto> list = riskPlanService.getRiskPlanAppListDtoListByCreateUserDeptId(deptId);
list.forEach(dto->{
dto.setState(RiskPlanStatusType.getTitleByStatus(dto.getStatus()).getTitle());
});
return R.ok(list);
}
}
......@@ -77,4 +77,6 @@ public interface RiskPlanMapper
List<RiskPlanAppApproveListDto> getApproveListDtoByPlanId(@Param("planId") Long planId);
List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(@Param("userId") Long userId,@Param("status") String status);
List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(@Param("deptId") Long deptId);
}
......@@ -79,4 +79,6 @@ public interface IRiskPlanService
int revokeByPlanId(Long planId, Long userId);
List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status);
List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(Long deptId);
}
......@@ -342,6 +342,11 @@ public class RiskPlanServiceImpl implements IRiskPlanService {
}).collect(Collectors.toList());
}
@Override
public List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(Long deptId) {
return riskPlanMapper.getRiskPlanAppListDtoListByCreateUserDeptId(deptId);
}
private String getNo() {
Random random = new Random();
int randomNumber = random.nextInt(1000); // 生成0到999之间的随机数
......
......@@ -204,6 +204,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY
rp.start_time DESC
</select>
<select id="getRiskPlanAppListDtoListByCreateUserDeptId"
resultType="com.censoft.censoftrongtong.domain.dto.RiskPlanAppListDto">
SELECT
rp.id,
rp.`name`,
rp.start_time AS startTime,
rp.`status`,
su.nick_name AS leaderUserName
FROM
risk_plan rp
LEFT JOIN sys_user su ON su.user_id = rp.leader_user_id
LEFT JOIN risk_plan_task rpt ON rpt.plan_id = rp.id
GROUP BY
rp.id
ORDER BY
rp.start_time DESC
</select>
<insert id="insertRiskPlan" parameterType="com.censoft.censoftrongtong.domain.RiskPlan" useGeneratedKeys="true" keyProperty="id">
insert into risk_plan
......
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