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
5333e2a0
Commit
5333e2a0
authored
Nov 03, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tzs 地图相关功能更新
parent
80f9a141
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
321 additions
and
6 deletions
+321
-6
AlertPaperInfoDto.java
...ejoin/amos/boot/module/tzs/api/dto/AlertPaperInfoDto.java
+3
-0
RepairConsultDto.java
...eejoin/amos/boot/module/tzs/api/dto/RepairConsultDto.java
+4
-0
ESAlertCalled.java
...eejoin/amos/boot/module/tzs/api/entity/ESAlertCalled.java
+8
-0
RepairConsult.java
...eejoin/amos/boot/module/tzs/api/entity/RepairConsult.java
+6
-0
AlertCalledMapper.java
...in/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
+2
-0
TzsAuthService.java
...join/amos/boot/module/tzs/api/service/TzsAuthService.java
+12
-0
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+35
-0
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+54
-2
TzsAuthController.java
...mos/boot/module/tzs/biz/controller/TzsAuthController.java
+48
-0
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+13
-0
CtiServiceImpl.java
...amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
+3
-0
RepairConsultServiceImpl.java
...module/tzs/biz/service/impl/RepairConsultServiceImpl.java
+56
-4
TzsAuthServiceImpl.java
.../boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
+77
-0
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/dto/AlertPaperInfoDto.java
View file @
5333e2a0
...
...
@@ -24,6 +24,9 @@ public class AlertPaperInfoDto {
@ApiModelProperty
(
value
=
"警情类别code"
)
private
String
alarmTypeCode
;
@ApiModelProperty
(
value
=
"警情类别"
)
private
String
alarmType
;
@ApiModelProperty
(
value
=
"所属区域"
)
private
String
area
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/RepairConsultDto.java
View file @
5333e2a0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -42,4 +43,7 @@ public class RepairConsultDto extends BaseDto {
@ApiModelProperty
(
value
=
"警情阶段code"
)
private
String
alertStageCode
;
@ApiModelProperty
(
value
=
"阶段附件"
)
private
String
attachment
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/ESAlertCalled.java
View file @
5333e2a0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.annotation.Id
;
...
...
@@ -96,4 +97,11 @@ public class ESAlertCalled {
@Field
(
type
=
FieldType
.
Text
)
private
String
emergencyCall
;
/**
* 所属区域编码
*/
@Field
(
type
=
FieldType
.
Text
)
private
String
regionCode
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/RepairConsult.java
View file @
5333e2a0
...
...
@@ -64,4 +64,10 @@ public class RepairConsult extends BaseEntity {
@TableField
(
"alert_stage_code"
)
private
String
alertStageCode
;
/**
* 阶段附件
*/
@TableField
(
"attachment"
)
private
String
attachment
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
View file @
5333e2a0
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskListDto
;
...
...
@@ -101,4 +102,5 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
String
alertSource
,
String
alarmType
);
List
<
AlertPaperInfoDto
>
getAlertPaperInfoList
(
@Param
(
"regionCodes"
)
List
<
String
>
regionCodes
,
@Param
(
"isHistory"
)
Boolean
isHistory
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/TzsAuthService.java
0 → 100644
View file @
5333e2a0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
import
java.util.List
;
/**
* 特种设备权限服务类
*/
public
interface
TzsAuthService
{
List
<
String
>
getUserRegionCode
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
5333e2a0
...
...
@@ -519,7 +519,42 @@
</select>
<select
id=
"getAlertPaperInfoList"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto"
>
SELECT
a.sequence_nbr AS alertId,
a.region_code AS regionCode,
e.rescue_code AS rescueCode,
a.alarm_type_code AS alarmTypeCode,
a.alarm_type AS alarmType,
CONCAT(e.province ,e.city ,e.district) AS area,
a.address AS address,
a.call_time AS callTime,
e.longitude AS longitude,
e.latitude AS latitude,
a.alert_stage AS alertStatus,
e.sequence_nbr AS elevatorId,
e.register_code AS elevatorCode
FROM tz_alert_called a
LEFT JOIN tcb_elevator e ON e.sequence_nbr = a.equipment_id
WHERE a.is_delete = 0
<choose>
<when
test=
"isHistory == true"
>
AND a.alert_status = 1
AND
DATE_SUB(CURDATE(), INTERVAL 7 DAY)
<![CDATA[ <= ]]>
date(a.call_time)
</when>
<otherwise>
<if
test=
"regionCodes != null"
>
AND a.alert_status = 0
AND
<foreach
collection=
"regionCodes"
index=
"index"
item=
"item"
open=
"("
separator=
" OR "
close=
")"
>
a.region_code LIKE CONCAT('%', #{item}, '%')
</foreach>
</if>
</otherwise>
</choose>
</select>
</mapper>
...
...
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 @
5333e2a0
...
...
@@ -35,6 +35,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.WechatRelation;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IUseUnitService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
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.DispatchPaperServiceImpl
;
...
...
@@ -44,6 +45,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TemplateExportServiceIm
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.WechatRelationServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -71,6 +73,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.UnsupportedEncodingException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
...
...
@@ -125,6 +129,10 @@ public class AlertCalledController extends BaseController {
@Value
(
"${mqtt.topic.alertInfo.push}"
)
private
String
alertInfopushTopic
;
@Autowired
TzsAuthService
tzsAuthService
;
/**
* 新增警情接警填报记录
*
...
...
@@ -172,8 +180,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveMobile"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情接警填报记录"
,
notes
=
"新增警情接警填报记录"
)
public
ResponseModel
<
AlertCalledDto
>
saveMobile
(
@RequestBody
AlertCalledDto
alertCalledDto
)
{
public
ResponseModel
<
AlertCalledDto
>
saveMobile
(
@RequestBody
AlertCalledDto
alertCalledDto
)
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledDto
))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
...
...
@@ -207,6 +214,7 @@ public class AlertCalledController extends BaseController {
alertCalledDto
.
setEquipmentClassification
(
"电梯"
);
alertCalledDto
.
setEquipmentClassificationCode
(
"3000"
);
alertCalledDto
.
setCity
(
elevator
.
getCity
());
alertCalledDto
.
setRegionCode
(
elevator
.
getRegionCode
());
alertCalledDto
.
setDistrict
(
elevator
.
getDistrict
());
AlertCalledDto
alertCalledDtoReturn
=
iAlertCalledService
.
createAlertCalled
(
alertCalledDto
);
return
ResponseHelper
.
buildResponse
(
alertCalledDtoReturn
);
...
...
@@ -661,5 +669,49 @@ public class AlertCalledController extends BaseController {
}
/**
* 根据regionCode 获取区域内实时警情
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getActualAlert"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据regionCode 获取区域内实时警情"
,
notes
=
"根据regionCode 获取区域内实时警情"
)
public
ResponseModel
<
List
<
AlertPaperInfoDto
>>
getActualAlert
(
@RequestParam
(
name
=
"regionCodes"
,
required
=
false
)
List
<
String
>
regionCodes
)
{
// 警情id 警情地址 警情状态 警情类型 警情发生时间
if
(
regionCodes
==
null
)
{
regionCodes
=
tzsAuthService
.
getUserRegionCode
();
}
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getAlertPaperInfoList
(
regionCodes
,
false
));
}
/**
* 根据regionCode 获取区域内历史警情 七日内
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getHistoryAlert"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据regionCode 获取区域内七日内历史警情"
,
notes
=
"根据regionCode 获取区域内七日内历史警情"
)
public
ResponseModel
<
List
<
AlertPaperInfoDto
>>
getHistoryAlert
(
@RequestParam
(
name
=
"regionCodes"
,
required
=
false
)
List
<
String
>
regionCodes
)
{
// 警情id 警情地址 警情状态 警情类型 警情发生时间
if
(
regionCodes
==
null
)
{
regionCodes
=
tzsAuthService
.
getUserRegionCode
();
}
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getAlertPaperInfoList
(
regionCodes
,
true
));
}
/**
* 根据regionCode 获取区域内历史警情 七日内
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserRegincode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户regionCode"
,
notes
=
"获取用户regionCode"
)
public
ResponseModel
<
List
<
String
>>
getHistoryAlert
()
{
List
<
String
>
regionList
=
new
ArrayList
<>();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
logger
.
error
(
me
.
getRealName
());
regionList
.
add
(
"610100"
);
regionList
.
add
(
"610300"
);
return
ResponseHelper
.
buildResponse
(
regionList
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzsAuthController.java
0 → 100644
View file @
5333e2a0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
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
;
/**
* 特种设备权限controller
*/
@RestController
@Api
(
tags
=
"特种设备权限Api"
)
@RequestMapping
(
value
=
"/tzs-auth-api"
)
public
class
TzsAuthController
extends
BaseController
{
@Autowired
TzsAuthService
tzsAuthService
;
/**
* 判断用户是否是管理员
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/isUserAdmin"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户是否是管理员"
,
notes
=
"判断用户是否是管理员"
)
public
ResponseModel
<
Boolean
>
isUserAdmin
()
{
Boolean
flag
=
false
;
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
if
(
me
.
getUserName
().
equals
(
"tzs_wjl"
))
{
flag
=
true
;
}
return
ResponseHelper
.
buildResponse
(
flag
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
5333e2a0
...
...
@@ -486,6 +486,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalled
.
setEquipmentId
(
elevator
.
getSequenceNbr
());
alertCalled
.
setCity
(
elevator
.
getCity
());
alertCalled
.
setDistrict
(
elevator
.
getDistrict
());
alertCalled
.
setRegionCode
(
elevator
.
getRegionCode
());
this
.
save
(
alertCalled
);
// 动态表单
...
...
@@ -670,4 +671,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
// }
// }
}
public
List
<
AlertPaperInfoDto
>
getAlertPaperInfoList
(
List
<
String
>
regionCodes
,
Boolean
isHistory
)
{
List
<
AlertPaperInfoDto
>
temp
=
baseMapper
.
getAlertPaperInfoList
(
regionCodes
,
isHistory
);
temp
.
stream
().
forEach
(
t
->
{
DispatchPaper
paper
=
dispatchPaperService
.
getOne
(
new
LambdaQueryWrapper
<
DispatchPaper
>().
eq
(
DispatchPaper:
:
getIsDelete
,
false
).
eq
(
DispatchPaper:
:
getAlertId
,
t
.
getAlertId
()));
if
(
paper
!=
null
)
{
t
.
setFinishTime
(
paper
.
getFeedbackFinishTime
());
}
});
return
temp
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
View file @
5333e2a0
...
...
@@ -7,6 +7,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.tzs.api.service.ICtiService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -85,6 +87,7 @@ public class CtiServiceImpl implements ICtiService {
String
token
=
this
.
getAccessToken
();
// gid code extphone 目前写死 后面根据用户获取
String
gid
=
"61,默认,0"
;
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
String
code
=
"1001"
;
String
extphone
=
"10001001"
;
String
loginUrl
=
ctiUrl
+
"/cti/login"
+
"?accessToken="
+
token
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RepairConsultServiceImpl.java
View file @
5333e2a0
...
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
...
...
@@ -79,6 +81,10 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
@Value
(
"${mqtt.topic.alertMatrix.push}"
)
private
String
alertMatrixpushTopic
;
@Autowired
ISourceFileService
sourceFileService
;
/**
* 记录处置日志同时修改案件的状态
* @param alertId
...
...
@@ -109,6 +115,7 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
String
content
=
template
.
getContent
();
String
createTime
=
DateUtils
.
getDateNowString
();
DispatchPaperEnums
CZHJ
=
null
;
StringBuffer
attach
=
new
StringBuffer
();
// 公众号生成接警记录
if
(
AlertStageEnums
.
JJ
.
getCode
().
equals
(
type
))
{
// 接警的处置环节为已接警
...
...
@@ -142,6 +149,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
throw
new
BadRequest
(
"警情类型缺失"
);
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$call"
,
emergency_call
);
content
=
content
.
replace
(
"$area"
,
area
).
replace
(
"$alertType"
,
alertType
);
// 小程序接警 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
alertId
);
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"imgs"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
PQ
.
equals
(
type
))
{
// 派遣的处置环节为已派遣
CZHJ
=
DispatchPaperEnums
.
dispatched
;
...
...
@@ -216,6 +232,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
// 反馈方式从动态表单中取得
String
FKFS
=
tempMap
.
get
(
"FKFS"
)
==
null
?
""
:
tempMap
.
get
(
"FKFS"
);
content
=
content
.
replace
(
"$FKFS"
,
FKFS
).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
// 小程序维修反馈 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
dispatchTask
.
getPaperId
());
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"imgs"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
WXFK_TS
.
equals
(
type
))
{
//从派遣单获取数据
//投诉的维修反馈修改成维保已处置
CZHJ
=
DispatchPaperEnums
.
disposed
;
...
...
@@ -235,6 +260,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
});
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
TzsCommonParam
.
FKFS
)).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
type
=
TzsCommonParam
.
WXFK
;
// 小程序维修反馈 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
dispatchTask
.
getPaperId
());
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"imgs"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
BXFK
.
equals
(
type
))
{
//报修反馈
CZHJ
=
DispatchPaperEnums
.
reportorBack
;
...
...
@@ -249,6 +283,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
}
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaperFormDto
.
getDispatchPaper
().
getFeedbackType
()).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"feedbackResult"
));
// 小程序报修人反馈 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
alertId
);
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"feedbacks"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
TSRFK
.
equals
(
type
))
{
//投诉人已反馈
CZHJ
=
DispatchPaperEnums
.
complainantBack
;
...
...
@@ -263,12 +306,25 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
}
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaperFormDto
.
getDispatchPaper
().
getFeedbackType
()).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"feedbackResult"
));
// 小程序投诉人反馈记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
alertId
);
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"feedbacks"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
AlertStageEnums
RZHJ
=
AlertStageEnums
.
getEnumByCode
(
type
);
repairConsult
.
setType
(
RZHJ
.
getCode
());
repairConsult
.
setAlertStageCode
(
RZHJ
.
getId
());
repairConsult
.
setAlertStatus
(
RZHJ
.
getValue
());
repairConsult
.
setDescription
(
content
);
if
(
attach
.
length
()
>
0
)
{
String
attachment
=
attach
.
toString
().
substring
(
1
);
repairConsult
.
setAttachment
(
attachment
);
}
flag
=
this
.
save
(
repairConsult
);
if
(
flag
)
{
// 记录处置记录后修改 案件状态
...
...
@@ -296,7 +352,4 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
return
flag
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
0 → 100644
View file @
5333e2a0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto
;
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.entity.DispatchTask
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 特种设备权限服务实现类
*/
@Service
public
class
TzsAuthServiceImpl
implements
TzsAuthService
{
@Override
public
List
<
String
>
getUserRegionCode
()
{
List
<
String
>
regionList
=
new
ArrayList
<>();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
regionList
.
add
(
"610100"
);
return
regionList
;
}
}
\ No newline at end of file
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