Commit f7d949c5 authored by chenhao's avatar chenhao

Merge branch 'develop_ccs' of http://172.16.10.76/moa/amos-boot-biz into develop_ccs

parents c2624cf3 70c27a5f
......@@ -31,7 +31,7 @@ public class WaterResourceCrane extends BaseEntity {
* 高度(cm)
*/
@TableField("height")
private Float height;
private float height;
/**
* 水源可用状态类别代码
*/
......@@ -66,17 +66,17 @@ public class WaterResourceCrane extends BaseEntity {
* 官网直径(cm)
*/
@TableField("pipe_diameter")
private Float pipeDiameter;
private float pipeDiameter;
/**
* 进水管直径(cm)
*/
@TableField("inlet_pipe_diameter")
private Float inletPipeDiameter;
private float inletPipeDiameter;
/**
* 出水管直径(cm)
*/
@TableField("outlet_pipe_diameter")
private Float outletPipeDiameter;
private float outletPipeDiameter;
/**
* 加水车道数量(个)
*/
......
......@@ -4,6 +4,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -362,4 +363,8 @@ public interface EquipFeignClient {
@RequestMapping(value = "equipment-category/list-tree", method = RequestMethod.GET)
ResponseModel<Object> list() ;
//获取消防装备权限
@RequestMapping(value = "/equipment-detail/permissions/export", method = RequestMethod.GET)
ResponseModel<ReginParams> getPermissions() ;
}
package com.yeejoin.equipmanage.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto;
import com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.equipmanage.common.entity.*;
import com.yeejoin.equipmanage.common.entity.vo.EquipmentDetailDownloadVO;
......@@ -38,6 +42,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
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 org.typroject.tyboot.core.restful.exception.instance.BadRequest;
......@@ -654,4 +659,21 @@ public class EquipmentDetailController extends AbstractBaseController {
return ResponseHelper.buildResponse(iEquipmentDetailService.companyDeptTree());
}
/**
* 消防装备权限获取
*
* @param
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/permissions/export")
@ApiOperation(httpMethod = "GET", value = "获取权限", notes = "获取权限")
public ResponseModel<ReginParams> getPermissions() {
// 导出模板增加权限
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 权限处理
PermissionInterceptorContext.setDataAuthRule("fire_equip_info");
return ResponseHelper.buildResponse(reginParams);
}
}
......@@ -178,6 +178,9 @@ public class DataSourcesImpl implements DataSources {
case "getKeySiteCompanyDetailTree":
str = getKeySiteCompanyDetailTree();
break;
case "getFireTeamContactUser":
str = getFireTeamContactUser();
break;
}
}
return str;
......@@ -251,10 +254,9 @@ public class DataSourcesImpl implements DataSources {
// IPage<FireTeamCardDto> fireTeamCardDtoIPage = fireTeamService.listFireTeamByPage(pageBean,
// new FireTeamListDto());
// List<FireTeamCardDto> records = fireTeamCardDtoIPage.getRecords();
// 导出模板增加权限
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 权限处理
PermissionInterceptorContext.setDataAuthRule("fire_equip_info");
ResponseModel<ReginParams> result = equipFeignClient.getPermissions();
ReginParams reginParams = result.getResult();
List<FireTeam> records = fireTeamService.getFireTeamList(reginParams.getPersonIdentity().getBizOrgCode());
List<String> names = records.stream().map(item -> {
return item.getName() + "@" + item.getSequenceNbr();
......@@ -489,6 +491,7 @@ public class DataSourcesImpl implements DataSources {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 权限处理
PermissionInterceptorContext.setDataAuthRule("fire_fighters_info");
List<OrgUsr> menus = iOrgUsrService.companyTreeByUserAndTypeNoTree(reginParams, null);
List<String> names = menus.stream().map(item -> {
return item.getBizOrgName() + "@" + item.getSequenceNbr() + "@" + item.getBizOrgCode();
......@@ -498,17 +501,17 @@ public class DataSourcesImpl implements DataSources {
}
/**
* 消防队员模板获取所属部门
* 消防装备模板获取所属部门
*
* @return
*/
private String[] getEquipCompany() {
//List<OrgMenuDto> menus = OrgUsrServiceImpl.buildTreeParallel(iOrgUsrService.selectCompanyDepartmentMsg());
// 导出模板增加权限
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 权限处理
PermissionInterceptorContext.setDataAuthRule("fire_equip_info");
// List<OrgUsr> menus = iOrgUsrService.selectCompanyDepartmentMsg();
ResponseModel<ReginParams> result = equipFeignClient.getPermissions();
ReginParams reginParams = result.getResult();
List<OrgUsr> menus = iOrgUsrService.companyTreeByUserAndTypeNoTree(reginParams, null);
List<String> names = menus.stream().map(item -> {
return item.getBizOrgName() + "@" + item.getSequenceNbr() + "@" + item.getBizOrgCode();
......
......@@ -615,12 +615,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
for (LatentDangerBo bo : dangerList) {
List<JSONObject> filterTaskList =
taskList.stream().filter(t -> t.getString("businessKey").equals(bo.getBusinessKey())).collect(Collectors.toList());
if (ValidationUtil.isEmpty(filterTaskList)) {
continue;
}
JSONObject task = filterTaskList.get(0);
LatentDangerListVo vo = new LatentDangerListVo();
vo.setTaskId(task.getString("id"));
if (!ValidationUtil.isEmpty(filterTaskList)) {
JSONObject task = filterTaskList.get(0);
vo.setTaskId(task.getString("id"));
}
vo.setDangerId(bo.getId());
vo.setOvertimeState(bo.getOvertimeState());
vo.setDangerName(bo.getDangerName());
......
......@@ -873,10 +873,18 @@
p_latent_danger pld
WHERE 1=1
<if test="businessKeys != null and businessKeys.size > 0">
and pld.business_key IN
<foreach collection = "businessKeys" item = "businessKey" index="index" open = "(" close = ")" separator = "," >
and (
pld.business_key IN
<foreach collection="businessKeys" item="businessKey" index="index" open="(" close=")" separator=",">
#{businessKey}
</foreach>
<if
test="latentDangerListParam.dangerState != null and latentDangerListParam.dangerState == 5 or latentDangerListParam.dangerState == 6">
or pld.danger_state=#{latentDangerListParam.dangerState}
</if>
<if test="latentDangerListParam.dangerState == null">
or pld.danger_state = 5 or pld.danger_state = 6
</if>)
</if>
<if test="latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1">
and pld.danger_level=#{latentDangerListParam.dangerLevel}
......@@ -906,10 +914,19 @@
p_latent_danger pld
WHERE 1=1
<if test="businessKeys != null and businessKeys.size > 0">
and pld.business_key IN
<foreach collection = "businessKeys" item = "businessKey" index="index" open = "(" close = ")" separator = "," >
and (
pld.business_key IN
<foreach collection="businessKeys" item="businessKey" index="index" open="(" close=")" separator=",">
#{businessKey}
</foreach>
<if
test="latentDangerListParam.dangerState != null and latentDangerListParam.dangerState == 5 or latentDangerListParam.dangerState == 6">
or pld.danger_state=#{latentDangerListParam.dangerState}
</if>
<if test="latentDangerListParam.dangerState == null">
or pld.danger_state = 5 or pld.danger_state = 7
</if>
)
</if>
<if test="latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1">
and pld.danger_level=#{latentDangerListParam.dangerLevel}
......
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