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
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
201 additions
and
159 deletions
+201
-159
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
+146
-145
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);
...
@@ -71,6 +71,6 @@ public List<OrgMenuDto> getBuildAndKeyTree(Long sequenceNbr);
public
List
<
KeySiteDateDto
>
getKeySiteDate
(
Long
id
);
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 @@
...
@@ -271,7 +271,7 @@
FROM
FROM
cb_key_site
cb_key_site
WHERE
WHERE
address_desc LIKE CONCAT('%',#{locationt},'%') and
is_delete=0
is_delete=0
</select>
</select>
<select
id=
"getAlertCalledLocation"
resultType=
"Map"
>
<select
id=
"getAlertCalledLocation"
resultType=
"Map"
>
...
@@ -282,7 +282,7 @@
...
@@ -282,7 +282,7 @@
FROM
FROM
jc_alert_called
jc_alert_called
WHERE
WHERE
address LIKE CONCAT('%',#{locationt},'%') and
is_delete=0
is_delete=0
</select>
</select>
<select
id=
"getOrgUserLocation"
resultType=
"Map"
>
<select
id=
"getOrgUserLocation"
resultType=
"Map"
>
...
@@ -296,7 +296,7 @@
...
@@ -296,7 +296,7 @@
case when field_code='longitude' then field_value end as longitude,
case when field_code='longitude' then field_value end as longitude,
case when field_code='latitude' then field_value end as latitude
case when field_code='latitude' then field_value end as latitude
from cb_dynamic_form_instance
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>
<select
id=
"getAirportLocation"
resultType=
"Map"
>
<select
id=
"getAirportLocation"
resultType=
"Map"
>
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
FROM
FROM
jc_airport_stand
jc_airport_stand
WHERE
WHERE
stand_code LIKE CONCAT('%',#{locationt},'%') and
is_delete=0
is_delete=0
</select>
</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/KeySiteController.java
View file @
3ffcbb63
...
@@ -230,8 +230,8 @@ public class KeySiteController extends BaseController {
...
@@ -230,8 +230,8 @@ public class KeySiteController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过名称模糊查询重点部位的信息"
,
notes
=
"通过名称模糊查询重点部位的信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过名称模糊查询重点部位的信息"
,
notes
=
"通过名称模糊查询重点部位的信息"
)
@GetMapping
(
value
=
"/getKeySiteDateByNameLike"
)
@GetMapping
(
value
=
"/getKeySiteDateByNameLike"
)
public
ResponseModel
<
List
<
KeySite
>>
getKeySiteDateByNameLike
(
@RequestParam
String
name
)
{
public
ResponseModel
<
List
<
KeySite
>>
getKeySiteDateByNameLike
(
@RequestParam
String
name
,
@RequestParam
Long
companyId
)
{
return
ResponseHelper
.
buildResponse
(
keySiteService
.
getKeySiteDateByNameLike
(
name
));
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
...
@@ -319,9 +319,10 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
}
}
@Override
@Override
public
List
<
KeySite
>
getKeySiteDateByNameLike
(
String
name
)
{
public
List
<
KeySite
>
getKeySiteDateByNameLike
(
String
name
,
Long
companyId
)
{
LambdaQueryWrapper
<
KeySite
>
mapper
=
new
LambdaQueryWrapper
<
KeySite
>();
LambdaQueryWrapper
<
KeySite
>
mapper
=
new
LambdaQueryWrapper
<
KeySite
>();
mapper
.
eq
(
KeySite:
:
getIsDelete
,
false
);
mapper
.
eq
(
KeySite:
:
getIsDelete
,
false
);
mapper
.
eq
(
KeySite:
:
getBelongId
,
companyId
);
mapper
.
like
(
KeySite:
:
getName
,
name
);
mapper
.
like
(
KeySite:
:
getName
,
name
);
return
this
.
baseMapper
.
selectList
(
mapper
);
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
...
@@ -38,93 +38,95 @@ import java.util.Map;
...
@@ -38,93 +38,95 @@ import java.util.Map;
@RequestMapping
(
value
=
"/excel"
)
@RequestMapping
(
value
=
"/excel"
)
public
class
ExcelController
extends
BaseController
{
public
class
ExcelController
extends
BaseController
{
@Autowired
ExcelServiceImpl
excelService
;
@Autowired
DataSourcesImpl
dataSources
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
@Autowired
Sequence
sequence
;
ExcelServiceImpl
excelService
;
private
static
final
String
NOT_DUTY
=
"休班"
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取上传excle文件是否成功"
)
@GetMapping
(
"/get/template/isSuccess/{key}"
)
public
ResponseModel
<
Object
>
getTemplateIsSuccess
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"key"
)
String
key
)
{
if
(
redisUtils
.
hasKey
(
key
))
{
Object
obj
=
redisUtils
.
get
(
key
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"下载模板"
)
@GetMapping
(
"/download/template/{type}"
)
public
void
downloadTemplate
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
templateExport
(
response
,
excelDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
}
}
/**
* * @param Map par 可以传递过滤条件,传入具体实现类中
* @return
* <PRE>
* author tw
* date 2021/9/13
* </PRE>
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出公用类"
)
@GetMapping
(
"/export/{type}"
)
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonExport
(
response
,
excelDto
,
par
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导入公用"
)
@PostMapping
(
"/upload/{type}"
)
public
ResponseModel
<
Object
>
upload
(
@RequestPart
(
"file"
)
MultipartFile
multipartFile
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
try
{
long
uuid
=
sequence
.
nextId
();
String
uuidString
=
Long
.
toString
(
uuid
);
redisUtils
.
set
(
uuidString
,
0
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
uuidString
);
return
ResponseHelper
.
buildResponse
(
uuidString
);
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
"文件格式不正确或excel 模板不匹配"
);
// BUG 2821 by litw 2021年9月16日
}
catch
(
Exception
e
){
throw
new
BadRequest
(
"文件格式不正确或excel 模板不匹配!"
);
}
}
@Autowired
DataSourcesImpl
dataSources
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
Sequence
sequence
;
private
static
final
String
NOT_DUTY
=
"休班"
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取上传excle文件是否成功"
)
@GetMapping
(
"/get/template/isSuccess/{key}"
)
public
ResponseModel
<
Object
>
getTemplateIsSuccess
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"key"
)
String
key
)
{
if
(
redisUtils
.
hasKey
(
key
))
{
Object
obj
=
redisUtils
.
get
(
key
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"下载模板"
)
@GetMapping
(
"/download/template/{type}"
)
public
void
downloadTemplate
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
templateExport
(
response
,
excelDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
}
}
/**
* * @param Map par 可以传递过滤条件,传入具体实现类中
*
* @return
*
* <PRE>
* author tw
* date 2021/9/13
* </PRE>
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出公用类"
)
@GetMapping
(
"/export/{type}"
)
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonExport
(
response
,
excelDto
,
par
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导入公用"
)
@PostMapping
(
"/upload/{type}"
)
public
ResponseModel
<
Object
>
upload
(
@RequestPart
(
"file"
)
MultipartFile
multipartFile
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
try
{
long
uuid
=
sequence
.
nextId
();
String
uuidString
=
Long
.
toString
(
uuid
);
redisUtils
.
set
(
uuidString
,
0
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
uuidString
);
return
ResponseHelper
.
buildResponse
(
uuidString
);
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
"文件格式不正确或excel 模板不匹配"
);
// BUG 2821 by litw 2021年9月16日
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"文件格式不正确或excel 模板不匹配!"
);
}
}
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "上传文件数据-2")
// @ApiOperation(value = "上传文件数据-2")
...
@@ -152,67 +154,66 @@ public class ExcelController extends BaseController {
...
@@ -152,67 +154,66 @@ public class ExcelController extends BaseController {
// throw new RuntimeException("系统异常!");
// throw new RuntimeException("系统异常!");
// }
// }
// }
// }
/**
/**
* 导出值班模板
* 导出值班模板
*
*
* @param response
* @param response
* @param beginDate 值班开始日期
* @param beginDate 值班开始日期
* @param endDate 值班结束日期
* @param endDate 值班结束日期
* @param excelDto 导出类型参数
* @param excelDto 导出类型参数
* @param ids 部门或队伍的id列表,逗号分隔
* @param ids 部门或队伍的id列表,逗号分隔
*/
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出值班模板"
,
notes
=
"导出值班模板"
)
@ApiOperation
(
value
=
"导出值班模板"
,
notes
=
"导出值班模板"
)
@GetMapping
(
value
=
"/duty_template"
)
@GetMapping
(
value
=
"/duty_template"
)
public
void
dutyCarTemplate
(
HttpServletResponse
response
,
@RequestParam
(
"beginDate"
)
String
beginDate
,
public
void
dutyCarTemplate
(
HttpServletResponse
response
,
@RequestParam
(
"beginDate"
)
String
beginDate
,
@RequestParam
(
"endDate"
)
String
endDate
,
ExcelDto
excelDto
,
@RequestParam
(
"endDate"
)
String
endDate
,
ExcelDto
excelDto
,
@RequestParam
(
"ids"
)
String
ids
)
{
@RequestParam
(
"ids"
)
String
ids
)
{
try
{
try
{
excelService
.
dutyTemplateExport
(
response
,
beginDate
,
endDate
,
excelDto
,
ids
);
excelService
.
dutyTemplateExport
(
response
,
beginDate
,
endDate
,
excelDto
,
ids
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
}
}
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出值班信息"
,
notes
=
"导出值班模板"
)
@ApiOperation
(
value
=
"导出值班信息"
,
notes
=
"导出值班模板"
)
@GetMapping
(
value
=
"/duty_info"
)
@GetMapping
(
value
=
"/duty_info"
)
public
void
dutyCarDuty
(
HttpServletResponse
response
,
@RequestParam
(
"beginDate"
)
String
beginDate
,
public
void
dutyCarDuty
(
HttpServletResponse
response
,
@RequestParam
(
"beginDate"
)
String
beginDate
,
@RequestParam
(
"endDate"
)
String
endDate
,
ExcelDto
excelDto
)
{
@RequestParam
(
"endDate"
)
String
endDate
,
ExcelDto
excelDto
)
{
try
{
try
{
excelService
.
dutyInfoExport
(
response
,
beginDate
,
endDate
,
excelDto
);
excelService
.
dutyInfoExport
(
response
,
beginDate
,
endDate
,
excelDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
}
}
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出公用类带过滤参数"
)
@ApiOperation
(
value
=
"导出公用类带过滤参数"
)
@PostMapping
(
"/exportByParams/{type}"
)
@PostMapping
(
"/exportByParams/{type}"
)
public
void
getFireStationFileByParams
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
public
void
getFireStationFileByParams
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"params"
)
String
params
)
{
@RequestParam
(
value
=
"params"
)
String
params
)
{
try
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
exportByParams
(
response
,
excelDto
,
params
);
excelService
.
exportByParams
(
response
,
excelDto
,
params
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
}
}
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出给提供设备接口"
)
@ApiOperation
(
value
=
"导出给提供设备接口"
)
@GetMapping
(
value
=
"/exportForEquipment"
)
@GetMapping
(
value
=
"/exportForEquipment"
)
public
ResponseModel
<
String
[]>
getFireStationFileByParams
(
String
type
,
public
ResponseModel
<
String
[]>
getFireStationFileByParams
(
String
type
,
String
method
)
{
String
method
)
{
try
{
try
{
return
ResponseHelper
.
buildResponse
(
dataSources
.
selectList
(
type
,
method
));
return
ResponseHelper
.
buildResponse
(
dataSources
.
selectList
(
type
,
method
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
}
}
}
}
}
}
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
;
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.function.Function
;
import
java.util.stream.Collectors
;
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.apache.commons.lang3.StringUtils
;
import
org.joda.time.DateTime
;
import
org.joda.time.DateTime
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -31,12 +31,15 @@ import com.google.common.collect.Lists;
...
@@ -31,12 +31,15 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
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.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.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
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.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrzhDto
;
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.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.feign.JcsControlServerClient
;
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.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
...
@@ -48,6 +51,11 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.ControllerDto;
...
@@ -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.ControllerEquipDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
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.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.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.DutyInfoEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.DutyInfoEnum
;
...
@@ -825,7 +833,6 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -825,7 +833,6 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
}
);
);
firefightersName
.
addAll
(
contactNames
);
firefightersName
.
addAll
(
contactNames
);
return
firefightersName
;
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;
...
@@ -19,6 +19,7 @@ import org.springframework.core.env.Environment;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
...
@@ -38,6 +39,7 @@ import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
...
@@ -38,6 +39,7 @@ import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
@EnableFeignClients
@EnableFeignClients
@EnableAsync
@EnableAsync
@EnableEurekaClient
@EnableEurekaClient
@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
@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*"
,
"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"
})
"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