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
3ffcbb63
Commit
3ffcbb63
authored
Oct 27, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加119优化项 利用定时器更新联系人和重点部位模糊查询
parent
28f4d7fe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
14 deletions
+55
-14
IKeySiteService.java
.../amos/boot/module/common/api/service/IKeySiteService.java
+1
-1
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+4
-4
KeySiteController.java
.../boot/module/common/biz/controller/KeySiteController.java
+2
-2
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+2
-1
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+0
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+13
-6
GetContactNameSchedulerJob.java
...dule/jcs/biz/service/impl/GetContactNameSchedulerJob.java
+31
-0
AmosJcsApplication.java
...cs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
+2
-0
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/service/IKeySiteService.java
View file @
3ffcbb63
...
...
@@ -71,6 +71,6 @@ public List<OrgMenuDto> getBuildAndKeyTree(Long sequenceNbr);
public
List
<
KeySiteDateDto
>
getKeySiteDate
(
Long
id
);
public
List
<
KeySite
>
getKeySiteDateByNameLike
(
String
name
);
public
List
<
KeySite
>
getKeySiteDateByNameLike
(
String
name
,
Long
companyId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
3ffcbb63
...
...
@@ -271,7 +271,7 @@
FROM
cb_key_site
WHERE
address_desc LIKE CONCAT('%',#{locationt},'%') and
is_delete=0
is_delete=0
</select>
<select
id=
"getAlertCalledLocation"
resultType=
"Map"
>
...
...
@@ -282,7 +282,7 @@
FROM
jc_alert_called
WHERE
address LIKE CONCAT('%',#{locationt},'%') and
is_delete=0
is_delete=0
</select>
<select
id=
"getOrgUserLocation"
resultType=
"Map"
>
...
...
@@ -296,7 +296,7 @@
case when field_code='longitude' then field_value end as longitude,
case when field_code='latitude' then field_value end as latitude
from cb_dynamic_form_instance
where group_code='244' ) tt where
tt.location like CONCAT('%',#{locationt},'%') and
tt.location is not null
where group_code='244' ) tt where tt.location is not null
</select>
<select
id=
"getAirportLocation"
resultType=
"Map"
>
...
...
@@ -307,7 +307,7 @@
FROM
jc_airport_stand
WHERE
stand_code LIKE CONCAT('%',#{locationt},'%') and
is_delete=0
is_delete=0
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/KeySiteController.java
View file @
3ffcbb63
...
...
@@ -230,8 +230,8 @@ public class KeySiteController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过名称模糊查询重点部位的信息"
,
notes
=
"通过名称模糊查询重点部位的信息"
)
@GetMapping
(
value
=
"/getKeySiteDateByNameLike"
)
public
ResponseModel
<
List
<
KeySite
>>
getKeySiteDateByNameLike
(
@RequestParam
String
name
)
{
return
ResponseHelper
.
buildResponse
(
keySiteService
.
getKeySiteDateByNameLike
(
name
));
public
ResponseModel
<
List
<
KeySite
>>
getKeySiteDateByNameLike
(
@RequestParam
String
name
,
@RequestParam
Long
companyId
)
{
return
ResponseHelper
.
buildResponse
(
keySiteService
.
getKeySiteDateByNameLike
(
name
,
companyId
));
}
}
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 @
3ffcbb63
...
...
@@ -319,9 +319,10 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
}
@Override
public
List
<
KeySite
>
getKeySiteDateByNameLike
(
String
name
)
{
public
List
<
KeySite
>
getKeySiteDateByNameLike
(
String
name
,
Long
companyId
)
{
LambdaQueryWrapper
<
KeySite
>
mapper
=
new
LambdaQueryWrapper
<
KeySite
>();
mapper
.
eq
(
KeySite:
:
getIsDelete
,
false
);
mapper
.
eq
(
KeySite:
:
getBelongId
,
companyId
);
mapper
.
like
(
KeySite:
:
getName
,
name
);
return
this
.
baseMapper
.
selectList
(
mapper
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
3ffcbb63
This diff is collapsed.
Click to expand it.
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 @
3ffcbb63
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.joda.time.DateTime
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -31,12 +31,15 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
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.QRCodeUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrzhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.feign.JcsControlServerClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
...
...
@@ -48,6 +51,11 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.ControllerDto;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerEquipDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerData
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertLocationLog
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.DutyInfoEnum
;
...
...
@@ -825,7 +833,6 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
);
firefightersName
.
addAll
(
contactNames
);
return
firefightersName
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/GetContactNameSchedulerJob.java
0 → 100644
View file @
3ffcbb63
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
@Component
public
class
GetContactNameSchedulerJob
{
@Autowired
RedisUtils
redisUtils
;
@Autowired
AlertCalledServiceImpl
alertCalledServiceImpl
;
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
/**
* 每天凌晨12:01执行方法,更新联系人在缓存中的数据
*/
@Scheduled
(
cron
=
"0 01 00 ? * *"
)
public
void
excuteJob
()
{
List
<
Map
<
String
,
String
>>
contactName
=
alertCalledServiceImpl
.
getContactName
();
redisUtils
.
set
(
RedisKey
.
CONTACT_USER
,
contactName
,
time
);
}
}
amos-boot-system-jcs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
View file @
3ffcbb63
...
...
@@ -19,6 +19,7 @@ import org.springframework.core.env.Environment;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
...
...
@@ -38,6 +39,7 @@ import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
@EnableFeignClients
@EnableAsync
@EnableEurekaClient
@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.*.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
...
...
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