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
c89433e4
Commit
c89433e4
authored
Sep 23, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2304 地址 联系人模糊查询缺失
parent
7e2e5b52
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
139 additions
and
16 deletions
+139
-16
FireTeamMapper.xml
...e-common-api/src/main/resources/mapper/FireTeamMapper.xml
+3
-3
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+11
-0
KeySiteMapper.xml
...le-common-api/src/main/resources/mapper/KeySiteMapper.xml
+10
-1
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+22
-1
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+17
-1
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+6
-0
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+4
-1
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+9
-0
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+36
-9
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+21
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FireTeamMapper.xml
View file @
c89433e4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<select
id=
"listMonitorFireBrigade"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto"
>
<select
id=
"listMonitorFireBrigade"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto"
>
SELECT ft.sequence_nbr id,
SELECT ft.sequence_nbr id,
ft.NAME,
ft.NAME,
ft.img,
ft.img
AS pic
,
COUNT(DISTINCT ff.sequence_nbr) personCount
COUNT(DISTINCT ff.sequence_nbr) personCount
FROM cb_fire_team ft
FROM cb_fire_team ft
LEFT JOIN cb_firefighters ff ON ff.fire_team_id = ft.sequence_nbr
LEFT JOIN cb_firefighters ff ON ff.fire_team_id = ft.sequence_nbr
...
@@ -99,12 +99,12 @@
...
@@ -99,12 +99,12 @@
a.name ,
a.name ,
a.contact_user contactUser,
a.contact_user contactUser,
a.contact_phone contactPhone,
a.contact_phone contactPhone,
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) userNum,
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_n
br AND is_delete = 0 ) userNum,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_fire_team a
FROM cb_fire_team a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if
test=
'par.typeCode!=null and par.typeCode!=""'
>
<if
test=
'par.typeCode!=null and par.typeCode!=""'
>
and a.type_code in (
#{par.typeCode}
)
and a.type_code in (
116,830,114
)
</if>
</if>
<if
test=
'par.distance!=null'
>
<if
test=
'par.distance!=null'
>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
= #{par.distance}
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
= #{par.distance}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
c89433e4
...
@@ -92,4 +92,15 @@
...
@@ -92,4 +92,15 @@
where f.is_delete = #{isDelete}
where f.is_delete = #{isDelete}
</select>
</select>
<select
id=
"getFirefightersName"
resultType=
"string"
>
SELECT
a.name
FROM
cb_firefighters a
WHERE
a.is_delete =0
and
a.name like concat ('%',#{contactName},'%')
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/KeySiteMapper.xml
View file @
c89433e4
...
@@ -120,5 +120,14 @@
...
@@ -120,5 +120,14 @@
left join cb_org_usr cou on c.belong_id = cou.sequence_nbr
left join cb_org_usr cou on c.belong_id = cou.sequence_nbr
where c.is_delete = FALSE;
where c.is_delete = FALSE;
</select>
</select>
<select
id=
"getAddress"
resultType=
"string"
>
SELECT
c.address_desc
FROM cb_key_site c
where c.is_delete = FALSE
and
c.address_desc like concat ('%',#{address},'%');
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
c89433e4
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
FROM
FROM
jc_alert_called a
jc_alert_called a
<where>
<where>
1=1
a.is_delete = 0
<if
test=
"alertStatus!= null "
>
<if
test=
"alertStatus!= null "
>
and alert_status = #{alertStatus}
and alert_status = #{alertStatus}
</if>
</if>
...
@@ -185,6 +185,27 @@
...
@@ -185,6 +185,27 @@
</select>
</select>
<select
id=
"getContactName"
resultType=
"string"
>
SELECT
a.contact_user
FROM
jc_alert_called a
WHERE
a.is_delete =0
and
a.contact_user like concat ('%',#{contactName},'%')
</select>
<select
id=
"getAddress"
resultType=
"string"
>
SELECT
a.address
FROM
jc_alert_called a
WHERE
a.is_delete =0
and
a.address like concat ('%',#{address},'%')
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
c89433e4
...
@@ -416,5 +416,20 @@ public class OrgUsrController extends BaseController {
...
@@ -416,5 +416,20 @@ public class OrgUsrController extends BaseController {
List
<
Map
<
String
,
Object
>>
loginUserDetails
=
iOrgUsrService
.
getLoginUserDetails
(
userIds
);
List
<
Map
<
String
,
Object
>>
loginUserDetails
=
iOrgUsrService
.
getLoginUserDetails
(
userIds
);
return
ResponseHelper
.
buildResponse
(
loginUserDetails
);
return
ResponseHelper
.
buildResponse
(
loginUserDetails
);
}
}
/**
* 判断关联账户是否已关联
*
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAmosId"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断关联账户是否已关联"
,
notes
=
"判断关联账户是否已关联"
)
public
Object
getAmosId
(
String
amosId
)
{
return
iOrgUsrService
.
amosIdExist
(
amosId
);
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FirefightersServiceImpl.java
View file @
c89433e4
...
@@ -103,4 +103,10 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
...
@@ -103,4 +103,10 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
}
}
public
List
<
String
>
getFirefightersName
(
String
contactName
)
{
return
firefightersMapper
.
getFirefightersName
(
contactName
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/KeySiteServiceImpl.java
View file @
c89433e4
...
@@ -296,5 +296,8 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
...
@@ -296,5 +296,8 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
return
list1
;
return
list1
;
}
}
public
List
<
String
>
getAddress
(
String
address
){
return
keySiteMapper
.
getAddress
(
address
);
}
}
}
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 @
c89433e4
...
@@ -82,6 +82,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -82,6 +82,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Autowired
@Autowired
DynamicFormInstanceServiceImpl
alertFormValueServiceImpl
;
DynamicFormInstanceServiceImpl
alertFormValueServiceImpl
;
@Autowired
@Autowired
FirefightersServiceImpl
firefightersService
;
@Autowired
DynamicFormColumnServiceImpl
alertFormServiceImpl
;
DynamicFormColumnServiceImpl
alertFormServiceImpl
;
@Resource
@Resource
OrgUsrMapper
orgUsrMapper
;
OrgUsrMapper
orgUsrMapper
;
...
@@ -1439,6 +1441,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -1439,6 +1441,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
orgUsrList
;
return
orgUsrList
;
}
}
public
Object
amosIdExist
(
String
amosId
){
List
<
OrgUsr
>
orgUsrs
=
orgUsrMapper
.
amosIdExist
(
amosId
);
if
(
orgUsrs
.
size
()
>
0
){
return
false
;
}
return
true
;
}
}
}
...
...
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 @
c89433e4
...
@@ -8,20 +8,13 @@ import java.util.stream.Collectors;
...
@@ -8,20 +8,13 @@ import java.util.stream.Collectors;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStatusEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStatusEnum
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -68,6 +61,9 @@ public class AlertCalledController extends BaseController {
...
@@ -68,6 +61,9 @@ public class AlertCalledController extends BaseController {
private
ESAlertCalledService
eSAlertCalledService
;
private
ESAlertCalledService
eSAlertCalledService
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
@Value
(
"${redis.cache.failure.time}"
)
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
private
long
time
;
/**
/**
...
@@ -338,4 +334,34 @@ public class AlertCalledController extends BaseController {
...
@@ -338,4 +334,34 @@ public class AlertCalledController extends BaseController {
@RequestParam
String
latitude
)
{
@RequestParam
String
latitude
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
reLocate
(
alertCalled
,
longitude
,
latitude
));
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
reLocate
(
alertCalled
,
longitude
,
latitude
));
}
}
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 开始*/
/**
* 警情填报联系人模糊查询
*
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAmosId"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情填报联系人模糊查询"
,
notes
=
"警情填报联系人模糊查询"
)
public
List
<
String
>
getContact
(
String
contactName
)
{
return
iAlertCalledService
.
getContactName
(
contactName
);
}
/**
* 警情填报地址模糊查询
*
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAddress"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情填报地址模糊查询"
,
notes
=
"警情填报地址模糊查询"
)
public
List
<
String
>
getAddress
(
String
address
)
{
return
iAlertCalledService
.
getCalledAddress
(
address
);
}
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 结束*/
}
}
\ No newline at end of file
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 @
c89433e4
...
@@ -9,6 +9,8 @@ import java.util.Map;
...
@@ -9,6 +9,8 @@ import java.util.Map;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -93,6 +95,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -93,6 +95,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
private
ControllerServiceImpl
controllerService
;
private
ControllerServiceImpl
controllerService
;
@Autowired
@Autowired
private
ControllerEquipServiceImpl
controllerEquipService
;
private
ControllerEquipServiceImpl
controllerEquipService
;
@Autowired
FirefightersServiceImpl
firefightersService
;
@Autowired
KeySiteServiceImpl
keySiteService
;
@Autowired
@Autowired
private
AlertLocationLogServiceImpl
alertLocationLogService
;
private
AlertLocationLogServiceImpl
alertLocationLogService
;
...
@@ -774,4 +780,19 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -774,4 +780,19 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
}
return
resultList
;
return
resultList
;
}
}
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 开始*/
public
List
<
String
>
getContactName
(
String
contactName
){
List
<
String
>
firefightersName
=
firefightersService
.
getFirefightersName
(
contactName
);
List
<
String
>
contactNames
=
alertCalledMapper
.
getContactName
(
contactName
);
firefightersName
.
addAll
(
contactNames
);
return
firefightersName
;
}
public
List
<
String
>
getCalledAddress
(
String
address
){
List
<
String
>
keyAddress
=
keySiteService
.
getAddress
(
address
);
List
<
String
>
alertAddress
=
alertCalledMapper
.
getAddress
(
address
);
keyAddress
.
addAll
(
alertAddress
);
return
keyAddress
;
}
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 结束*/
}
}
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