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
d4d3b9f3
Commit
d4d3b9f3
authored
Jul 20, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/gengdidi/gassafety
parents
bbcb5415
d8c0b241
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
260 additions
and
9 deletions
+260
-9
TWorkOrderController.java
...zehong/web/controller/workOrder/TWorkOrderController.java
+4
-3
WorkOrderVo.java
...rc/main/java/com/zehong/system/domain/vo/WorkOrderVo.java
+192
-0
ITWorkOrderService.java
...in/java/com/zehong/system/service/ITWorkOrderService.java
+3
-2
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+61
-4
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/workOrder/TWorkOrderController.java
View file @
d4d3b9f3
...
...
@@ -3,6 +3,7 @@ package com.zehong.web.controller.workOrder;
import
java.util.List
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -43,7 +44,7 @@ public class TWorkOrderController extends BaseController
public
TableDataInfo
list
(
TWorkOrder
tWorkOrder
)
{
startPage
();
List
<
TWorkOrder
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
List
<
WorkOrderVo
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
return
getDataTable
(
list
);
}
...
...
@@ -55,8 +56,8 @@ public class TWorkOrderController extends BaseController
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TWorkOrder
tWorkOrder
)
{
List
<
TWorkOrder
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
ExcelUtil
<
TWorkOrder
>
util
=
new
ExcelUtil
<
TWorkOrder
>(
TWorkOrder
.
class
);
List
<
WorkOrderVo
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
ExcelUtil
<
WorkOrderVo
>
util
=
new
ExcelUtil
<
WorkOrderVo
>(
WorkOrderVo
.
class
);
return
util
.
exportExcel
(
list
,
"工单基础信息数据"
);
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/WorkOrderVo.java
0 → 100644
View file @
d4d3b9f3
package
com
.
zehong
.
system
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
/**
* 工单基础信息对象 t_work_order
*
* @author zehong
* @date 2021-07-19
*/
public
class
WorkOrderVo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 工单id */
private
String
orderId
;
/** 工单类型(1巡检信息,2隐患信息,3报警信息) */
@Excel
(
name
=
"工单类型"
,
readConverterExp
=
"1=巡检信息,2隐患信息,3报警信息"
)
private
String
orderType
;
/** 源id */
@Excel
(
name
=
"源id"
)
private
Long
resourceId
;
/** 工单名称 */
@Excel
(
name
=
"工单名称"
)
private
String
orderName
;
/** 工单状态(0未下发,1已下发,2已接受,3进行中,4已反馈,5已归档) */
@Excel
(
name
=
"工单状态"
,
readConverterExp
=
"0未下发,1已下发,2已接受,3进行中,4已反馈,5已归档"
)
private
String
orderStatus
;
/** 指定执行人员(巡检员id) */
private
Long
appointInspector
;
/** 指定执行人员姓名 */
@Excel
(
name
=
"指定执行人员"
)
private
String
appointInspectorName
;
/** 下发时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"下发时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
allotTime
;
/** 实际接收人员(巡检员id) */
private
Long
actualInspector
;
/** 实际接收人员姓名 */
@Excel
(
name
=
"实际接收人员"
)
private
String
actualInspectorName
;
/** 实际接收时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"实际接收时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
actualTime
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setOrderType
(
String
orderType
)
{
this
.
orderType
=
orderType
;
}
public
String
getOrderType
()
{
return
orderType
;
}
public
Long
getResourceId
()
{
return
resourceId
;
}
public
void
setResourceId
(
Long
resourceId
)
{
this
.
resourceId
=
resourceId
;
}
public
void
setOrderName
(
String
orderName
)
{
this
.
orderName
=
orderName
;
}
public
String
getOrderName
()
{
return
orderName
;
}
public
void
setOrderStatus
(
String
orderStatus
)
{
this
.
orderStatus
=
orderStatus
;
}
public
String
getOrderStatus
()
{
return
orderStatus
;
}
public
void
setAppointInspector
(
Long
appointInspector
)
{
this
.
appointInspector
=
appointInspector
;
}
public
Long
getAppointInspector
()
{
return
appointInspector
;
}
public
void
setAllotTime
(
Date
allotTime
)
{
this
.
allotTime
=
allotTime
;
}
public
Date
getAllotTime
()
{
return
allotTime
;
}
public
void
setActualInspector
(
Long
actualInspector
)
{
this
.
actualInspector
=
actualInspector
;
}
public
Long
getActualInspector
()
{
return
actualInspector
;
}
public
void
setActualTime
(
Date
actualTime
)
{
this
.
actualTime
=
actualTime
;
}
public
Date
getActualTime
()
{
return
actualTime
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
String
getAppointInspectorName
()
{
return
appointInspectorName
;
}
public
void
setAppointInspectorName
(
String
appointInspectorName
)
{
this
.
appointInspectorName
=
appointInspectorName
;
}
public
String
getActualInspectorName
()
{
return
actualInspectorName
;
}
public
void
setActualInspectorName
(
String
actualInspectorName
)
{
this
.
actualInspectorName
=
actualInspectorName
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"orderId"
,
getOrderId
())
.
append
(
"orderType"
,
getOrderType
())
.
append
(
"orderName"
,
getOrderName
())
.
append
(
"orderStatus"
,
getOrderStatus
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"appointInspector"
,
getAppointInspector
())
.
append
(
"appointInspectorName"
,
getAppointInspectorName
())
.
append
(
"allotTime"
,
getAllotTime
())
.
append
(
"actualInspector"
,
getActualInspector
())
.
append
(
"actualInspectorName"
,
getActualInspectorName
())
.
append
(
"actualTime"
,
getActualTime
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
gassafety-system/src/main/java/com/zehong/system/service/ITWorkOrderService.java
View file @
d4d3b9f3
...
...
@@ -2,6 +2,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
com.zehong.system.domain.TWorkOrder
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
/**
* 工单基础信息Service接口
...
...
@@ -24,7 +25,7 @@ public interface ITWorkOrderService
* @param orderId 工单基础信息ID
* @return 工单基础信息
*/
public
TWorkOrder
selectTWorkOrderById
(
String
orderId
);
public
WorkOrderVo
selectTWorkOrderById
(
String
orderId
);
/**
* 查询工单基础信息列表
...
...
@@ -32,7 +33,7 @@ public interface ITWorkOrderService
* @param tWorkOrder 工单基础信息
* @return 工单基础信息集合
*/
public
List
<
TWorkOrder
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
);
public
List
<
WorkOrderVo
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
);
/**
* 新增工单基础信息
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
d4d3b9f3
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.ExceptionUtil
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
com.zehong.system.mapper.SysUserMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TWorkOrderMapper
;
...
...
@@ -21,6 +27,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{
@Autowired
private
TWorkOrderMapper
tWorkOrderMapper
;
@Autowired
private
SysUserMapper
sysUserMapper
;
/**
* 获取工单基础信息id
...
...
@@ -40,9 +48,35 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 工单基础信息
*/
@Override
public
TWorkOrder
selectTWorkOrderById
(
String
orderId
)
public
WorkOrderVo
selectTWorkOrderById
(
String
orderId
)
{
return
tWorkOrderMapper
.
selectTWorkOrderById
(
orderId
);
WorkOrderVo
workOrderVo
=
new
WorkOrderVo
();
TWorkOrder
tWorkOrder
=
tWorkOrderMapper
.
selectTWorkOrderById
(
orderId
);
BeanUtils
.
copyProperties
(
tWorkOrder
,
workOrderVo
);
// 获取巡检员姓名
SysUser
appointInspector
=
sysUserMapper
.
selectUserById
(
tWorkOrder
.
getAppointInspector
());
workOrderVo
.
setAppointInspectorName
(
appointInspector
.
getNickName
());
if
(
tWorkOrder
.
getActualInspector
()
!=
tWorkOrder
.
getAppointInspector
()
&&
tWorkOrder
.
getActualInspector
()
!=
null
){
SysUser
actualInspector
=
sysUserMapper
.
selectUserById
(
tWorkOrder
.
getActualInspector
());
workOrderVo
.
setActualInspectorName
(
actualInspector
.
getNickName
());
}
else
{
workOrderVo
.
setActualInspectorName
(
appointInspector
.
getNickName
());
}
// 获取源数据(1巡检信息,2隐患信息,3报警信息)
String
orderType
=
tWorkOrder
.
getOrderType
();
if
(
"1"
.
equals
(
orderType
)){
}
else
if
(
"2"
.
equals
(
orderType
))
{
}
else
{
}
return
workOrderVo
;
}
/**
...
...
@@ -52,9 +86,32 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 工单基础信息
*/
@Override
public
List
<
TWorkOrder
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
)
public
List
<
WorkOrderVo
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
)
{
return
tWorkOrderMapper
.
selectTWorkOrderList
(
tWorkOrder
);
List
<
WorkOrderVo
>
workOrderVoList
=
new
ArrayList
<
WorkOrderVo
>();
List
<
TWorkOrder
>
workOrderList
=
tWorkOrderMapper
.
selectTWorkOrderList
(
tWorkOrder
);
if
(
workOrderList
.
size
()
!=
0
){
for
(
TWorkOrder
workOrder
:
workOrderList
){
WorkOrderVo
workOrderVo
=
new
WorkOrderVo
();
BeanUtils
.
copyProperties
(
workOrder
,
workOrderVo
);
// 获取巡检员姓名
SysUser
appointInspector
=
sysUserMapper
.
selectUserById
(
workOrder
.
getAppointInspector
());
workOrderVo
.
setAppointInspectorName
(
appointInspector
.
getNickName
());
if
(
workOrder
.
getActualInspector
()
!=
workOrder
.
getAppointInspector
()
&&
workOrder
.
getActualInspector
()
!=
null
){
SysUser
actualInspector
=
sysUserMapper
.
selectUserById
(
tWorkOrder
.
getActualInspector
());
workOrderVo
.
setActualInspectorName
(
actualInspector
.
getNickName
());
}
else
{
workOrderVo
.
setActualInspectorName
(
appointInspector
.
getNickName
());
}
workOrderVoList
.
add
(
workOrderVo
);
}
}
return
workOrderVoList
;
}
/**
...
...
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