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
bebe09eb
Commit
bebe09eb
authored
Aug 18, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
c4a52869
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
36 deletions
+30
-36
AlertCalled.java
.../yeejoin/amos/boot/module/tzs/api/entity/AlertCalled.java
+6
-0
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+1
-32
DispatchTaskServiceImpl.java
.../module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
+12
-0
RescueProcessServiceImpl.java
...module/tzs/biz/service/impl/RescueProcessServiceImpl.java
+11
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/AlertCalled.java
View file @
bebe09eb
...
@@ -213,4 +213,10 @@ public class AlertCalled extends BaseEntity {
...
@@ -213,4 +213,10 @@ public class AlertCalled extends BaseEntity {
@ApiModelProperty
(
value
=
"接警时间str"
)
@ApiModelProperty
(
value
=
"接警时间str"
)
private
String
callTimeStr
;
private
String
callTimeStr
;
/**
* 响应级别
*/
@ApiModelProperty
(
value
=
"响应级别"
)
private
String
responseLevel
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/AlertCalledController.java
View file @
bebe09eb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -21,9 +20,6 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
...
@@ -21,9 +20,6 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl
;
...
@@ -54,7 +50,6 @@ import java.lang.reflect.Field;
...
@@ -54,7 +50,6 @@ import java.lang.reflect.Field;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
...
@@ -120,9 +115,6 @@ public class AlertCalledController extends BaseController {
...
@@ -120,9 +115,6 @@ public class AlertCalledController extends BaseController {
@RequestParam
(
value
=
"size"
)
int
size
)
throws
Exception
{
@RequestParam
(
value
=
"size"
)
int
size
)
throws
Exception
{
Page
<
ESAlertCalledDto
>
esAlertCalledDtoPage
=
eSAlertCalledService
.
queryByKeys
(
alertCalledVo
,
current
,
size
);
Page
<
ESAlertCalledDto
>
esAlertCalledDtoPage
=
eSAlertCalledService
.
queryByKeys
(
alertCalledVo
,
current
,
size
);
esAlertCalledDtoPage
.
getRecords
().
stream
().
forEach
(
e
->{
getResponseLevel
(
e
.
getSequenceNbr
(),
null
,
e
);
});
return
ResponseHelper
.
buildResponse
(
esAlertCalledDtoPage
);
return
ResponseHelper
.
buildResponse
(
esAlertCalledDtoPage
);
}
}
...
@@ -263,9 +255,8 @@ public class AlertCalledController extends BaseController {
...
@@ -263,9 +255,8 @@ public class AlertCalledController extends BaseController {
}
}
page
=
iAlertCalledService
.
page
(
pageBean
,
alertCalledQueryWrapper
);
page
=
iAlertCalledService
.
page
(
pageBean
,
alertCalledQueryWrapper
);
IPage
<
AlertCalledDto
>
calledVoIPage
=
AlertBeanDtoVoUtils
.
alertCalledIPageDto
(
page
);
IPage
<
AlertCalledDto
>
calledVoIPage
=
AlertBeanDtoVoUtils
.
alertCalledIPageDto
(
page
);
calledVoIPage
.
getRecords
().
stream
().
forEach
(
e
->
e
.
setAlertAddress
(
e
.
getCity
()+
e
.
getDistrict
()));
calledVoIPage
.
getRecords
().
stream
().
forEach
(
e
->{
calledVoIPage
.
getRecords
().
stream
().
forEach
(
e
->{
getResponseLevel
(
e
.
getSequenceNbr
(),
e
,
null
);
e
.
setAlertAddress
(
e
.
getCity
()+
e
.
getDistrict
()
);
});
});
return
ResponseHelper
.
buildResponse
(
calledVoIPage
);
return
ResponseHelper
.
buildResponse
(
calledVoIPage
);
}
}
...
@@ -325,28 +316,6 @@ public class AlertCalledController extends BaseController {
...
@@ -325,28 +316,6 @@ public class AlertCalledController extends BaseController {
return
queryWrapper
;
return
queryWrapper
;
}
}
void
getResponseLevel
(
Long
alertId
,
AlertCalledDto
alertCalledDto
,
ESAlertCalledDto
esAlertCalledDto
)
{
LambdaQueryWrapper
<
DispatchPaper
>
dispatchPaperQueryWrapper
=
new
LambdaQueryWrapper
<>();
dispatchPaperQueryWrapper
.
eq
(
DispatchPaper:
:
getAlertId
,
alertId
);
DispatchPaper
dispatchPaper
=
dispatchPaperServiceImpl
.
getOne
(
dispatchPaperQueryWrapper
);
if
(
null
!=
dispatchPaper
)
{
LambdaQueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
AlertFormValue:
:
getAlertCalledId
,
dispatchPaper
.
getSequenceNbr
()).
eq
(
AlertFormValue:
:
getAlertTypeCode
,
DispatchPaperEnums
.
getEnumById
(
dispatchPaper
.
getAlertCode
()).
getDynamicCode
());
// 派遣单动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
// map 存取数据
Map
<
String
,
String
>
dynamicParms
=
new
HashMap
<
String
,
String
>();
list
.
stream
().
forEach
(
paperFormValue
->
{
dynamicParms
.
put
(
paperFormValue
.
getFieldCode
(),
paperFormValue
.
getFieldValue
());
});
String
responseLevel
=
dynamicParms
.
get
(
"response_level"
);
if
(
null
!=
alertCalledDto
)
{
alertCalledDto
.
setResponseLevel
(
responseLevel
);
}
else
{
esAlertCalledDto
.
setResponseLevel
(
responseLevel
);
}
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
View file @
bebe09eb
...
@@ -2,12 +2,14 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
...
@@ -2,12 +2,14 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueProcessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueProcessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask
;
...
@@ -230,6 +232,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -230,6 +232,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
levelOneUnit
.
getValue
());
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
levelOneUnit
.
getValue
());
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
levelOneUnit
.
getId
());
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
levelOneUnit
.
getId
());
// 响应级别反馈给警情
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
dispatchTask
.
getAlertId
());
updateWrapper
.
set
(
AlertCalled:
:
getResponseLevel
,
DispatchPaperEnums
.
levelOneUnit
.
getValue
());
alertCalledServiceImpl
.
update
(
updateWrapper
);
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"save_credit_code"
))
{
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"save_credit_code"
))
{
alertFormValue
.
setFieldValue
(
socialCreditCode
);
alertFormValue
.
setFieldValue
(
socialCreditCode
);
}
}
...
@@ -247,6 +254,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -247,6 +254,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
levelTwoUnit
.
getValue
());
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
levelTwoUnit
.
getValue
());
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
levelTwoUnit
.
getId
());
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
levelTwoUnit
.
getId
());
// 响应级别反馈给警情
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
dispatchTask
.
getAlertId
());
updateWrapper
.
set
(
AlertCalled:
:
getResponseLevel
,
DispatchPaperEnums
.
levelTwoUnit
.
getValue
());
alertCalledServiceImpl
.
update
(
updateWrapper
);
}
}
});
});
break
;
break
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RescueProcessServiceImpl.java
View file @
bebe09eb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
...
@@ -8,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
...
@@ -8,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueProcessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueProcessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask
;
...
@@ -148,11 +150,16 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
...
@@ -148,11 +150,16 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
// 修改动态字段
// 修改动态字段
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
alertFormValue
.
setFieldValue
(
"已派遣"
);
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
hasDispatched
.
getValue
()
);
alertFormValue
.
setFieldValueCode
(
"hasDispatched"
);
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
hasDispatched
.
getId
()
);
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
alertFormValue
.
setFieldValue
(
"三级响应"
);
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
levelThreeUnit
.
getValue
());
alertFormValue
.
setFieldValueCode
(
"levelThreeUnit"
);
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
levelThreeUnit
.
getId
());
// 响应级别反馈给警情
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
dispatchTask
.
getAlertId
());
updateWrapper
.
set
(
AlertCalled:
:
getResponseLevel
,
DispatchPaperEnums
.
levelThreeUnit
.
getValue
());
iAlertCalledService
.
update
(
updateWrapper
);
}
}
});
});
}
}
...
...
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