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
d472496a
Commit
d472496a
authored
Sep 01, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
a885ba24
64ee2ef6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
402 additions
and
342 deletions
+402
-342
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+5
-3
DataDictionaryMapper.xml
...common/src/main/resources/mapper/DataDictionaryMapper.xml
+4
-2
AlertCalledMapper.java
...in/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
+8
-0
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+74
-28
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+1
-14
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+5
-3
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+15
-5
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+24
-0
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+45
-35
PlanTaskController.java
...n/amos/patrol/business/controller/PlanTaskController.java
+0
-0
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+7
-1
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+0
-0
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+1
-1
PlanTaskPageParamUtil.java
...join/amos/patrol/business/util/PlanTaskPageParamUtil.java
+69
-73
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+47
-0
application.properties
...tem-maintenance/src/main/resources/application.properties
+2
-0
PatrolApplication.java
...rol/src/main/java/com/yeejoin/amos/PatrolApplication.java
+39
-39
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+56
-138
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
d472496a
...
@@ -265,14 +265,16 @@ public class DataDictionaryController extends BaseController {
...
@@ -265,14 +265,16 @@ public class DataDictionaryController extends BaseController {
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
Collection
<
DataDictionary
>
list
=
null
;
Collection
<
DataDictionary
>
list
=
null
;
List
<
Menu
>
menus
=
null
;
if
(
"YJLDDW"
.
equals
(
type
))
{
if
(
"YJLDDW"
.
equals
(
type
))
{
list
=
dataDictionaryMapper
.
getNoInLinkUnit
();
list
=
dataDictionaryMapper
.
getNoInLinkUnit
();
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
}
else
{
}
else
{
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
}
}
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
// 创建根节点
// 创建根节点
Menu
menu
=
new
Menu
(-
1L
,
rootName
,
-
1L
,
menus
,
0
);
Menu
menu
=
new
Menu
(-
1L
,
rootName
,
-
1L
,
menus
,
0
);
List
<
Menu
>
menuList
=
new
ArrayList
<>();
List
<
Menu
>
menuList
=
new
ArrayList
<>();
...
...
amos-boot-biz-common/src/main/resources/mapper/DataDictionaryMapper.xml
View file @
d472496a
...
@@ -29,7 +29,9 @@ GROUP BY
...
@@ -29,7 +29,9 @@ GROUP BY
<select
id =
"getNoInLinkUnit"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
<select
id =
"getNoInLinkUnit"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
SELECT
SELECT
cbb.*
CONCAT(cbb.`name`,' (',elink.count,')') as `name`,
cbb.*,
elink.count as count
FROM
FROM
cb_data_dictionary cbb
cb_data_dictionary cbb
LEFT JOIN (
LEFT JOIN (
...
@@ -42,7 +44,7 @@ LEFT JOIN (
...
@@ -42,7 +44,7 @@ LEFT JOIN (
emergency_linkage_unit_code
emergency_linkage_unit_code
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
WHERE
WHERE
cbb.type = 'YJLDDW'
cbb.type = 'YJLDDW'
and cbb.is_delete = 0
AND elink.count IS NOT NULL
AND elink.count IS NOT NULL
</select>
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
View file @
d472496a
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
...
@@ -34,4 +35,11 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
...
@@ -34,4 +35,11 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Integer
AlertCalledcountTime
(
@Param
(
"type"
)
int
type
);
Integer
AlertCalledcountTime
(
@Param
(
"type"
)
int
type
);
List
<
AlertCalledTodyDto
>
getTodayAlertCalled
();
List
<
AlertCalledTodyDto
>
getTodayAlertCalled
();
List
<
AlertCalled
>
selectAllPage
(
Long
current
,
Long
size
,
Integer
alertStatus
,
String
alertTypeCode
,
String
alertSourceCode
,
String
startTime
,
String
endTime
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
d472496a
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<select
id=
"queryAlertStatusCount"
resultType=
"java.util.Map"
>
<select
id=
"queryAlertStatusCount"
resultType=
"java.util.Map"
>
SELECT
SELECT
count( 1 ) calledCount,
count( 1 ) calledCount,
sum( CASE WHEN alert_status = 1 THEN 1 ELSE 0 END ) finishedCount,
sum( CASE WHEN alert_status = 1 THEN 1 ELSE 0 END ) finishedCount,
sum( CASE WHEN alert_type_code = 230 THEN 1 ELSE 0 END ) majorAlertCount
sum( CASE WHEN alert_type_code = 230 THEN 1 ELSE 0 END ) majorAlertCount
FROM
FROM
jc_alert_called
jc_alert_called
WHERE 1 = 1
WHERE 1 = 1
<if
test=
"beginDate != null and beginDate != ''"
>
<if
test=
"beginDate != null and beginDate != ''"
>
and call_time >= #{beginDate}
and call_time >= #{beginDate}
...
@@ -37,24 +37,24 @@
...
@@ -37,24 +37,24 @@
WHEN '243' THEN '一级'
WHEN '243' THEN '一级'
WHEN '244' THEN '二级'
WHEN '244' THEN '二级'
WHEN '245' THEN '三级'
WHEN '245' THEN '三级'
ELSE '' END
responseLevelCode
ELSE '' END responseLevelCode
FROM jc_alert_called a
FROM jc_alert_called a
where
a.is_delete=0
where a.is_delete=0
AND a.coordinate_x IS NOT NULL
AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL
AND a.coordinate_y IS NOT NULL
<if
test=
'par.status==0'
>
<if
test=
'par.status==0'
>
and
a.alert_status =0
and a.alert_status =0
</if>
</if>
<if
test=
'par.status==1'
>
<if
test=
'par.status==1'
>
and
a.alert_status =1
and a.alert_status =1
</if>
</if>
<if
test=
'par.address!=null and par.address!="" '
>
<if
test=
'par.address!=null and par.address!="" '
>
and
a.address
like CONCAT('%',#{par.address},'%')
and
a.address
like CONCAT('%',#{par.address},'%')
</if>
</if>
<if
test=
'par.whether24!=false'
>
<if
test=
'par.whether24!=false'
>
and
a.call_time
>
= (NOW() - interval 24 hour)
and a.call_time
>
= (NOW() - interval 24 hour)
</if>
</if>
ORDER BY
a.call_time DESC
ORDER BY
a.call_time DESC
<if
test=
'pageNum!=null and pageSize !=null'
>
<if
test=
'pageNum!=null and pageSize !=null'
>
limit #{pageNum},#{pageSize}
limit #{pageNum},#{pageSize}
</if>
</if>
...
@@ -65,41 +65,87 @@
...
@@ -65,41 +65,87 @@
SELECT
SELECT
COUNT(*)
COUNT(*)
FROM jc_alert_called a
FROM jc_alert_called a
where
a.is_delete=0
where a.is_delete=0
AND a.coordinate_x IS NOT NULL
AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL
AND a.coordinate_y IS NOT NULL
<if
test=
'par.status==0'
>
<if
test=
'par.status==0'
>
and
a.alert_status =0
and a.alert_status =0
</if>
</if>
<if
test=
'par.status==1'
>
<if
test=
'par.status==1'
>
and
a.alert_status =1
and a.alert_status =1
</if>
</if>
<if
test=
'par.address!=null and par.address!="" '
>
<if
test=
'par.address!=null and par.address!="" '
>
and
a.address
like CONCAT('%',#{par.address},'%')
and
a.address
like CONCAT('%',#{par.address},'%')
</if>
</if>
<if
test=
'par.whether24!=false'
>
<if
test=
'par.whether24!=false'
>
and
a.call_time
>
= (NOW() - interval 24 hour)
and a.call_time
>
= (NOW() - interval 24 hour)
</if>
</if>
</select>
</select>
<select
id=
"selectAllPage"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled"
>
SELECT
a.sequence_nbr,
a.alert_status,
a.type,
a.alert_stage,
a.alarm_type,
a.alarm_type_code,
a.call_record_id,
a.father_alert,
a.response_level_code,
a.contact_user,
a.contact_phone,
a.call_time,
a.call_time_num,
a.alert_source,
a.alert_source_code,
a.alert_type,
a.alert_type_code,
a.unit_involved,
a.trapped_num,
a.casualties_num,
a.address,
a.rescue_grid,
a.coordinate_x,
a.coordinate_y,
a.response_level
FROM
jc_alert_called a
<where>
<if
test=
"alertStatus!= null "
>
and alert_status = #{alertStatus}
</if>
<if
test=
"startTime!= null and endTime != null"
>
and call_time between #{startTime} and #{endTime}
</if>
<if
test=
"alertTypeCode!= null "
>
and alarm_type_code = #{alertTypeCode}
</if>
<if
test=
"alertSourceCode!= null "
>
and alert_source_code = #{alertSourceCode}
</if>
</where>
order by call_time DESC limit #{current},#{size}
</select>
<select
id=
"AlertCalledcountTime"
resultType=
"Integer"
>
<select
id=
"AlertCalledcountTime"
resultType=
"Integer"
>
select COUNT(*)
from jc_alert_called where is_delete=0
select COUNT(*) from jc_alert_called where is_delete=0
<if
test=
'type==1'
>
<if
test=
'type==1'
>
and YEAR(call_time)=YEAR(NOW())
and YEAR(call_time)=YEAR(NOW())
</if>
</if>
<if
test=
'type==2'
>
<if
test=
'type==2'
>
and DATE_FORMAT( call_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
and DATE_FORMAT( call_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
</if>
</if>
<if
test=
'type==3'
>
<if
test=
'type==3'
>
and to_days(call_time) = to_days(now());
and to_days(call_time) = to_days(now());
</if>
</if>
<if
test=
'type==4'
>
<if
test=
'type==4'
>
and TO_DAYS( NOW( ) ) - TO_DAYS( call_time) = 1
and TO_DAYS( NOW( ) ) - TO_DAYS( call_time) = 1
</if>
</if>
</select>
</select>
...
@@ -107,13 +153,13 @@
...
@@ -107,13 +153,13 @@
<select
id=
"getTodayAlertCalled"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto"
>
<select
id=
"getTodayAlertCalled"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto"
>
select
select
jc_alert_called.alert_type alarmType,
jc_alert_called.alert_type alarmType
,
jc_alert_called.address
,
jc_alert_called.address,
jc_alert_called.call_time callTime
jc_alert_called.call_time callTime
from jc_alert_called
from jc_alert_called where is_delete=
0
where is_delete =
0
and to_days(call_time) = to_days(now())
and to_days(call_time) = to_days(now())
ORDER BY call_time
DESC
ORDER BY call_time
DESC
</select>
</select>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureDetailsController.java
View file @
d472496a
...
@@ -77,19 +77,6 @@ public class FailureDetailsController extends BaseController {
...
@@ -77,19 +77,6 @@ public class FailureDetailsController extends BaseController {
}
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
FailureDetailsDto
>
updateBySequenceNbrFailureDetails
(
@RequestBody
FailureDetailsDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
updateWithModel
(
model
));
}
/**
/**
...
@@ -251,7 +238,7 @@ public class FailureDetailsController extends BaseController {
...
@@ -251,7 +238,7 @@ public class FailureDetailsController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/weblist"
)
@GetMapping
(
value
=
"/
list/
weblist"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"Web端列表分页查询"
,
notes
=
"Web端列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"Web端列表分页查询"
,
notes
=
"Web端列表分页查询"
)
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPageList
(
@RequestParam
(
value
=
"current"
)
Long
current
,
@RequestParam
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPageList
(
@RequestParam
(
value
=
"current"
)
Long
current
,
@RequestParam
(
value
=
"size"
)
Long
size
,
@RequestParam
(
required
=
false
)
Long
currentStatus
,
(
value
=
"size"
)
Long
size
,
@RequestParam
(
required
=
false
)
Long
currentStatus
,
...
...
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 @
d472496a
...
@@ -353,20 +353,22 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -353,20 +353,22 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
@Override
public
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
{
public
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
{
// 动态表单数据
// 动态表单数据
/*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 开始 */
List
<
DynamicFormInstanceDto
>
list
=
alertFormValueServiceImpl
.
listByCalledId
(
id
);
List
<
DynamicFormInstanceDto
>
list
=
alertFormValueServiceImpl
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
<>();
List
<
FormValue
>
formValue
=
new
ArrayList
<>();
for
(
DynamicFormInstanceDto
alertFormValue
:
list
)
{
for
(
DynamicFormInstanceDto
alertFormValue
:
list
)
{
if
(
alertFormValue
.
getFieldValue
()
!=
null
)
{
if
(
alertFormValue
.
getFieldValue
Label
()
!=
null
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getBlock
());
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
Label
(),
alertFormValue
.
getBlock
());
formValue
.
add
(
value
);
formValue
.
add
(
value
);
}
else
{
}
else
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
Label
(),
alertFormValue
.
getBlock
());
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getBlock
());
formValue
.
add
(
value
);
formValue
.
add
(
value
);
}
}
}
}
return
formValue
;
return
formValue
;
/*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 结束 */
}
}
public
List
<
FormValue
>
getFormValueDetail
(
Long
id
)
throws
Exception
{
public
List
<
FormValue
>
getFormValueDetail
(
Long
id
)
throws
Exception
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
d472496a
...
@@ -140,20 +140,30 @@ public class AlertCalledController extends BaseController {
...
@@ -140,20 +140,30 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
ResponseModel
<
IPage
<
AlertCalled
>>
listPage
(
String
pageNum
,
String
pageSize
,
String
sort
,
AlertCalled
alertCalled
)
{
public
ResponseModel
<
IPage
<
AlertCalled
>>
listPage
(
String
pageNum
,
String
pageSize
,
String
sort
,
AlertCalled
alertCalled
,
Integer
alertStatus
,
String
alertTypeCode
,
String
alertSourceCode
,
String
startTime
,
String
endTime
){
Page
<
AlertCalled
>
pageBean
;
Page
<
AlertCalled
>
pageBean
;
IPage
<
AlertCalled
>
page
;
/* IPage<AlertCalled> page;
String sort, AlertCalled alertCalled,
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
setQueryWrapper(alertCalledQueryWrapper, alertCalled,sort);
setQueryWrapper(alertCalledQueryWrapper, alertCalled,sort);
*/
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
}
page
=
iAlertCalledService
.
page
(
pageBean
,
alertCalledQueryWrapper
);
/* bug2408 筛选参数解析异常 修改筛选条件方法 修改入参分离筛选条件
return
ResponseHelper
.
buildResponse
(
page
);
alertStatus 警情状态 alertTypeCode 报警类型code alertSourceCode 警情来源code
陈召 2021-08-21 开始*/
IPage
<
AlertCalled
>
alertCalledIPage
=
iAlertCalledService
.
queryForCalledList
(
pageBean
,
alertStatus
,
alertTypeCode
,
alertSourceCode
,
startTime
,
endTime
);
/* bug2408 筛选参数解析异常 修改筛选条件方法 陈召 2021-08-21 结束*/
return
ResponseHelper
.
buildResponse
(
alertCalledIPage
);
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
d472496a
...
@@ -6,14 +6,18 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -6,14 +6,18 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.common.api.feign.JcsControlServerClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.JcsControlServerClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
...
@@ -124,6 +128,26 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -124,6 +128,26 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return
alertCalledMapper
.
alertCalledListByAlertStatusCount
(
par
);
return
alertCalledMapper
.
alertCalledListByAlertStatusCount
(
par
);
}
}
/**
* 接警记录 列表分页查询
**/
/* bug2408 筛选参数解析异常 修改筛选条件方法 陈召 2021-08-21 开始*/
public
IPage
<
AlertCalled
>
queryForCalledList
(
Page
pageBean
,
Integer
alertStatus
,
String
alertTypeCode
,
String
alertSourceCode
,
String
startTime
,
String
endTime
)
{
List
<
AlertCalled
>
list
=
alertCalledMapper
.
selectAllPage
(
pageBean
.
getCurrent
(),
pageBean
.
getSize
(),
alertStatus
,
alertTypeCode
,
alertSourceCode
,
startTime
,
endTime
);
IPage
<
AlertCalled
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
iPage
.
setTotal
(
list
.
size
());
return
iPage
;
/* bug2408 筛选参数解析异常 修改筛选条件方法 陈召 2021-08-21 结束*/
}
/**
/**
* 根据灾情id 查询灾情详情
* 根据灾情id 查询灾情详情
**/
**/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
d472496a
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
import
com.yeejoin.amos.boot.module.common.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.common.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
io.swagger.models.auth.In
;
import
io.swagger.models.auth.In
;
import
org.aspectj.weaver.ast.Var
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
...
@@ -33,11 +34,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -33,11 +34,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Collection
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -133,7 +130,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -133,7 +130,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
public
List
<
Menu
>
getTeamTree
(
Map
<
String
,
Object
>
columnMap
)
throws
Exception
{
public
List
<
Menu
>
getTeamTree
(
Map
<
String
,
Object
>
columnMap
)
throws
Exception
{
Collection
<
FireTeam
>
list
=
this
.
listByMap
(
columnMap
);
Collection
<
FireTeam
>
list
=
this
.
listByMap
(
columnMap
);
return
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getName"
,
return
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getName"
,
"getParent"
,
null
);
"getParent"
,
null
);
}
}
/**
/**
...
@@ -145,7 +142,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -145,7 +142,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
MenuFrom
root
=
new
MenuFrom
(
"-1"
,
"消防队伍"
,
null
,
null
);
MenuFrom
root
=
new
MenuFrom
(
"-1"
,
"消防队伍"
,
null
,
null
);
// 机场单位
// 机场单位
//bug:2457需求要求不显示部门,因此更换方法 by 陈浩 2021-08-18
//bug:2457需求要求不显示部门,因此更换方法 by 陈浩 2021-08-18
// List<OrgUsr> companyDeptList = orgUsrService.selectCompanyDepartmentMsg();
// List<OrgUsr> companyDeptList = orgUsrService.selectCompanyDepartmentMsg();
List
<
OrgUsr
>
companyDeptList
=
orgUsrService
.
selectCompanyList
();
List
<
OrgUsr
>
companyDeptList
=
orgUsrService
.
selectCompanyList
();
List
<
MenuFrom
>
companyDeptMenuList
=
Lists
.
newArrayList
();
List
<
MenuFrom
>
companyDeptMenuList
=
Lists
.
newArrayList
();
companyDeptList
.
forEach
(
o
->
{
companyDeptList
.
forEach
(
o
->
{
...
@@ -192,7 +189,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -192,7 +189,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
}
}
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getById
(
fireTeam
.
getTypeCode
());
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getById
(
fireTeam
.
getTypeCode
());
if
(
null
!=
dataDictionary
)
{
if
(
null
!=
dataDictionary
)
{
fireTeam
.
setType
(
dataDictionary
.
getName
());
fireTeam
.
setType
(
dataDictionary
.
getName
());
}
}
if
(
ValidationUtil
.
isEmpty
(
fireTeam
.
getSequenceNbr
()))
{
if
(
ValidationUtil
.
isEmpty
(
fireTeam
.
getSequenceNbr
()))
{
...
@@ -225,16 +222,29 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -225,16 +222,29 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
if
(
null
==
pageNum
||
null
==
pageSize
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
pageNum
=
1
;
pageNum
=
1
;
pageSize
=
Integer
.
MAX_VALUE
;
pageSize
=
Integer
.
MAX_VALUE
;
}
else
{
}
else
{
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
}
}
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
// 获取消防车辆列表
// 获取消防车辆列表
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
list
.
forEach
(
fireTeamZhDto
->
{
Long
sequenceNbr
=
fireTeamZhDto
.
getSequenceNbr
();
result1
.
forEach
(
map
->
{
String
mapId
=
String
.
valueOf
(
map
.
get
(
"teamId"
));
if
(
String
.
valueOf
(
sequenceNbr
).
equals
(
mapId
)){
Integer
carNum
=
Integer
.
valueOf
(
map
.
get
(
"carNum"
).
toString
());
fireTeamZhDto
.
setCarNum
(
carNum
);
}
});
});
/*
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
if(result1!=null&&result1.size()>0){
if(result1!=null&&result1.size()>0){
Map<String, Object> combineResultMap = new HashMap<String, Object>();
Map<String, Object> combineResultMap = new HashMap<String, Object>();
result1.stream().forEach(obj ->{
result1.stream().forEach(obj ->{
...
@@ -245,9 +255,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -245,9 +255,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
obj.setCarNum(Integer.valueOf(combineResultMap.get(obj.getSequenceNbr()).toString()));
obj.setCarNum(Integer.valueOf(combineResultMap.get(obj.getSequenceNbr()).toString()));
}
}
});
});
}
}
*/
return
list
;
return
list
;
}
}
@Override
@Override
public
Integer
getFireTeamListCount
(
RequestData
par
)
{
public
Integer
getFireTeamListCount
(
RequestData
par
)
{
...
@@ -262,28 +272,28 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -262,28 +272,28 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
@Override
@Override
public
List
<
FireTeamZhDto
>
getFireTeamCountList
()
{
public
List
<
FireTeamZhDto
>
getFireTeamCountList
()
{
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamCountList
();
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamCountList
();
// 获取消防车辆列表
// 获取消防车辆列表
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
if
(
result1
!=
null
&&
result1
.
size
()>
0
)
{
if
(
result1
!=
null
&&
result1
.
size
()
>
0
)
{
Map
<
String
,
Object
>
combineResultMap
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
combineResultMap
=
new
HashMap
<
String
,
Object
>();
result1
.
stream
().
forEach
(
obj
->{
result1
.
stream
().
forEach
(
obj
->
{
combineResultMap
.
put
(
obj
.
get
(
"teamId"
).
toString
(),
obj
.
get
(
"carNum"
));
combineResultMap
.
put
(
obj
.
get
(
"teamId"
).
toString
(),
obj
.
get
(
"carNum"
));
});
});
list
.
stream
().
forEach
(
obj
->{
list
.
stream
().
forEach
(
obj
->
{
if
(
combineResultMap
.
containsKey
(
obj
.
getSequenceNbr
().
toString
()))
{
if
(
combineResultMap
.
containsKey
(
obj
.
getSequenceNbr
().
toString
()))
{
obj
.
setCarNum
(
Integer
.
valueOf
(
combineResultMap
.
get
(
obj
.
getSequenceNbr
().
toString
()).
toString
()));
obj
.
setCarNum
(
Integer
.
valueOf
(
combineResultMap
.
get
(
obj
.
getSequenceNbr
().
toString
()).
toString
()));
}
}
});
});
}
}
return
list
;
return
list
;
}
}
public
Integer
getFightNumByTeamId
(
Long
teamId
)
{
public
Integer
getFightNumByTeamId
(
Long
teamId
)
{
...
@@ -292,12 +302,12 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -292,12 +302,12 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
count
+=
fireTeamMapper
.
getFighterNumByTeamId
(
teamId
);
count
+=
fireTeamMapper
.
getFighterNumByTeamId
(
teamId
);
// 获取下部分数据
// 获取下部分数据
LambdaQueryWrapper
<
FireTeam
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FireTeam
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FireTeam:
:
getParent
,
teamId
).
eq
(
FireTeam:
:
getIsDelete
,
false
);
queryWrapper
.
eq
(
FireTeam:
:
getParent
,
teamId
).
eq
(
FireTeam:
:
getIsDelete
,
false
);
List
<
FireTeam
>
fireTeamList
=
this
.
list
(
queryWrapper
);
List
<
FireTeam
>
fireTeamList
=
this
.
list
(
queryWrapper
);
if
(
fireTeamList
.
size
()
==
0
)
{
if
(
fireTeamList
.
size
()
==
0
)
{
return
count
;
return
count
;
}
else
{
}
else
{
for
(
FireTeam
t
:
fireTeamList
)
{
for
(
FireTeam
t
:
fireTeamList
)
{
count
+=
getFightNumByTeamId
(
t
.
getSequenceNbr
());
count
+=
getFightNumByTeamId
(
t
.
getSequenceNbr
());
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanTaskController.java
View file @
d472496a
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
View file @
d472496a
...
@@ -69,7 +69,7 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -69,7 +69,7 @@ public interface PlanTaskMapper extends BaseMapper {
* @param params
* @param params
* @return
* @return
*/
*/
List
<
Hash
Map
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
);
/**
/**
* 通过计划任务Id获得计划任务信息
* 通过计划任务Id获得计划任务信息
* @param planTaskId
* @param planTaskId
...
@@ -121,6 +121,12 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -121,6 +121,12 @@ public interface PlanTaskMapper extends BaseMapper {
* @return
* @return
*/
*/
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
/**
* 任务分页查询数量
* @param params 参数
* @return long
*/
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
d472496a
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanTaskService.java
View file @
d472496a
...
@@ -79,7 +79,7 @@ public interface IPlanTaskService {
...
@@ -79,7 +79,7 @@ public interface IPlanTaskService {
* @param params
* @param params
* @return
* @return
*/
*/
Page
<
Hash
Map
<
String
,
Object
>>
getPlanTasks
(
String
toke
,
String
product
,
String
appKey
,
HashMap
<
String
,
Object
>
params
);
Page
<
Map
<
String
,
Object
>>
getPlanTasks
(
String
toke
,
String
product
,
String
appKey
,
HashMap
<
String
,
Object
>
params
);
/**
/**
* 根据计划任务Id获取计划任务信息
* 根据计划任务Id获取计划任务信息
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/PlanTaskPageParamUtil.java
View file @
d472496a
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
import
java.util.HashMap
;
import
java.util.List
;
import
org.springframework.util.ObjectUtils
;
import
com.yeejoin.amos.patrol.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.patrol.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.enums.QueryOperatorEnum
;
import
com.yeejoin.amos.patrol.core.enums.QueryOperatorEnum
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
PlanTaskPageParamUtil
{
public
class
PlanTaskPageParamUtil
{
public
static
PlanTaskPageParam
fillChkInfoParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
,
public
static
PlanTaskPageParam
fillChkInfoParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
,
PlanTaskPageParam
param
,
HashMap
<
String
,
Object
>
paramMap
)
{
PlanTaskPageParam
param
,
HashMap
<
String
,
Object
>
paramMap
)
{
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++)
{
String
name
=
queryRequests
.
get
(
i
).
getName
();
String
name
=
queryRequests
.
get
(
i
).
getName
();
if
(
"pointNo"
.
equals
(
name
))
{
if
(
"pointNo"
.
equals
(
name
))
{
param
.
setPointNo
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setPointNo
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"pointName"
.
equals
(
name
))
{
}
else
if
(
"pointName"
.
equals
(
name
))
{
param
.
setPointName
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setPointName
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"beginDate"
.
equals
(
name
))
{
}
else
if
(
"beginDate"
.
equals
(
name
))
{
param
.
setBeginDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setBeginDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"endDate"
.
equals
(
name
))
{
}
else
if
(
"endDate"
.
equals
(
name
))
{
param
.
setEndDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setEndDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"status"
.
equals
(
name
))
{
}
else
if
(
"status"
.
equals
(
name
))
{
param
.
setStatus
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setStatus
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"planId"
.
equals
(
name
))
{
}
else
if
(
"planId"
.
equals
(
name
))
{
param
.
setPlanId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setPlanId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"routeId"
.
equals
(
name
))
{
}
else
if
(
"routeId"
.
equals
(
name
))
{
param
.
setRouteId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setRouteId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
}
}
param
.
setOrgCode
(
paramMap
.
get
(
"orgCode"
)
==
null
?
null
:
paramMap
.
get
(
"orgCode"
).
toString
());
param
.
setOrgCode
(
paramMap
.
get
(
"orgCode"
)
==
null
?
null
:
paramMap
.
get
(
"orgCode"
).
toString
());
param
.
setUserId
(
paramMap
.
get
(
"userId"
)
==
null
?
null
:
paramMap
.
get
(
"userId"
).
toString
());
param
.
setUserId
(
paramMap
.
get
(
"userId"
)
==
null
?
null
:
paramMap
.
get
(
"userId"
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
commonPageable
))
{
if
(!
ObjectUtils
.
isEmpty
(
commonPageable
))
{
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
}
}
return
param
;
return
param
;
}
}
private
static
String
toString
(
Object
value
)
{
private
static
String
toString
(
Object
value
)
{
if
(
null
==
value
||
value
==
""
)
{
if
(
null
==
value
||
value
==
""
)
{
return
null
;
return
null
;
}
else
{
}
else
{
return
value
.
toString
();
return
value
.
toString
();
}
}
}
}
public
static
HashMap
<
String
,
Object
>
fillPlanTask
(
List
<
CommonRequest
>
queryRequests
,
public
static
void
fillPlanTask
(
List
<
CommonRequest
>
queryRequests
,
HashMap
<
String
,
Object
>
params
)
{
HashMap
<
String
,
Object
>
params
)
{
if
(
ObjectUtils
.
isEmpty
(
queryRequests
))
{
if
(
ObjectUtils
.
isEmpty
(
queryRequests
))
{
return
params
;
return
;
}
}
String
order
=
""
;
StringBuilder
order
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++){
for
(
CommonRequest
queryRequest
:
queryRequests
)
{
String
name
=
queryRequests
.
get
(
i
).
getName
();
String
name
=
queryRequest
.
getName
();
String
type
=
queryRequests
.
get
(
i
).
getType
();
String
type
=
queryRequest
.
getType
();
if
(
type
!=
null
&&
type
!=
""
){
if
(
type
!=
null
&&
!
""
.
equals
(
type
))
{
if
(!
QueryOperatorEnum
.
ORDER_BY
.
getName
().
equals
(
type
))
{
if
(!
QueryOperatorEnum
.
ORDER_BY
.
getName
().
equals
(
type
))
{
params
.
put
(
name
,
queryRequests
.
get
(
i
).
getValue
());
params
.
put
(
name
,
queryRequest
.
getValue
());
}
else
if
(
QueryOperatorEnum
.
ORDER_BY
.
getName
().
equals
(
type
))
{
}
else
{
order
+=
name
+
" "
+
queryRequests
.
get
(
i
).
getValue
();
order
.
append
(
name
).
append
(
" "
).
append
(
queryRequest
.
getValue
());
}
}
}
else
{
}
else
{
if
(
name
.
equals
(
"orderBy"
)
&&
queryRequests
.
get
(
i
).
getValue
()!=
null
){
if
(
"orderBy"
.
equals
(
name
)
&&
queryRequest
.
getValue
()
!=
null
)
{
order
+=
queryRequests
.
get
(
i
).
getValue
();
order
.
append
(
queryRequest
.
getValue
());
}
}
params
.
put
(
name
,
queryRequests
.
get
(
i
).
getValue
());
params
.
put
(
name
,
queryRequest
.
getValue
());
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
order
.
toString
()))
{
}
params
.
put
(
"orderBy"
,
order
.
toString
());
if
(!
ObjectUtils
.
isEmpty
(
order
))
{
}
else
{
params
.
put
(
"orderBy"
,
order
);
params
.
put
(
"orderBy"
,
"beginTime ASC"
);
}
else
{
}
params
.
put
(
"orderBy"
,
"beginTime ASC"
);
}
}
return
params
;
}
}
}
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
d472496a
...
@@ -161,4 +161,51 @@
...
@@ -161,4 +161,51 @@
ALTER TABLE `cb_firefighters_thought` modify talking_time datetime COMMENT '谈话时间';
ALTER TABLE `cb_firefighters_thought` modify talking_time datetime COMMENT '谈话时间';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"litengwei"
id=
"2021-09-01-litengwei-1"
>
<comment>
add data cb_data_dictionary
</comment>
<sql>
INSERT INTO `cb_data_dictionary` VALUES(1152, '1152', '大面积航班延误保障', 'QTZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1153, '1153', '二类运行保障', 'QTZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1154, '1154', '施工加油保障', 'QTZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1155, '1155', '航空器失事', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1156, '1156', '空中遇险', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1157, '1157', '跑道事件', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1158, '1158', '地面遇险', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1159, '1159', '劫机', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1160, '1160', '发现爆炸物', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1161, '1161', '爆炸物威胁', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1162, '1162', '其他非法干扰', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1163, '1163', '残损航空器搬移', 'HKQJYZL', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1164, '1164', '紧急出动', 'XYJB', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1165, '1165', '紧急集结', 'XYJB', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO `cb_data_dictionary` VALUES(1166, '1166', '原地待命', 'XYJB', NULL, NULL, NULL, NULL, NULL, 0, 1);
</sql>
</changeSet>
<changeSet
author=
"litengwei"
id=
"2021-09-01-litengwei-2"
>
<comment>
add data jc_alert_form
</comment>
<sql>
INSERT INTO `jc_alert_form` VALUES(127, '230', 'HKQJYZL', '航空器救援子类', 'aircraftRescueSub', 'radio', NULL, NULL, NULL, 0, 1, 1, NULL);
INSERT INTO `jc_alert_form` VALUES(128, '242', 'QTZL', '子类', 'sub', 'radio', NULL, NULL, NULL, 0, 1, 1, NULL);
INSERT INTO `jc_alert_form` VALUES(129, '230', NULL, '机位', 'mechinePosition', 'select', NULL, NULL, NULL, 0, 0, 5, NULL);
INSERT INTO `jc_alert_form` VALUES(130, '230', NULL, '响应级别', 'responseLevel', 'select', NULL, NULL, NULL, 0, 0, 8, NULL);
</sql>
</changeSet>
<changeSet
author=
"litengwei"
id=
"2021-09-01-litengwei-3"
>
<comment>
update data jc_alert_form
</comment>
<sql>
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='航班号', field_code='flightNumber', field_type='selectDelay', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=2, url='aircraft/getAircraftNum' WHERE sequence_nbr=103;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='航空器型号', field_code='aircraftModel', field_type='input', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=3, url='aircraft/getAircraft' WHERE sequence_nbr=104;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='落地时间', field_code='landingTime', field_type='datetime', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=4, url=NULL WHERE sequence_nbr=105;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='航空器故障部位', field_code='damageLocation', field_type='selectDelay', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=7, url='data-dictionary/gwmcDataDictionary/FJSSWZ' WHERE sequence_nbr=106;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='燃油量(吨)', field_code='fuelQuantity', field_type='inputNumber', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=10, url=NULL WHERE sequence_nbr=107;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='载客量', field_code='passengerCapacity', field_type='inputNumber', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=9, url=NULL WHERE sequence_nbr=108;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code='PJPD', field_name='迫降跑道', field_code='forcedLandingTrack ', field_type='select', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=6, url='' WHERE sequence_nbr=109;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='灾害事故情况', field_code='accidentSituation', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=11, url=NULL WHERE sequence_nbr=110;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='发展态势', field_code='developmentTrend', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=12, url=NULL WHERE sequence_nbr=111;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='备注', field_code='remarks', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=13, url=NULL WHERE sequence_nbr=112;
UPDATE `jc_alert_form` SET alert_type_code='242', field_value_code=NULL, field_name='保障类别', field_code='securityCategory', field_type='selectDelay', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=2, url='data-dictionary/gwmcDataDictionary/YGCJ' WHERE sequence_nbr=124;
UPDATE `jc_alert_form` SET alert_type_code='242', field_value_code=NULL, field_name='事件概述', field_code='eventOverview', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=3, url=NULL WHERE sequence_nbr=125;
UPDATE `jc_alert_form` SET alert_type_code='242', field_value_code=NULL, field_name='备注', field_code='remarks', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=4, url=NULL WHERE sequence_nbr=126;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
amos-boot-system-maintenance/src/main/resources/application.properties
View file @
d472496a
...
@@ -26,6 +26,8 @@ mybatis.mapper-locations = classpath:db/mapper/*.xml
...
@@ -26,6 +26,8 @@ mybatis.mapper-locations = classpath:db/mapper/*.xml
mybatis-plus.mapper-locations
=
classpath:db/mapper/*.xml
mybatis-plus.mapper-locations
=
classpath:db/mapper/*.xml
mybatis.type-aliases-package
=
com.yeejoin.amos.maintenance.business.entity.mybatis
mybatis.type-aliases-package
=
com.yeejoin.amos.maintenance.business.entity.mybatis
mybatis.configuration.mapUnderscoreToCamelCase
=
true
mybatis.configuration.mapUnderscoreToCamelCase
=
true
#null值也返回
mybatis-plus.configuration.call-setters-on-nulls
=
true
spring.liquibase.changeLog
=
classpath:db/changelog/changelog-master.xml
spring.liquibase.changeLog
=
classpath:db/changelog/changelog-master.xml
spring.liquibase.enabled
=
true
spring.liquibase.enabled
=
true
...
...
amos-boot-system-patrol/src/main/java/com/yeejoin/amos/PatrolApplication.java
View file @
d472496a
package
com
.
yeejoin
.
amos
;
package
com
.
yeejoin
.
amos
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -19,15 +14,21 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -19,15 +14,21 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.restful.config.JsonSerializerManage
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
/**
/**
*
* <pre>
* <pre>
* 服务启动类
* 服务启动类
* </pre>
* </pre>
...
@@ -44,42 +45,40 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
...
@@ -44,42 +45,40 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableFeignClients
@EnableFeignClients
@EnableAsync
@EnableAsync
@EnableEurekaClient
@EnableEurekaClient
@ComponentScan
({
"org.typroject"
,
"com.yeejoin.amos"
})
@ComponentScan
(
value
=
{
"org.typroject"
,
"com.yeejoin.amos"
},
excludeFilters
=
{
@MapperScan
(
basePackages
=
{
"com.yeejoin.amos.patrol.business.dao.mapper"
,
"org.typroject.tyboot.core.auth.face.orm.dao"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
@ComponentScan
.
Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
classes
=
{
JsonSerializerManage
.
class
})})
public
class
PatrolApplication
@MapperScan
(
basePackages
=
{
"com.yeejoin.amos.patrol.business.dao.mapper"
,
"org.typroject.tyboot.core.auth.face.orm.dao"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
{
public
class
PatrolApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PatrolApplication
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PatrolApplication
.
class
);
@Bean
@Bean
@LoadBalanced
@LoadBalanced
RestTemplate
initRestTemplate
()
{
RestTemplate
initRestTemplate
()
{
return
new
RestTemplate
();
return
new
RestTemplate
();
}
}
/**
/**
* 启动amosop-server
* 启动amosop-server
*
*
* @param args
* @param args
* @throws IOException
* @throws IOException
* @throws URISyntaxException
* @throws URISyntaxException
*/
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
{
logger
.
info
(
"start Service.........."
);
logger
.
info
(
"start Service.........."
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
PatrolApplication
.
class
,
args
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
PatrolApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
Environment
env
=
context
.
getEnvironment
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
port
=
env
.
getProperty
(
"server.port"
);
String
port
=
env
.
getProperty
(
"server.port"
);
String
path
=
env
.
getProperty
(
"server.servlet.context-path"
);
String
path
=
env
.
getProperty
(
"server.servlet.context-path"
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------"
);
"----------------------------------------------------------"
);
}
}
}
}
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
d472496a
...
@@ -168,7 +168,6 @@
...
@@ -168,7 +168,6 @@
and SYSDATE()
<![CDATA[>=]]>
pt.begin_time
and SYSDATE()
<![CDATA[>=]]>
pt.begin_time
and SYSDATE()
<![CDATA[<]]>
pt.end_time
and SYSDATE()
<![CDATA[<]]>
pt.end_time
</select>
</select>
<select
id=
"getPlanTasks"
resultType=
"Map"
>
<select
id=
"getPlanTasks"
resultType=
"Map"
>
SELECT
SELECT
a.planTaskId,
a.planTaskId,
...
@@ -185,7 +184,6 @@
...
@@ -185,7 +184,6 @@
a.userId executiveName,
a.userId executiveName,
a.userName,
a.userName,
a.userDept
a.userDept
<!-- (SELECT GROUP_CONCAT(`name`) FROM s_user where find_in_set(id,a.userId)>0 ORDER BY `id`) AS executiveName -->
FROM
FROM
(
(
SELECT
SELECT
...
@@ -202,7 +200,6 @@
...
@@ -202,7 +200,6 @@
pt.end_time,
pt.end_time,
'%Y-%m-%d %H:%i:%s'
'%Y-%m-%d %H:%i:%s'
) endTime,
) endTime,
date_format(
date_format(
pt.check_date,
pt.check_date,
'%Y-%m-%d %H:%i:%s'
'%Y-%m-%d %H:%i:%s'
...
@@ -219,79 +216,10 @@
...
@@ -219,79 +216,10 @@
p_plan_task pt
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_plan p ON pt.plan_id = p.id
) a
) a
<where>
<include
refid=
"plan-task-app-where"
/>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<if
test=
"routeId != null and userId > 0 "
>
and a.route_id = #{routeId}
</if>
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
and (a.OrgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.OrgCode= #{orgCode} )
</if>
<choose>
<when
test=
"departmentId != null and departmentId != 0 "
>
and a.userDept like concat('%', #{departmentId}, '%')
</when>
<!-- <when test="departmentId == -1 and ids != null">and a.userId in-->
<!-- <foreach item="item" collection="ids" separator="," open="(" close=")" index="index">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </when>-->
</choose>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
(
a.beginTime
<![CDATA[>=]]>
#{startTime}
AND a.endTime
<![CDATA[<=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{endTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>]]>
#{startTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
)
</if>
<if
test=
"query != null and query != '' "
>
<if
test=
"queryType != null and queryType != 'executiveName' and queryType != 'plan' "
>
AND EXISTS (
SELECT
1
FROM
p_point pp
LEFT JOIN p_route_point rp ON rp.point_id = pp.id
LEFT JOIN p_route r ON r.id = rp.route_id
where a.route_id = r.id
<if
test=
"queryType == null or queryType == '' or queryType == 'all' "
>
AND CONCAT(pp.name, ',',r.name, ',', pp.point_no,a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'route' "
>
AND r.name LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'point' "
>
AND CONCAT(pp.name, ',', pp.point_no) LIKE concat('%', #{query}, '%')
</if>
)
</if>
<if
test=
"queryType != null and queryType == 'executiveName' "
>
AND a.userName LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'plan' "
>
AND CONCAT(a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
</if>
</where>
<if
test=
"orderBy != null and orderBy != '' "
>
order by ${orderBy}
</if>
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
</select>
</select>
<select
id=
"getPlanTasksCount"
resultType=
"long"
>
<select
id=
"getPlanTasksCount"
resultType=
"long"
>
SELECT
SELECT
count(1) tasksCount
count(1) tasksCount
...
@@ -324,78 +252,68 @@
...
@@ -324,78 +252,68 @@
p_plan_task pt
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_plan p ON pt.plan_id = p.id
) a
) a
<include
refid=
"plan-task-app-where"
/>
</select>
<sql
id=
"plan-task-app-where"
>
<where>
<where>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"routeId != null and userId > 0 "
>
and a.route_id = #{routeId}
</if>
<if
test=
"routeId != null and routeId > 0 "
>
and a.route_id = #{routeId}
</if>
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
<if
test=
"orgCode != null and orgCode !=''"
>
and (a.OrgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.OrgCode= #{orgCode} )
and (a.OrgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.OrgCode= #{orgCode} )
</if>
</if>
<choose>
<if
test=
"departmentId != null and departmentId != 0 "
>
and a.userDept like concat('%', #{departmentId}, '%')
</if>
<when
test=
"departmentId != null and departmentId!= 0 "
>
and a.userDept like concat('%', #{departmentId}, '%')
</when>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
<!-- <when test="departmentId == -1 and ids != null">and a.userId in-->
AND (
<!-- <foreach item="item" collection="ids" separator="," open="(" close=")" index="index">-->
(
<!-- #{item}-->
a.beginTime
<![CDATA[>=]]>
#{startTime}
<!-- </foreach>-->
AND a.endTime
<![CDATA[<=]]>
#{endTime}
<!-- </when>-->
)
</choose>
OR (
a.beginTime
<![CDATA[<=]]>
#{endTime}
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND a.endTime
<![CDATA[>=]]>
#{endTime}
AND (
)
(
OR (
a.beginTime
<![CDATA[>=]]>
#{startTime}
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[<=]]>
#{endTime}
AND a.endTime
<![CDATA[>]]>
#{startTime}
)
)
OR (
OR (
a.beginTime
<![CDATA[<=]]>
#{endTime}
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>]]>
#{startTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
)
)
</if>
<if
test=
"query != null and query != '' "
>
<if
test=
"queryType != null and queryType != 'executiveName' and queryType != 'plan' "
>
AND EXISTS (
SELECT
1
FROM
p_point pp
LEFT JOIN p_route_point rp ON rp.point_id = pp.id
LEFT JOIN p_route r ON r.id = rp.route_id
where a.route_id = r.id
<if
test=
"queryType == null or queryType == '' or queryType == 'all' "
>
AND CONCAT(pp.name, ',',r.name, ',', pp.point_no,a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'route' "
>
AND r.name LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'point' "
>
AND CONCAT(pp.name, ',', pp.point_no) LIKE concat('%', #{query}, '%')
</if>
)
)
</if>
</if>
<if
test=
"query != null and query != '' "
>
<if
test=
"queryType != null and queryType == 'executiveName' "
>
<if
test=
"queryType != null and queryType != 'executiveName' and queryType != 'plan' "
>
AND EXISTS (
SELECT
1
FROM
p_point pp
LEFT JOIN p_route_point rp ON rp.point_id = pp.id
LEFT JOIN p_route r ON r.id = rp.route_id
where a.route_id = r.id
<if
test=
"queryType == null or queryType == '' or queryType == 'all' "
>
AND CONCAT(pp.name, ',',r.name, ',', pp.point_no,a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'route' "
>
AND r.name LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'point' "
>
AND CONCAT(pp.name, ',', pp.point_no) LIKE concat('%', #{query}, '%')
</if>
)
</if>
<if
test=
"queryType != null and queryType == 'executiveName' "
>
AND a.userName LIKE concat('%', #{query}, '%')
AND a.userName LIKE concat('%', #{query}, '%')
</if>
</if>
<if
test=
"queryType != null and queryType == 'plan' "
>
<if
test=
"queryType != null and queryType == 'plan' "
>
AND CONCAT(a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
AND CONCAT(a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
</if>
</if>
</if>
</where>
</where>
</select>
</sql>
<select
id=
"queryPlanTaskById"
resultType=
"Map"
>
<select
id=
"queryPlanTaskById"
resultType=
"Map"
>
...
...
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