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
d65c0115
Commit
d65c0115
authored
Nov 04, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患台账修改
parent
378de7cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
316 additions
and
25 deletions
+316
-25
TStaningBookController.java
...g/web/controller/hiddenDanger/TStaningBookController.java
+14
-3
TStaningBook.java
.../src/main/java/com/zehong/system/domain/TStaningBook.java
+13
-0
SysDeptMapper.java
...src/main/java/com/zehong/system/mapper/SysDeptMapper.java
+3
-0
ITStaningBookService.java
.../java/com/zehong/system/service/ITStaningBookService.java
+1
-1
TStaningBookServiceImpl.java
...m/zehong/system/service/impl/TStaningBookServiceImpl.java
+15
-11
SysDeptMapper.xml
...system/src/main/resources/mapper/system/SysDeptMapper.xml
+6
-0
TStaningBookMapper.xml
...m/src/main/resources/mapper/system/TStaningBookMapper.xml
+4
-0
index.vue
danger-manage-web/src/views/system/book/index.vue
+260
-10
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/hiddenDanger/TStaningBookController.java
View file @
d65c0115
package
com
.
zehong
.
web
.
controller
.
hiddenDanger
;
package
com
.
zehong
.
web
.
controller
.
hiddenDanger
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.core.domain.model.LoginUser
;
import
com.zehong.common.utils.ServletUtils
;
import
com.zehong.framework.web.service.TokenService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -32,7 +37,8 @@ public class TStaningBookController extends BaseController
...
@@ -32,7 +37,8 @@ public class TStaningBookController extends BaseController
{
{
@Autowired
@Autowired
private
ITStaningBookService
tStaningBookService
;
private
ITStaningBookService
tStaningBookService
;
@Autowired
private
TokenService
tokenService
;
/**
/**
* 查询隐患台账列表
* 查询隐患台账列表
*/
*/
...
@@ -40,8 +46,10 @@ public class TStaningBookController extends BaseController
...
@@ -40,8 +46,10 @@ public class TStaningBookController extends BaseController
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TStaningBook
tStaningBook
)
public
TableDataInfo
list
(
TStaningBook
tStaningBook
)
{
{
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
startPage
();
startPage
();
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
);
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
,
user
.
getDeptId
()
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -53,7 +61,10 @@ public class TStaningBookController extends BaseController
...
@@ -53,7 +61,10 @@ public class TStaningBookController extends BaseController
@GetMapping
(
"/export"
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TStaningBook
tStaningBook
)
public
AjaxResult
export
(
TStaningBook
tStaningBook
)
{
{
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
);
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
startPage
();
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
,
user
.
getDeptId
());
ExcelUtil
<
TStaningBook
>
util
=
new
ExcelUtil
<
TStaningBook
>(
TStaningBook
.
class
);
ExcelUtil
<
TStaningBook
>
util
=
new
ExcelUtil
<
TStaningBook
>(
TStaningBook
.
class
);
return
util
.
exportExcel
(
list
,
"隐患台账数据"
);
return
util
.
exportExcel
(
list
,
"隐患台账数据"
);
}
}
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/TStaningBook.java
View file @
d65c0115
package
com
.
zehong
.
system
.
domain
;
package
com
.
zehong
.
system
.
domain
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
@@ -140,6 +142,17 @@ public class TStaningBook extends BaseEntity
...
@@ -140,6 +142,17 @@ public class TStaningBook extends BaseEntity
/** 删除 0否 1是 */
/** 删除 0否 1是 */
private
Integer
isDel
;
private
Integer
isDel
;
private
List
<
Long
>
deptList
;
public
List
<
Long
>
getDeptList
()
{
return
deptList
;
}
public
void
setDeptList
(
List
<
Long
>
deptList
)
{
this
.
deptList
=
deptList
;
}
public
String
getEscalationName
()
{
public
String
getEscalationName
()
{
return
escalationName
;
return
escalationName
;
}
}
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/SysDeptMapper.java
View file @
d65c0115
...
@@ -134,4 +134,7 @@ public interface SysDeptMapper
...
@@ -134,4 +134,7 @@ public interface SysDeptMapper
public
List
<
Map
<
String
,
Object
>>
classification
(
Long
deptId
);
public
List
<
Map
<
String
,
Object
>>
classification
(
Long
deptId
);
public
List
<
Map
<
String
,
Object
>>
classificationByList
(
@Param
(
"list"
)
List
<
Map
<
String
,
Object
>>
list
);
public
List
<
Map
<
String
,
Object
>>
classificationByList
(
@Param
(
"list"
)
List
<
Map
<
String
,
Object
>>
list
);
public
List
<
Long
>
selectDeptByParentId
(
@Param
(
"deptList"
)
List
<
Long
>
deptList
);
}
}
danger-manage-system/src/main/java/com/zehong/system/service/ITStaningBookService.java
View file @
d65c0115
...
@@ -27,7 +27,7 @@ public interface ITStaningBookService
...
@@ -27,7 +27,7 @@ public interface ITStaningBookService
* @param tStaningBook 隐患台账
* @param tStaningBook 隐患台账
* @return 隐患台账集合
* @return 隐患台账集合
*/
*/
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
);
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
,
Long
deptId
);
/**
/**
* 新增隐患台账
* 新增隐患台账
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TStaningBookServiceImpl.java
View file @
d65c0115
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -49,20 +50,23 @@ public class TStaningBookServiceImpl implements ITStaningBookService
...
@@ -49,20 +50,23 @@ public class TStaningBookServiceImpl implements ITStaningBookService
* @return 隐患台账
* @return 隐患台账
*/
*/
@Override
@Override
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
)
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
,
Long
deptId
)
{
{
List
<
Long
>
oneList
=
new
ArrayList
<>();
oneList
.
add
(
deptId
);
List
<
Long
>
deptIds
=
selectDeptIds
(
new
ArrayList
<>(),
oneList
);
tStaningBook
.
setDeptList
(
deptIds
);
List
<
TStaningBook
>
list
=
tStaningBookMapper
.
selectTStaningBookList
(
tStaningBook
);
List
<
TStaningBook
>
list
=
tStaningBookMapper
.
selectTStaningBookList
(
tStaningBook
);
// for(TStaningBook book: list){
return
list
;
// if(book.getDeptId()!=null){
}
// SysDept dept = deptMapper.selectDeptById(book.getDeptId());
public
List
<
Long
>
selectDeptIds
(
List
<
Long
>
list
,
List
<
Long
>
deptIds
){
// if(dept!=null){
List
<
Long
>
resultlist
=
deptMapper
.
selectDeptByParentId
(
deptIds
);
// book.setDeptName(dept.getDeptName());
if
(
resultlist
.
size
()==
0
){
// }
return
list
;
//
}
}
// }
list
.
addAll
(
resultlist
);
return
list
;
return
selectDeptIds
(
list
,
resultlist
)
;
}
}
/**
/**
* 新增隐患台账
* 新增隐患台账
*
*
...
...
danger-manage-system/src/main/resources/mapper/system/SysDeptMapper.xml
View file @
d65c0115
...
@@ -193,4 +193,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -193,4 +193,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</foreach>
GROUP BY d.`dept_id`
GROUP BY d.`dept_id`
</select>
</select>
<select
id=
"selectDeptByParentId"
resultType=
"java.lang.Long"
>
SELECT dept_id FROM sys_dept WHERE parent_id IN
<foreach
collection=
"deptList"
item=
"deptId"
open=
"("
separator=
","
close=
")"
>
#{deptId}
</foreach>
</select>
</mapper>
</mapper>
\ No newline at end of file
danger-manage-system/src/main/resources/mapper/system/TStaningBookMapper.xml
View file @
d65c0115
...
@@ -56,6 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -56,6 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN t_staff s3 ON b.`person_liable` = s3.`staff_id`
LEFT JOIN t_staff s3 ON b.`person_liable` = s3.`staff_id`
LEFT JOIN sys_dept d ON d.`dept_id` = b.`dept_id`
LEFT JOIN sys_dept d ON d.`dept_id` = b.`dept_id`
<where>
<where>
AND s1.dept_id in
<foreach
collection=
"deptList"
item=
"deptId"
open=
"("
separator=
","
close=
")"
>
#{deptId}
</foreach>
<if
test=
"troubleName != null and troubleName != ''"
>
and b.trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"troubleName != null and troubleName != ''"
>
and b.trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"findTime != null "
>
and b.find_time
>
#{findTime}
</if>
<if
test=
"findTime != null "
>
and b.find_time
>
#{findTime}
</if>
<if
test=
"rectificationTime != null "
>
and b.find_time
<
#{rectificationTime}
</if>
<if
test=
"rectificationTime != null "
>
and b.find_time
<
#{rectificationTime}
</if>
...
...
danger-manage-web/src/views/system/book/index.vue
View file @
d65c0115
This diff is collapsed.
Click to expand it.
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