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
3e76afd6
Commit
3e76afd6
authored
Feb 21, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug 4827
parent
8f98585a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
4 deletions
+31
-4
IDataDictionaryService.java
.../amos/boot/biz/common/service/IDataDictionaryService.java
+2
-0
DataDictionaryServiceImpl.java
...ot/biz/common/service/impl/DataDictionaryServiceImpl.java
+8
-0
IFireExpertsService.java
...s/boot/module/common/api/service/IFireExpertsService.java
+4
-1
FireExpertsController.java
...t/module/common/biz/controller/FireExpertsController.java
+16
-2
FireExpertsServiceImpl.java
...odule/common/biz/service/impl/FireExpertsServiceImpl.java
+1
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/IDataDictionaryService.java
View file @
3e76afd6
...
@@ -21,4 +21,6 @@ public interface IDataDictionaryService {
...
@@ -21,4 +21,6 @@ public interface IDataDictionaryService {
List
<
MenuFrom
>
getGWMCDataDictionary
(
String
type
)
throws
Exception
;
List
<
MenuFrom
>
getGWMCDataDictionary
(
String
type
)
throws
Exception
;
public
List
<
DataDictionary
>
getByType
(
String
type
);
public
List
<
DataDictionary
>
getByType
(
String
type
);
public
List
<
DataDictionary
>
getAllChildNodes
(
String
type
,
Long
parent
)
throws
Exception
;
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/DataDictionaryServiceImpl.java
View file @
3e76afd6
...
@@ -155,4 +155,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
...
@@ -155,4 +155,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
// root.setChildren(menus);
// root.setChildren(menus);
return
list
;
return
list
;
}
}
public
List
<
DataDictionary
>
getAllChildNodes
(
String
type
,
Long
parent
)
throws
Exception
{
LambdaQueryWrapper
<
DataDictionary
>
wrapper
=
new
LambdaQueryWrapper
<
DataDictionary
>();
wrapper
.
eq
(
DataDictionary:
:
getIsDelete
,
false
);
wrapper
.
eq
(
DataDictionary:
:
getType
,
type
);
wrapper
.
eq
(
DataDictionary:
:
getParent
,
parent
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IFireExpertsService.java
View file @
3e76afd6
...
@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.common.api.service;
...
@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.common.api.service;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
java.util.List
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -18,5 +21,5 @@ public interface IFireExpertsService {
...
@@ -18,5 +21,5 @@ public interface IFireExpertsService {
public
Page
<
FireExpertsDto
>
queryForFireExpertsPage
(
Page
<
FireExpertsDto
>
page
,
public
Page
<
FireExpertsDto
>
queryForFireExpertsPage
(
Page
<
FireExpertsDto
>
page
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
eq
)
String
expertCode
);
@Condition
(
Operator
.
in
)
List
<
String
>
expertCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FireExpertsController.java
View file @
3e76afd6
...
@@ -29,6 +29,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -29,6 +29,7 @@ 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
;
import
static
org
.
hamcrest
.
CoreMatchers
.
instanceOf
;
import
static
org
.
hamcrest
.
CoreMatchers
.
nullValue
;
import
static
org
.
hamcrest
.
CoreMatchers
.
nullValue
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -151,18 +152,31 @@ public class FireExpertsController extends BaseController {
...
@@ -151,18 +152,31 @@ public class FireExpertsController extends BaseController {
* @param size 每页大小
* @param size 每页大小
* @param fireExpertsDto 查询参数
* @param fireExpertsDto 查询参数
* @return 返回结果
* @return 返回结果
* @throws Exception
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
IPage
<
FireExpertsDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
IPage
<
FireExpertsDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
FireExpertsDto
fireExpertsDto
)
{
FireExpertsDto
fireExpertsDto
)
throws
Exception
{
Page
<
FireExpertsDto
>
page
=
new
Page
<>();
Page
<
FireExpertsDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
/* 修改bug : 4827 开始*/
String
expertCode
=
fireExpertsDto
.
getExpertCode
();
List
<
String
>
expertCodeArr
=
new
ArrayList
<
String
>();
expertCodeArr
.
add
(
expertCode
);
List
<
DataDictionary
>
detaList
=
dataDictionaryService
.
getAllChildNodes
(
"ZJLY"
,
Long
.
parseLong
(
fireExpertsDto
.
getExpertCode
()));
if
(
detaList
!=
null
&&
detaList
.
size
()>
0
)
{
for
(
DataDictionary
i
:
detaList
)
{
expertCodeArr
.
add
(
i
.
getCode
());
}
}
/* 修改bug : 4827 结束*/
Page
<
FireExpertsDto
>
fireExpertsDtoPage
=
fireExpertsServiceImpl
.
queryForFireExpertsPage
(
page
,
false
,
Page
<
FireExpertsDto
>
fireExpertsDtoPage
=
fireExpertsServiceImpl
.
queryForFireExpertsPage
(
page
,
false
,
fireExpertsDto
.
getName
(),
fireExpertsDto
.
getExpertCode
()
);
fireExpertsDto
.
getName
(),
expertCodeArr
);
List
<
FireExpertsDto
>
fireExpertsDtoList
=
fireExpertsDtoPage
.
getRecords
().
stream
().
map
(
item
->
{
List
<
FireExpertsDto
>
fireExpertsDtoList
=
fireExpertsDtoPage
.
getRecords
().
stream
().
map
(
item
->
{
item
.
setAge
(
DateUtils
.
getAge
(
item
.
getBirthdayTime
()));
item
.
setAge
(
DateUtils
.
getAge
(
item
.
getBirthdayTime
()));
return
item
;
return
item
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireExpertsServiceImpl.java
View file @
3e76afd6
...
@@ -29,7 +29,7 @@ public class FireExpertsServiceImpl extends BaseService<FireExpertsDto, FireExpe
...
@@ -29,7 +29,7 @@ public class FireExpertsServiceImpl extends BaseService<FireExpertsDto, FireExpe
public
Page
<
FireExpertsDto
>
queryForFireExpertsPage
(
Page
<
FireExpertsDto
>
page
,
public
Page
<
FireExpertsDto
>
queryForFireExpertsPage
(
Page
<
FireExpertsDto
>
page
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
eq
)
String
expertCode
)
{
@Condition
(
Operator
.
in
)
List
<
String
>
expertCode
)
{
// 消防专家按时间倒叙排列add rec_date 2021-09-08 by kongfm
// 消防专家按时间倒叙排列add rec_date 2021-09-08 by kongfm
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
,
isDelete
,
name
,
expertCode
);
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
,
isDelete
,
name
,
expertCode
);
}
}
...
...
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