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
5c981e10
Commit
5c981e10
authored
Sep 15, 2021
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:监督检查项新增分页方法
parent
d925197c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
103 additions
and
24 deletions
+103
-24
InputItemController.java
.../supervision/business/controller/InputItemController.java
+22
-0
InputItemMapper.java
...amos/supervision/business/dao/mapper/InputItemMapper.java
+4
-0
InputItemServiceImpl.java
...pervision/business/service/impl/InputItemServiceImpl.java
+8
-0
RoutePointItemServiceImpl.java
...sion/business/service/impl/RoutePointItemServiceImpl.java
+21
-20
IInputItemService.java
...supervision/business/service/intfc/IInputItemService.java
+2
-0
dbTemplate_input_item.xml
...on/src/main/resources/db/mapper/dbTemplate_input_item.xml
+44
-0
routePointItemMapper.xml
...ion/src/main/resources/db/mapper/routePointItemMapper.xml
+2
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/InputItemController.java
View file @
5c981e10
...
...
@@ -231,6 +231,28 @@ public class InputItemController extends AbstractBaseController {
}
/**
* 分页查询检查项
*
* @param queryRequests
* @param pageable
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询检查项"
,
notes
=
"分页查询检查项"
)
@RequestMapping
(
value
=
"/queryPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryPage
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
false
,
defaultValue
=
"current=0&pageSize=10或pageNumber0&pageSize=10"
)
CommonPageable
pageable
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
HashMap
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"orgCode"
,
loginOrgCode
);
InputItemPageParam
criterias
=
InputItemParamUtil
.
fillInputItemPageParam
(
queryRequests
,
pageable
,
paramMap
);
Page
<
InputItemVo
>
page
=
inputItemService
.
queryPage
(
criterias
);
return
CommonResponseUtil
.
success
(
page
);
}
/**
* 条件查询检查项
*
* @param queryRequests
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/InputItemMapper.java
View file @
5c981e10
...
...
@@ -40,4 +40,8 @@ public interface InputItemMapper {
List
<
Long
>
getIds
();
List
<
InputItem
>
findByIdIn
(
@Param
(
"list"
)
List
<
Long
>
inputItemIds
);
long
queryPageCount
(
InputItemPageParam
param
);
List
<
InputItemVo
>
queryPage
(
InputItemPageParam
param
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/InputItemServiceImpl.java
View file @
5c981e10
...
...
@@ -277,4 +277,12 @@ public class InputItemServiceImpl implements IInputItemService {
inputItemMapper
.
updatePointById
(
param
);
}
@Override
public
Page
<
InputItemVo
>
queryPage
(
InputItemPageParam
param
)
{
long
total
=
inputItemMapper
.
queryPageCount
(
param
);
List
<
InputItemVo
>
content
=
inputItemMapper
.
queryPage
(
param
);
Page
<
InputItemVo
>
result
=
new
PageImpl
<
InputItemVo
>(
content
,
param
,
total
);
return
result
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/RoutePointItemServiceImpl.java
View file @
5c981e10
...
...
@@ -51,28 +51,29 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
if
(
CollectionUtils
.
isNotEmpty
(
inputItemIds
)
&&
routeId
!=
null
&&
planId
!=
null
)
{
if
(
status
)
{
planDao
.
updatePlanStatus
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
(),
planId
);
}
// routePointItemDao.deleteByPlanId(planId
);
List
<
InputItem
>
inputItemList
=
inputItemMapper
.
findByIdIn
(
inputItemIds
);
List
<
RoutePoint
>
routePointList
=
routePointDao
.
findByRouteId
(
routeId
);
if
(
CollectionUtils
.
isNotEmpty
(
inputItemList
)
&&
CollectionUtils
.
isNotEmpty
(
routePointList
))
{
List
<
RoutePointItem
>
list
=
new
ArrayList
<>();
routePointList
.
stream
().
forEach
(
route
->
{
Long
routePointId
=
route
.
getId
();
inputItemList
.
stream
().
forEach
(
item
->
{
RoutePointItem
routePointItem
=
new
RoutePointItem
(
);
routePointItem
.
setPlanId
(
planId
);
routePointItem
.
setInputItemId
(
item
.
getId
());
routePointItem
.
setBasisJson
(
item
.
getBasisJson
());
routePointItem
.
setOrderNo
(
item
.
getOrderNo
()
);
routePointItem
.
setRoutePointId
(
routePoint
Id
);
routePointItem
.
setCreatorId
(
userId
);
routePointItem
.
setCreateDate
(
new
Date
()
);
list
.
add
(
routePointItem
);
}
else
{
List
<
InputItem
>
inputItemList
=
inputItemMapper
.
findByIdIn
(
inputItemIds
);
List
<
RoutePoint
>
routePointList
=
routePointDao
.
findByRouteId
(
routeId
);
if
(
CollectionUtils
.
isNotEmpty
(
inputItemList
)
&&
CollectionUtils
.
isNotEmpty
(
routePointList
))
{
List
<
RoutePointItem
>
list
=
new
ArrayList
<>();
routePointList
.
stream
().
forEach
(
route
->
{
Long
routePointId
=
route
.
getId
();
inputItemList
.
stream
().
forEach
(
item
->
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setPlanId
(
planId
);
routePointItem
.
setInputItemId
(
item
.
getId
()
);
routePointItem
.
setBasisJson
(
item
.
getBasisJson
());
routePointItem
.
setOrderNo
(
item
.
getOrderNo
());
routePointItem
.
setRoutePointId
(
routePointId
);
routePointItem
.
setCreatorId
(
user
Id
);
routePointItem
.
setCreateDate
(
new
Date
()
);
list
.
add
(
routePointItem
);
}
);
});
}
);
return
routePointItemDao
.
saveAll
(
list
);
return
routePointItemDao
.
saveAll
(
list
);
}
}
// routePointItemDao.deleteByPlanId(planId);
}
return
Lists
.
newArrayList
();
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IInputItemService.java
View file @
5c981e10
...
...
@@ -118,4 +118,6 @@ public interface IInputItemService {
List
getItemParent
(
String
id
);
void
updatePointById
(
Map
<
String
,
Object
>
param
);
Page
<
InputItemVo
>
queryPage
(
InputItemPageParam
criterias
);
}
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
5c981e10
...
...
@@ -333,4 +333,47 @@
</if>
</where>
</select>
<!--统计 -->
<select
id=
"queryPageCount"
resultType=
"long"
>
SELECT
count(1) AS total_num
FROM
p_input_item a
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<if
test=
"name!=null and name!=''"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"checkTypeId!=null and checkTypeId!=''"
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"itemStart!=null"
>
and a.item_start = #{itemStart}
</if>
<!--<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemTypeClassifyIds != null"
>
and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)
</if>
<if
test=
"planId != null"
>
and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )
</if>
</select>
<!--查询 -->
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.InputItemVo"
>
SELECT
a.*
FROM
p_input_item a
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<if
test=
"name!=null and name!=''"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"checkTypeId!=null and checkTypeId!=''"
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"itemStart!=null"
>
and a.item_start = #{itemStart}
</if>
<!--<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemTypeClassifyIds != null"
>
and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)
</if>
<if
test=
"planId != null"
>
and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )
</if>
order by a.id desc
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
</mapper>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/routePointItemMapper.xml
View file @
5c981e10
...
...
@@ -52,9 +52,8 @@
LEFT JOIN p_input_item i ON i.id = pi.input_item_id
<where>
<if
test=
"name!=null"
>
and i.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemTypeClassifyIds != null and itemTypeClassifyIds != ''"
>
and i.item_type_classify_ids = #{itemTypeClassifyIds}
</if>
<if
test=
"planId!=null"
>
and pi.plan_id = #{planId}
</if>
<
if
test=
"orgCode!=null"
>
and i.org_Code = #{orgCode}
</if
>
<
!-- <if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>--
>
</where>
</select>
<!--查询 -->
...
...
@@ -73,9 +72,8 @@
LEFT JOIN p_input_item i ON i.id = pi.input_item_id
<where>
<if
test=
"name!=null"
>
and i.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemTypeClassifyIds != null and itemTypeClassifyIds != ''"
>
and i.item_type_classify_ids = #{itemTypeClassifyIds}
</if>
<if
test=
"planId!=null"
>
and pi.plan_id = #{planId}
</if>
<
if
test=
"orgCode!=null"
>
and i.org_Code = #{orgCode}
</if
>
<
!-- <if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>--
>
</where>
<choose>
<when
test=
"pageSize==-1"
></when>
...
...
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