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
b48dd72a
Commit
b48dd72a
authored
Sep 01, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
9148cce7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
47 deletions
+51
-47
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+15
-11
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+36
-36
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
b48dd72a
...
...
@@ -60,33 +60,37 @@
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
<if
test=
"fields != null"
>
<foreach
collection=
"fields"
item=
"item"
separator=
","
>
MAX(case f.field_code when #{item} then IFNULL(v.field_value_label, v.field_value)
<if
test=
"
map.
fields != null"
>
<foreach
collection=
"
map.
fields"
item=
"item"
separator=
","
>
MAX(case f.field_code when #{item} then IFNULL(v.field_value_label, v.field_value)
end) ${item}
</foreach>
</if>
FROM
cb_org_usr u LEFT JOIN
cb_org_usr u
LEFT JOIN
cb_dynamic_form_instance v on u.sequence_nbr = v.instance_id
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
where
u.biz_org_type = #{bizOrgType}
u.biz_org_type = #{
map.
bizOrgType}
AND u.is_delete = 0
<if
test=
"bizOrgName != null"
>
AND u.biz_org_name
= #{bizOrgName}
<if
test=
"
map.
bizOrgName != null"
>
AND u.biz_org_name
like concat('%',#{map.bizOrgName},'%')
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != '-1'"
>
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
<if
test=
"map.personNumber!= null"
>
AND v.field_value like concat('%',#{map.personNumber},'%')
</if>
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != '-1'"
>
AND u.biz_org_code like concat(#{map.bizOrgCode}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
)a where a.sequenceNbr is not null
<if
test=
"fieldsValue != null"
>
<foreach
collection=
"
fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{
fieldsValue[${item}]}
</foreach>
<if
test=
"
map.
fieldsValue != null"
>
<foreach
collection=
"
map.fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{map.
fieldsValue[${item}]}
</foreach>
</if>
LIMIT #{
pageNum}, #{
pageSize}
LIMIT #{
map.pageNum}, #{map.
pageSize}
</select>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
b48dd72a
...
...
@@ -55,15 +55,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -177,7 +169,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
//通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper
.
getMqttClient
().
publish
(
powertopic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
}
catch
(
MqttException
e
)
{
throw
new
RuntimeException
();
throw
new
RuntimeException
();
}
return
true
;
}
...
...
@@ -227,7 +219,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertSubmittedId
=
alertSubmitted
.
getSequenceNbr
().
toString
();
Optional
<
AlertBusinessTypeEnum
>
alertBusinessTypeEnum
=
EnumsUtils
.
getEnumObject
(
AlertBusinessTypeEnum
.
class
,
e
->
e
.
getCode
().
equals
(
calledRo
.
getAlertTypeCode
()));
e
->
e
.
getCode
().
equals
(
calledRo
.
getAlertTypeCode
()));
smsCode
=
alertBusinessTypeEnum
.
get
().
getSms_code
();
}
// 组装人员信息
...
...
@@ -443,50 +435,49 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
@Override
public
List
<
InstructionsZHDto
>
getInstructionsZHDtoList
(
Long
id
)
{
List
<
InstructionsZHDto
>
listInstructionsZHDto
=
new
ArrayList
<>();
List
<
InstructionsZHDto
>
listInstructionsZHDto
=
new
ArrayList
<>();
//获取调派记录
List
<
PowerTransferCompanyZHDto
>
listPowerTransferCompanyZHDto
=
powerTransferCompanyMapper
.
listPowerTransferCompanyZHDto
(
id
);
listPowerTransferCompanyZHDto
.
stream
().
forEach
(
PowerTransferCompanyZHDto
->
{
String
content
=
""
;
if
(
PowerTransferCompanyZHDto
.
getIsDistributionAgencies
())
{
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
}
else
{
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()+
PowerTransferCompanyZHDto
.
getSubmissionContent
()+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
List
<
PowerTransferCompanyZHDto
>
listPowerTransferCompanyZHDto
=
powerTransferCompanyMapper
.
listPowerTransferCompanyZHDto
(
id
);
listPowerTransferCompanyZHDto
.
stream
().
forEach
(
PowerTransferCompanyZHDto
->
{
String
content
=
""
;
if
(
PowerTransferCompanyZHDto
.
getIsDistributionAgencies
())
{
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()
+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
}
else
{
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()
+
PowerTransferCompanyZHDto
.
getSubmissionContent
()
+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
}
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
PowerTransferCompanyZHDto
.
getSequenceNbr
(),
PowerTransferCompanyZHDto
.
getDispatchType
(),
PowerTransferCompanyZHDto
.
getRecDate
(),
content
);
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
PowerTransferCompanyZHDto
.
getSequenceNbr
(),
PowerTransferCompanyZHDto
.
getDispatchType
(),
PowerTransferCompanyZHDto
.
getRecDate
(),
content
);
listInstructionsZHDto
.
add
(
instruct
);
});
//获取融合调度信息
List
<
AlertSubmittedZHDto
>
listAlertSubmittedZHDto
=
alertSubmittedMapper
.
listAlertSubmittedZHDto
(
id
);
List
<
AlertSubmittedZHDto
>
listAlertSubmittedZHDto
=
alertSubmittedMapper
.
listAlertSubmittedZHDto
(
id
);
listAlertSubmittedZHDto
.
stream
().
forEach
(
AlertSubmittedZHDto
->
{
JSONObject
js
=
JSONObject
.
parseObject
(
AlertSubmittedZHDto
.
getSubmissionContent
());
String
content
=
""
;
listAlertSubmittedZHDto
.
stream
().
forEach
(
AlertSubmittedZHDto
->
{
JSONObject
js
=
JSONObject
.
parseObject
(
AlertSubmittedZHDto
.
getSubmissionContent
());
String
content
=
""
;
switch
(
AlertSubmittedZHDto
.
getBusinessType
())
{
switch
(
AlertSubmittedZHDto
.
getBusinessType
())
{
case
"警情初报"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
js
.
getString
(
"address"
)+
"发生"
+
js
.
getString
(
"alertType"
);
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
js
.
getString
(
"address"
)
+
"发生"
+
js
.
getString
(
"alertType"
);
break
;
case
"警情续报"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
"现场被困人数:"
+
js
.
getString
(
"trappedNum"
)+
"人伤亡人数:"
+
js
.
getString
(
"casualtiesNum"
)+
"人。"
;
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"现场被困人数:"
+
js
.
getString
(
"trappedNum"
)
+
"人伤亡人数:"
+
js
.
getString
(
"casualtiesNum"
)
+
"人。"
;
break
;
case
"非警情确认"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
"此警情现场确认为假警情。"
;
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"此警情现场确认为假警情。"
;
break
;
case
"警情结案"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
"此警情已完场警情处置,警情已结案。"
;
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"此警情已完场警情处置,警情已结案。"
;
break
;
default
:
...
...
@@ -494,17 +485,26 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
break
;
}
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
AlertSubmittedZHDto
.
getSequenceNbr
(),
AlertSubmittedZHDto
.
getBusinessType
(),
AlertSubmittedZHDto
.
getSubmissionTime
(),
content
);
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
AlertSubmittedZHDto
.
getSequenceNbr
(),
AlertSubmittedZHDto
.
getBusinessType
(),
AlertSubmittedZHDto
.
getSubmissionTime
(),
content
);
listInstructionsZHDto
.
add
(
instruct
);
});
//排序时间倒序
/* Bug 2613 修改排序 按照发送时间排序 2021-09-01 陈召 开始*/
Collections
.
sort
(
listInstructionsZHDto
,
new
Comparator
<
InstructionsZHDto
>()
{
@Override
public
int
compare
(
InstructionsZHDto
o1
,
InstructionsZHDto
o2
)
{
long
i
=
o2
.
getSubmissionTime
().
getTime
()
-
o1
.
getSubmissionTime
().
getTime
();
if
(
i
==
0
)
{
return
(
int
)
(
o2
.
getSubmissionTime
().
getTime
()
-
o1
.
getSubmissionTime
().
getTime
());
}
return
(
int
)
i
;
}
});
/* Bug 2613 修改排序 按照发送时间排序 2021-09-01 陈召 结束*/
return
listInstructionsZHDto
;
List
<
InstructionsZHDto
>
listA
=
listInstructionsZHDto
.
stream
().
sorted
(
Comparator
.
comparing
(
InstructionsZHDto:
:
getSubmissionTime
).
reversed
()).
collect
(
Collectors
.
toList
());
return
listA
;
}
/**
...
...
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