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
d8f1776f
Commit
d8f1776f
authored
Jul 01, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排除null
parent
5103c452
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
FireStationServiceImpl.java
...t/module/jcs/biz/service/impl/FireStationServiceImpl.java
+24
-14
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireStationServiceImpl.java
View file @
d8f1776f
...
...
@@ -16,19 +16,22 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
java.util.List
;
import
java.util.Map
;
/**
* 微型消防站服务实现类
*
* @author system_generator
* @date 2021-06-28
*/
* 微型消防站服务实现类
*
* @author system_generator
* @date 2021-06-28
*/
@Service
public
class
FireStationServiceImpl
extends
BaseService
<
FireStationDto
,
FireStation
,
FireStationMapper
>
implements
IFireStationService
{
public
class
FireStationServiceImpl
extends
BaseService
<
FireStationDto
,
FireStation
,
FireStationMapper
>
implements
IFireStationService
{
@Autowired
FireStationMapper
fireStationMapper
;
@Autowired
OrgUsrMapper
orgUsrMapper
;
/**
* 分页查询
*/
...
...
@@ -40,12 +43,13 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
* 列表查询 示例
*/
public
List
<
FireStationDto
>
queryForFireStationList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
/**
* 删除
*
*/
public
Boolean
updateisDelete
(
Long
sequenceNbr
)
{
*/
public
Boolean
updateisDelete
(
Long
sequenceNbr
)
{
return
this
.
update
(
new
UpdateWrapper
<
FireStation
>().
eq
(
"sequence_nbr"
,
sequenceNbr
).
set
(
"is_delete"
,
1
));
}
...
...
@@ -53,7 +57,7 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
@Override
public
Page
<
FireStationDto
>
getFirefighters
(
int
pageNum
,
int
pageSize
,
FireStationDto
par
)
{
List
<
FireStationDto
>
list
=
fireStationMapper
.
getFireStation
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
par
);
Map
<
String
,
Long
>
num
=
fireStationMapper
.
getFireStationCount
(
par
);
Map
<
String
,
Long
>
num
=
fireStationMapper
.
getFireStationCount
(
par
);
Page
<
FireStationDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
,
num
.
get
(
"num"
));
return
pageBean
.
setRecords
(
list
);
}
...
...
@@ -62,24 +66,30 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
*
* 新增
*
*
***/
***/
public
FireStationDto
add
(
FireStationDto
model
)
{
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
if
(
model
.
getBizCompanyId
()
!=
null
)
{
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
model
.
setBizCompany
(
orgUsr
.
getBizOrgName
());
model
.
setBizCompanyCode
(
orgUsr
.
getBizOrgCode
());
}
FireStation
entity
=
this
.
prepareEntity
(
model
);
this
.
save
(
entity
);
return
Bean
.
toModel
(
entity
,
model
);
}
/**
*
* 修改
*
*
***/
***/
public
FireStationDto
Update
(
FireStationDto
model
)
{
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
if
(
model
.
getBizCompanyId
()
!=
null
)
{
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
model
.
setBizCompany
(
orgUsr
.
getBizOrgName
());
model
.
setBizCompanyCode
(
orgUsr
.
getBizOrgCode
());
}
FireStation
entity
=
this
.
prepareEntity
(
model
);
this
.
updateById
(
entity
);
return
Bean
.
toModel
(
entity
,
model
);
...
...
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