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
0c8426df
Commit
0c8426df
authored
May 22, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加查询存在业务的部门
parent
da359a72
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
11 deletions
+71
-11
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
...rc/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
+3
-0
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
...a/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
+18
-6
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
+8
-0
base-manager/src/main/java/com/mortals/xhx/module/dept/web/DeptController.java
.../java/com/mortals/xhx/module/dept/web/DeptController.java
+27
-4
base-manager/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
...r/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
+14
-0
No files found.
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
View file @
0c8426df
...
...
@@ -20,9 +20,12 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{
String
GET_DEPT_LIST_BY_BUSINESS
=
"getDeptListByBusiness"
;
String
GET_BUSINESS_BY_DEPT
=
"getBusinessByDept"
;
String
GET_DEPTLIST_BY_EXISTBUSINESS
=
"getDeptListByExistBusiness"
;
List
<
DeptVo
>
getDeptListByBusiness
(
DeptQuery
deptQuery
);
List
<
DeptVo
>
getBusinessByDept
(
DeptQuery
deptQuery
);
List
<
DeptEntity
>
getDeptListByExistBusiness
();
}
base-manager/src/main/java/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
View file @
0c8426df
...
...
@@ -9,17 +9,21 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.dept.dao.DeptDao
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.List
;
/**
* 部门DaoImpl DAO接口
*
* @author zxfei
* @date 2022-01-12
*/
* 部门DaoImpl DAO接口
*
* @author zxfei
* @date 2022-01-12
*/
@Repository
(
"deptDao"
)
public
class
DeptDaoImpl
extends
BaseCRUDDaoMybatis
<
DeptEntity
,
Long
>
implements
DeptDao
{
public
class
DeptDaoImpl
extends
BaseCRUDDaoMybatis
<
DeptEntity
,
Long
>
implements
DeptDao
{
/**
* @param deptQuery
* @return
...
...
@@ -41,4 +45,12 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
List
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
GET_BUSINESS_BY_DEPT
),
paramDto
);
return
list
;
}
/**
* @return
*/
@Override
public
List
<
DeptEntity
>
getDeptListByExistBusiness
()
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
GET_DEPTLIST_BY_EXISTBUSINESS
));
}
}
base-manager/src/main/java/com/mortals/xhx/module/dept/service/DeptService.java
View file @
0c8426df
...
...
@@ -49,6 +49,6 @@ public interface DeptService extends ICRUDCacheService<DeptEntity, Long> {
Rest
<
Map
<
String
,
List
<
DeptVo
>>>
getDeptListByBusiness
(
DeptQuery
deptQuery
,
Context
context
);
List
<
DeptEntity
>
getDeptListByExistBusiness
();
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
0c8426df
...
...
@@ -213,6 +213,14 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return
Rest
.
ok
(
collect
);
}
/**
* @return
*/
@Override
public
List
<
DeptEntity
>
getDeptListByExistBusiness
()
{
return
this
.
dao
.
getDeptListByExistBusiness
();
}
/**
* @param entity
...
...
base-manager/src/main/java/com/mortals/xhx/module/dept/web/DeptController.java
View file @
0c8426df
...
...
@@ -23,10 +23,7 @@ import com.mortals.xhx.module.site.service.SiteService;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
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.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -145,6 +142,32 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
}
/**
* 根据部门查询业务
*/
@GetMapping
(
value
=
"getDeptListByExistBusiness"
)
@UnAuth
public
String
getDeptListByExistBusiness
()
{
JSONObject
jsonObject
=
new
JSONObject
();
String
busiDesc
=
"根据业务查询存在的部门列表"
+
this
.
getModuleDesc
();
try
{
List
<
DeptEntity
>
deptList
=
this
.
service
.
getDeptListByExistBusiness
();
if
(!
ObjectUtils
.
isEmpty
(
getContext
())
&&
!
ObjectUtils
.
isEmpty
(
getContext
().
getUser
()))
{
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
jsonObject
.
put
(
KEY_RESULT_DATA
,
deptList
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
busiDesc
+
"成功!"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"获取异常"
,
e
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
}
return
jsonObject
.
toJSONString
();
}
/**
* 根据部门查询业务
*/
...
...
base-manager/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
View file @
0c8426df
...
...
@@ -60,4 +60,18 @@
</select>
<!-- 获取所有存在业务的部门列表 -->
<select
id=
"getDeptListByExistBusiness"
resultMap=
"DeptEntity-Map"
>
SELECT DISTINCT
<include
refid=
"_columns"
/>
FROM
mortals_sys_dept a,
mortals_sys_window t1,
mortals_sys_window_business t2
WHERE
a.id = t1.deptId
AND t1.id = t2.windowId;
</select>
</mapper>
\ 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