Commit ba596420 authored by 鲍德's avatar 鲍德
Browse files

现状风险代码初始化

parent ae5e83fe
Loading
Loading
Loading
Loading
+104 −0
Original line number Diff line number Diff line
package com.censoft.censoftrongtong.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
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.CurrentRiskDetailAbnormal;
import com.censoft.censoftrongtong.service.ICurrentRiskDetailAbnormalService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 现状风险巡查异常信息Controller
 * 
 * @author ruoyi
 * @date 2023-12-05
 */
@RestController
@RequestMapping("/risk/currentRiskAbnormal")
public class CurrentRiskDetailAbnormalController extends BaseController
{
    @Autowired
    private ICurrentRiskDetailAbnormalService currentRiskDetailAbnormalService;

    /**
     * 查询现状风险巡查异常信息列表
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:list')")
    @GetMapping("/list")
    public TableDataInfo list(CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
    {
        startPage();
        List<CurrentRiskDetailAbnormal> list = currentRiskDetailAbnormalService.selectCurrentRiskDetailAbnormalList(currentRiskDetailAbnormal);
        return getDataTable(list);
    }

    /**
     * 导出现状风险巡查异常信息列表
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:export')")
    @Log(title = "现状风险巡查异常信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
    {
        List<CurrentRiskDetailAbnormal> list = currentRiskDetailAbnormalService.selectCurrentRiskDetailAbnormalList(currentRiskDetailAbnormal);
        ExcelUtil<CurrentRiskDetailAbnormal> util = new ExcelUtil<CurrentRiskDetailAbnormal>(CurrentRiskDetailAbnormal.class);
        util.exportExcel(response, list, "现状风险巡查异常信息数据");
    }

    /**
     * 获取现状风险巡查异常信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(currentRiskDetailAbnormalService.selectCurrentRiskDetailAbnormalById(id));
    }

    /**
     * 新增现状风险巡查异常信息
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')")
    @Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
    {
        return toAjax(currentRiskDetailAbnormalService.insertCurrentRiskDetailAbnormal(currentRiskDetailAbnormal));
    }

    /**
     * 修改现状风险巡查异常信息
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:edit')")
    @Log(title = "现状风险巡查异常信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
    {
        return toAjax(currentRiskDetailAbnormalService.updateCurrentRiskDetailAbnormal(currentRiskDetailAbnormal));
    }

    /**
     * 删除现状风险巡查异常信息
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:remove')")
    @Log(title = "现状风险巡查异常信息", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(currentRiskDetailAbnormalService.deleteCurrentRiskDetailAbnormalByIds(ids));
    }
}
+104 −0
Original line number Diff line number Diff line
package com.censoft.censoftrongtong.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
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
 * 
 * @author ruoyi
 * @date 2023-12-05
 */
@RestController
@RequestMapping("/risk/currentRiskHoliday")
public class CurrentRiskUserHolidayController extends BaseController
{
    @Autowired
    private ICurrentRiskUserHolidayService currentRiskUserHolidayService;

    /**
     * 查询现状风险巡查用户请假列表
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:list')")
    @GetMapping("/list")
    public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday)
    {
        startPage();
        List<CurrentRiskUserHoliday> list = currentRiskUserHolidayService.selectCurrentRiskUserHolidayList(currentRiskUserHoliday);
        return getDataTable(list);
    }

    /**
     * 导出现状风险巡查用户请假列表
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:export')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, CurrentRiskUserHoliday currentRiskUserHoliday)
    {
        List<CurrentRiskUserHoliday> list = currentRiskUserHolidayService.selectCurrentRiskUserHolidayList(currentRiskUserHoliday);
        ExcelUtil<CurrentRiskUserHoliday> util = new ExcelUtil<CurrentRiskUserHoliday>(CurrentRiskUserHoliday.class);
        util.exportExcel(response, list, "现状风险巡查用户请假数据");
    }

    /**
     * 获取现状风险巡查用户请假详细信息
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(currentRiskUserHolidayService.selectCurrentRiskUserHolidayById(id));
    }

    /**
     * 新增现状风险巡查用户请假
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:add')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
    {
        return toAjax(currentRiskUserHolidayService.insertCurrentRiskUserHoliday(currentRiskUserHoliday));
    }

    /**
     * 修改现状风险巡查用户请假
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:edit')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
    {
        return toAjax(currentRiskUserHolidayService.updateCurrentRiskUserHoliday(currentRiskUserHoliday));
    }

    /**
     * 删除现状风险巡查用户请假
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:remove')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(currentRiskUserHolidayService.deleteCurrentRiskUserHolidayByIds(ids));
    }
}
+104 −0
Original line number Diff line number Diff line
package com.censoft.censoftrongtong.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
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.CurrentRiskUserPatrolDetail;
import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 现状风险用户巡查明细Controller
 * 
 * @author ruoyi
 * @date 2023-12-05
 */
@RestController
@RequestMapping("/risk/currentRiskPatrolDetail")
public class CurrentRiskUserPatrolDetailController extends BaseController
{
    @Autowired
    private ICurrentRiskUserPatrolDetailService currentRiskUserPatrolDetailService;

