Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskDetailAbnormalController.java +26 −5 Original line number Diff line number Diff line package com.censoft.censoftrongtong.controller; import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail; import com.censoft.censoftrongtong.domain.RiskPlanExistingList; import com.censoft.censoftrongtong.service.ICurrentRiskDetailAbnormalService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService; import com.censoft.censoftrongtong.service.IRiskPlanExistingListService; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.core.controller.BaseController; Loading @@ -13,6 +17,7 @@ import com.ruoyi.system.service.ISysUploadFileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; Loading @@ -34,6 +39,11 @@ public class CurrentRiskDetailAbnormalController extends BaseController { @Autowired private ICurrentRiskDetailAbnormalService currentRiskDetailAbnormalService; @Autowired private ICurrentRiskUserPatrolDetailService currentRiskUserPatrolDetailService; @Autowired private IRiskPlanExistingListService riskPlanExistingListService; @Resource private ISysUploadFileService uploadFileService; Loading @@ -46,7 +56,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 查询现状风险巡查异常信息列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:list')") @GetMapping("/list") public TableDataInfo list(CurrentRiskDetailAbnormal currentRiskDetailAbnormal) { Loading @@ -58,7 +67,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 导出现状风险巡查异常信息列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:export')") @Log(title = "现状风险巡查异常信息", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, CurrentRiskDetailAbnormal currentRiskDetailAbnormal) Loading @@ -71,7 +79,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 获取现状风险巡查异常信息详细信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { Loading @@ -81,7 +88,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 新增现状风险巡查异常信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add11')") @Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT) @PostMapping("/save1") public AjaxResult add1(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal) Loading @@ -95,8 +101,10 @@ public class CurrentRiskDetailAbnormalController extends BaseController // @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')") @Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT) @PostMapping("/save") @Transactional public AjaxResult add( CurrentRiskDetailAbnormal currentRiskDetailAbnormal , @RequestParam(value = "file[]", required = false) MultipartFile[] file) { CurrentRiskUserPatrolDetail detail= currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailById(currentRiskDetailAbnormal.getPatrolDetailId()); if (file != null) { String userId = getUserId() + ""; String pictureFileIds = Arrays.stream(file) Loading @@ -105,7 +113,20 @@ public class CurrentRiskDetailAbnormalController extends BaseController .collect(Collectors.joining(",")); currentRiskDetailAbnormal.setAbnormalPics(pictureFileIds); } return toAjax(currentRiskDetailAbnormalService.insertCurrentRiskDetailAbnormal(currentRiskDetailAbnormal)); int rs=currentRiskDetailAbnormalService.insertCurrentRiskDetailAbnormal(currentRiskDetailAbnormal); if (rs>0) { //重新评估风险 ---修改现状风险分数和等级 RiskPlanExistingList risk=new RiskPlanExistingList(); risk.setId(detail.getCurrentRiskId()); risk.setLevelScore(currentRiskDetailAbnormal.getScore()); riskPlanExistingListService.updateRiskPlanExistingList(risk); riskPlanExistingListService.getRiskLevelByScoreAndUpd(currentRiskDetailAbnormal.getBuildingId(),currentRiskDetailAbnormal.getScore()); //修改异常状态 detail.setStatus("1"); currentRiskUserPatrolDetailService.updateCurrentRiskUserPatrolDetail(detail); } return toAjax(rs); } /** Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskTask.java +5 −3 Original line number Diff line number Diff line Loading @@ -5,12 +5,14 @@ import com.censoft.censoftrongtong.domain.CurrentRiskPostList; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail; import com.censoft.censoftrongtong.enums.CycleType; import com.censoft.censoftrongtong.service.*; import com.censoft.censoftrongtong.service.ICommonMessageInfoService; import com.censoft.censoftrongtong.service.ICurrentRiskPostListService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.system.service.ISysUserService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; Loading Loading @@ -118,7 +120,7 @@ public class CurrentRiskTask { commonMessageInfoService.insertBacklogInfo(String.valueOf(currentRiskUserPatrol.getId()), "risk_confirm_sub", String.valueOf(currentRiskUserPatrol.getId()), "巡查任务", "巡查", "您有一条新的巡查任务待确认", "0", user.getUserName(), "巡查任务", "" , "patrolExecute", user.getNickName()); "巡查任务", "patrolExecute" , "patrolExecute", user.getUserName()); } } Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserHolidayController.java +0 −7 Original line number Diff line number Diff line Loading @@ -12,10 +12,8 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.web.domain.server.Sys; import com.ruoyi.system.service.ISysUserService; import lombok.AllArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; Loading Loading @@ -83,7 +81,6 @@ 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) { Loading @@ -95,7 +92,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 获取现状风险巡查用户请假详细信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(currentRiskUserHolidayService.selectCurrentRiskUserHolidayById(id)); Loading @@ -104,7 +100,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 新增现状风险巡查用户请假 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:add')") @Log(title = "现状风险巡查用户请假", businessType = BusinessType.INSERT) @PostMapping("/save") public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) { Loading @@ -130,7 +125,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 修改现状风险巡查用户请假 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:edit')") @Log(title = "现状风险巡查用户请假", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) { Loading @@ -140,7 +134,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 删除现状风险巡查用户请假 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:remove')") @Log(title = "现状风险巡查用户请假", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolController.java +23 −7 Original line number Diff line number Diff line package com.censoft.censoftrongtong.controller; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; Loading @@ -13,12 +14,15 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.service.ISysUploadFileService; import lombok.AllArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * 巡查执行管理Controller Loading @@ -33,6 +37,9 @@ public class CurrentRiskUserPatrolController extends BaseController { private ICurrentRiskUserPatrolService currentRiskUserPatrolService; private ICurrentRiskDetailAbnormalService currentRiskDetailAbnormalService; @Resource private ISysUploadFileService uploadFileService; @GetMapping("/getPatrolProjectList") public AjaxResult getPatrolProjectList() { Loading @@ -51,10 +58,17 @@ public class CurrentRiskUserPatrolController extends BaseController { return getDataTable(list); } @GetMapping("/detailList") public TableDataInfo detailList(CurrentRiskUserPatrol currentRiskUserPatrol) { startPage(); List<CurrentRiskUserPatrolVO> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolDetailList(currentRiskUserPatrol); return getDataTable(list); } /** * 导出巡查执行管理列表 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:export')") @Log(title = "巡查执行管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, CurrentRiskUserPatrol currentRiskUserPatrol) { Loading @@ -66,7 +80,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 获取巡查执行管理详细信息 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(currentRiskUserPatrolService.selectCurrentRiskUserPatrolById(id)); Loading @@ -82,8 +95,14 @@ public class CurrentRiskUserPatrolController extends BaseController { if(currentRiskUserPatrolVO != null){ if (currentRiskUserPatrolVO.getExceptStatus()!=null&¤tRiskUserPatrolVO.getExceptStatus().equals("1")) {//如果有异常信息加入详情 QueryWrapper<CurrentRiskDetailAbnormal> queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(CurrentRiskDetailAbnormal::getPatrolId,id); queryWrapper.lambda().eq(CurrentRiskDetailAbnormal::getPatrolId,currentRiskUserPatrolVO.getId()); CurrentRiskDetailAbnormal currentRiskDetailAbnormal= currentRiskDetailAbnormalService.getOne(queryWrapper); if (!StrUtil.hasEmpty(currentRiskDetailAbnormal.getAbnormalPics())) { List<Long> fileIds = Arrays.stream(currentRiskDetailAbnormal.getAbnormalPics().split(",")) .map(Long::parseLong) .collect(Collectors.toList()); currentRiskDetailAbnormal.setFiles(uploadFileService.selectSysFileByFileIds(fileIds)); } if (currentRiskDetailAbnormal!=null) { currentRiskUserPatrolVO.setCurrentailAbnormal(currentRiskDetailAbnormal); } Loading @@ -95,7 +114,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 新增巡查执行管理 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:add')") @Log(title = "巡查执行管理", businessType = BusinessType.INSERT) @PostMapping("save") public AjaxResult add(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) { Loading @@ -105,7 +123,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 修改巡查执行管理 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:edit')") @Log(title = "巡查执行管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) { Loading @@ -115,7 +132,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 删除巡查执行管理 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:remove')") @Log(title = "巡查执行管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolDetailController.java +12 −27 Original line number Diff line number Diff line package com.censoft.censoftrongtong.controller; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletResponse; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail; import com.censoft.censoftrongtong.domain.RiskExistingListPatrolVO; import com.censoft.censoftrongtong.domain.req.CurrentRiskUserPatrolDetailUpdateStatusReqVO; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; 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.core.page.TableDataInfo; 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; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * 现状风险用户巡查明细Controller Loading @@ -50,7 +41,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 查询现状风险用户巡查明细列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:list')") @GetMapping("/list") public TableDataInfo list(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) { Loading Loading @@ -101,7 +91,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 导出现状风险用户巡查明细列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:export')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) Loading @@ -114,7 +103,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 获取现状风险用户巡查明细详细信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { Loading @@ -124,7 +112,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 新增现状风险用户巡查明细 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:add')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.INSERT) @PostMapping("save") public AjaxResult add(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) Loading @@ -135,7 +122,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 修改现状风险用户巡查明细 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:edit')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) Loading @@ -146,7 +132,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 删除现状风险用户巡查明细 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:remove')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) Loading Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskDetailAbnormalController.java +26 −5 Original line number Diff line number Diff line package com.censoft.censoftrongtong.controller; import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail; import com.censoft.censoftrongtong.domain.RiskPlanExistingList; import com.censoft.censoftrongtong.service.ICurrentRiskDetailAbnormalService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService; import com.censoft.censoftrongtong.service.IRiskPlanExistingListService; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.core.controller.BaseController; Loading @@ -13,6 +17,7 @@ import com.ruoyi.system.service.ISysUploadFileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; Loading @@ -34,6 +39,11 @@ public class CurrentRiskDetailAbnormalController extends BaseController { @Autowired private ICurrentRiskDetailAbnormalService currentRiskDetailAbnormalService; @Autowired private ICurrentRiskUserPatrolDetailService currentRiskUserPatrolDetailService; @Autowired private IRiskPlanExistingListService riskPlanExistingListService; @Resource private ISysUploadFileService uploadFileService; Loading @@ -46,7 +56,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 查询现状风险巡查异常信息列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:list')") @GetMapping("/list") public TableDataInfo list(CurrentRiskDetailAbnormal currentRiskDetailAbnormal) { Loading @@ -58,7 +67,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 导出现状风险巡查异常信息列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:export')") @Log(title = "现状风险巡查异常信息", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, CurrentRiskDetailAbnormal currentRiskDetailAbnormal) Loading @@ -71,7 +79,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 获取现状风险巡查异常信息详细信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { Loading @@ -81,7 +88,6 @@ public class CurrentRiskDetailAbnormalController extends BaseController /** * 新增现状风险巡查异常信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add11')") @Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT) @PostMapping("/save1") public AjaxResult add1(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal) Loading @@ -95,8 +101,10 @@ public class CurrentRiskDetailAbnormalController extends BaseController // @PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')") @Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT) @PostMapping("/save") @Transactional public AjaxResult add( CurrentRiskDetailAbnormal currentRiskDetailAbnormal , @RequestParam(value = "file[]", required = false) MultipartFile[] file) { CurrentRiskUserPatrolDetail detail= currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailById(currentRiskDetailAbnormal.getPatrolDetailId()); if (file != null) { String userId = getUserId() + ""; String pictureFileIds = Arrays.stream(file) Loading @@ -105,7 +113,20 @@ public class CurrentRiskDetailAbnormalController extends BaseController .collect(Collectors.joining(",")); currentRiskDetailAbnormal.setAbnormalPics(pictureFileIds); } return toAjax(currentRiskDetailAbnormalService.insertCurrentRiskDetailAbnormal(currentRiskDetailAbnormal)); int rs=currentRiskDetailAbnormalService.insertCurrentRiskDetailAbnormal(currentRiskDetailAbnormal); if (rs>0) { //重新评估风险 ---修改现状风险分数和等级 RiskPlanExistingList risk=new RiskPlanExistingList(); risk.setId(detail.getCurrentRiskId()); risk.setLevelScore(currentRiskDetailAbnormal.getScore()); riskPlanExistingListService.updateRiskPlanExistingList(risk); riskPlanExistingListService.getRiskLevelByScoreAndUpd(currentRiskDetailAbnormal.getBuildingId(),currentRiskDetailAbnormal.getScore()); //修改异常状态 detail.setStatus("1"); currentRiskUserPatrolDetailService.updateCurrentRiskUserPatrolDetail(detail); } return toAjax(rs); } /** Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskTask.java +5 −3 Original line number Diff line number Diff line Loading @@ -5,12 +5,14 @@ import com.censoft.censoftrongtong.domain.CurrentRiskPostList; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail; import com.censoft.censoftrongtong.enums.CycleType; import com.censoft.censoftrongtong.service.*; import com.censoft.censoftrongtong.service.ICommonMessageInfoService; import com.censoft.censoftrongtong.service.ICurrentRiskPostListService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.system.service.ISysUserService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; Loading Loading @@ -118,7 +120,7 @@ public class CurrentRiskTask { commonMessageInfoService.insertBacklogInfo(String.valueOf(currentRiskUserPatrol.getId()), "risk_confirm_sub", String.valueOf(currentRiskUserPatrol.getId()), "巡查任务", "巡查", "您有一条新的巡查任务待确认", "0", user.getUserName(), "巡查任务", "" , "patrolExecute", user.getNickName()); "巡查任务", "patrolExecute" , "patrolExecute", user.getUserName()); } } Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserHolidayController.java +0 −7 Original line number Diff line number Diff line Loading @@ -12,10 +12,8 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.web.domain.server.Sys; import com.ruoyi.system.service.ISysUserService; import lombok.AllArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; Loading Loading @@ -83,7 +81,6 @@ 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) { Loading @@ -95,7 +92,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 获取现状风险巡查用户请假详细信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(currentRiskUserHolidayService.selectCurrentRiskUserHolidayById(id)); Loading @@ -104,7 +100,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 新增现状风险巡查用户请假 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:add')") @Log(title = "现状风险巡查用户请假", businessType = BusinessType.INSERT) @PostMapping("/save") public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) { Loading @@ -130,7 +125,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 修改现状风险巡查用户请假 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:edit')") @Log(title = "现状风险巡查用户请假", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) { Loading @@ -140,7 +134,6 @@ public class CurrentRiskUserHolidayController extends BaseController { /** * 删除现状风险巡查用户请假 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:remove')") @Log(title = "现状风险巡查用户请假", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolController.java +23 −7 Original line number Diff line number Diff line package com.censoft.censoftrongtong.controller; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; Loading @@ -13,12 +14,15 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.service.ISysUploadFileService; import lombok.AllArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * 巡查执行管理Controller Loading @@ -33,6 +37,9 @@ public class CurrentRiskUserPatrolController extends BaseController { private ICurrentRiskUserPatrolService currentRiskUserPatrolService; private ICurrentRiskDetailAbnormalService currentRiskDetailAbnormalService; @Resource private ISysUploadFileService uploadFileService; @GetMapping("/getPatrolProjectList") public AjaxResult getPatrolProjectList() { Loading @@ -51,10 +58,17 @@ public class CurrentRiskUserPatrolController extends BaseController { return getDataTable(list); } @GetMapping("/detailList") public TableDataInfo detailList(CurrentRiskUserPatrol currentRiskUserPatrol) { startPage(); List<CurrentRiskUserPatrolVO> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolDetailList(currentRiskUserPatrol); return getDataTable(list); } /** * 导出巡查执行管理列表 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:export')") @Log(title = "巡查执行管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, CurrentRiskUserPatrol currentRiskUserPatrol) { Loading @@ -66,7 +80,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 获取巡查执行管理详细信息 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(currentRiskUserPatrolService.selectCurrentRiskUserPatrolById(id)); Loading @@ -82,8 +95,14 @@ public class CurrentRiskUserPatrolController extends BaseController { if(currentRiskUserPatrolVO != null){ if (currentRiskUserPatrolVO.getExceptStatus()!=null&¤tRiskUserPatrolVO.getExceptStatus().equals("1")) {//如果有异常信息加入详情 QueryWrapper<CurrentRiskDetailAbnormal> queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(CurrentRiskDetailAbnormal::getPatrolId,id); queryWrapper.lambda().eq(CurrentRiskDetailAbnormal::getPatrolId,currentRiskUserPatrolVO.getId()); CurrentRiskDetailAbnormal currentRiskDetailAbnormal= currentRiskDetailAbnormalService.getOne(queryWrapper); if (!StrUtil.hasEmpty(currentRiskDetailAbnormal.getAbnormalPics())) { List<Long> fileIds = Arrays.stream(currentRiskDetailAbnormal.getAbnormalPics().split(",")) .map(Long::parseLong) .collect(Collectors.toList()); currentRiskDetailAbnormal.setFiles(uploadFileService.selectSysFileByFileIds(fileIds)); } if (currentRiskDetailAbnormal!=null) { currentRiskUserPatrolVO.setCurrentailAbnormal(currentRiskDetailAbnormal); } Loading @@ -95,7 +114,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 新增巡查执行管理 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:add')") @Log(title = "巡查执行管理", businessType = BusinessType.INSERT) @PostMapping("save") public AjaxResult add(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) { Loading @@ -105,7 +123,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 修改巡查执行管理 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:edit')") @Log(title = "巡查执行管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) { Loading @@ -115,7 +132,6 @@ public class CurrentRiskUserPatrolController extends BaseController { /** * 删除巡查执行管理 */ @PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:remove')") @Log(title = "巡查执行管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolDetailController.java +12 −27 Original line number Diff line number Diff line package com.censoft.censoftrongtong.controller; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletResponse; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol; import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail; import com.censoft.censoftrongtong.domain.RiskExistingListPatrolVO; import com.censoft.censoftrongtong.domain.req.CurrentRiskUserPatrolDetailUpdateStatusReqVO; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService; import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; 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.core.page.TableDataInfo; 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; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * 现状风险用户巡查明细Controller Loading @@ -50,7 +41,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 查询现状风险用户巡查明细列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:list')") @GetMapping("/list") public TableDataInfo list(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) { Loading Loading @@ -101,7 +91,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 导出现状风险用户巡查明细列表 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:export')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) Loading @@ -114,7 +103,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 获取现状风险用户巡查明细详细信息 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { Loading @@ -124,7 +112,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 新增现状风险用户巡查明细 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:add')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.INSERT) @PostMapping("save") public AjaxResult add(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) Loading @@ -135,7 +122,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 修改现状风险用户巡查明细 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:edit')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail) Loading @@ -146,7 +132,6 @@ public class CurrentRiskUserPatrolDetailController extends BaseController /** * 删除现状风险用户巡查明细 */ @PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:remove')") @Log(title = "现状风险用户巡查明细", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) Loading