Commit d767e720 authored by 陈晓晋's avatar 陈晓晋

Merge branch 'xjchen' into 'develop'

固有风险pc接口编写20230721

See merge request !17
parents 934898ea fb30ad0d
...@@ -48,6 +48,18 @@ public class LedgerRoomController extends BaseController ...@@ -48,6 +48,18 @@ public class LedgerRoomController extends BaseController
return success(list); return success(list);
} }
/**
* 查询基础数据-楼层列表
*/
@GetMapping("/listPc")
public TableDataInfo listPc(LedgerRoom ledgerRoom)
{
startPage();
ledgerRoom.setDelFlag("0");
List<LedgerRoom> list =ledgerRoomService.selectLedgerRoomList(ledgerRoom);
return getDataTable(list);
}
/** /**
* 导出基础数据-楼层列表 * 导出基础数据-楼层列表
*/ */
......
...@@ -29,7 +29,7 @@ import com.ruoyi.common.core.page.TableDataInfo; ...@@ -29,7 +29,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-06-26 * @date 2023-06-26
*/ */
@RestController @RestController
@RequestMapping("/system/risk/inherent/list") @RequestMapping("/system/risk/inherentDB")
public class RiskInherentListController extends BaseController public class RiskInherentListController extends BaseController
{ {
@Autowired @Autowired
......
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.RiskPlanInherentList;
import com.censoft.censoftrongtong.service.IRiskPlanInherentListService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 固有风险信息Controller
*
* @author ruoyi
* @date 2023-07-20
*/
@RestController
@RequestMapping("/system/risk/inherent")
public class RiskPlanInherentListController extends BaseController
{
@Autowired
private IRiskPlanInherentListService riskPlanInherentListService;
/**
* 查询固有风险信息列表
*/
@PreAuthorize("@ss.hasPermi('system:inherent:list')")
@GetMapping("/list")
public TableDataInfo list(RiskPlanInherentList riskPlanInherentList)
{
startPage();
List<RiskPlanInherentList> list = riskPlanInherentListService.selectRiskPlanInherentListList(riskPlanInherentList);
return getDataTable(list);
}
/**
* 导出固有风险信息列表
*/
@PreAuthorize("@ss.hasPermi('system:inherent:export')")
@Log(title = "固有风险信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, RiskPlanInherentList riskPlanInherentList)
{
List<RiskPlanInherentList> list = riskPlanInherentListService.selectRiskPlanInherentListList(riskPlanInherentList);
ExcelUtil<RiskPlanInherentList> util = new ExcelUtil<RiskPlanInherentList>(RiskPlanInherentList.class);
util.exportExcel(response, list, "固有风险信息数据");
}
/**
* 获取固有风险信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:inherent:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(riskPlanInherentListService.selectRiskPlanInherentListById(id));
}
/**
* 新增固有风险信息
*/
@PreAuthorize("@ss.hasPermi('system:inherent:add')")
@Log(title = "固有风险信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody RiskPlanInherentList riskPlanInherentList)
{
return toAjax(riskPlanInherentListService.insertRiskPlanInherentList(riskPlanInherentList));
}
/**
* 修改固有风险信息
*/
@PreAuthorize("@ss.hasPermi('system:inherent:edit')")
@Log(title = "固有风险信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody RiskPlanInherentList riskPlanInherentList)
{
return toAjax(riskPlanInherentListService.updateRiskPlanInherentList(riskPlanInherentList));
}
/**
* 删除固有风险信息
*/
@PreAuthorize("@ss.hasPermi('system:inherent:remove')")
@Log(title = "固有风险信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(riskPlanInherentListService.deleteRiskPlanInherentListByIds(ids));
}
}
...@@ -191,4 +191,37 @@ public class RiskPlanInherentList extends BaseEntity { ...@@ -191,4 +191,37 @@ public class RiskPlanInherentList extends BaseEntity {
*/ */
@TableField("del_flag") @TableField("del_flag")
private String delFlag; private String delFlag;
/**
* 楼栋ID
*/
@TableField(exist = false)
private String buildingId;
/**
* 楼栋名称
*/
@TableField(exist = false)
private String buildingName;
/**
* 楼层ID
*/
@TableField(exist = false)
private String floorId;
/**
* 楼层名称
*/
@TableField(exist = false)
private String floorName;
/**
* 用户名
*/
@TableField(exist = false)
private String userName;
/**
* 房间名称
*/
@TableField(exist = false)
private String roomName;
} }
...@@ -18,6 +18,56 @@ import java.util.List; ...@@ -18,6 +18,56 @@ import java.util.List;
*/ */
public interface RiskPlanInherentListMapper extends BaseMapper<RiskPlanInherentList> public interface RiskPlanInherentListMapper extends BaseMapper<RiskPlanInherentList>
{ {
/**
* 查询固有风险清单库
*
* @param id 固有风险清单库主键
* @return 固有风险清单库
*/
public RiskPlanInherentList selectRiskPlanInherentListById(Long id);
/**
* 查询固有风险清单库列表
*
* @param riskPlanInherentList 固有风险清单库
* @return 固有风险清单库集合
*/
public List<RiskPlanInherentList> selectRiskPlanInherentListList(RiskPlanInherentList riskPlanInherentList);
/**
* 新增固有风险清单库
*
* @param riskPlanInherentList 固有风险清单库
* @return 结果
*/
public int insertRiskPlanInherentList(RiskPlanInherentList riskPlanInherentList);
/**
* 修改固有风险清单库
*
* @param riskPlanInherentList 固有风险清单库
* @return 结果
*/
public int updateRiskPlanInherentList(RiskPlanInherentList riskPlanInherentList);
/**
* 删除固有风险清单库
*
* @param id 固有风险清单库主键
* @return 结果
*/
public int deleteRiskPlanInherentListById(Long id);
/**
* 批量删除固有风险清单库
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteRiskPlanInherentListByIds(Long[] ids);
List<RiskPlanAppInherentListDto> getInherentListByPlanId(@Param("projectId") Long projectId, @Param("buildingId") Long buildingId, @Param("floorId") Long floorId, @Param("roomId") Long roomId); List<RiskPlanAppInherentListDto> getInherentListByPlanId(@Param("projectId") Long projectId, @Param("buildingId") Long buildingId, @Param("floorId") Long floorId, @Param("roomId") Long roomId);
RiskPlanAppInherentListDetailsDto getRiskPlanAppInherentListDetailsDtoByInherentId(@Param("inherentId") Long inherentId); RiskPlanAppInherentListDetailsDto getRiskPlanAppInherentListDetailsDtoByInherentId(@Param("inherentId") Long inherentId);
......
...@@ -15,6 +15,54 @@ import java.util.List; ...@@ -15,6 +15,54 @@ import java.util.List;
public interface IRiskPlanInherentListService extends IService<RiskPlanInherentList> public interface IRiskPlanInherentListService extends IService<RiskPlanInherentList>
{ {
/**
* 查询固有风险清单库
*
* @param id 固有风险清单库主键
* @return 固有风险清单库
*/
public RiskPlanInherentList selectRiskPlanInherentListById(Long id);
/**
* 查询固有风险清单库列表
*
* @param riskPlanInherentList 固有风险清单库
* @return 固有风险清单库集合
*/
public List<RiskPlanInherentList> selectRiskPlanInherentListList(RiskPlanInherentList riskPlanInherentList);
/**
* 新增固有风险清单库
*
* @param riskPlanInherentList 固有风险清单库
* @return 结果
*/
public int insertRiskPlanInherentList(RiskPlanInherentList riskPlanInherentList);
/**
* 修改固有风险清单库
*
* @param riskPlanInherentList 固有风险清单库
* @return 结果
*/
public int updateRiskPlanInherentList(RiskPlanInherentList riskPlanInherentList);
/**
* 批量删除固有风险清单库
*
* @param ids 需要删除的固有风险清单库主键集合
* @return 结果
*/
public int deleteRiskPlanInherentListByIds(Long[] ids);
/**
* 删除固有风险清单库信息
*
* @param id 固有风险清单库主键
* @return 结果
*/
public int deleteRiskPlanInherentListById(Long id);
List<RiskPlanAppInherentListDto> getInherentListByPlanId(Long projectId, Long buildingId, Long floorId, Long roomId); List<RiskPlanAppInherentListDto> getInherentListByPlanId(Long projectId, Long buildingId, Long floorId, Long roomId);
Boolean saveRiskInherentListSaveDto(RiskInherentListSaveDto saveDto); Boolean saveRiskInherentListSaveDto(RiskInherentListSaveDto saveDto);
......
...@@ -227,4 +227,85 @@ public class RiskPlanInherentListServiceImpl ...@@ -227,4 +227,85 @@ public class RiskPlanInherentListServiceImpl
public RiskNotificationExportWordDto getRiskNotificationExportWordDto(Long inherentId) { public RiskNotificationExportWordDto getRiskNotificationExportWordDto(Long inherentId) {
return riskPlanInherentListMapper.getRiskNotificationExportWordDto(inherentId); return riskPlanInherentListMapper.getRiskNotificationExportWordDto(inherentId);
} }
/**
* 查询固有风险清单库
*
* @param id 固有风险清单库主键
* @return 固有风险清单库
*/
@Override
public RiskPlanInherentList selectRiskPlanInherentListById(Long id)
{
return riskPlanInherentListMapper.selectRiskPlanInherentListById(id);
}
/**
* 查询固有风险清单库列表
*
* @param riskPlanInherentList 固有风险清单库
* @return 固有风险清单库
*/
@Override
public List<RiskPlanInherentList> selectRiskPlanInherentListList(RiskPlanInherentList riskPlanInherentList)
{
return riskPlanInherentListMapper.selectRiskPlanInherentListList(riskPlanInherentList);
}
/**
* 新增固有风险清单库
*
* @param riskPlanInherentList 固有风险清单库
* @return 结果
*/
@Override
public int insertRiskPlanInherentList(RiskPlanInherentList riskPlanInherentList)
{
riskPlanInherentList.setCreateTime(DateUtils.getNowDate());
return riskPlanInherentListMapper.insertRiskPlanInherentList(riskPlanInherentList);
}
/**
* 修改固有风险清单库
*
* @param riskPlanInherentList 固有风险清单库
* @return 结果
*/
@Override
public int updateRiskPlanInherentList(RiskPlanInherentList riskPlanInherentList)
{
riskPlanInherentList.setUpdateTime(DateUtils.getNowDate());
return riskPlanInherentListMapper.updateRiskPlanInherentList(riskPlanInherentList);
}
/**
* 批量删除固有风险清单库
*
* @param ids 需要删除的固有风险清单库主键
* @return 结果
*/
@Override
public int deleteRiskPlanInherentListByIds(Long[] ids)
{
return riskPlanInherentListMapper.deleteRiskPlanInherentListByIds(ids);
}
/**
* 删除固有风险清单库信息
*
* @param id 固有风险清单库主键
* @return 结果
*/
@Override
public int deleteRiskPlanInherentListById(Long id)
{
return riskPlanInherentListMapper.deleteRiskPlanInherentListById(id);
}
} }
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