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
524d5d73
Commit
524d5d73
authored
Aug 17, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务反馈接口开发
parent
a062db1f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
19 deletions
+91
-19
CarTaskDto.java
.../yeejoin/amos/boot/module/command/api/dto/CarTaskDto.java
+12
-0
JcSituationDetail.java
...in/amos/boot/module/jcs/api/entity/JcSituationDetail.java
+4
-0
IPowerTransferCompanyResourcesService.java
...cs/api/service/IPowerTransferCompanyResourcesService.java
+6
-1
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+14
-2
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+10
-0
PowerTransferCompanyResourcesServiceImpl.java
...ervice/impl/PowerTransferCompanyResourcesServiceImpl.java
+32
-12
dbTemplate_input_item.xml
...ol/src/main/resources/db/mapper/dbTemplate_input_item.xml
+13
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-command-api/src/main/java/com/yeejoin/amos/boot/module/command/api/dto/CarTaskDto.java
View file @
524d5d73
...
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.command.api.dto;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.List
;
/**
* @description:
* @author: tw
...
...
@@ -15,6 +17,16 @@ public class CarTaskDto {
private
int
type
;
private
String
remarks
;
public
List
<
String
>
getPhotos
()
{
return
photos
;
}
public
void
setPhotos
(
List
<
String
>
photos
)
{
this
.
photos
=
photos
;
}
private
List
<
String
>
photos
;
public
Long
getCarid
()
{
return
carid
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/JcSituationDetail.java
View file @
524d5d73
...
...
@@ -29,4 +29,8 @@ public class JcSituationDetail extends BaseEntity {
@ApiModelProperty
(
value
=
"警情ID"
)
private
Long
alertCalledId
;
@ApiModelProperty
(
value
=
"图片"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
photoUrl
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IPowerTransferCompanyResourcesService.java
View file @
524d5d73
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.JcSituationDetail
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
java.util.List
;
/**
* 调派单位资源 服务类
*
...
...
@@ -19,7 +22,9 @@ public interface IPowerTransferCompanyResourcesService {
void
updateByAlertCalledId
(
Long
alertCalledId
);
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
);
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
,
List
<
String
>
photos
);
List
<
JcSituationDetail
>
getTaskFeedback
(
Long
carid
,
Long
alertCalledId
);
/**
* 根据ID获取资源信息
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
524d5d73
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.command.biz.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
...
...
@@ -162,7 +163,6 @@ public class CommandController extends BaseController {
private
static
final
String
JW
=
"mechinePosition"
;
private
static
final
String
KEYSITE
=
"keySiteExcle"
;
private
OrgUsrMapper
orgUsrMapper
;
/**
...
...
@@ -1575,6 +1575,18 @@ public class CommandController extends BaseController {
return
ResponseHelper
.
buildResponse
(
powerTransferCompanyResources
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"getTaskFeedback/{carid}/{alertCalledId}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前车辆任务反馈"
,
notes
=
"获取当前车辆任务反馈"
)
public
ResponseModel
<
List
<
JcSituationDetail
>>
getTaskFeedback
(
@PathVariable
Long
carid
,
@PathVariable
Long
alertCalledId
)
{
return
ResponseHelper
.
buildResponse
(
powerTransferCompanyResourcesService
.
getTaskFeedback
(
carid
,
alertCalledId
));
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"getPowerTransferCompanyResourcesServiceNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -1660,7 +1672,7 @@ public class CommandController extends BaseController {
carTaskDto
.
getCarid
(),
carTaskDto
.
getCode
(),
carTaskDto
.
getType
(),
carTaskDto
.
getRemarks
());
carTaskDto
.
getRemarks
()
,
carTaskDto
.
getPhotos
()
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
...
...
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 @
524d5d73
...
...
@@ -1476,6 +1476,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
instructionsZHDto
.
setType
(
item
.
getInfoType
());
instructionsZHDto
.
setContent
(
item
.
getInfo
());
if
(
"车辆反馈"
.
equals
(
item
.
getInfoType
()))
{
if
(
item
.
getInfo
().
contains
(
"/photo:"
)){
String
[]
info
=
item
.
getInfo
().
split
(
"/photos:"
);
String
photoUrl
=
info
[
1
];
StringBuffer
stringBuffer
=
new
StringBuffer
();
if
(
photoUrl
.
contains
(
","
)){
List
<
String
>
list
=
Arrays
.
asList
(
photoUrl
.
split
(
","
));
list
.
forEach
(
photo
->
stringBuffer
.
append
(
"<img src=\""
+
photo
+
"\""
+
"width=\""
+
"251\""
+
"height=\""
+
"251\""
+
"/>"
));
instructionsZHDto
.
setContent
(
"<div>"
+
info
[
0
]+
stringBuffer
+
"</div>"
);
}
}
instructionsZHDto
.
setCompany
(
"现场反馈"
);
}
instructionsZHDto
.
setSubmissionTime
(
item
.
getRecDate
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferCompanyResourcesServiceImpl.java
View file @
524d5d73
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.xiaoymin.knife4j.core.util.StrUtil
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.service.IFireTeamService
;
...
...
@@ -17,6 +20,7 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResources
import
com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyResourcesService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IUserCarService
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
...
...
@@ -26,10 +30,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.*
;
/**
* 调派单位资源 服务实现类
...
...
@@ -86,7 +87,7 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
@Override
@Transactional
public
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
)
{
public
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
,
List
<
String
>
photos
)
{
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carId
);
UserCar
userCar
=
userCarService
.
selectByCarId
(
carId
);
...
...
@@ -94,12 +95,9 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
try
{
if
(
type
==
2
)
{
powerTransferCompanyResources
.
setStatus
(
code
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
if
(
"finished"
.
equals
(
code
)){
List
<
Object
>
carStatusInfoDtoList
=
new
ArrayList
();
//修改装备信息
...
...
@@ -110,9 +108,6 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
// 更新所有车辆状态为执勤
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
}
}
else
{
if
(
FireCarStatusEnum
.
到场
.
getCode
().
equals
(
code
)){
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -129,6 +124,9 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
jcSituationDetail
.
setAlertCalledId
(
alertCalledId
);
jcSituationDetail
.
setInfoType
(
"车辆反馈"
);
jcSituationDetail
.
setInfo
(
info
);
if
(
CollectionUtils
.
isNotEmpty
(
photos
)){
jcSituationDetail
.
setInfo
(
info
+
"/photos:"
+
Joiner
.
on
(
","
).
join
(
photos
));
}
jcSituationDetailMapper
.
insert
(
jcSituationDetail
);
// 车辆状态更改消息推送
// 定义指令信息消息推送 页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
...
...
@@ -136,10 +134,32 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"修改失败!"
);
}
}
@Override
public
List
<
JcSituationDetail
>
getTaskFeedback
(
Long
carid
,
Long
alertCalledId
)
{
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carid
);
LambdaQueryWrapper
<
JcSituationDetail
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
JcSituationDetail:
:
getAlertCalledId
,
alertCalledId
);
wrapper
.
like
(
JcSituationDetail:
:
getInfo
,
powerTransferCompanyResources
.
getResourcesNum
());
wrapper
.
eq
(
JcSituationDetail:
:
getInfoType
,
"车辆反馈"
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
List
<
JcSituationDetail
>
list
=
jcSituationDetailMapper
.
selectList
(
wrapper
);
list
.
stream
().
forEach
(
e
->{
if
(
e
.
getInfo
().
contains
(
"/photos:"
)){
String
[]
content
=
e
.
getInfo
().
split
(
"/photos:"
);
String
info
=
content
[
0
];
String
photoUrls
=
content
[
1
];
List
<
String
>
photos
=
Arrays
.
asList
(
photoUrls
);
e
.
setInfo
(
info
);
e
.
setPhotoUrl
(
photos
);
}
});
return
list
;
}
@Override
public
PowerTransferCompanyResources
getResourceById
(
String
resourceId
)
{
QueryWrapper
<
PowerTransferCompanyResources
>
powerTransferCompanyResourcesQueryWrapper
=
new
QueryWrapper
<>();
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
524d5d73
...
...
@@ -153,14 +153,16 @@
<if
test=
"nameOrItemNo!=null and nameOrItemNo !='' "
>
and (name like concat("%", #{nameOrItemNo}, "%") or item_no like concat("%", #{nameOrItemNo}, "%"))
</if>
<if
test=
"equipmentType!=null and equipmentType !=''"
>
and equipment_type = #{equipmentType} or equipment_type = '-1'
<if
test=
"equipmentType!=null and equipmentType.size()>0"
>
and equipment_type in
<foreach
collection=
"equipmentType"
item=
"value"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{value}
</foreach>
</if>
<if
test=
"keyPartsType!=null and keyPartsType !=''"
>
and key_parts_type is not null
</if>
<if
test=
"facilitiesType!=null and facilitiesType !=''"
>
and facilities_type = #{facilitiesType} or facilities_type = '-1'
<if
test=
"facilitiesType!=null and facilitiesType.size() > 0 "
>
and facilities_type in
<foreach
collection=
"facilitiesType"
item=
"value"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{value}
</foreach>
</if>
<if
test=
"customType!=null and customType !=''"
>
and custom_type is not null
...
...
@@ -325,6 +327,13 @@
</choose>
</select>
<select
id=
"getEquipParentCode"
resultType=
"map"
>
select * from wl_equipment_category where code = #{code} and industry_code = '2'
</select>
<select
id=
"getEquipParent"
resultType=
"map"
>
select * from wl_equipment_category where id = #{parentId}
</select>
...
...
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