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
e36eb042
Commit
e36eb042
authored
Sep 10, 2021
by
jianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BASE
parent
7e36795d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
32 deletions
+29
-32
TWorkOrderController.java
...zehong/web/controller/workOrder/TWorkOrderController.java
+2
-16
TWorkOrder.java
...em/src/main/java/com/zehong/system/domain/TWorkOrder.java
+6
-1
TWorkOrderMapper.java
.../main/java/com/zehong/system/mapper/TWorkOrderMapper.java
+1
-1
ITWorkOrderService.java
...in/java/com/zehong/system/service/ITWorkOrderService.java
+1
-1
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+2
-7
TWorkOrderMapper.xml
...tem/src/main/resources/mapper/system/TWorkOrderMapper.xml
+17
-6
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/workOrder/TWorkOrderController.java
View file @
e36eb042
...
...
@@ -2,17 +2,9 @@ package com.zehong.web.controller.workOrder;
import
com.github.pagehelper.PageInfo
;
import
java.util.List
;
import
java.util.Map
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.form.TWorkOrderForm
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
org.apache.commons.math3.analysis.function.Add
;
import
org.aspectj.weaver.loadtime.Aj
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -21,15 +13,9 @@ import com.zehong.common.core.controller.BaseController;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.system.domain.TWorkOrder
;
import
com.zehong.system.domain.form.TWorkOrderForm
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
com.zehong.system.service.ITWorkOrderService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
...
...
@@ -70,12 +56,12 @@ public class TWorkOrderController extends BaseController
* @throws Exception
*/
@GetMapping
(
"/waitinglist"
)
public
TableDataInfo
waitinglist
(
String
userId
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"1"
)
Integer
type
)
throws
Exception
public
TableDataInfo
waitinglist
(
String
userId
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"1"
)
Integer
type
,
String
searchStr
)
throws
Exception
{
startPage
();
PageInfo
<
TWorkOrder
>
pageInfo
;
try
{
pageInfo
=
tWorkOrderService
.
selectWaitingWorkOrder
(
userId
,
type
);
pageInfo
=
tWorkOrderService
.
selectWaitingWorkOrder
(
userId
,
type
,
searchStr
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
"查询待办工单失败"
);
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TWorkOrder.java
View file @
e36eb042
...
...
@@ -66,8 +66,13 @@ public class TWorkOrder extends BaseEntity
private
String
longitude
;
private
String
latitude
;
private
String
pictureUrl
;
public
void
setOrderId
(
String
orderId
)
public
String
getPictureUrl
()
{
return
pictureUrl
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TWorkOrderMapper.java
View file @
e36eb042
...
...
@@ -42,7 +42,7 @@ public interface TWorkOrderMapper
* @param userId
* @return
*/
public
List
<
TWorkOrder
>
selectWaitingWorkOrder
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"type"
)
Integer
type
);
public
List
<
TWorkOrder
>
selectWaitingWorkOrder
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"searchStr"
)
String
searchStr
);
/**
* 新增工单基础信息
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITWorkOrderService.java
View file @
e36eb042
...
...
@@ -50,7 +50,7 @@ public interface ITWorkOrderService
* @return
* @throws Exception
*/
public
PageInfo
<
TWorkOrder
>
selectWaitingWorkOrder
(
String
userId
,
Integer
type
)
throws
Exception
;
public
PageInfo
<
TWorkOrder
>
selectWaitingWorkOrder
(
String
userId
,
Integer
type
,
String
searchStr
)
throws
Exception
;
/**
* 新增工单基础信息
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
e36eb042
...
...
@@ -2,9 +2,7 @@ package com.zehong.system.service.impl;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.DateUtils
;
...
...
@@ -19,9 +17,6 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 工单基础信息Service业务层处理
*
...
...
@@ -261,8 +256,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return
*/
@Override
public
PageInfo
<
TWorkOrder
>
selectWaitingWorkOrder
(
String
userId
,
Integer
type
){
List
<
TWorkOrder
>
workOrderList
=
tWorkOrderMapper
.
selectWaitingWorkOrder
(
userId
,
type
);
public
PageInfo
<
TWorkOrder
>
selectWaitingWorkOrder
(
String
userId
,
Integer
type
,
String
searchStr
){
List
<
TWorkOrder
>
workOrderList
=
tWorkOrderMapper
.
selectWaitingWorkOrder
(
userId
,
type
,
searchStr
);
for
(
TWorkOrder
t
:
workOrderList
){
if
(
t
.
getOrderType
().
equals
(
'3'
)){
String
address
=
tDeviceAlarmMapper
.
selectAddressByOrderId
(
t
.
getOrderId
());
...
...
gassafety-system/src/main/resources/mapper/system/TWorkOrderMapper.xml
View file @
e36eb042
...
...
@@ -57,6 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
o.order_status > 0
</otherwise>
</choose>
<if
test=
"searchStr!=null and searchStr!=''"
>
AND o.order_name LIKE concat('%',#{searchStr},'%')
</if>
and (o.appoint_inspector is null OR o.appoint_inspector = #{userId})
order by o.allot_time desc
</select>
...
...
@@ -144,24 +147,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</choose>
<choose>
<when
test=
'type=="1"'
>
"" as latitude
"" as latitude
,
</when>
<otherwise>
p.latitude as latitude
p.latitude as latitude,
</otherwise>
</choose>
<choose>
<when
test=
'type!="2"'
>
"" as pictureUrl
</when>
<otherwise>
p.picture_url as pictureUrl
</otherwise>
</choose>
FROM (SELECT order_id as orderId,order_name as orderName,order_type as orderType,
order_status as orderStatus,allot_time as allotTime,remarks,resource_id
order_status as orderStatus,allot_time as allotTime,remarks,resource_id
as resourceId
FROM t_work_order WHERE order_id=#{orderId})t
<choose>
<when
test=
'type=="1"'
>
LEFT JOIN t_inspection_plan p ON p.plan_id = t.resource
_i
d
LEFT JOIN t_inspection_plan p ON p.plan_id = t.resource
I
d
</when>
<when
test=
'type=="2"'
>
LEFT JOIN t_hidden_trouble p ON p.trouble_id = t.resource
_i
d
LEFT JOIN t_hidden_trouble p ON p.trouble_id = t.resource
I
d
</when>
<otherwise>
LEFT JOIN t_device_alarm a ON a.alarm_id = t.resource
_i
d
LEFT JOIN t_device_alarm a ON a.alarm_id = t.resource
I
d
LEFT JOIN t_device_info p ON p.device_id = a.`device_id`
</otherwise>
</choose>
...
...
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