Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_platformV2
Commits
49448180
Commit
49448180
authored
Aug 03, 2023
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改组织机构相关
parent
2a0fb520
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
137 行增加
和
57 行删除
+137
-57
pom.xml
jyzb-api/pom.xml
+2
-0
OrgDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgDto.java
+16
-0
OrgTreeDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgTreeDto.java
+15
-2
QueryOrgReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryOrgReq.java
+6
-2
pom.xml
jyzb-biz/pom.xml
+1
-5
PubOrgController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PubOrgController.java
+10
-21
PubOrg.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/PubOrg.java
+8
-2
MsgType.java
jyzb-biz/src/main/java/com/junmp/jyzb/enums/MsgType.java
+30
-0
PubOrgService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/PubOrgService.java
+3
-5
EquipmentTypeServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentTypeServiceImpl.java
+2
-0
PolicemanServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
+0
-17
PubOrgServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
+0
-0
.gitignore
jyzb-boot/src/main/resources/.idea/.gitignore
+10
-0
misc.xml
jyzb-boot/src/main/resources/.idea/misc.xml
+7
-0
modules.xml
jyzb-boot/src/main/resources/.idea/modules.xml
+9
-0
resources.iml
jyzb-boot/src/main/resources/.idea/resources.iml
+10
-0
vcs.xml
jyzb-boot/src/main/resources/.idea/vcs.xml
+7
-0
pom.xml
pom.xml
+1
-3
没有找到文件。
jyzb-api/pom.xml
View file @
49448180
...
...
@@ -46,4 +46,6 @@
</dependencies>
</project>
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgDto.java
0 → 100644
View file @
49448180
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
lombok.Data
;
@Data
public
class
OrgDto
{
private
Long
orgId
;
private
String
orgName
;
private
String
orgCode
;
private
Integer
isDepartment
;
private
Long
orgParentId
;
private
String
areaName
;
private
String
levelFlag
;
private
String
dName
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/OrgTreeDto.java
View file @
49448180
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
@Data
public
class
OrgTreeDto
{
public
class
OrgTreeDto
implements
Serializable
{
private
Long
orgId
;
private
String
name
;
private
String
code
;
private
Integer
type
;
private
List
<
OrgTreeDto
>
child
=
new
ArrayList
<>();
private
Long
orgParentId
;
private
String
areaName
;
private
String
levelFlag
;
private
String
dName
;
private
transient
List
<
OrgTreeDto
>
child
=
new
ArrayList
<>();
public
void
addChild
(
OrgTreeDto
child
)
{
this
.
child
.
add
(
child
);
}
public
OrgTreeDto
copyIngnoreChildren
()
{
OrgTreeDto
desBean
=
new
OrgTreeDto
();
BeanUtils
.
copyProperties
(
this
,
desBean
,
"children"
,
"info"
);
return
desBean
;
}
}
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryOrgReq.java
View file @
49448180
...
...
@@ -5,9 +5,13 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
@Data
//@EqualsAndHashCode(callSuper =
tru
e)
public
class
QueryOrgReq
{
//@EqualsAndHashCode(callSuper =
fals
e)
public
class
QueryOrgReq
extends
BaseRequest
{
private
String
orgCode
;
private
String
orgId
;
private
String
parentId
;
private
Integer
isDepartment
;
private
Integer
level
;
}
jyzb-biz/pom.xml
View file @
49448180
...
...
@@ -46,12 +46,12 @@
<groupId>
com.junmp.v2
</groupId>
<artifactId>
auth-sdk
</artifactId>
</dependency>
<dependency>
<groupId>
com.junmp.jyzb
</groupId>
<artifactId>
jyzb-common
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
v2-log-api
</artifactId>
...
...
@@ -70,9 +70,5 @@
<groupId>
com.junmp.jyzb
</groupId>
<artifactId>
jyzb-api
</artifactId>
</dependency>
<dependency>
<groupId>
com.junmp.jyzb
</groupId>
<artifactId>
jyzb-api
</artifactId>
</dependency>
</dependencies>
</project>
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PubOrgController.java
View file @
49448180
package
com
.
junmp
.
jyzb
.
controller
;
import
com.junmp.jyzb.api.bean.dto.OrgDto
;
import
com.junmp.jyzb.api.bean.dto.OrgTreeDto
;
import
com.junmp.jyzb.api.bean.query.QueryOrgReq
;
import
com.junmp.jyzb.service.PubOrgService
;
...
...
@@ -8,10 +9,8 @@ import com.junmp.v2.common.bean.response.ApiRes;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.lang.Nullable
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
...
...
@@ -25,14 +24,7 @@ public class PubOrgController {
@Resource
public
PubOrgService
pubOrgService
;
@PostMapping
(
"/ShowPubOrgList"
)
@ApiOperation
(
"查询组织机构列表_简化版"
)
public
ApiRes
<
List
<
Map
<
String
,
Object
>>>
ShowEquipmentList
(
@RequestBody
Map
<
String
,
Object
>
orgId
)
{
return
ApiRes
.
success
(
pubOrgService
.
showPubOrgList
(
orgId
));
}
@PostMapping
(
"/SetOrgParentIds"
)
@GetMapping
(
"/SetOrgParentIds"
)
@ApiOperation
(
"填充组织机构的parent_ids字段"
)
public
ResponseResult
setOrgParentIds
()
{
//传入当前的组织机构id,展示所有本级及下级的
...
...
@@ -47,18 +39,15 @@ public class PubOrgController {
return
returnMsg
;
}
@PostMapping
(
"/GetOrg
Detail
"
)
@PostMapping
(
"/GetOrg
List
"
)
@ApiOperation
(
"查询组织机构详细信息"
)
public
List
<
OrgTreeDto
>
getOrg
Detail
(
@RequestBody
QueryOrgReq
req
)
{
public
List
<
OrgTreeDto
>
getOrg
List
(
@RequestBody
QueryOrgReq
req
)
{
List
<
OrgTreeDto
>
returnMsg
=
pubOrgService
.
getOrgList
(
req
);
return
returnMsg
;
}
@PostMapping
(
"/GetLowerOrg"
)
@ApiOperation
(
"获取本级及下级的组织机构"
)
public
ResponseResult
getLowerOrg
(
@RequestBody
Map
<
String
,
Object
>
msg
)
{
String
orgId
=
msg
.
get
(
"orgId"
).
toString
();
List
<
String
>
returnMsg
=
pubOrgService
.
getLowerOrg
(
orgId
);
return
new
ResponseResult
(
99200
,
"操作成功"
,
returnMsg
);
@PostMapping
(
"/GetLowOrg"
)
@ApiOperation
(
"根据组织机构查询下一级信息"
)
public
ApiRes
<
List
<
OrgDto
>>
getLowOrg
(
@RequestBody
QueryOrgReq
req
)
{
return
ApiRes
.
success
(
pubOrgService
.
getLowOrg
(
req
))
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/entity/PubOrg.java
View file @
49448180
...
...
@@ -25,6 +25,12 @@ public class PubOrg implements Serializable {
*/
@TableId
(
type
=
IdType
.
AUTO
,
value
=
"org_id"
)
private
Long
orgId
;
/**
* 主键
*/
@TableField
(
value
=
"is_department"
)
private
Integer
isDepartment
;
/**
* 父id,一级节点父id是0
...
...
@@ -61,7 +67,6 @@ public class PubOrg implements Serializable {
*/
@TableField
(
value
=
"sort_val"
)
private
Integer
sortVal
;
/**
* 状态:1-启用,0-禁用
*/
...
...
@@ -194,5 +199,5 @@ public class PubOrg implements Serializable {
@TableField
(
value
=
"org_name"
)
private
String
orgName
;
// private static final long serialVersionUID = 1L;
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/enums/MsgType.java
0 → 100644
View file @
49448180
package
com
.
junmp
.
jyzb
.
enums
;
import
lombok.Getter
;
/**
* 消息类型
*
* @author FCG
*/
@Getter
public
enum
MsgType
{
/**
* news,有效时间24h
*/
News
(
"news"
,
24
*
60
*
60
*
1000
),
Video
(
"video"
,
24
*
60
*
60
*
1000
),
Goods
(
"goods"
,
7
*
24
*
60
*
60
*
1000
);
private
String
name
;
/**
* time to live,(ms)
*/
private
long
ttl
;
MsgType
(
String
name
,
long
ttl
)
{
this
.
name
=
name
;
this
.
ttl
=
ttl
;
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/PubOrgService.java
View file @
49448180
package
com
.
junmp
.
jyzb
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.dto.OrgDto
;
import
com.junmp.jyzb.api.bean.dto.OrgTreeDto
;
import
com.junmp.jyzb.api.bean.query.QueryOrgReq
;
import
com.junmp.jyzb.api.bean.req.OrgUpdateReq
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
java.util.List
;
...
...
@@ -12,8 +12,6 @@ import com.junmp.jyzb.entity.PubOrg;
public
interface
PubOrgService
extends
IService
<
PubOrg
>
{
List
<
Map
<
String
,
Object
>>
showPubOrgList
(
Map
<
String
,
Object
>
orgId
);
ResponseResult
setShortName
(
Map
<
String
,
Object
>
orgId
);
...
...
@@ -22,6 +20,6 @@ public interface PubOrgService extends IService<PubOrg> {
ResponseResult
setOrgParentIds
();
List
<
OrgTreeDto
>
getOrgList
(
QueryOrgReq
req
);
// public List<OrgTreeDto> getEquipmentList(QueryOrgReq req)
ResponseResult
changeOrgState
(
OrgUpdateReq
req
);
List
<
OrgDto
>
getLowOrg
(
QueryOrgReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentTypeServiceImpl.java
View file @
49448180
...
...
@@ -77,9 +77,11 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
selfCode
=
id
;
EquipmentType
et
=
this
.
getById
(
id
);
EquipmentTreeDto
equipmentTypeDTO
=
new
EquipmentTreeDto
();
equipmentTypeDTO
.
setName
(
et
.
getName
());
equipmentTypeDTO
.
setCode
(
et
.
getCode
());
equipmentTypeDTO
.
setType
(
et
.
getType
());
equipmentDtoMap
.
put
(
et
.
getId
(),
equipmentTypeDTO
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
View file @
49448180
...
...
@@ -571,23 +571,6 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
List
<
Map
<
String
,
Object
>>
allPoliceman
=
new
ArrayList
<>();
// // 构建 Redis 缓存键
// String redisKey = REDIS_ORG + msg.get("IncludeLowerLevel").toString() +'_'+ msg.get("orgId").toString();
// // 从 Redis 中获取数据
// List<Map<String, Object>> cachedData = redisUtils.findCachedData(redisKey);
// if (cachedData != null) {
// //将Long类型的数据转化为Date
// for (Map<String,Object> one:cachedData){
// //如果updateTime的类型为Long
// Long dataMsg = (Long) one.get("updateTime");
// one.put("updateTime", redisUtils.getDate(dataMsg));
// allPoliceman.add(one);
// }
// //按照updateTime降序排序
// //DateTimeUtil.timeSort(allPoliceman);
// return new ResponseResult(HttpStatus.SUCCESS,ReturnMsg.PASS,allPoliceman);
// }
//如果组织机构是浙江省公安厅
if
(
msg
.
get
(
"orgId"
).
toString
().
equals
(
"1369509498032808905"
)
&&
msg
.
get
(
"IncludeLowerLevel"
).
toString
().
equals
(
"true"
)){
allPoliceman
=
policemanMapper
.
getAllPolice
();
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PubOrgServiceImpl.java
View file @
49448180
差异被折叠。
点击展开。
jyzb-boot/src/main/resources/.idea/.gitignore
0 → 100644
View file @
49448180
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Zeppelin 忽略的文件
/ZeppelinRemoteNotebooks/
jyzb-boot/src/main/resources/.idea/misc.xml
0 → 100644
View file @
49448180
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
>
<output
url=
"file://$PROJECT_DIR$/out"
/>
</component>
</project>
\ No newline at end of file
jyzb-boot/src/main/resources/.idea/modules.xml
0 → 100644
View file @
49448180
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectModuleManager"
>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/.idea/resources.iml"
filepath=
"$PROJECT_DIR$/.idea/resources.iml"
/>
</modules>
</component>
</project>
\ No newline at end of file
jyzb-boot/src/main/resources/.idea/resources.iml
0 → 100644
View file @
49448180
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
inherit-compiler-output=
"true"
>
<exclude-output
/>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
\ No newline at end of file
jyzb-boot/src/main/resources/.idea/vcs.xml
0 → 100644
View file @
49448180
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$/../../../.."
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
pom.xml
View file @
49448180
...
...
@@ -13,7 +13,7 @@
<module>
jyzb-api
</module>
<module>
jyzb-boot
</module>
<module>
jyzb-biz
</module>
<!-- <module>jyzb-process</module>--
>
<module>
jyzb-process
</module
>
<module>
jyzb-common
</module>
<module>
jyzb-mq
</module>
</modules>
...
...
@@ -110,13 +110,11 @@
<artifactId>
v2-config-boot-starter
</artifactId>
<version>
${junmp.v2.version}
</version>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
v2-db-boot-starter
</artifactId>
<version>
${junmp.v2.version}
</version>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
v2-log-boot-starter
</artifactId>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论