Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
e8d2f6f9
Commit
e8d2f6f9
authored
Oct 24, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
作业票app所用接口
parent
7d06e16f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
65 additions
and
1 deletion
+65
-1
SysDeptController.java
...a/com/zehong/web/controller/system/SysDeptController.java
+7
-0
TWorkPermitController.java
...hong/web/controller/workPermit/TWorkPermitController.java
+10
-0
SysDeptMapper.java
...src/main/java/com/zehong/system/mapper/SysDeptMapper.java
+2
-0
TWorkPermitMapper.java
...main/java/com/zehong/system/mapper/TWorkPermitMapper.java
+2
-0
ISysDeptService.java
.../main/java/com/zehong/system/service/ISysDeptService.java
+2
-0
ITWorkPermitService.java
...n/java/com/zehong/system/service/ITWorkPermitService.java
+7
-0
SysDeptServiceImpl.java
...va/com/zehong/system/service/impl/SysDeptServiceImpl.java
+5
-0
TWorkPermitServiceImpl.java
...om/zehong/system/service/impl/TWorkPermitServiceImpl.java
+13
-0
SysDeptMapper.xml
...system/src/main/resources/mapper/system/SysDeptMapper.xml
+12
-1
TWorkPermitMapper.xml
...em/src/main/resources/mapper/system/TWorkPermitMapper.xml
+5
-0
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/system/SysDeptController.java
View file @
e8d2f6f9
...
...
@@ -2,6 +2,7 @@ package com.zehong.web.controller.system;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -50,6 +51,12 @@ public class SysDeptController extends BaseController
List
<
SysDept
>
depts
=
deptService
.
selectDeptList
(
dept
);
return
AjaxResult
.
success
(
depts
);
}
@GetMapping
(
"/applist"
)
public
AjaxResult
applist
(
SysDept
dept
)
{
List
<
Map
<
String
,
Object
>>
depts
=
deptService
.
selectDeptAppList
(
dept
);
return
AjaxResult
.
success
(
depts
);
}
/**
* 查询部门列表(排除节点)
...
...
danger-manage-admin/src/main/java/com/zehong/web/controller/workPermit/TWorkPermitController.java
View file @
e8d2f6f9
...
...
@@ -195,6 +195,16 @@ public class TWorkPermitController extends BaseController
return
AjaxResult
.
success
(
workPermit
);
}
/**
* app判断修改
* @param workPermitId
* @return
*/
@GetMapping
(
value
=
"/selectUpdate"
)
public
AjaxResult
selectUpdate
(
Long
workPermitId
)
{
return
toAjax
(
tWorkPermitService
.
selectUpdate
(
workPermitId
));
}
/**
* 新增作业许可证
*/
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/SysDeptMapper.java
View file @
e8d2f6f9
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.system.domain.SysUserPost
;
import
org.apache.ibatis.annotations.Param
;
import
com.zehong.common.core.domain.entity.SysDept
;
...
...
@@ -20,6 +21,7 @@ public interface SysDeptMapper
* @return 部门信息集合
*/
public
List
<
SysDept
>
selectDeptList
(
SysDept
dept
);
public
List
<
Map
<
String
,
Object
>>
selectDeptAppList
(
SysDept
dept
);
/**
* 根据角色ID查询部门树信息
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/TWorkPermitMapper.java
View file @
e8d2f6f9
...
...
@@ -65,4 +65,6 @@ public interface TWorkPermitMapper
* @return
*/
List
<
TWorkPermit
>
selectTWorkPermitListByLoginUser
(
TWorkPermit
tWorkPermit
);
Integer
selectSign
(
Long
workPermitId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/ISysDeptService.java
View file @
e8d2f6f9
...
...
@@ -5,6 +5,7 @@ import java.util.Map;
import
com.zehong.common.core.domain.TreeSelect
;
import
com.zehong.common.core.domain.entity.SysDept
;
import
com.zehong.system.domain.SysUserPost
;
/**
* 部门管理 服务层
...
...
@@ -20,6 +21,7 @@ public interface ISysDeptService
* @return 部门信息集合
*/
public
List
<
SysDept
>
selectDeptList
(
SysDept
dept
);
public
List
<
Map
<
String
,
Object
>>
selectDeptAppList
(
SysDept
dept
);
/**
* 构建前端所需要树结构
...
...
danger-manage-system/src/main/java/com/zehong/system/service/ITWorkPermitService.java
View file @
e8d2f6f9
...
...
@@ -67,4 +67,11 @@ public interface ITWorkPermitService
* @return
*/
List
<
TWorkPermit
>
selectTWorkPermitListByLoginUser
(
TWorkPermit
tWorkPermit
);
/**
*
* @param workPermitId
* @return
*/
int
selectUpdate
(
Long
workPermitId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/SysDeptServiceImpl.java
View file @
e8d2f6f9
...
...
@@ -44,6 +44,11 @@ public class SysDeptServiceImpl implements ISysDeptService
{
return
deptMapper
.
selectDeptList
(
dept
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
selectDeptAppList
(
SysDept
dept
)
{
return
deptMapper
.
selectDeptAppList
(
dept
);
}
/**
* 构建前端所需要树结构
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TWorkPermitServiceImpl.java
View file @
e8d2f6f9
...
...
@@ -172,4 +172,17 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService
public
List
<
TWorkPermit
>
selectTWorkPermitListByLoginUser
(
TWorkPermit
tWorkPermit
){
return
tWorkPermitMapper
.
selectTWorkPermitListByLoginUser
(
tWorkPermit
);
}
@Override
public
int
selectUpdate
(
Long
workPermitId
){
Integer
a
=
tWorkPermitMapper
.
selectSign
(
workPermitId
);
if
(
a
==
0
){
TWorkPermit
t
=
tWorkPermitMapper
.
selectTWorkPermitById
(
workPermitId
);
t
.
setApplyStatus
(
"2"
);
return
tWorkPermitMapper
.
updateTWorkPermit
(
t
);
}
else
{
return
1
;
}
}
}
danger-manage-system/src/main/resources/mapper/system/SysDeptMapper.xml
View file @
e8d2f6f9
...
...
@@ -43,7 +43,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope}
order by d.parent_id, d.order_num
</select>
<select
id=
"selectDeptAppList"
parameterType=
"SysDept"
resultType=
"java.util.HashMap"
>
SELECT dept_id as `value`,dept_name as text from sys_dept d
where d.del_flag = '0'
<if
test=
"deptName != null and deptName != ''"
>
AND dept_name like concat('%', #{deptName}, '%')
</if>
<if
test=
"status != null and status != ''"
>
AND status = #{status}
</if>
order by d.parent_id, d.order_num
</select>
<select
id=
"selectDeptListByRoleId"
resultType=
"Integer"
>
select d.dept_id
from sys_dept d
...
...
danger-manage-system/src/main/resources/mapper/system/TWorkPermitMapper.xml
View file @
e8d2f6f9
...
...
@@ -209,4 +209,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY permit.work_permit_id
ORDER BY create_time DESC
</select>
<select
id=
"selectSign"
resultType=
"java.lang.Integer"
parameterType=
"java.lang.Long"
>
SELECT COUNT(sign_id) FROM t_special_work_permit_sign WHERE
permit_id IN (SELECT special_work_permit_id FROM t_special_work_permit WHERE work_permit_id = #{workPermitId} )
AND sign_name IS NULL
</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