Commit 27bc6c53 authored by 李成龙's avatar 李成龙

安全预控基础升级

parent f34c5c44
package com.yeejoin.amos.boot.biz.common.aop; package com.yeejoin.amos.boot.biz.common.aop;
import com.alibaba.fastjson.JSONObject; import java.util.Arrays;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import java.util.List;
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo; import java.util.Map;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
...@@ -22,13 +16,20 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -22,13 +16,20 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import javax.servlet.http.HttpServletRequest; import com.alibaba.fastjson.JSONObject;
import java.util.Arrays; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import java.util.List; import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
import java.util.Map; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
/** /**
* controller层切面 用于用户数据缓存 供 sql自动填充使用 * controller层切面 用于用户数据缓存 供 sql自动填充使用
......
...@@ -11,13 +11,13 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -11,13 +11,13 @@ import org.springframework.web.bind.annotation.RequestBody;
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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam; 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.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,7 +42,7 @@ public class AccidentTypeController extends AbstractBaseController { ...@@ -42,7 +42,7 @@ public class AccidentTypeController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -62,7 +62,7 @@ public class AccidentTypeController extends AbstractBaseController { ...@@ -62,7 +62,7 @@ public class AccidentTypeController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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() {
...@@ -77,7 +77,7 @@ public class AccidentTypeController extends AbstractBaseController { ...@@ -77,7 +77,7 @@ public class AccidentTypeController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -105,7 +105,7 @@ public class AccidentTypeController extends AbstractBaseController { ...@@ -105,7 +105,7 @@ public class AccidentTypeController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,7 +13,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,7 +13,8 @@ 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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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 AlarmController extends AbstractBaseController { ...@@ -37,7 +38,7 @@ public class AlarmController extends AbstractBaseController {
* @param queryRequests * @param queryRequests
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,7 +12,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -12,7 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
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.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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,7 +31,7 @@ public class BizMessageController extends AbstractBaseController{ ...@@ -30,7 +31,7 @@ public class BizMessageController extends AbstractBaseController{
@Autowired @Autowired
IBizMessageService iBizMessageService; IBizMessageService iBizMessageService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -48,7 +49,7 @@ public class BizMessageController extends AbstractBaseController{ ...@@ -48,7 +49,7 @@ public class BizMessageController extends AbstractBaseController{
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 @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
......
...@@ -17,16 +17,16 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -17,16 +17,16 @@ import org.springframework.web.bind.annotation.RequestBody;
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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.fas.business.param.PointListParam; 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.service.intfc.IRiskSourceService; import com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService;
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;
...@@ -56,7 +56,7 @@ public class CommonController extends AbstractBaseController { ...@@ -56,7 +56,7 @@ public class CommonController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,7 +108,7 @@ public class CommonController extends AbstractBaseController { ...@@ -108,7 +108,7 @@ public class CommonController extends AbstractBaseController {
* @param * @param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,7 +133,7 @@ public class CommonController extends AbstractBaseController { ...@@ -133,7 +133,7 @@ public class CommonController extends AbstractBaseController {
* @return * @return
*/ */
//@Authorization(ingore = true) //@Authorization(ingore = true)
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -157,7 +157,7 @@ public class CommonController extends AbstractBaseController { ...@@ -157,7 +157,7 @@ public class CommonController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -168,7 +168,7 @@ public class CommonController extends AbstractBaseController { ...@@ -168,7 +168,7 @@ public class CommonController extends AbstractBaseController {
return CommonResponseUtil.success(users); return CommonResponseUtil.success(users);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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() {
......
...@@ -25,7 +25,8 @@ import com.yeejoin.amos.fas.business.vo.ContingencyPlanParamVo; ...@@ -25,7 +25,8 @@ import com.yeejoin.amos.fas.business.vo.ContingencyPlanParamVo;
import com.yeejoin.amos.fas.business.vo.ContingencyPlanResponseVo; import com.yeejoin.amos.fas.business.vo.ContingencyPlanResponseVo;
import com.yeejoin.amos.fas.business.vo.PlanDetailVo; import com.yeejoin.amos.fas.business.vo.PlanDetailVo;
import com.yeejoin.amos.fas.business.vo.Toke; import com.yeejoin.amos.fas.business.vo.Toke;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil2; import com.yeejoin.amos.fas.core.util.CommonResponseUtil2;
import com.yeejoin.amos.fas.core.util.ResponseModel; import com.yeejoin.amos.fas.core.util.ResponseModel;
import com.yeejoin.amos.fas.exception.YeeException; import com.yeejoin.amos.fas.exception.YeeException;
...@@ -46,7 +47,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -46,7 +47,7 @@ public class ContingencyPlanController extends AbstractBaseController {
/** /**
* 创建数字预案 * 创建数字预案
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "创建数字预案", notes = "创建数字预案") @ApiOperation(value = "创建数字预案", notes = "创建数字预案")
@PostMapping(value = "", produces = "application/json;charset=UTF-8") @PostMapping(value = "", produces = "application/json;charset=UTF-8")
public ResponseModel createPlan(@RequestBody PlanDetailVo planDetail) { public ResponseModel createPlan(@RequestBody PlanDetailVo planDetail) {
...@@ -62,7 +63,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -62,7 +63,7 @@ public class ContingencyPlanController extends AbstractBaseController {
/** /**
* 修改数字预案 * 修改数字预案
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "修改数字预案", notes = "修改数字预案") @ApiOperation(value = "修改数字预案", notes = "修改数字预案")
@PutMapping(value = "", produces = "application/json;charset=UTF-8") @PutMapping(value = "", produces = "application/json;charset=UTF-8")
public ResponseModel editPlan(@RequestBody PlanDetailVo planDetail) { public ResponseModel editPlan(@RequestBody PlanDetailVo planDetail) {
...@@ -78,7 +79,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -78,7 +79,7 @@ public class ContingencyPlanController extends AbstractBaseController {
/** /**
* 查看数字预案详情 * 查看数字预案详情
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查看数字预案详情", notes = "查看数字预案详情") @ApiOperation(value = "查看数字预案详情", notes = "查看数字预案详情")
@GetMapping(value = "/{id}", produces = "application/json;charset=UTF-8") @GetMapping(value = "/{id}", produces = "application/json;charset=UTF-8")
public ResponseModel createPlan(@PathVariable(value = "id") Long id) { public ResponseModel createPlan(@PathVariable(value = "id") Long id) {
...@@ -91,7 +92,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -91,7 +92,7 @@ public class ContingencyPlanController extends AbstractBaseController {
/** /**
* 数字预案分页查询 * 数字预案分页查询
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "数字预案分页查询", notes = "数字预案分页查询") @ApiOperation(value = "数字预案分页查询", notes = "数字预案分页查询")
@GetMapping(value = "/page", produces = "application/json;charset=UTF-8") @GetMapping(value = "/page", produces = "application/json;charset=UTF-8")
public ResponseModel pageFilter(@RequestParam(value = "current") int current, public ResponseModel pageFilter(@RequestParam(value = "current") int current,
...@@ -114,7 +115,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -114,7 +115,7 @@ public class ContingencyPlanController extends AbstractBaseController {
/** /**
* 启用预案 * 启用预案
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "启用预案", notes = "启用预案") @ApiOperation(value = "启用预案", notes = "启用预案")
@PutMapping(value = "/activate", produces = "application/json;charset=UTF-8") @PutMapping(value = "/activate", produces = "application/json;charset=UTF-8")
public ResponseModel activatePlan(@RequestBody List<Long> idList) { public ResponseModel activatePlan(@RequestBody List<Long> idList) {
...@@ -127,7 +128,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -127,7 +128,7 @@ public class ContingencyPlanController extends AbstractBaseController {
/** /**
* 停用预案 * 停用预案
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "停用预案", notes = "停用预案") @ApiOperation(value = "停用预案", notes = "停用预案")
@PutMapping(value = "/deactivate", produces = "application/json;charset=UTF-8") @PutMapping(value = "/deactivate", produces = "application/json;charset=UTF-8")
public ResponseModel deactivatePlan(@RequestBody List<Long> idList) { public ResponseModel deactivatePlan(@RequestBody List<Long> idList) {
...@@ -141,7 +142,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -141,7 +142,7 @@ public class ContingencyPlanController extends AbstractBaseController {
/** /**
* 删除预案 * 删除预案
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "删除预案", notes = "删除预案") @ApiOperation(value = "删除预案", notes = "删除预案")
@DeleteMapping(value = "/{ids}", produces = "application/json;charset=UTF-8") @DeleteMapping(value = "/{ids}", produces = "application/json;charset=UTF-8")
public ResponseModel deletePlan(@PathVariable(value = "ids") String idStr) { public ResponseModel deletePlan(@PathVariable(value = "ids") String idStr) {
...@@ -158,7 +159,7 @@ public class ContingencyPlanController extends AbstractBaseController { ...@@ -158,7 +159,7 @@ public class ContingencyPlanController extends AbstractBaseController {
return CommonResponseUtil2.success(contingencyPlanService.delete(idList)); return CommonResponseUtil2.success(contingencyPlanService.delete(idList));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取数字预案绑定的资源Id", notes = "查看数字预案详情") @ApiOperation(value = "获取数字预案绑定的资源Id", notes = "查看数字预案详情")
@GetMapping(value = "/bind-source/{type}", produces = "application/json;charset=UTF-8") @GetMapping(value = "/bind-source/{type}", produces = "application/json;charset=UTF-8")
public ResponseModel getPlanBindSource(@PathVariable(value = "type") String type) { public ResponseModel getPlanBindSource(@PathVariable(value = "type") String type) {
......
...@@ -7,7 +7,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -7,7 +7,8 @@ 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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -19,7 +20,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -19,7 +20,7 @@ import io.swagger.annotations.ApiOperation;
@Api("获取当前用户信息api") @Api("获取当前用户信息api")
public class CurCompanyController extends AbstractBaseController { public class CurCompanyController extends AbstractBaseController {
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -25,7 +26,7 @@ public class DataRefreshController extends AbstractBaseController{ ...@@ -25,7 +26,7 @@ public class DataRefreshController extends AbstractBaseController{
* 全景监控执行数据刷新 * 全景监控执行数据刷新
* @return success * @return success
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,7 +12,8 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -12,7 +12,8 @@ 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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -35,7 +36,7 @@ public class DictController extends AbstractBaseController{ ...@@ -35,7 +36,7 @@ public class DictController extends AbstractBaseController{
* 根据查询条件列出字典列表 * 根据查询条件列出字典列表
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -54,7 +55,7 @@ public class DictController extends AbstractBaseController{ ...@@ -54,7 +55,7 @@ public class DictController extends AbstractBaseController{
* 根据查询条件列出字典列表 * 根据查询条件列出字典列表
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -72,7 +73,7 @@ public class DictController extends AbstractBaseController{ ...@@ -72,7 +73,7 @@ public class DictController extends AbstractBaseController{
* 根据IDs查询字典详情 * 根据IDs查询字典详情
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -85,7 +86,7 @@ public class DictController extends AbstractBaseController{ ...@@ -85,7 +86,7 @@ public class DictController extends AbstractBaseController{
* 根据ID查询字典详情 * 根据ID查询字典详情
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -99,7 +100,7 @@ public class DictController extends AbstractBaseController{ ...@@ -99,7 +100,7 @@ public class DictController extends AbstractBaseController{
* 根据ID删除字典 * 根据ID删除字典
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -112,7 +113,7 @@ public class DictController extends AbstractBaseController{ ...@@ -112,7 +113,7 @@ public class DictController extends AbstractBaseController{
* 根据IDs删除字典 * 根据IDs删除字典
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -125,7 +126,7 @@ public class DictController extends AbstractBaseController{ ...@@ -125,7 +126,7 @@ public class DictController extends AbstractBaseController{
* 新增字典 * 新增字典
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -138,7 +139,7 @@ public class DictController extends AbstractBaseController{ ...@@ -138,7 +139,7 @@ public class DictController extends AbstractBaseController{
* 编辑字典信息 * 编辑字典信息
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
......
...@@ -22,7 +22,8 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams; ...@@ -22,7 +22,8 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
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.util.ExcelUtils; import com.yeejoin.amos.fas.business.util.ExcelUtils;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -47,7 +48,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -47,7 +48,7 @@ public class EquipmentController extends AbstractBaseController {
@Autowired @Autowired
private IEquipmentService iEquipService; private IEquipmentService iEquipService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 {
...@@ -61,7 +62,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -61,7 +62,7 @@ public class EquipmentController extends AbstractBaseController {
return CommonResponseUtil.success(iEquipService.save(equipment)); return CommonResponseUtil.success(iEquipService.save(equipment));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -69,7 +70,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -69,7 +70,7 @@ public class EquipmentController extends AbstractBaseController {
return CommonResponseUtil.success(iEquipService.save(equipment)); return CommonResponseUtil.success(iEquipService.save(equipment));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -77,7 +78,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -77,7 +78,7 @@ public class EquipmentController extends AbstractBaseController {
return CommonResponseUtil.success(iEquipService.queryOne(id)); return CommonResponseUtil.success(iEquipService.queryOne(id));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 {
...@@ -89,7 +90,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -89,7 +90,7 @@ public class EquipmentController extends AbstractBaseController {
return CommonResponseUtil.success(iEquipService.delete(idArray)); return CommonResponseUtil.success(iEquipService.delete(idArray));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -108,7 +109,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -108,7 +109,7 @@ public class EquipmentController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -135,7 +136,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -135,7 +136,7 @@ public class EquipmentController extends AbstractBaseController {
* 保护对象查询查询,不分页 * 保护对象查询查询,不分页
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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() {
...@@ -151,7 +152,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -151,7 +152,7 @@ public class EquipmentController extends AbstractBaseController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -167,7 +168,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -167,7 +168,7 @@ public class EquipmentController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -186,7 +187,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -186,7 +187,7 @@ public class EquipmentController extends AbstractBaseController {
* @param equipmentId * @param equipmentId
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -201,7 +202,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -201,7 +202,7 @@ public class EquipmentController extends AbstractBaseController {
return CommonResponseUtil.success(iEquipService.queryBindFirEqumtList(commonPageable, equipmentId)); return CommonResponseUtil.success(iEquipService.queryBindFirEqumtList(commonPageable, equipmentId));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询有预案的重点设备分页", notes = "查询有预案的重点设备分页") @ApiOperation(httpMethod = "GET", value = "查询有预案的重点设备分页", notes = "查询有预案的重点设备分页")
@RequestMapping(value = "/reservePage", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/reservePage", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public ResponseModel reservePage( public ResponseModel reservePage(
...@@ -228,7 +229,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -228,7 +229,7 @@ public class EquipmentController extends AbstractBaseController {
* @param img4 消防取水图 * @param img4 消防取水图
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -272,7 +273,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -272,7 +273,7 @@ public class EquipmentController extends AbstractBaseController {
* 查询指定重点设备已经绑定的消防设备 * 查询指定重点设备已经绑定的消防设备
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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")
...@@ -286,7 +287,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -286,7 +287,7 @@ public class EquipmentController extends AbstractBaseController {
* @param equipmentId * @param equipmentId
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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")
...@@ -298,7 +299,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -298,7 +299,7 @@ public class EquipmentController extends AbstractBaseController {
* 获取所有重点装备 * 获取所有重点装备
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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")
...@@ -326,7 +327,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -326,7 +327,7 @@ public class EquipmentController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -339,7 +340,7 @@ public class EquipmentController extends AbstractBaseController { ...@@ -339,7 +340,7 @@ public class EquipmentController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/downTemplate") @RequestMapping(value = "/downTemplate")
@ApiOperation(httpMethod = "GET", value = "下载模板", notes = "下载模板") @ApiOperation(httpMethod = "GET", value = "下载模板", notes = "下载模板")
public void downTemplate(HttpServletResponse response) { public void downTemplate(HttpServletResponse response) {
......
...@@ -9,7 +9,8 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -9,7 +9,8 @@ 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.EquipmentSpecificIndexService; import com.yeejoin.amos.fas.business.service.intfc.EquipmentSpecificIndexService;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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,7 +44,7 @@ public class EquipmentSpecificIndexController extends AbstractBaseController { ...@@ -43,7 +44,7 @@ public class EquipmentSpecificIndexController extends AbstractBaseController {
@Autowired @Autowired
private EquipmentSpecificIndexService equipmentSpecificIndexService; private EquipmentSpecificIndexService equipmentSpecificIndexService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取最新告警状态", notes = "获取最新告警状态") @ApiOperation(httpMethod = "GET", value = "获取最新告警状态", notes = "获取最新告警状态")
@RequestMapping(value = "/queryInitAlarm", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryInitAlarm", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryInitAlerm(@ApiParam(value = "物联采集属性值", required = true) @RequestParam String value, public CommonResponse queryInitAlerm(@ApiParam(value = "物联采集属性值", required = true) @RequestParam String value,
...@@ -53,7 +54,7 @@ public class EquipmentSpecificIndexController extends AbstractBaseController { ...@@ -53,7 +54,7 @@ public class EquipmentSpecificIndexController extends AbstractBaseController {
return CommonResponseUtil.success(equipmentSpecificIndexService.queryInitAlarm(value, nameKeys, status)); return CommonResponseUtil.success(equipmentSpecificIndexService.queryInitAlarm(value, nameKeys, status));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取三维初始化告警信息", notes = "获取三维初始化告警信息") @ApiOperation(httpMethod = "GET", value = "获取三维初始化告警信息", notes = "获取三维初始化告警信息")
@RequestMapping(value = "/getInitAlarm", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/getInitAlarm", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getInitAlarm(@ApiParam(value = "物联采集属性值") @RequestParam(required = false) String value, public CommonResponse getInitAlarm(@ApiParam(value = "物联采集属性值") @RequestParam(required = false) String value,
......
...@@ -9,7 +9,8 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -9,7 +9,8 @@ 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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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,7 +30,7 @@ public class EvaModelController extends AbstractBaseController { ...@@ -29,7 +30,7 @@ public class EvaModelController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
......
...@@ -25,7 +25,8 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentPointParam; ...@@ -25,7 +25,8 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentPointParam;
import com.yeejoin.amos.fas.business.param.WaterResourceParam; 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.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -44,7 +45,7 @@ public class ExcelController extends AbstractBaseController { ...@@ -44,7 +45,7 @@ public class ExcelController extends AbstractBaseController {
@Autowired @Autowired
private IExcelService iExcelService; private IExcelService iExcelService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -63,7 +64,7 @@ public class ExcelController extends AbstractBaseController { ...@@ -63,7 +64,7 @@ public class ExcelController extends AbstractBaseController {
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -84,7 +85,7 @@ public class ExcelController extends AbstractBaseController { ...@@ -84,7 +85,7 @@ public class ExcelController extends AbstractBaseController {
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出数据", notes = "导出数据") @ApiOperation(value = "导出数据", notes = "导出数据")
@PostMapping(value = "/export") @PostMapping(value = "/export")
//@Authorization(ingore = true) //@Authorization(ingore = true)
...@@ -119,7 +120,7 @@ public class ExcelController extends AbstractBaseController { ...@@ -119,7 +120,7 @@ public class ExcelController extends AbstractBaseController {
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
......
...@@ -33,7 +33,8 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -33,7 +33,8 @@ import org.springframework.web.multipart.MultipartFile;
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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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.core.util.DocUtil; import com.yeejoin.amos.fas.core.util.DocUtil;
...@@ -71,7 +72,7 @@ public class FileController extends AbstractBaseController { ...@@ -71,7 +72,7 @@ public class FileController extends AbstractBaseController {
private IPlanVisual3dService iMaasVisualService; private IPlanVisual3dService iMaasVisualService;
//文件上传 //文件上传
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(); //图片文件类型
...@@ -79,15 +80,15 @@ public class FileController extends AbstractBaseController { ...@@ -79,15 +80,15 @@ public class FileController extends AbstractBaseController {
try { try {
//调用文件处理类FileUtil,处理文件,将文件写入指定位置 //调用文件处理类FileUtil,处理文件,将文件写入指定位置
FileUtil.uploadFile(file.getBytes(), fileUploadDir, fileName); FileUtil.uploadFile(file.getBytes(), fileUploadDir, fileName);
return new CommonResponse(SUCCESS, fileName); return new CommonResponse("SUCCESS", fileName);
} catch (Exception e) { } catch (Exception e) {
return new CommonResponse(FAILED, "上传失败"); return new CommonResponse("FAILED", "上传失败");
} }
} }
// 文件删除 // 文件删除
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 {
...@@ -96,24 +97,24 @@ public class FileController extends AbstractBaseController { ...@@ -96,24 +97,24 @@ public class FileController extends AbstractBaseController {
if (file.exists()) { if (file.exists()) {
if (file.delete()) { if (file.delete()) {
return new CommonResponse(FAILED, "删除成功"); return new CommonResponse("FAILED", "删除成功");
} else { } else {
return new CommonResponse(FAILED, "删除失败"); return new CommonResponse("FAILED", "删除失败");
} }
} else { } else {
return new CommonResponse(FAILED, "文件不存在"); return new CommonResponse("FAILED", "文件不存在");
} }
} catch (Exception e) { } catch (Exception e) {
return new CommonResponse(FAILED, "删除异常"); return new CommonResponse("FAILED", "删除异常");
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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);
if (null != response && response.getResult().equals(SUCCESS)) { if (null != response && response.getResult().equals("SUCCESS")) {
Map<String, String> pathNameMap = (Map<String, String>) response.getDataList(); Map<String, String> pathNameMap = (Map<String, String>) response.getDataList();
iMaasVisualService.uploadTextPlan(appId, pathNameMap); iMaasVisualService.uploadTextPlan(appId, pathNameMap);
return CommonResponseUtil.success("上传成功"); return CommonResponseUtil.success("上传成功");
...@@ -127,7 +128,7 @@ public class FileController extends AbstractBaseController { ...@@ -127,7 +128,7 @@ public class FileController extends AbstractBaseController {
} }
// 图片读取 // 图片读取
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -146,7 +147,7 @@ public class FileController extends AbstractBaseController { ...@@ -146,7 +147,7 @@ public class FileController extends AbstractBaseController {
IOUtils.closeQuietly(fis); IOUtils.closeQuietly(fis);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 {
...@@ -165,7 +166,7 @@ public class FileController extends AbstractBaseController { ...@@ -165,7 +166,7 @@ public class FileController extends AbstractBaseController {
* @return * @return
* @author nihuanshan * @author nihuanshan
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -179,7 +180,7 @@ public class FileController extends AbstractBaseController { ...@@ -179,7 +180,7 @@ public class FileController extends AbstractBaseController {
} }
} }
} }
return new CommonResponse(SUCCESS, "删除文件成功"); return new CommonResponse("SUCCESS", "删除文件成功");
} }
/** /**
...@@ -187,7 +188,7 @@ public class FileController extends AbstractBaseController { ...@@ -187,7 +188,7 @@ public class FileController extends AbstractBaseController {
* @author: nihuanshan * @author: nihuanshan
* @date: 2018年11月30日 下午3:15:38 * @date: 2018年11月30日 下午3:15:38
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -199,11 +200,11 @@ public class FileController extends AbstractBaseController { ...@@ -199,11 +200,11 @@ public class FileController extends AbstractBaseController {
} }
File fi = new File(fileName); File fi = new File(fileName);
if (!fi.exists()) { if (!fi.exists()) {
return new CommonResponse(SUCCESS, "访问的文件不存在!", "查询成功"); return new CommonResponse("SUCCESS", "访问的文件不存在!", "查询成功");
} }
if (fileName.endsWith(".pdf")) { if (fileName.endsWith(".pdf")) {
String data = obj.getString("file"); String data = obj.getString("file");
return new CommonResponse(SUCCESS, data, "查询成功"); return new CommonResponse("SUCCESS", data, "查询成功");
} else if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) { } else if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) {
String htmlFileName = fileName.substring(0, fileName.indexOf(".")) + ".html"; String htmlFileName = fileName.substring(0, fileName.indexOf(".")) + ".html";
File htmlFile = new File(htmlFileName); File htmlFile = new File(htmlFileName);
...@@ -211,9 +212,9 @@ public class FileController extends AbstractBaseController { ...@@ -211,9 +212,9 @@ public class FileController extends AbstractBaseController {
FileInputStream fis = new FileInputStream(htmlFile); FileInputStream fis = new FileInputStream(htmlFile);
String data = IOUtils.toString(fis, "utf-8"); // "gb2312" String data = IOUtils.toString(fis, "utf-8"); // "gb2312"
fis.close(); fis.close();
return new CommonResponse(SUCCESS, data, "查询成功"); return new CommonResponse("SUCCESS", data, "查询成功");
} else { } else {
return new CommonResponse(SUCCESS, "访问的文件不存在!", "查询成功"); return new CommonResponse("SUCCESS", "访问的文件不存在!", "查询成功");
} }
} }
...@@ -226,7 +227,7 @@ public class FileController extends AbstractBaseController { ...@@ -226,7 +227,7 @@ public class FileController extends AbstractBaseController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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)
...@@ -238,7 +239,7 @@ public class FileController extends AbstractBaseController { ...@@ -238,7 +239,7 @@ public class FileController extends AbstractBaseController {
} }
File fi = new File(fileName); File fi = new File(fileName);
if (!fi.exists()) { if (!fi.exists()) {
return new CommonResponse(SUCCESS, "访问的文件不存在!", "查询成功"); return new CommonResponse("SUCCESS", "访问的文件不存在!", "查询成功");
} }
if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) { if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) {
String htmlFileName = fileName.substring(0, fileName.lastIndexOf(".")) + ".html"; String htmlFileName = fileName.substring(0, fileName.lastIndexOf(".")) + ".html";
...@@ -264,16 +265,16 @@ public class FileController extends AbstractBaseController { ...@@ -264,16 +265,16 @@ public class FileController extends AbstractBaseController {
String filePath = obj.getString("file"); String filePath = obj.getString("file");
processData.put("html", "/" + filePath.substring(0, filePath.lastIndexOf(".")) + ".html"); processData.put("html", "/" + filePath.substring(0, filePath.lastIndexOf(".")) + ".html");
return new CommonResponse(SUCCESS, processData, "查询成功"); return new CommonResponse("SUCCESS", processData, "查询成功");
}if(fileName.endsWith(".pdf")) { }if(fileName.endsWith(".pdf")) {
Map<String, Object> processData = new HashMap<String, Object>(); Map<String, Object> processData = new HashMap<String, Object>();
MyNode node = PdfUtil.getPdfNavs(fileName); MyNode node = PdfUtil.getPdfNavs(fileName);
processData.put("nodes", node.getChildren()); processData.put("nodes", node.getChildren());
String filePath = obj.getString("file"); String filePath = obj.getString("file");
processData.put("html", "/" + filePath.substring(0, filePath.lastIndexOf(".")) + ".pdf"); processData.put("html", "/" + filePath.substring(0, filePath.lastIndexOf(".")) + ".pdf");
return new CommonResponse(SUCCESS, processData, "查询成功"); return new CommonResponse("SUCCESS", processData, "查询成功");
}else { }else {
return new CommonResponse(SUCCESS, "文件类型不为doc/docx", "查询成功"); return new CommonResponse("SUCCESS", "文件类型不为doc/docx", "查询成功");
} }
} }
......
...@@ -17,7 +17,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,7 +17,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService; import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -35,7 +36,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -35,7 +36,7 @@ public class FireEquimtPointController extends AbstractBaseController {
@Autowired @Autowired
private IFireEquipPontService fireEquipPontService; private IFireEquipPontService fireEquipPontService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -47,7 +48,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -47,7 +48,7 @@ public class FireEquimtPointController extends AbstractBaseController {
return CommonResponseUtil.success(fireEquipPontService.queryByFireEquimt(fireEqumtId, name, commonPageable)); return CommonResponseUtil.success(fireEquipPontService.queryByFireEquimt(fireEqumtId, name, commonPageable));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -69,7 +70,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -69,7 +70,7 @@ public class FireEquimtPointController extends AbstractBaseController {
return fireEquipPontService.queryByMap(queryMap); return fireEquipPontService.queryByMap(queryMap);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -81,7 +82,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -81,7 +82,7 @@ public class FireEquimtPointController extends AbstractBaseController {
return fireEquipPontService.batchBindToEquipment(deviceId, ids); return fireEquipPontService.batchBindToEquipment(deviceId, ids);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -92,7 +93,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -92,7 +93,7 @@ public class FireEquimtPointController extends AbstractBaseController {
return fireEquipPontService.batchUnbindToEquipment(ids); return fireEquipPontService.batchUnbindToEquipment(ids);
} }
// //
// @Permission // @TycloudOperation(ApiLevel = UserType.AGENCY)
// @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) {
...@@ -106,7 +107,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -106,7 +107,7 @@ public class FireEquimtPointController extends AbstractBaseController {
// return fireEquipPontService.save(fireEquipmentPointEntity); // return fireEquipPontService.save(fireEquipmentPointEntity);
// } // }
// @Permission // @TycloudOperation(ApiLevel = UserType.AGENCY)
// @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) {
...@@ -122,7 +123,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -122,7 +123,7 @@ public class FireEquimtPointController extends AbstractBaseController {
// return fireEquipPontService.update(fireEquipmentPointEntity); // return fireEquipPontService.update(fireEquipmentPointEntity);
// } // }
// @Permission // @TycloudOperation(ApiLevel = UserType.AGENCY)
// @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) {
...@@ -138,7 +139,7 @@ public class FireEquimtPointController extends AbstractBaseController { ...@@ -138,7 +139,7 @@ public class FireEquimtPointController extends AbstractBaseController {
// return fireEquipPontService.batchDelete(ids); // return fireEquipPontService.batchDelete(ids);
// } // }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
......
...@@ -2,7 +2,8 @@ package com.yeejoin.amos.fas.business.controller; ...@@ -2,7 +2,8 @@ package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.bo.FireParamBo; import com.yeejoin.amos.fas.business.bo.FireParamBo;
import com.yeejoin.amos.fas.business.service.intfc.FireRectificationService; import com.yeejoin.amos.fas.business.service.intfc.FireRectificationService;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -32,7 +33,7 @@ public class FireRectificationController extends AbstractBaseController { ...@@ -32,7 +33,7 @@ public class FireRectificationController extends AbstractBaseController {
@Autowired @Autowired
private FireRectificationService fireRectificationService; private FireRectificationService fireRectificationService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "按条件查询消防整改列表信息", notes = "按条件查询消防整改列表信息") @ApiOperation(httpMethod = "GET", value = "按条件查询消防整改列表信息", notes = "按条件查询消防整改列表信息")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public CommonResponse queryFireList( public CommonResponse queryFireList(
...@@ -45,21 +46,21 @@ public class FireRectificationController extends AbstractBaseController { ...@@ -45,21 +46,21 @@ public class FireRectificationController extends AbstractBaseController {
return CommonResponseUtil.success(fireRectificationService.queryFiresAndCount(nameLike,sDate,eDate,states,pageNum,pageSize)); return CommonResponseUtil.success(fireRectificationService.queryFiresAndCount(nameLike,sDate,eDate,states,pageNum,pageSize));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取单个单据详细数据", notes = "获取单个单据详细数据") @ApiOperation(httpMethod = "GET", value = "获取单个单据详细数据", notes = "获取单个单据详细数据")
@GetMapping(value = "/getMoreData") @GetMapping(value = "/getMoreData")
public CommonResponse seleteOne(@RequestParam(value = "billNo") String billNo){ public CommonResponse seleteOne(@RequestParam(value = "billNo") String billNo){
return CommonResponseUtil.success(fireRectificationService.selectOneById(billNo)); return CommonResponseUtil.success(fireRectificationService.selectOneById(billNo));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "下载附件", notes = "下载附件") @ApiOperation(httpMethod = "POST", value = "下载附件", notes = "下载附件")
@PostMapping(value = "/downLoad") @PostMapping(value = "/downLoad")
public void downLoad(@RequestBody List<String> path, HttpServletResponse response){ public void downLoad(@RequestBody List<String> path, HttpServletResponse response){
fireRectificationService.downLoadFilesByUrll(path.get(0),response); fireRectificationService.downLoadFilesByUrll(path.get(0),response);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "修改表单数据", notes = "修改表单数据") @ApiOperation(httpMethod = "POST", value = "修改表单数据", notes = "修改表单数据")
@PostMapping(value = "/update") @PostMapping(value = "/update")
public CommonResponse update(@RequestBody FireParamBo paramBo){ public CommonResponse update(@RequestBody FireParamBo paramBo){
......
...@@ -21,7 +21,8 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireCarService; ...@@ -21,7 +21,8 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireCarService;
import com.yeejoin.amos.fas.business.service.intfc.IFireEquipService; import com.yeejoin.amos.fas.business.service.intfc.IFireEquipService;
//import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService; //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.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -44,7 +45,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -44,7 +45,7 @@ public class FireSourceController extends AbstractBaseController {
private final Logger log = LoggerFactory.getLogger(FireSourceController.class); private final Logger log = LoggerFactory.getLogger(FireSourceController.class);
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 {
...@@ -60,7 +61,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -60,7 +61,7 @@ public class FireSourceController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -77,7 +78,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -77,7 +78,7 @@ public class FireSourceController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -90,7 +91,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -90,7 +91,7 @@ public class FireSourceController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -106,7 +107,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -106,7 +107,7 @@ public class FireSourceController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -122,7 +123,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -122,7 +123,7 @@ public class FireSourceController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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() {
...@@ -131,7 +132,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -131,7 +132,7 @@ public class FireSourceController extends AbstractBaseController {
} }
// @Authorization(ingore = true) // @Authorization(ingore = true)
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -147,7 +148,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -147,7 +148,7 @@ public class FireSourceController extends AbstractBaseController {
StringUtils.trimToNull(startTime), StringUtils.trimToNull(endTime), commonPageable)); StringUtils.trimToNull(startTime), StringUtils.trimToNull(endTime), commonPageable));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -162,7 +163,7 @@ public class FireSourceController extends AbstractBaseController { ...@@ -162,7 +163,7 @@ public class FireSourceController extends AbstractBaseController {
StringUtils.trimToNull(code), StringUtils.trimToNull(equipClassify), commonPageable,StringUtils.trimToNull(bindStation))); StringUtils.trimToNull(code), StringUtils.trimToNull(equipClassify), commonPageable,StringUtils.trimToNull(bindStation)));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 String id, public CommonResponse queryForEquipmentList(@ApiParam(value = "设备名称", required = true) @RequestParam String id,
......
...@@ -25,7 +25,8 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -25,7 +25,8 @@ 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.IPlanVisual3dService; import com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -53,21 +54,21 @@ public class PlanVisual3dController extends AbstractBaseController { ...@@ -53,21 +54,21 @@ public class PlanVisual3dController extends AbstractBaseController {
@Autowired @Autowired
HttpServletRequest request; HttpServletRequest request;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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) {
...@@ -116,7 +117,7 @@ public class PlanVisual3dController extends AbstractBaseController { ...@@ -116,7 +117,7 @@ public class PlanVisual3dController extends AbstractBaseController {
/** /**
* 资源设备信息查询 * 资源设备信息查询
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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")
...@@ -130,7 +131,7 @@ public class PlanVisual3dController extends AbstractBaseController { ...@@ -130,7 +131,7 @@ public class PlanVisual3dController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@Authorization(ingore = true) //@Authorization(ingore = true)
@GetMapping(value = "/{type}/detail/{id}") @GetMapping(value = "/{type}/detail/{id}")
@ApiOperation(value = "数据项查询", notes = "按照分类及id查询数据项") @ApiOperation(value = "数据项查询", notes = "按照分类及id查询数据项")
...@@ -141,14 +142,14 @@ public class PlanVisual3dController extends AbstractBaseController { ...@@ -141,14 +142,14 @@ public class PlanVisual3dController extends AbstractBaseController {
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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 @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
......
...@@ -16,7 +16,8 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams; ...@@ -16,7 +16,8 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam; 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.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -39,7 +40,7 @@ public class RiskFactorController extends AbstractBaseController { ...@@ -39,7 +40,7 @@ public class RiskFactorController extends AbstractBaseController {
/** /**
* 危险因素分页查询 * 危险因素分页查询
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -53,7 +54,7 @@ public class RiskFactorController extends AbstractBaseController { ...@@ -53,7 +54,7 @@ public class RiskFactorController extends AbstractBaseController {
/** /**
* 危险因素查询,不分页 * 危险因素查询,不分页
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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() {
...@@ -64,7 +65,7 @@ public class RiskFactorController extends AbstractBaseController { ...@@ -64,7 +65,7 @@ public class RiskFactorController extends AbstractBaseController {
/** /**
* 危险因素新增及维护 * 危险因素新增及维护
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -93,7 +94,7 @@ public class RiskFactorController extends AbstractBaseController { ...@@ -93,7 +94,7 @@ public class RiskFactorController extends AbstractBaseController {
/** /**
* 危险因素删除(支持批量) * 危险因素删除(支持批量)
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,7 +19,8 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam; ...@@ -19,7 +19,8 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService; 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.common.enums.ManageLevelEum; import com.yeejoin.amos.fas.common.enums.ManageLevelEum;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -44,7 +45,7 @@ public class RiskLevelController extends AbstractBaseController { ...@@ -44,7 +45,7 @@ public class RiskLevelController extends AbstractBaseController {
/** /**
* 风险等级分页查询 * 风险等级分页查询
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -58,7 +59,7 @@ public class RiskLevelController extends AbstractBaseController { ...@@ -58,7 +59,7 @@ public class RiskLevelController extends AbstractBaseController {
/** /**
* 风险等级查询,不分页 * 风险等级查询,不分页
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -69,7 +70,7 @@ public class RiskLevelController extends AbstractBaseController { ...@@ -69,7 +70,7 @@ public class RiskLevelController extends AbstractBaseController {
/** /**
* 风险等级新增及维护 * 风险等级新增及维护
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -96,7 +97,7 @@ public class RiskLevelController extends AbstractBaseController { ...@@ -96,7 +97,7 @@ public class RiskLevelController extends AbstractBaseController {
/** /**
* 风险等级删除(支持批量) * 风险等级删除(支持批量)
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -109,7 +110,7 @@ public class RiskLevelController extends AbstractBaseController { ...@@ -109,7 +110,7 @@ public class RiskLevelController extends AbstractBaseController {
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "风险管控级别查询",notes = "风险管控级别查询") @ApiOperation(value = "风险管控级别查询",notes = "风险管控级别查询")
@GetMapping(value = "/manageLevel/list") @GetMapping(value = "/manageLevel/list")
public CommonResponse getManageLevelEumList(){ public CommonResponse getManageLevelEumList(){
......
...@@ -24,7 +24,8 @@ import com.yeejoin.amos.fas.business.service.intfc.IFmeaService; ...@@ -24,7 +24,8 @@ import com.yeejoin.amos.fas.business.service.intfc.IFmeaService;
import com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService; 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.client.invoke.RsDataQueue; import com.yeejoin.amos.fas.client.invoke.RsDataQueue;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -54,7 +55,7 @@ public class RiskModelController extends AbstractBaseController { ...@@ -54,7 +55,7 @@ public class RiskModelController extends AbstractBaseController {
@Autowired @Autowired
private IFmeaDao iFmeaDao; private IFmeaDao iFmeaDao;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -71,7 +72,7 @@ public class RiskModelController extends AbstractBaseController { ...@@ -71,7 +72,7 @@ public class RiskModelController extends AbstractBaseController {
/** /**
* 风险模型新增及维护 * 风险模型新增及维护
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -129,12 +130,12 @@ public class RiskModelController extends AbstractBaseController { ...@@ -129,12 +130,12 @@ public class RiskModelController extends AbstractBaseController {
/** /**
* 风险模型删除 * 风险模型删除
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
try { try {
riskSourceService.deleteRiskSource(getAppKey(), getProduct(), getToken(), SUCCESS, riskSourceId); riskSourceService.deleteRiskSource(getAppKey(), getProduct(), getToken(), "SUCCESS", riskSourceId);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
...@@ -145,7 +146,7 @@ public class RiskModelController extends AbstractBaseController { ...@@ -145,7 +146,7 @@ public class RiskModelController extends AbstractBaseController {
/** /**
* 风险点列表分页查询 * 风险点列表分页查询
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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(
...@@ -159,7 +160,7 @@ public class RiskModelController extends AbstractBaseController { ...@@ -159,7 +160,7 @@ public class RiskModelController extends AbstractBaseController {
/** /**
* Fmea模型新增及维护 * Fmea模型新增及维护
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -191,7 +192,7 @@ public class RiskModelController extends AbstractBaseController { ...@@ -191,7 +192,7 @@ public class RiskModelController extends AbstractBaseController {
/** /**
* Fmea模型删除 * Fmea模型删除
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -212,7 +213,7 @@ public class RiskModelController extends AbstractBaseController { ...@@ -212,7 +213,7 @@ public class RiskModelController extends AbstractBaseController {
/** /**
* Fmea列表分页查询 * Fmea列表分页查询
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,
...@@ -222,7 +223,7 @@ public class RiskModelController extends AbstractBaseController { ...@@ -222,7 +223,7 @@ public class RiskModelController extends AbstractBaseController {
return CommonResponseUtil.success(fmeaList); return CommonResponseUtil.success(fmeaList);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
......
...@@ -42,7 +42,7 @@ public class SafetyController extends AbstractBaseController{ ...@@ -42,7 +42,7 @@ public class SafetyController extends AbstractBaseController{
@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) {
this.saveSelectedOrgInfo(reginParams); // this.saveSelectedOrgInfo(reginParams);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
......
...@@ -9,7 +9,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -9,7 +9,8 @@ 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.service.intfc.IStationMaintenService; import com.yeejoin.amos.fas.business.service.intfc.IStationMaintenService;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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.StationInfo; import com.yeejoin.amos.fas.dao.entity.StationInfo;
...@@ -29,7 +30,7 @@ public class StationMaintenController extends AbstractBaseController{ ...@@ -29,7 +30,7 @@ public class StationMaintenController extends AbstractBaseController{
/** /**
* 保存站端信息 * 保存站端信息
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存录入站端信息", notes = "保存录入站端信息") @ApiOperation(value = "保存录入站端信息", notes = "保存录入站端信息")
@PostMapping(value = "/save") @PostMapping(value = "/save")
public CommonResponse saveStation(@RequestBody StationInfo stationParams) { public CommonResponse saveStation(@RequestBody StationInfo stationParams) {
...@@ -47,7 +48,7 @@ public class StationMaintenController extends AbstractBaseController{ ...@@ -47,7 +48,7 @@ public class StationMaintenController extends AbstractBaseController{
/** /**
* 获取站端信息 * 获取站端信息
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取站端信息", notes = "获取站端信息") @ApiOperation(value = "获取站端信息", notes = "获取站端信息")
@PostMapping(value = "/detail") @PostMapping(value = "/detail")
public CommonResponse detail() { public CommonResponse detail() {
......
...@@ -2,7 +2,6 @@ package com.yeejoin.amos.fas.business.controller; ...@@ -2,7 +2,6 @@ package com.yeejoin.amos.fas.business.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
...@@ -12,7 +11,6 @@ import org.slf4j.LoggerFactory; ...@@ -12,7 +11,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -20,15 +18,16 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -20,15 +18,16 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.fas.business.action.CustomerAction; import com.yeejoin.amos.fas.business.action.CustomerAction;
import com.yeejoin.amos.fas.business.scheduled.FireScheduled;
import com.yeejoin.amos.fas.business.service.impl.RiskSourceServiceImpl; import com.yeejoin.amos.fas.business.service.impl.RiskSourceServiceImpl;
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.business.service.intfc.IEquipmentService; import com.yeejoin.amos.fas.business.service.intfc.IEquipmentService;
import com.yeejoin.amos.fas.business.service.intfc.IRuleRunningSnapshotService; import com.yeejoin.amos.fas.business.service.intfc.IRuleRunningSnapshotService;
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.enums.NumberEnum; import com.yeejoin.amos.fas.core.enums.NumberEnum;
...@@ -60,15 +59,16 @@ public class TimeLineController extends AbstractBaseController{ ...@@ -60,15 +59,16 @@ public class TimeLineController extends AbstractBaseController{
@Autowired @Autowired
IEquipmentService equipmentService; IEquipmentService equipmentService;
static LinkedList<Map<String,String >> fireQueue = new LinkedList<>(); @Autowired
FireScheduled fireScheduled;
@Autowired @Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
@Autowired @Autowired
private IRuleRunningSnapshotService ruleRunningSnapshotService; private IRuleRunningSnapshotService ruleRunningSnapshotService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -77,7 +77,7 @@ public class TimeLineController extends AbstractBaseController{ ...@@ -77,7 +77,7 @@ public class TimeLineController extends AbstractBaseController{
return CommonResponseUtil.success(iContingencyInstance.queryForTimeLine(instanceNo,recordType)); return CommonResponseUtil.success(iContingencyInstance.queryForTimeLine(instanceNo,recordType));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@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)
...@@ -97,11 +97,11 @@ public class TimeLineController extends AbstractBaseController{ ...@@ -97,11 +97,11 @@ public class TimeLineController extends AbstractBaseController{
map.put("stepState",stepState); map.put("stepState",stepState);
map.put("token",getToken()); map.put("token",getToken());
map.put("product",getProduct()); map.put("product",getProduct());
fireQueue.addLast(map); FireScheduled.getFireQueue().addLast(map);
return CommonResponseUtil.success("SUCCESS"); return CommonResponseUtil.success("SUCCESS");
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
//@Authorization(ingore = true) //@Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT",value = "点击按钮", notes = "点击按钮") @ApiOperation(httpMethod = "PUT",value = "点击按钮", notes = "点击按钮")
@RequestMapping(value = "/fire/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT) @RequestMapping(value = "/fire/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
...@@ -126,7 +126,7 @@ public class TimeLineController extends AbstractBaseController{ ...@@ -126,7 +126,7 @@ public class TimeLineController extends AbstractBaseController{
return CommonResponseUtil.success("SUCCESS"); return CommonResponseUtil.success("SUCCESS");
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "预案回放", notes = "预案回放") @ApiOperation(httpMethod = "GET",value = "预案回放", notes = "预案回放")
@RequestMapping(value = "/fire/replay", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/fire/replay", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse replay(@RequestParam("batchNo") String batchNo, public CommonResponse replay(@RequestParam("batchNo") String batchNo,
...@@ -135,7 +135,7 @@ public class TimeLineController extends AbstractBaseController{ ...@@ -135,7 +135,7 @@ public class TimeLineController extends AbstractBaseController{
return CommonResponseUtil.success("SUCCESS"); return CommonResponseUtil.success("SUCCESS");
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "预案回放退出", notes = "预案回放退出") @ApiOperation(httpMethod = "GET",value = "预案回放退出", notes = "预案回放退出")
@RequestMapping(value = "/fire/replay/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/fire/replay/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse replayExit(@RequestParam("batchNo") String batchNo, public CommonResponse replayExit(@RequestParam("batchNo") String batchNo,
...@@ -144,43 +144,7 @@ public class TimeLineController extends AbstractBaseController{ ...@@ -144,43 +144,7 @@ public class TimeLineController extends AbstractBaseController{
return CommonResponseUtil.success("SUCCESS"); return CommonResponseUtil.success("SUCCESS");
} }
@Scheduled(cron = "*/2 * * * * ?") @TycloudOperation(ApiLevel = UserType.AGENCY)
public void runFireQueue() throws Exception
{
if(fireQueue.size() == 0)
return;
Map<String,String> map = fireQueue.getFirst();
String batchNo = map.get("batchNo");
String stepCode = map.get("stepCode");
String buttonCode = map.get("buttonCode");
String confirm = map.get("confirm");
String contingencyPlanId = map.get("contingencyPlanId");
String stepState = map.get("stepState");
String token = map.get("token");
String product = map.get("product");
try
{
log.info("fireQueue-size:"+fireQueue.size());
log.info("stepCode:" + map.get("stepCode"));
log.info("buttonCode:" + map.get("buttonCode"));
log.info("confirm:" + map.get("confirm"));
log.info("stepState:" + map.get("stepState"));
RequestContext.setToken(token);
RequestContext.setProduct(product);
iContingencyInstance.setButtonExecuted(batchNo,contingencyPlanId,buttonCode,confirm);
iContingencyInstance.fire(batchNo,stepCode,contingencyPlanId,buttonCode,confirm,stepState);
}catch (Exception e)
{
throw e;
}finally {
fireQueue.removeFirst();
}
}
@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)
...@@ -240,7 +204,7 @@ public class TimeLineController extends AbstractBaseController{ ...@@ -240,7 +204,7 @@ public class TimeLineController extends AbstractBaseController{
" ]" + " ]" +
"}"; "}";
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "根据批次号查询时间轴", notes = "根据批次号查询时间轴") @ApiOperation(httpMethod = "GET",value = "根据批次号查询时间轴", notes = "根据批次号查询时间轴")
@RequestMapping(value = "/replay", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/replay", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryPoint(@RequestParam("batchNo") String batchNo) throws Exception{ public CommonResponse queryPoint(@RequestParam("batchNo") String batchNo) throws Exception{
......
...@@ -18,7 +18,8 @@ import com.alibaba.fastjson.JSONArray; ...@@ -18,7 +18,8 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; 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.ITopographyNodeService; import com.yeejoin.amos.fas.business.service.intfc.ITopographyNodeService;
import com.yeejoin.amos.fas.config.Permission; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
...@@ -40,7 +41,7 @@ public class TopographyController { ...@@ -40,7 +41,7 @@ public class TopographyController {
@Autowired @Autowired
private ITopographyLineService lineService; private ITopographyLineService lineService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -52,7 +53,7 @@ public class TopographyController { ...@@ -52,7 +53,7 @@ public class TopographyController {
return CommonResponseUtil.success(results); return CommonResponseUtil.success(results);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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,7 +70,7 @@ public class TopographyController { ...@@ -69,7 +70,7 @@ public class TopographyController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -142,7 +143,7 @@ public class TopographyController { ...@@ -142,7 +143,7 @@ public class TopographyController {
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
...@@ -154,7 +155,7 @@ public class TopographyController { ...@@ -154,7 +155,7 @@ public class TopographyController {
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存节点详情", notes = "保存节点详情") @ApiOperation(value = "保存节点详情", notes = "保存节点详情")
@PostMapping(value = "/detail") @PostMapping(value = "/detail")
public CommonResponse saveNodeDatil(@RequestBody TopographyNodeDetail nodeDetail) { public CommonResponse saveNodeDatil(@RequestBody TopographyNodeDetail nodeDetail) {
...@@ -166,7 +167,7 @@ public class TopographyController { ...@@ -166,7 +167,7 @@ public class TopographyController {
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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) {
......
...@@ -13,7 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,7 +13,8 @@ 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 org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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,7 +29,7 @@ public class WeatherController extends AbstractBaseController { ...@@ -28,7 +29,7 @@ public class WeatherController extends AbstractBaseController {
@Value("${param.weather.url}") @Value("${param.weather.url}")
private String weatherUrl; private String weatherUrl;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@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.business.scheduled;
import java.util.LinkedList;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance;
@Component
public class FireScheduled {
private static final Logger log = LoggerFactory.getLogger(FireScheduled.class);
private static LinkedList<Map<String, String>> fireQueue = new LinkedList<>();
@Autowired
IContingencyInstance iContingencyInstance;
@Scheduled(cron = "*/2 * * * * ?")
public void runFireQueue() throws Exception {
if (fireQueue.size() == 0)
return;
Map<String, String> map = fireQueue.getFirst();
String batchNo = map.get("batchNo");
String stepCode = map.get("stepCode");
String buttonCode = map.get("buttonCode");
String confirm = map.get("confirm");
String contingencyPlanId = map.get("contingencyPlanId");
String stepState = map.get("stepState");
// String token = map.get("token");
// String product = map.get("product");
try {
log.info("fireQueue-size:" + fireQueue.size());
log.info("stepCode:" + map.get("stepCode"));
log.info("buttonCode:" + map.get("buttonCode"));
log.info("confirm:" + map.get("confirm"));
log.info("stepState:" + map.get("stepState"));
// RequestContext.setToken(token);
// RequestContext.setProduct(product);
iContingencyInstance.setButtonExecuted(batchNo, contingencyPlanId, buttonCode, confirm);
iContingencyInstance.fire(batchNo, stepCode, contingencyPlanId, buttonCode, confirm, stepState);
} catch (Exception e) {
throw e;
} finally {
fireQueue.removeFirst();
}
}
public static LinkedList<Map<String, String>> getFireQueue() {
return fireQueue;
}
public static void setFireQueue(LinkedList<Map<String, String>> fireQueue) {
FireScheduled.fireQueue = fireQueue;
}
}
package com.yeejoin.amos.fas.config; //package com.yeejoin.amos.fas.config;
//
import java.lang.annotation.Documented; //import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; //import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; //import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; //import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; //import java.lang.annotation.Target;
//
@Target(ElementType.METHOD) //@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME) //@Retention(RetentionPolicy.RUNTIME)
@Documented //@Documented
public @interface Permission { //public @interface Permission {
String value() default ""; // String value() default "";
} //}
...@@ -349,7 +349,7 @@ public class InputItemController extends AbstractBaseController { ...@@ -349,7 +349,7 @@ public class InputItemController extends AbstractBaseController {
} }
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取维保项分类", notes = "获取维保项分类") @ApiOperation(value = "获取维保项分类", notes = "获取维保项分类")
@GetMapping(value = "/classify") @GetMapping(value = "/classify")
public CommonResponse getMaintenanceClassify() { public CommonResponse getMaintenanceClassify() {
...@@ -362,6 +362,7 @@ public class InputItemController extends AbstractBaseController { ...@@ -362,6 +362,7 @@ public class InputItemController extends AbstractBaseController {
* @return * @return
* @Since 2021-3-10 * @Since 2021-3-10
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/downTemplate") @GetMapping(value = "/downTemplate")
@ApiOperation(httpMethod = "POST", value = "下载模板", notes = "下载模板") @ApiOperation(httpMethod = "POST", value = "下载模板", notes = "下载模板")
public void downTemplate(HttpServletResponse response) { public void downTemplate(HttpServletResponse response) {
......
...@@ -351,7 +351,7 @@ public class InputItemController extends AbstractBaseController { ...@@ -351,7 +351,7 @@ public class InputItemController extends AbstractBaseController {
} }
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取检查分类", notes = "获取检查分类") @ApiOperation(value = "获取检查分类", notes = "获取检查分类")
@GetMapping(value = "/checkClassify") @GetMapping(value = "/checkClassify")
public CommonResponse getCheckClassify() { public CommonResponse getCheckClassify() {
......
...@@ -55,9 +55,9 @@ import com.yeejoin.amos.fas.context.IotContext; ...@@ -55,9 +55,9 @@ import com.yeejoin.amos.fas.context.IotContext;
@EnableEurekaClient @EnableEurekaClient
@ComponentScan({ "org.typroject", "com.yeejoin.amos" }) @ComponentScan({ "org.typroject", "com.yeejoin.amos" })
@MapperScan(basePackages = { "com.yeejoin.amos.fas.business.dao.mapper","org.typroject.tyboot.*.*.face.orm.dao","com.yeejoin.amos.api.*.face.orm.dao","com.yeejoin.amos.boot.biz.common.dao.mapper" }) @MapperScan(basePackages = { "com.yeejoin.amos.fas.business.dao.mapper","org.typroject.tyboot.*.*.face.orm.dao","com.yeejoin.amos.api.*.face.orm.dao","com.yeejoin.amos.boot.biz.common.dao.mapper" })
public class YeeAmosFireAutoSysStart implements ApplicationContextAware { public class FireAutoSysApplication implements ApplicationContextAware {
private static final Logger logger = LoggerFactory.getLogger(YeeAmosFireAutoSysStart.class); private static final Logger logger = LoggerFactory.getLogger(FireAutoSysApplication.class);
/** /**
* 启动amosop-server * 启动amosop-server
...@@ -68,7 +68,7 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware { ...@@ -68,7 +68,7 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware {
*/ */
public static void main(String[] args) throws UnknownHostException{ public static void main(String[] args) throws UnknownHostException{
logger.info("start Service.........."); logger.info("start Service..........");
ConfigurableApplicationContext context = SpringApplication.run(YeeAmosFireAutoSysStart.class, args); ConfigurableApplicationContext context = SpringApplication.run(FireAutoSysApplication.class, args);
GlobalExceptionHandler.setAlwaysOk(true); GlobalExceptionHandler.setAlwaysOk(true);
Environment env = context.getEnvironment(); Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress(); String ip = InetAddress.getLocalHost().getHostAddress();
......
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