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
28668da3
Commit
28668da3
authored
Dec 13, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特种设备96333应急管理系统,资源管理-救援站-新增接口修改
parent
6387c7be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
6 deletions
+47
-6
RescueStationController.java
...ot/module/tzs/biz/controller/RescueStationController.java
+9
-6
RescueStationServiceImpl.java
...module/tzs/biz/service/impl/RescueStationServiceImpl.java
+38
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/RescueStationController.java
View file @
28668da3
...
@@ -8,8 +8,10 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
...
@@ -8,8 +8,10 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueStationDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueStationDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RescueStation
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RescueStation
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.RescueStationMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IRescueStationService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IRescueStationService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.ElevatorServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.ElevatorServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.RescueStationServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -24,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -24,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -52,7 +55,10 @@ public class RescueStationController extends BaseController {
...
@@ -52,7 +55,10 @@ public class RescueStationController extends BaseController {
@Autowired
@Autowired
ElevatorServiceImpl
elevatorServiceImpl
;
ElevatorServiceImpl
elevatorServiceImpl
;
@Autowired
RescueStationMapper
rescueStationMapper
;
@Autowired
RescueStationServiceImpl
rescueStationServiceImpl
;
/**
/**
* 新增救援站
* 新增救援站
*
*
...
@@ -63,11 +69,8 @@ public class RescueStationController extends BaseController {
...
@@ -63,11 +69,8 @@ public class RescueStationController extends BaseController {
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增救援站"
,
notes
=
"新增救援站"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增救援站"
,
notes
=
"新增救援站"
)
public
ResponseModel
<
Boolean
>
saveRescueStation
(
@RequestBody
RescueStationDto
rescueStationDto
)
{
public
ResponseModel
<
Boolean
>
saveRescueStation
(
@RequestBody
RescueStationDto
rescueStationDto
)
{
RescueStation
rescueStation
=
BeanDtoVoUtils
.
convert
(
rescueStationDto
,
RescueStation
.
class
);
rescueStation
.
setRecUserId
(
RequestContext
.
getExeUserId
());
return
ResponseHelper
.
buildResponse
(
rescueStationServiceImpl
.
saveRescueStation
(
rescueStationDto
));
rescueStation
.
setRecDate
(
new
Date
());
boolean
save
=
iRescueStationService
.
save
(
rescueStation
);
return
ResponseHelper
.
buildResponse
(
save
);
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RescueStationServiceImpl.java
View file @
28668da3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueStationDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueStationDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RescueStation
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RescueStation
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.RescueStationMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.RescueStationMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IRescueStationService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IRescueStationService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -23,6 +28,8 @@ public class RescueStationServiceImpl extends BaseService<RescueStationDto, Resc
...
@@ -23,6 +28,8 @@ public class RescueStationServiceImpl extends BaseService<RescueStationDto, Resc
@Autowired
@Autowired
RescueStationMapper
rescueStationMapper
;
RescueStationMapper
rescueStationMapper
;
@Autowired
IRescueStationService
iRescueStationService
;
@Override
@Override
public
List
<
RescueStationDto
>
getListByLatLonDistance
(
String
lat
,
String
lon
,
Integer
distance
)
{
public
List
<
RescueStationDto
>
getListByLatLonDistance
(
String
lat
,
String
lon
,
Integer
distance
)
{
...
@@ -38,4 +45,35 @@ public class RescueStationServiceImpl extends BaseService<RescueStationDto, Resc
...
@@ -38,4 +45,35 @@ public class RescueStationServiceImpl extends BaseService<RescueStationDto, Resc
}
}
return
baseMapper
.
selectExportData
(
ids
);
return
baseMapper
.
selectExportData
(
ids
);
}
}
public
Boolean
saveRescueStation
(
RescueStationDto
rescueStationDto
){
RescueStation
rescueStation
=
BeanDtoVoUtils
.
convert
(
rescueStationDto
,
RescueStation
.
class
);
rescueStation
.
setRecUserId
(
RequestContext
.
getExeUserId
());
rescueStation
.
setRecDate
(
new
Date
());
boolean
save
=
false
;
LambdaQueryWrapper
<
RescueStation
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(!
ValidationUtil
.
isEmpty
(
rescueStation
))
{
wrapper
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getName
()),
RescueStation:
:
getName
,
rescueStation
.
getName
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getCity
()),
RescueStation:
:
getCity
,
rescueStation
.
getCity
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getDistrict
()),
RescueStation:
:
getDistrict
,
rescueStation
.
getDistrict
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getAffiliatedUnit
()),
RescueStation:
:
getAffiliatedUnit
,
rescueStation
.
getAffiliatedUnit
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getAddress
()),
RescueStation:
:
getAddress
,
rescueStation
.
getAddress
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getAffiliatedUnitId
()),
RescueStation:
:
getAffiliatedUnitId
,
rescueStation
.
getAffiliatedUnitId
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getLatitude
()),
RescueStation:
:
getLatitude
,
rescueStation
.
getLatitude
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getLongitude
()),
RescueStation:
:
getLongitude
,
rescueStation
.
getLongitude
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getPrincipal
()),
RescueStation:
:
getPrincipal
,
rescueStation
.
getPrincipal
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getPrincipalPhone
()),
RescueStation:
:
getPrincipalPhone
,
rescueStation
.
getPrincipalPhone
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getProvince
()),
RescueStation:
:
getProvince
,
rescueStation
.
getProvince
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getRegionCode
()),
RescueStation:
:
getRegionCode
,
rescueStation
.
getRegionCode
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getRescueLeader
()),
RescueStation:
:
getRescueLeader
,
rescueStation
.
getRescueLeader
())
.
eq
(!
ValidationUtil
.
isEmpty
(
rescueStation
.
getRescueLeaderPhone
()),
RescueStation:
:
getRescueLeaderPhone
,
rescueStation
.
getRescueLeaderPhone
());
List
<
RescueStation
>
rescueStations
=
rescueStationMapper
.
selectList
(
wrapper
);
if
(
ValidationUtil
.
isEmpty
(
rescueStations
)
)
{
save
=
iRescueStationService
.
save
(
rescueStation
);
}
}
return
save
;
}
}
}
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