Commit 2f7a69e6 authored by 高东东's avatar 高东东

添加用户token验证

parent 79ab2763
......@@ -16,6 +16,7 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IAccidentTypeService;
import com.yeejoin.amos.fas.business.util.CommonPageParamUtil;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -40,6 +41,7 @@ public class AccidentTypeController extends BaseController {
* @param id
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST",value = "事故类型查询", notes = "事故类型查询")
@RequestMapping(value = "/pagelist", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryRiskLevelPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
......@@ -59,6 +61,7 @@ public class AccidentTypeController extends BaseController {
* @param id
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET",value = "事故类型查询不分页", notes = "事故类型查询不分页")
@RequestMapping(value = "/all-list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRiskLevel() {
......@@ -73,6 +76,7 @@ public class AccidentTypeController extends BaseController {
* @param param
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "事故类型新增及维护", notes = "事故类型新增及维护")
@RequestMapping(value = "/editAccidentType", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse checkPlanAdd(@ApiParam(value = "事故类型对象", required = true) @RequestBody AccidentType param) {
......@@ -100,6 +104,7 @@ public class AccidentTypeController extends BaseController {
* @param param
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "删除事故类型", notes = "删除事故类型")
@RequestMapping(value = "/deleteAccidentTypeById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deletePlanById(@ApiParam(value = "事故类型ID", required = true) @RequestBody Long[] param) {
......
......@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IAlarmService;
import com.yeejoin.amos.fas.business.util.CommonPageParamUtil;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -34,6 +35,7 @@ public class AlarmController extends BaseController {
* @param id
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST",value = "报警信息查分页询", notes = "报警信息查询")
@RequestMapping(value = "/pagelist", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryAlarmPage(
......
......@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.param.MessageParam;
import com.yeejoin.amos.fas.business.service.intfc.IBizMessageService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -29,6 +30,7 @@ public class BizMessageController extends BaseController{
@Autowired
IBizMessageService iBizMessageService;
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "分页查询消息", notes = "分页查询消息")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -46,6 +48,7 @@ public class BizMessageController extends BaseController{
return CommonResponseUtil.success(iBizMessageService.queryForPage(StringUtils.trimToNull(time), StringUtils.trimToNull(type), StringUtils.trimToNull(title),StringUtils.trimToNull( compCode), commonPageable));
}
@Permission
@ApiOperation(httpMethod = "POST",value = "分页查询消息", notes = "分页查询消息")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse forPagePOST(
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.param.PointListParam;
import com.yeejoin.amos.fas.business.param.QueryParamUtil;
import com.yeejoin.amos.fas.business.service.intfc.ICommonService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -42,6 +43,7 @@ public class CommonController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "根据当前用户获取公司下部门信息", notes = "根据当前用户获取公司下部门信息")
@RequestMapping(value = "/deptment/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getDeptments() {
......@@ -108,6 +110,7 @@ public class CommonController extends BaseController {
* @param
* @return
*/
@Permission
@ApiOperation(value = "查询巡检点信息", notes = "查询巡检点信息")
@PostMapping(value = "/pointList", produces = "application/json;charset=UTF-8")
public CommonResponse getPoints(
......@@ -133,6 +136,7 @@ public class CommonController extends BaseController {
* @return
*/
//@Authorization(ingore = true)
@Permission
@ApiOperation(value = "查询巡检点项信息", notes = "查询巡检点项信息")
@PostMapping(value = "/pointInputlist", produces = "application/json;charset=UTF-8")
public CommonResponse getPointInputs(
......@@ -156,6 +160,7 @@ public class CommonController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "根据部门获取部门人员信息", notes = "根据部门获取部门人员信息")
@RequestMapping(value = "/{departmentId}/user/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getUsers(@ApiParam(value = "部门ID", required = true) @PathVariable String departmentId) {
......@@ -166,6 +171,7 @@ public class CommonController extends BaseController {
return CommonResponseUtil.success(users);
}
@Permission
@ApiOperation(httpMethod = "GET", value = "获取公司下人员列表", notes = "获取公司下人员列表")
@GetMapping(value = "/user/list", produces = "application/json;charset=UTF-8")
public CommonResponse getAllUser() {
......
......@@ -5,6 +5,8 @@ import java.util.Map;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import io.swagger.annotations.Api;
......@@ -15,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
@Api("获取当前用户信息api")
public class CurCompanyController extends BaseController {
@Permission
@ApiOperation(httpMethod = "GET",value = "获取当前用户信息", notes = "获取当前用户信息")
@RequestMapping(value = "/current", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse current() {
......
package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import io.swagger.annotations.Api;
......@@ -24,6 +25,7 @@ public class DataRefreshController {
* 全景监控执行数据刷新
* @return success
*/
@Permission
@ApiOperation(value = "全景监控执行数据刷新",notes = "check-巡检记录,planTask-执行数据")
@GetMapping(value = "refresh/{dataType}")
public CommonResponse checkDataRefresh(@PathVariable String dataType){
......
......@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.service.intfc.IDictService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -33,6 +34,7 @@ public class DictController extends BaseController{
* 根据查询条件列出字典列表
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET",value = "根据查询条件列出字典列表", notes = "根据查询条件列出字典列表")
@RequestMapping(value = "/dict/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
//@Authorization(ingore=true)
......@@ -51,6 +53,7 @@ public class DictController extends BaseController{
* 根据查询条件列出字典列表
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET",value = "根据查询条件列出字典列表", notes = "根据查询条件列出字典列表")
@RequestMapping(value = "/dict/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
//@Authorization(ingore=true)
......@@ -68,6 +71,7 @@ public class DictController extends BaseController{
* 根据IDs查询字典详情
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET",value = "根据IDs查询字典详情", notes = "根据IDs查询字典详情")
@RequestMapping(value = "/dict/list/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
//@Authorization(ingore=true)
......@@ -80,6 +84,7 @@ public class DictController extends BaseController{
* 根据ID查询字典详情
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET",value = "根据ID查询字典详情", notes = "根据ID查询字典详情")
@RequestMapping(value = "/dict/list/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
//@Authorization(ingore=true)
......@@ -93,6 +98,7 @@ public class DictController extends BaseController{
* 根据ID删除字典
* @return
*/
@Permission
@ApiOperation(httpMethod = "DELETE",value = "根据ID删除字典", notes = "根据ID删除字典")
@RequestMapping(value = "/dict/delete/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
//@Authorization(ingore=true)
......@@ -105,6 +111,7 @@ public class DictController extends BaseController{
* 根据IDs删除字典
* @return
*/
@Permission
@ApiOperation(httpMethod = "DELETE",value = "根据IDs删除字典", notes = "根据IDs删除字典")
@RequestMapping(value = "/dict/delete/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
//@Authorization(ingore=true)
......@@ -117,6 +124,7 @@ public class DictController extends BaseController{
* 新增字典
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST",value = "新增字典", notes = "新增字典")
@RequestMapping(value = "/dict/add", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
//@Authorization(ingore=true)
......@@ -129,6 +137,7 @@ public class DictController extends BaseController{
* 编辑字典信息
* @return
*/
@Permission
@ApiOperation(httpMethod = "PUT",value = "编辑字典信息", notes = "编辑字典信息")
@RequestMapping(value = "/dict/edit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
//@Authorization(ingore=true)
......
......@@ -19,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
import com.yeejoin.amos.fas.business.param.ImgParam;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -40,6 +41,7 @@ public class EquipmentController extends BaseController {
@Autowired
private IEquipmentService iEquipService;
@Permission
@ApiOperation(httpMethod = "POST", value = "添加重点设备", notes = "添加重点设备")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse create(@RequestBody Equipment equipment) throws Exception {
......@@ -53,7 +55,7 @@ public class EquipmentController extends BaseController {
return CommonResponseUtil.success(iEquipService.save(equipment));
}
@Permission
@ApiOperation(httpMethod = "PUT", value = "编辑重点设备", notes = "编辑重点设备")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse udpate(@PathVariable Long id, @RequestBody Equipment equipment) {
......@@ -61,6 +63,7 @@ public class EquipmentController extends BaseController {
return CommonResponseUtil.success(iEquipService.save(equipment));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询单个重点设备", notes = "查询单个重点设备")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse query(@PathVariable Long id) {
......@@ -68,7 +71,7 @@ public class EquipmentController extends BaseController {
return CommonResponseUtil.success(iEquipService.queryOne(id));
}
@Permission
@ApiOperation(httpMethod = "DELETE", value = "删除重点设备", notes = "查询单个重点设备")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse delete(@PathVariable String ids) throws Exception {
......@@ -80,7 +83,7 @@ public class EquipmentController extends BaseController {
return CommonResponseUtil.success(iEquipService.delete(idArray));
}
@Permission
@ApiOperation(httpMethod = "POST", value = "重点设备查询", notes = "重点设备查询")
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryImpEquipPage(
......@@ -99,6 +102,7 @@ public class EquipmentController extends BaseController {
* @param id
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "现场图查询", notes = "现场图查询")
@RequestMapping(value = "/pre-picture", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -127,6 +131,7 @@ public class EquipmentController extends BaseController {
* @param id
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "保护对象查询不分页", notes = "保护对象查询不分页")
@RequestMapping(value = "/all-list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryImpEquipNoPage() {
......@@ -140,6 +145,7 @@ public class EquipmentController extends BaseController {
*
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "POST", value = "绑定消防设备", notes = "绑定消防设备")
@RequestMapping(value = "/{id}/fireeqmt", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......@@ -155,6 +161,7 @@ public class EquipmentController extends BaseController {
*
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "DELETE", value = "解除绑定消防设备", notes = "解除绑定消防设备")
@RequestMapping(value = "/{equipmentId}/fireeqmt/{fireEquipmentIds}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
......@@ -173,6 +180,7 @@ public class EquipmentController extends BaseController {
* @param equipmentId
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "查询指定重点设备已经绑定的消防设备", notes = "查询指定重点设备已经绑定的消防设备")
@RequestMapping(value = "/{equipmentId}/fireeqmt/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryBindFirEqumtList(
......@@ -198,6 +206,7 @@ public class EquipmentController extends BaseController {
* @param img4 消防取水图
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "POST", value = "编辑装备及上传现场图", notes = "编辑装备及上传现场图")
@RequestMapping(value = "/uploadEquipmentImg", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......@@ -237,6 +246,7 @@ public class EquipmentController extends BaseController {
* @param equipmentId
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "查询指定重点设备已经绑定的消防设备", notes = "查询指定重点设备已经绑定的消防设备")
@GetMapping(value = "/videos", produces = "application/json;charset=UTF-8")
......@@ -250,6 +260,7 @@ public class EquipmentController extends BaseController {
* @param equipmentId
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "重点装备详情", notes = "重点装备详情")
@GetMapping(value = "/detail/{equipmentId}", produces = "application/json;charset=UTF-8")
......@@ -263,6 +274,7 @@ public class EquipmentController extends BaseController {
* @param equipmentId
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "获取所有重点装备无分页", notes = "获取所有重点装备无分页")
@GetMapping(value = "/all", produces = "application/json;charset=UTF-8")
......@@ -290,6 +302,7 @@ public class EquipmentController extends BaseController {
*
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "获取设备数据", notes = "获取设备数据")
@RequestMapping(value = "/queryEquipmentDate/{code}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......
......@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.service.intfc.IEvaModelService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -28,6 +29,7 @@ public class EvaModelController extends BaseController {
* @param id
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET",value = "fmea评价模型查询", notes = "fmea评价模型查询")
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryEvaModel(@ApiParam(value = "查询条件", required = false) @RequestParam(value = "type",required =false) String type) {
......
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.fas.business.param.WaterResourceParam;
import com.yeejoin.amos.fas.business.service.intfc.IExcelService;
import com.yeejoin.amos.fas.business.util.FileHelper;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.exception.YeeException;
......@@ -35,6 +36,7 @@ public class ExcelController extends BaseController {
@Autowired
private IExcelService iExcelService;
@Permission
@ApiOperation(value = "导入消防装备数据", notes = "导入消防装备数据")
@PostMapping(value = "/import/fireEquipment")
public CommonResponse importFireEquipment(@RequestPart("file") MultipartFile file) {
......@@ -53,6 +55,7 @@ public class ExcelController extends BaseController {
}
}
@Permission
@ApiOperation(value = "导入装备监测点数据", notes = "导入装备监测点数据")
@PostMapping(value = "/import/fireEquipmentPoint")
public CommonResponse importFireEquipmentPoint(@RequestPart("file") MultipartFile file) {
......@@ -73,6 +76,7 @@ public class ExcelController extends BaseController {
}
}
@Permission
@ApiOperation(value = "导出数据", notes = "导出数据")
@PostMapping(value = "/export")
//@Authorization(ingore = true)
......@@ -107,6 +111,7 @@ public class ExcelController extends BaseController {
}
}
@Permission
@ApiOperation(value = "导入数据", notes = "导入数据")
@PostMapping(value = "/import/data/excel/{type}")
public CommonResponse importExcelData(@RequestPart("file") MultipartFile file, @ApiParam(value = "导入资源类型", required = true) @PathVariable String type) {
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.*;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
......@@ -48,6 +49,7 @@ public class FileController extends BaseController {
private IPlanVisual3dService iMaasVisualService;
//文件上传
@Permission
@RequestMapping(value = "/uploadfile", method = RequestMethod.POST)
public CommonResponse uploadfile(@RequestPart("file") MultipartFile file) {
String contentType = file.getContentType(); //图片文件类型
......@@ -63,6 +65,7 @@ public class FileController extends BaseController {
}
// 文件删除
@Permission
@RequestMapping(value = "/deleteFile", method = RequestMethod.POST)
public CommonResponse deleteFile(@RequestBody String path) {
try {
......@@ -84,6 +87,7 @@ public class FileController extends BaseController {
}
}
@Permission
@PostMapping(value = "/plan/{appId}/texts")
public CommonResponse uploadTextPlans(@PathVariable("appId") String appId, MultipartFile[] files) {
CommonResponse response = FileUtil.uploadFiles(fileUploadDir, files);
......@@ -101,6 +105,7 @@ public class FileController extends BaseController {
}
// 图片读取
@Permission
@RequestMapping(value = "/getFile", method = RequestMethod.GET)
@ResponseBody
public void getFile(String in, @RequestParam(name = "open", required = false) String open,
......@@ -119,6 +124,7 @@ public class FileController extends BaseController {
IOUtils.closeQuietly(fis);
}
@Permission
@RequestMapping(value = "/download/**", method = RequestMethod.GET)
public void download(HttpServletResponse response, HttpServletRequest request) throws Exception {
try {
......@@ -137,6 +143,7 @@ public class FileController extends BaseController {
* @return
* @author nihuanshan
*/
@Permission
@ApiOperation(httpMethod = "DELETE", value = "删除文件", notes = "删除文件")
@RequestMapping(value = "/delFiles", method = RequestMethod.DELETE, produces = "application/json;charset=UTF-8")
public CommonResponse delFiles(@ApiParam(value = "删除文件", required = true) @RequestParam List<String> files) {
......@@ -158,6 +165,7 @@ public class FileController extends BaseController {
* @author: nihuanshan
* @date: 2018年11月30日 下午3:15:38
*/
@Permission
@PostMapping(value = "/lookHtmlText", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "查看文件内容", notes = "查看文件内容")
public CommonResponse lookHtmlText(@ApiParam(value = "查看文件内容", required = true) @RequestBody String file)
......@@ -196,6 +204,7 @@ public class FileController extends BaseController {
* @return
* @throws Exception
*/
@Permission
@PostMapping(value = "/lookHtmlTextNav", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "查看文件内容(加导航栏)", notes = "查看文件内容(加导航栏)")
public CommonResponse lookHtmlTextNav(@ApiParam(value = "查看文件内容(加导航栏)", required = true) @RequestBody String file)
......
......@@ -14,6 +14,7 @@ import org.springframework.web.multipart.MultipartFile;
import com.yeejoin.amos.fas.business.service.intfc.IFireCarService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.FireCar;
......@@ -30,7 +31,7 @@ public class FireCarController extends BaseController {
@Autowired
private IFireCarService fireCarService;
@Permission
@ApiOperation(httpMethod = "POST", value = "添加消防车", notes = "添加消防车")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse create(@RequestBody FireCar fireCar) throws Exception {
......@@ -44,6 +45,7 @@ public class FireCarController extends BaseController {
return CommonResponseUtil.success(fireCarService.save(fireCar));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT", value = "编辑消防车", notes = "编辑消防车")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
......@@ -52,7 +54,7 @@ public class FireCarController extends BaseController {
return CommonResponseUtil.success(fireCarService.save(fireCar));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询单个消防车", notes = "查询单个消防车")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse query(@PathVariable Long id) {
......@@ -60,6 +62,7 @@ public class FireCarController extends BaseController {
return CommonResponseUtil.success(fireCarService.queryOne(id));
}
@Permission
@ApiOperation(httpMethod = "DELETE", value = "删除消防车", notes = "查询单个消防车")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse delete(@PathVariable String ids) throws Exception {
......@@ -67,6 +70,7 @@ public class FireCarController extends BaseController {
return CommonResponseUtil.success(fireCarService.delete(idArray));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "POST", value = "上传消防车图片", notes = "上传消防车图片")
@RequestMapping(value = "/uploadCarImg", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper;
import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity;
import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -43,6 +44,7 @@ public class FireEquimtPointController extends BaseController {
@Autowired
private FireEquipPointMapper fireEquipPointMapper;
@Permission
@ApiOperation(httpMethod = "POST", value = "添加风险点", notes = "添加风险点")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse createPoint(@RequestBody FireEquipmentPoint fireEquipmentPoint) throws Exception {
......@@ -71,7 +73,7 @@ public class FireEquimtPointController extends BaseController {
return CommonResponseUtil.success(fireEquipPontService.savePoint(fireEquipmentPoint));
}
@Permission
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT", value = "编辑风险点", notes = "编辑风险点")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
......@@ -80,7 +82,7 @@ public class FireEquimtPointController extends BaseController {
return CommonResponseUtil.success(fireEquipPontService.savePoint(fireEquipmentPoint));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询单个风险单", notes = "查询单个风险单")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryPoint(@PathVariable Long id) {
......@@ -88,7 +90,7 @@ public class FireEquimtPointController extends BaseController {
return CommonResponseUtil.success(fireEquipPontService.queryOne(id));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "DELETE", value = "删除风险点", notes = "查询单个风险单")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
......@@ -97,6 +99,7 @@ public class FireEquimtPointController extends BaseController {
return CommonResponseUtil.success(fireEquipPontService.deletePoint(idArray));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "指定消防设备的风险点列表", notes = "指定消防设备的风险点列表")
@RequestMapping(value = "/fireequipment/{fireEqumtId}/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse pointList(@PathVariable Long fireEqumtId,
......@@ -108,6 +111,7 @@ public class FireEquimtPointController extends BaseController {
return CommonResponseUtil.success(fireEquipPontService.queryByFireEquimt(fireEqumtId, name, commonPageable));
}
@Permission
@ApiOperation(value = "指定消防设备的风险点列表", notes = "指定消防设备的风险点列表")
@GetMapping(value = "/page")
public CommonResponse page(@ApiParam(value = "起始记录", required = true) @RequestParam Integer pageNumber,
......@@ -129,6 +133,7 @@ public class FireEquimtPointController extends BaseController {
return fireEquipPontService.queryByMap(queryMap);
}
@Permission
@ApiOperation(value = "批量绑定", notes = "批量绑定")
@GetMapping(value = "/batch/bindToEquipment")
public CommonResponse batchBindToEquipment(@ApiParam(value = "设备编号", required = true) @RequestParam Long deviceId,
......@@ -140,6 +145,7 @@ public class FireEquimtPointController extends BaseController {
return fireEquipPontService.batchBindToEquipment(deviceId, ids);
}
@Permission
@ApiOperation(value = "批量解绑", notes = "批量解绑")
@GetMapping(value = "/batch/unbindToEquipment")
public CommonResponse batchUnbindToEquipment(@ApiParam(value = "监测点编号(多个逗号隔开)", required = true) @RequestParam String pointIds) {
......@@ -150,6 +156,7 @@ public class FireEquimtPointController extends BaseController {
return fireEquipPontService.batchUnbindToEquipment(ids);
}
@Permission
@ApiOperation(value = "添加监测点", notes = "添加监测点")
@PostMapping(value = "/save")
public CommonResponse save(@ApiParam(value = "监测点对象", required = true) @RequestBody FireEquipmentPointEntity fireEquipmentPointEntity) {
......@@ -163,6 +170,7 @@ public class FireEquimtPointController extends BaseController {
return fireEquipPontService.save(fireEquipmentPointEntity);
}
@Permission
@ApiOperation(value = "修改监测点", notes = "修改监测点")
@PostMapping(value = "/update")
public CommonResponse update(@ApiParam(value = "监测点对象", required = true) @RequestBody FireEquipmentPointEntity fireEquipmentPointEntity) {
......@@ -178,6 +186,7 @@ public class FireEquimtPointController extends BaseController {
return fireEquipPontService.update(fireEquipmentPointEntity);
}
@Permission
@ApiOperation(value = "批量删除监测点", notes = "批量删除监测点")
@GetMapping(value = "/batch/delete")
public CommonResponse batchDelete(@ApiParam(value = "监测点编号(多个逗号隔开)", required = true) @RequestParam String pointIds) {
......@@ -193,6 +202,7 @@ public class FireEquimtPointController extends BaseController {
return fireEquipPontService.batchDelete(ids);
}
@Permission
@ApiOperation(value = "根据设备类型查询设备", notes = "批量删除监测点")
@GetMapping(value = "/listByType")
public CommonResponse listByType(@ApiParam(value = "装备分类:0-设备类;1-耗材类;2-视频监控;3-灭火器材") @RequestParam(required = false) Integer equipClassify) {
......
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService;
import com.yeejoin.amos.fas.business.util.CommonPageParamUtil;
import com.yeejoin.amos.fas.business.vo.FireCarDetailVo;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -40,6 +41,7 @@ public class FireSourceController extends BaseController {
@Autowired
private IEquipmentService iEquipService;
@Permission
@ApiOperation(httpMethod = "POST", value = "添加消防装备", notes = "添加消防装备")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse create(@RequestBody FireEquipment fireEquipment) throws Exception {
......@@ -63,6 +65,7 @@ public class FireSourceController extends BaseController {
return CommonResponseUtil.success(iFireEquipService.save(fireEquipment));
}
@Permission
@ApiOperation(httpMethod = "PUT", value = "编辑消防装备", notes = "编辑消防装备")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse udpate(@PathVariable Long id, @RequestBody FireEquipment fireEquipment) {
......@@ -70,12 +73,14 @@ public class FireSourceController extends BaseController {
return CommonResponseUtil.success(iFireEquipService.save(fireEquipment));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询单个消防装备", notes = "查询单个消防装备")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse query(@PathVariable Long id) {
return CommonResponseUtil.success(iFireEquipService.queryOne(id));
}
@Permission
@ApiOperation(httpMethod = "DELETE", value = "删除消防装备", notes = "查询单个消防装备")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse delete(@PathVariable String ids) throws Exception {
......@@ -97,6 +102,7 @@ public class FireSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "查询消防车", notes = "查询消防车")
@RequestMapping(value = "/fire-car/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryFireCar(
......@@ -113,6 +119,7 @@ public class FireSourceController extends BaseController {
* @param id
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "查询消防车", notes = "查询消防车")
@RequestMapping(value = "/fire-car/det/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryFireCar(@ApiParam(value = "查询条件", required = true) @PathVariable Long id) {
......@@ -125,6 +132,7 @@ public class FireSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "消防装备查询", notes = "消防装备查询")
@RequestMapping(value = "/fire-equip/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryFireEquipment(
......@@ -140,6 +148,7 @@ public class FireSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "配套设备查询", notes = "配套设备查询")
@RequestMapping(value = "/matching-equip/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryFireEquipmentByProId(
......@@ -155,6 +164,7 @@ public class FireSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "生产区域查询", notes = "生产区域查询")
@RequestMapping(value = "/fire-equip/area", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryProArea() {
......@@ -163,6 +173,7 @@ public class FireSourceController extends BaseController {
}
// @Authorization(ingore = true)
@Permission
@ApiOperation(httpMethod = "GET", value = "查询消防设备历史数据", notes = "查询消防设备历史数据")
@RequestMapping(value = "/data/history", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForFireEquipmentHistory(
......@@ -178,6 +189,7 @@ public class FireSourceController extends BaseController {
StringUtils.trimToNull(startTime), StringUtils.trimToNull(endTime), commonPageable));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询消防设备列表", notes = "查询消防设备列表")
@RequestMapping(value = "/info/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForEquipmentList(
......@@ -192,6 +204,7 @@ public class FireSourceController extends BaseController {
StringUtils.trimToNull(code), StringUtils.trimToNull(equipClassify), commonPageable,StringUtils.trimToNull(bindStation)));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "消防状态明细信息", notes = "消防状态明细信息")
@RequestMapping(value = "/info/detail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForEquipmentList(@ApiParam(value = "设备名称", required = true) @RequestParam Long id,
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IFireStationService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -27,6 +28,7 @@ public class FireStationController extends BaseController {
@Autowired
IFireStationService iFireStationService;
@Permission
@ApiOperation(httpMethod = "POST", value = "添加消防小室", notes = "添加消防小室")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse create(@RequestBody FireStation fireStation) throws Exception {
......@@ -43,6 +45,7 @@ public class FireStationController extends BaseController {
return CommonResponseUtil.success(iFireStationService.save(fireStation));
}
@Permission
@ApiOperation(httpMethod = "POST", value = "绑定消防设备", notes = "绑定消防设备")
@RequestMapping(value = "/fireequipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse createFireRelation(@RequestBody List<FireStationFireEquipment> fireStationFireEquipments)
......@@ -63,6 +66,7 @@ public class FireStationController extends BaseController {
}
}
@Permission
@ApiOperation(httpMethod = "DELETE", value = "解除绑定消防设备", notes = "解除绑定消防设备")
@RequestMapping(value = "/fireequipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse deleteFireEqRelation(@RequestBody List<FireStationFireEquipment> fireStationFireEquipments)
......@@ -74,6 +78,7 @@ public class FireStationController extends BaseController {
return CommonResponseUtil.success("SUCCESS");
}
@Permission
@ApiOperation(httpMethod = "PUT", value = "编辑消防小室", notes = "编辑消防小室")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse udpate(@PathVariable Long id, @RequestBody FireStation fireStation) {
......@@ -81,6 +86,7 @@ public class FireStationController extends BaseController {
return CommonResponseUtil.success(iFireStationService.save(fireStation));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询单个消防小室", notes = "查询单个消防小室")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse query(@PathVariable Long id) {
......@@ -88,6 +94,7 @@ public class FireStationController extends BaseController {
return CommonResponseUtil.success(iFireStationService.queryOne(id));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "分页查询已经绑定的消防设备列表", notes = "分页查询已经绑定的消防设备列表")
@RequestMapping(value = "/{id}/fireequipmenet/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForEuqimentList(@PathVariable Long id, @RequestParam int pageNumber,
......@@ -96,6 +103,7 @@ public class FireStationController extends BaseController {
return CommonResponseUtil.success(iFireStationService.queryForFireEquemtPage(id, commonPageable));
}
@Permission
@ApiOperation(httpMethod = "DELETE", value = "删除消防小室", notes = "查询单个消防小室")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse delete(@PathVariable String ids) throws Exception {
......@@ -115,6 +123,7 @@ public class FireStationController extends BaseController {
StringUtils.trimToNull(code), StringUtils.trimToNull(type), commonPageable));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "列表查询消防小室", notes = "分页查询消防小室")
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -128,6 +137,7 @@ public class FireStationController extends BaseController {
StringUtils.trimToNull(code), StringUtils.trimToNull(type)));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "POST", value = "添加消防小室及上传图片", notes = "添加消防小室及上传图片")
@RequestMapping(value = "createAndSaveImg", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......@@ -159,6 +169,7 @@ public class FireStationController extends BaseController {
* @param id
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "分页查询已经绑定的消防设备列表", notes = "分页查询已经绑定的消防设备列表")
@RequestMapping(value = "/fireEquipments/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForEuqimentListById(@PathVariable Long id) {
......
......@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -30,6 +31,7 @@ public class FireStrengthController extends BaseController{
@Autowired
FireStengthService fireStengthService;
//@Authorization(ingore = true)
@Permission
@ApiOperation(httpMethod = "POST",value = "添加专职人员", notes = "添加专职人员")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse createPoint(@RequestBody FireStrength fireStrength) throws Exception{
......@@ -46,6 +48,7 @@ public class FireStrengthController extends BaseController{
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
@Permission
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT",value = "编辑专职人员", notes = "编辑专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
......@@ -54,6 +57,7 @@ public class FireStrengthController extends BaseController{
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "查询单个专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -62,7 +66,7 @@ public class FireStrengthController extends BaseController{
return CommonResponseUtil.success(fireStengthService.queryOne(id));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "DELETE",value = "删除专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
......@@ -71,6 +75,7 @@ public class FireStrengthController extends BaseController{
return CommonResponseUtil.success(fireStengthService.deletePoint(idArray));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "分页查询专职人员", notes = "分页查询专职人员")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......
package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.TextPlan;
......@@ -38,18 +39,21 @@ public class PlanVisual3dController extends BaseController {
@Autowired
HttpServletRequest request;
@Permission
@ApiOperation(value = "预案应用树", notes = "预案应用树")
@GetMapping(value = "/plan/tree")
public CommonResponse getPlanTree() {
return CommonResponseUtil.success(planVisual3dService.getPlanTree());
}
@Permission
@ApiOperation(value = "根据ID获取文字预案", notes = "根据ID获取文字预案")
@GetMapping(value = "/plan/text/{id}")
public CommonResponse getTextPlanById(@PathVariable(value = "id") Long id) {
return CommonResponseUtil.success(planVisual3dService.getTextPlanInfoById(id));
}
@Permission
//@Authorization(ingore = true)
@RequestMapping(value = "/plan/text/downloadFile/{id}", method = RequestMethod.GET)
public HttpServletResponse download(@PathVariable("id") Long id) {
......@@ -98,6 +102,7 @@ public class PlanVisual3dController extends BaseController {
/**
* 资源设备信息查询
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "资源查询", notes = "资源查询")
//@Authorization(ingore = true)
@GetMapping(value = "/resource/{type}/list")
......@@ -111,6 +116,7 @@ public class PlanVisual3dController extends BaseController {
* @param id
* @return
*/
@Permission
//@Authorization(ingore = true)
@GetMapping(value = "/{type}/detail/{id}")
@ApiOperation(value = "数据项查询", notes = "按照分类及id查询数据项")
......@@ -121,12 +127,14 @@ public class PlanVisual3dController extends BaseController {
return CommonResponseUtil.success(list);
}
@Permission
@ApiOperation(value = "预案应用树", notes = "预案应用树")
@GetMapping(value = "/plan/textPlanTree/{appId}")
public CommonResponse getPlanTree(@PathVariable("appId") String appId) {
return CommonResponseUtil.success(planVisual3dService.getTextPlanBySubjectId(appId));
}
@Permission
@ApiOperation(value = "删除预案文件", notes = "删除预案文件")
@DeleteMapping(value = "/plan/textPlan/{id}")
public CommonResponse deleteTextPlanFile(@PathVariable("id") Long id) {
......
......@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService;
import com.yeejoin.amos.fas.business.util.CommonPageParamUtil;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -36,6 +37,7 @@ public class RiskFactorController extends BaseController {
/**
* 危险因素分页查询
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "危险因素查询", notes = "危险因素查询")
@RequestMapping(value = "/pagelist", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryRiskFactorPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
......@@ -49,6 +51,7 @@ public class RiskFactorController extends BaseController {
/**
* 危险因素查询,不分页
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "危险因素查询不分页", notes = "危险因素查询不分页")
@RequestMapping(value = "/all-list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRiskFactor() {
......@@ -59,6 +62,7 @@ public class RiskFactorController extends BaseController {
/**
* 危险因素新增及维护
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "危险因素新增及维护", notes = "危险因素新增及维护")
@RequestMapping(value = "/editRiskFactor", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse checkPlanAdd(@ApiParam(value = "危险因素对象", required = true) @RequestBody RiskFactor param) {
......@@ -87,6 +91,7 @@ public class RiskFactorController extends BaseController {
/**
* 危险因素删除(支持批量)
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "删除危险因素", notes = "删除危险因素")
@RequestMapping(value = "/deleteRiskFactorById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteRiskFactorById(@ApiParam(value = "危险因素ID", required = true) @RequestBody Long[] param) {
......
......@@ -19,6 +19,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService;
import com.yeejoin.amos.fas.business.util.CommonPageParamUtil;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.common.enums.ManageLevelEum;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -43,6 +44,7 @@ public class RiskLevelController extends BaseController {
/**
* 风险等级分页查询
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "风险等级查询", notes = "风险等级查询")
@RequestMapping(value = "/pagelist", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryRiskLevelPage(@ApiParam(value = "查询条件") @RequestBody(required = false) List<CommonRequest> queryRequests,
......@@ -56,6 +58,7 @@ public class RiskLevelController extends BaseController {
/**
* 风险等级查询,不分页
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "风险等级查询不分页", notes = "风险等级查询不分页")
@RequestMapping(value = "/all-list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRiskLevel(@ApiParam(value = "模型id") @RequestParam(required = false) Long id) {
......@@ -66,6 +69,7 @@ public class RiskLevelController extends BaseController {
/**
* 风险等级新增及维护
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "风险等级新增及维护", notes = "风险等级新增及维护")
@RequestMapping(value = "/editRiskLevel", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse checkPlanAdd(@ApiParam(value = "风险等级对象", required = true) @RequestBody RiskLevel param) {
......@@ -92,6 +96,7 @@ public class RiskLevelController extends BaseController {
/**
* 风险等级删除(支持批量)
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "删除风险等级", notes = "删除风险等级")
@RequestMapping(value = "/deleteRiskLevelById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deletePlanById(@ApiParam(value = "风险等级ID", required = true) @RequestBody Long[] param) {
......@@ -104,6 +109,7 @@ public class RiskLevelController extends BaseController {
}
}
@Permission
@ApiOperation(value = "风险管控级别查询",notes = "风险管控级别查询")
@GetMapping(value = "/manageLevel/list")
public CommonResponse getManageLevelEumList(){
......
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService;
import com.yeejoin.amos.fas.business.util.CommonPageParamUtil;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.client.invoke.RsDataQueue;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -40,6 +41,7 @@ public class RiskModelController extends BaseController {
@Autowired
private IFmeaService fmeaService;
@Permission
@ApiOperation(value = "根据父类编号获取子类风险点类型", notes = "根据父类编号获取子类风险点类型")
@GetMapping(value = "/riskSource/getChildTypeByPid")
public CommonResponse getChildTypeByPid(@ApiParam(value = "风险模型对象", required = true) @RequestParam Long riskSourceId) {
......@@ -56,6 +58,7 @@ public class RiskModelController extends BaseController {
/**
* 风险模型新增及维护
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "风险模型新增及维护", notes = "风险模型新增及维护")
@RequestMapping(value = "/riskSource/editRiskSource", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse editRiskSource(@ApiParam(value = "风险模型对象", required = true) @RequestBody RiskSource param) {
......@@ -85,6 +88,7 @@ public class RiskModelController extends BaseController {
/**
* 风险模型删除
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "风险模型删除", notes = "风险模型删除")
@RequestMapping(value = "/riskSource/deleteRiskSource", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteRiskSource(@ApiParam(value = "风险模型id", required = true) @RequestBody Long[] riskSourceId) {
......@@ -100,6 +104,7 @@ public class RiskModelController extends BaseController {
/**
* 风险点列表分页查询
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "风险点列表分页查询", notes = "风险点列表分页查询")
@RequestMapping(value = "/riskSource/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryRiskSourceByPage(
......@@ -113,6 +118,7 @@ public class RiskModelController extends BaseController {
/**
* Fmea模型新增及维护
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "Fmea模型新增及维护", notes = "Fmea模型新增及维护")
@RequestMapping(value = "/fmea/editFmea", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse editFmea(@ApiParam(value = "Fmea模型对象", required = true) @RequestBody List<Fmea> params) {
......@@ -138,6 +144,7 @@ public class RiskModelController extends BaseController {
/**
* Fmea模型删除
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "Fmea模型删除", notes = "Fmea模型删除")
@RequestMapping(value = "/fmea/deleteFmea", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteFmea(@ApiParam(value = "Fmea模型id", required = true) @RequestBody RiskFmeaParam param) {
......@@ -158,6 +165,7 @@ public class RiskModelController extends BaseController {
/**
* Fmea列表分页查询
*/
@Permission
@ApiOperation(httpMethod = "POST", value = "Fmea列表分页查询", notes = "Fmea列表分页查询")
@RequestMapping(value = "/fmea/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryFmeaByPage(@ApiParam(value = "查询条件") @RequestBody(required = false) List<CommonRequest> queryRequests,
......@@ -167,6 +175,7 @@ public class RiskModelController extends BaseController {
return CommonResponseUtil.success(fmeaList);
}
@Permission
@ApiOperation(value = "Fmea是否关联对象查询", notes = "Fmea是否关联对象查询")
@GetMapping(value = "/fmea/{ids}/controlObjCount")
public CommonResponse queryFmeaControlObj(@ApiParam(value = "fmea ids") @PathVariable(value = "ids", required = true) String[] ids) {
......
......@@ -29,6 +29,7 @@ import com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus;
import com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo;
import com.yeejoin.amos.fas.business.service.model.ProtalDataRo;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -49,6 +50,7 @@ public class RiskSourceController extends BaseController {
@Autowired
IRiskSourceService riskSourceService;
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "查询风险点子项", notes = "查询风险点子项")
@RequestMapping(value = "/children/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -56,7 +58,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(riskSourceService.queryForRegion());
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "三维图统计", notes = "三维图统计")
@RequestMapping(value = "/collection3d", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -70,6 +72,7 @@ public class RiskSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "查询风险点RPN统计", notes = "查询风险点RPN统计")
@RequestMapping(value = "/rpn/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRPNReport() {
......@@ -82,6 +85,7 @@ public class RiskSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "风险上升率", notes = "风险上升率")
@RequestMapping(value = "/riseuprate", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForRiseUp() throws Exception {
......@@ -94,6 +98,7 @@ public class RiskSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "发生率严重度矩阵", notes = "发生率严重度矩阵")
@RequestMapping(value = "/matrix", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForMatrix() throws Exception {
......@@ -105,6 +110,7 @@ public class RiskSourceController extends BaseController {
*
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "获取风险点树型结构", notes = "获取风险点树型结构")
@RequestMapping(value = "/riskSourceTress", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -120,6 +126,7 @@ public class RiskSourceController extends BaseController {
*
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "获取区域树型结构", notes = "获取区域树型结构")
@RequestMapping(value = "/regionTress", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -130,6 +137,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(getRegionTree(riskSources));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "统计级别为1的风险点下面", notes = "获取风险点树型结构")
@RequestMapping(value = "/query3DStatistics/{markerType}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -153,6 +161,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.failure("未定义类型");
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "统计级别为1的风险点下面", notes = "获取风险点树型结构")
@RequestMapping(value = "/riskSourceStatistics", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -164,6 +173,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(riskSourceStatistics(treeRiskSources));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "统计级别为1的风险点下面设备统计", notes = "统计级别为1的风险点下面设备统计")
@RequestMapping(value = "/equipStatistics", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -173,6 +183,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(riskSourceEquipStatistics(treeRiskSources, true, 0));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "统计级别为1的巡检点统计", notes = "统计级别为1的巡检点统计")
@RequestMapping(value = "/checkPointStatistics", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -292,7 +303,7 @@ public class RiskSourceController extends BaseController {
return count;
}
@Permission
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "GET", value = "统计级别为1的风险点下面设备统计", notes = "统计级别为1的风险点下面设备统计")
@RequestMapping(value = "/equipStatistics/{type}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -518,6 +529,7 @@ public class RiskSourceController extends BaseController {
/**
* 根据风险点查询关联巡检点
*/
@Permission
@ApiOperation(value = "根据风险点查询关联巡检点", notes = "根据风险点查询关联巡检点")
@GetMapping(value = "/getBindPoints", produces = "application/json;charset=UTF-8")
public CommonResponse listFmeaPointInputitem(@ApiParam(value = "fmeaId", required = true) @RequestParam Long fmeaId,
......@@ -532,6 +544,7 @@ public class RiskSourceController extends BaseController {
}
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询指定风险点绑定关系", notes = "查询指定风险点绑定关系")
@RequestMapping(value = "/{fmeaId}/fireequiment/relations", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryBoundRelation(@PathVariable Long fmeaId,
......@@ -540,12 +553,14 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(riskSourceService.listFeamEquipmentPoint(fmeaId, pageNumber, pageSize));
}
@Permission
@ApiOperation(value = "绑定巡检点检查项", notes = "绑定巡检点检查项")
@PostMapping(value = "/bindFmea/pointInputitem")
public CommonResponse bindFmeaPointInputitem(@RequestBody FmeaBindParam pointInputitems) {
return CommonResponseUtil.success(riskSourceService.bindPointInputitem(pointInputitems));
}
@Permission
@ApiOperation(value = "绑定消防设备指标", notes = "绑定消防设备指标")
@PostMapping(value = "/bingFmea/equimentPoint")
public CommonResponse bindFmeaEquimentPoint(@RequestBody FmeaBindParam fmeaBindParam) {
......@@ -553,7 +568,7 @@ public class RiskSourceController extends BaseController {
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询绑定关系设备", notes = "查询绑定关系包含已绑定和未绑定")
@RequestMapping(value = "/fireequiment/relation/all", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRelationWithNoBound(
......@@ -567,6 +582,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(riskSourceService.queryEquimentRelation(commonPageable, equimentId, fname));
}
@Permission
@ApiOperation(value = "查询设备指标", notes = "查询设备指标")
@GetMapping(value = "/listEquipmentPointById")
public CommonResponse listEquipmentPointById(@RequestParam Long fmeaId,
......@@ -576,12 +592,14 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(riskSourceService.listEquipmentPointById(fmeaId, importantEquipId, equimentId, equipmentPointName));
}
@Permission
@ApiOperation(httpMethod = "PUT", value = "上传消防设备数据", notes = "上传消防设备数据")
@RequestMapping(value = "/data/fireqeuiment", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse postFireEqumentData(@RequestBody FireEquimentDataRo deviceData) throws Exception {
return CommonResponseUtil.success(riskSourceService.processFireEqumtData(deviceData));
}
@Permission
@ApiOperation(httpMethod = "POST", value = "上传消防设备数据", notes = "上传消防设备数据")
@RequestMapping(value = "/data/fireqeuiment/soe", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse postFireEqumentData(@RequestBody AlarmParam alarm) throws Exception {
......@@ -590,6 +608,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(httpMethod = "POST", value = "上传消防设备数据", notes = "上传消防设备数据")
@RequestMapping(value = "/data/fireqeuiment/all", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse postFireEqumentData(@RequestBody List<AlarmParam> deviceDatas) throws Exception {
......@@ -597,7 +616,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success();
}
@Permission
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT", value = "上传巡检数据", notes = "上传巡检数据")
@RequestMapping(value = "/data/patroldata", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
......@@ -607,6 +626,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(httpMethod = "PUT", value = "上传巡检任务数据", notes = "上传巡检任务数据")
@RequestMapping(value = "/data/task", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse postTaskData(@RequestBody ProtalDataRo taskData) throws Exception {
......@@ -621,6 +641,7 @@ public class RiskSourceController extends BaseController {
* @return
* @throws Exception
*/
@Permission
@ApiOperation(value = "查询风险点明细", notes = "查询风险点明细")
@GetMapping(value = "/detailById/{id}", produces = "application/json;charset=UTF-8")
public CommonResponse queryRiskSourceDetailById(@PathVariable Long id) {
......@@ -628,7 +649,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success(det);
}
@Permission
@ApiOperation(value = "风险预警详情", notes = "风险预警详情")
@GetMapping(value = "/warning/detail", produces = "application/json;charset=UTF-8")
public CommonResponse earlyWarning(@RequestParam Long riskSourceId) {
......@@ -639,6 +660,7 @@ public class RiskSourceController extends BaseController {
/**
* 获取厂区下所有区域的风险点的rpn值
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "获取厂区下所有区域的风险点的rpn值", notes = "获取厂区下所有区域的风险点的rpn值")
@RequestMapping(value = "/queryRiskAreaRpn", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRiskAreaRpn() {
......@@ -650,6 +672,7 @@ public class RiskSourceController extends BaseController {
/**
* @return
*/
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "POST", value = "设置预案节点自动执行", notes = "设置预案节点自动执行")
@RequestMapping(value = "/contingency/setup", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......@@ -658,6 +681,7 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(httpMethod = "GET", value = "初始化預案水資源", notes = "初始化預案水資源")
@RequestMapping(value = "/contingency/water", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryContingencyWater() {
......@@ -669,6 +693,7 @@ public class RiskSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "获取危险因素树二级节点", notes = "获取危险因素树二级节点")
@RequestMapping(value = "/riskSourceSecondLevel", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRiskSourceSecondLevel() {
......@@ -682,6 +707,7 @@ public class RiskSourceController extends BaseController {
*
* @return
*/
@Permission
@ApiOperation(httpMethod = "GET", value = "获取危险因素树二级节点", notes = "获取危险因素树二级节点")
@RequestMapping(value = "/queryFmea/point/{pointId}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryFmeaByPointId(@PathVariable Long pointId) {
......
......@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -23,6 +24,7 @@ public class SafetyController extends BaseController{
/**
* 保存登陆用户选择公司信息
*/
@Permission
@ApiOperation(value = " 保存登陆用户选择公司信息", notes = " 保存登陆用户选择公司信息")
@PostMapping(value = "/save/curCompany")
public CommonResponse saveCurCompany(@RequestBody ReginParams reginParams) {
......
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance;
import com.yeejoin.amos.fas.business.service.intfc.IContingencyOriginalDataService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import com.yeejoin.amos.fas.core.util.CommonResponse;
......@@ -37,7 +38,7 @@ public class TimeLineController extends BaseController{
static LinkedList<Map<String,String >> fireQueue = new LinkedList<>();
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "根据批次号查询时间轴", notes = "根据批次号查询时间轴")
@RequestMapping(value = "/{instanceNo}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -46,7 +47,7 @@ public class TimeLineController extends BaseController{
return CommonResponseUtil.success(iContingencyInstance.queryForTimeLine(instanceNo,recordType));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT",value = "点击按钮", notes = "点击按钮")
@RequestMapping(value = "/fire", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
......@@ -114,7 +115,7 @@ public class TimeLineController extends BaseController{
@Permission
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "POST",value = "查询预案记录", notes = "查询预案记录")
@RequestMapping(value = "/contingency/page", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......
......@@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.fas.business.service.intfc.ITopographyLineService;
import com.yeejoin.amos.fas.business.service.intfc.ITopographyNodeDetailService;
import com.yeejoin.amos.fas.business.service.intfc.ITopographyNodeService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.TopographyLine;
......@@ -42,6 +43,7 @@ public class TopographyController {
@Autowired
private ITopographyLineService lineService;
@Permission
@ApiOperation(value = "根据appId查询节点及线", notes = "根据appID查询节点及线")
@GetMapping(value = "/query/{type}/{appId}")
public CommonResponse getTextPlanByIdAndType(@PathVariable(value = "appId") String appId,@PathVariable(value = "type") String type) {
......@@ -53,6 +55,7 @@ public class TopographyController {
return CommonResponseUtil.success(results);
}
@Permission
@ApiOperation(value = "根据type查询节点及线", notes = "根据type查询节点及线")
@GetMapping(value = "/query/{type}")
public CommonResponse getTextPlanByType(@PathVariable(value = "type") String type) {
......@@ -69,6 +72,7 @@ public class TopographyController {
*
* @return
*/
@Permission
@PostMapping(value = "/updateTopo", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "保存拓扑图", notes = "保存拓扑图")
public CommonResponse savedonghuanNodes(@ApiParam(value = "", required = false) @RequestBody JSONObject topographyParam) {
......@@ -141,6 +145,7 @@ public class TopographyController {
}
}
@Permission
@ApiOperation(value = "根据nodeid查询节点详情", notes = "根据nodeid查询节点详情")
@GetMapping(value = "/detail/{nodeid}")
public CommonResponse getNodeDatilByNodeId(@PathVariable(value = "nodeid") String nodeid) {
......@@ -152,6 +157,7 @@ public class TopographyController {
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(value = "保存节点详情", notes = "保存节点详情")
@PostMapping(value = "/detail")
public CommonResponse saveNodeDatil(@RequestBody TopographyNodeDetail nodeDetail) {
......@@ -163,6 +169,7 @@ public class TopographyController {
}
}
@Permission
@ApiOperation(value = "删除节点/线", notes = "删除节点/线")
@DeleteMapping(value = "/{type}/{id}")
public CommonResponse deleteTopo(@PathVariable("type") String type,@PathVariable("id") String id) {
......
......@@ -21,6 +21,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
import com.yeejoin.amos.fas.business.vo.ExceptionRegionVo;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.common.enums.ResourceTypeDefEnum;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -39,12 +40,14 @@ public class View3dController extends BaseController {
@Autowired
private IView3dService view3dService;
@Permission
@ApiOperation(httpMethod = "POST", value = "点3d坐标设置", notes = "按照点类型3d坐标设置" )
@PostMapping(value = "/point/bind",produces = "application/json;charset=UTF-8")
public CommonResponse setPoint3dPosition(@ApiParam(name = "参数",required = true) @RequestBody List<BindPointBo> pointBoList){
return view3dService.setPoint3dPosition(pointBoList);
}
@Permission
@ApiOperation(value = "区域树查询", notes = "区域树查询")
@GetMapping(value = "/region/tree")
public CommonResponse getRegionTree() {
......@@ -54,6 +57,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(riskSourceService.findRegionTree(channelType,orgCode));
}
@Permission
@ApiOperation(value = "区域详情查询", notes = "区域详情查询")
@GetMapping(value = "region/detail/{riskSourceId}")
public CommonResponse getRegionDetail(@PathVariable("riskSourceId") Long riskSourceId) {
......@@ -63,6 +67,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(riskSourceService.findRegionById(riskSourceId,orgCode,channelType));
}
@Permission
@ApiOperation(value = "区域绑定", notes = "区域绑定")
@PostMapping(value="region/bind")
public CommonResponse batchSaveRegionUe4(@ApiParam(name = "区域参数列表",required = true) @RequestBody List<BindRegionBo> regionBoList) {
......@@ -74,12 +79,14 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(value = "点类型查询", notes = "点类型查询")
@GetMapping(value = "point/type")
public CommonResponse getPointType() {
return CommonResponseUtil.success(view3dService.getPointType());
}
@Permission
@ApiOperation(value = "按照分类查询点树", notes = "按照分类查询点树")
@GetMapping(value = "point/tree/{type}")
public CommonResponse getPointTreeByType(@PathVariable(value="type") String type) {
......@@ -92,12 +99,14 @@ public class View3dController extends BaseController {
return CommonResponseUtil.failure(type + " 类型不存在");
}
@Permission
@ApiOperation(value = "按照不同类型查询点详情", notes = "按照不同类型查询点详情")
@GetMapping(value = "point/detail")
public CommonResponse getPointDetail(@RequestParam String type,@RequestParam Long pointId) {
return CommonResponseUtil.success(view3dService.getPointDetailByTypeAndId(type,pointId));
}
@Permission
@ApiOperation(value = "一周安全指数趋势查询", notes = "一周安全指数趋势查询")
@GetMapping(value = "safetyIndex/week")
public CommonResponse safetyIndexWeek(String type,Long pointId) {
......@@ -106,6 +115,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.getSafetyIndexWeek(orgCode));
}
@Permission
@ApiOperation(value = "今日安全指数查询",notes = "按照日期查询安全指数及分类数据")
@GetMapping(value = "/statistics/safetyIndex")
public CommonResponse getSafetyIndexInfoByDate(@RequestParam(name = "date",required = false) String date){
......@@ -114,6 +124,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.getSafetyIndexInfoByDate(orgCode,date));
}
@Permission
@ApiOperation(value = "今日安全指数详情",notes = "今日安全指数详情")
@GetMapping(value = "/safetyIndex/detail/{type}")
public CommonResponse getSafetyIndexDetail(@ApiParam(value = "risk-风险异常,check-巡检异常,equip-设备故障") @PathVariable String type){
......@@ -122,6 +133,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.getSafetyIndexDetail(type,orgCode));
}
@Permission
@ApiOperation(value = "查询上线的年日",notes = "查询上线年日:10年101")
@GetMapping(value = "/online/date")
public CommonResponse getSystemOnlineDate(){
......@@ -131,6 +143,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.getSystemOnlineDate(orgCode));
}
@Permission
@ApiOperation(value = "今日巡检统计接口",notes = "今日巡检统计接口")
@GetMapping(value = "statistics/check")
public CommonResponse getStatisticsCheck(){
......@@ -147,6 +160,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.getSafetyExecuteListTop5(type,orgCode));
}
@Permission
@ApiOperation(value = "今日值班统计",notes = "今日值班统计")
@GetMapping(value = "statistics/duty")
public CommonResponse getStatisticsDuty(){
......@@ -159,6 +173,7 @@ public class View3dController extends BaseController {
return view3dService.getStatisticsDuty(getAppKey(),getProduct(),orgCode);
}
@Permission
@ApiOperation(value = "异常区域信息查询",notes = "异常区域信息查询")
@GetMapping(value = "region/exception/list")
public CommonResponse getExceptionRegion(){
......@@ -168,6 +183,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(exceptionRegionVoList);
}
@Permission
@ApiOperation(value = "设备状态信息查询",notes = "设备状态信息查询")
@GetMapping(value = "equipStatus/list")
public CommonResponse getEquipStatusList(){
......@@ -176,6 +192,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.getEquipStatusList(orgCode));
}
@Permission
@ApiOperation(value = "3d视图点显示",notes = "3d视图点显示")
@GetMapping(value = "initViewNode")
public CommonResponse initViewNode(String type,Long riskSourceId){
......@@ -184,6 +201,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.initViewErrorNode(type,riskSourceId,orgCode));
}
@Permission
@ApiOperation(value = "按照点类型查询点列表",notes = "按照点类型查询点列表")
@GetMapping(value = "point/list")
public CommonResponse get3dPointsByType(@RequestParam(required = false,defaultValue = "grain") String model){
......@@ -198,6 +216,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(value = "安全指数日流生成",notes = "安全指数日流生成定时任务")
@GetMapping(value = "safetyIndex/schJobTest")
public CommonResponse safetyIndexLog(@ApiParam(value = "格式:yyyy-MM-dd") @RequestParam String runData){
......@@ -210,6 +229,7 @@ public class View3dController extends BaseController {
* 初始化三维视图节点
* </pre>
*/
@Permission
@GetMapping(value = "/init3dViewNode", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "初始化三维视图节点", notes = "初始化三维视图节点")
public CommonResponse init3dViewNode(
......@@ -221,6 +241,7 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.find3dViewDataByType(type,riskSourceId,orgCode,abnormalStatus));
}
@Permission
@PostMapping(value = "/retrieve/all",produces = "application/json;charset=UTF-8")
@ApiOperation(value = "右侧边栏搜索", notes = "右侧边栏搜索")
public CommonResponse retrieveAll(
......@@ -242,19 +263,21 @@ public class View3dController extends BaseController {
token,appKey,product);
}
@Permission
@ApiOperation(value = "等级查询",notes = "等级查询")
@GetMapping(value = "point/level")
public CommonResponse pointLevel(@ApiParam(value = "点类型") @RequestParam String type){
return CommonResponseUtil.success(view3dService.pointLevelList(type));
}
@Permission
@ApiOperation(value = "重新区域下包含点",notes = "重新区域下包含点")
@GetMapping(value = "point/list/{regionId}")
public CommonResponse listPointsByRegion(@PathVariable Long regionId, @RequestParam(required = false, defaultValue = "all") String type){
return CommonResponseUtil.success(view3dService.listPointsByRegionId(regionId,type));
}
@Permission
@ApiOperation(value = "预案人员测试方法",notes = "预案人员测试方法")
@GetMapping(value = "dutyListByDate")
public Map<String, String> getDutyListByDate(){
......
......@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -36,6 +37,7 @@ public class WaterResourceController extends BaseController{
@Autowired
IWaterResourceService iWaterResourceService;
@Permission
@ApiOperation(httpMethod = "POST",value = "添加水资源", notes = "添加水资源")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse create(@RequestBody WaterResource waterResource) throws Exception{
......@@ -54,7 +56,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success(iWaterResourceService.save(waterResource));
}
@Permission
@ApiOperation(httpMethod = "PUT",value = "编辑水资源", notes = "编辑水资源")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse udpate(@PathVariable Long id, @RequestBody WaterResource waterResource) {
......@@ -65,6 +67,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success(iWaterResourceService.save(waterResource));
}
@Permission
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "查询单个水资源", notes = "查询单个水资源")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -73,7 +76,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success(iWaterResourceService.queryOne(id));
}
@Permission
@ApiOperation(httpMethod = "DELETE",value = "删除水资源", notes = "查询单个水资源")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse delete(@PathVariable String ids) throws Exception {
......@@ -81,6 +84,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success(iWaterResourceService.delete(idArray));
}
@Permission
@ApiOperation(httpMethod = "GET",value = "分页查询水资源", notes = "分页查询水资源")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse forPage(
......@@ -96,6 +100,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success(iWaterResourceService.queryForPage(compCode,StringUtils.trimToNull(name),StringUtils.trimToNull(code),StringUtils.trimToNull(type),commonPageable));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "查询水资源", notes = "分页查询水资源")
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......@@ -103,7 +108,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success(iWaterResourceService.queryForList());
}
@Permission
@ApiOperation(httpMethod = "POST", value = "绑定消防设备", notes = "绑定消防设备")
@RequestMapping(value = "/fireEquipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse createFireRelation(@RequestBody List<WaterResourceEquipment> waterResourceEquipments)
......@@ -115,6 +120,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(httpMethod = "DELETE", value = "解除绑定消防设备", notes = "解除绑定消防设备")
@RequestMapping(value = "/fireEquipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse deleteFireEqRelation(@RequestBody List<WaterResourceEquipment> waterResourceEquipments)
......@@ -126,6 +132,7 @@ public class WaterResourceController extends BaseController{
return CommonResponseUtil.success();
}
@Permission
@ApiOperation(httpMethod = "GET", value = "分页查询已经绑定的消防设备列表", notes = "分页查询已经绑定的消防设备列表")
@RequestMapping(value = "/{waterResourceId}/fireEquipmenet/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForEuqimentList(@PathVariable Long waterResourceId, @RequestParam int pageNumber,
......
......@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
......@@ -31,7 +32,7 @@ public class WeatherController extends BaseController {
@Value("${param.weather.url}")
private String weatherUrl;
@Permission
@ApiOperation(httpMethod = "GET",value = "天气查询", notes = "天气查询")
@GetMapping("/{address}")
public CommonResponse getWeather(@PathVariable("address") String address) {
......
package com.yeejoin.amos.fas.config;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.exception.PermissionException;
import com.yeejoin.amos.fas.exception.YeeException;
@ControllerAdvice
public class ExceptionHandler {
private static final Logger logger = LoggerFactory.getLogger(ExceptionHandler.class);
@org.springframework.web.bind.annotation.ExceptionHandler(PermissionException.class)
@ResponseBody
public CommonResponse handlePermissionException(HttpServletRequest request, PermissionException ex) {
return CommonResponseUtil.failure(ex.getMessage());
}
@org.springframework.web.bind.annotation.ExceptionHandler(YeeException.class)
@ResponseBody
public CommonResponse handleYeeException(HttpServletRequest request, YeeException ex) {
return CommonResponseUtil.failure(ex.getMessage());
}
@org.springframework.web.bind.annotation.ExceptionHandler(Exception.class)
@ResponseBody
public CommonResponse handleException(HttpServletRequest request, Exception ex) {
return CommonResponseUtil.failure(ex.getMessage());
}
}
package com.yeejoin.amos.fas.config;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Permission {
String value() default "";
}
package com.yeejoin.amos.fas.config;
import javax.servlet.http.HttpServletRequest;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import com.yeejoin.amos.component.feign.config.TokenOperation;
import com.yeejoin.amos.fas.exception.PermissionException;
@Aspect
@Component
@ResponseBody
public class PermissionAspect {
private static final Logger logger = LoggerFactory.getLogger(PermissionAspect.class);
// 前置通知,在方法执行之前
@Before(value = "@annotation(Permission)")
public void PermissionCheck(JoinPoint joinPoint) throws PermissionException {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder
.getRequestAttributes()).getRequest();
logger.info("======开始权限校验======");
// 用户token
String token = (String) request.getHeader("token");
String product = (String) request.getHeader("product");
String appKey = (String) request.getHeader("appKey");
logger.info("用户token:" + token);
RequestContext.setToken(token);
RequestContext.setProduct(product);
RequestContext.setAppKey(appKey);
if (!TokenOperation.refresh(token)) {
throw new PermissionException("登录信息失效,请重新登录");
}
}
}
package com.yeejoin.amos.fas.exception;
import org.springframework.http.HttpStatus;
public class PermissionException extends RuntimeException{
private static final long serialVersionUID = -6126611364667754200L;
public PermissionException(String message) {
super(message);
}
public PermissionException(String message, Throwable cause) {
super(message, cause);
}
public HttpStatus getStatus() {
return HttpStatus.FORBIDDEN; // 403
}
}
......@@ -54,3 +54,5 @@ linux.img.path = /
param.safetyIndexChange.cron = 0 0 2 * * ?
#param.weather.url = http://t.weather.sojson.com/api/weather/city/
param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey=
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