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
0c4f2337
Commit
0c4f2337
authored
Dec 27, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序隐患排查任务
parent
fc2b1ce8
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
81 additions
and
21 deletions
+81
-21
THiddenTroubleWorkController.java
...controller/hiddenDanger/THiddenTroubleWorkController.java
+18
-1
UserCourseVo.java
...c/main/java/com/zehong/system/domain/vo/UserCourseVo.java
+2
-0
THiddenTroubleWorkMapper.java
...va/com/zehong/system/mapper/THiddenTroubleWorkMapper.java
+1
-0
TTrainCourseMapper.java
...ain/java/com/zehong/system/mapper/TTrainCourseMapper.java
+1
-1
ITHiddenTroubleWorkService.java
...com/zehong/system/service/ITHiddenTroubleWorkService.java
+2
-0
ITTrainCourseService.java
.../java/com/zehong/system/service/ITTrainCourseService.java
+1
-0
THiddenTroubleAssessmentServiceImpl.java
...tem/service/impl/THiddenTroubleAssessmentServiceImpl.java
+14
-13
THiddenTroubleWorkServiceImpl.java
...ng/system/service/impl/THiddenTroubleWorkServiceImpl.java
+11
-0
TTrainCourseServiceImpl.java
...m/zehong/system/service/impl/TTrainCourseServiceImpl.java
+10
-1
THiddenTroubleAssessmentMapper.xml
...esources/mapper/system/THiddenTroubleAssessmentMapper.xml
+4
-2
THiddenTroubleWorkMapper.xml
...main/resources/mapper/system/THiddenTroubleWorkMapper.xml
+15
-1
TTrainCourseMapper.xml
...m/src/main/resources/mapper/system/TTrainCourseMapper.xml
+2
-2
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/hiddenDanger/THiddenTroubleWorkController.java
View file @
0c4f2337
package
com
.
zehong
.
web
.
controller
.
hiddenDanger
;
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.SysLoginService
;
import
com.zehong.framework.web.service.TokenService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -32,6 +38,8 @@ public class THiddenTroubleWorkController extends BaseController
{
@Autowired
private
ITHiddenTroubleWorkService
tHiddenTroubleWorkService
;
@Autowired
private
TokenService
tokenService
;
/**
* 查询隐患排查任务列表
...
...
@@ -44,7 +52,16 @@ public class THiddenTroubleWorkController extends BaseController
List
<
THiddenTroubleWork
>
list
=
tHiddenTroubleWorkService
.
selectTHiddenTroubleWorkList
(
tHiddenTroubleWork
);
return
getDataTable
(
list
);
}
@GetMapping
(
"/listApp"
)
public
TableDataInfo
listApp
(
THiddenTroubleWork
tHiddenTroubleWork
)
{
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
tHiddenTroubleWork
.
setStaffId
(
user
.
getUserId
());
startPage
();
List
<
THiddenTroubleWork
>
list
=
tHiddenTroubleWorkService
.
selectTHiddenTroubleWorkListApp
(
tHiddenTroubleWork
);
return
getDataTable
(
list
);
}
/**
* 导出隐患排查任务列表
*/
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/vo/UserCourseVo.java
View file @
0c4f2337
...
...
@@ -33,4 +33,6 @@ public class UserCourseVo {
private
Date
createTime
;
private
String
dataKind
;
private
Integer
personnelType
;
}
danger-manage-system/src/main/java/com/zehong/system/mapper/THiddenTroubleWorkMapper.java
View file @
0c4f2337
...
...
@@ -27,6 +27,7 @@ public interface THiddenTroubleWorkMapper
* @return 隐患排查任务集合
*/
public
List
<
THiddenTroubleWork
>
selectTHiddenTroubleWorkList
(
THiddenTroubleWork
tHiddenTroubleWork
);
public
List
<
THiddenTroubleWork
>
selectTHiddenTroubleWorkListApp
(
THiddenTroubleWork
tHiddenTroubleWork
);
/**
* 新增隐患排查任务
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/TTrainCourseMapper.java
View file @
0c4f2337
...
...
@@ -76,7 +76,7 @@ public interface TTrainCourseMapper
* @param userId
* @return
*/
public
List
<
UserCourseVo
>
userCourseList
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"type"
)
Integer
type
);
public
List
<
UserCourseVo
>
userCourseList
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"personnelType"
)
Integer
personnelType
);
/**
* 考试统计接口
...
...
danger-manage-system/src/main/java/com/zehong/system/service/ITHiddenTroubleWorkService.java
View file @
0c4f2337
...
...
@@ -26,6 +26,8 @@ public interface ITHiddenTroubleWorkService
* @return 隐患排查任务集合
*/
public
List
<
THiddenTroubleWork
>
selectTHiddenTroubleWorkList
(
THiddenTroubleWork
tHiddenTroubleWork
);
public
List
<
THiddenTroubleWork
>
selectTHiddenTroubleWorkListApp
(
THiddenTroubleWork
tHiddenTroubleWork
);
/**
* 新增隐患排查任务
...
...
danger-manage-system/src/main/java/com/zehong/system/service/ITTrainCourseService.java
View file @
0c4f2337
...
...
@@ -77,6 +77,7 @@ public interface ITTrainCourseService
* @return
*/
public
List
<
UserCourseVo
>
userCourseList
(
Long
userId
,
Integer
type
);
public
List
<
UserCourseVo
>
youkeCourseList
(
Long
userId
,
Integer
type
);
/**
* 考试
*/
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/THiddenTroubleAssessmentServiceImpl.java
View file @
0c4f2337
...
...
@@ -77,19 +77,20 @@ public class THiddenTroubleAssessmentServiceImpl implements ITHiddenTroubleAsses
@Transactional
public
int
updateTHiddenTroubleAssessment
(
THiddenTroubleAssessment
tHiddenTroubleAssessment
)
{
if
(
tHiddenTroubleAssessment
.
getUpdateType
()==
2
){
tHiddenTroubleAssessment
.
setAssessmentTime
(
new
Date
());
THiddenTroubleWork
work
=
tHiddenTroubleWorkMapper
.
selectTHiddenTroubleWorkById
(
tHiddenTroubleAssessment
.
getWorkId
());
work
.
setWorkStep
(
2
);
tHiddenTroubleWorkMapper
.
updateTHiddenTroubleWork
(
work
);
if
(
work
.
getParentId
()!=
0L
){
THiddenTroubleWork
work1
=
new
THiddenTroubleWork
();
work1
.
setWorkId
(
work
.
getParentId
());
work1
.
setWorkStep
(
2
);
tHiddenTroubleWorkMapper
.
updateTHiddenTroubleWork
(
work1
);
}
}
// if(tHiddenTroubleAssessment.getUpdateType()==2){
// tHiddenTroubleAssessment.setAssessmentTime(new Date());
// THiddenTroubleWork work = tHiddenTroubleWorkMapper.selectTHiddenTroubleWorkById(tHiddenTroubleAssessment.getWorkId());
// work.setWorkStep(2);
// tHiddenTroubleWorkMapper.updateTHiddenTroubleWork(work);
// if(work.getParentId()!=0L){
// THiddenTroubleWork work1 = new THiddenTroubleWork();
// work1.setWorkId(work.getParentId());
// work1.setWorkStep(2);
// tHiddenTroubleWorkMapper.updateTHiddenTroubleWork(work1);
// }
//
// }
tHiddenTroubleAssessment
.
setCheckTime
(
new
Date
());
return
tHiddenTroubleAssessmentMapper
.
updateTHiddenTroubleAssessment
(
tHiddenTroubleAssessment
);
}
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/THiddenTroubleWorkServiceImpl.java
View file @
0c4f2337
...
...
@@ -73,6 +73,17 @@ public class THiddenTroubleWorkServiceImpl implements ITHiddenTroubleWorkService
return
list
;
}
/**
* app接口
* @param tHiddenTroubleWork
* @return
*/
@Override
public
List
<
THiddenTroubleWork
>
selectTHiddenTroubleWorkListApp
(
THiddenTroubleWork
tHiddenTroubleWork
)
{
List
<
THiddenTroubleWork
>
list
=
tHiddenTroubleWorkMapper
.
selectTHiddenTroubleWorkListApp
(
tHiddenTroubleWork
);
return
list
;
}
/**
* 新增隐患排查任务
*
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseServiceImpl.java
View file @
0c4f2337
...
...
@@ -142,10 +142,19 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
*/
@Override
public
List
<
UserCourseVo
>
userCourseList
(
Long
userId
,
Integer
type
){
List
<
UserCourseVo
>
list
=
tTrainCourseMapper
.
userCourseList
(
userId
,
type
);
List
<
UserCourseVo
>
list
=
tTrainCourseMapper
.
userCourseList
(
userId
,
type
,
1
);
return
list
;
}
/**
* 承包商课程表
* @return
*/
@Override
public
List
<
UserCourseVo
>
youkeCourseList
(
Long
userId
,
Integer
type
){
List
<
UserCourseVo
>
list
=
tTrainCourseMapper
.
userCourseList
(
userId
,
type
,
2
);
return
list
;
}
/**
* 考试判断
* @param userCourseId
...
...
danger-manage-system/src/main/resources/mapper/system/THiddenTroubleAssessmentMapper.xml
View file @
0c4f2337
...
...
@@ -36,9 +36,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select
id=
"selectTHiddenTroubleAssessmentList"
parameterType=
"THiddenTroubleAssessment"
resultMap=
"THiddenTroubleAssessmentResult"
>
SELECT a.`assessment_id`,a.library_id,a.is_xun,a.check_url,a.check_time,a.check_
user,a.check_
feedback,
l.risk_point,l.inspect_term,l.inspect_basis,l.library_content
SELECT a.`assessment_id`,a.library_id,a.is_xun,a.check_url,a.check_time,a.check_feedback,
l.risk_point,l.inspect_term,l.inspect_basis,l.library_content
,u.`staff_name` AS check_user
FROM t_hidden_trouble_assessment a LEFT JOIN t_hidden_library l ON l.`library_id` = a.library_id
LEFT JOIN sys_user u ON u.`user_id` = a.check_user
<where>
<if
test=
"assessmentLevel != null "
>
and assessment_level = #{assessmentLevel}
</if>
<if
test=
"workId != null "
>
and work_id = #{workId}
</if>
...
...
@@ -100,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_hidden_trouble_assessment
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"workId != null"
>
work_id = #{workId},
</if>
<if
test=
"isXun != null"
>
is_xun = #{isXun},
</if>
<if
test=
"checkFeedback != null"
>
check_feedback = #{checkFeedback},
</if>
<if
test=
"checkUrl != null"
>
check_url = #{checkUrl},
</if>
<if
test=
"checkTime != null"
>
check_time = #{checkTime},
</if>
...
...
danger-manage-system/src/main/resources/mapper/system/THiddenTroubleWorkMapper.xml
View file @
0c4f2337
...
...
@@ -53,7 +53,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
limit 5
</if>
</select>
<select
id=
"selectTHiddenTroubleWorkListApp"
parameterType=
"THiddenTroubleWork"
resultMap=
"THiddenTroubleWorkResult"
>
SELECT tw.work_id, tw.parent_id, tw.book_id, tw.work_cycle, tw.work_name, tw.work_type, tw.work_form, tw.work_begin_time, tw.work_end_time,tw.finish_time,
tw.time_term, tw.work_range, tw.dept_id, tw.work_step, tw.content, tw.create_time, tw.create_by, tw.is_del,
d.dept_name,b.trouble_name,u.`staff_name`,tw.`staff_id`
FROM t_hidden_trouble_work tw
LEFT JOIN sys_dept d ON d.dept_id = tw.dept_id
LEFT JOIN sys_user u ON u.`user_id` = tw.`staff_id`
LEFT JOIN t_staning_book b ON b.book_id = tw.book_id
<where>
AND (tw.parent_id != 0 or tw.work_cycle = 1)
<if
test=
"staffId != null"
>
and tw.`staff_id` = #{staffId}
</if>
<if
test=
"workName != null and workName != ''"
>
and tw.work_name like concat('%', #{workName}, '%')
</if>
</where>
order by tw.create_time desc
</select>
<select
id=
"selectTHiddenTroubleWorkById"
parameterType=
"Long"
resultMap=
"THiddenTroubleWorkResult"
>
SELECT tw.work_id, tw.parent_id, tw.book_id, tw.work_cycle, tw.work_name, tw.work_type, tw.work_form, tw.work_begin_time, tw.work_end_time,tw.finish_time,
tw.time_term, tw.work_range, tw.dept_id, tw.work_step, tw.content, tw.create_time, tw.create_by, tw.is_del,
...
...
danger-manage-system/src/main/resources/mapper/system/TTrainCourseMapper.xml
View file @
0c4f2337
...
...
@@ -153,12 +153,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"userCourseList"
resultType=
"com.zehong.system.domain.vo.UserCourseVo"
>
SELECT uc.user_course_id AS userCourseId,uc.state ,uc.examination_time AS examinationTime,
uc.`examination_result` AS examinationResult,uc.`create_time` AS createTime,
c.`course_name` AS courseName, c.`topic_num` AS topicNum,c.`release_time` AS releaseTime,c.data_kind as dataKind,
c.`course_name` AS courseName, c.`topic_num` AS topicNum,c.`release_time` AS releaseTime,c.data_kind as dataKind,
c.personnel_type as personnelType,
p.`plan_name` AS courseType,c.course_id as courseId,c.qualified_num as qualifiedNum
FROM t_train_user_course uc
LEFT JOIN t_train_course c ON c.`course_id` = uc.`course_id`
LEFT JOIN t_train_plan p ON p.`plan_id` = c.`course_type`
WHERE uc.user_id = #{userId} and uc.personnel_type =
1
WHERE uc.user_id = #{userId} and uc.personnel_type =
#{personnelType}
<if
test=
"type!=null and type == 1"
>
and uc.state !=2
</if>
...
...
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