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

添加用户token验证

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