    /**
     * 查询现状风险用户巡查明细列表
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:list')")
    @GetMapping("/list")
    public TableDataInfo list(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
    {
        startPage();
        List<CurrentRiskUserPatrolDetail> list = currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailList(currentRiskUserPatrolDetail);
        return getDataTable(list);
    }

    /**
     * 导出现状风险用户巡查明细列表
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:export')")
    @Log(title = "现状风险用户巡查明细", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
    {
        List<CurrentRiskUserPatrolDetail> list = currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailList(currentRiskUserPatrolDetail);
        ExcelUtil<CurrentRiskUserPatrolDetail> util = new ExcelUtil<CurrentRiskUserPatrolDetail>(CurrentRiskUserPatrolDetail.class);
        util.exportExcel(response, list, "现状风险用户巡查明细数据");
    }

    /**
     * 获取现状风险用户巡查明细详细信息
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailById(id));
    }

    /**
     * 新增现状风险用户巡查明细
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:add')")
    @Log(title = "现状风险用户巡查明细", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
    {
        return toAjax(currentRiskUserPatrolDetailService.insertCurrentRiskUserPatrolDetail(currentRiskUserPatrolDetail));
    }

    /**
     * 修改现状风险用户巡查明细
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:edit')")
    @Log(title = "现状风险用户巡查明细", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
    {
        return toAjax(currentRiskUserPatrolDetailService.updateCurrentRiskUserPatrolDetail(currentRiskUserPatrolDetail));
    }

    /**
     * 删除现状风险用户巡查明细
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:remove')")
    @Log(title = "现状风险用户巡查明细", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(currentRiskUserPatrolDetailService.deleteCurrentRiskUserPatrolDetailByIds(ids));
    }
}
+54 −0
Original line number Diff line number Diff line
package com.censoft.censoftrongtong.domain;

import com.ruoyi.common.core.domain.BaseEntityClean;
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_detail_abnormal
 * 
 * @author ruoyi
 * @date 2023-12-05
 */
@Data
public class CurrentRiskDetailAbnormal extends BaseEntityClean
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 巡查 id */
    @Excel(name = "巡查 id")
    private Long patrolId;

    /** 巡查明细id */
    @Excel(name = "巡查明细id")
    private Long patrolDetailId;

    /** 巡查内容 */
    @Excel(name = "巡查内容")
    private String riskContent;

    /** 巡查地点 */
    @Excel(name = "巡查地点")
    private String riskLocation;

    /** 异常说明 */
    @Excel(name = "异常说明")
    private String abnormalDesc;

    /** 评估等级 */
    @Excel(name = "评估等级")
    private String assessmentLevel;

    /** 排序 */
    @Excel(name = "排序")
    private Long sortNum;

    /** 删除标志(0代表存在 1代表删除) */
    private String delFlag;
}
+67 −0
Original line number Diff line number Diff line
package com.censoft.censoftrongtong.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntityClean;
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_user_holiday
 * 
 * @author ruoyi
 * @date 2023-12-05
 */
@Data
public class CurrentRiskUserHoliday extends BaseEntityClean
{
    private static final long serialVersionUID = 1L;

    /** 主键 id */
    private Long id;

    /** 申请人用户 id */
    @Excel(name = "申请人用户 id")
    private Long applyUserId;

    /** 审批人用户 id */
    @Excel(name = "审批人用户 id")
    private Long approveUserId;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approveTime;

    /** 假期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "假期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date holidayTime;

    /** 请假原因 */
    @Excel(name = "请假原因")
    private String reason;

    /** 审批描述 */
    @Excel(name = "审批描述")
    private String approveMsg;

    /** 状态 0 待审批 1 已通过 2 已拒绝 */
    @Excel(name = "状态 0 待审批 1 已通过 2 已拒绝")
    private String status;

    /** 排序 */
    @Excel(name = "排序")
    private Long sortNum;

    /** 删除标志(0代表存在 1代表删除) */
    private String delFlag;
}
Loading