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
3eb72617
Commit
3eb72617
authored
Nov 22, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
740a9b48
8c2a9bfb
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
248 additions
and
149 deletions
+248
-149
WaterResourcePoolDto.java
...amos/boot/module/common/api/dto/WaterResourcePoolDto.java
+2
-2
DynamicFormInstanceMapper.xml
...i/src/main/resources/mapper/DynamicFormInstanceMapper.xml
+9
-3
InputItem.java
...in/java/com/yeejoin/amos/patrol/dao/entity/InputItem.java
+2
-0
PointInputItem.java
...va/com/yeejoin/amos/patrol/dao/entity/PointInputItem.java
+3
-0
RoutePointItem.java
...va/com/yeejoin/amos/patrol/dao/entity/RoutePointItem.java
+3
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+7
-5
DynamicFormInstanceServiceImpl.java
...mmon/biz/service/impl/DynamicFormInstanceServiceImpl.java
+4
-4
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+3
-1
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+1
-0
ShiftChangeController.java
...boot/module/jcs/biz/controller/ShiftChangeController.java
+0
-3
ESAlertCalledService.java
...oot/module/jcs/biz/service/impl/ESAlertCalledService.java
+22
-6
RuleAlertCalledService.java
...t/module/jcs/biz/service/impl/RuleAlertCalledService.java
+1
-0
ShiftChangeServiceImpl.java
...t/module/jcs/biz/service/impl/ShiftChangeServiceImpl.java
+5
-26
PointController.java
...join/amos/patrol/business/controller/PointController.java
+77
-53
InputItemMapper.java
...join/amos/patrol/business/dao/mapper/InputItemMapper.java
+7
-1
PointInputItemMapper.java
...amos/patrol/business/dao/mapper/PointInputItemMapper.java
+9
-0
RoutePointItemMapper.java
...amos/patrol/business/dao/mapper/RoutePointItemMapper.java
+5
-1
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+1
-1
RoutePointItemMapper.java
...supervision/business/dao/mapper/RoutePointItemMapper.java
+1
-0
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+70
-43
dbTemplate_input_item.xml
...ol/src/main/resources/db/mapper/dbTemplate_input_item.xml
+16
-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/dto/WaterResourcePoolDto.java
View file @
3eb72617
...
@@ -63,10 +63,10 @@ public class WaterResourcePoolDto extends BaseDto {
...
@@ -63,10 +63,10 @@ public class WaterResourcePoolDto extends BaseDto {
private
String
recUserName
;
private
String
recUserName
;
@ApiModelProperty
(
value
=
"最低报警水位(m)"
)
@ApiModelProperty
(
value
=
"最低报警水位(m)"
)
private
f
loat
minWaterLevel
;
private
F
loat
minWaterLevel
;
@ApiModelProperty
(
value
=
"最高报警水位(m)"
)
@ApiModelProperty
(
value
=
"最高报警水位(m)"
)
private
f
loat
maxWaterLevel
;
private
F
loat
maxWaterLevel
;
@ApiModelProperty
(
"水池液位显示装置id"
)
@ApiModelProperty
(
"水池液位显示装置id"
)
private
Long
levelDeviceId
;
private
Long
levelDeviceId
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DynamicFormInstanceMapper.xml
View file @
3eb72617
...
@@ -105,8 +105,11 @@
...
@@ -105,8 +105,11 @@
</select>
</select>
<select
id=
"pageList"
resultType=
"java.util.Map"
>
<select
id=
"pageList"
resultType=
"java.util.Map"
>
select
select
d.*
d.*,
jsc.*
from
from
jc_shift_change jsc
LEFT JOIN
(
(
select
select
i.INSTANCE_ID instanceId,
i.INSTANCE_ID instanceId,
...
@@ -130,10 +133,10 @@
...
@@ -130,10 +133,10 @@
</if>
</if>
</foreach>
</foreach>
GROUP by
GROUP by
i.INSTANCE_ID) d
i.INSTANCE_ID) d
on jsc.instance_id = d.instanceId
<if
test=
"params != null and params.size() > 0"
>
<if
test=
"params != null and params.size() > 0"
>
where
where
1=1
jsc.is_delete = 0
<foreach
collection=
"params"
index=
"key"
item=
"value"
separator=
""
>
<foreach
collection=
"params"
index=
"key"
item=
"value"
separator=
""
>
<choose>
<choose>
<when
test=
"fieldCodes[key] == 'like' and value !=null and value !=''"
>
<when
test=
"fieldCodes[key] == 'like' and value !=null and value !=''"
>
...
@@ -151,6 +154,9 @@
...
@@ -151,6 +154,9 @@
<if
test=
"params.date != null and params.lift == 'descend'"
>
<if
test=
"params.date != null and params.lift == 'descend'"
>
order by endDate desc
order by endDate desc
</if>
</if>
<if
test=
"params.systemType != null and params.systemType != '' "
>
jsc.system_type is not null
</if>
<if
test=
"params.date != null and params.lift == 'ascend'"
>
<if
test=
"params.date != null and params.lift == 'ascend'"
>
order by endDate ASC
order by endDate ASC
</if>
</if>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/InputItem.java
View file @
3eb72617
...
@@ -6,6 +6,7 @@ import javax.persistence.Lob;
...
@@ -6,6 +6,7 @@ import javax.persistence.Lob;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.hibernate.annotations.Where
;
import
org.hibernate.annotations.Where
;
...
@@ -16,6 +17,7 @@ import org.hibernate.annotations.Where;
...
@@ -16,6 +17,7 @@ import org.hibernate.annotations.Where;
@Table
(
name
=
"p_input_item"
)
@Table
(
name
=
"p_input_item"
)
@NamedQuery
(
name
=
"InputItem.findAll"
,
query
=
"SELECT c FROM InputItem c"
)
@NamedQuery
(
name
=
"InputItem.findAll"
,
query
=
"SELECT c FROM InputItem c"
)
@Where
(
clause
=
"is_delete=0"
)
//表示未删除的数据
@Where
(
clause
=
"is_delete=0"
)
//表示未删除的数据
@TableName
(
"p_input_item"
)
public
class
InputItem
extends
BasicEntity
{
public
class
InputItem
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/PointInputItem.java
View file @
3eb72617
package
com
.
yeejoin
.
amos
.
patrol
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
patrol
.
dao
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
...
@@ -11,6 +13,7 @@ import javax.persistence.Table;
...
@@ -11,6 +13,7 @@ import javax.persistence.Table;
*/
*/
@Entity
@Entity
@Table
(
name
=
"p_point_inputitem"
)
@Table
(
name
=
"p_point_inputitem"
)
@TableName
(
"p_point_inputitem"
)
@NamedQuery
(
name
=
"PointInputItem.findAll"
,
query
=
"SELECT p FROM PointInputItem p"
)
@NamedQuery
(
name
=
"PointInputItem.findAll"
,
query
=
"SELECT p FROM PointInputItem p"
)
public
class
PointInputItem
extends
BasicEntity
{
public
class
PointInputItem
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/RoutePointItem.java
View file @
3eb72617
...
@@ -8,6 +8,8 @@ import javax.persistence.NamedQuery;
...
@@ -8,6 +8,8 @@ import javax.persistence.NamedQuery;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
javax.persistence.Transient
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
...
@@ -17,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonBackReference;
...
@@ -17,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonBackReference;
*/
*/
@Entity
@Entity
@Table
(
name
=
"p_route_point_item"
)
@Table
(
name
=
"p_route_point_item"
)
@TableName
(
"p_route_point_item"
)
@NamedQuery
(
name
=
"RoutePointItem.findAll"
,
query
=
"SELECT r FROM RoutePointItem r"
)
@NamedQuery
(
name
=
"RoutePointItem.findAll"
,
query
=
"SELECT r FROM RoutePointItem r"
)
public
class
RoutePointItem
extends
BasicEntity
{
public
class
RoutePointItem
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
3eb72617
...
@@ -422,17 +422,19 @@ public class CommandController extends BaseController {
...
@@ -422,17 +422,19 @@ public class CommandController extends BaseController {
QueryWrapper
<
AirportStand
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AirportStand
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"stand_code"
,
alertFormValue
.
getFieldValue
());
queryWrapper
.
eq
(
"stand_code"
,
alertFormValue
.
getFieldValue
());
AirportStand
airportStand
=
airportStandMapper
.
selectOne
(
queryWrapper
);
AirportStand
airportStand
=
airportStandMapper
.
selectOne
(
queryWrapper
);
//机位坐标
par
.
setLatitude
(
Double
.
valueOf
(
airportStand
.
getLatitude
()));
par
.
setLatitude
(
Double
.
valueOf
(
airportStand
.
getLatitude
()));
par
.
setLongitude
(
Double
.
valueOf
(
airportStand
.
getLongitude
()));
par
.
setLongitude
(
Double
.
valueOf
(
airportStand
.
getLongitude
()));
}
}
}
}
//集结点坐标
par
.
setLatitudeTwo
(
alertCalled
.
getCoordinateX
());
par
.
setLatitudeTwo
(
alertCalled
.
getCoordinateX
());
par
.
setLongitudeTwo
(
alertCalled
.
getCoordinateY
());
par
.
setLongitudeTwo
(
alertCalled
.
getCoordinateY
());
break
;
break
;
case
"229"
:
case
"229"
:
//一般火灾
if
(
alertCalled
.
getAlertSourceCode
().
equals
(
"1326"
)){
par
.
setLatitude
(
alertCalled
.
getCoordinateX
());
par
.
setLongitude
(
alertCalled
.
getCoordinateY
());
if
(
alertCalled
.
getAlertSourceCode
().
equals
(
"1326"
)){
//警情来源为物联报警的
result
=
this
.
getDetailsById
(
Long
.
valueOf
(
alertCalled
.
getRelationId
()),
null
,
null
,
null
);
result
=
this
.
getDetailsById
(
Long
.
valueOf
(
alertCalled
.
getRelationId
()),
null
,
null
,
null
);
par
.
setLatitudeTwo
(
alertCalled
.
getCoordinateX
());
par
.
setLatitudeTwo
(
alertCalled
.
getCoordinateX
());
par
.
setLongitudeTwo
(
alertCalled
.
getCoordinateY
());
par
.
setLongitudeTwo
(
alertCalled
.
getCoordinateY
());
...
@@ -453,7 +455,7 @@ public class CommandController extends BaseController {
...
@@ -453,7 +455,7 @@ public class CommandController extends BaseController {
}
}
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
null
;
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
null
;
if
(
ValidationUtil
.
isEmpty
(
par
.
getLatitude
Two
())
){
if
(
ValidationUtil
.
isEmpty
(
par
.
getLatitude
())
){
data
=
equipFeignClient
.
getVideopagList
(
String
.
valueOf
((
pageNum
-
1
)
*
pageSize
),
pageSize
.
toString
(),
par
.
getBuildingId
(),
par
.
getCode
(),
par
.
getEquipmentName
(),
par
.
getBizOrgCode
(),
par
.
getType
());
data
=
equipFeignClient
.
getVideopagList
(
String
.
valueOf
((
pageNum
-
1
)
*
pageSize
),
pageSize
.
toString
(),
par
.
getBuildingId
(),
par
.
getCode
(),
par
.
getEquipmentName
(),
par
.
getBizOrgCode
(),
par
.
getType
());
}
else
{
}
else
{
data
=
equipFeignClient
.
pageVideoByAlertType
(
pageNum
,
pageSize
,
par
);
data
=
equipFeignClient
.
pageVideoByAlertType
(
pageNum
,
pageSize
,
par
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DynamicFormInstanceServiceImpl.java
View file @
3eb72617
...
@@ -128,14 +128,13 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
...
@@ -128,14 +128,13 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
return
this
.
baseMapper
.
selectList
(
wrapper
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
}
public
IPage
<
Map
<
String
,
Object
>>
pageList
(
int
current
,
int
size
,
String
groupCode
)
{
public
IPage
<
Map
<
String
,
Object
>>
pageList
(
int
current
,
int
size
,
String
groupCode
,
String
systemType
)
{
Map
<
String
,
String
>
params
=
this
.
getRequestParamMap
();
Map
<
String
,
String
>
params
=
this
.
getRequestParamMap
();
//systemType 不是null 则查询的为120系统交接班
List
<
DynamicFormColumn
>
columns
=
dynamicFormColumnService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
List
<
DynamicFormColumn
>
columns
=
dynamicFormColumnService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
Map
<
String
,
Object
>
fieldCodes
=
Bean
.
listToMap
(
columns
,
"fieldCode"
,
"queryStrategy"
,
DynamicFormColumn
.
class
);
Map
<
String
,
Object
>
fieldCodes
=
Bean
.
listToMap
(
columns
,
"fieldCode"
,
"queryStrategy"
,
DynamicFormColumn
.
class
);
Page
page
=
new
Page
();
Page
page
=
new
Page
();
if
(
current
>
0
){
page
.
setCurrent
(
current
);
page
.
setCurrent
((
long
)
(
current
-
1
)
*
size
);
}
page
.
setSize
(
size
);
page
.
setSize
(
size
);
if
(!
params
.
isEmpty
()&&
params
!=
null
){
if
(!
params
.
isEmpty
()&&
params
!=
null
){
if
(!
params
.
get
(
"sort"
).
isEmpty
()
&&
params
.
get
(
"sort"
)
!=
null
){
if
(!
params
.
get
(
"sort"
).
isEmpty
()
&&
params
.
get
(
"sort"
)
!=
null
){
...
@@ -144,6 +143,7 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
...
@@ -144,6 +143,7 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
params
.
put
(
"lift"
,
sorts
[
1
]);
params
.
put
(
"lift"
,
sorts
[
1
]);
}
}
}
}
return
this
.
getBaseMapper
().
pageList
(
page
,
RequestContext
.
getAppKey
(),
fieldCodes
,
groupCode
,
params
);
return
this
.
getBaseMapper
().
pageList
(
page
,
RequestContext
.
getAppKey
(),
fieldCodes
,
groupCode
,
params
);
}
}
// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
...
...
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 @
3eb72617
...
@@ -3135,7 +3135,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -3135,7 +3135,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if
(
map1
.
containsKey
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
))){
if
(
map1
.
containsKey
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
))){
dynamicFormInstance
.
setFieldValueLabel
(
map1
.
get
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
)).
toString
());
dynamicFormInstance
.
setFieldValueLabel
(
map1
.
get
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
)).
toString
());
}
}
if
(
"birthdayTime"
.
equals
(
dynamicFormInstance
.
getFieldCode
())
&&
ObjectUtils
.
isEmpty
(
peopleInfoDto
.
getFirefighters
().
getBirthdayTime
())){
dynamicFormInstance
.
setFieldValue
(
null
);
}
dynamicFormInstancelist
.
add
(
dynamicFormInstance
);
dynamicFormInstancelist
.
add
(
dynamicFormInstance
);
});
});
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
3eb72617
...
@@ -171,6 +171,7 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -171,6 +171,7 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
waterResourceNaturalService
.
createWithModel
(
waterResourceNaturalDto
);
waterResourceNaturalService
.
createWithModel
(
waterResourceNaturalDto
);
break
;
break
;
case
"industryPool"
:
case
"industryPool"
:
case
"waterTank"
:
case
"pool"
:
case
"pool"
:
// 新增基础信息
// 新增基础信息
model
.
setIsIot
(
true
);
model
.
setIsIot
(
true
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ShiftChangeController.java
View file @
3eb72617
...
@@ -104,9 +104,6 @@ public class ShiftChangeController extends BaseController {
...
@@ -104,9 +104,6 @@ public class ShiftChangeController extends BaseController {
public
ResponseModel
queryForPage
(
public
ResponseModel
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
@RequestParam
(
value
=
"size"
)
int
size
)
{
if
(
current
>=
1
){
current
=
(
current
-
1
)*
size
;
}
return
ResponseHelper
.
buildResponse
(
iShiftChangeService
.
queryForShiftChangePage
(
current
,
size
));
return
ResponseHelper
.
buildResponse
(
iShiftChangeService
.
queryForShiftChangePage
(
current
,
size
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ESAlertCalledService.java
View file @
3eb72617
...
@@ -261,12 +261,20 @@ public class ESAlertCalledService {
...
@@ -261,12 +261,20 @@ public class ESAlertCalledService {
boolMustAll
.
must
(
qb0
);
boolMustAll
.
must
(
qb0
);
}
}
//接警时间,距离当前时间不超过48小时的
long
currentTime
=
System
.
currentTimeMillis
();
currentTime
=
currentTime
-
60
*
60
*
1000
*
48
;
BoolQueryBuilder
qb9
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
));
boolMustAll
.
must
(
qb9
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
//接警时间,距离当前时间不超过半小时的
//接警时间,距离当前时间不超过半小时的
long
currentTime
=
System
.
currentTimeMillis
();
long
currentTime
2
=
System
.
currentTimeMillis
();
currentTime
=
currentTime
-
30
*
60
*
1000
;
currentTime
2
=
currentTime2
-
30
*
60
*
1000
;
BoolQueryBuilder
qb1
=
QueryBuilders
.
boolQuery
()
BoolQueryBuilder
qb1
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
));
.
must
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
2
));
boolMust
.
should
(
qb1
);
boolMust
.
should
(
qb1
);
//报警人及报警电话一致
//报警人及报警电话一致
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
()))
{
...
@@ -404,12 +412,20 @@ public class ESAlertCalledService {
...
@@ -404,12 +412,20 @@ public class ESAlertCalledService {
}
}
boolMustAll
.
must
(
qb0
);
boolMustAll
.
must
(
qb0
);
//接警时间,距离当前时间不超过48小时的
long
currentTime
=
System
.
currentTimeMillis
();
currentTime
=
currentTime
-
60
*
60
*
1000
*
48
;
BoolQueryBuilder
qb9
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
));
boolMustAll
.
must
(
qb9
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
//接警时间,距离当前时间不超过半小时的
//接警时间,距离当前时间不超过半小时的
long
currentTime
=
System
.
currentTimeMillis
();
currentTime
=
currentTime
-
30
*
60
*
1000
;
long
currentTime2
=
System
.
currentTimeMillis
();
currentTime2
=
currentTime2
-
30
*
60
*
1000
;
BoolQueryBuilder
qb1
=
QueryBuilders
.
boolQuery
()
BoolQueryBuilder
qb1
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
));
.
must
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
2
));
boolMust
.
should
(
qb1
);
boolMust
.
should
(
qb1
);
//报警人及报警电话一致
//报警人及报警电话一致
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
()))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/RuleAlertCalledService.java
View file @
3eb72617
...
@@ -78,6 +78,7 @@ public class RuleAlertCalledService {
...
@@ -78,6 +78,7 @@ public class RuleAlertCalledService {
// 警情 报送类型
// 警情 报送类型
alertCalledRo
.
setAlertWay
(
alertWay
);
alertCalledRo
.
setAlertWay
(
alertWay
);
alertCalledRo
.
setCallTimeStr
(
alertCalledVo
.
getAlertCalled
().
getCallTime
().
toString
());
alertCalledRo
.
setReplaceContent
(
replaceContent
);
alertCalledRo
.
setReplaceContent
(
replaceContent
);
alertCalledRo
.
setUsIds
(
usIds
);
alertCalledRo
.
setUsIds
(
usIds
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ShiftChangeServiceImpl.java
View file @
3eb72617
...
@@ -4,15 +4,13 @@ import java.io.IOException;
...
@@ -4,15 +4,13 @@ import java.io.IOException;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Comparator
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -98,33 +96,14 @@ public class ShiftChangeServiceImpl extends BaseService<ShiftChangeDto, ShiftCha
...
@@ -98,33 +96,14 @@ public class ShiftChangeServiceImpl extends BaseService<ShiftChangeDto, ShiftCha
@Override
@Override
public
IPage
<
Map
<
String
,
Object
>>
queryForShiftChangePage
(
int
current
,
int
size
)
{
public
IPage
<
Map
<
String
,
Object
>>
queryForShiftChangePage
(
int
current
,
int
size
)
{
IPage
<
Map
<
String
,
Object
>>
page
=
dynamicFormInstanceService
.
pageList
(
current
,
size
,
GROUP_CODE
);
LambdaQueryWrapper
<
ShiftChange
>
wrapper
=
new
LambdaQueryWrapper
<>();
IPage
<
Map
<
String
,
Object
>>
page
=
dynamicFormInstanceService
.
pageList
(
current
,
size
,
GROUP_CODE
,
""
);
wrapper
.
isNull
(
ShiftChange:
:
getSystemType
);
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
List
<
ShiftChange
>
shiftChanges
=
this
.
baseMapper
.
selectList
(
wrapper
);
Map
<
Long
,
ShiftChange
>
shiftChangeMap
=
shiftChanges
.
stream
().
collect
(
Collectors
.
toMap
(
ShiftChange:
:
getInstanceId
,
Function
.
identity
()));
page
.
getRecords
().
forEach
(
r
->{
//instanceId 必输 所以未进行 null判断
ShiftChange
shiftChange
=
shiftChangeMap
.
get
(
Long
.
parseLong
(
r
.
get
(
"instanceId"
).
toString
()));
r
.
putAll
(
Bean
.
BeantoMap
(
shiftChange
));
});
return
page
;
return
page
;
}
}
@Override
@Override
public
IPage
<
Map
<
String
,
Object
>>
queryForShiftChangePageByAid
(
int
current
,
int
size
)
{
public
IPage
<
Map
<
String
,
Object
>>
queryForShiftChangePageByAid
(
int
current
,
int
size
)
{
IPage
<
Map
<
String
,
Object
>>
page
=
dynamicFormInstanceService
.
pageList
(
current
,
size
,
GROUP_CODE
);
IPage
<
Map
<
String
,
Object
>>
page
=
dynamicFormInstanceService
.
pageList
(
current
,
size
,
GROUP_CODE
,
"1214"
);
LambdaQueryWrapper
<
ShiftChange
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ShiftChange:
:
getSystemType
,
"120"
);
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
List
<
ShiftChange
>
shiftChanges
=
this
.
baseMapper
.
selectList
(
wrapper
);
Map
<
Long
,
ShiftChange
>
shiftChangeMap
=
shiftChanges
.
stream
().
collect
(
Collectors
.
toMap
(
ShiftChange:
:
getInstanceId
,
Function
.
identity
()));
page
.
getRecords
().
forEach
(
r
->{
//instanceId 必输 所以未进行 null判断
ShiftChange
shiftChange
=
shiftChangeMap
.
get
(
Long
.
parseLong
(
r
.
get
(
"instanceId"
).
toString
()));
r
.
putAll
(
Bean
.
BeantoMap
(
shiftChange
));
});
return
page
;
return
page
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
3eb72617
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
controller
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointInputItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
...
@@ -22,6 +26,7 @@ import org.springframework.data.domain.PageImpl;
...
@@ -22,6 +26,7 @@ import org.springframework.data.domain.PageImpl;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
@@ -104,6 +109,15 @@ public class PointController extends AbstractBaseController {
...
@@ -104,6 +109,15 @@ public class PointController extends AbstractBaseController {
@Autowired
@Autowired
private
IRoutePointItemDao
iRoutePointItemDao
;
private
IRoutePointItemDao
iRoutePointItemDao
;
@Autowired
private
InputItemMapper
inputItemMapper
;
@Autowired
private
PointInputItemMapper
pointInputItemMapper
;
@Autowired
private
RoutePointItemMapper
routePointItemMapper
;
/**
/**
*
*
* 新增接口
* 新增接口
...
@@ -181,7 +195,7 @@ public class PointController extends AbstractBaseController {
...
@@ -181,7 +195,7 @@ public class PointController extends AbstractBaseController {
}
}
@Transactional
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡查对象"
,
notes
=
"新增巡查对象"
)
@ApiOperation
(
value
=
"新增巡查对象"
,
notes
=
"新增巡查对象"
)
@PostMapping
(
value
=
"/addPointXcdx"
,
produces
=
"application/json;charset=UTF-8"
)
@PostMapping
(
value
=
"/addPointXcdx"
,
produces
=
"application/json;charset=UTF-8"
)
...
@@ -191,48 +205,52 @@ public class PointController extends AbstractBaseController {
...
@@ -191,48 +205,52 @@ public class PointController extends AbstractBaseController {
List
<
RoutePoint
>
routePointList
=
iRoutePointDao
.
queryByPointId
(
pointClassify
.
getPointId
());
List
<
RoutePoint
>
routePointList
=
iRoutePointDao
.
queryByPointId
(
pointClassify
.
getPointId
());
AgencyUserModel
user
=
getUserInfo
();
AgencyUserModel
user
=
getUserInfo
();
PointClassify
newPointClassify
=
new
PointClassify
();
PointClassify
newPointClassify
=
new
PointClassify
();
List
<
PointInputItemVo
>
customInputList
=
pointClassify
.
getEquipIputDetailData
();
//巡检项
newPointClassify
.
setEquipmentId
(
pointClassify
.
getEquipmentId
());
if
(
pointClassify
.
getId
()==
null
){
newPointClassify
.
setName
(
pointClassify
.
getName
());
newPointClassify
.
setInspectionSpecName
(
pointClassify
.
getInspectionName
());
newPointClassify
.
setEquipmentId
(
pointClassify
.
getEquipmentId
());
newPointClassify
.
setCreatorId
(
user
.
getUserId
());
newPointClassify
.
setName
(
pointClassify
.
getName
());
newPointClassify
.
setPointId
(
pointClassify
.
getPointId
());
newPointClassify
.
setInspectionSpecName
(
pointClassify
.
getInspectionName
());
newPointClassify
.
setOrderNo
(
0
);
newPointClassify
.
setCreatorId
(
user
.
getUserId
());
newPointClassify
.
setDataSourceCode
(
pointClassify
.
getDataSourceCode
());
newPointClassify
.
setPointId
(
pointClassify
.
getPointId
());
newPointClassify
.
setDataSourceName
(
pointClassify
.
getDataSourceName
());
newPointClassify
.
setOrderNo
(
0
);
newPointClassify
.
setAddress
(
pointClassify
.
getAddress
());
newPointClassify
.
setDataSourceCode
(
pointClassify
.
getDataSourceCode
());
newPointClassify
.
setBuildingId
(
pointClassify
.
getBuildingId
());
newPointClassify
.
setDataSourceName
(
pointClassify
.
getDataSourceName
());
if
(
pointClassify
.
getBuildingName
()==
null
){
newPointClassify
.
setAddress
(
pointClassify
.
getAddress
());
FeignClientResult
responseModel
=
equipFeign
.
getBuildingTreeOne
(
pointClassify
.
getBuildingId
());
newPointClassify
.
setBuildingId
(
pointClassify
.
getBuildingId
());
if
(
ObjectUtils
.
isEmpty
(
responseModel
.
getResult
())
||
responseModel
.
getStatus
()
!=
HttpStatus
.
OK
.
value
())
{
if
(
pointClassify
.
getBuildingName
()==
null
){
throw
new
RuntimeException
(
responseModel
.
getDevMessage
());
FeignClientResult
responseModel
=
equipFeign
.
getBuildingTreeOne
(
pointClassify
.
getBuildingId
());
if
(
ObjectUtils
.
isEmpty
(
responseModel
.
getResult
())
||
responseModel
.
getStatus
()
!=
HttpStatus
.
OK
.
value
())
{
throw
new
RuntimeException
(
responseModel
.
getDevMessage
());
}
else
{
Map
<
String
,
Object
>
dat
=(
Map
<
String
,
Object
>)
responseModel
.
getResult
();
newPointClassify
.
setBuildingName
(
dat
.
get
(
"name"
).
toString
());
}
}
else
{
}
else
{
newPointClassify
.
setBuildingName
(
pointClassify
.
getBuildingName
());
Map
<
String
,
Object
>
dat
=(
Map
<
String
,
Object
>)
responseModel
.
getResult
();
newPointClassify
.
setBuildingName
(
dat
.
get
(
"name"
).
toString
());
}
}
}
else
{
newPointClassify
.
setBuildingName
(
pointClassify
.
getBuildingName
());
}
if
(
pointClassify
.
getOriginalId
()!=
null
){
if
(
pointClassify
.
getOriginalId
()!=
null
){
newPointClassify
.
setOriginalId
(
pointClassify
.
getOriginalId
());
newPointClassify
.
setOriginalId
(
pointClassify
.
getOriginalId
());
}
else
{
}
else
{
String
uuid
=
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
String
uuid
=
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
newPointClassify
.
setOriginalId
(
uuid
.
substring
(
0
,
16
));
newPointClassify
.
setOriginalId
(
uuid
.
substring
(
0
,
16
));
}
}
newPointClassify
.
setCategoryCode
(
pointClassify
.
getCategoryCode
());
if
(
null
!=
pointClassify
.
getId
())
{
newPointClassify
.
setCategoryName
(
pointClassify
.
getCategoryName
());
newPointClassify
.
setId
(
pointClassify
.
getId
());
newPointClassify
.
setCode
(
pointClassify
.
getCode
());
}
iPointService
.
addPointClassifyByPointId
(
newPointClassify
);
newPointClassify
.
setCategoryCode
(
pointClassify
.
getCategoryCode
());
newPointClassify
.
setCategoryName
(
pointClassify
.
getCategoryName
());
newPointClassify
.
setCode
(
pointClassify
.
getCode
());
List
<
PointInputItemVo
>
customInputList
=
pointClassify
.
getEquipIputDetailData
();
//巡检项
iPointService
.
addPointClassifyByPointId
(
newPointClassify
);
List
<
PointInputItemVo
>
oldInputItemList
=
new
ArrayList
<>();
List
<
Long
>
collect
=
new
ArrayList
<>();
if
(
pointClassify
.
getId
()==
null
){
pointClassify
.
setId
(
newPointClassify
.
getId
());
}
else
{
}
else
{
newPointClassify
.
setId
(
pointClassify
.
getId
());
newPointClassify
.
setId
(
pointClassify
.
getId
());
List
<
PointInputItemVo
>
oldInputItemList
=
iPointService
.
queryOldPointInputItemNew
(
pointClassify
.
getPointId
(),
pointClassify
.
getId
());
// 新的巡检项的补集,即需要删除的项
oldInputItemList
=
iPointService
.
queryOldPointInputItemNew
(
pointClassify
.
getPointId
(),
pointClassify
.
getId
());
// 新的巡检项的补集,即需要删除的项
collect
=
oldInputItemList
.
stream
().
map
(
PointInputItemVo:
:
getPointItemId
).
collect
(
Collectors
.
toList
());
List
<
PointInputItemVo
>
newInputItemList
=
new
ArrayList
<>();
List
<
PointInputItemVo
>
newInputItemList
=
new
ArrayList
<>();
List
<
PointInputItemVo
>
classList
=
pointClassify
.
getEquipIputDetailData
();
List
<
PointInputItemVo
>
classList
=
pointClassify
.
getEquipIputDetailData
();
newInputItemList
.
addAll
(
classList
);
newInputItemList
.
addAll
(
classList
);
...
@@ -251,8 +269,9 @@ public class PointController extends AbstractBaseController {
...
@@ -251,8 +269,9 @@ public class PointController extends AbstractBaseController {
}
}
});
});
if
(
pItemIds
.
size
()
>
0
)
{
if
(
pItemIds
.
size
()
>
0
)
{
iPointInputItemDao
.
delPointInputItemById
(
pItemIds
);
inputItemMapper
.
delPointInputItemById
(
pItemIds
);
iRoutePointItemDao
.
delRoutePointItemByItemId
(
pItemIds
);
// 删除p_route_point_item中使用到该项的行
// iPointInputItemDao.delPointInputItemById(pItemIds);
inputItemMapper
.
delRoutePointItemByItemId
(
pItemIds
);
// 删除p_route_point_item中使用到该项的行
}
}
}
}
...
@@ -264,31 +283,36 @@ public class PointController extends AbstractBaseController {
...
@@ -264,31 +283,36 @@ public class PointController extends AbstractBaseController {
pointInputItem
.
setPointId
(
pointClassify
.
getPointId
());
pointInputItem
.
setPointId
(
pointClassify
.
getPointId
());
pointInputItem
.
setInputItemId
(
pItemVo
.
getId
());
pointInputItem
.
setInputItemId
(
pItemVo
.
getId
());
pointInputItem
.
setClassifyIds
(
Long
.
valueOf
(
newPointClassify
.
getId
()).
toString
());
pointInputItem
.
setClassifyIds
(
Long
.
valueOf
(
newPointClassify
.
getId
()).
toString
());
pointInputItem
.
setId
(
0
);
//
pointInputItem.setId(0);
pointInputItem
.
setOrderNo
(
pItemVo
.
getpOrderNo
());
pointInputItem
.
setOrderNo
(
pItemVo
.
getpOrderNo
());
PointInputItem
pointInputItemResult
=
iPointInputItemDao
.
save
(
pointInputItem
);
pointInputItemMapper
.
insert
(
pointInputItem
);
// PointInputItem pointInputItemResult = iPointInputItemDao.save(pointInputItem);
//更新巡检路线
//更新巡检路线
if
(
routePointList
.
size
()>
0
){
if
(
routePointList
.
size
()>
0
){
Long
classifyId
=
newPointClassify
.
getId
();
Long
classifyId
=
newPointClassify
.
getId
();
for
(
RoutePoint
routePoint
:
routePointList
)
{
for
(
RoutePoint
routePoint
:
routePointList
)
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setPointClassifyId
(
classifyId
);
routePointItem
.
setPointClassifyId
(
classifyId
);
routePointItem
.
setPointInputItemId
(
pointInputItem
Result
.
getId
());
routePointItem
.
setPointInputItemId
(
pointInputItem
.
getId
());
routePointItem
.
setRoutePointId
(
routePoint
.
getId
());
routePointItem
.
setRoutePointId
(
routePoint
.
getId
());
iRoutePointItemDao
.
save
(
routePointItem
);
routePointItemMapper
.
insert
(
routePointItem
);
// iRoutePointItemDao.save(routePointItem);
}
}
}
else
{
if
(!
collect
.
contains
(
pItemVo
.
getPointItemId
()))
{
pointInputItem
.
setId
(
pItemVo
.
getPointItemId
());
pointInputItem
.
setInputItemId
(
pItemVo
.
getId
());
pointInputItem
.
setPointId
(
pointClassify
.
getPointId
());
pointInputItem
.
setClassifyIds
(
Long
.
valueOf
(
newPointClassify
.
getId
()).
toString
());
pointInputItem
.
setId
(
pItemVo
.
getPointItemId
());
pointInputItem
.
setOrderNo
(
pItemVo
.
getpOrderNo
());
pointInputItemMapper
.
insert
(
pointInputItem
);
// iPointInputItemDao.save(pointInputItem);
}
}
}
}
}
else
{
pointInputItem
.
setId
(
pItemVo
.
getPointItemId
());
pointInputItem
.
setInputItemId
(
pItemVo
.
getId
());
pointInputItem
.
setPointId
(
pointClassify
.
getPointId
());
pointInputItem
.
setClassifyIds
(
Long
.
valueOf
(
newPointClassify
.
getId
()).
toString
());
pointInputItem
.
setId
(
pItemVo
.
getPointItemId
());
pointInputItem
.
setOrderNo
(
pItemVo
.
getpOrderNo
());
iPointInputItemDao
.
save
(
pointInputItem
);
}
}
}
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
(
pointClassify
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/InputItemMapper.java
View file @
3eb72617
...
@@ -4,6 +4,7 @@ import java.util.HashMap;
...
@@ -4,6 +4,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.patrol.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.patrol.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.patrol.dao.entity.PointInputItem
;
import
com.yeejoin.amos.patrol.dao.entity.PointInputItem
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -15,7 +16,8 @@ import com.yeejoin.amos.patrol.dao.entity.InputItem;
...
@@ -15,7 +16,8 @@ import com.yeejoin.amos.patrol.dao.entity.InputItem;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
@Repository
@Repository
public
interface
InputItemMapper
extends
BaseMapper
{
@Mapper
public
interface
InputItemMapper
extends
BaseMapper
<
InputItem
>
{
/**
/**
* 新接口
* 新接口
...
@@ -62,4 +64,8 @@ public interface InputItemMapper extends BaseMapper {
...
@@ -62,4 +64,8 @@ public interface InputItemMapper extends BaseMapper {
public
List
<
PointInputItemVo
>
queryCustomInputItemByPointId
(
@Param
(
"classifyId"
)
String
classifyId
);
public
List
<
PointInputItemVo
>
queryCustomInputItemByPointId
(
@Param
(
"classifyId"
)
String
classifyId
);
public
PointInputItemVo
getInputItemByEquipmentName
(
@Param
(
"equipmentName"
)
String
equipmentName
);
public
PointInputItemVo
getInputItemByEquipmentName
(
@Param
(
"equipmentName"
)
String
equipmentName
);
void
delPointInputItemById
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
void
delRoutePointItemByItemId
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PointInputItemMapper.java
0 → 100644
View file @
3eb72617
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.patrol.dao.entity.PointInputItem
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
PointInputItemMapper
extends
BaseMapper
<
PointInputItem
>
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/RoutePointItemMapper.java
View file @
3eb72617
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.patrol.dao.entity.RoutePointItem
;
import
com.yeejoin.amos.patrol.dao.entity.RoutePointItem
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
public
interface
RoutePointItemMapper
extends
BaseMapper
{
@Mapper
public
interface
RoutePointItemMapper
extends
BaseMapper
<
RoutePointItem
>
{
public
void
updateRoutePointItem
(
RoutePointItem
pointItem
);
public
void
updateRoutePointItem
(
RoutePointItem
pointItem
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
3eb72617
...
@@ -137,7 +137,7 @@ public class PointServiceImpl implements IPointService {
...
@@ -137,7 +137,7 @@ public class PointServiceImpl implements IPointService {
@Override
@Override
public
void
addPointClassifyByPointId
(
PointClassify
pointClassify
)
{
public
void
addPointClassifyByPointId
(
PointClassify
pointClassify
)
{
iPointClassifyDao
.
save
(
pointClassify
);
iPointClassifyDao
.
save
AndFlush
(
pointClassify
);
}
}
...
...
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 @
3eb72617
...
@@ -4,6 +4,7 @@ package com.yeejoin.amos.supervision.business.dao.mapper;
...
@@ -4,6 +4,7 @@ package com.yeejoin.amos.supervision.business.dao.mapper;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
3eb72617
...
@@ -359,7 +359,7 @@
...
@@ -359,7 +359,7 @@
<select
id=
"pageBuildingVideoList"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO"
>
<select
id=
"pageBuildingVideoList"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO"
>
select a.* from (
select a.* from (
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
SELECT
SELECT
v.id AS id,
v.id AS id,
v.name AS name,
v.name AS name,
...
@@ -372,7 +372,7 @@
...
@@ -372,7 +372,7 @@
<choose>
<choose>
<when
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
<when
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
JOIN wl_video_source vc ON vc.video_id = v.id
JOIN wl_video_source vc ON vc.video_id = v.id
join
wl_form_instance wfl on wfl.instance_id = vc.source_id
JOIN
wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
WHERE
FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids)
FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids)
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
...
@@ -387,6 +387,9 @@
...
@@ -387,6 +387,9 @@
<if
test=
"dto.type!=null and dto.type!=''"
>
<if
test=
"dto.type!=null and dto.type!=''"
>
and v.type = #{dto.type}
and v.type = #{dto.type}
</if>
</if>
<if
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
and v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
</if>
GROUP BY id
GROUP BY id
</when>
</when>
<when
test=
'dto.buildingId == null || dto.buildingId ==""'
>
<when
test=
'dto.buildingId == null || dto.buildingId ==""'
>
...
@@ -410,37 +413,36 @@
...
@@ -410,37 +413,36 @@
GROUP BY id
GROUP BY id
</when>
</when>
</choose>
</choose>
UNION
</if>
SELECT
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
v.address,
v.preset_position as presetPosition
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
<if
test=
"dto.code!=null and dto.code!=''"
>
and v.code like concat('%',#{dto.code},'%')
</if>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if
test=
" dto.ip!=null and dto.ip!=''"
>
and v.ip like concat('%',#{dto.ip},'%')
</if>
<if
test=
"dto.type!=null and dto.type!=''"
>
and v.type =#{dto.type}
</if>
GROUP BY id
) AS a limit #{current},#{size}
) AS a limit #{current},#{size}
</select>
</select>
<!-- UNION
SELECT
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
v.address,
v.preset_position as presetPosition
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
<if test="dto.code!=null and dto.code!=''">
and v.code like concat('%',#{dto.code},'%')
</if>
<if test="dto.equipmentName!=null and dto.equipmentName!=''">
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if test=" dto.ip!=null and dto.ip!=''">
and v.ip like concat('%',#{dto.ip},'%')
</if>
<if test="dto.type!=null and dto.type!=''">
and v.type =#{dto.type}
</if>
GROUP BY id
) AS a limit #{current},#{size}-->
<select
id=
"pageBuildingVideoCount"
resultType=
"int"
>
<select
id=
"pageBuildingVideoCount"
resultType=
"int"
>
select count(a.id) from (
select count(a.id) from (
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
...
@@ -530,8 +532,29 @@
...
@@ -530,8 +532,29 @@
a.*
a.*
FROM
FROM
(
(
<if
test=
'par.longitude!=null and par.latitude!=null '
>
<if
test=
"par.buildingId!=null and par.buildingId!=''"
>
SELECT
SELECT
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
v.address,
'' as distance,
v.longitude,
v.latitude
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
FIND_IN_SET(#{par.buildingId}, vc.parent_source_ids)
GROUP BY id
</if>
<if
test=
'par.longitude!=null and par.buildingId!=null '
>
UNION ALL
</if>
<if
test=
'par.longitude!=null and par.latitude!=null '
>
(SELECT
wle.id ,
wle.id ,
wle.`code` ,
wle.`code` ,
wle.url,
wle.url,
...
@@ -556,12 +579,14 @@
...
@@ -556,12 +579,14 @@
<if
test=
'par.code!=null and par.code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{par.code},'%')
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
ORDER BY
distance DESC)
</if>
</if>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
UNION
UNION
</if>
</if>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo !=null '
>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo !=null '
>
SELECT
(
SELECT
wle.id,
wle.id,
wle.`code`,
wle.`code`,
wle.url,
wle.url,
...
@@ -584,14 +609,16 @@
...
@@ -584,14 +609,16 @@
<
= #{par.distance}
<
= #{par.distance}
</if>
</if>
<if
test=
'par.type!=null and par.type!="" '
>
<if
test=
'par.type!=null and par.type!="" '
>
wle.type = #{par.type}
AND
wle.type = #{par.type}
</if>
</if>
<if
test=
'par.remark!=null and par.remark!="" '
>
<if
test=
'par.remark!=null and par.remark!="" '
>
wle.remake like concat ('%',#{par.remark},'%')
AND
wle.remake like concat ('%',#{par.remark},'%')
</if>
</if>
<if
test=
'par.code!=null and par.code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{par.code},'%')
AND
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
ORDER BY
distance DESC)
</if>
</if>
union
union
SELECT
SELECT
...
@@ -610,7 +637,7 @@
...
@@ -610,7 +637,7 @@
WHERE
WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
GROUP BY id
GROUP BY id
) AS a
ORDER BY a.distance desc
limit #{pageNum},#{pageSize}
) AS a limit #{pageNum},#{pageSize}
</select>
</select>
...
@@ -637,13 +664,13 @@
...
@@ -637,13 +664,13 @@
<
= #{par.distance}
<
= #{par.distance}
</if>
</if>
<if
test=
'par.type!=null and par.type!="" '
>
<if
test=
'par.type!=null and par.type!="" '
>
wle.type = #{type}
AND
wle.type = #{type}
</if>
</if>
<if
test=
'par.remark!=null and par.remark!="" '
>
<if
test=
'par.remark!=null and par.remark!="" '
>
wle.remake like concat ('%',#{par.remake},'%')
AND
wle.remake like concat ('%',#{par.remake},'%')
</if>
</if>
<if
test=
'par.code!=null and par.code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{par.code},'%')
AND
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
</if>
</if>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
...
@@ -674,13 +701,13 @@
...
@@ -674,13 +701,13 @@
<
= #{par.distance}
<
= #{par.distance}
</if>
</if>
<if
test=
'par.type!=null and par.type!="" '
>
<if
test=
'par.type!=null and par.type!="" '
>
wle.type = #{par.type}
AND
wle.type = #{par.type}
</if>
</if>
<if
test=
'par.remark!=null and par.remark!="" '
>
<if
test=
'par.remark!=null and par.remark!="" '
>
wle.remake like concat ('%',#{par.remark},'%')
AND
wle.remake like concat ('%',#{par.remark},'%')
</if>
</if>
<if
test=
'par.code!=null and par.code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{par.code},'%')
AND
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
</if>
</if>
union
union
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
3eb72617
...
@@ -446,4 +446,19 @@
...
@@ -446,4 +446,19 @@
<select
id=
"getAllCategoryName"
resultType=
"java.util.Map"
>
<select
id=
"getAllCategoryName"
resultType=
"java.util.Map"
>
select code, `name` from wl_equipment_category
select code, `name` from wl_equipment_category
</select>
</select>
<delete
id=
"delPointInputItemById"
>
DELETE FROM p_point_inputitem WHERE id IN
<foreach
collection=
"ids"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</delete>
<delete
id=
"delRoutePointItemByItemId"
>
DELETE FROM p_route_point_item WHERE point_input_item_id IN
<foreach
collection=
"ids"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</delete>
</mapper>
</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