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
9a173537
Commit
9a173537
authored
Jul 23, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单详细信息接口
parent
5bd418ce
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
205 additions
and
54 deletions
+205
-54
TWorkOrderController.java
...zehong/web/controller/workOrder/TWorkOrderController.java
+53
-15
WorkOrderVo.java
...rc/main/java/com/zehong/system/domain/vo/WorkOrderVo.java
+54
-8
TOrderFeedbackMapper.java
...n/java/com/zehong/system/mapper/TOrderFeedbackMapper.java
+8
-0
ITWorkOrderService.java
...in/java/com/zehong/system/service/ITWorkOrderService.java
+3
-3
TOrderFeedbackServiceImpl.java
...zehong/system/service/impl/TOrderFeedbackServiceImpl.java
+36
-5
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+32
-10
TDeviceAlarmMapper.xml
...m/src/main/resources/mapper/system/TDeviceAlarmMapper.xml
+1
-1
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+1
-1
TEnterpriseInfoMapper.xml
...rc/main/resources/mapper/system/TEnterpriseInfoMapper.xml
+1
-1
THiddenTroubleMapper.xml
...src/main/resources/mapper/system/THiddenTroubleMapper.xml
+1
-1
TInspectionDataMapper.xml
...rc/main/resources/mapper/system/TInspectionDataMapper.xml
+1
-1
TOrderFeedbackMapper.xml
...src/main/resources/mapper/system/TOrderFeedbackMapper.xml
+8
-2
TPipeMapper.xml
...y-system/src/main/resources/mapper/system/TPipeMapper.xml
+1
-1
TWorkOrderMapper.xml
...tem/src/main/resources/mapper/system/TWorkOrderMapper.xml
+5
-5
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/workOrder/TWorkOrderController.java
View file @
9a173537
...
...
@@ -41,10 +41,16 @@ public class TWorkOrderController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('workOrder:basicsInfo:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TWorkOrder
tWorkOrder
)
public
TableDataInfo
list
(
TWorkOrder
tWorkOrder
)
throws
Exception
{
startPage
();
List
<
WorkOrderVo
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
List
<
WorkOrderVo
>
list
=
null
;
try
{
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
StringUtils
.
format
(
"查询工单基础信息列表失败"
));
}
return
getDataTable
(
list
);
}
...
...
@@ -54,9 +60,15 @@ public class TWorkOrderController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('workOrder:basicsInfo:export')"
)
@Log
(
title
=
"工单基础信息"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TWorkOrder
tWorkOrder
)
public
AjaxResult
export
(
TWorkOrder
tWorkOrder
)
throws
Exception
{
List
<
WorkOrderVo
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
List
<
WorkOrderVo
>
list
=
null
;
try
{
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
StringUtils
.
format
(
"导出工单基础信息列表失败"
));
}
ExcelUtil
<
WorkOrderVo
>
util
=
new
ExcelUtil
<
WorkOrderVo
>(
WorkOrderVo
.
class
);
return
util
.
exportExcel
(
list
,
"工单基础信息数据"
);
}
...
...
@@ -66,9 +78,16 @@ public class TWorkOrderController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('workOrder:basicsInfo:query')"
)
@GetMapping
(
value
=
"/{orderId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"orderId"
)
String
orderId
)
public
AjaxResult
getInfo
(
@PathVariable
(
"orderId"
)
String
orderId
)
throws
Exception
{
return
AjaxResult
.
success
(
tWorkOrderService
.
selectTWorkOrderById
(
orderId
));
WorkOrderVo
workOrderVo
=
new
WorkOrderVo
();
try
{
workOrderVo
=
tWorkOrderService
.
selectTWorkOrderById
(
orderId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
StringUtils
.
format
(
"获取工单({})工详细信息失败"
,
orderId
));
}
return
AjaxResult
.
success
(
workOrderVo
);
}
/**
...
...
@@ -77,9 +96,15 @@ public class TWorkOrderController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('workOrder:basicsInfo:add')"
)
@Log
(
title
=
"工单基础信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TWorkOrder
tWorkOrder
)
public
AjaxResult
add
(
@RequestBody
TWorkOrder
tWorkOrder
)
throws
Exception
{
return
toAjax
(
tWorkOrderService
.
insertTWorkOrder
(
tWorkOrder
));
try
{
tWorkOrderService
.
insertTWorkOrder
(
tWorkOrder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
StringUtils
.
format
(
"工单({})信息有误"
,
tWorkOrder
.
getOrderId
()));
}
return
AjaxResult
.
success
();
}
/**
...
...
@@ -88,15 +113,21 @@ public class TWorkOrderController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('workOrder:basicsInfo:edit')"
)
@Log
(
title
=
"工单基础信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TWorkOrder
tWorkOrder
)
throws
Exception
{
public
AjaxResult
edit
(
@RequestBody
TWorkOrder
tWorkOrder
)
throws
Exception
{
String
orderStatus
=
tWorkOrder
.
getOrderStatus
();
// 工单状态只有是0未下发或1已下发,才允许修改
if
(!
"0"
.
equals
(
orderStatus
)
&&
!
"1"
.
equals
(
orderStatus
)){
throw
new
Exception
(
StringUtils
.
format
(
"工单({})当前状态不允许修改
。
"
,
tWorkOrder
.
getOrderId
()));
throw
new
Exception
(
StringUtils
.
format
(
"工单({})当前状态不允许修改"
,
tWorkOrder
.
getOrderId
()));
}
return
toAjax
(
tWorkOrderService
.
updateTWorkOrder
(
tWorkOrder
));
try
{
tWorkOrderService
.
updateTWorkOrder
(
tWorkOrder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
StringUtils
.
format
(
"修改工单({})信息失败,"
,
tWorkOrder
.
getOrderId
()));
}
return
AjaxResult
.
success
();
}
/**
...
...
@@ -105,11 +136,18 @@ public class TWorkOrderController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('workOrder:basicsInfo:editStatus')"
)
@Log
(
title
=
"工单基础信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/editStatus"
)
public
AjaxResult
editStatus
(
@RequestBody
TWorkOrder
tWorkOrder
)
throws
Exception
{
public
AjaxResult
editStatus
(
@RequestBody
TWorkOrder
tWorkOrder
)
throws
Exception
{
String
orderStatus
=
tWorkOrder
.
getOrderStatus
();
if
(
"5"
.
equals
(
orderStatus
))
{
throw
new
Exception
(
StringUtils
.
format
(
"工单({})已归档,不允许更改状态。"
,
tWorkOrder
.
getOrderId
()));
throw
new
Exception
(
StringUtils
.
format
(
"工单({})已归档,不允许更改状态"
,
tWorkOrder
.
getOrderId
()));
}
try
{
tWorkOrderService
.
updateTWorkOrder
(
tWorkOrder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
StringUtils
.
format
(
"修改工单({})状态失败"
,
tWorkOrder
.
getOrderId
()));
}
return
AjaxResult
.
success
();
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/WorkOrderVo.java
View file @
9a173537
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
com.zehong.system.domain.TDeviceInfo
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* 工单基础信息对象 t_work_order
...
...
@@ -32,7 +33,10 @@ public class WorkOrderVo extends BaseEntity
private
String
orderName
;
/** 设备编号 */
private
String
deviceIds
;
private
String
deviceCodes
;
/** 设备列表 */
private
List
<
TDeviceInfo
>
deviceInfoList
;
/** 设备数量 */
private
int
deviceNum
;
...
...
@@ -78,7 +82,17 @@ public class WorkOrderVo extends BaseEntity
/** 备注 */
private
String
remarks
;
public
void
setOrderId
(
String
orderId
)
/** 反馈内容 */
private
String
contents
;
/** 反馈时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
feedbackTime
;
/** 处理状态 */
private
String
dealStatus
;
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
...
...
@@ -115,12 +129,20 @@ public class WorkOrderVo extends BaseEntity
return
orderName
;
}
public
String
getDevice
Id
s
()
{
return
device
Id
s
;
public
String
getDevice
Code
s
()
{
return
device
Code
s
;
}
public
void
setDeviceIds
(
String
deviceIds
)
{
this
.
deviceIds
=
deviceIds
;
public
void
setDeviceCodes
(
String
deviceCodes
)
{
this
.
deviceCodes
=
deviceCodes
;
}
public
List
<
TDeviceInfo
>
getDeviceInfoList
()
{
return
deviceInfoList
;
}
public
void
setDeviceInfoList
(
List
<
TDeviceInfo
>
deviceInfoList
)
{
this
.
deviceInfoList
=
deviceInfoList
;
}
public
int
getDeviceNum
()
{
...
...
@@ -242,6 +264,30 @@ public class WorkOrderVo extends BaseEntity
this
.
actualInspectorName
=
actualInspectorName
;
}
public
String
getContents
()
{
return
contents
;
}
public
void
setContents
(
String
contents
)
{
this
.
contents
=
contents
;
}
public
Date
getFeedbackTime
()
{
return
feedbackTime
;
}
public
void
setFeedbackTime
(
Date
feedbackTime
)
{
this
.
feedbackTime
=
feedbackTime
;
}
public
String
getDealStatus
()
{
return
dealStatus
;
}
public
void
setDealStatus
(
String
dealStatus
)
{
this
.
dealStatus
=
dealStatus
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
@@ -249,7 +295,7 @@ public class WorkOrderVo extends BaseEntity
.
append
(
"orderType"
,
getOrderType
())
.
append
(
"resourceId"
,
getResourceId
())
.
append
(
"orderName"
,
getOrderName
())
.
append
(
"device
Ids"
,
getDeviceId
s
())
.
append
(
"device
Codes"
,
getDeviceCode
s
())
.
append
(
"deviceNum"
,
getDeviceNum
())
.
append
(
"finishNum"
,
getFinishNum
())
.
append
(
"deviceType"
,
getDeviceType
())
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TOrderFeedbackMapper.java
View file @
9a173537
...
...
@@ -22,6 +22,14 @@ public interface TOrderFeedbackMapper
/**
* 查询工单反馈信息列表
*
* @param orderId 工单信息id
* @return 工单反馈信息集合
*/
public
List
<
TOrderFeedback
>
selectTOrderFeedbackByOrderId
(
String
orderId
);
/**
* 查询工单反馈信息列表
*
* @param tOrderFeedback 工单反馈信息
* @return 工单反馈信息集合
*/
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITWorkOrderService.java
View file @
9a173537
...
...
@@ -19,7 +19,7 @@ public interface ITWorkOrderService
* @param orderId 工单基础信息ID
* @return 工单基础信息
*/
public
WorkOrderVo
selectTWorkOrderById
(
String
orderId
);
public
WorkOrderVo
selectTWorkOrderById
(
String
orderId
)
throws
Exception
;
/**
* 查询工单基础信息列表
...
...
@@ -27,7 +27,7 @@ public interface ITWorkOrderService
* @param tWorkOrder 工单基础信息
* @return 工单基础信息集合
*/
public
List
<
WorkOrderVo
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
);
public
List
<
WorkOrderVo
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
)
throws
Exception
;
/**
* 新增工单基础信息
...
...
@@ -35,7 +35,7 @@ public interface ITWorkOrderService
* @param tWorkOrder 工单基础信息
* @return 结果
*/
public
int
insertTWorkOrder
(
TWorkOrder
tWorkOrder
);
public
int
insertTWorkOrder
(
TWorkOrder
tWorkOrder
)
throws
Exception
;
/**
* 修改工单基础信息
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TOrderFeedbackServiceImpl.java
View file @
9a173537
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.system.domain.*
;
import
com.zehong.system.mapper.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TOrderFeedbackMapper
;
import
com.zehong.system.domain.TOrderFeedback
;
import
com.zehong.system.service.ITOrderFeedbackService
;
/**
...
...
@@ -18,6 +19,14 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
{
@Autowired
private
TOrderFeedbackMapper
tOrderFeedbackMapper
;
@Autowired
private
TWorkOrderMapper
tWorkOrderMapper
;
@Autowired
private
TInspectionDataMapper
tInspectionDataMapper
;
@Autowired
private
THiddenTroubleMapper
tHiddenTroubleMapper
;
@Autowired
private
TDeviceAlarmMapper
tDeviceAlarmMapper
;
/**
* 查询工单反馈信息
...
...
@@ -53,10 +62,32 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
public
int
insertTOrderFeedback
(
TOrderFeedback
tOrderFeedback
)
{
String
deviceCode
=
tOrderFeedback
.
getDeviceCode
();
// 更改巡检记录状态
if
(
deviceCode
!=
null
){
String
dealStatus
=
tOrderFeedback
.
getDealStatus
();
String
dealStatus
=
tOrderFeedback
.
getDealStatus
();
// 根据工单类型和源id修改源数据状态
TWorkOrder
order
=
tWorkOrderMapper
.
selectTWorkOrderById
(
tOrderFeedback
.
getOrderId
());
String
orderType
=
order
.
getOrderType
();
if
(
"1"
.
equals
(
orderType
)){
TInspectionData
data
=
tInspectionDataMapper
.
selectTInspectionDataByCode
(
deviceCode
);
data
.
setDealStatus
(
dealStatus
);
tInspectionDataMapper
.
updateTInspectionData
(
data
);
}
else
if
(
"2"
.
equals
(
orderType
))
{
THiddenTrouble
trouble
=
tHiddenTroubleMapper
.
selectTHiddenTroubleById
(
order
.
getResourceId
());
trouble
.
setDealStatus
(
dealStatus
);
tHiddenTroubleMapper
.
updateTHiddenTrouble
(
trouble
);
}
else
{
TDeviceAlarm
alarm
=
tDeviceAlarmMapper
.
selectTDeviceAlarmById
(
order
.
getResourceId
());
alarm
.
setDealStatus
(
dealStatus
);
tDeviceAlarmMapper
.
updateTDeviceAlarm
(
alarm
);
}
// 如果工单状态是进行中,修改状态为已反馈
if
(
"2"
.
equals
(
order
.
getOrderStatus
())){
order
.
setOrderStatus
(
"3"
);
tWorkOrderMapper
.
updateTWorkOrder
(
order
);
}
return
tOrderFeedbackMapper
.
insertTOrderFeedback
(
tOrderFeedback
);
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
9a173537
...
...
@@ -26,12 +26,14 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
@Autowired
private
TWorkOrderMapper
tWorkOrderMapper
;
@Autowired
private
SysUserMapper
sysUser
Mapper
;
private
TOrderFeedbackMapper
tOrderFeedback
Mapper
;
@Autowired
private
TInspectionDataMapper
tInspectionData
Mapper
;
private
SysUserMapper
sysUser
Mapper
;
@Autowired
private
TInspectionPlanMapper
tInspectionPlanMapper
;
@Autowired
private
TInspectionDataMapper
tInspectionDataMapper
;
@Autowired
private
THiddenTroubleMapper
tHiddenTroubleMapper
;
@Autowired
private
TDeviceAlarmMapper
tDeviceAlarmMapper
;
...
...
@@ -50,7 +52,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 工单基础信息
*/
@Override
public
WorkOrderVo
selectTWorkOrderById
(
String
orderId
)
public
WorkOrderVo
selectTWorkOrderById
(
String
orderId
)
throws
Exception
{
WorkOrderVo
workOrderVo
=
new
WorkOrderVo
();
TWorkOrder
tWorkOrder
=
tWorkOrderMapper
.
selectTWorkOrderById
(
orderId
);
...
...
@@ -74,20 +76,31 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
if
(
"1"
.
equals
(
orderType
)){
TInspectionPlan
plan
=
tInspectionPlanMapper
.
selectTInspectionPlanById
(
resourceId
);
workOrderVo
.
setDevice
Id
s
(
plan
.
getDeviceCodes
());
workOrderVo
.
setDevice
Code
s
(
plan
.
getDeviceCodes
());
TInspectionData
data
=
new
TInspectionData
();
data
.
setPlanId
(
resourceId
);
List
<
TInspectionData
>
totalList
=
tInspectionDataMapper
.
selectTInspectionDataList
(
data
);
workOrderVo
.
setDeviceNum
(
totalList
.
size
());
List
<
TDeviceInfo
>
deviceInfoList
=
new
ArrayList
<>();
TDeviceInfo
deviceInfo
=
null
;
for
(
TInspectionData
temp
:
totalList
){
deviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoByCode
(
temp
.
getDeviceCode
());
if
(
deviceInfo
!=
null
){
deviceInfoList
.
add
(
deviceInfo
);
}
}
int
finish
=
tInspectionDataMapper
.
selectFinishTInspectionData
(
resourceId
);
workOrderVo
.
setFinishNum
(
finish
);
}
else
if
(
"2"
.
equals
(
orderType
)){
THiddenTrouble
trouble
=
tHiddenTroubleMapper
.
selectTHiddenTroubleById
(
resourceId
);
workOrderVo
.
setDevice
Id
s
((
trouble
.
getDeviceCode
()
!=
null
?
trouble
.
getDeviceCode
()
:
null
).
toString
());
workOrderVo
.
setDevice
Code
s
((
trouble
.
getDeviceCode
()
!=
null
?
trouble
.
getDeviceCode
()
:
null
).
toString
());
workOrderVo
.
setLongitude
(
trouble
.
getLongitude
()
!=
null
?
trouble
.
getLongitude
()
:
null
);
workOrderVo
.
setLatitude
(
trouble
.
getLatitude
()
!=
null
?
trouble
.
getLatitude
()
:
null
);
workOrderVo
.
setCoordinates
(
trouble
.
getCoordinates
()
!=
null
?
trouble
.
getCoordinates
()
:
null
);
...
...
@@ -97,7 +110,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
TDeviceAlarm
alarm
=
tDeviceAlarmMapper
.
selectTDeviceAlarmById
(
resourceId
);
String
deviceCode
=
alarm
.
getDeviceCode
();
workOrderVo
.
setDevice
Id
s
(
String
.
valueOf
(
deviceCode
));
workOrderVo
.
setDevice
Code
s
(
String
.
valueOf
(
deviceCode
));
String
isPipe
=
alarm
.
getIsPipe
();
if
(
"0"
.
equals
(
isPipe
)){
...
...
@@ -110,8 +123,16 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
workOrderVo
.
setLatitude
(
device
.
getLatitude
());
workOrderVo
.
setDeviceType
(
device
.
getDeviceType
());
}
}
List
<
TOrderFeedback
>
feedbackList
=
tOrderFeedbackMapper
.
selectTOrderFeedbackByOrderId
(
tWorkOrder
.
getOrderId
());
if
(
feedbackList
.
size
()
!=
0
){
TOrderFeedback
feedback
=
feedbackList
.
get
(
0
);
workOrderVo
.
setContents
(
feedback
.
getContents
());
workOrderVo
.
setFeedbackTime
(
feedback
.
getFeedbackTime
());
workOrderVo
.
setDealStatus
(
feedback
.
getDealStatus
());
}
return
workOrderVo
;
}
...
...
@@ -122,7 +143,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 工单基础信息
*/
@Override
public
List
<
WorkOrderVo
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
)
public
List
<
WorkOrderVo
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
)
throws
Exception
{
List
<
WorkOrderVo
>
workOrderVoList
=
new
ArrayList
<
WorkOrderVo
>();
List
<
TWorkOrder
>
workOrderList
=
tWorkOrderMapper
.
selectTWorkOrderList
(
tWorkOrder
);
...
...
@@ -157,12 +178,12 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 结果
*/
@Override
public
int
insertTWorkOrder
(
TWorkOrder
tWorkOrder
)
public
int
insertTWorkOrder
(
TWorkOrder
tWorkOrder
)
throws
Exception
{
String
orderId
=
tWorkOrderMapper
.
getWorkOrderId
();
tWorkOrder
.
setOrderId
(
orderId
);
tWorkOrder
.
setOrderStatus
(
"0"
);
tWorkOrder
.
set
Create
Time
(
DateUtils
.
getNowDate
());
tWorkOrder
.
set
Allot
Time
(
DateUtils
.
getNowDate
());
int
planId
=
tWorkOrder
.
getResourceId
();
// 修改巡检计划状态为已下发
...
...
@@ -181,7 +202,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 结果
*/
@Override
public
int
updateTWorkOrder
(
TWorkOrder
tWorkOrder
)
public
int
updateTWorkOrder
(
TWorkOrder
tWorkOrder
)
throws
Exception
{
if
(
"1"
.
equals
(
tWorkOrder
.
getOrderStatus
())){
...
...
@@ -204,6 +225,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
tInspectionPlanService
.
updateTInspectionPlan
(
plan
);
}
tWorkOrder
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tWorkOrderMapper
.
updateTWorkOrder
(
tWorkOrder
);
}
...
...
gassafety-system/src/main/resources/mapper/system/TDeviceAlarmMapper.xml
View file @
9a173537
...
...
@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectTDeviceAlarmById"
parameterType=
"
Long
"
resultMap=
"TDeviceAlarmResult"
>
<select
id=
"selectTDeviceAlarmById"
parameterType=
"
int
"
resultMap=
"TDeviceAlarmResult"
>
<include
refid=
"selectTDeviceAlarmVo"
/>
where alarm_id = #{alarmId}
</select>
...
...
gassafety-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
9a173537
...
...
@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectTDeviceInfoById"
parameterType=
"
Long
"
resultMap=
"TDeviceInfoResult"
>
<select
id=
"selectTDeviceInfoById"
parameterType=
"
int
"
resultMap=
"TDeviceInfoResult"
>
<include
refid=
"selectTDeviceInfoVo"
/>
where device_id = #{deviceId}
</select>
...
...
gassafety-system/src/main/resources/mapper/system/TEnterpriseInfoMapper.xml
View file @
9a173537
...
...
@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectTEnterpriseInfoById"
parameterType=
"
Long
"
resultMap=
"TEnterpriseInfoResult"
>
<select
id=
"selectTEnterpriseInfoById"
parameterType=
"
int
"
resultMap=
"TEnterpriseInfoResult"
>
<include
refid=
"selectTEnterpriseInfoVo"
/>
where info_id = #{infoId}
</select>
...
...
gassafety-system/src/main/resources/mapper/system/THiddenTroubleMapper.xml
View file @
9a173537
...
...
@@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectTHiddenTroubleById"
parameterType=
"
Long
"
resultMap=
"THiddenTroubleResult"
>
<select
id=
"selectTHiddenTroubleById"
parameterType=
"
int
"
resultMap=
"THiddenTroubleResult"
>
<include
refid=
"selectTHiddenTroubleVo"
/>
where trouble_id = #{troubleId}
</select>
...
...
gassafety-system/src/main/resources/mapper/system/TInspectionDataMapper.xml
View file @
9a173537
...
...
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectFinishTInspectionData"
parameterType=
"int"
>
<select
id=
"selectFinishTInspectionData"
parameterType=
"int"
resultType=
"int"
>
select count(*) from t_inspection_data
where plan_id = #{planId}
and deal_status != null
...
...
gassafety-system/src/main/resources/mapper/system/TOrderFeedbackMapper.xml
View file @
9a173537
...
...
@@ -38,11 +38,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectTOrderFeedbackById"
parameterType=
"
Long
"
resultMap=
"TOrderFeedbackResult"
>
<select
id=
"selectTOrderFeedbackById"
parameterType=
"
int
"
resultMap=
"TOrderFeedbackResult"
>
<include
refid=
"selectTOrderFeedbackVo"
/>
where feedback_id = #{feedbackId}
</select>
<select
id=
"selectTOrderFeedbackByOrderId"
parameterType=
"String"
resultMap=
"TOrderFeedbackResult"
>
<include
refid=
"selectTOrderFeedbackVo"
/>
where order_id = #{orderId}
order by feedback_time desc
</select>
<insert
id=
"insertTOrderFeedback"
parameterType=
"TOrderFeedback"
>
insert into t_order_feedback
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
gassafety-system/src/main/resources/mapper/system/TPipeMapper.xml
View file @
9a173537
...
...
@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectTPipeById"
parameterType=
"
Long
"
resultMap=
"TPipeResult"
>
<select
id=
"selectTPipeById"
parameterType=
"
int
"
resultMap=
"TPipeResult"
>
<include
refid=
"selectTPipeVo"
/>
where pipe_id = #{pipeId}
</select>
...
...
gassafety-system/src/main/resources/mapper/system/TWorkOrderMapper.xml
View file @
9a173537
...
...
@@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"resourceId"
column=
"resource_id"
/>
<result
property=
"orderName"
column=
"order_name"
/>
<result
property=
"orderStatus"
column=
"order_status"
/>
<result
property=
"
createTime"
column=
"cre
ate_time"
/>
<result
property=
"
updateTime"
column=
"upd
ate_time"
/>
<result
property=
"appointInspector"
column=
"appoint_inspector"
/>
<result
property=
"allotTime"
column=
"allot_time"
/>
<result
property=
"actualInspector"
column=
"actual_inspector"
/>
...
...
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<sql
id=
"selectTWorkOrderVo"
>
select order_id, order_type, resource_id, order_name, order_status,
cre
ate_time, appoint_inspector, allot_time, actual_inspector, actual_time, remarks from t_work_order
select order_id, order_type, resource_id, order_name, order_status,
upd
ate_time, appoint_inspector, allot_time, actual_inspector, actual_time, remarks from t_work_order
</sql>
<select
id=
"selectTWorkOrderList"
parameterType=
"TWorkOrder"
resultMap=
"TWorkOrderResult"
>
...
...
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"resourceId != null"
>
resource_id,
</if>
<if
test=
"orderName != null"
>
order_name,
</if>
<if
test=
"orderStatus != null"
>
order_status,
</if>
<if
test=
"
createTime != null"
>
cre
ate_time,
</if>
<if
test=
"
updateTime != null"
>
upd
ate_time,
</if>
<if
test=
"appointInspector != null"
>
appoint_inspector,
</if>
<if
test=
"allotTime != null"
>
allot_time,
</if>
<if
test=
"actualInspector != null"
>
actual_inspector,
</if>
...
...
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"resourceId != null"
>
#{resourceId},
</if>
<if
test=
"orderName != null"
>
#{orderName},
</if>
<if
test=
"orderStatus != null"
>
#{orderStatus},
</if>
<if
test=
"
createTime != null"
>
#{cre
ateTime},
</if>
<if
test=
"
updateTime != null"
>
#{upd
ateTime},
</if>
<if
test=
"appointInspector != null"
>
#{appointInspector},
</if>
<if
test=
"allotTime != null"
>
#{allotTime},
</if>
<if
test=
"actualInspector != null"
>
#{actualInspector},
</if>
...
...
@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"orderType != null"
>
order_type = #{orderType},
</if>
<if
test=
"orderName != null"
>
order_name = #{orderName},
</if>
<if
test=
"orderStatus != null"
>
order_status = #{orderStatus},
</if>
<if
test=
"
createTime != null"
>
create_time = #{cre
ateTime},
</if>
<if
test=
"
updateTime != null"
>
update_time = #{upd
ateTime},
</if>
<if
test=
"appointInspector != null"
>
appoint_inspector = #{appointInspector},
</if>
<if
test=
"allotTime != null"
>
allot_time = #{allotTime},
</if>
<if
test=
"actualInspector != null"
>
actual_inspector = #{actualInspector},
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment