Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
62398097
Commit
62398097
authored
Aug 16, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新接口
parent
7dc1ea9c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
25 deletions
+31
-25
OrderByEnum.java
...om/yeejoin/amos/maintenance/common/enums/OrderByEnum.java
+2
-2
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+4
-2
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+3
-6
dbTemplate_check.xml
...tenance/src/main/resources/db/mapper/dbTemplate_check.xml
+22
-15
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/common/enums/OrderByEnum.java
View file @
62398097
...
@@ -18,8 +18,8 @@ public enum OrderByEnum {
...
@@ -18,8 +18,8 @@ public enum OrderByEnum {
PLAN_TASK_NUM_DESC
(
"计划维保设施数倒序"
,
"4"
,
"taskPlanNum desc"
),
PLAN_TASK_NUM_DESC
(
"计划维保设施数倒序"
,
"4"
,
"taskPlanNum desc"
),
FINISH_NUM_DESC
(
"完成数倒序"
,
"5"
,
"finishNum desc"
),
FINISH_NUM_DESC
(
"完成数倒序"
,
"5"
,
"finishNum desc"
),
FINISH_NUM_ASC
(
"完成数正序"
,
"6"
,
"finishNum asc"
),
FINISH_NUM_ASC
(
"完成数正序"
,
"6"
,
"finishNum asc"
),
DATE_DESC
(
"维保记录时间倒序"
,
"
1
"
,
"checkDate desc"
),
DATE_DESC
(
"维保记录时间倒序"
,
"
7
"
,
"checkDate desc"
),
DATE_ASC
(
"维保记录时间正序"
,
"
2
"
,
"checkDate asc"
);
DATE_ASC
(
"维保记录时间正序"
,
"
8
"
,
"checkDate asc"
);
/**
/**
* 名字
* 名字
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CheckController.java
View file @
62398097
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.maintenance.core.common.request.CommonPageable;
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.maintenance.core.common.request.CommonPageable;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.maintenance.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.maintenance.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.maintenance.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
com.yeejoin.amos.maintenance.core.util.StringUtil
;
import
com.yeejoin.amos.maintenance.core.util.StringUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -483,6 +484,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -483,6 +484,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkService
.
obtainLastCheckRecord
(
relationId
));
return
CommonResponseUtil
.
success
(
checkService
.
obtainLastCheckRecord
(
relationId
));
}
}
@PersonIdentify
(
isNeedIdentity
=
true
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保记录分页查询"
,
notes
=
"维保记录分页查询"
)
@ApiOperation
(
value
=
"维保记录分页查询"
,
notes
=
"维保记录分页查询"
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
...
@@ -494,7 +496,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -494,7 +496,7 @@ public class CheckController extends AbstractBaseController {
@ApiParam
(
value
=
"开始时间"
)
@RequestParam
(
value
=
"beginTime"
,
required
=
false
)
String
beginTime
,
@ApiParam
(
value
=
"开始时间"
)
@RequestParam
(
value
=
"beginTime"
,
required
=
false
)
String
beginTime
,
@ApiParam
(
value
=
"结束时间"
)
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"结束时间"
)
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"维保人员"
)
@RequestParam
(
value
=
"personId"
,
required
=
false
)
String
person
,
@ApiParam
(
value
=
"维保人员"
)
@RequestParam
(
value
=
"personId"
,
required
=
false
)
String
person
,
@ApiParam
(
value
=
"业主单位"
)
@RequestParam
(
value
=
"teamId"
,
required
=
false
)
String
team
,
@ApiParam
(
value
=
"业主单位"
)
@RequestParam
(
value
=
"teamId"
,
required
=
false
)
String
team
Id
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
throws
Exception
{
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
throws
Exception
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -509,7 +511,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -509,7 +511,7 @@ public class CheckController extends AbstractBaseController {
params
.
put
(
"beginTime"
,
beginTime
);
params
.
put
(
"beginTime"
,
beginTime
);
params
.
put
(
"endTime"
,
endTime
);
params
.
put
(
"endTime"
,
endTime
);
params
.
put
(
"person"
,
person
);
params
.
put
(
"person"
,
person
);
params
.
put
(
"team
"
,
team
);
params
.
put
(
"team
Id"
,
teamId
);
params
.
put
(
"orgCode"
,
loginOrgCode
);
params
.
put
(
"orgCode"
,
loginOrgCode
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
checkService
.
getCheckPage
(
params
,
pageable
));
return
CommonResponseUtil
.
success
(
checkService
.
getCheckPage
(
params
,
pageable
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/CheckServiceImpl.java
View file @
62398097
...
@@ -1036,16 +1036,13 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1036,16 +1036,13 @@ public class CheckServiceImpl implements ICheckService {
if
(
total
==
0
)
{
if
(
total
==
0
)
{
return
new
PageImpl
<>(
content
,
page
,
total
);
return
new
PageImpl
<>(
content
,
page
,
total
);
}
}
params
.
put
(
"offset"
,
page
.
getOffset
());
params
.
put
(
"pageSize"
,
page
.
getPageSize
());
content
=
checkMapper
.
getChecks
(
params
);
content
=
checkMapper
.
getChecks
(
params
);
if
(
0
<
content
.
size
())
{
if
(
0
<
content
.
size
())
{
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
if
(
map
.
containsKey
(
"isOk"
))
{
if
(
map
.
containsKey
(
"isOk"
))
{
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))));
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
}
if
(
map
.
containsKey
(
"address"
))
{
map
.
put
(
"address"
,
content
.
stream
().
filter
(
x
->
map
.
get
(
"checkId"
).
equals
(
x
.
get
(
"checkId"
))
&&
x
.
containsKey
(
"buildingName"
)
).
findFirst
().
get
().
get
(
"buildingName"
)
+
String
.
valueOf
(
map
.
get
(
"address"
)));
}
}
}
}
}
}
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
62398097
...
@@ -1896,17 +1896,21 @@
...
@@ -1896,17 +1896,21 @@
pc.id checkId,
pc.id checkId,
pc.user_id userId,
pc.user_id userId,
pc.is_ok isOk,
pc.is_ok isOk,
pc.check_time checkDate,
pr.owner_id ownerId,
pc.check_time maintenanceDate,
date_format(
pc.check_time ,
'%Y-%m-%d %H:%i:%s'
) checkDate,
pp.id pointId,
pp.id pointId,
pp.equipment_id equipmentId,
pp.equipment_id equipmentId,
pp.equipment_name equipmentName,
pp.equipment_name equipmentName,
pp.belong_system_id systemId,
pp.belong_system_id systemId,
pp.belong_system_name systemName,
pp.belong_system_name systemName,
pp.address address,
pp.address address,
pp.building_name
buildingName
CONCAT(pp.address, pp.building_name)
buildingName
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_route pr on pr.id = pc.route_id
) a
) a
<include
refid=
"mobile-check-record-where"
/>
<include
refid=
"mobile-check-record-where"
/>
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
...
@@ -1957,10 +1961,10 @@
...
@@ -1957,10 +1961,10 @@
<choose>
<choose>
<when
test=
"identityType==1"
>
<when
test=
"identityType==1"
>
And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )
And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )
<if
test=
"companyId != null"
>
and a.owner
_i
d = #{teamId}
</if>
<if
test=
"companyId != null"
>
and a.owner
I
d = #{teamId}
</if>
</when>
</when>
<when
test=
"identityType==2"
>
<when
test=
"identityType==2"
>
And a.owner
_i
d = #{teamId}
And a.owner
I
d = #{teamId}
</when>
</when>
</choose>
</choose>
</where>
</where>
...
@@ -1989,18 +1993,21 @@
...
@@ -1989,18 +1993,21 @@
SELECT COUNT(1) checkCount
SELECT COUNT(1) checkCount
FROM (
FROM (
SELECT
SELECT
pc.id checkId,
pc.id checkId,
pc.is_ok isOk,
pc.user_id userId,
pc.create_date maintenanceDate,
pc.is_ok isOk,
pp.id pointId,
pr.owner_id ownerId,
pp.equipment_id equipmentId,
pc.check_time checkDate,
pp.equipment_name equipmentName,
pp.id pointId,
pp.belong_system_id systemId,
pp.equipment_id equipmentId,
pp.belong_system_name systemName,
pp.equipment_name equipmentName,
pp.address address,
pp.belong_system_id systemId,
pp.building_name buildingName
pp.belong_system_name systemName,
pp.address address,
CONCAT(pp.address, pp.building_name) buildingName
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_route pr on pr.id = pc.route_id
) a
) a
<include
refid=
"mobile-check-record-where"
/>
<include
refid=
"mobile-check-record-where"
/>
</select>
</select>
...
...
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