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
1bbbe91f
Commit
1bbbe91f
authored
Oct 22, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/gengdidi/zhengyuan-danger-chemistry-manage
parents
de9c6de9
7dec1a52
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2398 additions
and
15 deletions
+2398
-15
TNfcRecordController.java
...om/zehong/web/controller/system/TNfcRecordController.java
+116
-0
TNfcSettingController.java
...m/zehong/web/controller/system/TNfcSettingController.java
+137
-0
TNfcRecord.java
...em/src/main/java/com/zehong/system/domain/TNfcRecord.java
+255
-0
TNfcSetting.java
...m/src/main/java/com/zehong/system/domain/TNfcSetting.java
+185
-0
TNfcRecordMapper.java
.../main/java/com/zehong/system/mapper/TNfcRecordMapper.java
+61
-0
TNfcSettingMapper.java
...main/java/com/zehong/system/mapper/TNfcSettingMapper.java
+83
-0
ITNfcRecordService.java
...in/java/com/zehong/system/service/ITNfcRecordService.java
+61
-0
ITNfcSettingService.java
...n/java/com/zehong/system/service/ITNfcSettingService.java
+76
-0
TNfcRecordServiceImpl.java
...com/zehong/system/service/impl/TNfcRecordServiceImpl.java
+98
-0
TNfcSettingServiceImpl.java
...om/zehong/system/service/impl/TNfcSettingServiceImpl.java
+131
-0
TNfcRecordMapper.xml
...tem/src/main/resources/mapper/system/TNfcRecordMapper.xml
+91
-0
TNfcSettingMapper.xml
...em/src/main/resources/mapper/system/TNfcSettingMapper.xml
+130
-0
statistics.js
danger-manage-web/src/api/system/statistics.js
+62
-0
tnfcSetting.js
danger-manage-web/src/api/system/tnfcSetting.js
+53
-0
biguser.png
danger-manage-web/src/assets/img/biguser.png
+0
-0
index.vue
danger-manage-web/src/views/entrance/index.vue
+154
-15
index.vue
danger-manage-web/src/views/system/statistics/index.vue
+342
-0
index.vue
danger-manage-web/src/views/system/tNfcSetting/index.vue
+363
-0
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/system/TNfcRecordController.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
web
.
controller
.
system
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TNfcRecord
;
import
com.zehong.system.service.ITNfcRecordService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* nfc巡检记录idController
*
* @author zehong
* @date 2022-10-18
*/
@RestController
@RequestMapping
(
"/system/record"
)
public
class
TNfcRecordController
extends
BaseController
{
@Autowired
private
ITNfcRecordService
tNfcRecordService
;
@Autowired
private
TokenService
tokenService
;
/**
* 查询nfc巡检记录id列表
*/
//@PreAuthorize("@ss.hasPermi('system:record:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TNfcRecord
tNfcRecord
)
{
startPage
();
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
tNfcRecord
.
setCreateUser
(
user
.
getUserId
());
List
<
TNfcRecord
>
list
=
tNfcRecordService
.
selectTNfcRecordList
(
tNfcRecord
);
return
getDataTable
(
list
);
}
/**
* 导出nfc巡检记录id列表
*/
//@PreAuthorize("@ss.hasPermi('system:record:export')")
@Log
(
title
=
"nfc巡检记录id"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TNfcRecord
tNfcRecord
)
{
List
<
TNfcRecord
>
list
=
tNfcRecordService
.
selectTNfcRecordList
(
tNfcRecord
);
ExcelUtil
<
TNfcRecord
>
util
=
new
ExcelUtil
<
TNfcRecord
>(
TNfcRecord
.
class
);
return
util
.
exportExcel
(
list
,
"nfc巡检记录id数据"
);
}
/**
* 获取nfc巡检记录id详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:record:query')")
@GetMapping
(
value
=
"/{recordId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"recordId"
)
Long
recordId
)
{
return
AjaxResult
.
success
(
tNfcRecordService
.
selectTNfcRecordById
(
recordId
));
}
/**
* 新增nfc巡检记录id
*/
//@PreAuthorize("@ss.hasPermi('system:record:add')")
@Log
(
title
=
"nfc巡检记录"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TNfcRecord
tNfcRecord
)
{
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
tNfcRecord
.
setCreateUser
(
user
.
getUserId
());
return
toAjax
(
tNfcRecordService
.
insertTNfcRecord
(
tNfcRecord
));
}
/**
* 修改nfc巡检记录id
*/
//@PreAuthorize("@ss.hasPermi('system:record:edit')")
@Log
(
title
=
"nfc巡检记录id"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TNfcRecord
tNfcRecord
)
{
return
toAjax
(
tNfcRecordService
.
updateTNfcRecord
(
tNfcRecord
));
}
/**
* 删除nfc巡检记录id
*/
//@PreAuthorize("@ss.hasPermi('system:record:remove')")
@Log
(
title
=
"nfc巡检记录id"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{recordIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
recordIds
)
{
return
toAjax
(
tNfcRecordService
.
deleteTNfcRecordByIds
(
recordIds
));
}
}
danger-manage-admin/src/main/java/com/zehong/web/controller/system/TNfcSettingController.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
web
.
controller
.
system
;
import
java.util.List
;
import
com.zehong.system.domain.TNfcRecord
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TNfcSetting
;
import
com.zehong.system.service.ITNfcSettingService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* settingController
*
* @author zehong
* @date 2022-10-17
*/
@RestController
@RequestMapping
(
"/system/inspection"
)
public
class
TNfcSettingController
extends
BaseController
{
@Autowired
private
ITNfcSettingService
tNfcSettingService
;
/**
* 查询巡检列表
*/
//@PreAuthorize("@ss.hasPermi('system:setting:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TNfcSetting
tNfcSetting
)
{
startPage
();
List
<
TNfcSetting
>
list
=
tNfcSettingService
.
selectTNfcSettingList
(
tNfcSetting
);
return
getDataTable
(
list
);
}
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
@GetMapping
(
"/punchClockList"
)
public
TableDataInfo
punchClockList
(
TNfcSetting
tNfcSetting
){
startPage
();
List
<
TNfcRecord
>
list
=
tNfcSettingService
.
punchClockList
(
tNfcSetting
);
return
getDataTable
(
list
);
}
/**
* 导出巡检打卡列表
*/
@Log
(
title
=
"setting"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/exportPunchClockList"
)
public
AjaxResult
exportPunchClockList
(
TNfcSetting
tNfcSetting
)
{
List
<
TNfcRecord
>
list
=
tNfcSettingService
.
punchClockList
(
tNfcSetting
);
ExcelUtil
<
TNfcRecord
>
util
=
new
ExcelUtil
<
TNfcRecord
>(
TNfcRecord
.
class
);
return
util
.
exportExcel
(
list
,
"巡检打卡数据"
);
}
/**
* 导出巡检列表
*/
//@PreAuthorize("@ss.hasPermi('system:setting:export')")
@Log
(
title
=
"setting"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TNfcSetting
tNfcSetting
)
{
List
<
TNfcSetting
>
list
=
tNfcSettingService
.
selectTNfcSettingList
(
tNfcSetting
);
ExcelUtil
<
TNfcSetting
>
util
=
new
ExcelUtil
<
TNfcSetting
>(
TNfcSetting
.
class
);
return
util
.
exportExcel
(
list
,
"setting数据"
);
}
/**
* 获取巡检详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:setting:query')")
@GetMapping
(
value
=
"/{nfcId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"nfcId"
)
Long
nfcId
)
{
return
AjaxResult
.
success
(
tNfcSettingService
.
selectTNfcSettingById
(
nfcId
));
}
/**
* 根据nfcNum获取巡检详细信息
*/
@GetMapping
(
value
=
"/selectByNfcNum"
)
public
AjaxResult
getInfoByNfcNum
(
String
nfcNum
)
{
return
AjaxResult
.
success
(
tNfcSettingService
.
getInfoByNfcNum
(
nfcNum
));
}
/**
* 新增巡检
*/
//@PreAuthorize("@ss.hasPermi('system:setting:add')")
@Log
(
title
=
"setting"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TNfcSetting
tNfcSetting
)
{
System
.
out
.
println
(
tNfcSetting
);
return
toAjax
(
tNfcSettingService
.
insertTNfcSetting
(
tNfcSetting
));
}
/**
* 修改巡检
*/
//@PreAuthorize("@ss.hasPermi('system:setting:edit')")
@Log
(
title
=
"setting"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TNfcSetting
tNfcSetting
)
{
return
toAjax
(
tNfcSettingService
.
updateTNfcSetting
(
tNfcSetting
));
}
/**
* 删除巡检
*/
//@PreAuthorize("@ss.hasPermi('system:setting:remove')")
@Log
(
title
=
"setting"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{nfcIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
nfcIds
)
{
return
toAjax
(
tNfcSettingService
.
deleteTNfcSettingByIds
(
nfcIds
));
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/TNfcRecord.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
java.util.Date
;
/**
* nfc巡检记录id对象 t_nfc_record
*
* @author zehong
* @date 2022-10-18
*/
public
class
TNfcRecord
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 巡检记录
*/
private
Long
recordId
;
/**
* nfc_id
*/
private
Long
nfcId
;
/**
* 图片地址
*/
private
String
picture
;
/**
* 备注
*/
private
String
remarks
;
/**
* 上报人姓名
*/
private
Long
createUser
;
/**巡检地点*/
@Excel
(
name
=
"巡检地点"
)
private
String
patrolAddress
;
/**巡检区域*/
@Excel
(
name
=
"巡检区域"
)
private
String
dictLabel
;
/**巡检内容*/
@Excel
(
name
=
"巡检内容"
)
private
String
patrolComent
;
/**巡检频次*/
@Excel
(
name
=
"巡检频次"
)
private
String
patrolFrequency
;
/** 巡检人*/
@Excel
(
name
=
"上报人"
)
private
String
nickName
;
private
String
userName
;
private
String
startTime
;
private
String
endTime
;
/**
* 是否正常 0否 1是
*/
@Excel
(
name
=
"巡检结果"
,
readConverterExp
=
"0=异常,1=正常"
)
private
Integer
isNormal
;
/**上报时间*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"上报时间"
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
String
applyWorkStartTime
;
/**
* 结束时间
* @return
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
String
applyWorkEndTime
;
public
String
getApplyWorkStartTime
()
{
return
applyWorkStartTime
;
}
public
void
setApplyWorkStartTime
(
String
applyWorkStartTime
)
{
this
.
applyWorkStartTime
=
applyWorkStartTime
;
}
public
String
getApplyWorkEndTime
()
{
return
applyWorkEndTime
;
}
public
void
setApplyWorkEndTime
(
String
applyWorkEndTime
)
{
this
.
applyWorkEndTime
=
applyWorkEndTime
;
}
public
String
getDictLabel
()
{
return
dictLabel
;
}
public
void
setDictLabel
(
String
dictLabel
)
{
this
.
dictLabel
=
dictLabel
;
}
@Override
public
Date
getCreateTime
()
{
return
createTime
;
}
@Override
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getPatrolAddress
()
{
return
patrolAddress
;
}
public
void
setPatrolAddress
(
String
patrolAddress
)
{
this
.
patrolAddress
=
patrolAddress
;
}
public
String
getPatrolComent
()
{
return
patrolComent
;
}
public
void
setPatrolComent
(
String
patrolComent
)
{
this
.
patrolComent
=
patrolComent
;
}
public
String
getPatrolFrequency
()
{
return
patrolFrequency
;
}
public
void
setPatrolFrequency
(
String
patrolFrequency
)
{
this
.
patrolFrequency
=
patrolFrequency
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
Long
getRecordId
()
{
return
recordId
;
}
public
void
setRecordId
(
Long
recordId
)
{
this
.
recordId
=
recordId
;
}
public
Long
getNfcId
()
{
return
nfcId
;
}
public
void
setNfcId
(
Long
nfcId
)
{
this
.
nfcId
=
nfcId
;
}
public
Integer
getIsNormal
()
{
return
isNormal
;
}
public
void
setIsNormal
(
Integer
isNormal
)
{
this
.
isNormal
=
isNormal
;
}
public
String
getPicture
()
{
return
picture
;
}
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
Long
getCreateUser
()
{
return
createUser
;
}
public
void
setCreateUser
(
Long
createUser
)
{
this
.
createUser
=
createUser
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
String
startTime
)
{
this
.
startTime
=
startTime
;
}
public
String
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
}
@Override
public
String
toString
()
{
return
"TNfcRecord{"
+
"recordId="
+
recordId
+
", nfcId="
+
nfcId
+
", isNormal="
+
isNormal
+
", picture='"
+
picture
+
'\''
+
", remarks='"
+
remarks
+
'\''
+
", createTime="
+
createTime
+
", createUser="
+
createUser
+
", patrolAddress='"
+
patrolAddress
+
'\''
+
", patrolComent='"
+
patrolComent
+
'\''
+
", patrolFrequency='"
+
patrolFrequency
+
'\''
+
", nickName='"
+
nickName
+
'\''
+
", userName='"
+
userName
+
'\''
+
", startTime='"
+
startTime
+
'\''
+
", endTime='"
+
endTime
+
'\''
+
", dictLabel='"
+
dictLabel
+
'\''
+
'}'
;
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/TNfcSetting.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
java.util.Date
;
/**
* setting对象 t_nfc_setting
*
* @author zehong
* @date 2022-10-17
*/
public
class
TNfcSetting
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** nfc_id */
private
Long
nfcId
;
/** 排序 */
@Excel
(
name
=
"排序"
)
private
Integer
patrolSort
;
/** 巡检地点 */
@Excel
(
name
=
"巡检地点"
)
private
String
patrolAddress
;
/** 巡检内容 */
@Excel
(
name
=
"巡检内容"
)
private
String
patrolComent
;
/** 巡检频次 */
@Excel
(
name
=
"巡检频次"
)
private
String
patrolFrequency
;
/** nfc编号 */
@Excel
(
name
=
"nfc编号"
)
private
String
nfcNum
;
/** 是否删除 0否 1是 */
private
Integer
isDel
;
/**
* 区域 编号
*/
private
String
region
;
/**
* 巡检区域
*/
private
String
nickName
;
/**
* 开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
String
applyWorkStartTime
;
/**
* 结束时间
* @return
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
String
applyWorkEndTime
;
public
String
getApplyWorkStartTime
()
{
return
applyWorkStartTime
;
}
public
void
setApplyWorkStartTime
(
String
applyWorkStartTime
)
{
this
.
applyWorkStartTime
=
applyWorkStartTime
;
}
public
String
getApplyWorkEndTime
()
{
return
applyWorkEndTime
;
}
public
void
setApplyWorkEndTime
(
String
applyWorkEndTime
)
{
this
.
applyWorkEndTime
=
applyWorkEndTime
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
String
getRegion
()
{
return
region
;
}
public
void
setRegion
(
String
region
)
{
this
.
region
=
region
;
}
public
void
setNfcId
(
Long
nfcId
)
{
this
.
nfcId
=
nfcId
;
}
public
Long
getNfcId
()
{
return
nfcId
;
}
public
void
setPatrolSort
(
Integer
patrolSort
)
{
this
.
patrolSort
=
patrolSort
;
}
public
Integer
getPatrolSort
()
{
return
patrolSort
;
}
public
void
setPatrolAddress
(
String
patrolAddress
)
{
this
.
patrolAddress
=
patrolAddress
;
}
public
String
getPatrolAddress
()
{
return
patrolAddress
;
}
public
void
setPatrolComent
(
String
patrolComent
)
{
this
.
patrolComent
=
patrolComent
;
}
public
String
getPatrolComent
()
{
return
patrolComent
;
}
public
void
setPatrolFrequency
(
String
patrolFrequency
)
{
this
.
patrolFrequency
=
patrolFrequency
;
}
public
String
getPatrolFrequency
()
{
return
patrolFrequency
;
}
public
void
setNfcNum
(
String
nfcNum
)
{
this
.
nfcNum
=
nfcNum
;
}
public
String
getNfcNum
()
{
return
nfcNum
;
}
public
void
setIsDel
(
Integer
isDel
)
{
this
.
isDel
=
isDel
;
}
public
Integer
getIsDel
()
{
return
isDel
;
}
@Override
public
String
toString
()
{
return
"TNfcSetting{"
+
"nfcId="
+
nfcId
+
", patrolSort="
+
patrolSort
+
", patrolAddress='"
+
patrolAddress
+
'\''
+
", patrolComent='"
+
patrolComent
+
'\''
+
", patrolFrequency='"
+
patrolFrequency
+
'\''
+
", nfcNum='"
+
nfcNum
+
'\''
+
", isDel="
+
isDel
+
", region='"
+
region
+
'\''
+
", nickName='"
+
nickName
+
'\''
+
", applyWorkStartTime="
+
applyWorkStartTime
+
", applyWorkEndTime="
+
applyWorkEndTime
+
'}'
;
}
}
danger-manage-system/src/main/java/com/zehong/system/mapper/TNfcRecordMapper.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TNfcRecord
;
/**
* nfc巡检记录idMapper接口
*
* @author zehong
* @date 2022-10-18
*/
public
interface
TNfcRecordMapper
{
/**
* 查询nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return nfc巡检记录id
*/
public
TNfcRecord
selectTNfcRecordById
(
Long
recordId
);
/**
* 查询nfc巡检记录id列表
*
* @param tNfcRecord nfc巡检记录id
* @return nfc巡检记录id集合
*/
public
List
<
TNfcRecord
>
selectTNfcRecordList
(
TNfcRecord
tNfcRecord
);
/**
* 新增nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public
int
insertTNfcRecord
(
TNfcRecord
tNfcRecord
);
/**
* 修改nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public
int
updateTNfcRecord
(
TNfcRecord
tNfcRecord
);
/**
* 删除nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return 结果
*/
public
int
deleteTNfcRecordById
(
Long
recordId
);
/**
* 批量删除nfc巡检记录id
*
* @param recordIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTNfcRecordByIds
(
Long
[]
recordIds
);
}
danger-manage-system/src/main/java/com/zehong/system/mapper/TNfcSettingMapper.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TNfcRecord
;
import
com.zehong.system.domain.TNfcSetting
;
/**
* settingMapper接口
*
* @author zehong
* @date 2022-10-17
*/
public
interface
TNfcSettingMapper
{
/**
* 查询setting
*
* @param nfcId settingID
* @return setting
*/
public
TNfcSetting
selectTNfcSettingById
(
Long
nfcId
);
/**
* 根据nfcNum查询详情
* @param nfcNum
*/
public
TNfcSetting
getInfoByNfcNum
(
String
nfcNum
);
/**
* 查询setting列表
*
* @param tNfcSetting setting
* @return setting集合
*/
public
List
<
TNfcSetting
>
selectTNfcSettingList
(
TNfcSetting
tNfcSetting
);
/**
* 新增setting
*
* @param tNfcSetting setting
* @return 结果
*/
public
int
insertTNfcSetting
(
TNfcSetting
tNfcSetting
);
/**
* 修改setting
*
* @param tNfcSetting setting
* @return 结果
*/
public
int
updateTNfcSetting
(
TNfcSetting
tNfcSetting
);
/**
* 删除setting
*
* @param nfcId settingID
* @return 结果
*/
public
int
deleteTNfcSettingById
(
Long
nfcId
);
/**
* 批量删除setting
*
* @param nfcIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTNfcSettingByIds
(
Long
[]
nfcIds
);
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
List
<
TNfcRecord
>
punchClockList
(
TNfcSetting
tNfcSetting
);
/**
* 查询nfc编号是否已经注册
* @param nfcNum
* @return
*/
int
getNfcNum
(
String
nfcNum
);
}
danger-manage-system/src/main/java/com/zehong/system/service/ITNfcRecordService.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TNfcRecord
;
/**
* nfc巡检记录idService接口
*
* @author zehong
* @date 2022-10-18
*/
public
interface
ITNfcRecordService
{
/**
* 查询nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return nfc巡检记录id
*/
public
TNfcRecord
selectTNfcRecordById
(
Long
recordId
);
/**
* 查询nfc巡检记录id列表
*
* @param tNfcRecord nfc巡检记录id
* @return nfc巡检记录id集合
*/
public
List
<
TNfcRecord
>
selectTNfcRecordList
(
TNfcRecord
tNfcRecord
);
/**
* 新增nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public
int
insertTNfcRecord
(
TNfcRecord
tNfcRecord
);
/**
* 修改nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public
int
updateTNfcRecord
(
TNfcRecord
tNfcRecord
);
/**
* 批量删除nfc巡检记录id
*
* @param recordIds 需要删除的nfc巡检记录idID
* @return 结果
*/
public
int
deleteTNfcRecordByIds
(
Long
[]
recordIds
);
/**
* 删除nfc巡检记录id信息
*
* @param recordId nfc巡检记录idID
* @return 结果
*/
public
int
deleteTNfcRecordById
(
Long
recordId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/ITNfcSettingService.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TNfcRecord
;
import
com.zehong.system.domain.TNfcSetting
;
/**
* settingService接口
*
* @author zehong
* @date 2022-10-17
*/
public
interface
ITNfcSettingService
{
/**
* 查询setting
*
* @param nfcId settingID
* @return setting
*/
public
TNfcSetting
selectTNfcSettingById
(
Long
nfcId
);
/**
* 根据nfc获取详情
* @param nfcNum
* @return
*/
public
TNfcSetting
getInfoByNfcNum
(
String
nfcNum
);
/**
* 查询setting列表
*
* @param tNfcSetting setting
* @return setting集合
*/
public
List
<
TNfcSetting
>
selectTNfcSettingList
(
TNfcSetting
tNfcSetting
);
/**
* 新增setting
*
* @param tNfcSetting setting
* @return 结果
*/
public
int
insertTNfcSetting
(
TNfcSetting
tNfcSetting
);
/**
* 修改setting
*
* @param tNfcSetting setting
* @return 结果
*/
public
int
updateTNfcSetting
(
TNfcSetting
tNfcSetting
);
/**
* 批量删除setting
*
* @param nfcIds 需要删除的settingID
* @return 结果
*/
public
int
deleteTNfcSettingByIds
(
Long
[]
nfcIds
);
/**
* 删除setting信息
*
* @param nfcId settingID
* @return 结果
*/
public
int
deleteTNfcSettingById
(
Long
nfcId
);
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
List
<
TNfcRecord
>
punchClockList
(
TNfcSetting
tNfcSetting
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TNfcRecordServiceImpl.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TNfcRecordMapper
;
import
com.zehong.system.domain.TNfcRecord
;
import
com.zehong.system.service.ITNfcRecordService
;
/**
* nfc巡检记录idService业务层处理
*
* @author zehong
* @date 2022-10-18
*/
@Service
public
class
TNfcRecordServiceImpl
implements
ITNfcRecordService
{
@Autowired
private
TNfcRecordMapper
tNfcRecordMapper
;
/**
* 查询nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return nfc巡检记录id
*/
@Override
public
TNfcRecord
selectTNfcRecordById
(
Long
recordId
)
{
return
tNfcRecordMapper
.
selectTNfcRecordById
(
recordId
);
}
/**
* 查询nfc巡检记录id列表
*
* @param tNfcRecord nfc巡检记录id
* @return nfc巡检记录id
*/
@Override
public
List
<
TNfcRecord
>
selectTNfcRecordList
(
TNfcRecord
tNfcRecord
)
{
return
tNfcRecordMapper
.
selectTNfcRecordList
(
tNfcRecord
);
}
/**
* 新增nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
@Override
public
int
insertTNfcRecord
(
TNfcRecord
tNfcRecord
)
{
tNfcRecord
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tNfcRecordMapper
.
insertTNfcRecord
(
tNfcRecord
);
}
/**
* 修改nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
@Override
public
int
updateTNfcRecord
(
TNfcRecord
tNfcRecord
)
{
return
tNfcRecordMapper
.
updateTNfcRecord
(
tNfcRecord
);
}
/**
* 批量删除nfc巡检记录id
*
* @param recordIds 需要删除的nfc巡检记录idID
* @return 结果
*/
@Override
public
int
deleteTNfcRecordByIds
(
Long
[]
recordIds
)
{
return
tNfcRecordMapper
.
deleteTNfcRecordByIds
(
recordIds
);
}
/**
* 删除nfc巡检记录id信息
*
* @param recordId nfc巡检记录idID
* @return 结果
*/
@Override
public
int
deleteTNfcRecordById
(
Long
recordId
)
{
return
tNfcRecordMapper
.
deleteTNfcRecordById
(
recordId
);
}
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TNfcSettingServiceImpl.java
0 → 100644
View file @
1bbbe91f
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TNfcRecord
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TNfcSettingMapper
;
import
com.zehong.system.domain.TNfcSetting
;
import
com.zehong.system.service.ITNfcSettingService
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* settingService业务层处理
*
* @author zehong
* @date 2022-10-17
*/
@Service
public
class
TNfcSettingServiceImpl
implements
ITNfcSettingService
{
@Autowired
private
TNfcSettingMapper
tNfcSettingMapper
;
/**
* 查询setting
*
* @param nfcId settingID
* @return setting
*/
@Override
public
TNfcSetting
selectTNfcSettingById
(
Long
nfcId
)
{
return
tNfcSettingMapper
.
selectTNfcSettingById
(
nfcId
);
}
/**
* 根据nfc查询
* @param nfcNum
* @return
*/
@Override
public
TNfcSetting
getInfoByNfcNum
(
String
nfcNum
)
{
return
tNfcSettingMapper
.
getInfoByNfcNum
(
nfcNum
);
}
/**
* 查询setting列表
*
* @param tNfcSetting setting
* @return setting
*/
@Override
public
List
<
TNfcSetting
>
selectTNfcSettingList
(
TNfcSetting
tNfcSetting
)
{
return
tNfcSettingMapper
.
selectTNfcSettingList
(
tNfcSetting
);
}
/**
* 新增setting
*
* @param tNfcSetting setting
* @return 结果
*/
@Override
public
int
insertTNfcSetting
(
TNfcSetting
tNfcSetting
)
{
tNfcSetting
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tNfcSettingMapper
.
insertTNfcSetting
(
tNfcSetting
);
}
/**
* 修改setting
*
* @param tNfcSetting setting
* @return 结果
*/
@Override
@Transactional
public
int
updateTNfcSetting
(
TNfcSetting
tNfcSetting
)
{
if
(
tNfcSetting
.
getNfcNum
()==
null
||
tNfcSetting
.
getNfcNum
().
equals
(
""
)){
int
a
=
tNfcSettingMapper
.
updateTNfcSetting
(
tNfcSetting
);
return
a
;
}
TNfcSetting
ts
=
tNfcSettingMapper
.
getInfoByNfcNum
(
tNfcSetting
.
getNfcNum
());
int
nfcNum
=
tNfcSettingMapper
.
getNfcNum
(
tNfcSetting
.
getNfcNum
());
if
(
nfcNum
!=
0
){
ts
.
setNfcNum
(
""
);
tNfcSettingMapper
.
updateTNfcSetting
(
ts
);
}
int
a
=
tNfcSettingMapper
.
updateTNfcSetting
(
tNfcSetting
);
return
a
;
}
/**
* 批量删除setting
*
* @param nfcIds 需要删除的settingID
* @return 结果
*/
@Override
public
int
deleteTNfcSettingByIds
(
Long
[]
nfcIds
)
{
return
tNfcSettingMapper
.
deleteTNfcSettingByIds
(
nfcIds
);
}
/**
* 删除setting信息
*
* @param nfcId settingID
* @return 结果
*/
@Override
public
int
deleteTNfcSettingById
(
Long
nfcId
)
{
return
tNfcSettingMapper
.
deleteTNfcSettingById
(
nfcId
);
}
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
@Override
public
List
<
TNfcRecord
>
punchClockList
(
TNfcSetting
tNfcSetting
)
{
return
tNfcSettingMapper
.
punchClockList
(
tNfcSetting
);
}
}
danger-manage-system/src/main/resources/mapper/system/TNfcRecordMapper.xml
0 → 100644
View file @
1bbbe91f
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TNfcRecordMapper"
>
<resultMap
type=
"TNfcRecord"
id=
"TNfcRecordResult"
>
<result
property=
"recordId"
column=
"record_id"
/>
<result
property=
"nfcId"
column=
"nfc_id"
/>
<result
property=
"isNormal"
column=
"is_normal"
/>
<result
property=
"picture"
column=
"picture"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createUser"
column=
"create_user"
/>
<result
property=
"userName"
column=
"userName"
/>
<result
property=
"patrolAddress"
column=
"patrol_address"
/>
<result
property=
"patrolComent"
column=
"patrol_coment"
/>
<result
property=
"patrolFrequency"
column=
"patrol_frequency"
/>
</resultMap>
<sql
id=
"selectTNfcRecordVo"
>
select record_id, nfc_id, is_normal, picture, remarks, create_time, create_user from t_nfc_record
</sql>
<select
id=
"selectTNfcRecordList"
parameterType=
"TNfcRecord"
resultMap=
"TNfcRecordResult"
>
SELECT nr.record_id, nr.nfc_id, nr.is_normal, nr.picture, nr.remarks, nr.create_time, nr.create_user,
u.`user_name` AS userName,
ns.`patrol_address` ,ns.`patrol_coment`,ns.`patrol_frequency`
FROM t_nfc_record nr LEFT JOIN t_nfc_setting ns ON ns.`nfc_id` = nr.`nfc_id`
LEFT JOIN sys_user u ON u.user_id = nr.create_user
<where>
<if
test=
"nfcId != null "
>
and nr.nfc_id = #{nfcId}
</if>
<if
test=
"isNormal != null "
>
and nr.is_normal = #{isNormal}
</if>
<if
test=
"picture != null and picture != ''"
>
and nr.picture = #{picture}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and nr.remarks = #{remarks}
</if>
<if
test=
"createUser != null and createUser != ''"
>
and nr.create_user = #{createUser}
</if>
<if
test=
"startTime != null and startTime != ''"
>
and nr.create_time
>
#{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
and nr.create_time
<
#{endTime}
</if>
</where>
order By nr.create_time desc
</select>
<select
id=
"selectTNfcRecordById"
parameterType=
"Long"
resultMap=
"TNfcRecordResult"
>
<include
refid=
"selectTNfcRecordVo"
/>
where record_id = #{recordId}
</select>
<insert
id=
"insertTNfcRecord"
parameterType=
"TNfcRecord"
useGeneratedKeys=
"true"
keyProperty=
"recordId"
>
insert into t_nfc_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nfcId != null"
>
nfc_id,
</if>
<if
test=
"isNormal != null"
>
is_normal,
</if>
<if
test=
"picture != null"
>
picture,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createUser != null"
>
create_user,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nfcId != null"
>
#{nfcId},
</if>
<if
test=
"isNormal != null"
>
#{isNormal},
</if>
<if
test=
"picture != null"
>
#{picture},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createUser != null"
>
#{createUser},
</if>
</trim>
</insert>
<update
id=
"updateTNfcRecord"
parameterType=
"TNfcRecord"
>
update t_nfc_record
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"nfcId != null"
>
nfc_id = #{nfcId},
</if>
<if
test=
"isNormal != null"
>
is_normal = #{isNormal},
</if>
<if
test=
"picture != null"
>
picture = #{picture},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createUser != null"
>
create_user = #{createUser},
</if>
</trim>
where record_id = #{recordId}
</update>
<delete
id=
"deleteTNfcRecordById"
parameterType=
"Long"
>
delete from t_nfc_record where record_id = #{recordId}
</delete>
<delete
id=
"deleteTNfcRecordByIds"
parameterType=
"String"
>
delete from t_nfc_record where record_id in
<foreach
item=
"recordId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{recordId}
</foreach>
</delete>
</mapper>
danger-manage-system/src/main/resources/mapper/system/TNfcSettingMapper.xml
0 → 100644
View file @
1bbbe91f
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TNfcSettingMapper"
>
<resultMap
type=
"TNfcSetting"
id=
"TNfcSettingResult"
>
<result
property=
"nfcId"
column=
"nfc_id"
/>
<result
property=
"patrolSort"
column=
"patrol_sort"
/>
<result
property=
"patrolAddress"
column=
"patrol_address"
/>
<result
property=
"patrolComent"
column=
"patrol_coment"
/>
<result
property=
"patrolFrequency"
column=
"patrol_frequency"
/>
<result
property=
"nfcNum"
column=
"nfc_num"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"region"
column=
"region"
/>
</resultMap>
<sql
id=
"selectTNfcSettingVo"
>
select nfc_id, patrol_sort, patrol_address, patrol_coment, patrol_frequency, nfc_num, create_time,region, is_del from t_nfc_setting
</sql>
<select
id=
"selectTNfcSettingList"
parameterType=
"TNfcSetting"
resultMap=
"TNfcSettingResult"
>
select a.*,b.dict_label as nickName from t_nfc_setting a
left join sys_dict_data b on a.region=b.dict_value
<where>
a.is_del='0' and b.dict_type='t_nfc_region'
<if
test=
"region != null and region != ''"
>
and region = #{region}
</if>
<if
test=
"patrolAddress != null and patrolAddress != ''"
>
and patrol_address = #{patrolAddress}
</if>
<if
test=
"nfcNum != null and nfcNum != ''"
>
and nfc_num = #{nfcNum}
</if>
<if
test=
"applyWorkStartTime!=null and applyWorkStartTime!=''"
>
and a.create_time
>
= #{applyWorkStartTime}
</if>
<if
test=
"applyWorkEndTime!=null and applyWorkEndTime!=''"
>
and a.create_time
<
= #{applyWorkEndTime}
</if>
</where>
order by patrol_sort
</select>
<select
id=
"selectTNfcSettingById"
parameterType=
"Long"
resultMap=
"TNfcSettingResult"
>
<include
refid=
"selectTNfcSettingVo"
/>
where nfc_id = #{nfcId}
</select>
<select
id=
"getInfoByNfcNum"
parameterType=
"java.lang.String"
resultMap=
"TNfcSettingResult"
>
<include
refid=
"selectTNfcSettingVo"
/>
where nfc_num = #{nfcNum}
</select>
<insert
id=
"insertTNfcSetting"
parameterType=
"TNfcSetting"
useGeneratedKeys=
"true"
keyProperty=
"nfcId"
>
insert into t_nfc_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"patrolSort != null"
>
patrol_sort,
</if>
<if
test=
"patrolAddress != null"
>
patrol_address,
</if>
<if
test=
"patrolComent != null"
>
patrol_coment,
</if>
<if
test=
"patrolFrequency != null"
>
patrol_frequency,
</if>
<if
test=
"nfcNum != null"
>
nfc_num,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"region != null"
>
region,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"patrolSort != null"
>
#{patrolSort},
</if>
<if
test=
"patrolAddress != null"
>
#{patrolAddress},
</if>
<if
test=
"patrolComent != null"
>
#{patrolComent},
</if>
<if
test=
"patrolFrequency != null"
>
#{patrolFrequency},
</if>
<if
test=
"nfcNum != null"
>
#{nfcNum},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"region != null"
>
#{region},
</if>
</trim>
</insert>
<update
id=
"updateTNfcSetting"
parameterType=
"TNfcSetting"
>
update t_nfc_setting
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"patrolSort != null"
>
patrol_sort = #{patrolSort},
</if>
<if
test=
"patrolAddress != null"
>
patrol_address = #{patrolAddress},
</if>
<if
test=
"patrolComent != null"
>
patrol_coment = #{patrolComent},
</if>
<if
test=
"patrolFrequency != null"
>
patrol_frequency = #{patrolFrequency},
</if>
<if
test=
"nfcNum != null"
>
nfc_num = #{nfcNum},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
</trim>
where nfc_id = #{nfcId}
</update>
<delete
id=
"deleteTNfcSettingById"
parameterType=
"Long"
>
delete from t_nfc_setting where nfc_id = #{nfcId}
</delete>
<update
id=
"deleteTNfcSettingByIds"
parameterType=
"String"
>
update t_nfc_setting set is_del='1' where nfc_id in
<foreach
item=
"nfcId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{nfcId}
</foreach>
</update>
<!--巡检打卡查询列表-->
<select
id=
"punchClockList"
resultType=
"com.zehong.system.domain.TNfcRecord"
>
select a.is_normal as isNormal,a.remarks as remarks ,a.create_time as createTime,
b.patrol_address as patrolAddress,b.patrol_coment as patrolComent,b.patrol_frequency as patrolFrequency,
c.nick_name as nickName,
d.dict_label as dictLabel
from t_nfc_record a left join t_nfc_setting b on a.nfc_id=b.nfc_id
left join sys_user c on a.create_user=c.user_id
left join sys_dict_data d on b.region=d.dict_value
<where>
b.is_del='0' and d.dict_type='t_nfc_region'
<if
test=
"patrolAddress != null and patrolName != ''"
>
and b.patrol_address like concat('%', #{patrolAddress}, '%')
</if>
<if
test=
"region != null and region != ''"
>
and b.region=#{region}
</if>
<if
test=
"applyWorkStartTime!=null and applyWorkStartTime!=''"
>
and a.create_time
>
= #{applyWorkStartTime}
</if>
<if
test=
"applyWorkEndTime!=null and applyWorkEndTime!=''"
>
and a.create_time
<
= #{applyWorkEndTime}
</if>
</where>
group by a.create_time desc
</select>
<!--查询nfc编号是否已经注册-->
<select
id=
"getNfcNum"
resultType=
"java.lang.Integer"
>
select count(nfc_id) from t_nfc_setting where nfc_num=#{nfcNum}
</select>
</mapper>
danger-manage-web/src/api/system/statistics.js
0 → 100644
View file @
1bbbe91f
import
request
from
'@/utils/request'
// 查询setting列表
export
function
listSetting
(
query
)
{
return
request
({
url
:
'/system/inspection/punchClockList'
,
method
:
'get'
,
params
:
query
})
}
// 查询setting详细
export
function
getSetting
(
nfcId
)
{
return
request
({
url
:
'/system/inspection/'
+
nfcId
,
method
:
'get'
})
}
// 新增setting
export
function
addSetting
(
data
)
{
return
request
({
url
:
'/system/inspection'
,
method
:
'post'
,
data
:
data
})
}
// 修改setting
export
function
updateSetting
(
data
)
{
return
request
({
url
:
'/system/inspection'
,
method
:
'put'
,
data
:
data
})
}
// 删除setting
export
function
delSetting
(
nfcId
)
{
return
request
({
url
:
'/system/inspection/'
+
nfcId
,
method
:
'delete'
})
}
// 导出setting
export
function
exportSetting
(
query
)
{
return
request
({
url
:
'/system/inspection/export'
,
method
:
'get'
,
params
:
query
})
}
//
export
function
exportPunchClockList
(
query
)
{
return
request
({
url
:
'/system/inspection/exportPunchClockList'
,
method
:
'get'
,
params
:
query
})
}
danger-manage-web/src/api/system/tnfcSetting.js
0 → 100644
View file @
1bbbe91f
import
request
from
'@/utils/request'
// 查询setting列表
export
function
listSetting
(
query
)
{
return
request
({
url
:
'/system/inspection/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询setting详细
export
function
getSetting
(
nfcId
)
{
return
request
({
url
:
'/system/inspection/'
+
nfcId
,
method
:
'get'
})
}
// 新增setting
export
function
addSetting
(
data
)
{
return
request
({
url
:
'/system/inspection'
,
method
:
'post'
,
data
:
data
})
}
// 修改setting
export
function
updateSetting
(
data
)
{
return
request
({
url
:
'/system/inspection'
,
method
:
'put'
,
data
:
data
})
}
// 删除setting
export
function
delSetting
(
nfcId
)
{
return
request
({
url
:
'/system/inspection/'
+
nfcId
,
method
:
'delete'
})
}
// 导出setting
export
function
exportSetting
(
query
)
{
return
request
({
url
:
'/system/inspection/export'
,
method
:
'get'
,
params
:
query
})
}
danger-manage-web/src/assets/img/biguser.png
0 → 100644
View file @
1bbbe91f
2.04 KB
danger-manage-web/src/views/entrance/index.vue
View file @
1bbbe91f
...
...
@@ -21,7 +21,7 @@
<img
src=
"../../assets/img/11.png"
alt=
""
>
</div>
<div
class=
"ru-in-r"
>
<span>
入
场
</span>
<span>
出
场
</span>
<div
style=
"color: #f95f5f;"
>
0
</div>
</div>
</div>
...
...
@@ -29,14 +29,49 @@
<div
class=
"ru-in-l"
>
<img
src=
"../../assets/img/user.png"
alt=
""
>
</div>
<div
class=
"ru-in-r"
>
<span>
在场
</span>
<div
style=
"color: #3a65ed"
>
0
</div>
</div>
</div>
</div>
</div>
<div
class=
"ent-l ent"
>
<span>
车辆出入
</span>
<div
class=
"ent-div"
></div>
<div
class=
"ent-ruchang"
>
<div
class=
"ent-ru-in"
>
<div
class=
"ru-in-l"
>
<img
src=
"../../assets/img/Group 1.png"
alt=
""
>
</div>
<div
class=
"ru-in-r"
>
<span>
入场
</span>
<div
style=
"color: #0fb980;"
>
0
</div>
</div>
</div>
<div
class=
"ent-ru-in"
>
<div
class=
"ru-in-l"
>
<img
src=
"../../assets/img/Gr.png"
alt=
""
>
</div>
<div
class=
"ru-in-r"
>
<span>
出场
</span>
<div
style=
"color: #f95f5f;"
>
0
</div>
</div>
</div>
<div
class=
"ent-ru-in"
>
<div
class=
"ru-in-l"
>
<img
src=
"../../assets/img/Group.png"
alt=
""
>
</div>
<div
class=
"ru-in-r"
>
<span>
在场
</span>
<div
style=
"color: #3a65ed"
>
0
</div>
</div>
</div>
</div>
</div>
<div
class=
"ent-r ent"
>
<!--
<div
class=
"ent-r ent"
>
<span>
车辆出入
</span>
<div
class=
"ent-div"
></div>
<div
class=
"ent-r-car"
>
...
...
@@ -56,27 +91,65 @@
<p
style=
"color: rgb(54 98 236);"
>
0
</p>
</div>
</div>
</div>
-->
</div>
<div
class=
"entrance-l-a"
>
<div
class=
"ent-b-car1"
>
<span>
人员入场
</span>
<div
class=
"ent-div"
></div>
<div
class=
"ent-b-in"
>
<div
class=
"a-in1"
>
<img
src=
"../../assets/img/biguser.png"
alt=
""
>
</div>
<div
class=
"a-in2"
>
<div>
人员姓名:
<span></span>
</div>
<div>
员工ID:
<span></span>
</div>
<div>
入场时间:
<span></span>
</div>
</div>
</div>
</div>
<div
class=
"ent-b-car1"
>
<div
class=
"a-car-out"
>
<div>
人员出场
</div>
<div
style=
"color: #c5c6c7;font-size: 14px;"
>
出入记录
</div>
</div>
<div
class=
"ent-div"
></div>
<div
class=
"ent-b-in"
>
<div
class=
"a-in1"
>
<img
src=
"../../assets/img/biguser.png"
alt=
""
>
</div>
<div
class=
"a-in2"
>
<div>
人员姓名:
<span></span>
</div>
<div>
员工ID:
<span></span>
</div>
<div>
出场时间:
<span></span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"entrance-l-b"
>
<div
class=
"ent-b-car1"
>
<span>
车辆
进
场
</span>
<span>
车辆
入
场
</span>
<div
class=
"ent-div"
></div>
<div
class=
"ent-b-in"
>
<img
src=
"../../assets/img/car.png"
alt=
""
>
<div>
车辆类型:
<span></span>
</div>
<div>
车辆
好
牌:
<span></span>
</div>
<div>
进
场时间:
<span></span>
</div>
<div>
车辆
号
牌:
<span></span>
</div>
<div>
入
场时间:
<span></span>
</div>
</div>
</div>
<div
class=
"ent-b-car1"
>
<span>
车辆出场
</span>
<div
class=
"a-car-out"
>
<div>
车辆出场
</div>
<div
style=
"color: #c5c6c7;font-size: 14px;"
>
出入记录
</div>
</div>
<div
class=
"ent-div"
></div>
<div
class=
"ent-b-in"
>
<img
src=
"../../assets/img/car.png"
alt=
""
>
<div>
车辆类型:
<span></span>
</div>
<div>
车辆
好
牌:
<span></span>
</div>
<div>
进
场时间:
<span></span>
</div>
<div>
车辆
号
牌:
<span></span>
</div>
<div>
入
场时间:
<span></span>
</div>
</div>
</div>
</div>
...
...
@@ -99,7 +172,7 @@
</el-table-column>
<el-table-column
prop=
"address"
label=
"
进
场时间"
label=
"
入
场时间"
width=
"200"
>
</el-table-column>
</el-table>
...
...
@@ -155,7 +228,7 @@
/* padding: 20px; */
.entrance-l-t
{
width
:
100%
;
height
:
49
%
;
height
:
20
%
;
display
:
flex
;
justify-content
:
space-between
;
.ent
{
...
...
@@ -169,27 +242,34 @@
.ent-ruchang
{
width
:
100%
;
height
:
100%
;
padding
:
30px
;
padding-top
:
10px
;
display
:
flex
;
justify-content
:
space-between
;
.ent-ru-in
{
width
:
100%
;
height
:
30%
;
display
:
flex
;
margin-top
:
4%
;
.ru-in-l
{
width
:
7
0px
;
height
:
7
0px
;
width
:
5
0px
;
height
:
5
0px
;
border-radius
:
50px
;
background
:
rgb
(
247
,
247
,
247
);
line-height
:
80
px
;
line-height
:
55
px
;
text-align
:
center
;
margin-top
:
10px
;
img
{
width
:
35%
;
}
}
.ru-in-r
{
padding
:
7px
0
0
10px
;
span
{
font-size
:
15px
;
}
div
{
font-size
:
30
px
;
font-size
:
25
px
;
margin-top
:
7px
;
}
}
...
...
@@ -220,6 +300,60 @@
}
}
}
.entrance-l-a
{
width
:
100%
;
height
:
27%
;
margin-top
:
2%
;
border-radius
:
7px
;
background
:
#fff
;
display
:
flex
;
justify-content
:
space-between
;
.ent-b-car1
{
width
:
47%
;
height
:
90%
;
padding
:
20px
;
.a-car-out
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
}
.ent-b-in
{
padding
:
7%
20px
20px
20px
;
display
:
flex
;
justify-content
:
space-between
;
width
:
100%
;
height
:
100%
;
.a-in1
{
width
:
30%
;
height
:
100%
;
img
{
width
:
100%
;
}
}
.a-in2
{
width
:
65%
;
height
:
90%
;
display
:
flex
;
flex-direction
:column
;
align-content
:
flex-end
;
div
{
font-size
:
15px
;
span
{
color
:
#a39e9e
;
}
}
div
:nth-child
(
2
)
{
margin-top
:
35px
;
}
div
:last-child
{
margin-top
:
35px
;
}
}
}
}
}
.entrance-l-b
{
width
:
100%
;
height
:
49%
;
...
...
@@ -232,6 +366,11 @@
width
:
47%
;
height
:
90%
;
padding
:
20px
;
.a-car-out
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
}
.ent-b-in
{
padding
:
30px
20px
;
img
{
...
...
danger-manage-web/src/views/system/statistics/index.vue
0 → 100644
View file @
1bbbe91f
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"巡检地点"
prop=
"patrolAddress"
>
<el-input
v-model=
"queryParams.patrolAddress"
placeholder=
"请输入巡检地点"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"巡检区域"
prop=
"workType"
>
<el-select
v-model=
"queryParams.region"
placeholder=
"请选择区域"
clearable
size=
"small"
>
<el-option
v-for=
"dict in workTypeOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"开始时间"
prop=
"applyWorkStartTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.applyWorkStartTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"applyWorkEndTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.applyWorkEndTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['system:setting:add']"-->
<!-- >新增
</el-button>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:setting:edit']"-->
<!-- >修改
</el-button>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:setting:remove']"-->
<!-- >删除
</el-button>
-->
<!--
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
v-hasPermi=
"['system:setting:export']"
>
导出
</el-button>
</el-col>
<!--
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
-->
</el-row>
<el-table
v-loading=
"loading"
:data=
"settingList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
width=
"250"
label=
"巡检地点"
align=
"center"
prop=
"patrolAddress"
/>
<el-table-column
width=
"200"
label=
"巡检区域"
align=
"center"
prop=
"dictLabel"
/>
<el-table-column
width=
"600"
label=
"巡检内容"
align=
"center"
prop=
"patrolComent"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.patrolComent"
>
{{
scope
.
row
.
patrolComent
}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<el-table-column
label=
"巡检频次"
align=
"center"
prop=
"patrolFrequency"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.patrolFrequency"
>
{{
scope
.
row
.
patrolFrequency
}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<el-table-column
width=
"120"
label=
"上报人"
align=
"center"
prop=
"nickName"
/>
<el-table-column
width=
"100"
label=
"巡检结果"
align=
"center"
prop=
"isNormal"
>
<span
slot-scope=
"scope"
style=
"color: red"
v-if=
"scope.row.isNormal==0"
>
异常
</span>
<span
slot-scope=
"scope"
v-else-if=
"scope.row.isNormal==1"
>
正常
</span>
</el-table-column>
<el-table-column
label=
"上报时间"
align=
"center"
prop=
"createTime"
width=
"150"
/>
<!--
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:setting:edit']"-->
<!-- >修改
</el-button>
-->
<!--
<el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:setting:remove']"-->
<!-- >删除
</el-button>
-->
<!--
</
template
>
-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改setting对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"排序"
prop=
"patrolSort"
>
<el-input
v-model=
"form.patrolSort"
placeholder=
"请输入排序"
/>
</el-form-item>
<el-form-item
label=
"巡检地点"
prop=
"patrolAddress"
>
<el-input
v-model=
"form.patrolAddress"
placeholder=
"请输入巡检地点"
/>
</el-form-item>
<el-form-item
label=
"巡检频次"
prop=
"patrolFrequency"
>
<el-input
v-model=
"form.patrolFrequency"
placeholder=
"请输入巡检频次"
/>
</el-form-item>
<el-form-item
label=
"nfc编号"
prop=
"nfcNum"
>
<el-input
v-model=
"form.nfcNum"
placeholder=
"请输入nfc编号"
/>
</el-form-item>
<el-form-item
label=
"巡检内容"
prop=
"patrolComent"
>
<el-input
v-model=
"form.patrolComent"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listSetting
,
getSetting
,
delSetting
,
addSetting
,
updateSetting
,
exportPunchClockList
}
from
"@/api/system/statistics.js"
;
export
default
{
name
:
"Setting"
,
components
:
{
},
data
()
{
return
{
region
:
null
,
activeName
:
'0'
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// setting表格数据
settingList
:
[],
//查询下拉框数据
workTypeOptions
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
patrolAddress
:
null
,
nfcNum
:
null
,
region
:
null
,
applyWorkStartTime
:
null
,
applyWorkEndTime
:
null
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
patrolAddress
:
[
{
required
:
true
,
message
:
"巡检地点不能为空"
,
trigger
:
"blur"
}
],
patrolSort
:
[
{
required
:
true
,
message
:
"排序不能为空"
,
trigger
:
"blur"
}
],
}
};
},
created
()
{
this
.
getList
();
this
.
getDicts
(
"t_nfc_region"
).
then
(
response
=>
{
this
.
workTypeOptions
=
response
.
data
;
});
},
methods
:
{
/** 查询setting列表 */
getList
()
{
this
.
loading
=
true
;
listSetting
(
this
.
queryParams
).
then
(
response
=>
{
this
.
settingList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
nfcId
:
null
,
patrolSort
:
null
,
patrolAddress
:
null
,
patrolComent
:
null
,
patrolFrequency
:
null
,
nfcNum
:
null
,
createTime
:
null
,
isDel
:
null
,
region
:
null
,
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
nfcId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"化工车间巡检"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
nfcId
=
row
.
nfcId
||
this
.
ids
getSetting
(
nfcId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改化工车间巡检信息"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
nfcId
!=
null
)
{
updateSetting
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
this
.
form
.
region
=
this
.
queryParams
.
region
;
addSetting
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
nfcIds
=
row
.
nfcId
||
this
.
ids
;
const
patrolAddress
=
row
.
patrolAddress
;
this
.
$confirm
(
'是否确认删除巡检地点为"'
+
patrolAddress
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delSetting
(
nfcIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有巡检数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportPunchClockList
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
danger-manage-web/src/views/system/tNfcSetting/index.vue
0 → 100644
View file @
1bbbe91f
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"巡检地点"
prop=
"patrolAddress"
>
<el-input
v-model=
"queryParams.patrolAddress"
placeholder=
"请输入巡检地点"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"nfc编号"
prop=
"nfcNum"
>
<el-input
v-model=
"queryParams.nfcNum"
placeholder=
"请输入nfc编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"巡检区域"
>
<el-select
v-model=
"queryParams.region"
placeholder=
"请选择区域"
clearable
size=
"small"
>
<el-option
v-for=
"dict in workTypeOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<!--
<el-form-item
label=
"开始时间"
prop=
"applyWorkStartTime"
>
-->
<!--
<el-date-picker
clearable
size=
"small"
--
>
<!-- v-model="queryParams.applyWorkStartTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择开始时间">-->
<!--
</el-date-picker>
-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"结束时间"
prop=
"applyWorkEndTime"
>
-->
<!--
<el-date-picker
clearable
size=
"small"
--
>
<!-- v-model="queryParams.applyWorkEndTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择结束时间">-->
<!--
</el-date-picker>
-->
<!--
</el-form-item>
-->
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:setting:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:setting:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:setting:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
v-hasPermi=
"['system:setting:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"settingList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"排序"
width=
"60"
align=
"center"
prop=
"patrolSort"
/>
<el-table-column
label=
"巡检区域"
width=
"150"
align=
"center"
prop=
"nickName"
/>
<el-table-column
label=
"巡检地点"
width=
"200"
align=
"center"
prop=
"patrolAddress"
/>
<el-table-column
label=
"巡检内容"
width=
"750"
align=
"center"
prop=
"patrolComent"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.patrolComent"
>
{{
scope
.
row
.
patrolComent
}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<el-table-column
label=
"巡检频次"
width=
"150"
align=
"center"
prop=
"patrolFrequency"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.patrolFrequency"
>
{{
scope
.
row
.
patrolFrequency
}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<el-table-column
label=
"nfc编号"
align=
"center"
prop=
"nfcNum"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.nfcNum"
>
{{
scope
.
row
.
nfcNum
}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<!--
<el-table-column
label=
"创建时间"
width=
"170"
align=
"center"
prop=
"createTime"
/>
-->
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:setting:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:setting:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改setting对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"700px"
style=
"height: 150%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"排序"
prop=
"patrolSort"
>
<el-input
v-model=
"form.patrolSort"
placeholder=
"请输入排序"
/>
</el-form-item>
<el-form-item
label=
"巡检区域"
prop=
"region"
>
<el-select
v-model=
"form.region"
style=
"width: 100%"
placeholder=
"请选择区域"
clearable
size=
"small"
>
<el-option
v-for=
"dict in workTypeOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"巡检地点"
prop=
"patrolAddress"
>
<el-input
v-model=
"form.patrolAddress"
placeholder=
"请输入巡检地点"
/>
</el-form-item>
<el-form-item
label=
"巡检频次"
prop=
"patrolFrequency"
>
<el-input
v-model=
"form.patrolFrequency"
placeholder=
"请输入巡检频次"
/>
</el-form-item>
<el-form-item
label=
"nfc编号"
prop=
"nfcNum"
>
<el-input
v-model=
"form.nfcNum"
placeholder=
"请输入nfc编号"
/>
</el-form-item>
<el-form-item
label=
"巡检内容"
prop=
"patrolComent"
>
<el-input
v-model=
"form.patrolComent"
:autosize=
"{ minRows: 9, maxRows: 14}"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listSetting
,
getSetting
,
delSetting
,
addSetting
,
updateSetting
,
exportSetting
}
from
"@/api/system/tnfcSetting"
;
export
default
{
name
:
"Setting"
,
components
:
{
},
data
()
{
return
{
//查询下拉框数据
workTypeOptions
:
[],
activeName
:
'0'
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// setting表格数据
settingList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
patrolAddress
:
null
,
nfcNum
:
null
,
region
:
null
,
applyWorkStartTime
:
null
,
applyWorkEndTime
:
null
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
patrolAddress
:
[
{
required
:
true
,
message
:
"巡检地点不能为空"
,
trigger
:
"blur"
}
],
patrolSort
:
[
{
required
:
true
,
message
:
"排序不能为空"
,
trigger
:
"blur"
}
],
region
:[
{
required
:
true
,
message
:
"请选择巡检区域"
,
trigger
:
"blur"
}
],
}
};
},
created
()
{
this
.
getList
();
this
.
getDicts
(
"t_nfc_region"
).
then
(
response
=>
{
this
.
workTypeOptions
=
response
.
data
;
});
},
methods
:
{
/** 查询setting列表 */
getList
()
{
this
.
loading
=
true
;
listSetting
(
this
.
queryParams
).
then
(
response
=>
{
this
.
settingList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
nfcId
:
null
,
patrolSort
:
null
,
patrolAddress
:
null
,
patrolComent
:
null
,
patrolFrequency
:
null
,
nfcNum
:
null
,
createTime
:
null
,
isDel
:
null
,
region
:
null
,
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
nfcId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"化工车间巡检"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
nfcId
=
row
.
nfcId
||
this
.
ids
getSetting
(
nfcId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改化工车间巡检信息"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
nfcId
!=
null
)
{
updateSetting
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addSetting
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
nfcIds
=
row
.
nfcId
||
this
.
ids
;
const
patrolAddress
=
row
.
patrolAddress
;
this
.
$confirm
(
'是否确认删除巡检地点为"'
+
patrolAddress
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delSetting
(
nfcIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有巡检数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportSetting
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
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