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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
44 deletions
+48
-44
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+15
-11
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+33
-33
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 @@
...
@@ -60,33 +60,37 @@
u.sequence_nbr sequenceNbr,
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
u.biz_org_code bizOrgCode,
<if
test=
"fields != null"
>
<if
test=
"
map.
fields != null"
>
<foreach
collection=
"fields"
item=
"item"
separator=
","
>
MAX(case f.field_code when #{item} then IFNULL(v.field_value_label, v.field_value)
<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}
end) ${item}
</foreach>
</foreach>
</if>
</if>
FROM
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
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
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
where
where
u.biz_org_type = #{bizOrgType}
u.biz_org_type = #{
map.
bizOrgType}
AND u.is_delete = 0
AND u.is_delete = 0
<if
test=
"bizOrgName != null"
>
<if
test=
"
map.
bizOrgName != null"
>
AND u.biz_org_name
= #{bizOrgName}
AND u.biz_org_name
like concat('%',#{map.bizOrgName},'%')
</if>
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != '-1'"
>
<if
test=
"map.personNumber!= null"
>
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
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>
</if>
GROUP BY
GROUP BY
u.sequence_nbr ,
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_name ,
u.biz_org_code
u.biz_org_code
)a where a.sequenceNbr is not null
)a where a.sequenceNbr is not null
<if
test=
"fieldsValue != null"
>
<if
test=
"
map.
fieldsValue != null"
>
<foreach
collection=
"
fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{
fieldsValue[${item}]}
</foreach>
<foreach
collection=
"
map.fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{map.
fieldsValue[${item}]}
</foreach>
</if>
</if>
LIMIT #{
pageNum}, #{
pageSize}
LIMIT #{
map.pageNum}, #{map.
pageSize}
</select>
</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;
...
@@ -55,15 +55,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.*
;
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.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -443,50 +435,49 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -443,50 +435,49 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
@Override
@Override
public
List
<
InstructionsZHDto
>
getInstructionsZHDtoList
(
Long
id
)
{
public
List
<
InstructionsZHDto
>
getInstructionsZHDtoList
(
Long
id
)
{
List
<
InstructionsZHDto
>
listInstructionsZHDto
=
new
ArrayList
<>();
List
<
InstructionsZHDto
>
listInstructionsZHDto
=
new
ArrayList
<>();
//获取调派记录
//获取调派记录
List
<
PowerTransferCompanyZHDto
>
listPowerTransferCompanyZHDto
=
powerTransferCompanyMapper
.
listPowerTransferCompanyZHDto
(
id
);
List
<
PowerTransferCompanyZHDto
>
listPowerTransferCompanyZHDto
=
powerTransferCompanyMapper
.
listPowerTransferCompanyZHDto
(
id
);
listPowerTransferCompanyZHDto
.
stream
().
forEach
(
PowerTransferCompanyZHDto
->
{
listPowerTransferCompanyZHDto
.
stream
().
forEach
(
PowerTransferCompanyZHDto
->
{
String
content
=
""
;
String
content
=
""
;
if
(
PowerTransferCompanyZHDto
.
getIsDistributionAgencies
())
{
if
(
PowerTransferCompanyZHDto
.
getIsDistributionAgencies
())
{
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()
+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
}
else
{
}
else
{
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()+
PowerTransferCompanyZHDto
.
getSubmissionContent
()+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
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
);
listInstructionsZHDto
.
add
(
instruct
);
});
});
//获取融合调度信息
//获取融合调度信息
List
<
AlertSubmittedZHDto
>
listAlertSubmittedZHDto
=
alertSubmittedMapper
.
listAlertSubmittedZHDto
(
id
);
List
<
AlertSubmittedZHDto
>
listAlertSubmittedZHDto
=
alertSubmittedMapper
.
listAlertSubmittedZHDto
(
id
);
listAlertSubmittedZHDto
.
stream
().
forEach
(
AlertSubmittedZHDto
->
{
listAlertSubmittedZHDto
.
stream
().
forEach
(
AlertSubmittedZHDto
->
{
JSONObject
js
=
JSONObject
.
parseObject
(
AlertSubmittedZHDto
.
getSubmissionContent
());
JSONObject
js
=
JSONObject
.
parseObject
(
AlertSubmittedZHDto
.
getSubmissionContent
());
String
content
=
""
;
String
content
=
""
;
switch
(
AlertSubmittedZHDto
.
getBusinessType
())
{
switch
(
AlertSubmittedZHDto
.
getBusinessType
())
{
case
"警情初报"
:
case
"警情初报"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
js
.
getString
(
"address"
)+
"发生"
+
js
.
getString
(
"alertType"
);
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
js
.
getString
(
"address"
)
+
"发生"
+
js
.
getString
(
"alertType"
);
break
;
break
;
case
"警情续报"
:
case
"警情续报"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
"现场被困人数:"
+
js
.
getString
(
"trappedNum"
)+
"人伤亡人数:"
+
js
.
getString
(
"casualtiesNum"
)+
"人。"
;
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"现场被困人数:"
+
js
.
getString
(
"trappedNum"
)
+
"人伤亡人数:"
+
js
.
getString
(
"casualtiesNum"
)
+
"人。"
;
break
;
break
;
case
"非警情确认"
:
case
"非警情确认"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
"此警情现场确认为假警情。"
;
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"此警情现场确认为假警情。"
;
break
;
break
;
case
"警情结案"
:
case
"警情结案"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()+
":"
+
AlertSubmittedZHDto
.
getUserName
()+
","
+
"此警情已完场警情处置,警情已结案。"
;
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"此警情已完场警情处置,警情已结案。"
;
break
;
break
;
default
:
default
:
...
@@ -494,17 +485,26 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -494,17 +485,26 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
break
;
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
);
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