Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
77c2ba28
Commit
77c2ba28
authored
Nov 17, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加根据区域编码查询基础事项
parent
fc79ef4e
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4083 additions
and
14 deletions
+4083
-14
common-lib/src/main/java/com/mortals/xhx/common/pdu/site/SitePdu.java
...rc/main/java/com/mortals/xhx/common/pdu/site/SitePdu.java
+3910
-0
common-lib/src/main/java/com/mortals/xhx/feign/site/ISiteFeign.java
.../src/main/java/com/mortals/xhx/feign/site/ISiteFeign.java
+147
-0
sample-form-manager-ui/admin/src/pages/software/materials/MaterialsManage.vue
...ui/admin/src/pages/software/materials/MaterialsManage.vue
+1
-1
sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue
...nager-ui/admin/src/pages/software/matter/MatterManage.vue
+13
-13
sample-form-manager/src/main/java/com/mortals/xhx/module/sheet/web/SheetMatterController.java
...m/mortals/xhx/module/sheet/web/SheetMatterController.java
+12
-0
No files found.
common-lib/src/main/java/com/mortals/xhx/common/pdu/site/SitePdu.java
0 → 100644
View file @
77c2ba28
This diff is collapsed.
Click to expand it.
common-lib/src/main/java/com/mortals/xhx/feign/site/ISiteFeign.java
0 → 100644
View file @
77c2ba28
package
com.mortals.xhx.feign.site
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.common.pdu.RespData
;
import
com.mortals.xhx.common.pdu.site.SitePdu
;
import
com.mortals.xhx.feign.IFeign
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 站点 Feign接口
*
* @author zxfei
* @date 2022-06-28
*/
@FeignClient
(
name
=
"base-manager"
,
path
=
"/base"
,
fallbackFactory
=
SiteFeignFallbackFactory
.
class
)
public
interface
ISiteFeign
extends
IFeign
{
/**
* 查看站点列表
*
* @param sitePdu
* @return
*/
@PostMapping
(
value
=
"/site/list"
)
Rest
<
RespData
<
List
<
SitePdu
>>>
list
(
@RequestBody
SitePdu
sitePdu
);
/**
* 查看站点
*
* @param id
* @return
*/
@GetMapping
(
value
=
"/site/info"
)
Rest
<
SitePdu
>
info
(
@RequestParam
(
value
=
"id"
)
Long
id
);
/**
* 删除站点
*
* @param ids
* @return
*/
@GetMapping
(
value
=
"/site/delete"
)
Rest
<
Void
>
delete
(
Long
[]
ids
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
* 站点保存更新
*
* @param sitePdu
* @return
*/
@PostMapping
(
value
=
"/site/save"
)
Rest
<
RespData
<
SitePdu
>>
save
(
@RequestBody
SitePdu
sitePdu
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
* 获取站点树
*
* @return
*/
@GetMapping
(
value
=
"/site/siteTree"
)
String
siteTree
(
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
* 查询站点及子站点
*
* @param sitePdu
* @return
*/
@PostMapping
(
value
=
"/site/getFlatSitesBySiteId"
)
Rest
<
List
<
SitePdu
>>
getFlatSitesBySiteId
(
@RequestBody
SitePdu
sitePdu
);
/**
* 查询站点及子站点
*
* @param sitePdu
* @return
*/
@PostMapping
(
value
=
"/site/getFlatSitesByAreaCode"
)
Rest
<
List
<
SitePdu
>>
getFlatSitesByAreaCode
(
@RequestBody
SitePdu
sitePdu
);
}
@Slf4j
@Component
class
SiteFeignFallbackFactory
implements
FallbackFactory
<
ISiteFeign
>
{
@Override
public
ISiteFeign
create
(
Throwable
t
)
{
log
.
error
(
"异常:"
,
t
);
return
new
ISiteFeign
()
{
@Override
public
Rest
<
RespData
<
List
<
SitePdu
>>>
list
(
SitePdu
sitePdu
)
{
return
Rest
.
fail
(
"暂时无法获取站点列表,请稍后再试!"
);
}
@Override
public
Rest
<
SitePdu
>
info
(
Long
id
)
{
return
Rest
.
fail
(
"暂时无法获取站点详细,请稍后再试!"
);
}
@Override
public
Rest
<
Void
>
delete
(
Long
[]
ids
,
String
authorization
)
{
return
Rest
.
fail
(
"暂时无法删除站点,请稍后再试!"
);
}
@Override
public
Rest
<
RespData
<
SitePdu
>>
save
(
SitePdu
sitePdu
,
String
authorization
)
{
return
Rest
.
fail
(
"暂时无法保存站点,请稍后再试!"
);
}
@Override
public
String
siteTree
(
String
authorization
)
{
return
JSON
.
toJSONString
(
Rest
.
fail
(
"暂时无法获取站点树,请稍后再试!"
));
}
@Override
public
Rest
<
List
<
SitePdu
>>
getFlatSitesBySiteId
(
SitePdu
sitePdu
)
{
return
Rest
.
fail
(
"暂时无法获取站点子站点,请稍后再试!"
);
}
@Override
public
Rest
<
List
<
SitePdu
>>
getFlatSitesByAreaCode
(
SitePdu
sitePdu
)
{
return
Rest
.
fail
(
"暂时无法获取站点子站点,请稍后再试!"
);
}
};
}
}
sample-form-manager-ui/admin/src/pages/software/materials/MaterialsManage.vue
View file @
77c2ba28
...
@@ -344,7 +344,7 @@ export default {
...
@@ -344,7 +344,7 @@ export default {
page
:
this
.
leftCurrent
,
page
:
this
.
leftCurrent
,
size
:
this
.
leftSize
,
size
:
this
.
leftSize
,
matterName
:
this
.
leftSearch
,
matterName
:
this
.
leftSearch
,
dept
Id
:
this
.
departmentLeft
,
dept
Code
:
this
.
departmentLeft
,
siteId
:
this
.
siteId
,
siteId
:
this
.
siteId
,
}
);
}
);
if
(
res
.
data
.
code
===
1
)
{
if
(
res
.
data
.
code
===
1
)
{
...
...
sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue
View file @
77c2ba28
...
@@ -16,23 +16,23 @@
...
@@ -16,23 +16,23 @@
>
>
</div>
</div>
<div
slot=
"right"
class=
"flex"
>
<div
slot=
"right"
class=
"flex"
>
<!--
<el-select
<el-select
v-model=
"departmentLeft"
v-model=
"departmentLeft"
size=
"small"
size=
"small"
placeholder=
"选择部门"
placeholder=
"选择部门"
class=
"autoWidth"
class=
"autoWidth"
>
>
<template
slot=
"prefix"
>
<template
slot=
"prefix"
>
{{
(
deptList
.
find
((
v
)
=>
v
.
id
===
departmentLeft
)
||
{
}
).
name
}}
{{
(
deptList
.
find
((
v
)
=>
v
.
deptCode
===
departmentLeft
)
||
{
}
).
name
}}
<
/template
>
<
/template
>
<
el
-
option
<
el
-
option
v
-
for
=
"
item in deptList
"
v
-
for
=
"
item in deptList
"
:
key
=
"
item.
id
"
:
key
=
"
item.
deptNumber
"
:
label
=
"
item.name
"
:
label
=
"
item.name
"
:
value
=
"
item.
id
"
:
value
=
"
item.
deptNumber
"
>
>
<
/el-option
>
<
/el-option
>
<
/el-select>
--
>
<
/el-select
>
<
el
-
input
<
el
-
input
size
=
"
small
"
size
=
"
small
"
style
=
"
width: 200px
"
style
=
"
width: 200px
"
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
>
>
<
/div
>
<
/div
>
<
div
slot
=
"
right
"
class
=
"
flex
"
>
<
div
slot
=
"
right
"
class
=
"
flex
"
>
<!--
<
el
-
select
<
el
-
select
v
-
model
=
"
departmentRight
"
v
-
model
=
"
departmentRight
"
size
=
"
small
"
size
=
"
small
"
placeholder
=
"
选择部门
"
placeholder
=
"
选择部门
"
...
@@ -169,17 +169,17 @@
...
@@ -169,17 +169,17 @@
>
>
<
template
slot
=
"
prefix
"
>
<
template
slot
=
"
prefix
"
>
{{
{{
(
deptList
.
find
((
v
)
=>
v
.
id
===
departmentRight
)
||
{
}
).
name
(
deptList
.
find
((
v
)
=>
v
.
deptCode
===
departmentRight
)
||
{
}
).
name
}}
}}
<
/template
>
<
/template
>
<
el
-
option
<
el
-
option
v
-
for
=
"
item in deptList
"
v
-
for
=
"
item in deptList
"
:
key
=
"
item.
id
"
:
key
=
"
item.
deptNumber
"
:
label
=
"
item.name
"
:
label
=
"
item.name
"
:
value
=
"
item.
id
"
:
value
=
"
item.
deptNumber
"
>
>
<
/el-option
>
<
/el-option
>
<
/el-select>
--
>
<
/el-select
>
<
el
-
input
<
el
-
input
size
=
"
small
"
size
=
"
small
"
style
=
"
width: 200px
"
style
=
"
width: 200px
"
...
@@ -330,8 +330,8 @@ export default {
...
@@ -330,8 +330,8 @@ export default {
page
:
this
.
rightCurrent
,
page
:
this
.
rightCurrent
,
size
:
this
.
rightSize
,
size
:
this
.
rightSize
,
matterName
:
this
.
rightSearch
,
matterName
:
this
.
rightSearch
,
dept
Id
:
this
.
departmentRight
,
dept
Code
:
this
.
departmentRight
,
//
siteId: this.siteId,
siteId
:
this
.
siteId
,
}
);
}
);
if
(
res
.
data
.
code
===
1
)
{
if
(
res
.
data
.
code
===
1
)
{
let
{
total
,
data
}
=
res
.
data
.
data
;
let
{
total
,
data
}
=
res
.
data
.
data
;
...
@@ -348,7 +348,7 @@ export default {
...
@@ -348,7 +348,7 @@ export default {
page
:
this
.
leftCurrent
,
page
:
this
.
leftCurrent
,
size
:
this
.
leftSize
,
size
:
this
.
leftSize
,
matterName
:
this
.
leftSearch
,
matterName
:
this
.
leftSearch
,
dept
Id
:
this
.
departmentLeft
,
dept
Code
:
this
.
departmentLeft
,
siteId
:
this
.
siteId
,
siteId
:
this
.
siteId
,
}
);
}
);
if
(
res
.
data
.
code
===
1
)
{
if
(
res
.
data
.
code
===
1
)
{
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/sheet/web/SheetMatterController.java
View file @
77c2ba28
package
com.mortals.xhx.module.sheet.web
;
package
com.mortals.xhx.module.sheet.web
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.pdu.site.SitePdu
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -37,6 +42,8 @@ public class SheetMatterController extends BaseCRUDJsonBodyMappingController<She
...
@@ -37,6 +42,8 @@ public class SheetMatterController extends BaseCRUDJsonBodyMappingController<She
@Autowired
@Autowired
private
ParamService
paramService
;
private
ParamService
paramService
;
@Autowired
private
ISiteFeign
siteFeign
;
public
SheetMatterController
(){
public
SheetMatterController
(){
super
.
setModuleDesc
(
"基础事项"
);
super
.
setModuleDesc
(
"基础事项"
);
...
@@ -85,6 +92,11 @@ public class SheetMatterController extends BaseCRUDJsonBodyMappingController<She
...
@@ -85,6 +92,11 @@ public class SheetMatterController extends BaseCRUDJsonBodyMappingController<She
if
(!
ObjectUtils
.
isEmpty
(
query
.
getMatterName
())){
if
(!
ObjectUtils
.
isEmpty
(
query
.
getMatterName
())){
query
.
setMatterName
(
"%"
+
query
.
getMatterName
()+
"%"
);
query
.
setMatterName
(
"%"
+
query
.
getMatterName
()+
"%"
);
}
}
Rest
<
SitePdu
>
rest
=
siteFeign
.
info
(
query
.
getSiteId
());
if
(
rest
.
getCode
()==
YesNoEnum
.
YES
.
getValue
()){
query
.
setSiteId
(
null
);
query
.
setAreaCode
(
rest
.
getData
().
getAreaCode
());
}
super
.
doListBefore
(
query
,
model
,
context
);
super
.
doListBefore
(
query
,
model
,
context
);
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment