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
9134c415
Commit
9134c415
authored
Sep 22, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公众号接口根据电梯id或电梯应急救援识别码获取电梯信息
parent
3bf50c54
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
223 additions
and
0 deletions
+223
-0
AlertCalledDto.java
.../yeejoin/amos/boot/module/tzs/api/dto/AlertCalledDto.java
+7
-0
ElevatorBaseInfoDto.java
...oin/amos/boot/module/tzs/api/dto/ElevatorBaseInfoDto.java
+49
-0
ElevatorInfoDto.java
...yeejoin/amos/boot/module/tzs/api/dto/ElevatorInfoDto.java
+19
-0
ElevatorMaintenanceInfoDto.java
...s/boot/module/tzs/api/dto/ElevatorMaintenanceInfoDto.java
+29
-0
ElevatorTestInfoDto.java
...oin/amos/boot/module/tzs/api/dto/ElevatorTestInfoDto.java
+28
-0
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+23
-0
ElevatorController.java
...os/boot/module/tzs/biz/controller/ElevatorController.java
+68
-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/AlertCalledDto.java
View file @
9134c415
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* 警情接警填报记录
...
...
@@ -143,4 +144,10 @@ public class AlertCalledDto extends BaseDto {
@ApiModelProperty
(
value
=
"是否辅屏查询"
)
private
String
isAuxiliaryScreen
;
@ApiModelProperty
(
value
=
"投诉描述/故障报修描述"
)
private
String
describe
;
@ApiModelProperty
(
value
=
"图片"
)
private
List
<
String
>
images
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/ElevatorBaseInfoDto.java
0 → 100644
View file @
9134c415
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author litw
* @date 2021-09-22.
*/
@Data
@ApiModel
(
value
=
"ElevatorBaseInfoDto"
,
description
=
"ElevatorBaseInfoDto"
)
public
class
ElevatorBaseInfoDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"电梯应急救援识别码"
)
private
Integer
rescueCode
;
@ApiModelProperty
(
value
=
"设备注册代码"
)
private
String
registerCode
;
@ApiModelProperty
(
value
=
"所属省"
)
private
String
province
;
@ApiModelProperty
(
value
=
"所属地市"
)
private
String
city
;
@ApiModelProperty
(
value
=
"所属区县"
)
private
String
district
;
@ApiModelProperty
(
value
=
"所属区域代码"
)
private
String
regionCode
;
@ApiModelProperty
(
value
=
"电梯品牌"
)
private
String
brand
;
@ApiModelProperty
(
value
=
"使用单位"
)
private
String
useUnit
;
@ApiModelProperty
(
value
=
"维保单位"
)
private
String
maintainUnit
;
@ApiModelProperty
(
value
=
"安装地址"
)
private
String
address
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/ElevatorInfoDto.java
0 → 100644
View file @
9134c415
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
/**
* @author fengwang
* @date 2021-09-22.
*/
@Data
@ApiModel
(
value
=
"ElevatorInfoDto"
,
description
=
"ElevatorInfoDto"
)
public
class
ElevatorInfoDto
{
ElevatorBaseInfoDto
elevatorBaseInfoDto
;
ElevatorMaintenanceInfoDto
elevatorMaintenanceInfoDto
;
ElevatorTestInfoDto
elevatorTestInfoDto
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/ElevatorMaintenanceInfoDto.java
0 → 100644
View file @
9134c415
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author litw
* @date 2021-09-22.
*/
@Data
@ApiModel
(
value
=
"ElevatorMaintenanceInfo"
,
description
=
"ElevatorMaintenanceInfo"
)
public
class
ElevatorMaintenanceInfoDto
{
@ApiModelProperty
(
value
=
"最新维保日期"
)
private
Date
maintenanceTime
;
@ApiModelProperty
(
value
=
"下次维保日期"
)
private
Date
nextMaintenanceTime
;
@ApiModelProperty
(
value
=
"维保单位"
)
private
String
maintenanceUnit
;
@ApiModelProperty
(
value
=
"维保人员"
)
private
String
maintenancePerson
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/ElevatorTestInfoDto.java
0 → 100644
View file @
9134c415
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author fengwang
* @date 2021-09-22.
*/
@Data
@ApiModel
(
value
=
"ElevatorTestInfoDto"
,
description
=
"检验信息表"
)
public
class
ElevatorTestInfoDto
{
@ApiModelProperty
(
value
=
"最新检验时间"
)
private
Date
testTime
;
@ApiModelProperty
(
value
=
"检验单位"
)
private
String
testUnit
;
@ApiModelProperty
(
value
=
"检验人员"
)
private
String
testPerson
;
@ApiModelProperty
(
value
=
"检验结论"
)
private
String
testResult
;
}
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 @
9134c415
...
...
@@ -103,6 +103,29 @@ public class AlertCalledController extends BaseController {
}
/**
* 公众号投诉建议与故障报销
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveMobile"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情接警填报记录"
,
notes
=
"新增警情接警填报记录"
)
public
ResponseModel
<
AlertCalledDto
>
saveMobile
(
@RequestBody
AlertCalledDto
alertCalledDto
,
@RequestParam
String
openid
)
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledDto
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
// 校验openid 是否存在
// 校验电梯识别码是否正确
// alertCalledObjsDto =iAlertCalledService.createAlertCalled(alertCalledObjsDto,reginParams.getUserModel());
return
ResponseHelper
.
buildResponse
(
alertCalledDto
);
}
/**
*
* <pre>
* 相似警情分页查询
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/ElevatorController.java
View file @
9134c415
...
...
@@ -6,11 +6,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorBaseInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorMaintenanceInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorNewDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorTestInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintainInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TestInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IElevatorService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.ElevatorServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.MaintainInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TestInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
io.swagger.annotations.Api
;
...
...
@@ -26,7 +34,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -56,6 +66,12 @@ public class ElevatorController extends BaseController {
@Autowired
private
AmosFeignService
amosFeignService
;
@Autowired
private
MaintainInfoServiceImpl
maintainInfoService
;
@Autowired
private
TestInfoServiceImpl
testInfoService
;
/**
* 新增电梯
*
...
...
@@ -271,5 +287,57 @@ public class ElevatorController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
elevatorUseSiteCategory
);
}
/**
* 根据电梯id或电梯救援识别码获取电梯信息
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getElevatorInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取电梯使用单位"
,
notes
=
"获取电梯使用单位"
)
public
ResponseModel
<
ElevatorInfoDto
>
getElevatorInfo
(
Long
sequenceNbr
,
String
rescueCode
)
{
if
(
StringUtils
.
isBlank
(
rescueCode
)
&&
sequenceNbr
==
null
)
{
throw
new
BadRequest
(
"参数错误"
);
}
ElevatorInfoDto
elevatorInfoDto
=
new
ElevatorInfoDto
();
if
(
null
!=
sequenceNbr
)
{
ElevatorBaseInfoDto
baseInfoDto
=
new
ElevatorBaseInfoDto
();
Elevator
elevator
=
elevatorService
.
getById
(
sequenceNbr
);
Bean
.
toPo
(
elevator
,
baseInfoDto
);
elevatorInfoDto
.
setElevatorBaseInfoDto
(
baseInfoDto
);
}
else
{
QueryWrapper
<
Elevator
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"rescue_code"
,
rescueCode
);
Elevator
elevator
=
elevatorService
.
getOne
(
queryWrapper
);
if
(
null
==
elevator
)
{
throw
new
BadRequest
(
"电梯应急救援码错误"
);
}
ElevatorBaseInfoDto
baseInfoDto
=
new
ElevatorBaseInfoDto
();
Bean
.
toPo
(
elevator
,
baseInfoDto
);
elevatorInfoDto
.
setElevatorBaseInfoDto
(
baseInfoDto
);
}
QueryWrapper
<
MaintainInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"enevator_id"
,
null
==
sequenceNbr
?
rescueCode
:
String
.
valueOf
(
sequenceNbr
));
MaintainInfo
maintainInfo
=
maintainInfoService
.
getOne
(
queryWrapper
);
if
(
null
!=
maintainInfo
)
{
ElevatorMaintenanceInfoDto
elevatorMaintenanceInfoDto
=
new
ElevatorMaintenanceInfoDto
();
Bean
.
toPo
(
maintainInfo
,
elevatorMaintenanceInfoDto
);
elevatorInfoDto
.
setElevatorMaintenanceInfoDto
(
elevatorMaintenanceInfoDto
);
}
QueryWrapper
<
TestInfo
>
queryWrapper1
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"enevator_id"
,
null
==
sequenceNbr
?
rescueCode
:
String
.
valueOf
(
sequenceNbr
));
TestInfo
testInfo
=
testInfoService
.
getOne
(
queryWrapper1
);
if
(
null
!=
testInfo
)
{
ElevatorTestInfoDto
elevatorTestInfoDto
=
new
ElevatorTestInfoDto
();
Bean
.
toPo
(
testInfo
,
elevatorTestInfoDto
);
elevatorInfoDto
.
setElevatorTestInfoDto
(
elevatorTestInfoDto
);
}
return
ResponseHelper
.
buildResponse
(
elevatorInfoDto
);
}
}
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