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
c2738cd5
Commit
c2738cd5
authored
Sep 02, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chenhao' into developer
parents
d472496a
fa926297
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
48 deletions
+60
-48
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+1
-1
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+15
-11
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+8
-0
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/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
c2738cd5
...
...
@@ -21,7 +21,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
int
selectPersonListCount
(
Map
<
String
,
Object
>
map
);
List
<
Map
<
String
,
Object
>>
selectPersonList
(
Map
<
String
,
Object
>
map
);
List
<
Map
<
String
,
Object
>>
selectPersonList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
c2738cd5
...
...
@@ -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-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
c2738cd5
...
...
@@ -328,16 +328,23 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
/*Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 开始*/
map
.
put
(
"bizOrgType"
,
OrgPersonEnum
.
人员
.
getKey
());
if
(!
ObjectUtils
.
isEmpty
(
req
.
get
(
"bizOrgName"
)))
{
map
.
put
(
"bizOrgName"
,
req
.
get
(
"bizOrgName"
));
}
if
(!
ObjectUtils
.
isEmpty
(
req
.
get
(
"personNumber"
)))
{
map
.
put
(
"personNumber"
,
req
.
get
(
"personNumber"
));
}
OrgUsr
parent
=
this
.
getById
(
Long
.
valueOf
(
req
.
get
(
"parentId"
).
toString
()));
map
.
put
(
"bizOrgCode"
,
ObjectUtils
.
isEmpty
(
parent
)
?
null
:
parent
.
getBizOrgCode
());
req
.
remove
(
"bizOrgName"
);
req
.
remove
(
"pageSize"
);
req
.
remove
(
"pageNum"
);
req
.
remove
(
"parentId"
);
map
.
put
(
"fieldsValue"
,
req
);
map
.
put
(
"fields"
,
alertFormServiceImpl
.
queryListByFormId
(
OrgPersonEnum
.
人员
.
getCode
()));
pageBean
.
setTotal
(
this
.
baseMapper
.
selectPersonListCount
(
map
));
...
...
@@ -346,6 +353,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
selectPersonList
(
map
);
/*Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束*/
pageBean
.
setRecords
(
list
);
return
pageBean
;
}
...
...
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 @
c2738cd5
...
...
@@ -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