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
de9c6de9
Commit
de9c6de9
authored
Oct 22, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子作业票 gengdidi
parent
45402bb4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1480 additions
and
515 deletions
+1480
-515
TWorkPermitController.java
...hong/web/controller/workPermit/TWorkPermitController.java
+51
-0
TWorkPermit.java
...m/src/main/java/com/zehong/system/domain/TWorkPermit.java
+20
-0
TWorkPermitMapper.java
...main/java/com/zehong/system/mapper/TWorkPermitMapper.java
+7
-0
ITWorkPermitService.java
...n/java/com/zehong/system/service/ITWorkPermitService.java
+7
-0
TSpecialWorkPermitServiceImpl.java
...ng/system/service/impl/TSpecialWorkPermitServiceImpl.java
+2
-2
TWorkPermitServiceImpl.java
...om/zehong/system/service/impl/TWorkPermitServiceImpl.java
+10
-0
TWorkPermitMapper.xml
...em/src/main/resources/mapper/system/TWorkPermitMapper.xml
+55
-0
permit.js
danger-manage-web/src/api/workPermit/permit.js
+8
-0
NewWorkPermitDetail.vue
...-web/src/components/DangerousMark/NewWorkPermitDetail.vue
+372
-0
FlareUp.vue
danger-manage-web/src/components/NewSaftyWork/FlareUp.vue
+373
-353
NewEsign.vue
danger-manage-web/src/components/SaftyWork/NewEsign.vue
+90
-0
index.vue
danger-manage-web/src/views/newWorkPermit/index.vue
+485
-160
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/workPermit/TWorkPermitController.java
View file @
de9c6de9
...
@@ -9,7 +9,11 @@ import com.zehong.common.core.page.TableDataInfo;
...
@@ -9,7 +9,11 @@ import com.zehong.common.core.page.TableDataInfo;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.system.domain.TSpecialWorkPermit
;
import
com.zehong.system.domain.TSpecialWorkPermitSign
;
import
com.zehong.system.domain.TWorkPermit
;
import
com.zehong.system.domain.TWorkPermit
;
import
com.zehong.system.service.ITSpecialWorkPermitService
;
import
com.zehong.system.service.ITSpecialWorkPermitSignService
;
import
com.zehong.system.service.ITWorkPermitService
;
import
com.zehong.system.service.ITWorkPermitService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -29,6 +33,12 @@ public class TWorkPermitController extends BaseController
...
@@ -29,6 +33,12 @@ public class TWorkPermitController extends BaseController
@Autowired
@Autowired
private
ITWorkPermitService
tWorkPermitService
;
private
ITWorkPermitService
tWorkPermitService
;
@Autowired
private
ITSpecialWorkPermitService
tSpecialWorkPermitService
;
@Autowired
private
ITSpecialWorkPermitSignService
tSpecialWorkPermitSignService
;
/**
/**
* 查询作业许可证列表
* 查询作业许可证列表
*/
*/
...
@@ -38,9 +48,50 @@ public class TWorkPermitController extends BaseController
...
@@ -38,9 +48,50 @@ public class TWorkPermitController extends BaseController
startPage
();
startPage
();
List
<
TWorkPermit
>
list
=
tWorkPermitService
.
selectTWorkPermitList
(
tWorkPermit
);
List
<
TWorkPermit
>
list
=
tWorkPermitService
.
selectTWorkPermitList
(
tWorkPermit
);
//setOperator(list);
//setOperator(list);
setApprovalInfo
(
list
);
return
getDataTable
(
list
);
}
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
@GetMapping
(
"/selectTWorkPermitListByLoginUser"
)
public
TableDataInfo
selectTWorkPermitListByLoginUser
(
TWorkPermit
tWorkPermit
){
startPage
();
tWorkPermit
.
setCurrentLoginUser
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
List
<
TWorkPermit
>
list
=
tWorkPermitService
.
selectTWorkPermitListByLoginUser
(
tWorkPermit
);
//setOperator(list);
setApprovalInfo
(
list
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
* 获取审核人信息
* @param list 作业许可证列表
*/
private
void
setApprovalInfo
(
List
<
TWorkPermit
>
list
){
for
(
TWorkPermit
tWorkPermit
:
list
){
List
<
Long
>
approvalIds
=
new
ArrayList
<>();
if
(
"1"
.
equals
(
tWorkPermit
.
getApplyStatus
())){
TSpecialWorkPermit
tSpecialWorkPermit
=
new
TSpecialWorkPermit
();
tSpecialWorkPermit
.
setWorkPermitId
(
tWorkPermit
.
getWorkPermitId
());
List
<
TSpecialWorkPermit
>
specialWorkPermits
=
tSpecialWorkPermitService
.
selectTSpecialWorkPermitList
(
tSpecialWorkPermit
);
for
(
TSpecialWorkPermit
specialWorkPermit
:
specialWorkPermits
){
TSpecialWorkPermitSign
tSpecialWorkPermitSign
=
new
TSpecialWorkPermitSign
();
tSpecialWorkPermitSign
.
setPermitId
(
specialWorkPermit
.
getSpecialWorkPermitId
());
List
<
TSpecialWorkPermitSign
>
specialWorkPermitSigns
=
tSpecialWorkPermitSignService
.
selectTSpecialWorkPermitSignList
(
tSpecialWorkPermitSign
);
for
(
TSpecialWorkPermitSign
specialWorkPermitSign:
specialWorkPermitSigns
){
approvalIds
.
add
(
specialWorkPermitSign
.
getStaffId
());
}
}
}
tWorkPermit
.
setApprovals
(
approvalIds
);
}
}
/**
/**
* 根据许可证状态及登录人设置操作权限
* 根据许可证状态及登录人设置操作权限
* @param list 作业许可证列表
* @param list 作业许可证列表
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/TWorkPermit.java
View file @
de9c6de9
...
@@ -102,6 +102,26 @@ public class TWorkPermit extends BaseEntity
...
@@ -102,6 +102,26 @@ public class TWorkPermit extends BaseEntity
private
String
operator
;
private
String
operator
;
private
List
<
Long
>
approvals
;
private
long
currentLoginUser
;
public
long
getCurrentLoginUser
()
{
return
currentLoginUser
;
}
public
void
setCurrentLoginUser
(
long
currentLoginUser
)
{
this
.
currentLoginUser
=
currentLoginUser
;
}
public
List
<
Long
>
getApprovals
()
{
return
approvals
;
}
public
void
setApprovals
(
List
<
Long
>
approvals
)
{
this
.
approvals
=
approvals
;
}
/**
/**
* 签字人身份
* 签字人身份
*/
*/
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/TWorkPermitMapper.java
View file @
de9c6de9
...
@@ -58,4 +58,11 @@ public interface TWorkPermitMapper
...
@@ -58,4 +58,11 @@ public interface TWorkPermitMapper
* @return 结果
* @return 结果
*/
*/
public
int
deleteTWorkPermitByIds
(
Long
[]
workPermitIds
);
public
int
deleteTWorkPermitByIds
(
Long
[]
workPermitIds
);
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
List
<
TWorkPermit
>
selectTWorkPermitListByLoginUser
(
TWorkPermit
tWorkPermit
);
}
}
danger-manage-system/src/main/java/com/zehong/system/service/ITWorkPermitService.java
View file @
de9c6de9
...
@@ -58,4 +58,11 @@ public interface ITWorkPermitService
...
@@ -58,4 +58,11 @@ public interface ITWorkPermitService
* @return 结果
* @return 结果
*/
*/
public
int
deleteTWorkPermitById
(
Long
workPermitId
);
public
int
deleteTWorkPermitById
(
Long
workPermitId
);
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
List
<
TWorkPermit
>
selectTWorkPermitListByLoginUser
(
TWorkPermit
tWorkPermit
);
}
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TSpecialWorkPermitServiceImpl.java
View file @
de9c6de9
...
@@ -160,7 +160,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
...
@@ -160,7 +160,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
TWorkPermitVo
tWorkPermitVo
=
new
TWorkPermitVo
();
TWorkPermitVo
tWorkPermitVo
=
new
TWorkPermitVo
();
TWorkPermit
tWorkPermit
=
itWorkPermitService
.
selectTWorkPermitById
(
workPermitId
);
TWorkPermit
tWorkPermit
=
itWorkPermitService
.
selectTWorkPermitById
(
workPermitId
);
tWorkPermitVo
.
settWorkPermit
(
tWorkPermit
);
tWorkPermitVo
.
settWorkPermit
(
tWorkPermit
);
/*
List<Integer> postIds = postService.selectPostListByUserId(SecurityUtils.getLoginUser().getUser().getUserId());
List<Integer> postIds = postService.selectPostListByUserId(SecurityUtils.getLoginUser().getUser().getUserId());
if(SecurityUtils.getLoginUser().getUser().getUserId().equals(Long.valueOf(tWorkPermit.getLinkMan()))){
if(SecurityUtils.getLoginUser().getUser().getUserId().equals(Long.valueOf(tWorkPermit.getLinkMan()))){
postIds.add(-1);
postIds.add(-1);
...
@@ -168,7 +168,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
...
@@ -168,7 +168,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
if(SecurityUtils.getLoginUser().getUser().getUserId().equals(Long.valueOf(tWorkPermit.getRatifier()))){
if(SecurityUtils.getLoginUser().getUser().getUserId().equals(Long.valueOf(tWorkPermit.getRatifier()))){
postIds.add(-2);
postIds.add(-2);
}
}
tWorkPermitVo
.
setPostIds
(
postIds
);
tWorkPermitVo.setPostIds(postIds);
*/
TSpecialWorkPermit
tSpecialWorkPermit
=
new
TSpecialWorkPermit
();
TSpecialWorkPermit
tSpecialWorkPermit
=
new
TSpecialWorkPermit
();
tSpecialWorkPermit
.
setWorkPermitId
(
workPermitId
);
tSpecialWorkPermit
.
setWorkPermitId
(
workPermitId
);
tWorkPermitVo
.
setSpecialWorkPermits
(
tSpecialWorkPermitMapper
.
selectTSpecialWorkPermitList
(
tSpecialWorkPermit
));
tWorkPermitVo
.
setSpecialWorkPermits
(
tSpecialWorkPermitMapper
.
selectTSpecialWorkPermitList
(
tSpecialWorkPermit
));
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TWorkPermitServiceImpl.java
View file @
de9c6de9
...
@@ -93,4 +93,14 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService
...
@@ -93,4 +93,14 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService
{
{
return
tWorkPermitMapper
.
deleteTWorkPermitById
(
workPermitId
);
return
tWorkPermitMapper
.
deleteTWorkPermitById
(
workPermitId
);
}
}
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
@Override
public
List
<
TWorkPermit
>
selectTWorkPermitListByLoginUser
(
TWorkPermit
tWorkPermit
){
return
tWorkPermitMapper
.
selectTWorkPermitListByLoginUser
(
tWorkPermit
);
}
}
}
danger-manage-system/src/main/resources/mapper/system/TWorkPermitMapper.xml
View file @
de9c6de9
...
@@ -152,4 +152,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -152,4 +152,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{workPermitId}
#{workPermitId}
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"selectTWorkPermitListByLoginUser"
parameterType=
"TWorkPermit"
resultMap=
"TWorkPermitResult"
>
SELECT
permit.work_permit_id,
permit.apply_dept,
permit.link_man,
permit.link_phone,
permit.work_bound,
permit.device_name,
permit.device_num,
permit.apply_work_start_time,
permit.apply_work_end_time,
permit.work_content,
permit.contractor,
permit.ratifier,
permit.main_dangerous_mark,
permit.dangerous_mark_detial,
permit.licence_info,
permit.relation_sign,
permit.produce_comfirm,
permit.work_deal,
permit.apply_status,
permit.create_time,
permit.update_time,
permit.remarks
FROM
t_work_permit permit,t_special_work_permit special,t_special_work_permit_sign sign
WHERE
permit.work_permit_id = special.work_permit_id
AND special.special_work_permit_id = sign.permit_id
AND (permit.link_man = #{currentLoginUser} or sign.sign_id = #{currentLoginUser})
<where>
<if
test=
"applyDept != null and applyDept != ''"
>
and apply_dept = #{applyDept}
</if>
<if
test=
"linkMan != null and linkMan != ''"
>
and link_man = #{linkMan}
</if>
<if
test=
"linkPhone != null and linkPhone != ''"
>
and link_phone = #{linkPhone}
</if>
<if
test=
"workBound != null and workBound != ''"
>
and work_bound = #{workBound}
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"deviceNum != null and deviceNum != ''"
>
and device_num like concat('%', #{deviceNum},'%')
</if>
<if
test=
"applyWorkStartTime != null "
>
and apply_work_start_time = #{applyWorkStartTime}
</if>
<if
test=
"applyWorkEndTime != null "
>
and apply_work_end_time = #{applyWorkEndTime}
</if>
<if
test=
"workContent != null and workContent != ''"
>
and work_content = #{workContent}
</if>
<if
test=
"contractor != null "
>
and contractor = #{contractor}
</if>
<if
test=
"ratifier != null "
>
and ratifier = #{ratifier}
</if>
<if
test=
"mainDangerousMark != null and mainDangerousMark != ''"
>
and main_dangerous_mark = #{mainDangerousMark}
</if>
<if
test=
"dangerousMarkDetial != null and dangerousMarkDetial != ''"
>
and dangerous_mark_detial = #{dangerousMarkDetial}
</if>
<if
test=
"licenceInfo != null and licenceInfo != ''"
>
and licence_info = #{licenceInfo}
</if>
<if
test=
"relationSign != null and relationSign != ''"
>
and relation_sign = #{relationSign}
</if>
<if
test=
"produceComfirm != null and produceComfirm != ''"
>
and produce_comfirm = #{produceComfirm}
</if>
<if
test=
"workDeal != null and workDeal != ''"
>
and work_deal = #{workDeal}
</if>
<if
test=
"applyStatus != null and applyStatus != ''"
>
and apply_status = #{applyStatus}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
GROUP BY permit.work_permit_id
ORDER BY create_time DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
danger-manage-web/src/api/workPermit/permit.js
View file @
de9c6de9
...
@@ -9,6 +9,14 @@ export function listPermit(query) {
...
@@ -9,6 +9,14 @@ export function listPermit(query) {
})
})
}
}
export
function
selectTWorkPermitListByLoginUser
(
query
)
{
return
request
({
url
:
'/work/permit/selectTWorkPermitListByLoginUser'
,
method
:
'get'
,
params
:
query
})
}
// 查询作业许可证详细
// 查询作业许可证详细
export
function
getPermit
(
workPermitId
)
{
export
function
getPermit
(
workPermitId
)
{
return
request
({
return
request
({
...
...
danger-manage-web/src/components/DangerousMark/NewWorkPermitDetail.vue
0 → 100644
View file @
de9c6de9
This diff is collapsed.
Click to expand it.
danger-manage-web/src/components/NewSaftyWork/FlareUp.vue
View file @
de9c6de9
This diff is collapsed.
Click to expand it.
danger-manage-web/src/components/SaftyWork/NewEsign.vue
0 → 100644
View file @
de9c6de9
<
template
>
<div>
<input
class=
"editInput"
placeholder=
"请签名"
v-if=
"resultImg == '' || resultImg == null"
@
click=
"signOpen =true"
/>
<el-dialog
title=
"签名"
:visible
.
sync=
"signOpen"
:close-on-click-modal=
"false"
:z-index=
"2000"
>
<div
style=
"border: 1px solid #cccccc"
>
<vue-esign
ref=
"esign"
:width=
"width"
:height=
"height"
:isCrop=
"isCrop"
:lineWidth=
"lineWidth"
:lineColor=
"lineColor"
:bgColor
.
sync=
"bgColor"
/>
<div
style=
"text-align: right"
>
<button
@
click=
"handleReset"
style=
"margin-right: 2px"
>
清空
</button>
<button
@
click=
"handleGenerate"
>
确定
</button>
</div>
</div>
</el-dialog>
<div>
<img
v-if=
"resultImg"
:src=
"resultImg"
alt=
""
style=
"width: 100%;height: 100%"
@
click=
"reWriteSign"
/>
</div>
</div>
</
template
>
<
script
>
import
vueEsign
from
'vue-esign'
export
default
{
name
:
"esign"
,
components
:{
vueEsign
},
props
:{
width
:{
type
:
Number
},
height
:{
type
:
Number
},
resultImg
:{
type
:
String
,
default
:
""
},
isReWrite
:{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
lineWidth
:
3
,
lineColor
:
'#000000'
,
bgColor
:
''
,
isCrop
:
false
,
signOpen
:
false
}
},
methods
:
{
handleReset
()
{
this
.
$refs
[
'esign'
].
reset
()
//清空画布
},
handleGenerate
()
{
this
.
$refs
[
'esign'
].
generate
().
then
(
res
=>
{
this
.
$emit
(
'update:resultImg'
,
res
);
this
.
signOpen
=
false
;
//this.resultImg = res // 得到了签字生成的base64图片
}).
catch
(
err
=>
{
// 没有签名,点击生成图片时调用
this
.
$message
({
message
:
err
+
' 未签名!'
,
type
:
'warning'
})
})
},
//重签
reWriteSign
(){
if
(
this
.
isReWrite
){
this
.
signOpen
=
true
;
}
}
}
}
</
script
>
<
style
scoped
scss=
"lang"
>
.editInput
{
border
:
none
;
width
:
100%
;
height
:
100%
;
text-align
:
center
;
}
.editInput
:focus
{
outline
:
none
;
}
</
style
>
danger-manage-web/src/views/newWorkPermit/index.vue
View file @
de9c6de9
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