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
da47a9ce
Commit
da47a9ce
authored
Jun 19, 2021
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
警情报送列表接口
parent
d9f14a6c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
107 additions
and
40 deletions
+107
-40
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+15
-15
MyBatisPlusCodeGenerator.java
.../amos/boot/biz/common/utils/MyBatisPlusCodeGenerator.java
+1
-1
MetaHandler.java
...in/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
+15
-10
application.properties
...boot-jcs-system/src/main/resources/application.properties
+1
-1
AlertSubmittedMapper.java
...amos/boot/module/jcs/api/mapper/AlertSubmittedMapper.java
+10
-2
IAlertSubmittedService.java
...s/boot/module/jcs/api/service/IAlertSubmittedService.java
+10
-2
AlertSubmittedMapper.xml
...cs-api/src/main/resources/mapper/AlertSubmittedMapper.xml
+31
-1
ControllerAop.java
...m/yeejoin/amos/boot/module/jcs/biz/aop/ControllerAop.java
+0
-0
AlertSubmittedController.java
...t/module/jcs/biz/controller/AlertSubmittedController.java
+12
-5
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+12
-3
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
da47a9ce
...
...
@@ -520,19 +520,19 @@ public class DateUtils {
return
dateParse
(
dateFormat
(
date
,
MONTH_PATTERN
)
+
"-"
+
value
,
null
);
}
//
public static void main(String[] args) throws Exception {
//
/*System.out.println(dateTimeToDate(new Date()));
//
System.out.println(dateParse("2017-02-04 14:58:20", null));
//
System.out.println(dateTimeToDateStringIfTimeEndZero(new Date()));
//
System.out.println(dateTimeToDateStringIfTimeEndZero(dateTimeToDate(new Date())));*/
//
//System.out.println(dateBetween(dateParse("2017-01-30", null), dateParse("2017-02-01", null)));
//
//System.out.println(dateBetweenIncludeToday(dateParse("2017-01-30", null), dateParse("2017-02-01", null)));
//
System.out.println(getDate(dateParse("2017-01-17", null)));
//
/*
//
System.out.println(getDaysOfMonth(dateParse("2017-02-01", null)));
//
System.out.println(getDaysOfYear(dateParse("2017-01-30", null)));*/
//
//System.out.println(dateFormat(dateAddMonths(dateParse("2017-02-07", StrUtils.MONTH_PATTERN), -12), StrUtils.MONTH_PATTERN));
//
/*System.out.println(dateFormat(maxDateOfMonth(dateParse("2016-02", "yyyy-MM")), null));
//
System.out.println(dateFormat(minDateOfMonth(dateParse("2016-03-31", null)), null));*/
//
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
/*System.out.println(dateTimeToDate(new Date()));
System.out.println(dateParse("2017-02-04 14:58:20", null));
System.out.println(dateTimeToDateStringIfTimeEndZero(new Date()));
System.out.println(dateTimeToDateStringIfTimeEndZero(dateTimeToDate(new Date())));*/
//System.out.println(dateBetween(dateParse("2017-01-30", null), dateParse("2017-02-01", null)));
//System.out.println(dateBetweenIncludeToday(dateParse("2017-01-30", null), dateParse("2017-02-01", null)));
System
.
out
.
println
(
getDate
(
dateParse
(
"2017-01-17"
,
null
)));
/*
System.out.println(getDaysOfMonth(dateParse("2017-02-01", null)));
System.out.println(getDaysOfYear(dateParse("2017-01-30", null)));*/
//System.out.println(dateFormat(dateAddMonths(dateParse("2017-02-07", StrUtils.MONTH_PATTERN), -12), StrUtils.MONTH_PATTERN));
/*System.out.println(dateFormat(maxDateOfMonth(dateParse("2016-02", "yyyy-MM")), null));
System.out.println(dateFormat(minDateOfMonth(dateParse("2016-03-31", null)), null));*/
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/MyBatisPlusCodeGenerator.java
View file @
da47a9ce
...
...
@@ -85,7 +85,7 @@ public class MyBatisPlusCodeGenerator {
throw
new
MybatisPlusException
(
"请输入正确的"
+
tip
+
"!"
);
}
public
static
void
main
1
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
// 代码生成器
AutoGenerator
autoGenerator
=
new
AutoGenerator
();
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
View file @
da47a9ce
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.reflection.MetaObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
java.util.Date
;
@Component
...
...
@@ -47,9 +47,14 @@ public class MetaHandler implements MetaObjectHandler {
private
void
autoFillUser
(
MetaObject
metaObject
)
{
//获取用户信息 以及当前用户登录公司部门,角色
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
buildKey
(
getToken
())).
toString
(),
ReginParams
.
class
);
AgencyUserModel
agencyUserModel
=
reginParams
.
getUserModel
();
ReginParams
reginParams
=
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
buildKey
(
getToken
()))
?
redisUtils
.
get
(
buildKey
(
getToken
())).
toString
()
:
""
,
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
;
}
AgencyUserModel
agencyUserModel
=
reginParams
.
getUserModel
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
)||
ObjectUtils
.
isEmpty
(
agencyUserModel
)){
return
;
}
...
...
amos-boot-jcs-system/src/main/resources/application.properties
View file @
da47a9ce
spring.application.name
=
AIRPORT
spring.application.name
=
AIRPORT
-tb
server.servlet.context-path
=
/jcs
server.port
=
11000
spring.profiles.active
=
dev
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertSubmittedMapper.java
View file @
da47a9ce
...
...
@@ -16,10 +16,18 @@ import java.util.List;
*/
public
interface
AlertSubmittedMapper
extends
BaseMapper
<
AlertSubmitted
>
{
/**
* 根据参数获取
警情报送/
融合调度列表
* 根据参数获取融合调度列表
*
* @param alertSubmittedDto
* @return
*/
List
<
AlertSubmittedExtVo
>
listByParam
(
@Param
(
"alertSubmittedDto"
)
AlertSubmittedDto
alertSubmittedDto
);
List
<
AlertSubmittedExtVo
>
listSchedulingByParam
(
@Param
(
"alertSubmittedDto"
)
AlertSubmittedDto
alertSubmittedDto
);
/**
* 根据参数获取警情报送列表
*
* @param alertSubmittedDto
* @return
*/
List
<
AlertSubmittedExtVo
>
listReportingByParam
(
@Param
(
"alertSubmittedDto"
)
AlertSubmittedDto
alertSubmittedDto
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertSubmittedService.java
View file @
da47a9ce
...
...
@@ -14,10 +14,18 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo;
public
interface
IAlertSubmittedService
extends
IService
<
AlertSubmitted
>
{
/**
* 根据参数查询
警情报送/
融合调度记录
* 根据参数查询融合调度记录
*
* @param queryParam
* @return SchedulingReportingVo
*/
SchedulingReportingVo
listByParam
(
AlertSubmittedDto
queryParam
);
SchedulingReportingVo
listSchedulingByParam
(
AlertSubmittedDto
queryParam
);
/**
* 根据参数查询警情报送记录
*
* @param queryParam
* @return SchedulingReportingVo
*/
SchedulingReportingVo
listReportingByParam
(
AlertSubmittedDto
queryParam
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertSubmittedMapper.xml
View file @
da47a9ce
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jcs.api.mapper.AlertSubmittedMapper"
>
<select
id=
"listByParam"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo"
>
<select
id=
"list
Scheduling
ByParam"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo"
>
select
jas.sequence_nbr alertSubmittedId,
jas.alert_called_id,
...
...
@@ -32,4 +32,34 @@
and jas.business_type_code = #{alertSubmittedDto.businessTypeCode}
</if>
</select>
<select
id=
"listReportingByParam"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo"
>
select
jas.sequence_nbr alertSubmittedId,
jas.alert_called_id,
jas.business_type,
jas.business_type_code,
jas.scheduling_type,
jas.scheduling_type_code,
jas.submission_time,
jas.submission_content,
jas.submission_method,
jas.submission_method_code,
jas.update_time,
jaso.sequence_nbr,
group_concat(jaso.company_name) companyNames,
group_concat(jaso.user_name) userNames
from jc_alert_submitted jas
left join jc_alert_submitted_object jaso on jas.sequence_nbr = jaso.alert_submitted_id
where 1=1
<if
test=
"alertSubmittedDto.alertCalledId != null and alertSubmittedDto.alertCalledId != ''"
>
and jas.alert_called_id = #{alertSubmittedDto.alertCalledId}
</if>
<if
test=
"alertSubmittedDto.submissionMethodCode != null and alertSubmittedDto.submissionMethodCode != ''"
>
and jas.submission_method_code = #{alertSubmittedDto.submissionMethodCode}
</if>
<if
test=
"alertSubmittedDto.businessTypeCode != null and alertSubmittedDto.businessTypeCode != ''"
>
and jas.business_type_code = #{alertSubmittedDto.businessTypeCode}
</if>
group by jaso.alert_submitted_id
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/aop/ControllerAop.java
View file @
da47a9ce
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 @
da47a9ce
...
...
@@ -91,11 +91,18 @@ public class AlertSubmittedController extends BaseController {
return
CommonResponseUtil
.
success
(
iAlertSubmittedService
.
getById
(
id
));
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/schedulingReporting/list"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据警情id查询融合调度、警情报送列表"
,
notes
=
"根据警情id查询融合调度、警情报送列表"
)
public
ResponseModel
listByParam
(
@RequestBody
AlertSubmittedDto
queryParam
)
{
return
CommonResponseUtil
.
success
(
iAlertSubmittedService
.
listByParam
(
queryParam
));
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/scheduling/list"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据警情id查询融合调度列表"
,
notes
=
"根据警情id查询融合调度列表"
)
public
ResponseModel
listSchedulingByParam
(
@RequestBody
AlertSubmittedDto
queryParam
)
{
return
CommonResponseUtil
.
success
(
iAlertSubmittedService
.
listSchedulingByParam
(
queryParam
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/reporting/list"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据警情id查询警情报送列表"
,
notes
=
"根据警情id查询警情报送列表"
)
public
ResponseModel
listReportingByParam
(
@RequestBody
AlertSubmittedDto
queryParam
)
{
return
CommonResponseUtil
.
success
(
iAlertSubmittedService
.
listReportingByParam
(
queryParam
));
}
/**
...
...
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 @
da47a9ce
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertSubmittedMapper
;
...
...
@@ -22,12 +21,22 @@ import java.util.List;
public
class
AlertSubmittedServiceImpl
extends
ServiceImpl
<
AlertSubmittedMapper
,
AlertSubmitted
>
implements
IAlertSubmittedService
{
@Override
public
SchedulingReportingVo
listByParam
(
AlertSubmittedDto
queryParam
)
{
public
SchedulingReportingVo
list
Scheduling
ByParam
(
AlertSubmittedDto
queryParam
)
{
SchedulingReportingVo
schedulingReportingVo
=
new
SchedulingReportingVo
();
List
<
AlertSubmittedExtVo
>
alertSubmittedExtVoList
=
this
.
baseMapper
.
listByParam
(
queryParam
);
List
<
AlertSubmittedExtVo
>
alertSubmittedExtVoList
=
this
.
baseMapper
.
list
Scheduling
ByParam
(
queryParam
);
schedulingReportingVo
.
setSchedulingReportingList
(
alertSubmittedExtVoList
);
String
extraInfo
=
"已调度电话"
+
alertSubmittedExtVoList
.
size
()
+
"起"
;
schedulingReportingVo
.
setExtraInfo
(
extraInfo
);
return
schedulingReportingVo
;
}
@Override
public
SchedulingReportingVo
listReportingByParam
(
AlertSubmittedDto
queryParam
)
{
SchedulingReportingVo
schedulingReportingVo
=
new
SchedulingReportingVo
();
List
<
AlertSubmittedExtVo
>
alertSubmittedExtVoList
=
this
.
baseMapper
.
listReportingByParam
(
queryParam
);
schedulingReportingVo
.
setSchedulingReportingList
(
alertSubmittedExtVoList
);
String
extraInfo
=
"已报送"
+
alertSubmittedExtVoList
.
size
()
+
"条"
;
schedulingReportingVo
.
setExtraInfo
(
extraInfo
);
return
schedulingReportingVo
;
}
}
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