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
50825124
Commit
50825124
authored
Jun 11, 2021
by
付培阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
救援站信息业务接口修改
parent
c99c159f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
231 additions
and
56 deletions
+231
-56
RescueStationDto.java
...eejoin/amos/boot/module/tzs/api/dto/RescueStationDto.java
+3
-0
RescueStation.java
...eejoin/amos/boot/module/tzs/api/entity/RescueStation.java
+13
-1
MaintenanceUnitNameVo.java
...in/amos/boot/module/tzs/api/vo/MaintenanceUnitNameVo.java
+33
-0
RescueStationVo.java
.../yeejoin/amos/boot/module/tzs/api/vo/RescueStationVo.java
+3
-0
ElevatorController.java
...os/boot/module/tzs/biz/controller/ElevatorController.java
+1
-1
MaintenanceUnitController.java
.../module/tzs/biz/controller/MaintenanceUnitController.java
+24
-1
RescueStationController.java
...ot/module/tzs/biz/controller/RescueStationController.java
+125
-41
UseUnitController.java
...mos/boot/module/tzs/biz/controller/UseUnitController.java
+1
-1
BeanDtoVoUtils.java
...eejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
+24
-9
application.properties
...boot-tzs-system/src/main/resources/application.properties
+4
-2
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/RescueStationDto.java
View file @
50825124
...
...
@@ -63,4 +63,7 @@ public class RescueStationDto extends BaseEntity {
@ApiModelProperty
(
value
=
"所属单位id"
)
private
Long
affiliatedUnitId
;
@ApiModelProperty
(
value
=
"经纬度"
)
private
String
longitudeLatitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/RescueStation.java
View file @
50825124
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -7,6 +8,10 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
/**
* @author tb
...
...
@@ -21,22 +26,26 @@ public class RescueStation extends BaseEntity {
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"名称不能为空"
)
@ApiModelProperty
(
value
=
"应急救援机构名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"省份"
)
private
String
province
;
@NotNull
(
message
=
"地市不能为空"
)
@ApiModelProperty
(
value
=
"地市"
)
private
String
city
;
@NotNull
(
message
=
"区县不能为空"
)
@ApiModelProperty
(
value
=
"区县"
)
private
String
district
;
@NotNull
(
message
=
"区域代码不能为空"
)
@ApiModelProperty
(
value
=
"区域代码"
)
private
String
regionCode
;
@NotNull
(
message
=
"地址不能为空"
)
@ApiModelProperty
(
value
=
"地址(详细地址,包括道路、门牌号码)"
)
private
String
address
;
...
...
@@ -64,4 +73,7 @@ public class RescueStation extends BaseEntity {
@ApiModelProperty
(
value
=
"所属单位id"
)
private
Long
affiliatedUnitId
;
@ApiModelProperty
(
value
=
"经纬度"
)
private
String
longitudeLatitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/vo/MaintenanceUnitNameVo.java
0 → 100644
View file @
50825124
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* @title: RescueStationNameVo
* @Author fpy
* @Date: 2021/6/10 19:10
* @Version 1.0
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"cb_maintenance_unit"
)
@ApiModel
(
value
=
"MaintenanceUnitNameVo"
,
description
=
"MaintenanceUnitNameVo"
)
public
class
MaintenanceUnitNameVo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"维护保养单位id"
)
private
int
sequence_nbr
;
@ApiModelProperty
(
value
=
"维护保养单位名称"
)
private
String
unitName
;
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/vo/RescueStationVo.java
View file @
50825124
...
...
@@ -64,4 +64,7 @@ public class RescueStationVo extends BaseEntity {
@ApiModelProperty
(
value
=
"所属单位id"
)
private
Long
affiliatedUnitId
;
@ApiModelProperty
(
value
=
"经纬度"
)
private
String
longitudeLatitude
;
}
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 @
50825124
...
...
@@ -101,7 +101,7 @@ public class ElevatorController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
ElevatorVo
>
selectById
(
@PathVariable
Long
id
)
{
Elevator
elevator
=
iElevatorService
.
getById
(
id
);
ElevatorVo
elevatorVo
=
BeanDtoVoUtils
.
convertElevatorToVo
(
elevator
);
ElevatorVo
elevatorVo
=
BeanDtoVoUtils
.
convertElevatorToVo
(
elevator
,
false
);
return
ResponseHelper
.
buildResponse
(
elevatorVo
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/MaintenanceUnitController.java
View file @
50825124
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService
;
import
com.yeejoin.amos.boot.module.tzs.api.vo.MaintenanceUnitNameVo
;
import
com.yeejoin.amos.boot.module.tzs.api.vo.MaintenanceUnitVo
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -22,6 +23,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
...
...
@@ -94,7 +96,7 @@ public class MaintenanceUnitController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
MaintenanceUnitVo
>
selectById
(
@PathVariable
Long
id
)
{
MaintenanceUnit
maintenanceUnit
=
iMaintenanceUnitService
.
getById
(
id
);
MaintenanceUnitVo
maintenanceUnitVo
=
BeanDtoVoUtils
.
convertMaintenanceUnitToVo
(
maintenanceUnit
);
MaintenanceUnitVo
maintenanceUnitVo
=
BeanDtoVoUtils
.
convertMaintenanceUnitToVo
(
maintenanceUnit
,
false
);
return
ResponseHelper
.
buildResponse
(
maintenanceUnitVo
);
}
...
...
@@ -199,5 +201,26 @@ public class MaintenanceUnitController extends BaseController {
IPage
<
MaintenanceUnitVo
>
maintenanceUnitVoIPage
=
BeanDtoVoUtils
.
maintenanceUnitIPageVo
(
page
);
return
ResponseHelper
.
buildResponse
(
maintenanceUnitVoIPage
);
}
/**
* 根据名称查询维保单位列表
*
* @param unitName 维保单位名称
* @return 返回结果
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/query_maintenance_unit_name_list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据名称查询维保单位列表"
,
notes
=
"根据名称查询维保单位列表"
)
public
ResponseModel
<
IPage
<
MaintenanceUnitNameVo
>>
queryMaintenanceUnitListWithName
(
@PathVariable
(
required
=
false
)
String
unitName
)
{
QueryWrapper
<
MaintenanceUnit
>
maintenanceUnitQueryWrapper
=
new
QueryWrapper
<>();
maintenanceUnitQueryWrapper
.
select
(
"distinct sequence_nbr,unit_name"
).
like
(
StringUtils
.
isNotEmpty
(
unitName
),
"unit_name"
,
unitName
);
Page
<
MaintenanceUnit
>
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
IPage
<
MaintenanceUnit
>
page
=
iMaintenanceUnitService
.
page
(
pageBean
,
maintenanceUnitQueryWrapper
);
IPage
<
MaintenanceUnitNameVo
>
maintenanceUnitVoIPage
=
BeanDtoVoUtils
.
iPageVoStream
(
page
,
MaintenanceUnitNameVo
.
class
);
return
ResponseHelper
.
buildResponse
(
maintenanceUnitVoIPage
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/RescueStationController.java
View file @
50825124
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/UseUnitController.java
View file @
50825124
...
...
@@ -40,7 +40,7 @@ import java.util.Arrays;
@Api
(
tags
=
"使用单位Api"
)
@RequestMapping
(
value
=
"/tzs/use-unit"
)
public
class
UseUnitController
extends
BaseController
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Elevator
Controller
.
class
);
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
UseUnit
Controller
.
class
);
@Autowired
IUseUnitService
iUseUnitService
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
View file @
50825124
...
...
@@ -119,10 +119,11 @@ public class BeanDtoVoUtils {
/**
* 将电梯实体类转换为Vo
*
* @param source 实体类
* @param source 实体类
* @param isBatch 是否批量
* @return Vo类
*/
public
static
ElevatorVo
convertElevatorToVo
(
Elevator
source
)
{
public
static
ElevatorVo
convertElevatorToVo
(
Elevator
source
,
boolean
isBatch
)
{
// 判断source是否为空
if
(
source
==
null
)
{
return
null
;
...
...
@@ -138,8 +139,9 @@ public class BeanDtoVoUtils {
String
[]
photoList
=
photos
.
split
(
","
);
target
.
setImg
(
Arrays
.
stream
(
photoList
).
map
(
ElevatorVo
.
Img
::
new
).
collect
(
Collectors
.
toList
()));
}
// 根据数据字典设置值
getElevatorDictionaryByDictCode
();
if
(!
isBatch
)
{
getElevatorDictionaryByDictCode
();
}
List
<
DictionarieValueModel
>
categoryValue
=
elevatorCategory
.
stream
().
filter
(
e
->
e
.
getDictDataKey
().
equals
(
source
.
getCategory
())).
collect
(
Collectors
.
toList
());
target
.
setCategory
(
categoryValue
.
isEmpty
()
?
""
:
categoryValue
.
get
(
0
).
getDictDataValue
());
...
...
@@ -172,9 +174,14 @@ public class BeanDtoVoUtils {
* @return 转换后的Vo
*/
public
static
IPage
<
ElevatorVo
>
elevatorIPageVo
(
IPage
<
Elevator
>
page
)
{
try
{
getElevatorDictionaryByDictCode
();
}
catch
(
Exception
e
)
{
return
null
;
}
return
page
.
convert
(
item
->
{
try
{
return
convertElevatorToVo
(
item
);
return
convertElevatorToVo
(
item
,
true
);
}
catch
(
Exception
e
)
{
return
null
;
}
...
...
@@ -184,10 +191,11 @@ public class BeanDtoVoUtils {
/**
* 将MaintenanceUnit转换为Vo
*
* @param source 源对象
* @param source 源对象
* @param isBatch 是否批量
* @return 转换后的Vo
*/
public
static
MaintenanceUnitVo
convertMaintenanceUnitToVo
(
MaintenanceUnit
source
)
{
public
static
MaintenanceUnitVo
convertMaintenanceUnitToVo
(
MaintenanceUnit
source
,
boolean
isBatch
)
{
// 判断source是否为空
if
(
source
==
null
)
{
return
null
;
...
...
@@ -199,7 +207,9 @@ public class BeanDtoVoUtils {
BeanUtils
.
copyProperties
(
source
,
target
);
// 返回新对象
// 根据数据字典设置值
getMaintenanceUnitDictionaryByDictCode
();
if
(!
isBatch
)
{
getMaintenanceUnitDictionaryByDictCode
();
}
List
<
DictionarieValueModel
>
qualificationLevelValue
=
qualificationLevel
.
stream
().
filter
(
e
->
e
.
getDictDataKey
().
equals
(
source
.
getQualificationLevel
())).
collect
(
Collectors
.
toList
());
target
.
setQualificationLevel
(
qualificationLevelValue
.
isEmpty
()
?
""
:
...
...
@@ -217,9 +227,14 @@ public class BeanDtoVoUtils {
* @return 转换后的分页对象
*/
public
static
IPage
<
MaintenanceUnitVo
>
maintenanceUnitIPageVo
(
IPage
<
MaintenanceUnit
>
page
)
{
try
{
getMaintenanceUnitDictionaryByDictCode
();
}
catch
(
Exception
e
)
{
return
null
;
}
return
page
.
convert
(
item
->
{
try
{
return
convertMaintenanceUnitToVo
(
item
);
return
convertMaintenanceUnitToVo
(
item
,
true
);
}
catch
(
Exception
e
)
{
return
null
;
}
...
...
amos-boot-tzs-system/src/main/resources/application.properties
View file @
50825124
spring.application.name
=
SPECIAL-EQUIPMENT
server.port
=
10000
spring.profiles.active
=
dev
server.servlet.context-path
=
/specialEquipment
\ No newline at end of file
server.servlet.context-path
=
/specialEquipment
spring.jackson.date-format
=
YYYY-MM-DD HH:mm:ss
\ 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