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
503431e2
Commit
503431e2
authored
Aug 23, 2021
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计划新增
parent
6b28e49a
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
404 additions
and
17 deletions
+404
-17
AddPlanRequest.java
.../amos/supervision/core/common/request/AddPlanRequest.java
+13
-0
PlanPointRespone.java
...os/supervision/core/common/response/PlanPointRespone.java
+14
-0
Plan.java
...in/java/com/yeejoin/amos/supervision/dao/entity/Plan.java
+116
-0
Point.java
...n/java/com/yeejoin/amos/supervision/dao/entity/Point.java
+2
-2
PlanController.java
.../amos/supervision/business/controller/PlanController.java
+33
-6
PointMapper.java
...oin/amos/supervision/business/dao/mapper/PointMapper.java
+15
-0
PlanInfoPageParam.java
...in/amos/supervision/business/param/PlanInfoPageParam.java
+38
-0
PlanServiceImpl.java
...os/supervision/business/service/impl/PlanServiceImpl.java
+105
-8
IPlanService.java
...amos/supervision/business/service/intfc/IPlanService.java
+11
-0
PlanPageParamUtil.java
...oin/amos/supervision/business/util/PlanPageParamUtil.java
+6
-0
dbTemplate_plan.xml
...ervision/src/main/resources/db/mapper/dbTemplate_plan.xml
+11
-1
pointMapper.xml
...-supervision/src/main/resources/db/mapper/pointMapper.xml
+40
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/core/common/request/AddPlanRequest.java
0 → 100644
View file @
503431e2
package
com
.
yeejoin
.
amos
.
supervision
.
core
.
common
.
request
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AddPlanRequest
{
private
List
<
Long
>
ownerId
;
private
Plan
plan
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/core/common/response/PlanPointRespone.java
0 → 100644
View file @
503431e2
package
com
.
yeejoin
.
amos
.
supervision
.
core
.
common
.
response
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PlanPointRespone
{
private
static
final
long
serialVersionUID
=
1L
;
private
List
<
Long
>
ownerId
;
private
Plan
plan
;
}
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 @
503431e2
...
...
@@ -5,6 +5,7 @@ import java.util.Date;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.data.annotation.LastModifiedDate
;
...
...
@@ -266,6 +267,56 @@ public class Plan extends BasicEntity {
@Column
(
name
=
"user_dept"
)
private
String
userDept
;
/**
* 牵头部门
*/
@Column
(
name
=
"lead_department_ids"
)
private
String
leadDepartmentIds
;
/**
* 牵头人名称,多个
*/
@Column
(
name
=
"lead_people_names"
)
private
String
leadPeopleNames
;
/**
* 牵头人
*/
@Column
(
name
=
"lead_people_ids"
)
private
String
leadPeopleIds
;
/**
* 牵头部门名称
*/
@Column
(
name
=
"lead_department_names"
)
private
String
leadDepartmentNames
;
/**
* 参与人
*/
@Column
(
name
=
"join_person_ids"
)
private
String
joinPersonIds
;
/**
* 参与人名称
*/
@Column
(
name
=
"join_person_names"
)
private
String
joinPersonNames
;
/**
* 检查类型id
*/
@Column
(
name
=
"check_type_id"
)
private
String
checkTypeId
;
/**
* 检查类型名称
*/
@Column
(
name
=
"check_type_name"
)
private
String
checkTypeName
;
public
String
getUserDept
()
{
return
userDept
;
}
...
...
@@ -616,4 +667,68 @@ public class Plan extends BasicEntity {
public
void
setIsSingleExecution
(
boolean
isSingleExecution
)
{
this
.
isSingleExecution
=
isSingleExecution
;
}
public
String
getCheckTypeName
()
{
return
checkTypeName
;
}
public
void
setCheckTypeName
(
String
checkTypeName
)
{
this
.
checkTypeName
=
checkTypeName
;
}
public
String
getCheckTypeId
()
{
return
checkTypeId
;
}
public
void
setCheckTypeId
(
String
checkTypeId
)
{
this
.
checkTypeId
=
checkTypeId
;
}
public
String
getLeadDepartmentNames
()
{
return
leadDepartmentNames
;
}
public
void
setLeadDepartmentNames
(
String
leadDepartmentNames
)
{
this
.
leadDepartmentNames
=
leadDepartmentNames
;
}
public
String
getLeadPeopleIds
()
{
return
leadPeopleIds
;
}
public
void
setLeadPeopleIds
(
String
leadPeopleIds
)
{
this
.
leadPeopleIds
=
leadPeopleIds
;
}
public
String
getLeadPeopleNames
()
{
return
leadPeopleNames
;
}
public
void
setLeadPeopleNames
(
String
leadPeopleNames
)
{
this
.
leadPeopleNames
=
leadPeopleNames
;
}
public
String
getLeadDepartmentIds
()
{
return
leadDepartmentIds
;
}
public
void
setLeadDepartmentIds
(
String
leadDepartmentIds
)
{
this
.
leadDepartmentIds
=
leadDepartmentIds
;
}
public
String
getJoinPersonIds
()
{
return
joinPersonIds
;
}
public
void
setJoinPersonIds
(
String
joinPersonIds
)
{
this
.
joinPersonIds
=
joinPersonIds
;
}
public
String
getJoinPersonNames
()
{
return
joinPersonNames
;
}
public
void
setJoinPersonNames
(
String
joinPersonNames
)
{
this
.
joinPersonNames
=
joinPersonNames
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/Point.java
View file @
503431e2
...
...
@@ -270,7 +270,7 @@ public class Point extends BasicEntity {
/**
* 所在建筑名称
*/
@Column
(
name
=
"building_name"
)
//
@Column(name="building_name")
private
String
buildingName
;
public
String
getBuildingName
()
{
...
...
@@ -292,7 +292,7 @@ public class Point extends BasicEntity {
/**
* 所在建筑Id
*/
@Column
(
name
=
"building_id"
)
//
@Column(name="building_id")
private
String
buildingId
;
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/PlanController.java
View file @
503431e2
...
...
@@ -3,15 +3,13 @@ package com.yeejoin.amos.supervision.business.controller;
import
java.util.HashMap
;
import
java.util.List
;
import
com.yeejoin.amos.supervision.core.common.request.AddPlanRequest
;
import
com.yeejoin.amos.supervision.core.common.response.PlanPointRespone
;
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.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -86,7 +84,7 @@ public class PlanController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检计划新增及编辑"
,
notes
=
"巡检计划新增及编辑"
)
@RequestMapping
(
value
=
"/addPlan"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
checkPlanAdd
(
@ApiParam
(
value
=
"巡检计划"
,
required
=
true
)
@RequestBody
Plan
param
)
{
public
CommonResponse
checkPlanAdd
(
@ApiParam
(
value
=
"巡检计划"
,
required
=
true
)
@RequestBody
AddPlanRequest
param
)
{
try
{
String
userId
=
getUserId
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
...
...
@@ -188,4 +186,33 @@ public class PlanController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
list
);
}
/**
* 计划启用停用
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划启用停用"
,
notes
=
"计划启用停用"
)
@RequestMapping
(
value
=
"/setPlanStatus"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
setPlanStatus
(
@ApiParam
(
value
=
"计划id"
)
@RequestParam
(
value
=
"planId"
,
required
=
false
)
Long
planId
,
@ApiParam
(
value
=
"计划状态"
)
@RequestParam
(
value
=
"status"
,
required
=
false
)
byte
status
)
{
planService
.
setplanstatus
(
planId
,
status
);
return
CommonResponseUtil
.
success
();
}
/**
* 获取计划详情
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划启用停用"
,
notes
=
"计划启用停用"
)
@RequestMapping
(
value
=
"/getPlanDetails"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanDetails
(
@ApiParam
(
value
=
"计划id"
)
@RequestParam
(
value
=
"planId"
,
required
=
false
)
Long
planId
)
{
PlanPointRespone
planRequest
=
planService
.
getplandetails
(
planId
);
return
CommonResponseUtil
.
success
(
planRequest
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/PointMapper.java
View file @
503431e2
...
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.supervision.business.param.PointImportQueryParam;
import
com.yeejoin.amos.supervision.business.vo.LeavelMovePointVo
;
import
com.yeejoin.amos.supervision.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.supervision.business.vo.PointVo
;
import
com.yeejoin.amos.supervision.dao.entity.PointInputItem
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.supervision.core.common.response.PointResponse
;
...
...
@@ -141,4 +142,18 @@ public interface PointMapper extends BaseMapper {
*/
List
<
Map
<
String
,
Object
>>
getPointRefItem
(
List
<
Long
>
list
);
/**
* 根据业主单位查询点
*/
List
<
Long
>
getPointRouteList
(
List
<
Long
>
list
);
/**
* 根据业主单位查询点
*/
List
<
PointInputItem
>
getPointRouteItem
(
List
<
Long
>
list
);
/**
* 根据路线id查询所有点
*/
List
<
Long
>
getPointoriginalidbyrouteid
(
@Param
(
value
=
"routeId"
)
Long
routeId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/param/PlanInfoPageParam.java
View file @
503431e2
...
...
@@ -47,6 +47,21 @@ public class PlanInfoPageParam extends CommonPageable {
*/
private
String
ownerId
;
/**
* 业主单位id
*/
private
String
planStatus
;
/**
* 业主单位id
*/
private
String
checkTypeId
;
/**
* 业主单位id
*/
private
String
leadPerson
;
public
String
getOwnerId
()
{
return
ownerId
;
}
...
...
@@ -103,4 +118,27 @@ public class PlanInfoPageParam extends CommonPageable {
this
.
userId
=
userId
;
}
public
String
getPlanStatus
()
{
return
planStatus
;
}
public
void
setPlanStatus
(
String
planStatus
)
{
this
.
planStatus
=
planStatus
;
}
public
String
getCheckTypeId
()
{
return
checkTypeId
;
}
public
void
setCheckTypeId
(
String
checkTypeId
)
{
this
.
checkTypeId
=
checkTypeId
;
}
public
String
getLeadPerson
()
{
return
leadPerson
;
}
public
void
setLeadPerson
(
String
leadPerson
)
{
this
.
leadPerson
=
leadPerson
;
}
}
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 @
503431e2
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanTaskDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanTaskDetailDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRouteDao
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PointMapper
;
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.core.common.request.AddPlanRequest
;
import
com.yeejoin.amos.supervision.core.common.response.PlanPointRespone
;
import
com.yeejoin.amos.supervision.core.util.DateUtil
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
com.yeejoin.amos.supervision.dao.entity.Route
;
import
com.yeejoin.amos.supervision.dao.entity.*
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
org.apache.velocity.util.ArrayListWrapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -21,6 +23,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -44,6 +47,24 @@ public class PlanServiceImpl implements IPlanService {
@Autowired
IRouteDao
iRouteDao
;
@Autowired
IPointDao
iPointDao
;
@Autowired
private
PointMapper
pointMapper
;
@Autowired
private
IRoutePointDao
iRoutePointDao
;
@Autowired
private
IRoutePointItemDao
iRoutePointItemDao
;
@Autowired
private
IPointInputItemDao
iPointInputItemDao
;
@Autowired
private
IPlanService
planService
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PlanServiceImpl
.
class
);
@Override
...
...
@@ -80,14 +101,21 @@ public class PlanServiceImpl implements IPlanService {
}
@Override
@Transactional
public
void
addPlan
(
HashMap
<
String
,
Object
>
map
)
{
Plan
param
=
(
Plan
)
map
.
get
(
"param"
);
// 新增路线
AddPlanRequest
addPlanRequest
=
(
AddPlanRequest
)
map
.
get
(
"param"
);
Plan
param
=
addPlanRequest
.
getPlan
();
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_ST
ART
));
param
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_ST
OP
));
param
.
setNextGenDate
(
DateUtil
.
getIntervalDate
(
new
Date
(),
0
));
param
.
setCreateBy
(
userId
);
addPlanRequest
.
setPlan
(
param
);
Route
route
=
save
(
addPlanRequest
);
if
(!
ObjectUtils
.
isEmpty
(
route
))
{
param
.
setRouteId
(
route
.
getId
());
//编辑计划
if
(
param
.
getId
()
>
0
)
{
Plan
oriPlan
=
planDao
.
findById
(
param
.
getId
()).
get
();
...
...
@@ -102,6 +130,58 @@ public class PlanServiceImpl implements IPlanService {
}
planDao
.
save
(
param
);
}
}
/**
* 默认新增路线
*/
public
Route
save
(
AddPlanRequest
addPlanRequest
)
{
Route
saveRoute
=
new
Route
();
Plan
plan
=
addPlanRequest
.
getPlan
();
// 判断是新增还是修改
if
(
plan
.
getId
()>
0
)
{
// 删除相关点项内容
iRoutePointDao
.
delRoutePointByRouteId
(
plan
.
getRouteId
());
iRoutePointItemDao
.
delRoutePointItem
(
plan
.
getRouteId
());
saveRoute
.
setId
(
plan
.
getRouteId
());
}
saveRoute
.
setName
(
plan
.
getName
());
saveRoute
.
setOrgCode
(
plan
.
getOrgCode
());
saveRoute
.
setCreatorId
(
plan
.
getCreateBy
());
Route
route
=
iRouteDao
.
save
(
saveRoute
);
if
(!
ObjectUtils
.
isEmpty
(
route
.
getId
()))
{
// 新增路线与点关系
List
<
Long
>
ownerIds
=
addPlanRequest
.
getOwnerId
();
if
(!
ObjectUtils
.
isEmpty
(
ownerIds
))
{
List
<
Long
>
pointVos
=
pointMapper
.
getPointRouteList
(
ownerIds
);
if
(!
ObjectUtils
.
isEmpty
(
pointVos
))
{
if
(!
ObjectUtils
.
isEmpty
(
pointVos
))
{
pointVos
.
forEach
(
point
->
{
RoutePoint
routePoint
=
new
RoutePoint
();
routePoint
.
setOrgCode
(
plan
.
getOrgCode
());
routePoint
.
setCreatorId
(
plan
.
getCreateBy
());
routePoint
.
setRouteId
(
route
.
getId
());
routePoint
.
setPointId
(
point
);
iRoutePointDao
.
save
(
routePoint
);
});
List
<
PointInputItem
>
pointInputItems
=
pointMapper
.
getPointRouteItem
(
pointVos
);
if
(!
ObjectUtils
.
isEmpty
(
pointInputItems
))
{
pointInputItems
.
forEach
(
pointInputItem
->
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setRoutePointId
(
route
.
getId
());
routePointItem
.
setPointInputItemId
(
pointInputItem
.
getId
());
iRoutePointItemDao
.
save
(
routePointItem
);
});
}
}
}
}
}
return
route
;
}
@Override
@Transactional
...
...
@@ -176,5 +256,22 @@ public class PlanServiceImpl implements IPlanService {
return
planMapper
.
queryPlanListByOrgCode
(
loginOrgCode
);
}
@Override
public
void
setplanstatus
(
Long
id
,
byte
status
)
{
Plan
oriPlan
=
planDao
.
findById
(
id
).
get
();
oriPlan
.
setStatus
(
status
);
planDao
.
save
(
oriPlan
);
}
@Override
public
PlanPointRespone
getplandetails
(
Long
id
)
{
PlanPointRespone
planRequest
=
new
PlanPointRespone
();
Plan
plan
=
planService
.
queryPlanById
(
id
);;
if
(!
ObjectUtils
.
isEmpty
(
plan
))
{
List
<
Long
>
ids
=
pointMapper
.
getPointoriginalidbyrouteid
(
plan
.
getRouteId
());
planRequest
.
setPlan
(
plan
);
planRequest
.
setOwnerId
(
ids
);
}
return
planRequest
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IPlanService.java
View file @
503431e2
...
...
@@ -3,6 +3,9 @@ package com.yeejoin.amos.supervision.business.service.intfc;
import
java.util.HashMap
;
import
java.util.List
;
import
com.yeejoin.amos.supervision.core.common.request.AddPlanRequest
;
import
com.yeejoin.amos.supervision.core.common.response.PlanPointRespone
;
import
com.yeejoin.amos.supervision.dao.entity.Point
;
import
org.springframework.data.domain.Page
;
import
com.yeejoin.amos.supervision.business.param.PlanInfoPageParam
;
...
...
@@ -70,5 +73,13 @@ public interface IPlanService {
*/
List
<
HashMap
<
String
,
Object
>>
queryPlanListByOrgCode
(
String
loginOrgCode
);
/**
* 计划启用停用
*/
void
setplanstatus
(
Long
id
,
byte
status
);
/**
* 获取计划详情
*/
PlanPointRespone
getplandetails
(
Long
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/util/PlanPageParamUtil.java
View file @
503431e2
...
...
@@ -24,6 +24,12 @@ public class PlanPageParamUtil {
param
.
setRemark
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"ownerId"
.
equals
(
name
)){
param
.
setOwnerId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"planStatus"
.
equals
(
name
)){
param
.
setPlanStatus
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"leadPerson"
.
equals
(
name
)){
param
.
setLeadPerson
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"checkTypeId"
.
equals
(
name
)){
param
.
setCheckTypeId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
param
.
setOrgCode
(
perMap
.
get
(
"orgCode"
)
==
null
?
null
:
perMap
.
get
(
"orgCode"
).
toString
());
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan.xml
View file @
503431e2
...
...
@@ -147,6 +147,15 @@
b.owner_name AS ownerName,
b.boss_name as bossName,
a.user_name as userName,
a.check_type_id as checkTypeId,
a.check_type_name as checkTypeName,
a.lead_department_ids as leadDepartmentIds,
a.lead_department_names as leadDepartmentNames,
a.lead_people_ids as leadPersonIds,
a.lead_people_names as leadPersonNames,
a.join_person_ids as joinPersonIds,
a.join_person_names as joinPersonNames,
(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
FROM
...
...
@@ -155,7 +164,8 @@
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.remark1 like concat(concat("%",#{remark}),"%")
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/pointMapper.xml
View file @
503431e2
...
...
@@ -1100,4 +1100,43 @@
#{pointId}
</foreach>
</select>
<select
id=
"getPointRouteList"
parameterType=
"list"
resultType=
"Long"
>
SELECT
ppi.id
FROM
p_point ppi
WHERE
ppi.original_id IN
<foreach
collection=
"list"
open=
"("
close=
")"
separator=
","
item=
"routeId"
>
#{routeId}
</foreach>
</select>
<select
id=
"getPointRouteItem"
parameterType=
"list"
resultType=
"com.yeejoin.amos.supervision.dao.entity.PointInputItem"
>
SELECT
ppi.id
, ppi.input_item_id itemId
, ppi.point_id pointId
, ppi.classify_ids classifyId
FROM
p_point_inputitem ppi
WHERE
ppi.point_id IN
<foreach
collection=
"list"
open=
"("
close=
")"
separator=
","
item=
"pointId"
>
#{pointId}
</foreach>
</select>
<select
id=
"getPointoriginalidbyrouteid"
parameterType=
"long"
resultType=
"Long"
>
SELECT
original_id
FROM
p_point as ppo
LEFT JOIN p_route_point as prp ON
ppo.id = prp.point_id
WHERE
prp.route_id = #{routeId}
</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