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
d16810eb
Commit
d16810eb
authored
Nov 18, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改警情结案时间
parent
f8dfa5aa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
5 deletions
+27
-5
MetaHandler.java
...in/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
+8
-1
IAlertCalledService.java
...amos/boot/module/jcs/api/service/IAlertCalledService.java
+1
-1
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+12
-2
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+5
-1
MsgController.java
...eejoin/amos/patrol/business/controller/MsgController.java
+1
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
View file @
d16810eb
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
config
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
config
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField
;
import
com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField
;
...
@@ -106,7 +107,13 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -106,7 +107,13 @@ public class MetaHandler implements MetaObjectHandler {
this
.
setFieldValByName
(
"recUserName"
,
agencyUserModel
.
getRealName
(),
metaObject
);
this
.
setFieldValByName
(
"recUserName"
,
agencyUserModel
.
getRealName
(),
metaObject
);
Date
currentDate
=
new
Date
();
Date
currentDate
=
new
Date
();
this
.
setFieldValByName
(
"recDate"
,
currentDate
,
metaObject
);
this
.
setFieldValByName
(
"recDate"
,
currentDate
,
metaObject
);
this
.
setFieldValByName
(
"updateTime"
,
currentDate
,
metaObject
);
JSONObject
jd
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
metaObject
.
getOriginalObject
()));
if
(
jd
.
containsKey
(
"updateTime"
)&&
jd
.
get
(
"updateTime"
)==
null
){
this
.
setFieldValByName
(
"updateTime"
,
currentDate
,
metaObject
);
}
}
}
private
Boolean
isExistField
(
String
field
,
Object
obj
)
{
private
Boolean
isExistField
(
String
field
,
Object
obj
)
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertCalledService.java
View file @
d16810eb
...
@@ -22,7 +22,7 @@ public interface IAlertCalledService {
...
@@ -22,7 +22,7 @@ public interface IAlertCalledService {
* 根据id 修改警情
* 根据id 修改警情
* type:警情相关 操作类型 警情续报 非警情确认 警情结案
* type:警情相关 操作类型 警情续报 非警情确认 警情结案
* */
* */
boolean
updateAlertCalled
(
Long
id
,
String
code
);
boolean
updateAlertCalled
(
Long
id
,
String
code
,
String
trappedNum
,
String
casualtiesNum
,
String
date
);
/**
/**
*
*
...
...
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 @
d16810eb
...
@@ -12,6 +12,7 @@ import java.util.Set;
...
@@ -12,6 +12,7 @@ import java.util.Set;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -672,24 +673,32 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -672,24 +673,32 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
boolean
updateAlertCalled
(
Long
id
,
String
code
)
{
public
boolean
updateAlertCalled
(
Long
id
,
String
code
,
String
trappedNum
,
String
casualtiesNum
,
String
date
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
try
{
try
{
AlertCalled
alertCalledd
=
this
.
getById
(
id
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
switch
(
code
)
{
switch
(
code
)
{
case
"314"
:
case
"314"
:
alertCalledMapper
.
update
(
null
,
alertCalledMapper
.
update
(
null
,
new
UpdateWrapper
<
AlertCalled
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"alert_status"
,
1
)
new
UpdateWrapper
<
AlertCalled
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"alert_status"
,
1
)
.
set
(
"alert_stage"
,
AlertStageEnums
.
CZJS
.
getValue
()).
set
(
"update_time"
,
new
Date
())
.
set
(
"alert_stage"
,
AlertStageEnums
.
CZJS
.
getValue
()).
set
(
"update_time"
,
new
Date
())
.
set
(
"alarm_type"
,
AlertStageEnums
.
FJQ
.
getValue
())
.
set
(
"alarm_type"
,
AlertStageEnums
.
FJQ
.
getValue
())
.
set
(
"trapped_num"
,
trappedNum
!=
null
&&!
""
.
equals
(
trappedNum
)
?
trappedNum:
alertCalledd
.
getTrappedNum
())
.
set
(
"casualties_num"
,
casualtiesNum
!=
null
&&!
""
.
equals
(
casualtiesNum
)?
casualtiesNum:
alertCalledd
.
getCasualtiesNum
())
.
set
(
"alarm_type_code"
,
AlertStageEnums
.
FJQ
.
getCode
()));
.
set
(
"alarm_type_code"
,
AlertStageEnums
.
FJQ
.
getCode
()));
break
;
break
;
case
"315"
:
case
"315"
:
alertCalledMapper
.
update
(
null
,
alertCalledMapper
.
update
(
null
,
new
UpdateWrapper
<
AlertCalled
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"alert_status"
,
1
)
new
UpdateWrapper
<
AlertCalled
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"alert_status"
,
1
)
.
set
(
"update_time"
,
new
Date
()).
set
(
"alert_stage"
,
AlertStageEnums
.
CZJS
.
getValue
()));
.
set
(
"trapped_num"
,
trappedNum
!=
null
&&!
""
.
equals
(
trappedNum
)
?
trappedNum:
alertCalledd
.
getTrappedNum
())
.
set
(
"casualties_num"
,
casualtiesNum
!=
null
&&!
""
.
equals
(
casualtiesNum
)?
casualtiesNum:
alertCalledd
.
getCasualtiesNum
())
.
set
(
"update_time"
,
date
!=
null
?
sdf
.
parse
(
date
):
new
Date
()).
set
(
"alert_stage"
,
AlertStageEnums
.
CZJS
.
getValue
()));
break
;
break
;
default
:
default
:
alertCalledMapper
.
update
(
null
,
new
UpdateWrapper
<
AlertCalled
>().
eq
(
"sequence_nbr"
,
id
)
alertCalledMapper
.
update
(
null
,
new
UpdateWrapper
<
AlertCalled
>().
eq
(
"sequence_nbr"
,
id
)
.
set
(
"trapped_num"
,
trappedNum
!=
null
&&!
""
.
equals
(
trappedNum
)
?
trappedNum:
alertCalledd
.
getTrappedNum
())
.
set
(
"casualties_num"
,
casualtiesNum
!=
null
&&!
""
.
equals
(
casualtiesNum
)?
casualtiesNum:
alertCalledd
.
getCasualtiesNum
())
.
set
(
"update_time"
,
new
Date
()).
set
(
"alert_stage"
,
AlertStageEnums
.
CZGZ
.
getValue
()));
.
set
(
"update_time"
,
new
Date
()).
set
(
"alert_stage"
,
AlertStageEnums
.
CZGZ
.
getValue
()));
break
;
break
;
...
@@ -708,6 +717,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -708,6 +717,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
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/AlertSubmittedServiceImpl.java
View file @
d16810eb
...
@@ -780,7 +780,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -780,7 +780,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 3.更新警情状态
// 3.更新警情状态
alertCalledService
.
updateAlertCalled
(
alertSubmittedDto
.
getAlertCalledId
(),
alertCalledService
.
updateAlertCalled
(
alertSubmittedDto
.
getAlertCalledId
(),
alertSubmittedDto
.
getBusinessTypeCode
());
alertSubmittedDto
.
getBusinessTypeCode
(),
alertSubmittedDto
.
getSubmitContent
().
get
(
"trappedNum"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"trappedNum"
).
toString
():
null
,
alertSubmittedDto
.
getSubmitContent
().
get
(
"casualtiesNum"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"casualtiesNum"
).
toString
():
null
,
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
():
null
);
// 警情续报
// 警情续报
if
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
if
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/MsgController.java
View file @
d16810eb
...
@@ -135,6 +135,7 @@ public class MsgController extends AbstractBaseController {
...
@@ -135,6 +135,7 @@ public class MsgController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CommonResponseUtil
.
failure
(
"通知发布失败!"
);
return
CommonResponseUtil
.
failure
(
"通知发布失败!"
);
}
}
}
}
...
...
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