代码格式化
This commit is contained in:
parent
027e493020
commit
8c256f315d
2
pom.xml
2
pom.xml
|
@ -195,7 +195,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>public</id>
|
<id>public</id>
|
||||||
<name>aliyun nexus</name>
|
<name>aliyun nexus</name>
|
||||||
<!-- <url>https://maven.aliyun.com/repository/central</url>-->
|
<!-- <url>https://maven.aliyun.com/repository/central</url>-->
|
||||||
<url>https://repo1.maven.org/maven2/</url>
|
<url>https://repo1.maven.org/maven2/</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
|
|
|
@ -8,8 +8,6 @@ import io.renren.modules.notice.service.SysNoticeService;
|
||||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||||
import io.renren.modules.resource.service.ResourceService;
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
|
||||||
import io.renren.modules.sys.dto.SysRoleDTO;
|
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
import io.renren.modules.sys.service.SysDeptService;
|
import io.renren.modules.sys.service.SysDeptService;
|
||||||
import io.renren.modules.sys.service.SysRoleService;
|
import io.renren.modules.sys.service.SysRoleService;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package io.renren.modules.fuse.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package io.renren.modules.gateway.controller;
|
package io.renren.modules.gateway.controller;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
|
||||||
import cn.hutool.poi.excel.ExcelUtil;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
@ -25,7 +23,6 @@ import io.renren.modules.sys.entity.SysDeptEntity;
|
||||||
import io.renren.modules.sys.enums.JhDeptEnum;
|
import io.renren.modules.sys.enums.JhDeptEnum;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -36,14 +33,10 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import javax.naming.NamingException;
|
import javax.naming.NamingException;
|
||||||
import javax.naming.directory.SearchResult;
|
import javax.naming.directory.SearchResult;
|
||||||
import javax.naming.ldap.LdapContext;
|
|
||||||
import javax.servlet.ServletOutputStream;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
@ -357,7 +350,7 @@ public class MonitorControllerV2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
static public class Org{
|
static public class Org {
|
||||||
@ExcelProperty("名称")
|
@ExcelProperty("名称")
|
||||||
String orgName;
|
String orgName;
|
||||||
}
|
}
|
||||||
|
@ -379,8 +372,8 @@ public class MonitorControllerV2 {
|
||||||
String origStr = (String) relult.getAttributes().get("distinguishedName").get();
|
String origStr = (String) relult.getAttributes().get("distinguishedName").get();
|
||||||
String[] orgs = origStr.split(",");
|
String[] orgs = origStr.split(",");
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (int i = orgs.length -3-1; i >= 0; i--) {
|
for (int i = orgs.length - 3 - 1; i >= 0; i--) {
|
||||||
builder.append("/" + orgs[i].replace("OU=",""));
|
builder.append("/" + orgs[i].replace("OU=", ""));
|
||||||
}
|
}
|
||||||
Org org = new Org();
|
Org org = new Org();
|
||||||
org.setOrgName(builder.toString());
|
org.setOrgName(builder.toString());
|
||||||
|
@ -394,7 +387,7 @@ public class MonitorControllerV2 {
|
||||||
|
|
||||||
// ExcelUtil.getWriter().write(all, false);
|
// ExcelUtil.getWriter().write(all, false);
|
||||||
|
|
||||||
ExcelUtils.exportExcelToTarget(response, "org","all", all, Org.class);
|
ExcelUtils.exportExcelToTarget(response, "org", "all", all, Org.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ import io.renren.common.domain.Tsingtao_xhaProperties;
|
||||||
import io.renren.common.page.PageData;
|
import io.renren.common.page.PageData;
|
||||||
import io.renren.common.service.impl.CrudServiceImpl;
|
import io.renren.common.service.impl.CrudServiceImpl;
|
||||||
import io.renren.common.utils.DateUtils;
|
import io.renren.common.utils.DateUtils;
|
||||||
import io.renren.modules.device.dto.TbDeviceApplyDTO;
|
|
||||||
import io.renren.modules.monitor.dto.CameraChannelDto1;
|
import io.renren.modules.monitor.dto.CameraChannelDto1;
|
||||||
import io.renren.modules.monitor.entity.CameraChannel;
|
import io.renren.modules.monitor.entity.CameraChannel;
|
||||||
import io.renren.modules.monitor.mapper.CameraChannelMapper;
|
import io.renren.modules.monitor.mapper.CameraChannelMapper;
|
||||||
|
@ -2292,7 +2291,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) {
|
if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) {
|
||||||
curPage = Integer.parseInt(params.get("page").toString());
|
curPage = Integer.parseInt(params.get("page").toString());
|
||||||
}
|
}
|
||||||
List<Map> dtoList= resourceDao.selectCensusResourceTable(params);
|
List<Map> dtoList = resourceDao.selectCensusResourceTable(params);
|
||||||
List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
|
List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
|
||||||
return new PageData(result, dtoList.size());
|
return new PageData(result, dtoList.size());
|
||||||
}
|
}
|
||||||
|
@ -2307,7 +2306,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) {
|
if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) {
|
||||||
curPage = Integer.parseInt(params.get("page").toString());
|
curPage = Integer.parseInt(params.get("page").toString());
|
||||||
}
|
}
|
||||||
List<Map> dtoList= resourceDao.selectCensusApplyTable(params);
|
List<Map> dtoList = resourceDao.selectCensusApplyTable(params);
|
||||||
List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
|
List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
|
||||||
return new PageData(result, dtoList.size());
|
return new PageData(result, dtoList.size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,7 @@ import io.renren.modules.security.service.SysUserTokenService;
|
||||||
import io.renren.modules.security.user.SecurityUser;
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.renren.modules.security.user.UserDetail;
|
import io.renren.modules.security.user.UserDetail;
|
||||||
import io.renren.modules.sys.dao.SysDeptDao;
|
import io.renren.modules.sys.dao.SysDeptDao;
|
||||||
import io.renren.modules.sys.dao.SysUserDao;
|
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
import io.renren.modules.sys.entity.SysUserEntity;
|
|
||||||
import io.renren.modules.sys.enums.UserStatusEnum;
|
import io.renren.modules.sys.enums.UserStatusEnum;
|
||||||
import io.renren.modules.sys.service.SysUserService;
|
import io.renren.modules.sys.service.SysUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getDeviceDTOList" resultMap="deviceDTO">
|
<select id="getDeviceDTOList" resultMap="deviceDTO">
|
||||||
select td.*, IFNULL(ANY_VALUE(tda.state),1) as state from tb_device td left join tb_device_apply tda on td.id=tda.device_id
|
select td.*, IFNULL(ANY_VALUE(tda.state),1) as state from tb_device td left join tb_device_apply tda on
|
||||||
|
td.id=tda.device_id
|
||||||
<if test="userId != null and userId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
and tda.creator = #{userId}
|
and tda.creator = #{userId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
insert into tb_fuse_resource(id, fuse_id, resource_id, sequence, type, dept_name, resource_name)
|
insert into tb_fuse_resource(id, fuse_id, resource_id, sequence, type, dept_name, resource_name)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.id}, #{item.fuseId}, #{item.resourceId}, #{item.sequence}, #{item.type}, #{item.deptName}, #{item.resourceName})
|
(#{item.id}, #{item.fuseId}, #{item.resourceId}, #{item.sequence}, #{item.type}, #{item.deptName},
|
||||||
|
#{item.resourceName})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
@ -1843,7 +1843,8 @@
|
||||||
|
|
||||||
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
||||||
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, tdr.create_date AS createDate,
|
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, tdr.create_date AS createDate,
|
||||||
CASE WHEN (tdr.del_flag=0 OR tdr.del_flag=5) THEN '通过' WHEN tdr.del_flag=6 THEN '不通过' ELSE '审核中' END AS approveStatus, trma.instance_id AS applyNumber
|
CASE WHEN (tdr.del_flag=0 OR tdr.del_flag=5) THEN '通过' WHEN tdr.del_flag=6 THEN '不通过' ELSE '审核中' END AS
|
||||||
|
approveStatus, trma.instance_id AS applyNumber
|
||||||
FROM (SELECT IF(d.type='组件服务', a.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
|
FROM (SELECT IF(d.type='组件服务', a.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
|
||||||
d.name
|
d.name
|
||||||
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND
|
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND
|
||||||
|
@ -1938,7 +1939,8 @@
|
||||||
'青岛市大数据发展管理局' AS 'resourceDeptName',
|
'青岛市大数据发展管理局' AS 'resourceDeptName',
|
||||||
'会议室' AS 'type',
|
'会议室' AS 'type',
|
||||||
tm.create_date AS 'createDate',
|
tm.create_date AS 'createDate',
|
||||||
CASE tmb.state WHEN 1 THEN '审核中' WHEN 2 THEN '通过' WHEN 3 THEN '不通过' ELSE '审核中' END AS 'approveStatus',
|
CASE tmb.state WHEN 1 THEN '审核中' WHEN 2 THEN '通过' WHEN 3 THEN '不通过' ELSE '审核中' END AS
|
||||||
|
'approveStatus',
|
||||||
'' AS 'applyNumber'
|
'' AS 'applyNumber'
|
||||||
FROM
|
FROM
|
||||||
t_meetingroom_book tmb,
|
t_meetingroom_book tmb,
|
||||||
|
|
|
@ -296,11 +296,11 @@ public class JhlDAPTool {
|
||||||
|
|
||||||
Hashtable<String, String> env = new Hashtable<String, String>();
|
Hashtable<String, String> env = new Hashtable<String, String>();
|
||||||
env.put(Context.INITIAL_CONTEXT_FACTORY, FACTORY);
|
env.put(Context.INITIAL_CONTEXT_FACTORY, FACTORY);
|
||||||
env.put(Context.PROVIDER_URL, URL +BASEDN);
|
env.put(Context.PROVIDER_URL, URL + BASEDN);
|
||||||
env.put(Context.SECURITY_AUTHENTICATION, "simple");
|
env.put(Context.SECURITY_AUTHENTICATION, "simple");
|
||||||
env.put(Context.SECURITY_PRINCIPAL, username); // 管理员
|
env.put(Context.SECURITY_PRINCIPAL, username); // 管理员
|
||||||
env.put(Context.SECURITY_CREDENTIALS, password); // 管理员密码
|
env.put(Context.SECURITY_CREDENTIALS, password); // 管理员密码
|
||||||
env.put("java.naming.ldap.attributes.binary","objectGUID");
|
env.put("java.naming.ldap.attributes.binary", "objectGUID");
|
||||||
LinkedList<SearchResult> all = new LinkedList<>();
|
LinkedList<SearchResult> all = new LinkedList<>();
|
||||||
try {
|
try {
|
||||||
InitialLdapContext ctx = new InitialLdapContext(env, connCtls);
|
InitialLdapContext ctx = new InitialLdapContext(env, connCtls);
|
||||||
|
@ -322,7 +322,7 @@ public class JhlDAPTool {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("ldap错误", e);
|
log.error("ldap错误", e);
|
||||||
return null;
|
return null;
|
||||||
}finally {
|
} finally {
|
||||||
closeContext();
|
closeContext();
|
||||||
}
|
}
|
||||||
return all;
|
return all;
|
||||||
|
|
Loading…
Reference in New Issue