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
7419f974
Commit
7419f974
authored
Sep 14, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
a5c106de
6e30dc18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
447 additions
and
37 deletions
+447
-37
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+1
-1
PlanCheckLevelEnum.java
...oin/amos/supervision/common/enums/PlanCheckLevelEnum.java
+103
-0
PlanStatusEnum.java
...yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
+108
-0
Plan.java
...in/java/com/yeejoin/amos/supervision/dao/entity/Plan.java
+16
-0
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+1
-1
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+3
-2
RoutePointItemController.java
...rvision/business/controller/RoutePointItemController.java
+33
-2
RoutePointItemMapper.java
...supervision/business/dao/mapper/RoutePointItemMapper.java
+8
-0
IPlanDao.java
...in/amos/supervision/business/dao/repository/IPlanDao.java
+5
-0
PlanServiceImpl.java
...os/supervision/business/service/impl/PlanServiceImpl.java
+17
-12
RoutePointItemServiceImpl.java
...sion/business/service/impl/RoutePointItemServiceImpl.java
+22
-8
IRoutePointItemService.java
...vision/business/service/intfc/IRoutePointItemService.java
+6
-1
InputItemParamUtil.java
...in/amos/supervision/business/util/InputItemParamUtil.java
+1
-1
RoutePointItemVo.java
...eejoin/amos/supervision/business/vo/RoutePointItemVo.java
+46
-0
PersonIdentifyAspect.java
...amos/supervision/core/framework/PersonIdentifyAspect.java
+1
-1
dbTemplate_input_item.xml
...on/src/main/resources/db/mapper/dbTemplate_input_item.xml
+8
-4
dbTemplate_plan.xml
...ervision/src/main/resources/db/mapper/dbTemplate_plan.xml
+6
-4
routePointItemMapper.xml
...ion/src/main/resources/db/mapper/routePointItemMapper.xml
+62
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IOrgUsrService.java
View file @
7419f974
...
...
@@ -223,7 +223,7 @@ public interface IOrgUsrService {
/**
* 获取登陆人关联机场单位人员信息,部门信息
*/
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
);
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
,
AgencyUserModel
user
);
List
<
OrgUsr
>
getPersonListByParentId
(
Long
id
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/common/enums/PlanCheckLevelEnum.java
0 → 100644
View file @
7419f974
package
com
.
yeejoin
.
amos
.
supervision
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
enum
PlanCheckLevelEnum
{
DRAFT
(
"单位级"
,
0
),
EXAMINE_ONE
(
"公司级"
,
1
);
/**
* 名称
*/
private
String
name
;
/**
* 值
*/
private
int
value
;
private
PlanCheckLevelEnum
(
String
name
,
int
value
)
{
this
.
name
=
name
;
this
.
value
=
value
;
}
public
static
String
getName
(
int
value
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
.
name
;
}
}
return
null
;
}
public
static
int
getValue
(
String
name
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
.
value
;
}
}
return
-
1
;
}
public
static
PlanCheckLevelEnum
getEnum
(
int
value
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
;
}
}
return
null
;
}
public
static
PlanCheckLevelEnum
getEnum
(
String
name
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
;
}
}
return
null
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumList
()
{
List
<
Map
<
String
,
String
>>
nameList
=
new
ArrayList
<>();
for
(
PlanCheckLevelEnum
c:
PlanCheckLevelEnum
.
values
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"value"
,
c
.
getValue
()
+
""
);
nameList
.
add
(
map
);
}
return
nameList
;
}
public
static
List
<
String
>
getEnumNameList
()
{
List
<
String
>
nameList
=
new
ArrayList
<
String
>();
for
(
PlanCheckLevelEnum
c:
PlanCheckLevelEnum
.
values
())
{
nameList
.
add
(
c
.
getName
());
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getValue
()
{
return
value
;
}
public
void
setValue
(
int
value
)
{
this
.
value
=
value
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
0 → 100644
View file @
7419f974
package
com
.
yeejoin
.
amos
.
supervision
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
enum
PlanStatusEnum
{
DRAFT
(
"草稿"
,
0
),
EXAMINE_ONE
(
"一级待审核"
,
1
),
EXAMINE_TWO
(
"二级待审核"
,
2
),
EXAMINE_THREE
(
"三级待审核"
,
3
),
EXAMINE_FORMULATE
(
"已审核/检查内容未制定"
,
4
),
EXAMINE_DEVELOPED
(
"已审核/检查内容已制定"
,
5
);
/**
* 名称
*/
private
String
name
;
/**
* 值
*/
private
int
value
;
private
PlanStatusEnum
(
String
name
,
int
value
)
{
this
.
name
=
name
;
this
.
value
=
value
;
}
public
static
String
getName
(
int
value
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
.
name
;
}
}
return
null
;
}
public
static
int
getValue
(
String
name
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
.
value
;
}
}
return
-
1
;
}
public
static
PlanStatusEnum
getEnum
(
int
value
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
;
}
}
return
null
;
}
public
static
PlanStatusEnum
getEnum
(
String
name
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
;
}
}
return
null
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumList
()
{
List
<
Map
<
String
,
String
>>
nameList
=
new
ArrayList
<>();
for
(
PlanStatusEnum
c:
PlanStatusEnum
.
values
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"value"
,
c
.
getValue
()
+
""
);
nameList
.
add
(
map
);
}
return
nameList
;
}
public
static
List
<
String
>
getEnumNameList
()
{
List
<
String
>
nameList
=
new
ArrayList
<
String
>();
for
(
PlanStatusEnum
c:
PlanStatusEnum
.
values
())
{
nameList
.
add
(
c
.
getName
());
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getValue
()
{
return
value
;
}
public
void
setValue
(
int
value
)
{
this
.
value
=
value
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/Plan.java
View file @
7419f974
...
...
@@ -163,6 +163,13 @@ public class Plan extends BasicEntity {
*/
@Column
(
name
=
"plan_type"
)
private
String
planType
;
/**
* 检查级别
*/
@Column
(
name
=
"check_level"
)
private
String
checkLevel
;
/**
* 备注
*/
...
...
@@ -745,4 +752,12 @@ public class Plan extends BasicEntity {
public
void
setMakerUserDeptName
(
String
makerUserDeptName
)
{
this
.
makerUserDeptName
=
makerUserDeptName
;
}
public
String
getCheckLevel
()
{
return
checkLevel
;
}
public
void
setCheckLevel
(
String
checkLevel
)
{
this
.
checkLevel
=
checkLevel
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
7419f974
...
...
@@ -413,7 +413,7 @@ public class OrgUsrController extends BaseController {
if
(
StringUtils
.
isEmpty
(
userIds
))
{
userIds
=
user
.
getUserId
();
}
List
<
Map
<
String
,
Object
>>
loginUserDetails
=
iOrgUsrService
.
getLoginUserDetails
(
userIds
);
List
<
Map
<
String
,
Object
>>
loginUserDetails
=
iOrgUsrService
.
getLoginUserDetails
(
userIds
,
user
);
return
ResponseHelper
.
buildResponse
(
loginUserDetails
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
7419f974
...
...
@@ -1406,7 +1406,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
)
{
public
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
,
AgencyUserModel
user
)
{
// 获取登陆人关联账号
List
<
OrgUsr
>
orgUsrs
=
getUsrList
(
userId
);
...
...
@@ -1420,7 +1420,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
wrapper
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
orgUsr
.
getParentId
());
OrgUsr
one
=
this
.
getOne
(
wrapper
);
map
.
put
(
"other"
,
one
);
map
.
put
(
OrgPersonEnum
.
部门
.
getKey
(),
one
);
map
.
put
(
"AMOSUSER"
,
user
);
list
.
add
(
map
);
});
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/RoutePointItemController.java
View file @
7419f974
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
controller
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService
;
import
com.yeejoin.amos.supervision.business.util.CommonResponse
;
import
com.yeejoin.amos.supervision.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.supervision.business.util.InputItemParamUtil
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
io.swagger.annotations.Api
;
...
...
@@ -13,10 +19,12 @@ import org.apache.commons.lang3.StringUtils;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
java.util.HashMap
;
import
java.util.List
;
/**
...
...
@@ -44,11 +52,12 @@ public class RoutePointItemController extends AbstractBaseController {
@ApiOperation
(
value
=
"新增巡检路线点项关系"
,
notes
=
"新增巡检路线点项关系"
)
@PostMapping
(
value
=
"/addRoutePointItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addRoute
(
@ApiParam
(
value
=
"巡检计划"
,
required
=
true
)
@RequestBody
Plan
plan
,
@ApiParam
(
value
=
"检查项IDS"
,
required
=
true
)
@RequestParam
List
<
Long
>
inputItemIds
)
{
@ApiParam
(
value
=
"检查项IDS"
,
required
=
true
)
@RequestParam
List
<
Long
>
inputItemIds
,
@ApiParam
(
value
=
"是否保存并提交"
,
required
=
true
)
@RequestParam
Boolean
status
)
{
try
{
String
userId
=
getUserId
();
if
(
StringUtils
.
isNotBlank
(
userId
))
{
List
<
RoutePointItem
>
list
=
routePointItemService
.
addRoutePointItemList
(
plan
,
inputItemIds
,
userId
);
List
<
RoutePointItem
>
list
=
routePointItemService
.
addRoutePointItemList
(
plan
,
inputItemIds
,
status
,
userId
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
return
CommonResponseUtil
.
success
();
}
...
...
@@ -60,4 +69,26 @@ public class RoutePointItemController extends AbstractBaseController {
return
CommonResponseUtil
.
failure
(
"巡检路线点项关系新增失败!"
);
}
}
/**
* 分页查询检查项
*
* @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
<
RoutePointItemVo
>
page
=
routePointItemService
.
queryPage
(
criterias
);
return
CommonResponseUtil
.
success
(
page
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/RoutePointItemMapper.java
View file @
7419f974
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
java.util.List
;
public
interface
RoutePointItemMapper
extends
BaseMapper
{
public
void
updateRoutePointItem
(
RoutePointItem
pointItem
);
int
delRoutePointItemByRouteId
(
Long
routeId
);
long
queryPageCount
(
InputItemPageParam
param
);
List
<
RoutePointItemVo
>
queryPage
(
InputItemPageParam
param
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPlanDao.java
View file @
7419f974
...
...
@@ -30,6 +30,11 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
@Query
(
value
=
"UPDATE p_plan SET is_delete = 1,`status` = 1 WHERE id IN (?1)"
,
nativeQuery
=
true
)
void
updatePlanDel
(
List
<
Long
>
ids
);
@Modifying
@Transactional
@Query
(
value
=
"UPDATE p_plan SET `status` = (?1) WHERE id IN (?2)"
,
nativeQuery
=
true
)
void
updatePlanStatus
(
Integer
status
,
Long
planId
);
Plan
findByOriginalId
(
String
originalId
);
@Query
(
value
=
"select * from p_plan where original_id in (?1) and is_delete = 0"
,
nativeQuery
=
true
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanServiceImpl.java
View file @
7419f974
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.supervision.business.dao.mapper.RouteMapper;
import
com.yeejoin.amos.supervision.business.dao.repository.*
;
import
com.yeejoin.amos.supervision.business.param.PlanInfoPageParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanService
;
import
com.yeejoin.amos.supervision.common.enums.PlanStatusEnum
;
import
com.yeejoin.amos.supervision.core.common.request.AddPlanRequest
;
import
com.yeejoin.amos.supervision.core.common.response.PlanPointRespone
;
import
com.yeejoin.amos.supervision.core.util.DateUtil
;
...
...
@@ -81,6 +82,10 @@ public class PlanServiceImpl implements IPlanService {
Map
<
String
,
String
>
userIdNameMap
=
userModels
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
));
content
.
forEach
(
c
->
{
this
.
buildUserName
(
c
,
"createBy"
,
userIdNameMap
);
if
(
c
.
containsKey
(
"status"
))
{
String
finishStatusDesc
=
PlanStatusEnum
.
getName
(
Integer
.
parseInt
(
c
.
get
(
"status"
).
toString
()));
c
.
put
(
"statusDesc"
,
finishStatusDesc
);
}
});
return
new
PageImpl
<>(
content
,
param
,
total
);
}
...
...
@@ -110,7 +115,7 @@ public class PlanServiceImpl implements IPlanService {
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
""
:
map
.
get
(
"user_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_STOP
));
//
param.setStatus(Byte.parseByte(XJConstant.PLAN_STATUS_STOP));
param
.
setNextGenDate
(
DateUtil
.
getIntervalDate
(
new
Date
(),
0
));
param
.
setCreateBy
(
userId
);
addPlanRequest
.
setPlan
(
param
);
...
...
@@ -144,7 +149,7 @@ public class PlanServiceImpl implements IPlanService {
if
(
plan
.
getId
()>
0
)
{
// 删除相关点项内容
iRoutePointDao
.
delRoutePointByRouteId
(
plan
.
getRouteId
());
iRoutePointItemDao
.
delRoutePointItem
(
plan
.
getRouteId
());
//
iRoutePointItemDao.delRoutePointItem(plan.getRouteId());
saveRoute
.
setId
(
plan
.
getRouteId
());
}
...
...
@@ -173,16 +178,16 @@ public class PlanServiceImpl implements IPlanService {
iRoutePointDao
.
save
(
routePoint
);
// List<PointInputItem> pointInputItems = pointMapper.getCheckPointById(point);
List
<
PointInputItem
>
pointInputItems
=
iPointInputItemDao
.
getPointInputItemByPointId
(
point
);
pointMapper
.
getPointClassInputItemById
(
point
);
if
(!
ObjectUtils
.
isEmpty
(
pointInputItems
))
{
pointInputItems
.
forEach
(
pointInputItem
->
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setRoutePointId
(
routePoint
.
getId
());
routePointItem
.
setPointInputItemId
(
pointInputItem
.
getId
());
iRoutePointItemDao
.
save
(
routePointItem
);
});
}
//
List<PointInputItem> pointInputItems = iPointInputItemDao.getPointInputItemByPointId(point);
//
pointMapper.getPointClassInputItemById(point);
//
if (!ObjectUtils.isEmpty(pointInputItems)) {
//
pointInputItems.forEach(pointInputItem -> {
//
RoutePointItem routePointItem = new RoutePointItem();
//
routePointItem.setRoutePointId(routePoint.getId());
//
routePointItem.setPointInputItemId(pointInputItem.getId());
//
iRoutePointItemDao.save(routePointItem);
//
});
//
}
});
}
}
...
...
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 @
7419f974
...
...
@@ -3,16 +3,23 @@ package com.yeejoin.amos.supervision.business.service.impl;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.supervision.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.common.enums.PlanStatusEnum
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePoint
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -28,16 +35,23 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
private
IRoutePointDao
routePointDao
;
@Autowired
private
IPlanDao
planDao
;
@Autowired
private
InputItemMapper
inputItemMapper
;
@Autowired
private
RoutePointItemMapper
routePointItemMapper
;
@Override
public
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
String
userId
)
{
@Transactional
public
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
Boolean
status
,
String
userId
)
{
Long
planId
=
plan
.
getId
();
Long
routeId
=
plan
.
getRouteId
();
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
);
...
...
@@ -63,11 +77,11 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
return
Lists
.
newArrayList
();
}
//
@Override
//
public Page<RoutePointItemVo> queryPage(InputItemPageParam param) {
//
long total = routePointItemMapper.queryPageCount(param);
//
List<RoutePointItemVo> content = routePointItemMapper.queryPage(param);
//
Page<RoutePointItemVo> result = new PageImpl<RoutePointItemVo>(content, param, total);
//
return result;
//
}
@Override
public
Page
<
RoutePointItemVo
>
queryPage
(
InputItemPageParam
param
)
{
long
total
=
routePointItemMapper
.
queryPageCount
(
param
);
List
<
RoutePointItemVo
>
content
=
routePointItemMapper
.
queryPage
(
param
);
Page
<
RoutePointItemVo
>
result
=
new
PageImpl
<
RoutePointItemVo
>(
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/intfc/IRoutePointItemService.java
View file @
7419f974
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
org.springframework.data.domain.Page
;
import
java.util.List
;
public
interface
IRoutePointItemService
{
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
String
userId
);
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
Boolean
status
,
String
userId
);
Page
<
RoutePointItemVo
>
queryPage
(
InputItemPageParam
criterias
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/util/InputItemParamUtil.java
View file @
7419f974
...
...
@@ -59,7 +59,7 @@ public class InputItemParamUtil {
}
else
if
(
"checkTypeId"
.
equals
(
name
))
{
param
.
setCheckTypeId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"itemStart"
.
equals
(
name
))
{
param
.
set
CheckTypeId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
set
ItemStart
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/vo/RoutePointItemVo.java
0 → 100644
View file @
7419f974
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
vo
;
import
java.util.Date
;
public
class
RoutePointItemVo
{
/**
* 检查项ID
*/
private
Long
inputItemId
;
/**
* 检查项名称
*/
private
String
inputItemName
;
/**
* 安全隐患个数
*/
private
Integer
safetyDangerNum
;
/**
* 重大隐患个数
*/
private
Integer
majorDangerNum
;
/**
* 检查时间
*/
private
Date
checkTime
;
/**
* 检查人
*/
private
String
userName
;
/**
* 责任单位
*/
private
String
companyName
;
/**
* 扩展属性
*/
private
String
ext
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/core/framework/PersonIdentifyAspect.java
View file @
7419f974
...
...
@@ -53,7 +53,7 @@ public class PersonIdentifyAspect {
ReginParams
.
PersonIdentity
personIdentity
=
new
ReginParams
.
PersonIdentity
();
if
(!
ObjectUtils
.
isEmpty
(
result
))
{
Map
map
=
(
Map
)
result
.
get
(
0
);
Map
other
=
(
Map
)
map
.
get
(
"
other
"
);
Map
other
=
(
Map
)
map
.
get
(
"
DEPARTMENT
"
);
Map
person
=
(
Map
)
map
.
get
(
"PERSON"
);
if
(!
ObjectUtils
.
isEmpty
(
person
))
{
personIdentity
.
setPersonSeq
((
String
)
person
.
get
(
"sequenceNbr"
));
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
7419f974
...
...
@@ -82,11 +82,15 @@
FROM
p_input_item a
where a.is_delete = '0' and a.input_type != '1'
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<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=
"inputClassify != null"
>
and a.input_classify = #{inputClassify}
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"orgCode!=null"
>
and a.org_Code = #{orgCode}
</if>
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</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>
order by a.id desc
</select>
<!--查询 -->
...
...
@@ -123,10 +127,10 @@
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<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 a.check_type_Val
= #{checkTypeId}
</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>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan.xml
View file @
7419f974
...
...
@@ -119,12 +119,13 @@
WHERE
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat(concat("%",#{planName}),"%")
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"checkTypeId!=null and checkTypeId != '' "
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"leadPerson!=null and leadPerson != '' "
>
and a.lead_people_ids = #{leadPerson}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark like concat(concat("%",#{remark}),"%")
</if>
<if
test=
"deptId!=null"
>
and a.dept_id = #{deptId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat(concat("%",#{remark}),"%")
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"ownerId!=null"
>
and b.owner_id = #{ownerId}
</if>
</select>
<!--巡检计划查询 -->
<select
id=
"getPlanInfo"
resultType=
"java.util.HashMap"
>
...
...
@@ -156,6 +157,7 @@
a.maker_user_id as makerUserId,
a.maker_user_name as makerUserName,
a.maker_user_dept_name as makerUserDeptName,
a.check_level as checkLevel,
(select count(1) from p_route_point ppo where ppo.route_id = b.id) as totalPoint,
(select count(1) from p_plan_task t where t.plan_id = a.id) as totalPlanTask,
(select count(1) from p_plan_task t where t.plan_id = a.id and t.finish_status
<![CDATA[<=]]>
1 ) as waitFinishPlanTask
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/routePointItemMapper.xml
View file @
7419f974
...
...
@@ -43,4 +43,65 @@
route_id = #{routeId}
)
</delete>
<!--统计 -->
<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 a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"inputClassify != null"
>
and a.input_classify = #{inputClassify}
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"orgCode!=null"
>
and a.org_Code = #{orgCode}
</if>
order by a.id desc
</select>
<!--查询 -->
<select
id=
"queryPage"
resultMap=
"com.yeejoin.amos.supervision.business.vo.RoutePointItemVo"
>
SELECT
a.id,
a.NAME,
a.item_no,
a.item_type,
a.is_must,
a.default_value,
a.is_score,
b.NAME AS catalog_name,
a.remark,
a.LEVEL,
a.risk_desc,
a.maintenance_content,
a.test_requirement,
a.check_method,
a.create_date,
a.input_classify,
a.check_type,
a.item_parent,
a.item_classify,
a.item_type_classify,
a.item_level,
a.item_start,
IF
( i.input_item_id IS NULL, 0, 1 ) AS ext
FROM
p_input_item a
LEFT JOIN p_catalog_tree b ON a.catalog_id = b.id
LEFT JOIN p_route_point_item i ON a.id = i.input_item_id
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<if
test=
"name!=null"
>
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 a.check_type_Val = #{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>
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
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