Commit 86edbc00 authored by 陈晓晋's avatar 陈晓晋

巡查记录和详情20240111

parent 38cdec23
...@@ -81,7 +81,7 @@ public class CurrentRiskDetailAbnormalController extends BaseController ...@@ -81,7 +81,7 @@ public class CurrentRiskDetailAbnormalController extends BaseController
/** /**
* 新增现状风险巡查异常信息 * 新增现状风险巡查异常信息
*/ */
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')") @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add11')")
@Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT) @Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT)
@PostMapping("/save1") @PostMapping("/save1")
public AjaxResult add1(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal) public AjaxResult add1(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
...@@ -92,10 +92,10 @@ public class CurrentRiskDetailAbnormalController extends BaseController ...@@ -92,10 +92,10 @@ public class CurrentRiskDetailAbnormalController extends BaseController
/** /**
* 新增现状风险巡查异常信息(附件处理) * 新增现状风险巡查异常信息(附件处理)
*/ */
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')") // @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')")
@Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT) @Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT)
@PostMapping("/save") @PostMapping("/save")
public AjaxResult add(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal , @RequestParam(value = "file[]", required = false) MultipartFile[] file) public AjaxResult add( CurrentRiskDetailAbnormal currentRiskDetailAbnormal , @RequestParam(value = "file[]", required = false) MultipartFile[] file)
{ {
if (file != null) { if (file != null) {
String userId = getUserId() + ""; String userId = getUserId() + "";
......
...@@ -30,11 +30,17 @@ public class CurrentRiskTask { ...@@ -30,11 +30,17 @@ public class CurrentRiskTask {
private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd"); private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd");
public void ryNoParams()
{
System.out.println("执行无参方法");
}
/** /**
* 每天零点发送任务 * 每天零点发送任务
* @param isDailypOther 除每月 1 号外,是否新增日查之外的巡查 默认不新增 * @param isDailypOther 除每月 1 号外,是否新增日查之外的巡查 默认不新增
*/ */
private void senTask(boolean isDailypOther){ public void senTask(){
boolean isDailypOther=false;
//判断是否查询当天巡查任务是否发放 //判断是否查询当天巡查任务是否发放
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR_OF_DAY); int hour = calendar.get(Calendar.HOUR_OF_DAY);
......
package com.censoft.censoftrongtong.controller; package com.censoft.censoftrongtong.controller;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday;
import com.censoft.censoftrongtong.service.ICurrentRiskUserHolidayService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.DeleteMapping; import java.util.Date;
import org.springframework.web.bind.annotation.PathVariable; import java.util.List;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday;
import com.censoft.censoftrongtong.service.ICurrentRiskUserHolidayService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* 现状风险巡查用户请假Controller * 现状风险巡查用户请假Controller
...@@ -49,13 +41,18 @@ public class CurrentRiskUserHolidayController extends BaseController { ...@@ -49,13 +41,18 @@ public class CurrentRiskUserHolidayController extends BaseController {
public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday) { public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday) {
startPage(); startPage();
QueryWrapper<CurrentRiskUserHoliday> queryWrapper = new QueryWrapper<>(); QueryWrapper<CurrentRiskUserHoliday> queryWrapper = new QueryWrapper<>();
if ("0".equals(currentRiskUserHoliday.getType())) { if (currentRiskUserHoliday.getType()==null) {
//申请人
queryWrapper.eq("apply_user_id", getUserId()); }else{
} else { if ("0".equals(currentRiskUserHoliday.getType())) {
//审批人 //申请人
queryWrapper.in("apply_user_id", currentRiskUserHolidayService.memberUserIds(getUserId())); queryWrapper.eq("apply_user_id", getUserId());
} else {
//审批人
queryWrapper.in("apply_user_id", currentRiskUserHolidayService.memberUserIds(getUserId()));
}
} }
if (!StringUtils.isEmpty(currentRiskUserHoliday.getStatus())) { if (!StringUtils.isEmpty(currentRiskUserHoliday.getStatus())) {
queryWrapper.eq("status", currentRiskUserHoliday.getStatus()); queryWrapper.eq("status", currentRiskUserHoliday.getStatus());
} }
......
package com.censoft.censoftrongtong.controller; package com.censoft.censoftrongtong.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO;
import com.censoft.censoftrongtong.domain.LedgerProject; import com.censoft.censoftrongtong.domain.LedgerProject;
import com.censoft.censoftrongtong.service.ICurrentRiskDetailAbnormalService;
import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
...@@ -27,6 +31,7 @@ import java.util.List; ...@@ -27,6 +31,7 @@ import java.util.List;
@RequestMapping(value = {"/risk/riskUserPatrol", "/app-api/risk/riskUserPatrol"}) @RequestMapping(value = {"/risk/riskUserPatrol", "/app-api/risk/riskUserPatrol"})
public class CurrentRiskUserPatrolController extends BaseController { public class CurrentRiskUserPatrolController extends BaseController {
private ICurrentRiskUserPatrolService currentRiskUserPatrolService; private ICurrentRiskUserPatrolService currentRiskUserPatrolService;
private ICurrentRiskDetailAbnormalService currentRiskDetailAbnormalService;
@GetMapping("/getPatrolProjectList") @GetMapping("/getPatrolProjectList")
public AjaxResult getPatrolProjectList() { public AjaxResult getPatrolProjectList() {
...@@ -67,6 +72,26 @@ public class CurrentRiskUserPatrolController extends BaseController { ...@@ -67,6 +72,26 @@ public class CurrentRiskUserPatrolController extends BaseController {
return success(currentRiskUserPatrolService.selectCurrentRiskUserPatrolById(id)); return success(currentRiskUserPatrolService.selectCurrentRiskUserPatrolById(id));
} }
/**
* 获取巡查记录详情查看
*/
@GetMapping(value = "/patrolInfoDetail/{id}")
public AjaxResult getPatrolInfoDetail(@PathVariable("id") Long id) {
CurrentRiskUserPatrolVO currentRiskUserPatrolVO=currentRiskUserPatrolService.selectCurrentRiskUserPatrolDetail(id);
if(currentRiskUserPatrolVO != null){
if (currentRiskUserPatrolVO.getExceptStatus()!=null&&currentRiskUserPatrolVO.getExceptStatus().equals("1")) {//如果有异常信息加入详情
QueryWrapper<CurrentRiskDetailAbnormal> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(CurrentRiskDetailAbnormal::getPatrolId,id);
CurrentRiskDetailAbnormal currentRiskDetailAbnormal= currentRiskDetailAbnormalService.getOne(queryWrapper);
if (currentRiskDetailAbnormal!=null) {
currentRiskUserPatrolVO.setCurrentailAbnormal(currentRiskDetailAbnormal);
}
}
}
return success(currentRiskUserPatrolVO);
}
/** /**
* 新增巡查执行管理 * 新增巡查执行管理
*/ */
......
package com.censoft.censoftrongtong.domain; package com.censoft.censoftrongtong.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntityClean; import com.ruoyi.common.core.domain.BaseEntityClean;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 现状风险岗位用户巡查清单对象 current_risk_post_list * 现状风险岗位用户巡查清单对象 current_risk_post_list
...@@ -50,10 +48,12 @@ public class CurrentRiskPostList extends BaseEntityClean ...@@ -50,10 +48,12 @@ public class CurrentRiskPostList extends BaseEntityClean
/** 删除标志(0代表存在 1代表删除) */ /** 删除标志(0代表存在 1代表删除) */
private String delFlag; private String delFlag;
@TableField(exist = false)
private String currentRiskType; private String currentRiskType;
@TableField(exist = false)
private Long currentRiskId2; private Long currentRiskId2;
@TableField(exist = false)
private String currentRiskType2; private String currentRiskType2;
@TableField(exist = false)
private String nickName; private String nickName;
} }
package com.censoft.censoftrongtong.domain; package com.censoft.censoftrongtong.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntityClean; import com.ruoyi.common.core.domain.BaseEntityClean;
import lombok.Data; import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import java.util.Date;
/** /**
* 巡查执行管理对象 current_risk_user_patrol * 巡查执行管理对象 current_risk_user_patrol
...@@ -64,4 +65,8 @@ public class CurrentRiskUserPatrol extends BaseEntityClean ...@@ -64,4 +65,8 @@ public class CurrentRiskUserPatrol extends BaseEntityClean
private String riskPostName; private String riskPostName;
private String nickName; private String nickName;
/** 状态 0 正常 1 异常 */
private String exceptStatus;
/** 项目名称 */
private String projectName;
} }
package com.censoft.censoftrongtong.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* 巡查执行管理对象 current_risk_user_patrol
*
* @author baode
* @date 2023-12-05
*/
@Data
public class CurrentRiskUserPatrolVO
{
/**
* 项目信息
*/
/** 项目名称 */
private String projectName;
/**
* 现状风险类型
*/
private String type;
/**
* 现状风险信息
*/
private String level;
/** 风险因素 */
private String factor;
/** 工程技术措施 */
private String measuresProject;
/** 管理措施 */
private String measuresAdministration;
/** 应急处置措施 */
private String measuresEmergency;
/**
* 巡查信息
*/
private Long id;
private Long userId;
/** 项目 id */
private Long projectId;
/** 现状风险岗位 id */
private Long riskPostId;
/** 巡查类型 0 日查 1 周查 2 月查 3 季查 4 年查 */
private Integer patrolType;
/** 状态 0 未巡查 1 已巡查 */
private String status;
/** 开始巡查时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/** 结束巡查时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date validityTime;
private String riskPostName;
private String nickName;
/** 状态 0 正常 1 异常 */
private String exceptStatus;
/**
* 异常信息
*/
CurrentRiskDetailAbnormal currentailAbnormal;
}
...@@ -12,4 +12,8 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{ ...@@ -12,4 +12,8 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{
private String patrolStatus; private String patrolStatus;
private Long projectId; private Long projectId;
private Long buildId;
private String address;
} }
package com.censoft.censoftrongtong.mapper; package com.censoft.censoftrongtong.mapper;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO;
import com.censoft.censoftrongtong.domain.LedgerProject; import com.censoft.censoftrongtong.domain.LedgerProject;
import com.github.yulichang.base.MPJBaseMapper; import com.github.yulichang.base.MPJBaseMapper;
...@@ -22,6 +23,14 @@ public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskU ...@@ -22,6 +23,14 @@ public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskU
*/ */
public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id); public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id);
/**
* 巡查记录详情
*
* @param id 巡查记录主键
* @return 巡查执行管理
*/
public CurrentRiskUserPatrolVO selectCurrentRiskUserPatrolDetail(Long id);
/** /**
* 根据用户id获取巡检项目 * 根据用户id获取巡检项目
* @param userId * @param userId
......
package com.censoft.censoftrongtong.service; package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO;
import com.censoft.censoftrongtong.domain.LedgerProject; import com.censoft.censoftrongtong.domain.LedgerProject;
import com.github.yulichang.base.MPJBaseService; import com.github.yulichang.base.MPJBaseService;
import java.util.List;
/** /**
* 巡查执行管理Service接口 * 巡查执行管理Service接口
* *
...@@ -12,6 +14,8 @@ import com.github.yulichang.base.MPJBaseService; ...@@ -12,6 +14,8 @@ import com.github.yulichang.base.MPJBaseService;
*/ */
public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRiskUserPatrol> public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRiskUserPatrol>
{ {
/** /**
* 查询巡查执行管理 * 查询巡查执行管理
* *
...@@ -20,6 +24,14 @@ public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRi ...@@ -20,6 +24,14 @@ public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRi
*/ */
public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id); public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id);
/**
* 巡查记录详情
*
* @param id 巡查记录主键
* @return 巡查执行管理
*/
public CurrentRiskUserPatrolVO selectCurrentRiskUserPatrolDetail(Long id);
/** /**
* 查询巡查执行管理列表 * 查询巡查执行管理列表
* *
......
package com.censoft.censoftrongtong.service.impl; package com.censoft.censoftrongtong.service.impl;
import java.util.List; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO;
import com.censoft.censoftrongtong.domain.LedgerProject; import com.censoft.censoftrongtong.domain.LedgerProject;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper; import com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService;
import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.base.MPJBaseServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 巡查执行管理Service业务层处理 * 巡查执行管理Service业务层处理
* *
...@@ -34,6 +35,18 @@ public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<Current ...@@ -34,6 +35,18 @@ public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<Current
return currentRiskUserPatrolMapper.selectCurrentRiskUserPatrolById(id); return currentRiskUserPatrolMapper.selectCurrentRiskUserPatrolById(id);
} }
/**
* 查询记录
*
* @param id 巡查记录主键
* @return 巡查执行管理
*/
@Override
public CurrentRiskUserPatrolVO selectCurrentRiskUserPatrolDetail(Long id)
{
return currentRiskUserPatrolMapper.selectCurrentRiskUserPatrolDetail(id);
}
/** /**
* 查询巡查执行管理列表 * 查询巡查执行管理列表
* *
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskDetailAbnormalMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal" id="CurrentRiskDetailAbnormalResult">
<result property="id" column="id" />
<result property="patrolId" column="patrol_id" />
<result property="patrolDetailId" column="patrol_detail_id" />
<result property="riskContent" column="risk_content" />
<result property="riskLocation" column="risk_location" />
<result property="abnormalPics" column="abnormal_pics" />
<result property="abnormalDesc" column="abnormal_desc" />
<result property="assessmentLevel" column="assessment_level" />
<result property="sortNum" column="sort_num" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectCurrentRiskDetailAbnormalVo">
select id, patrol_id, patrol_detail_id, risk_content, risk_location, abnormal_desc, assessment_level, sort_num, del_flag, create_by, create_time, update_by, update_time, remark,abnormal_pics from current_risk_detail_abnormal
</sql>
<select id="selectCurrentRiskDetailAbnormalList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal" resultMap="CurrentRiskDetailAbnormalResult">
<include refid="selectCurrentRiskDetailAbnormalVo"/>
<where>
<if test="patrolId != null "> and patrol_id = #{patrolId}</if>
<if test="patrolDetailId != null "> and patrol_detail_id = #{patrolDetailId}</if>
<if test="riskContent != null and riskContent != ''"> and risk_content = #{riskContent}</if>
<if test="riskLocation != null and riskLocation != ''"> and risk_location = #{riskLocation}</if>
<if test="abnormalDesc != null and abnormalDesc != ''"> and abnormal_desc = #{abnormalDesc}</if>
<if test="assessmentLevel != null and assessmentLevel != ''"> and assessment_level = #{assessmentLevel}</if>
<if test="sortNum != null "> and sort_num = #{sortNum}</if>
</where>
</select>
<select id="selectCurrentRiskDetailAbnormalById" parameterType="Long" resultMap="CurrentRiskDetailAbnormalResult">
<include refid="selectCurrentRiskDetailAbnormalVo"/>
where id = #{id}
</select>
<insert id="insertCurrentRiskDetailAbnormal" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal" useGeneratedKeys="true" keyProperty="id">
insert into current_risk_detail_abnormal
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patrolId != null">patrol_id,</if>
<if test="patrolDetailId != null">patrol_detail_id,</if>
<if test="riskContent != null">risk_content,</if>
<if test="riskLocation != null">risk_location,</if>
<if test="abnormalDesc != null">abnormal_desc,</if>
<if test="abnormalPics != null">abnormal_pics,</if>
<if test="assessmentLevel != null">assessment_level,</if>
<if test="sortNum != null">sort_num,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patrolId != null">#{patrolId},</if>
<if test="patrolDetailId != null">#{patrolDetailId},</if>
<if test="riskContent != null">#{riskContent},</if>
<if test="riskLocation != null">#{riskLocation},</if>
<if test="abnormalDesc != null">#{abnormalDesc},</if>
<if test="abnormalPics != null">#{abnormalPics},</if>
<if test="assessmentLevel != null">#{assessmentLevel},</if>
<if test="sortNum != null">#{sortNum},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateCurrentRiskDetailAbnormal" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal">
update current_risk_detail_abnormal
<trim prefix="SET" suffixOverrides=",">
<if test="patrolId != null">patrol_id = #{patrolId},</if>
<if test="patrolDetailId != null">patrol_detail_id = #{patrolDetailId},</if>
<if test="riskContent != null">risk_content = #{riskContent},</if>
<if test="riskLocation != null">risk_location = #{riskLocation},</if>
<if test="abnormalPics != null">abnormal_pics = #{abnormalPics},</if>
<if test="abnormalDesc != null">abnormal_desc = #{abnormalDesc},</if>
<if test="assessmentLevel != null">assessment_level = #{assessmentLevel},</if>
<if test="sortNum != null">sort_num = #{sortNum},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCurrentRiskDetailAbnormalById" parameterType="Long">
delete from current_risk_detail_abnormal where id = #{id}
</delete>
<delete id="deleteCurrentRiskDetailAbnormalByIds" parameterType="String">
delete from current_risk_detail_abnormal where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -200,11 +200,16 @@ ...@@ -200,11 +200,16 @@
c.factor_items, c.factor_items,
a.id patrolDetailId, a.id patrolDetailId,
a.patrol_id patrolId, a.patrol_id patrolId,
a.STATUS patrolStatus a.STATUS patrolStatus,
d.address,
d.id buildId
FROM FROM
current_risk_user_patrol_detail a current_risk_user_patrol_detail a
INNER JOIN current_risk_user_patrol b ON a.patrol_id = b.id INNER JOIN current_risk_user_patrol b ON a.patrol_id = b.id
INNER JOIN risk_plan_existing_list c ON a.current_risk_id = c.id INNER JOIN risk_plan_existing_list c ON a.current_risk_id = c.id
INNER JOIN ledger_room r on c.room_id=r.id
INNER JOIN ledger_floor f on r.floor_id=f.id
INNER JOIN ledger_building d on f.building_id=d.id
where b.project_id=#{projectId} and b.user_id=#{userId} where b.project_id=#{projectId} and b.user_id=#{userId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="userId" column="user_id"/> <result property="userId" column="user_id"/>
<result property="projectId" column="project_id"/> <result property="projectId" column="project_id"/>
<result property="projectName" column="project_name"/>
<result property="riskPostId" column="risk_post_id"/> <result property="riskPostId" column="risk_post_id"/>
<result property="patrolType" column="patrol_type"/> <result property="patrolType" column="patrol_type"/>
<result property="status" column="status"/> <result property="status" column="status"/>
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
<result property="riskPostName" column="risk_post_name"/> <result property="riskPostName" column="risk_post_name"/>
<result property="nickName" column="nick_name"/> <result property="nickName" column="nick_name"/>
<result property="validityTime" column="validity_time"/> <result property="validityTime" column="validity_time"/>
<result property="exceptStatus" column="except_status"/>
</resultMap> </resultMap>
<sql id="selectCurrentRiskUserPatrolVo"> <sql id="selectCurrentRiskUserPatrolVo">
...@@ -52,6 +54,7 @@ ...@@ -52,6 +54,7 @@
a.id, a.id,
a.user_id, a.user_id,
a.project_id, a.project_id,
p.name project_name,
a.risk_post_id, a.risk_post_id,
a.patrol_type, a.patrol_type,
a.STATUS, a.STATUS,
...@@ -66,9 +69,12 @@ ...@@ -66,9 +69,12 @@
a.update_time, a.update_time,
a.remark, a.remark,
b.risk_post_name, b.risk_post_name,
c.nick_name c.nick_name,
d.status except_status
FROM FROM
current_risk_user_patrol a current_risk_user_patrol a
LEFT JOIN ledger_project p on a.project_id=p.id
LEFT JOIN current_risk_user_patrol_detail d on a.id=d.patrol_id
LEFT JOIN current_risk_post b on a.risk_post_id = b.id LEFT JOIN current_risk_post b on a.risk_post_id = b.id
LEFT JOIN sys_user c on a.user_id = c.user_id LEFT JOIN sys_user c on a.user_id = c.user_id
<where> <where>
...@@ -83,6 +89,37 @@ ...@@ -83,6 +89,37 @@
</where> </where>
</select> </select>
<select id="selectCurrentRiskUserPatrolDetail" parameterType="Long" resultType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO">
SELECT
a.id,
p.NAME project_name,
e.type,
e.LEVEL,
e.factor,
e.measures_project,
e.measures_administration,
e.measures_emergency,
a.user_id,
a.project_id,
a.risk_post_id,
a.patrol_type,
a.STATUS,
a.start_time,
a.end_time,
a.validity_time,
b.risk_post_name,
c.nick_name,
d.STATUS except_status
FROM
current_risk_user_patrol a
LEFT JOIN ledger_project p ON a.project_id = p.id
LEFT JOIN current_risk_user_patrol_detail d ON a.id = d.patrol_id
LEFT JOIN risk_plan_existing_list e ON d.current_risk_id = e.id
LEFT JOIN current_risk_post b ON a.risk_post_id = b.id
LEFT JOIN sys_user c ON a.user_id = c.user_id
where a.id = #{id}
</select>
<select id="getPatrolProjectList" resultType="com.censoft.censoftrongtong.domain.LedgerProject"> <select id="getPatrolProjectList" resultType="com.censoft.censoftrongtong.domain.LedgerProject">
select b.id,b.name,b.type,b.business,b.address from current_risk_user_patrol a LEFT JOIN ledger_project b on select b.id,b.name,b.type,b.business,b.address from current_risk_user_patrol a LEFT JOIN ledger_project b on
a.project_id=b.id a.project_id=b.id
......
...@@ -132,7 +132,7 @@ public class Constants ...@@ -132,7 +132,7 @@ public class Constants
/** /**
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加) * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
*/ */
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" }; public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" ,"com.censoft"};
/** /**
* 定时任务违规的字符 * 定时任务违规的字符
......
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