Commit 8423133e authored by yf's avatar yf
Browse files

修改巡查管理相关接口

parent 944d8c92
Loading
Loading
Loading
Loading
+27 −33
Original line number Diff line number Diff line
@@ -38,8 +38,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@AllArgsConstructor
@RequestMapping(value = {"/risk/currentRiskHoliday", "/app-api/risk/currentRiskHoliday"})
public class CurrentRiskUserHolidayController extends BaseController
{
public class CurrentRiskUserHolidayController extends BaseController {
    private ICurrentRiskUserHolidayService currentRiskUserHolidayService;
    private ISysUserService sysUserService;

@@ -47,8 +46,7 @@ public class CurrentRiskUserHolidayController extends BaseController
     * 查询现状风险巡查用户请假列表
     */
    @GetMapping("/list")
    public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday)
    {
    public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday) {
        startPage();
        QueryWrapper<CurrentRiskUserHoliday> queryWrapper = new QueryWrapper<>();
        if ("0".equals(currentRiskUserHoliday.getType())) {
@@ -67,7 +65,8 @@ public class CurrentRiskUserHolidayController extends BaseController
        if (!CollectionUtils.isEmpty(list)) {
            list.forEach(holiday -> {
                if ("0".equals(currentRiskUserHoliday.getType())) {
                    holiday.setApplyUserName(getUsername());
                    SysUser sysUser = sysUserService.selectUserById(getUserId());
                    holiday.setApplyUserName(sysUser.getNickName());
                } else {
                    SysUser sysUser = sysUserService.selectUserById(holiday.getApplyUserId());
                    holiday.setApplyUserName(sysUser.getNickName());
@@ -87,8 +86,7 @@ public class CurrentRiskUserHolidayController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:export')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, CurrentRiskUserHoliday currentRiskUserHoliday)
    {
    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, "现状风险巡查用户请假数据");
@@ -99,8 +97,7 @@ public class CurrentRiskUserHolidayController extends BaseController
     */
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(currentRiskUserHolidayService.selectCurrentRiskUserHolidayById(id));
    }

@@ -110,8 +107,7 @@ public class CurrentRiskUserHolidayController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:add')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.INSERT)
    @PostMapping("/save")
    public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
    {
    public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) {
        if (null == currentRiskUserHoliday.getId()) {
            currentRiskUserHoliday.setApplyUserId(getUserId());
            currentRiskUserHoliday.setApplyTime(new Date());
@@ -132,8 +128,7 @@ public class CurrentRiskUserHolidayController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:edit')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
    {
    public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) {
        return toAjax(currentRiskUserHolidayService.updateCurrentRiskUserHoliday(currentRiskUserHoliday));
    }

@@ -143,8 +138,7 @@ public class CurrentRiskUserHolidayController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:remove')")
    @Log(title = "现状风险巡查用户请假", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(currentRiskUserHolidayService.deleteCurrentRiskUserHolidayByIds(ids));
    }
}
+20 −17
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@ package com.censoft.censoftrongtong.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import com.censoft.censoftrongtong.domain.LedgerProject;
import com.censoft.censoftrongtong.service.ILedgerProjectService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -29,17 +32,22 @@ import com.ruoyi.common.core.page.TableDataInfo;
 */
@RestController
@RequestMapping(value = {"/risk/riskUserPatrol", "/app-api/risk/riskUserPatrol"})
public class CurrentRiskUserPatrolController extends BaseController
{
public class CurrentRiskUserPatrolController extends BaseController {
    @Autowired
    private ICurrentRiskUserPatrolService currentRiskUserPatrolService;

    @GetMapping("/getPatrolProjectList")
    private List<LedgerProject> getPatrolProjectList() {
        List<LedgerProject> list = currentRiskUserPatrolService.getPatrolProjectList(getUserId());
        return list;
    }


    /**
     * 查询巡查执行管理列表
     */
    @GetMapping("/list")
    public TableDataInfo list(CurrentRiskUserPatrol currentRiskUserPatrol)
    {
    public TableDataInfo list(CurrentRiskUserPatrol currentRiskUserPatrol) {
        startPage();
        List<CurrentRiskUserPatrol> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
        return getDataTable(list);
@@ -51,8 +59,7 @@ public class CurrentRiskUserPatrolController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:export')")
    @Log(title = "巡查执行管理", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, CurrentRiskUserPatrol currentRiskUserPatrol)
    {
    public void export(HttpServletResponse response, CurrentRiskUserPatrol currentRiskUserPatrol) {
        List<CurrentRiskUserPatrol> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
        ExcelUtil<CurrentRiskUserPatrol> util = new ExcelUtil<CurrentRiskUserPatrol>(CurrentRiskUserPatrol.class);
        util.exportExcel(response, list, "巡查执行管理数据");
@@ -63,8 +70,7 @@ public class CurrentRiskUserPatrolController extends BaseController
     */
    @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(currentRiskUserPatrolService.selectCurrentRiskUserPatrolById(id));
    }

@@ -74,8 +80,7 @@ public class CurrentRiskUserPatrolController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:add')")
    @Log(title = "巡查执行管理", businessType = BusinessType.INSERT)
    @PostMapping("save")
    public AjaxResult add(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol)
    {
    public AjaxResult add(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) {
        return toAjax(currentRiskUserPatrolService.insertCurrentRiskUserPatrol(currentRiskUserPatrol));
    }

@@ -85,8 +90,7 @@ public class CurrentRiskUserPatrolController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:edit')")
    @Log(title = "巡查执行管理", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol)
    {
    public AjaxResult edit(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) {
        return toAjax(currentRiskUserPatrolService.updateCurrentRiskUserPatrol(currentRiskUserPatrol));
    }

@@ -96,8 +100,7 @@ public class CurrentRiskUserPatrolController extends BaseController
    @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:remove')")
    @Log(title = "巡查执行管理", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(currentRiskUserPatrolService.deleteCurrentRiskUserPatrolByIds(ids));
    }
}
+3 −3
Original line number Diff line number Diff line
@@ -64,11 +64,11 @@ public class CurrentRiskUserPatrolDetailController extends BaseController
     * 查询现状风险用户巡查明细列表
     */
    @GetMapping("/detailList")
    public TableDataInfo detailList(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
     public TableDataInfo detailList(RiskExistingListPatrolVO query)
    {
        startPage();
        String patrolId = String.valueOf(currentRiskUserPatrolDetail.getPatrolId());
        List<RiskExistingListPatrolVO> list = currentRiskUserPatrolDetailService.riskExistingLists(patrolId);
        query.setUserId(getUserId());
        List<RiskExistingListPatrolVO> list = currentRiskUserPatrolDetailService.riskExistingLists(query);
        return getDataTable(list);
    }

+2 −0
Original line number Diff line number Diff line
@@ -10,4 +10,6 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{
    private String patrolId;

    private String patrolStatus;

    private Long projectId;
}
+1 −1
Original line number Diff line number Diff line
@@ -62,5 +62,5 @@ public interface CurrentRiskUserPatrolDetailMapper extends MPJBaseMapper<Curren
     */
    public int deleteCurrentRiskUserPatrolDetailByIds(Long[] ids);

    List<RiskExistingListPatrolVO> riskExistingLists(@Param("patrolId") String patrolId);
    List<RiskExistingListPatrolVO> riskExistingLists(RiskExistingListPatrolVO model);
}
Loading