Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
f87b2b09
Commit
f87b2b09
authored
Jul 31, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
值班人员文件还原 gengdidi
parent
ee14ceb8
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
13 additions
and
149 deletions
+13
-149
TInspectionDataController.java
...ontroller/deviceInspection/TInspectionDataController.java
+0
-7
SysUserController.java
...a/com/zehong/web/controller/system/SysUserController.java
+2
-2
SysUserMapper.java
...src/main/java/com/zehong/system/mapper/SysUserMapper.java
+1
-1
TInspectionDataMapper.java
.../java/com/zehong/system/mapper/TInspectionDataMapper.java
+1
-5
ISysUserService.java
.../main/java/com/zehong/system/service/ISysUserService.java
+1
-1
ITInspectionDataService.java
...va/com/zehong/system/service/ITInspectionDataService.java
+0
-6
SysUserServiceImpl.java
...va/com/zehong/system/service/impl/SysUserServiceImpl.java
+2
-2
TInspectionDataServiceImpl.java
...ehong/system/service/impl/TInspectionDataServiceImpl.java
+5
-98
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+1
-4
TInspectionDataMapper.xml
...rc/main/resources/mapper/system/TInspectionDataMapper.xml
+0
-15
inspectionData.js
gassafety-web/src/api/deviceInspection/inspectionData.js
+0
-8
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/deviceInspection/TInspectionDataController.java
View file @
f87b2b09
...
@@ -3,12 +3,10 @@ package com.zehong.web.controller.deviceInspection;
...
@@ -3,12 +3,10 @@ package com.zehong.web.controller.deviceInspection;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.system.domain.TInspectionData
;
import
com.zehong.system.domain.TInspectionData
;
import
com.zehong.system.domain.form.InspectionDataFrom
;
import
com.zehong.system.service.ITInspectionDataService
;
import
com.zehong.system.service.ITInspectionDataService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
@@ -106,9 +104,4 @@ public class TInspectionDataController extends BaseController
...
@@ -106,9 +104,4 @@ public class TInspectionDataController extends BaseController
{
{
return
toAjax
(
tInspectionDataService
.
deleteTInspectionDataByIds
(
dataIds
));
return
toAjax
(
tInspectionDataService
.
deleteTInspectionDataByIds
(
dataIds
));
}
}
@GetMapping
(
"getInspectionDataByInspector"
)
public
AjaxResult
getInspectionDataByInspector
(
InspectionDataFrom
form
)
throws
Exception
{
return
AjaxResult
.
success
(
tInspectionDataService
.
getInspectionDataByInspector
(
form
));
}
}
}
gassafety-admin/src/main/java/com/zehong/web/controller/system/SysUserController.java
View file @
f87b2b09
...
@@ -72,9 +72,9 @@ public class SysUserController extends BaseController
...
@@ -72,9 +72,9 @@ public class SysUserController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:user:inspectorList')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:inspectorList')"
)
@GetMapping
(
"/inspectorList"
)
@GetMapping
(
"/inspectorList"
)
public
AjaxResult
inspectorList
(
SysUser
sysUser
)
public
AjaxResult
inspectorList
()
{
{
List
<
SysUser
>
list
=
userService
.
selectInspectorList
(
sysUser
);
List
<
SysUser
>
list
=
userService
.
selectInspectorList
();
return
AjaxResult
.
success
(
list
);
return
AjaxResult
.
success
(
list
);
}
}
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/SysUserMapper.java
View file @
f87b2b09
...
@@ -25,7 +25,7 @@ public interface SysUserMapper
...
@@ -25,7 +25,7 @@ public interface SysUserMapper
* @param
* @param
* @return 用户信息集合信息
* @return 用户信息集合信息
*/
*/
public
List
<
SysUser
>
selectInspectorList
(
SysUser
sysUser
);
public
List
<
SysUser
>
selectInspectorList
();
/**
/**
* 通过用户名查询用户
* 通过用户名查询用户
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TInspectionDataMapper.java
View file @
f87b2b09
package
com
.
zehong
.
system
.
mapper
;
package
com
.
zehong
.
system
.
mapper
;
import
com.zehong.system.domain.TInspectionData
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.system.domain.TInspectionData
;
/**
/**
* 巡检记录Mapper接口
* 巡检记录Mapper接口
...
@@ -76,6 +74,4 @@ public interface TInspectionDataMapper
...
@@ -76,6 +74,4 @@ public interface TInspectionDataMapper
* @return 结果
* @return 结果
*/
*/
public
int
deleteTInspectionDataByIds
(
int
[]
dataIds
);
public
int
deleteTInspectionDataByIds
(
int
[]
dataIds
);
List
<
TInspectionData
>
selectTInspectionDataListByMap
(
Map
<
String
,
Object
>
map
);
}
}
gassafety-system/src/main/java/com/zehong/system/service/ISysUserService.java
View file @
f87b2b09
...
@@ -24,7 +24,7 @@ public interface ISysUserService
...
@@ -24,7 +24,7 @@ public interface ISysUserService
* @param
* @param
* @return 用户信息集合信息
* @return 用户信息集合信息
*/
*/
public
List
<
SysUser
>
selectInspectorList
(
SysUser
sysUser
);
public
List
<
SysUser
>
selectInspectorList
();
/**
/**
* 通过用户名查询用户
* 通过用户名查询用户
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITInspectionDataService.java
View file @
f87b2b09
package
com
.
zehong
.
system
.
service
;
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.system.domain.TInspectionData
;
import
com.zehong.system.domain.TInspectionData
;
import
com.zehong.system.domain.form.InspectionDataFrom
;
import
com.zehong.system.domain.vo.InspectionDataVo
;
/**
/**
* 巡检记录Service接口
* 巡检记录Service接口
...
@@ -62,6 +58,4 @@ public interface ITInspectionDataService
...
@@ -62,6 +58,4 @@ public interface ITInspectionDataService
* @return 结果
* @return 结果
*/
*/
public
int
deleteTInspectionDataById
(
int
dataId
);
public
int
deleteTInspectionDataById
(
int
dataId
);
List
<
InspectionDataVo
>
getInspectionDataByInspector
(
InspectionDataFrom
form
)
throws
Exception
;
}
}
gassafety-system/src/main/java/com/zehong/system/service/impl/SysUserServiceImpl.java
View file @
f87b2b09
...
@@ -73,9 +73,9 @@ public class SysUserServiceImpl implements ISysUserService
...
@@ -73,9 +73,9 @@ public class SysUserServiceImpl implements ISysUserService
* @return 用户信息集合信息
* @return 用户信息集合信息
*/
*/
@Override
@Override
public
List
<
SysUser
>
selectInspectorList
(
SysUser
sysUser
)
public
List
<
SysUser
>
selectInspectorList
()
{
{
return
userMapper
.
selectInspectorList
(
sysUser
);
return
userMapper
.
selectInspectorList
();
}
}
/**
/**
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TInspectionDataServiceImpl.java
View file @
f87b2b09
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TInspectionData
;
import
com.zehong.system.domain.TInspectionPlan
;
import
com.zehong.system.domain.form.InspectionDataFrom
;
import
com.zehong.system.domain.form.TWorkOrderForm
;
import
com.zehong.system.domain.vo.InspectionDataVo
;
import
com.zehong.system.domain.vo.TInspectionDataVo
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TInspectionDataMapper
;
import
com.zehong.system.service.ISysUserService
;
import
com.zehong.system.service.ITInspectionDataService
;
import
com.zehong.system.service.ITInspectionPlanService
;
import
com.zehong.system.service.ITWorkOrderService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TInspectionDataMapper
;
import
javax.annotation.Resource
;
import
com.zehong.system.domain.TInspectionData
;
import
java.util.ArrayList
;
import
com.zehong.system.service.ITInspectionDataService
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 巡检记录Service业务层处理
* 巡检记录Service业务层处理
...
@@ -36,20 +17,8 @@ import java.util.Map;
...
@@ -36,20 +17,8 @@ import java.util.Map;
@Service
@Service
public
class
TInspectionDataServiceImpl
implements
ITInspectionDataService
public
class
TInspectionDataServiceImpl
implements
ITInspectionDataService
{
{
@Resource
private
TInspectionDataMapper
tInspectionDataMapper
;
@Autowired
private
ISysUserService
userService
;
@Autowired
private
ITWorkOrderService
itWorkOrderService
;
@Autowired
@Autowired
private
ITInspectionPlanService
itInspectionPlanService
;
private
TInspectionDataMapper
tInspectionDataMapper
;
@Resource
private
TDeviceInfoMapper
tDeviceInfoMapper
;
/**
/**
* 查询巡检记录
* 查询巡检记录
...
@@ -124,66 +93,4 @@ public class TInspectionDataServiceImpl implements ITInspectionDataService
...
@@ -124,66 +93,4 @@ public class TInspectionDataServiceImpl implements ITInspectionDataService
{
{
return
tInspectionDataMapper
.
deleteTInspectionDataById
(
dataId
);
return
tInspectionDataMapper
.
deleteTInspectionDataById
(
dataId
);
}
}
/**
* 获取值班人员巡检路线
*/
@Override
public
List
<
InspectionDataVo
>
getInspectionDataByInspector
(
InspectionDataFrom
form
)
throws
Exception
{
List
<
InspectionDataVo
>
result
=
new
ArrayList
<>();
if
(
null
==
form
.
getUserId
()){
//获取巡检人员
List
<
SysUser
>
inspectorlist
=
userService
.
selectInspectorList
(
new
SysUser
());
for
(
SysUser
inspector
:
inspectorlist
){
InspectionDataVo
inspectionDataVo
=
new
InspectionDataVo
();
inspectionDataVo
.
setSysUser
(
inspector
);
form
.
setUserId
(
inspector
.
getUserId
());
inspectionDataVo
.
setInspectionDataVo
(
getinspectionDataVo
(
form
));
result
.
add
(
inspectionDataVo
);
}
}
else
{
InspectionDataVo
inspectionDataVo
=
new
InspectionDataVo
();
SysUser
user
=
userService
.
selectUserById
(
form
.
getUserId
());
inspectionDataVo
.
setSysUser
(
user
);
inspectionDataVo
.
setInspectionDataVo
(
getinspectionDataVo
(
form
));
result
.
add
(
inspectionDataVo
);
}
return
result
;
}
private
List
<
TInspectionDataVo
>
getinspectionDataVo
(
InspectionDataFrom
form
)
throws
Exception
{
//获取巡检人员工单
TWorkOrderForm
workOrderForm
=
new
TWorkOrderForm
();
workOrderForm
.
setAppointInspector
(
form
.
getUserId
());
List
<
WorkOrderVo
>
workOrderInfo
=
itWorkOrderService
.
selectTWorkOrderList
(
workOrderForm
);
List
<
TInspectionDataVo
>
inspectionDataVos
=
new
ArrayList
<>();
for
(
WorkOrderVo
workOrder
:
workOrderInfo
){
//获取巡检人员巡检计划
TInspectionPlan
tInspectionPlan
=
new
TInspectionPlan
();
tInspectionPlan
.
setOrderId
(
workOrder
.
getOrderId
());
List
<
TInspectionPlan
>
inspectionPlans
=
itInspectionPlanService
.
selectTInspectionPlanList
(
tInspectionPlan
);
for
(
TInspectionPlan
inspectionPlan
:
inspectionPlans
){
//获取巡检员巡检记录
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"planId"
,
inspectionPlan
.
getPlanId
());
map
.
put
(
"beginTime"
,
form
.
getBeginTime
());
map
.
put
(
"endTime"
,
form
.
getEndTime
());
List
<
TInspectionData
>
inspectionDataList
=
tInspectionDataMapper
.
selectTInspectionDataListByMap
(
map
);
//查询设备信息
for
(
TInspectionData
inspectionData
:
inspectionDataList
){
TInspectionDataVo
tInspectionDataVo
=
new
TInspectionDataVo
();
TDeviceInfo
device
=
tDeviceInfoMapper
.
selectTDeviceInfoByCode
(
inspectionData
.
getDeviceCode
());
BeanUtils
.
copyProperties
(
inspectionData
,
tInspectionDataVo
);
tInspectionDataVo
.
setLatitude
(
device
.
getLatitude
());
tInspectionDataVo
.
setLongitude
(
device
.
getLongitude
());
inspectionDataVos
.
add
(
tInspectionDataVo
);
}
}
}
return
inspectionDataVos
;
}
}
}
gassafety-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
f87b2b09
...
@@ -91,12 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -91,12 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where u.user_id = #{userId}
where u.user_id = #{userId}
</select>
</select>
<select
id=
"selectInspectorList"
parameterType=
"SysUser"
resultMap=
"SysUserResult"
>
<select
id=
"selectInspectorList"
resultMap=
"SysUserResult"
>
<include
refid=
"selectUserVo"
/>
<include
refid=
"selectUserVo"
/>
where u.del_flag = '0' and r.role_key = 'inspector'
where u.del_flag = '0' and r.role_key = 'inspector'
<if
test=
"userId != null and userId != ''"
>
AND u.user_id = 'user_id'
</if>
</select>
</select>
<select
id=
"checkUserNameUnique"
parameterType=
"String"
resultType=
"int"
>
<select
id=
"checkUserNameUnique"
parameterType=
"String"
resultType=
"int"
>
...
...
gassafety-system/src/main/resources/mapper/system/TInspectionDataMapper.xml
View file @
f87b2b09
...
@@ -30,21 +30,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -30,21 +30,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"isHiddenDanger != null and isHiddenDanger != ''"
>
and is_hidden_danger = #{isHiddenDanger}
</if>
<if
test=
"isHiddenDanger != null and isHiddenDanger != ''"
>
and is_hidden_danger = #{isHiddenDanger}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</where>
ORDER BY create_time DESC
</select>
<select
id=
"selectTInspectionDataListByMap"
parameterType=
"java.util.Map"
resultMap=
"TInspectionDataResult"
>
<include
refid=
"selectTInspectionDataVo"
/>
<where>
<if
test=
"planId != null "
>
and plan_id = #{planId}
</if>
<if
test=
"deviceCode != null "
>
and device_code = #{deviceCode}
</if>
<if
test=
"deviceType != null "
>
and device_type = #{deviceType}
</if>
<if
test=
"dealStatus != null and dealStatus != ''"
>
and deal_status = #{dealStatus}
</if>
<if
test=
"isHiddenDanger != null and isHiddenDanger != ''"
>
and is_hidden_danger = #{isHiddenDanger}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
<if
test=
"beginTime != null and endTime !=null"
>
and create_time BETWEEN #{beginTime} and #{endTime}
</if>
</where>
ORDER BY create_time DESC
</select>
</select>
<select
id=
"selectFinishTInspectionData"
parameterType=
"int"
resultType=
"int"
>
<select
id=
"selectFinishTInspectionData"
parameterType=
"int"
resultType=
"int"
>
...
...
gassafety-web/src/api/deviceInspection/inspectionData.js
View file @
f87b2b09
...
@@ -60,11 +60,3 @@ export function exportInspectionData(query) {
...
@@ -60,11 +60,3 @@ export function exportInspectionData(query) {
params
:
query
params
:
query
})
})
}
}
export
function
getInspectionDataByInspector
(
query
)
{
return
request
({
url
:
'/deviceInspection/inspectionData/getInspectionDataByInspector'
,
method
:
'get'
,
params
:
query
})
}
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