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
4275dffd
Commit
4275dffd
authored
Oct 28, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
16f48876
7621d26a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
122 additions
and
74 deletions
+122
-74
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+2
-1
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+26
-1
AlertSubmittedSMSDto.java
...in/amos/boot/module/jcs/api/dto/AlertSubmittedSMSDto.java
+3
-0
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+6
-4
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+0
-0
AlertSubmittedController.java
...t/module/jcs/biz/controller/AlertSubmittedController.java
+30
-16
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+1
-2
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+0
-0
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+54
-17
GetContactNameSchedulerJob.java
...dule/jcs/biz/service/impl/GetContactNameSchedulerJob.java
+0
-31
AmosJcsApplication.java
...cs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
+0
-2
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 @
4275dffd
...
@@ -87,5 +87,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
...
@@ -87,5 +87,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
void
updatelistByParentId
(
String
codex
,
String
code
);
void
updatelistByParentId
(
String
codex
,
String
code
);
List
<
Map
<
String
,
String
>>
getPersonSimpleDetail
();
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
4275dffd
...
@@ -633,5 +633,30 @@ GROUP BY
...
@@ -633,5 +633,30 @@ GROUP BY
</update>
</update>
<select
id =
'getPersonSimpleDetail'
resultType=
'Map'
>
SELECT
person.biz_org_name as name,
cdf.field_value as phone
FROM
(
SELECT
sequence_nbr,
biz_org_name
FROM
cb_org_usr
WHERE
biz_org_type = 'PERSON'
AND is_delete = 0
) person
LEFT JOIN (
SELECT
field_value,
instance_id
FROM
cb_dynamic_form_instance
WHERE
group_code = '246'
AND field_code = 'telephone'
) cdf ON person.sequence_nbr = cdf.instance_id
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AlertSubmittedSMSDto.java
View file @
4275dffd
...
@@ -42,6 +42,9 @@ public class AlertSubmittedSMSDto {
...
@@ -42,6 +42,9 @@ public class AlertSubmittedSMSDto {
@ApiModelProperty
(
value
=
"报送内容"
)
@ApiModelProperty
(
value
=
"报送内容"
)
private
String
submissionContent
;
private
String
submissionContent
;
@ApiModelProperty
(
value
=
"报送内容-自定义"
)
private
String
submissionContentValue
;
@ApiModelProperty
(
value
=
"报送模板"
)
@ApiModelProperty
(
value
=
"报送模板"
)
private
String
submissionTemplate
;
private
String
submissionTemplate
;
}
}
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 @
4275dffd
...
@@ -77,10 +77,12 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
...
@@ -77,10 +77,12 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
firefighter
.
setNativePlaceValue
(
nativePlace
.
getResult
().
getRegionName
());
firefighter
.
setNativePlaceValue
(
nativePlace
.
getResult
().
getRegionName
());
}
}
save
(
firefighter
);
save
(
firefighter
);
FirefightersContacts
firefightersContact
=
firefighters
.
getFirefightersContacts
();
if
(
firefighters
.
getFirefightersContacts
()
!=
null
){
firefightersContact
.
setFirefightersId
(
firefighter
.
getSequenceNbr
());
FirefightersContacts
firefightersContact
=
firefighters
.
getFirefightersContacts
();
firefightersContactsService
.
save
(
firefightersContact
);
firefightersContact
.
setFirefightersId
(
firefighter
.
getSequenceNbr
());
firefighters
.
setFirefightersContacts
(
firefightersContact
);
firefightersContactsService
.
save
(
firefightersContact
);
firefighters
.
setFirefightersContacts
(
firefightersContact
);
}
firefighters
.
setFirefighters
(
firefighter
);
firefighters
.
setFirefighters
(
firefighter
);
}
}
...
...
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 @
4275dffd
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/controller/AlertSubmittedController.java
View file @
4275dffd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.util.ArrayList
;
import
com.alibaba.fastjson.JSON
;
import
java.util.Arrays
;
import
com.alibaba.fastjson.JSONException
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -28,12 +15,27 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto;
...
@@ -28,12 +15,27 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertSubmittedObjectServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertSubmittedServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertSubmittedServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.TemplateServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.TemplateServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
/**
/**
...
@@ -62,6 +64,9 @@ public class AlertSubmittedController extends BaseController {
...
@@ -62,6 +64,9 @@ public class AlertSubmittedController extends BaseController {
@Autowired
@Autowired
PowerTransferServiceImpl
powerTransferService
;
PowerTransferServiceImpl
powerTransferService
;
@Autowired
AlertSubmittedObjectServiceImpl
iAlertSubmittedObjectService
;
/**
/**
* 新增警情报送记录
* 新增警情报送记录
*
*
...
@@ -213,7 +218,16 @@ public class AlertSubmittedController extends BaseController {
...
@@ -213,7 +218,16 @@ public class AlertSubmittedController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取融合调度短信内容"
,
notes
=
"获取融合调度短信内容"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取融合调度短信内容"
,
notes
=
"获取融合调度短信内容"
)
public
ResponseModel
<
AlertSubmittedSMSDto
>
getSchedulingContent
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
AlertSubmittedSMSDto
>
getSchedulingContent
(
@PathVariable
Long
id
)
{
// 获取报送内容
// 获取报送内容
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
AlertSubmittedSMSDto
schedulingContent
=
alertSubmittedService
.
getSchedulingContent
(
id
);
AlertSubmittedSMSDto
schedulingContent
=
alertSubmittedService
.
getSchedulingContent
(
id
);
if
(!
ValidationUtil
.
isEmpty
(
schedulingContent
.
getSubmissionContent
()))
{
try
{
JSON
.
parseObject
(
schedulingContent
.
getSubmissionContent
());
}
catch
(
JSONException
jsonException
)
{
schedulingContent
.
setSubmissionContentValue
(
schedulingContent
.
getSubmissionContent
());
schedulingContent
.
setSubmissionTemplate
(
"<p><span data-name=\"custom\"></span></p>"
);
}
}
return
ResponseHelper
.
buildResponse
(
schedulingContent
);
return
ResponseHelper
.
buildResponse
(
schedulingContent
);
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
4275dffd
...
@@ -106,7 +106,7 @@ public class FirefightersController extends BaseController {
...
@@ -106,7 +106,7 @@ public class FirefightersController extends BaseController {
public
ResponseModel
<
FirefightersInfoDto
>
saveFirefighters
(
@RequestBody
FirefightersInfoDto
firefighters
)
{
public
ResponseModel
<
FirefightersInfoDto
>
saveFirefighters
(
@RequestBody
FirefightersInfoDto
firefighters
)
{
try
{
try
{
/*3184 消防人员,编辑页面岗位选择子分类保存成功后,概要中岗位未修改 chenzhao start 2021-10-19*/
/*3184 消防人员,编辑页面岗位选择子分类保存成功后,概要中岗位未修改 chenzhao start 2021-10-19*/
if
(
firefighters
.
getFirefighters
().
getJobTitleCode
()
!=
null
){
if
(
firefighters
.
getFirefighters
().
getJobTitleCode
()
!=
null
&&
!
firefighters
.
getFirefighters
().
getJobTitleCode
().
equals
(
""
)
){
DataDictionary
gwmc
=
dataDictionaryService
.
getByCode
(
firefighters
.
getFirefighters
().
getJobTitleCode
(),
"GWMC"
);
DataDictionary
gwmc
=
dataDictionaryService
.
getByCode
(
firefighters
.
getFirefighters
().
getJobTitleCode
(),
"GWMC"
);
firefighters
.
getFirefighters
().
setJobTitle
(
gwmc
.
getName
());
firefighters
.
getFirefighters
().
setJobTitle
(
gwmc
.
getName
());
}
}
...
@@ -114,7 +114,6 @@ public class FirefightersController extends BaseController {
...
@@ -114,7 +114,6 @@ public class FirefightersController extends BaseController {
iFirefightersService
.
saveFirefighters
(
firefighters
);
iFirefightersService
.
saveFirefighters
(
firefighters
);
return
ResponseHelper
.
buildResponse
(
firefighters
);
return
ResponseHelper
.
buildResponse
(
firefighters
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
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 @
4275dffd
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/AlertSubmittedServiceImpl.java
View file @
4275dffd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONException
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
@@ -11,7 +12,6 @@ import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
...
@@ -11,7 +12,6 @@ import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
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.entity.FirefightersPost
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
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.jcs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto
;
...
@@ -27,7 +27,11 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyZHDto;
...
@@ -27,7 +27,11 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyZHDto;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SchedulingReportingDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SchedulingReportingDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.*
;
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.AlertSubmitted
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmittedObject
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertSchedulingTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertSchedulingTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertSubmitTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertSubmitTypeEnum
;
...
@@ -37,7 +41,6 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertSubmittedMapper;
...
@@ -37,7 +41,6 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertSubmittedMapper;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedObjectService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedObjectService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyResourcesService
;
import
com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction
;
import
com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -54,7 +57,16 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -54,7 +57,16 @@ 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.*
;
import
java.util.ArrayList
;
import
java.util.Collections
;
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
;
/**
/**
...
@@ -133,12 +145,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -133,12 +145,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 组装额外信息
// 组装额外信息
String
_extraInfo
=
"报送给%s、%s"
;
String
_extraInfo
=
"报送给%s、%s"
;
alertSubmittedExtDtoList
.
forEach
(
alertSubmittedExtDto
->
{
alertSubmittedExtDtoList
.
forEach
(
alertSubmittedExtDto
->
{
alertSubmittedExtDto
.
setExtraInfo
(
String
.
format
(
_extraInfo
,
alertSubmittedExtDto
.
getCompanyName
(),
try
{
alertSubmittedExtDto
.
getUserName
()));
alertSubmittedExtDto
.
setExtraInfo
(
String
.
format
(
_extraInfo
,
alertSubmittedExtDto
.
getCompanyName
(),
TemplateExtendDto
template
=
templateService
.
getByType
(
alertSubmittedExtDto
.
getBusinessTypeCode
());
alertSubmittedExtDto
.
getUserName
()));
String
richContent
=
template
.
getRichContent
();
TemplateExtendDto
template
=
templateService
.
getByType
(
alertSubmittedExtDto
.
getBusinessTypeCode
());
alertSubmittedExtDto
.
setSubmissionContentValue
(
JSONObject
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
()));
String
richContent
=
template
.
getRichContent
();
alertSubmittedExtDto
.
setSubmissionContent
(
richContent
);
alertSubmittedExtDto
.
setSubmissionContentValue
(
JSONObject
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
()));
alertSubmittedExtDto
.
setSubmissionContent
(
richContent
);
}
catch
(
JSONException
e
)
{
alertSubmittedExtDto
.
setSubmissionContentValue
(
alertSubmittedExtDto
.
getSubmitContent
());
}
});
});
schedulingReportingDto
.
setSchedulingReportingList
(
alertSubmittedExtDtoList
);
schedulingReportingDto
.
setSchedulingReportingList
(
alertSubmittedExtDtoList
);
...
@@ -275,10 +291,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -275,10 +291,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 1.保存警情记录主表
// 1.保存警情记录主表
AlertSubmitted
alertSubmitted
=
new
AlertSubmitted
();
AlertSubmitted
alertSubmitted
=
new
AlertSubmitted
();
String
bussTypeCode
;
alertSubmitted
.
setAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
alertSubmitted
.
setAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
if
(
"316"
.
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
alertSubmitted
.
setBusinessTypeCode
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
());
bussTypeCode
=
AlertBusinessTypeEnum
.
警情续报
.
getCode
();
}
else
{
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
bussTypeCode
=
alertSubmittedDto
.
getBusinessTypeCode
();
}
Optional
<
AlertBusinessTypeEnum
>
businessTypeEnum
=
EnumsUtils
.
getEnumObject
(
AlertBusinessTypeEnum
.
class
,
Optional
<
AlertBusinessTypeEnum
>
businessTypeEnum
=
EnumsUtils
.
getEnumObject
(
AlertBusinessTypeEnum
.
class
,
e
->
e
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()
));
e
->
e
.
getCode
().
equals
(
bussTypeCode
));
alertSubmitted
.
setBusinessType
(
businessTypeEnum
.
get
().
getName
());
alertSubmitted
.
setBusinessType
(
businessTypeEnum
.
get
().
getName
());
alertSubmitted
.
setCallLogId
(
alertSubmittedDto
.
getCallLogId
());
alertSubmitted
.
setCallLogId
(
alertSubmittedDto
.
getCallLogId
());
alertSubmitted
.
setSubmissionMethodCode
(
alertSubmittedDto
.
getSubmissionMethodCode
());
alertSubmitted
.
setSubmissionMethodCode
(
alertSubmittedDto
.
getSubmissionMethodCode
());
...
@@ -290,7 +315,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -290,7 +315,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
e
->
e
.
getCode
().
equals
(
alertSubmittedDto
.
getSchedulingTypeCode
()));
e
->
e
.
getCode
().
equals
(
alertSubmittedDto
.
getSchedulingTypeCode
()));
alertSubmitted
.
setSchedulingTypeCode
(
alertSubmittedDto
.
getSchedulingTypeCode
());
alertSubmitted
.
setSchedulingTypeCode
(
alertSubmittedDto
.
getSchedulingTypeCode
());
alertSubmitted
.
setSchedulingType
(
alertSchedulingTypeEnum
.
get
().
getName
());
alertSubmitted
.
setSchedulingType
(
alertSchedulingTypeEnum
.
get
().
getName
());
alertSubmitted
.
setSubmissionContent
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
if
(
"316"
.
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
alertSubmitted
.
setSubmissionContent
(
jsonObject
.
get
(
"custom"
).
toString
());
}
else
{
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
alertSubmitted
.
setSubmissionContent
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
}
alertSubmitted
.
setSender
(
userName
);
alertSubmitted
.
setSender
(
userName
);
alertSubmitted
.
setRecUserName
(
userName
);
alertSubmitted
.
setRecUserName
(
userName
);
alertSubmitted
.
setUpdateTime
(
new
Date
());
alertSubmitted
.
setUpdateTime
(
new
Date
());
...
@@ -372,9 +406,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -372,9 +406,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 4.1组织短信内容
// 4.1组织短信内容
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
JSONObject
submitContent
=
alertSubmittedDto
.
getSubmitContent
();
JSONObject
submitContent
=
alertSubmittedDto
.
getSubmitContent
();
smsParams
.
put
(
"alertType"
,
submitContent
.
get
(
"alertType"
).
toString
());
if
(!
"316"
.
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
smsParams
.
put
(
"trappedNum"
,
submitContent
.
get
(
"trappedNum"
).
toString
());
smsParams
.
put
(
"alertType"
,
submitContent
.
get
(
"alertType"
).
toString
());
smsParams
.
put
(
"companyName"
,
submitContent
.
get
(
"companyName"
).
toString
());
smsParams
.
put
(
"trappedNum"
,
submitContent
.
get
(
"trappedNum"
).
toString
());
smsParams
.
put
(
"companyName"
,
submitContent
.
get
(
"companyName"
).
toString
());
}
// 4.2调用短信发送接口
// 4.2调用短信发送接口
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
return
finalAlertSubmittedId
;
return
finalAlertSubmittedId
;
...
...
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
deleted
100644 → 0
View file @
16f48876
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 @
4275dffd
...
@@ -19,7 +19,6 @@ import org.springframework.core.env.Environment;
...
@@ -19,7 +19,6 @@ 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
;
...
@@ -39,7 +38,6 @@ import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
...
@@ -39,7 +38,6 @@ 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