GLJ-代码提交
This commit is contained in:
parent
846b160403
commit
9c12722c82
|
@ -92,4 +92,15 @@ public class CallForHelpVo extends DisasterInfo {
|
||||||
*/
|
*/
|
||||||
private String roleName;
|
private String roleName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色Id
|
||||||
|
*/
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色父级Id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,11 @@ public class DisasterInfoController {
|
||||||
})
|
})
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<IPage<CallForHelpVo>> list(CallForHelpVo CallForHelpVo, Query query) {
|
public R<IPage<CallForHelpVo>> list(CallForHelpVo CallForHelpVo, Query query) {
|
||||||
|
CallForHelpVo userRole = disasterInfoService.getByNameRole("admin");
|
||||||
|
Long chiefIdEquals = CallForHelpVo.getChiefIdEquals();
|
||||||
|
if (chiefIdEquals.equals(userRole.getRoleId())){
|
||||||
|
CallForHelpVo.setChiefIdEquals(null);
|
||||||
|
}
|
||||||
IPage<CallForHelpVo> pages = disasterInfoService.page(Condition.getPage(query), CallForHelpVo);
|
IPage<CallForHelpVo> pages = disasterInfoService.page(Condition.getPage(query), CallForHelpVo);
|
||||||
return R.data(pages);
|
return R.data(pages);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,4 +80,7 @@ public interface DisasterInfoMapper extends BaseMapper<DisasterInfo> {
|
||||||
List<Map<String, Long>> adminData(String year);
|
List<Map<String, Long>> adminData(String year);
|
||||||
|
|
||||||
List<Map<String, Long>> disasterNum(String year);
|
List<Map<String, Long>> disasterNum(String year);
|
||||||
|
|
||||||
|
CallForHelpVo getByNameRole(@Param("admin") String admin);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -371,4 +371,8 @@
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getByNameRole" resultType="com.kening.vordm.vo.CallForHelpVo">
|
||||||
|
SELECT id AS roleId, parent_id AS parentId, role_name AS roleName FROM blade_role WHERE role_name = #{admin}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -74,6 +74,9 @@
|
||||||
<if test="remoteSensingSourceData.disasterId != null and remoteSensingSourceData.disasterId != ''">
|
<if test="remoteSensingSourceData.disasterId != null and remoteSensingSourceData.disasterId != ''">
|
||||||
r.disaster_id = #{remoteSensingSourceData.disasterId}
|
r.disaster_id = #{remoteSensingSourceData.disasterId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remoteSensingSourceData.status != null">
|
||||||
|
and r.status = #{remoteSensingSourceData.status}
|
||||||
|
</if>
|
||||||
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin != null">
|
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin != null">
|
||||||
and r.product_resolution >= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution < #{remoteSensingSourceData.productResolutionMax}
|
and r.product_resolution >= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution < #{remoteSensingSourceData.productResolutionMax}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -72,4 +72,6 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
|
||||||
Integer getByUserDisasterInfo(Long userId, Long disasterId);
|
Integer getByUserDisasterInfo(Long userId, Long disasterId);
|
||||||
|
|
||||||
UserVo getByUserDisasterInfoStatistics(Long userId);
|
UserVo getByUserDisasterInfoStatistics(Long userId);
|
||||||
|
|
||||||
|
CallForHelpVo getByNameRole(String anmin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import org.springblade.common.cache.CacheNames;
|
||||||
import org.springblade.core.redis.cache.BladeRedis;
|
import org.springblade.core.redis.cache.BladeRedis;
|
||||||
import org.springblade.core.secure.utils.AuthUtil;
|
import org.springblade.core.secure.utils.AuthUtil;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springblade.core.tool.constant.BladeConstant;
|
|
||||||
import org.springblade.core.tool.utils.DigestUtil;
|
import org.springblade.core.tool.utils.DigestUtil;
|
||||||
import org.springblade.core.tool.utils.StringUtil;
|
import org.springblade.core.tool.utils.StringUtil;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
@ -154,9 +153,8 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<CallForHelpVo> page(IPage<CallForHelpVo> page, CallForHelpVo callForHelpVo) {
|
public IPage<CallForHelpVo> page(IPage<CallForHelpVo> page, CallForHelpVo callForHelpVo) {
|
||||||
if (callForHelpVo.getRoleName() == null || callForHelpVo.getRoleName().equals("admin")){
|
|
||||||
callForHelpVo.setChiefIdEquals(null);
|
|
||||||
}
|
|
||||||
return page.setRecords(this.baseMapper.page(page, callForHelpVo));
|
return page.setRecords(this.baseMapper.page(page, callForHelpVo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,6 +237,11 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
|
||||||
return userVo;
|
return userVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CallForHelpVo getByNameRole(String anmin) {
|
||||||
|
return this.baseMapper.getByNameRole(anmin);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后台管理系统-控制台灾害各项统计
|
* 后台管理系统-控制台灾害各项统计
|
||||||
* @description 暂时没有条件查询 所有统计都暂时写在一个查询里面
|
* @description 暂时没有条件查询 所有统计都暂时写在一个查询里面
|
||||||
|
|
Loading…
Reference in New Issue