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
e0491256
Commit
e0491256
authored
May 22, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加查询存在业务的部门
parent
0c8426df
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
12 deletions
+24
-12
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
...rc/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
+2
-1
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
...a/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
+4
-2
base-manager/src/main/java/com/mortals/xhx/module/dept/service/DeptService.java
...java/com/mortals/xhx/module/dept/service/DeptService.java
+1
-1
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
+8
-4
base-manager/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
...r/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
+7
-2
No files found.
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
View file @
e0491256
package
com.mortals.xhx.module.dept.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
...
...
@@ -26,6 +27,6 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{
List
<
DeptVo
>
getBusinessByDept
(
DeptQuery
deptQuery
);
List
<
DeptEntity
>
getDeptListByExistBusiness
();
List
<
DeptEntity
>
getDeptListByExistBusiness
(
DeptQuery
deptQuery
);
}
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
View file @
e0491256
package
com.mortals.xhx.module.dept.dao.ibatis
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.ParamDto
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
...
...
@@ -50,7 +51,8 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity, Long> implements
* @return
*/
@Override
public
List
<
DeptEntity
>
getDeptListByExistBusiness
()
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
GET_DEPTLIST_BY_EXISTBUSINESS
));
public
List
<
DeptEntity
>
getDeptListByExistBusiness
(
DeptQuery
deptQuery
)
{
ParamDto
paramDto
=
this
.
getQueryParam
(
deptQuery
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
GET_DEPTLIST_BY_EXISTBUSINESS
),
paramDto
);
}
}
base-manager/src/main/java/com/mortals/xhx/module/dept/service/DeptService.java
View file @
e0491256
...
...
@@ -49,6 +49,6 @@ public interface DeptService extends ICRUDCacheService<DeptEntity, Long> {
Rest
<
Map
<
String
,
List
<
DeptVo
>>>
getDeptListByBusiness
(
DeptQuery
deptQuery
,
Context
context
);
List
<
DeptEntity
>
getDeptListByExistBusiness
();
List
<
DeptEntity
>
getDeptListByExistBusiness
(
DeptQuery
deptQuery
,
Context
context
);
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
e0491256
...
...
@@ -217,8 +217,8 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
* @return
*/
@Override
public
List
<
DeptEntity
>
getDeptListByExistBusiness
()
{
return
this
.
dao
.
getDeptListByExistBusiness
();
public
List
<
DeptEntity
>
getDeptListByExistBusiness
(
DeptQuery
deptQuery
,
Context
context
)
{
return
this
.
dao
.
getDeptListByExistBusiness
(
deptQuery
);
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/dept/web/DeptController.java
View file @
e0491256
...
...
@@ -147,16 +147,20 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
*/
@GetMapping
(
value
=
"getDeptListByExistBusiness"
)
@UnAuth
public
String
getDeptListByExistBusiness
()
{
public
String
getDeptListByExistBusiness
(
@PathVariable
(
"siteId"
)
Long
siteId
)
{
JSONObject
jsonObject
=
new
JSONObject
();
String
busiDesc
=
"根据业务查询存在的部门列表"
+
this
.
getModuleDesc
();
try
{
List
<
DeptEntity
>
deptList
=
this
.
service
.
getDeptListByExistBusiness
();
if
(
ObjectUtils
.
isEmpty
(
siteId
))
{
throw
new
AppException
(
"站点id不能为空!"
);
}
DeptQuery
query
=
new
DeptQuery
();
query
.
setSiteId
(
siteId
);
List
<
DeptEntity
>
deptList
=
this
.
service
.
getDeptListByExistBusiness
(
query
,
getContext
());
if
(!
ObjectUtils
.
isEmpty
(
getContext
())
&&
!
ObjectUtils
.
isEmpty
(
getContext
().
getUser
()))
{
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
jsonObject
.
put
(
KEY_RESULT_DATA
,
deptList
);
jsonObject
.
put
(
KEY_RESULT_DATA
,
deptList
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
busiDesc
+
"成功!"
);
}
catch
(
Exception
e
)
{
...
...
base-manager/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
View file @
e0491256
...
...
@@ -61,7 +61,7 @@
<!-- 获取所有存在业务的部门列表 -->
<select
id=
"getDeptListByExistBusiness"
resultMap=
"DeptEntity-Map"
>
<select
id=
"getDeptListByExistBusiness"
parameterType=
"paramDto"
resultMap=
"DeptEntity-Map"
>
SELECT DISTINCT
<include
refid=
"_columns"
/>
FROM
...
...
@@ -70,7 +70,12 @@
mortals_sys_window_business t2
WHERE
a.id = t1.deptId
AND t1.id = t2.windowId;
AND t1.id = t2.windowId and
<trim
prefixOverrides=
"and"
prefix=
""
>
<if
test=
"condition.siteId!=null"
>
a.siteId = #{condition.siteId}
</if>
</trim>
</select>
...
...
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