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
16af784a
Commit
16af784a
authored
Mar 16, 2023
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增筛选下拉接口
parent
715ead06
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
12 deletions
+102
-12
EquipmentCategoryMapper.java
...s/boot/module/tzs/api/mapper/EquipmentCategoryMapper.java
+11
-0
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+44
-2
EquipmentCategoryController.java
...odule/tzs/biz/controller/EquipmentCategoryController.java
+14
-0
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+33
-10
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/EquipmentCategoryMapper.java
View file @
16af784a
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.JgAllDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
...
...
@@ -24,4 +25,14 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
Map
<
String
,
Object
>
getAdministrativeDivision
(
@Param
(
"division"
)
String
division
,
@Param
(
"county"
)
String
county
);
List
<
Map
<
String
,
Object
>>
getSrcee
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"orgBranchName"
)
String
orgBranchName
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
,
@Param
(
"usePlace"
)
String
usePlace
,
@Param
(
"equState"
)
String
equState
);
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
16af784a
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper"
>
<select
id=
"getCategoryCount"
resultType=
"java.util.Map"
>
<select
id=
"getCategoryCount"
resultType=
"java.util.Map"
>
SELECT
ibrfv.relation_form_id AS SEQUENCE_NBR,
ibjsi.ORG_BRANCH_NAME AS ORG_BRANCH_NAME,
...
...
@@ -28,7 +28,7 @@
</select>
<select
id=
"getAdministrativeDivision"
resultType=
"java.util.Map"
>
<select
id=
"getAdministrativeDivision"
resultType=
"java.util.Map"
>
SELECT
code,
type,
...
...
@@ -39,4 +39,46 @@
type= #{division}
AND extend = ${county}
</select>
<select
id=
"getSrcee"
resultType=
"java.util.Map"
>
SELECT
*
from
${tableName}
<where>
<if
test=
"orgBranchName !=null and orgBranchName != ''"
>
and ORG_BRANCH_NAME is not NULL
and ORG_BRANCH_NAME !=''
GROUP BY ORG_BRANCH_NAME
</if>
<if
test=
"equList !=null and equList != ''"
>
and EQU_LIST is not NULL
and EQU_LIST !=''
GROUP BY EQU_LIST
</if>
<if
test=
"equCategory !=null and equCategory != ''"
>
and EQU_CATEGORY is not NULL
and EQU_CATEGORY !=''
GROUP BY EQU_CATEGORY
</if>
<if
test=
"usePlace !=null and usePlace != ''"
>
and
USE_PLACE is not NULL
and USE_PLACE !=''
GROUP BY USE_PLACE
</if>
<if
test=
"equState !=null and equState != ''"
>
and
EQU_STATE is not NULL
and EQU_STATE !=''
GROUP BY EQU_STATE
</if>
</where>
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/EquipmentCategoryController.java
View file @
16af784a
...
...
@@ -8,7 +8,9 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.JgAllDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.EquipmentCategoryServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -42,6 +44,8 @@ public class EquipmentCategoryController extends BaseController {
@Autowired
IEquipmentCategoryService
equipmentCategoryService
;
@Autowired
EquipmentCategoryMapper
equipmentCategoryMapper
;
/**
* 新增装备分类
...
...
@@ -210,4 +214,14 @@ public class EquipmentCategoryController extends BaseController {
return
equipmentCategoryServiceImpl
.
getTable
(
map
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/scalp"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备筛选下拉"
,
notes
=
"设备筛选下拉"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
scalp
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
scalp
(
map
));
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
16af784a
...
...
@@ -174,7 +174,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private
List
<
LinkedHashMap
>
deleteTreeData
(
List
<
LinkedHashMap
>
result
)
{
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//删除使用单位
if
(
"company"
.
equals
(
e
.
get
(
"level"
)))
{
it
.
remove
();
...
...
@@ -255,11 +255,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
/**
* 获取当前登录人单位类型
*
*
* @return
*/
...
...
@@ -275,14 +273,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
/**
* levlel=company,是企业,如果不是都是监管单位,
*
* 在接口中查询当前登录人所属单位是监管单位还是企业。
*
* 如果为监管单位添加监管机构查询参数(ORG_BRANCH_CODE);
*
* 如果为企业添加使用单位查询参数(USE_UNIT_CREDIT_CODE)
* * 在接口中查询当前登录人所属单位是监管单位还是企业。
* * 如果为监管单位添加监管机构查询参数(ORG_BRANCH_CODE);
* * 如果为企业添加使用单位查询参数(USE_UNIT_CREDIT_CODE)
*/
private
static
final
String
LEVEL
=
"company"
;
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getTable
(
Map
<
String
,
Object
>
map
)
{
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
model
=
new
ResponseModel
<>();
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getTable
(
Map
<
String
,
Object
>
map
)
{
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
model
=
new
ResponseModel
<>();
JSONObject
object
=
getCompanyType
();
String
leve
=
object
.
getString
(
"leve"
);
String
code
=
object
.
getString
(
"companyCode"
);
...
...
@@ -300,4 +298,30 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
model
;
}
}
\ No newline at end of file
private
static
final
String
TABLENAME
=
"tableName"
;
public
List
<
Map
<
String
,
Object
>>
scalp
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"orgBranchName"
)))
{
list
=
equipmentCategoryMapper
.
getSrcee
(
map
.
get
(
TABLENAME
).
toString
(),
map
.
get
(
"orgBranchName"
).
toString
(),
null
,
null
,
null
,
null
);
}
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"equList"
)))
{
list
=
equipmentCategoryMapper
.
getSrcee
(
map
.
get
(
TABLENAME
).
toString
(),
null
,
map
.
get
(
"equList"
).
toString
(),
null
,
null
,
null
);
}
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"equCategory"
)))
{
list
=
equipmentCategoryMapper
.
getSrcee
(
map
.
get
(
TABLENAME
).
toString
(),
null
,
null
,
map
.
get
(
"equCategory"
).
toString
(),
null
,
null
);
}
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"usePlace"
)))
{
list
=
equipmentCategoryMapper
.
getSrcee
(
map
.
get
(
TABLENAME
).
toString
(),
null
,
null
,
null
,
map
.
get
(
"usePlace"
).
toString
(),
null
);
}
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"equState"
)))
{
list
=
equipmentCategoryMapper
.
getSrcee
(
map
.
get
(
TABLENAME
).
toString
(),
null
,
null
,
null
,
null
,
map
.
get
(
"equState"
).
toString
());
}
return
list
;
}
}
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