Commit 11c49154 authored by KeYong's avatar KeYong

更新

parent 2c450e6d
...@@ -30,7 +30,7 @@ public class BizMessageController extends BaseController{ ...@@ -30,7 +30,7 @@ public class BizMessageController extends BaseController{
@Autowired @Autowired
IBizMessageService iBizMessageService; IBizMessageService iBizMessageService;
@Permission // @Permission
//@Authorization(ingore = true) //@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "分页查询消息", notes = "分页查询消息") @ApiOperation(httpMethod = "GET",value = "分页查询消息", notes = "分页查询消息")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......
...@@ -111,10 +111,20 @@ public class LoginController { ...@@ -111,10 +111,20 @@ public class LoginController {
if (ObjectUtils.isEmpty(feignClientResult.getResult())){ if (ObjectUtils.isEmpty(feignClientResult.getResult())){
throw new Exception("缺失登录信息"); throw new Exception("缺失登录信息");
} }
// 调用平台授权接口 // 调用平台授权接口
Map<String ,String > re = (Map<String, String>) feignClientResult.getResult(); Map<String ,String > re = (Map<String, String>) feignClientResult.getResult();
logger.info("登录返回信息------------------" + re.toString());
String amosToken = re.get("token"); String amosToken = re.get("token");
privilegeFeign.warrant(appKeyPrivilege, productPrivilege, amosToken); logger.info("amosToken------------------------------------" + amosToken);
logger.info("product------------------------------------" + product);
logger.info("appKey------------------------------------" + appKey);
FeignClientResult res = privilegeFeign.warrant(appKeyPrivilege, productPrivilege, amosToken);
logger.info("privilegeFeign.warrant 返回结果-----------" + res.getResult().toString());
RequestContext.setToken(amosToken); RequestContext.setToken(amosToken);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
......
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.bo.BindPointBo; import com.yeejoin.amos.fas.business.bo.BindPointBo;
import com.yeejoin.amos.fas.business.bo.BindRegionBo; import com.yeejoin.amos.fas.business.bo.BindRegionBo;
import com.yeejoin.amos.fas.business.dao.mapper.ContingencyPlanInstanceMapper;
import com.yeejoin.amos.fas.business.param.RetrieveParams; import com.yeejoin.amos.fas.business.param.RetrieveParams;
import com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService; import com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService;
import com.yeejoin.amos.fas.business.service.intfc.IRocketMQService; import com.yeejoin.amos.fas.business.service.intfc.IRocketMQService;
...@@ -12,6 +13,7 @@ import com.yeejoin.amos.fas.common.enums.ResourceTypeDefEnum; ...@@ -12,6 +13,7 @@ import com.yeejoin.amos.fas.common.enums.ResourceTypeDefEnum;
import com.yeejoin.amos.fas.config.Permission; import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse; import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil; import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.core.util.StringUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -35,7 +37,6 @@ public class View3dController extends BaseController { ...@@ -35,7 +37,6 @@ public class View3dController extends BaseController {
@Autowired @Autowired
private IView3dService view3dService; private IView3dService view3dService;
@ApiOperation(httpMethod = "POST", value = "点3d坐标设置", notes = "按照点类型3d坐标设置" ) @ApiOperation(httpMethod = "POST", value = "点3d坐标设置", notes = "按照点类型3d坐标设置" )
@PostMapping(value = "/point/bind",produces = "application/json;charset=UTF-8") @PostMapping(value = "/point/bind",produces = "application/json;charset=UTF-8")
public CommonResponse setPoint3dPosition(@ApiParam(name = "参数",required = true) @RequestBody List<BindPointBo> pointBoList){ public CommonResponse setPoint3dPosition(@ApiParam(name = "参数",required = true) @RequestBody List<BindPointBo> pointBoList){
...@@ -106,7 +107,7 @@ public class View3dController extends BaseController { ...@@ -106,7 +107,7 @@ public class View3dController extends BaseController {
@ApiOperation(value = "一周安全指数趋势查询", notes = "一周安全指数趋势查询") @ApiOperation(value = "一周安全指数趋势查询", notes = "一周安全指数趋势查询")
@GetMapping(value = "safetyIndex/week") @GetMapping(value = "safetyIndex/week")
public CommonResponse safetyIndexWeek(String type,Long pointId) { public CommonResponse safetyIndexWeek(@RequestParam(name = "type",required = false) String type, @RequestParam(name = "pointId",required = false) Long pointId) {
ReginParams reginParams =getSelectedOrgInfo(); ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams); String orgCode = this.getOrgCode(reginParams);
return CommonResponseUtil.success(view3dService.getSafetyIndexWeek(orgCode)); return CommonResponseUtil.success(view3dService.getSafetyIndexWeek(orgCode));
...@@ -152,9 +153,9 @@ public class View3dController extends BaseController { ...@@ -152,9 +153,9 @@ public class View3dController extends BaseController {
@ApiOperation(value = "异常显示最新5条",notes = "异常显示最新5条") @ApiOperation(value = "异常显示最新5条",notes = "异常显示最新5条")
@GetMapping(value = "safetyExecute/list/{type}") @GetMapping(value = "safetyExecute/list/{type}")
public CommonResponse getSafetyExecuteListTop5(@PathVariable("type")String type){ public CommonResponse getSafetyExecuteListTop5(@PathVariable("type")String type){
ReginParams reginParams =getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams); String orgCode = this.getOrgCode(reginParams);
return CommonResponseUtil.success(view3dService.getSafetyExecuteListTop5(type,orgCode)); return CommonResponseUtil.success(view3dService.getSafetyExecuteListTop5(type, orgCode));
} }
......
...@@ -24,8 +24,8 @@ public interface JcsFeign { ...@@ -24,8 +24,8 @@ public interface JcsFeign {
*/ */
@RequestMapping(value = "/jcs/common/duty-person/new-duty-detail", method = RequestMethod.GET,consumes = "application/json") @RequestMapping(value = "/jcs/common/duty-person/new-duty-detail", method = RequestMethod.GET,consumes = "application/json")
ResponseModel dutyStatisticsByDate( ResponseModel dutyStatisticsByDate(
@RequestParam String beginDate, @RequestParam(value = "beginDate") String beginDate,
@RequestParam String endDate, @RequestParam(value = "endDate") String endDate,
@RequestParam(required = false) String fieldCode); @RequestParam(required = false) String fieldCode);
/** /**
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.business.bo.CheckErrorBo; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.business.bo.CheckErrorBo;
import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo; import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo;
import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo; import com.yeejoin.amos.fas.business.bo.SafetyExecuteBo;
import com.yeejoin.amos.fas.business.constants.FasConstant; import com.yeejoin.amos.fas.business.constants.FasConstant;
import com.yeejoin.amos.fas.business.dao.mapper.ContingencyPlanInstanceMapper;
import com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper; import com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper;
import com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper; import com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper;
import com.yeejoin.amos.fas.business.dao.mapper.View3dMapper; import com.yeejoin.amos.fas.business.dao.mapper.View3dMapper;
...@@ -92,6 +93,9 @@ public class View3dServiceImpl implements IView3dService { ...@@ -92,6 +93,9 @@ public class View3dServiceImpl implements IView3dService {
@Autowired @Autowired
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
@Autowired
ContingencyPlanInstanceMapper contingencyPlanInstanceMapper;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public CommonResponse setPoint3dPosition(List<BindPointBo> pointBoList) { public CommonResponse setPoint3dPosition(List<BindPointBo> pointBoList) {
...@@ -423,7 +427,8 @@ public class View3dServiceImpl implements IView3dService { ...@@ -423,7 +427,8 @@ public class View3dServiceImpl implements IView3dService {
@Override @Override
public List<Map<String, Object>> getStatisticsCheck(String orgCode) { public List<Map<String, Object>> getStatisticsCheck(String orgCode) {
List<HashMap<String, Object>> statisticsCheck = view3dMapper.getStatisticsCheck(orgCode); String bizOrgCode = getBizOrgCode(orgCode);
List<HashMap<String, Object>> statisticsCheck = view3dMapper.getStatisticsCheck(bizOrgCode);
List<Map<String, Object>> stateList = PlanTaskDetailStatusEnum.getEnumList(); List<Map<String, Object>> stateList = PlanTaskDetailStatusEnum.getEnumList();
stateList.forEach(s -> { stateList.forEach(s -> {
if (statisticsCheck != null) { if (statisticsCheck != null) {
...@@ -449,7 +454,7 @@ public class View3dServiceImpl implements IView3dService { ...@@ -449,7 +454,7 @@ public class View3dServiceImpl implements IView3dService {
case "risk"://风险异常 case "risk"://风险异常
return view3dMapper.getRiskErrorTop5(orgCode); return view3dMapper.getRiskErrorTop5(orgCode);
case "check"://巡检异常 case "check"://巡检异常
return view3dMapper.getCheckErrorTop5(orgCode); return view3dMapper.getCheckErrorTop5(getBizOrgCode(orgCode));
case "fire"://火灾告警 case "fire"://火灾告警
return view3dMapper.getFireAlarmTop5(orgCode); return view3dMapper.getFireAlarmTop5(orgCode);
default: default:
...@@ -457,6 +462,14 @@ public class View3dServiceImpl implements IView3dService { ...@@ -457,6 +462,14 @@ public class View3dServiceImpl implements IView3dService {
} }
} }
private String getBizOrgCode(String orgCode) {
String bizOrgCode = null;
if (StringUtil.isNotEmpty(orgCode)) {
bizOrgCode = contingencyPlanInstanceMapper.getBizOrgCode(orgCode);
}
return bizOrgCode;
}
@Override @Override
public Map<String, Object> getStatisticsDuty() { public Map<String, Object> getStatisticsDuty() {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
......
...@@ -131,13 +131,13 @@ ...@@ -131,13 +131,13 @@
left JOIN p_plan_task t on t.id=d.task_no left JOIN p_plan_task t on t.id=d.task_no
WHERE WHERE
DATEDIFF(t.begin_time,CURRENT_DATE) <= 0 AND DATEDIFF(t.end_time,CURRENT_DATE) >= 0 DATEDIFF(t.begin_time,CURRENT_DATE) <= 0 AND DATEDIFF(t.end_time,CURRENT_DATE) >= 0
AND (t.org_code like CONCAT(#{orgCode},'-%') OR t.org_code = #{orgCode}) AND (t.org_code like CONCAT(#{orgCode},'%') OR t.org_code = #{orgCode})
AND d.status = 0 AND d.status = 0
UNION ALL UNION ALL
select select
is_ok as type,count(1) as value is_ok as type,count(1) as value
from p_check a from p_check a
where (a.org_code like CONCAT(#{orgCode},'-%') OR a.org_code = #{orgCode}) where (a.org_code like CONCAT(#{orgCode},'%') OR a.org_code = #{orgCode})
and TO_DAYS(a.check_time) = TO_DAYS(CURRENT_DATE) and TO_DAYS(a.check_time) = TO_DAYS(CURRENT_DATE)
GROUP BY a.is_ok GROUP BY a.is_ok
]]> ]]>
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
left join p_point I ON I.id = p.point_id left join p_point I ON I.id = p.point_id
where p.is_ok IN ('2', '3') where p.is_ok IN ('2', '3')
AND I.is_delete = 0 AND I.is_delete = 0
AND (p.org_code = #{orgCode} OR p.org_code like CONCAT(#{orgCode},'-%') ) AND (p.org_code = #{orgCode} OR p.org_code like CONCAT(#{orgCode},'%') )
ORDER BY p.check_time desc ORDER BY p.check_time desc
limit 0,5 limit 0,5
</select> </select>
......
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