Commit 9e66aac8 authored by yf's avatar yf

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

parents f5e94b27 049b0d3f
...@@ -7,8 +7,10 @@ import com.censoft.censoftrongtong.service.*; ...@@ -7,8 +7,10 @@ import com.censoft.censoftrongtong.service.*;
import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysDictDataService; import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ISysUploadFileService; import com.ruoyi.system.service.ISysUploadFileService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -35,6 +37,9 @@ import java.util.stream.Collectors; ...@@ -35,6 +37,9 @@ import java.util.stream.Collectors;
@RequestMapping("/app-api/risk/plan") @RequestMapping("/app-api/risk/plan")
public class RiskPlanAppController extends BaseController { public class RiskPlanAppController extends BaseController {
@Resource
private ISysDeptService sysDeptService;
@Resource @Resource
private ILedgerProjectService ledgerProjectService; private ILedgerProjectService ledgerProjectService;
...@@ -107,14 +112,24 @@ public class RiskPlanAppController extends BaseController { ...@@ -107,14 +112,24 @@ public class RiskPlanAppController extends BaseController {
} }
/** /**
* 获取项目下的人员 * 获取全部组织机构列表
* *
* @param projectId 项目id * @real_return {@link R<List<SysDept>>}
*/
@GetMapping("/dept/list")
public R<List<SysDept>> getDeptList() {
return R.ok(sysDeptService.selectDeptList(new SysDept()));
}
/**
* 获取组织机构下的人员
*
* @param deptId 组织机构id
* @real_return {@link R<List<SysUser>>} * @real_return {@link R<List<SysUser>>}
*/ */
@GetMapping("/user/list/{projectId}") @GetMapping("/user/list/{deptId}")
public R<List<SysUser>> getUserListByProjectId(@PathVariable("projectId") Long projectId) { public R<List<SysUser>> getUserListByProjectId(@PathVariable("deptId") Long deptId) {
return R.ok(ledgerProjectService.getUserListByProjectId(projectId)); return R.ok(ledgerProjectService.getUserListByDeptId(deptId));
} }
/** /**
...@@ -125,6 +140,7 @@ public class RiskPlanAppController extends BaseController { ...@@ -125,6 +140,7 @@ public class RiskPlanAppController extends BaseController {
*/ */
@PostMapping() @PostMapping()
public R<Integer> saveRiskPlan(@RequestBody RiskPlan riskPlan) { public R<Integer> saveRiskPlan(@RequestBody RiskPlan riskPlan) {
riskPlan.setApproveUserId(getUserId());
riskPlan.setCreateUserId(getUserId()); riskPlan.setCreateUserId(getUserId());
riskPlan.setCreateDeptId(getDeptId()); riskPlan.setCreateDeptId(getDeptId());
return R.ok(riskPlanService.saveRiskPlan(riskPlan)); return R.ok(riskPlanService.saveRiskPlan(riskPlan));
...@@ -144,7 +160,7 @@ public class RiskPlanAppController extends BaseController { ...@@ -144,7 +160,7 @@ public class RiskPlanAppController extends BaseController {
statusList = Arrays.asList(RiskPlanStatusType.CREATE_TASK,RiskPlanStatusType.WAIT_START); statusList = Arrays.asList(RiskPlanStatusType.CREATE_TASK,RiskPlanStatusType.WAIT_START);
state = "待执行"; state = "待执行";
} else if ("running".equals(status)) { } else if ("running".equals(status)) {
statusList = Arrays.asList(RiskPlanStatusType.RUNNING,RiskPlanStatusType.WAIT_RETURN); statusList = Arrays.asList(RiskPlanStatusType.RUNNING,RiskPlanStatusType.WAIT_RETURN,RiskPlanStatusType.WAIT_LEADER_RETURN);
state = "执行中"; state = "执行中";
} else if ("finish".equals(status)) { } else if ("finish".equals(status)) {
statusList = Arrays.asList(RiskPlanStatusType.WAIT_LEADER_APPROVE,RiskPlanStatusType.WAIT_APPROVE statusList = Arrays.asList(RiskPlanStatusType.WAIT_LEADER_APPROVE,RiskPlanStatusType.WAIT_APPROVE
...@@ -173,7 +189,7 @@ public class RiskPlanAppController extends BaseController { ...@@ -173,7 +189,7 @@ public class RiskPlanAppController extends BaseController {
statusList = Arrays.asList(RiskPlanStatusType.CREATE_TASK,RiskPlanStatusType.WAIT_START); statusList = Arrays.asList(RiskPlanStatusType.CREATE_TASK,RiskPlanStatusType.WAIT_START);
state = "待评估"; state = "待评估";
} else if ("running".equals(status)) { } else if ("running".equals(status)) {
statusList = Arrays.asList(RiskPlanStatusType.RUNNING,RiskPlanStatusType.WAIT_RETURN); statusList = Arrays.asList(RiskPlanStatusType.RUNNING,RiskPlanStatusType.WAIT_RETURN,RiskPlanStatusType.WAIT_LEADER_RETURN);
state = "执行中"; state = "执行中";
} else if ("finish".equals(status)) { } else if ("finish".equals(status)) {
statusList = Arrays.asList(RiskPlanStatusType.WAIT_LEADER_APPROVE,RiskPlanStatusType.WAIT_APPROVE statusList = Arrays.asList(RiskPlanStatusType.WAIT_LEADER_APPROVE,RiskPlanStatusType.WAIT_APPROVE
...@@ -216,7 +232,7 @@ public class RiskPlanAppController extends BaseController { ...@@ -216,7 +232,7 @@ public class RiskPlanAppController extends BaseController {
statusList = Arrays.asList(RiskPlanStatusType.CREATE_TASK,RiskPlanStatusType.WAIT_START,RiskPlanStatusType.RUNNING); statusList = Arrays.asList(RiskPlanStatusType.CREATE_TASK,RiskPlanStatusType.WAIT_START,RiskPlanStatusType.RUNNING);
state = "待执行"; state = "待执行";
} else if ("finish".equals(status)) { } else if ("finish".equals(status)) {
statusList = Arrays.asList(RiskPlanStatusType.WAIT_LEADER_APPROVE,RiskPlanStatusType.WAIT_APPROVE statusList = Arrays.asList(RiskPlanStatusType.WAIT_LEADER_APPROVE,RiskPlanStatusType.WAIT_APPROVE,RiskPlanStatusType.WAIT_LEADER_RETURN
,RiskPlanStatusType.PROJECT_REPORT,RiskPlanStatusType.FINISH); ,RiskPlanStatusType.PROJECT_REPORT,RiskPlanStatusType.FINISH);
state = "已执行"; state = "已执行";
} else if ("return".equals(status)) { } else if ("return".equals(status)) {
...@@ -291,7 +307,7 @@ public class RiskPlanAppController extends BaseController { ...@@ -291,7 +307,7 @@ public class RiskPlanAppController extends BaseController {
@GetMapping("/inherent/list/{planId}/{buildingId}") @GetMapping("/inherent/list/{planId}/{buildingId}")
public R<List<RiskPlanAppInherentListDto>> getInherentListByPlanId(@PathVariable("planId") Long planId public R<List<RiskPlanAppInherentListDto>> getInherentListByPlanId(@PathVariable("planId") Long planId
, @PathVariable("buildingId") Long buildingId, Long floorId, Long roomId) { , @PathVariable("buildingId") Long buildingId, Long floorId, Long roomId) {
return R.ok(riskPlanInherentListService.getInherentListByPlanId(planId, buildingId, floorId, roomId)); return R.ok(riskPlanInherentListService.getInherentListByPlanId(null, buildingId, floorId, roomId));
} }
/** /**
......
...@@ -44,6 +44,10 @@ public class RiskPlan extends BaseEntity ...@@ -44,6 +44,10 @@ public class RiskPlan extends BaseEntity
@Excel(name = "创建单位") @Excel(name = "创建单位")
private Long createDeptId; private Long createDeptId;
/** 评估小组id */
@Excel(name = "评估小组id")
private Long deptId;
/** 负责人id */ /** 负责人id */
@Excel(name = "负责人id") @Excel(name = "负责人id")
private Long leaderUserId; private Long leaderUserId;
...@@ -199,6 +203,14 @@ public class RiskPlan extends BaseEntity ...@@ -199,6 +203,14 @@ public class RiskPlan extends BaseEntity
this.approveUserId = approveUserId; this.approveUserId = approveUserId;
} }
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -59,6 +59,14 @@ public class RiskPlanInherentList extends BaseEntity ...@@ -59,6 +59,14 @@ public class RiskPlanInherentList extends BaseEntity
@Excel(name = "风险等级") @Excel(name = "风险等级")
private String level; private String level;
/** 风险可能性 */
@Excel(name = "风险可能性")
private String riskLikelihood;
/** 后果严重性 */
@Excel(name = "后果严重性")
private String riskSeverity;
/** 存在部位 */ /** 存在部位 */
@Excel(name = "存在部位") @Excel(name = "存在部位")
private String presenceLocation; private String presenceLocation;
...@@ -301,6 +309,22 @@ public class RiskPlanInherentList extends BaseEntity ...@@ -301,6 +309,22 @@ public class RiskPlanInherentList extends BaseEntity
return delFlag; return delFlag;
} }
public String getRiskLikelihood() {
return riskLikelihood;
}
public void setRiskLikelihood(String riskLikelihood) {
this.riskLikelihood = riskLikelihood;
}
public String getRiskSeverity() {
return riskSeverity;
}
public void setRiskSeverity(String riskSeverity) {
this.riskSeverity = riskSeverity;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
...@@ -315,6 +339,8 @@ public class RiskPlanInherentList extends BaseEntity ...@@ -315,6 +339,8 @@ public class RiskPlanInherentList extends BaseEntity
.append("evaluationModel", getEvaluationModel()) .append("evaluationModel", getEvaluationModel())
.append("evaluationRange", getEvaluationRange()) .append("evaluationRange", getEvaluationRange())
.append("level", getLevel()) .append("level", getLevel())
.append("riskLikelihood", getRiskLikelihood())
.append("riskSeverity", getRiskSeverity())
.append("presenceLocation", getPresenceLocation()) .append("presenceLocation", getPresenceLocation())
.append("pictureFileIds", getPictureFileIds()) .append("pictureFileIds", getPictureFileIds())
.append("factor", getFactor()) .append("factor", getFactor())
......
...@@ -30,9 +30,13 @@ public enum RiskPlanStatusType { ...@@ -30,9 +30,13 @@ public enum RiskPlanStatusType {
*/ */
FINISH("FINISH","项目完成"), FINISH("FINISH","项目完成"),
/** /**
* 已退回 * 已退回至组长
*/ */
WAIT_RETURN("WAIT_RETURN","已退回"), WAIT_LEADER_RETURN("WAIT_LEADER_RETURN","已退回至组长"),
/**
* 已退回至组员
*/
WAIT_RETURN("WAIT_RETURN","已退回至组员"),
/** /**
* 已撤销 * 已撤销
*/ */
...@@ -73,6 +77,8 @@ public enum RiskPlanStatusType { ...@@ -73,6 +77,8 @@ public enum RiskPlanStatusType {
return PROJECT_REPORT; return PROJECT_REPORT;
case "FINISH": case "FINISH":
return FINISH; return FINISH;
case "WAIT_LEADER_RETURN":
return WAIT_LEADER_RETURN;
case "WAIT_RETURN": case "WAIT_RETURN":
return WAIT_RETURN; return WAIT_RETURN;
case "REVOKE": case "REVOKE":
......
...@@ -70,10 +70,10 @@ public interface ILedgerProjectService ...@@ -70,10 +70,10 @@ public interface ILedgerProjectService
public List<LedgerProject> getProjectListByDeptId(LedgerProject ledgerProject); public List<LedgerProject> getProjectListByDeptId(LedgerProject ledgerProject);
/** /**
* 获取项目所在部门下的所有人员 * 获取部门下的所有人员
* *
* @param projectId 项目id * @param deptId 项目id
* @return 人员list * @return 人员list
*/ */
public List<SysUser> getUserListByProjectId(Long projectId); public List<SysUser> getUserListByDeptId(Long deptId);
} }
...@@ -109,8 +109,7 @@ public class LedgerProjectServiceImpl implements ILedgerProjectService ...@@ -109,8 +109,7 @@ public class LedgerProjectServiceImpl implements ILedgerProjectService
} }
@Override @Override
public List<SysUser> getUserListByProjectId(Long projectId) { public List<SysUser> getUserListByDeptId(Long deptId) {
LedgerProject ledgerProject = selectLedgerProjectById(projectId); return userService.getListByDeptIdUnder(deptId);
return userService.getListByDeptIdUnder(ledgerProject.getDeptId());
} }
} }
...@@ -220,25 +220,44 @@ public class RiskPlanServiceImpl implements IRiskPlanService { ...@@ -220,25 +220,44 @@ public class RiskPlanServiceImpl implements IRiskPlanService {
RiskPlan riskPlan = selectRiskPlanById(lastRiskPlanTask.getPlanId()); RiskPlan riskPlan = selectRiskPlanById(lastRiskPlanTask.getPlanId());
if ("0".equals(appApproveDto.getTaskResult())) { if ("0".equals(appApproveDto.getTaskResult())) {
//退回
//插入任务表 已退回风险评估 //组长退回
RiskPlanTask riskPlanTask1 = new RiskPlanTask();
riskPlanTask1.setPlanId(lastRiskPlanTask.getPlanId());
riskPlanTask1.setTaskKey(RiskPlanStatusType.WAIT_RETURN.getStatus());
riskPlanTask1.setTaskName(RiskPlanStatusType.WAIT_RETURN.getTitle());
riskPlanTask1.setStatus("running");
riskPlanTask1.setStartTime(new Date());
riskPlanTaskService.insertRiskPlanTask(riskPlanTask1);
//修改计划状态
riskPlan.setStatus(RiskPlanStatusType.WAIT_RETURN.getStatus());
updateRiskPlan(riskPlan);
//如果是组长审批 同时退回修改 楼宇单子的状态
riskPlanUserBuildingService.updateByRiskPlanAppApproveBuildingDto(appApproveDto.getId(),appApproveDto.getUserId()
,appApproveDto.getBuildingDtos());
} else {
if (riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus())){ if (riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus())){
//如果是组长审批 同时退回修改 楼宇单子的状态
riskPlanUserBuildingService.updateByRiskPlanAppApproveBuildingDto(appApproveDto.getId(),appApproveDto.getUserId()
,appApproveDto.getBuildingDtos());
//插入任务表 已退回组员 风险评估
RiskPlanTask riskPlanTask1 = new RiskPlanTask();
riskPlanTask1.setPlanId(lastRiskPlanTask.getPlanId());
riskPlanTask1.setTaskKey(RiskPlanStatusType.WAIT_RETURN.getStatus());
riskPlanTask1.setTaskName(RiskPlanStatusType.WAIT_RETURN.getTitle());
riskPlanTask1.setStatus("running");
riskPlanTask1.setStartTime(new Date());
riskPlanTaskService.insertRiskPlanTask(riskPlanTask1);
//修改计划状态
riskPlan.setStatus(RiskPlanStatusType.WAIT_RETURN.getStatus());
updateRiskPlan(riskPlan);
}else if(riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_APPROVE.getStatus())){
//插入任务表 已退回组长 风险评估
RiskPlanTask riskPlanTask1 = new RiskPlanTask();
riskPlanTask1.setPlanId(lastRiskPlanTask.getPlanId());
riskPlanTask1.setApprovalUserId(riskPlan.getLeaderUserId());
riskPlanTask1.setTaskKey(RiskPlanStatusType.WAIT_LEADER_RETURN.getStatus());
riskPlanTask1.setTaskName(RiskPlanStatusType.WAIT_LEADER_RETURN.getTitle());
riskPlanTask1.setStatus("running");
riskPlanTask1.setStartTime(new Date());
riskPlanTaskService.insertRiskPlanTask(riskPlanTask1);
//修改计划状态
riskPlan.setStatus(RiskPlanStatusType.WAIT_LEADER_RETURN.getStatus());
updateRiskPlan(riskPlan);
}
} else {
if (riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus())
|| riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_RETURN.getStatus())){
//修改计划状态 //修改计划状态
riskPlan.setStatus(RiskPlanStatusType.WAIT_APPROVE.getStatus()); riskPlan.setStatus(RiskPlanStatusType.WAIT_APPROVE.getStatus());
updateRiskPlan(riskPlan); updateRiskPlan(riskPlan);
...@@ -246,7 +265,7 @@ public class RiskPlanServiceImpl implements IRiskPlanService { ...@@ -246,7 +265,7 @@ public class RiskPlanServiceImpl implements IRiskPlanService {
//插入任务表 审批任务 //插入任务表 审批任务
RiskPlanTask riskPlanTask1 = new RiskPlanTask(); RiskPlanTask riskPlanTask1 = new RiskPlanTask();
riskPlanTask1.setPlanId(lastRiskPlanTask.getPlanId()); riskPlanTask1.setPlanId(lastRiskPlanTask.getPlanId());
riskPlanTask1.setApprovalUserId(riskPlan.getCreateUserId()); riskPlanTask1.setApprovalUserId(riskPlan.getApproveUserId());
riskPlanTask1.setTaskKey(RiskPlanStatusType.WAIT_APPROVE.getStatus()); riskPlanTask1.setTaskKey(RiskPlanStatusType.WAIT_APPROVE.getStatus());
riskPlanTask1.setTaskName(RiskPlanStatusType.WAIT_APPROVE.getTitle()); riskPlanTask1.setTaskName(RiskPlanStatusType.WAIT_APPROVE.getTitle());
riskPlanTask1.setStatus("running"); riskPlanTask1.setStatus("running");
......
...@@ -16,6 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -16,6 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="evaluationModel" column="evaluation_model" /> <result property="evaluationModel" column="evaluation_model" />
<result property="evaluationRange" column="evaluation_range" /> <result property="evaluationRange" column="evaluation_range" />
<result property="level" column="level" /> <result property="level" column="level" />
<result property="riskLikelihood" column="risk_likelihood" />
<result property="riskSeverity" column="risk_severity" />
<result property="presenceLocation" column="presence_location" /> <result property="presenceLocation" column="presence_location" />
<result property="pictureFileIds" column="picture_file_ids" /> <result property="pictureFileIds" column="picture_file_ids" />
<result property="factor" column="factor" /> <result property="factor" column="factor" />
...@@ -34,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -34,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectRiskPlanInherentListVo"> <sql id="selectRiskPlanInherentListVo">
select id, user_id, room_id, plan_id, code, name, type, describe, evaluation_model, evaluation_range, level, presence_location, picture_file_ids, factor, measures_project, measures_project_file_ids, measures_administration, measures_administration_file_ids, measures_emergency, measures_emergency_file_ids, reference_basis, del_flag, create_by, create_time, update_by, update_time from risk_plan_inherent_list select id, user_id, room_id, plan_id, code, name, type, describe, evaluation_model, evaluation_range, level,risk_likelihood,risk_severity, presence_location, picture_file_ids, factor, measures_project, measures_project_file_ids, measures_administration, measures_administration_file_ids, measures_emergency, measures_emergency_file_ids, reference_basis, del_flag, create_by, create_time, update_by, update_time from risk_plan_inherent_list
</sql> </sql>
<select id="selectRiskPlanInherentListList" parameterType="com.censoft.censoftrongtong.domain.RiskPlanInherentList" resultMap="RiskPlanInherentListResult"> <select id="selectRiskPlanInherentListList" parameterType="com.censoft.censoftrongtong.domain.RiskPlanInherentList" resultMap="RiskPlanInherentListResult">
...@@ -110,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -110,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
rpil.factor, rpil.factor,
rpil.type, rpil.type,
rpil.`level`, rpil.`level`,
rpil.`risk_likelihood`,
rpil.`risk_severity`,
rpil.presence_location AS presenceLocation, rpil.presence_location AS presenceLocation,
rpil.picture_file_ids AS pictureFileIds, rpil.picture_file_ids AS pictureFileIds,
rpil.measures_project AS measuresProject, rpil.measures_project AS measuresProject,
...@@ -160,6 +164,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -160,6 +164,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="evaluationModel != null">evaluation_model,</if> <if test="evaluationModel != null">evaluation_model,</if>
<if test="evaluationRange != null">evaluation_range,</if> <if test="evaluationRange != null">evaluation_range,</if>
<if test="level != null">level,</if> <if test="level != null">level,</if>
<if test="riskLikelihood != null">risk_likelihood,</if>
<if test="riskSeverity != null">risk_severity,</if>
<if test="presenceLocation != null">presence_location,</if> <if test="presenceLocation != null">presence_location,</if>
<if test="pictureFileIds != null">picture_file_ids,</if> <if test="pictureFileIds != null">picture_file_ids,</if>
<if test="factor != null">factor,</if> <if test="factor != null">factor,</if>
...@@ -187,6 +193,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -187,6 +193,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="evaluationModel != null">#{evaluationModel},</if> <if test="evaluationModel != null">#{evaluationModel},</if>
<if test="evaluationRange != null">#{evaluationRange},</if> <if test="evaluationRange != null">#{evaluationRange},</if>
<if test="level != null">#{level},</if> <if test="level != null">#{level},</if>
<if test="riskLikelihood != null">#{riskLikelihood},</if>
<if test="riskSeverity != null">#{riskSeverity},</if>
<if test="presenceLocation != null">#{presenceLocation},</if> <if test="presenceLocation != null">#{presenceLocation},</if>
<if test="pictureFileIds != null">#{pictureFileIds},</if> <if test="pictureFileIds != null">#{pictureFileIds},</if>
<if test="factor != null">#{factor},</if> <if test="factor != null">#{factor},</if>
...@@ -218,6 +226,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -218,6 +226,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="evaluationModel != null">evaluation_model = #{evaluationModel},</if> <if test="evaluationModel != null">evaluation_model = #{evaluationModel},</if>
<if test="evaluationRange != null">evaluation_range = #{evaluationRange},</if> <if test="evaluationRange != null">evaluation_range = #{evaluationRange},</if>
<if test="level != null">level = #{level},</if> <if test="level != null">level = #{level},</if>
<if test="riskLikelihood != null">risk_likelihood = #{riskLikelihood},</if>
<if test="riskSeverity != null">risk_severity = #{riskSeverity},</if>
<if test="presenceLocation != null">presence_location = #{presenceLocation},</if> <if test="presenceLocation != null">presence_location = #{presenceLocation},</if>
<if test="pictureFileIds != null">picture_file_ids = #{pictureFileIds},</if> <if test="pictureFileIds != null">picture_file_ids = #{pictureFileIds},</if>
<if test="factor != null">factor = #{factor},</if> <if test="factor != null">factor = #{factor},</if>
......
...@@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="buildingIds" column="building_ids" /> <result property="buildingIds" column="building_ids" />
<result property="createUserId" column="create_user_id" /> <result property="createUserId" column="create_user_id" />
<result property="createDeptId" column="create_dept_id" /> <result property="createDeptId" column="create_dept_id" />
<result property="deptId" column="dept_id" />
<result property="leaderUserId" column="leader_user_id" /> <result property="leaderUserId" column="leader_user_id" />
<result property="workUserIds" column="work_user_ids" /> <result property="workUserIds" column="work_user_ids" />
<result property="approveUserId" column="approve_user_id" /> <result property="approveUserId" column="approve_user_id" />
...@@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectRiskPlanVo"> <sql id="selectRiskPlanVo">
select id, name, no, project_id, building_ids, create_user_id, create_dept_id, leader_user_id, work_user_ids,approve_user_id, start_time, end_time, status, del_flag, create_by, create_time, update_by, update_time from risk_plan select id, name, no, project_id, building_ids, create_user_id, create_dept_id,dept_id, leader_user_id, work_user_ids,approve_user_id, start_time, end_time, status, del_flag, create_by, create_time, update_by, update_time from risk_plan
</sql> </sql>
<select id="selectRiskPlanList" parameterType="com.censoft.censoftrongtong.domain.RiskPlan" resultMap="RiskPlanResult"> <select id="selectRiskPlanList" parameterType="com.censoft.censoftrongtong.domain.RiskPlan" resultMap="RiskPlanResult">
...@@ -189,9 +190,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -189,9 +190,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN risk_plan_task rpt ON rpt.plan_id = rp.id LEFT JOIN risk_plan_task rpt ON rpt.plan_id = rp.id
<where> <where>
<if test="userId != null"> <if test="userId != null">
and ((rpt.approval_user_id = #{userId} and (rpt.task_key = 'WAIT_LEADER_APPROVE' or rpt.task_key = 'WAIT_RETURN')) and (rpt.approval_user_id = #{userId}
or and (rpt.task_key = 'WAIT_LEADER_APPROVE' or rpt.task_key = 'WAIT_APPROVE'
(rpt.approval_user_id = #{userId} and rpt.task_key = 'WAIT_APPROVE')) or rpt.task_key = 'WAIT_LEADER_RETURN'))
</if> </if>
<if test="status != null and status != '' "> <if test="status != null and status != '' ">
and rpt.`status` = #{status} and rpt.`status` = #{status}
...@@ -213,6 +214,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -213,6 +214,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="buildingIds != null">building_ids,</if> <if test="buildingIds != null">building_ids,</if>
<if test="createUserId != null">create_user_id,</if> <if test="createUserId != null">create_user_id,</if>
<if test="createDeptId != null">create_dept_id,</if> <if test="createDeptId != null">create_dept_id,</if>
<if test="deptId != null">dept_id,</if>
<if test="leaderUserId != null">leader_user_id,</if> <if test="leaderUserId != null">leader_user_id,</if>
<if test="workUserIds != null">work_user_ids,</if> <if test="workUserIds != null">work_user_ids,</if>
<if test="approveUserId != null">approve_user_id,</if> <if test="approveUserId != null">approve_user_id,</if>
...@@ -232,6 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -232,6 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="buildingIds != null">#{buildingIds},</if> <if test="buildingIds != null">#{buildingIds},</if>
<if test="createUserId != null">#{createUserId},</if> <if test="createUserId != null">#{createUserId},</if>
<if test="createDeptId != null">#{createDeptId},</if> <if test="createDeptId != null">#{createDeptId},</if>
<if test="deptId != null">#{deptId},</if>
<if test="leaderUserId != null">#{leaderUserId},</if> <if test="leaderUserId != null">#{leaderUserId},</if>
<if test="workUserIds != null">#{workUserIds},</if> <if test="workUserIds != null">#{workUserIds},</if>
<if test="approveUserId != null">#{approveUserId},</if> <if test="approveUserId != null">#{approveUserId},</if>
...@@ -255,6 +258,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -255,6 +258,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="buildingIds != null">building_ids = #{buildingIds},</if> <if test="buildingIds != null">building_ids = #{buildingIds},</if>
<if test="createUserId != null">create_user_id = #{createUserId},</if> <if test="createUserId != null">create_user_id = #{createUserId},</if>
<if test="createDeptId != null">create_dept_id = #{createDeptId},</if> <if test="createDeptId != null">create_dept_id = #{createDeptId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="leaderUserId != null">leader_user_id = #{leaderUserId},</if> <if test="leaderUserId != null">leader_user_id = #{leaderUserId},</if>
<if test="workUserIds != null">work_user_ids = #{workUserIds},</if> <if test="workUserIds != null">work_user_ids = #{workUserIds},</if>
<if test="approveUserId != null">approve_user_id = #{approveUserId},</if> <if test="approveUserId != null">approve_user_id = #{approveUserId},</if>
......
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