Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_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
赵啸非
smart_gov_platform
Commits
f1a2155d
Commit
f1a2155d
authored
Feb 14, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改根据业务查询部门逻辑
parent
14ebe5cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
10 deletions
+95
-10
base-manager/doc/api.md
base-manager/doc/api.md
+62
-0
base-manager/src/main/java/com/mortals/xhx/module/dept/service/DeptService.java
...java/com/mortals/xhx/module/dept/service/DeptService.java
+2
-2
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
...mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
+2
-2
base-manager/src/main/java/com/mortals/xhx/module/dept/web/DeptController.java
.../java/com/mortals/xhx/module/dept/web/DeptController.java
+2
-2
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowMatterServiceImpl.java
...x/module/window/service/impl/WindowMatterServiceImpl.java
+27
-4
No files found.
base-manager/doc/api.md
View file @
f1a2155d
...
...
@@ -7226,6 +7226,68 @@ data|object|数据对象|-
```
### 批量保存更新窗口事项
**请求URL:**
window/matter/batchSave
**请求方式:**
POST
**内容类型:**
application/json;charset=utf-8
**简要描述:**
保存或更新窗口事项:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
windowId|Long|窗口ID|是|-
windowName|String|窗口名称|是|-
siteMatterId|Long|站点事项ID|是|-
matterName|String|事项名称|是|-
deptId|Long|部门ID|是|-
deptName|String|部门名称|是|-
isShow|Integer|是否显示 (1.是,0.否)|是|-
sort|Integer|排序|是|-
**请求样例:**
```
[
{
"windowId":1,
"windowName":"mtv5rh",
"siteMatterId":6893,
"matterName":"epawga",
"deptId":5288,
"deptName":"ivpfm8",
"isShow":1,
"sort":1,
}]
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|object|数据对象|-
**响应消息样例:**
```
{
"msg":"批量新增成功",
"code":1,
"data":{}
}
}
```
### 删除窗口事项
**请求URL:**
window/matter/delete
...
...
base-manager/src/main/java/com/mortals/xhx/module/dept/service/DeptService.java
View file @
f1a2155d
...
...
@@ -39,13 +39,13 @@ public interface DeptService extends ICRUDCacheService<DeptEntity, Long> {
Rest
<
String
>
syncDeptBySiteId
(
SiteEntity
siteEntity
,
Context
context
);
Rest
<
Map
<
Lo
ng
,
List
<
DeptVo
>>>
getBusinessByDept
(
DeptQuery
deptQuery
,
Context
context
);
Rest
<
Map
<
Stri
ng
,
List
<
DeptVo
>>>
getBusinessByDept
(
DeptQuery
deptQuery
,
Context
context
);
void
deleteGovBySiteId
(
Long
siteId
,
Context
context
);
Rest
<
Map
<
Lo
ng
,
List
<
DeptVo
>>>
getDeptListByBusiness
(
DeptQuery
deptQuery
,
Context
context
);
Rest
<
Map
<
Stri
ng
,
List
<
DeptVo
>>>
getDeptListByBusiness
(
DeptQuery
deptQuery
,
Context
context
);
...
...
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
f1a2155d
...
...
@@ -131,10 +131,10 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
}
@Override
public
Rest
<
Map
<
Lo
ng
,
List
<
DeptVo
>>>
getBusinessByDept
(
DeptQuery
deptQuery
,
Context
context
)
{
public
Rest
<
Map
<
Stri
ng
,
List
<
DeptVo
>>>
getBusinessByDept
(
DeptQuery
deptQuery
,
Context
context
)
{
List
<
DeptVo
>
businessDeptList
=
this
.
dao
.
getBusinessByDept
(
deptQuery
);
Map
<
Long
,
List
<
DeptVo
>>
collect
=
businessDeptList
.
parallelStream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getId
()));
Map
<
String
,
List
<
DeptVo
>>
collect
=
businessDeptList
.
parallelStream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getId
().
toString
()));
return
Rest
.
ok
(
collect
);
...
...
base-manager/src/main/java/com/mortals/xhx/module/dept/web/DeptController.java
View file @
f1a2155d
...
...
@@ -110,7 +110,7 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
if
(
ObjectUtils
.
isEmpty
(
deptQuery
.
getIdList
()))
{
throw
new
AppException
(
"参数部门ids不能为空!"
);
}
Rest
<
Map
<
Lo
ng
,
List
<
DeptVo
>>>
rest
=
this
.
service
.
getBusinessByDept
(
deptQuery
,
getContext
());
Rest
<
Map
<
Stri
ng
,
List
<
DeptVo
>>>
rest
=
this
.
service
.
getBusinessByDept
(
deptQuery
,
getContext
());
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
jsonObject
.
put
(
KEY_RESULT_DATA
,
rest
.
getData
());
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
...
...
@@ -136,7 +136,7 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
if
(
ObjectUtils
.
isEmpty
(
deptQuery
.
getSiteBusinessIdList
()))
{
throw
new
AppException
(
"业务id不能为空!"
);
}
Rest
<
Map
<
Lo
ng
,
List
<
DeptVo
>>>
rest
=
this
.
service
.
getDeptListByBusiness
(
deptQuery
,
getContext
());
Rest
<
Map
<
Stri
ng
,
List
<
DeptVo
>>>
rest
=
this
.
service
.
getDeptListByBusiness
(
deptQuery
,
getContext
());
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
jsonObject
.
put
(
KEY_RESULT_DATA
,
rest
.
getData
());
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
...
...
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowMatterServiceImpl.java
View file @
f1a2155d
...
...
@@ -6,6 +6,7 @@ import com.mortals.framework.ap.GlobalSysInfo;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.util.HttpUtil
;
import
com.mortals.xhx.module.window.model.WindowMatterQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
...
...
@@ -60,13 +61,35 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte
*/
@Override
protected
void
removeBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
Arrays
.
asList
(
ids
).
forEach
(
id
->
{
Arrays
.
asList
(
ids
).
forEach
(
id
->
{
WindowMatterEntity
windowMatterEntity
=
this
.
get
(
id
,
context
);
pushChangeMsg
(
windowMatterEntity
);
});
super
.
removeBefore
(
ids
,
context
);
}
/**
* @param entity
* @param context
* @return
* @throws AppException
*/
@Override
public
WindowMatterEntity
save
(
WindowMatterEntity
entity
,
Context
context
)
throws
AppException
{
this
.
saveBefore
(
entity
,
context
);
//校验是否存在
WindowMatterQuery
windowMatterQuery
=
new
WindowMatterQuery
();
windowMatterQuery
.
setWindowId
(
entity
.
getWindowId
());
windowMatterQuery
.
setSiteMatterId
(
entity
.
getSiteMatterId
());
int
count
=
this
.
count
(
windowMatterQuery
,
context
);
if
(
count
==
0
)
{
this
.
dao
.
insert
(
entity
);
this
.
saveAfter
(
entity
,
context
);
}
return
entity
;
}
/**
* @param entity
* @param context
...
...
@@ -78,12 +101,12 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte
super
.
updateAfter
(
entity
,
context
);
}
private
void
pushChangeMsg
(
WindowMatterEntity
entity
)
{
private
void
pushChangeMsg
(
WindowMatterEntity
entity
)
{
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://172.15.28.116:8090"
);
phpUrl
+=
"/api/window/winNameChange"
;
phpUrl
+=
"/api/window/winNameChange"
;
HashMap
<
String
,
Object
>
paramsMap
=
new
HashMap
<>();
paramsMap
.
put
(
"windowid"
,
entity
.
getWindowId
());
paramsMap
.
put
(
"typeinfo"
,
0
);
paramsMap
.
put
(
"typeinfo"
,
0
);
String
resp
=
null
;
try
{
Map
<
String
,
String
>
header
=
new
HashMap
<>();
...
...
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