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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
62 deletions
+72
-62
FireStationServiceImpl.java
...t/module/jcs/biz/service/impl/FireStationServiceImpl.java
+72
-62
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,72 +16,82 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -16,72 +16,82 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* 微型消防站服务实现类
* 微型消防站服务实现类
*
*
* @author system_generator
* @author system_generator
* @date 2021-06-28
* @date 2021-06-28
*/
*/
@Service
@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
@Autowired
FireStationMapper
fireStationMapper
;
OrgUsrMapper
orgUsrMapper
;
@Autowired
/**
OrgUsrMapper
orgUsrMapper
;
* 分页查询
*/
/**
public
Page
<
FireStationDto
>
queryForFireStationPage
(
Page
<
FireStationDto
>
page
)
{
* 分页查询
return
this
.
queryForPage
(
page
,
null
,
false
);
*/
}
public
Page
<
FireStationDto
>
queryForFireStationPage
(
Page
<
FireStationDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
FireStationDto
>
queryForFireStationList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
/**
* 列表查询 示例
* 删除
*/
*/
public
List
<
FireStationDto
>
queryForFireStationList
()
{
public
Boolean
updateisDelete
(
Long
sequenceNbr
)
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 删除
* */
public
Boolean
updateisDelete
(
Long
sequenceNbr
)
{
return
this
.
update
(
new
UpdateWrapper
<
FireStation
>().
eq
(
"sequence_nbr"
,
sequenceNbr
).
set
(
"is_delete"
,
1
));
}
@Override
return
this
.
update
(
new
UpdateWrapper
<
FireStation
>().
eq
(
"sequence_nbr"
,
sequenceNbr
).
set
(
"is_delete"
,
1
));
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
);
@Override
Page
<
FireStationDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
,
num
.
get
(
"num"
));
public
Page
<
FireStationDto
>
getFirefighters
(
int
pageNum
,
int
pageSize
,
FireStationDto
par
)
{
return
pageBean
.
setRecords
(
list
);
List
<
FireStationDto
>
list
=
fireStationMapper
.
getFireStation
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
par
);
Map
<
String
,
Long
>
num
=
fireStationMapper
.
getFireStationCount
(
par
);
Page
<
FireStationDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
,
num
.
get
(
"num"
));
return
pageBean
.
setRecords
(
list
);
}
/**
*
* 新增
*
***/
public
FireStationDto
add
(
FireStationDto
model
)
{
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
add
(
FireStationDto
model
)
{
public
FireStationDto
Update
(
FireStationDto
model
)
{
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
if
(
model
.
getBizCompanyId
()
!=
null
)
{
model
.
setBizCompany
(
orgUsr
.
getBizOrgName
());
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
model
.
setBizCompanyCode
(
orgUsr
.
getBizOrgCode
());
model
.
setBizCompany
(
orgUsr
.
getBizOrgName
());
FireStation
entity
=
this
.
prepareEntity
(
model
);
model
.
setBizCompanyCode
(
orgUsr
.
getBizOrgCode
());
this
.
save
(
entity
);
}
return
Bean
.
toModel
(
entity
,
model
);
FireStation
entity
=
this
.
prepareEntity
(
model
);
}
this
.
updateById
(
entity
);
/**
return
Bean
.
toModel
(
entity
,
model
);
*
}
* 修改
*
* ***/
public
FireStationDto
Update
(
FireStationDto
model
)
{
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