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
abe470e2
Commit
abe470e2
authored
Mar 21, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据Record获取类别和品种
parent
b24f05b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
3 deletions
+36
-3
EquipmentCategoryMapper.java
...s/boot/module/tzs/api/mapper/EquipmentCategoryMapper.java
+1
-1
IEquipmentCategoryService.java
...oot/module/tzs/api/service/IEquipmentCategoryService.java
+2
-0
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+11
-1
EquipmentCategoryController.java
...odule/tzs/biz/controller/EquipmentCategoryController.java
+13
-0
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+9
-1
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 @
abe470e2
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.tzs.api.mapper;
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.tzs.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
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.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.entity.EquipmentCategory
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
...
@@ -35,4 +34,5 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
...
@@ -35,4 +34,5 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Param
(
"equState"
)
String
equState
);
@Param
(
"equState"
)
String
equState
);
Map
<
String
,
Object
>
getCategoryAndDefineByRecord
(
@Param
(
"record"
)
String
record
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IEquipmentCategoryService.java
View file @
abe470e2
...
@@ -24,4 +24,6 @@ public interface IEquipmentCategoryService {
...
@@ -24,4 +24,6 @@ public interface IEquipmentCategoryService {
List
<
LinkedHashMap
>
creatTree
();
List
<
LinkedHashMap
>
creatTree
();
List
<
LinkedHashMap
>
getRegion
(
String
level
,
String
parentId
);
List
<
LinkedHashMap
>
getRegion
(
String
level
,
String
parentId
);
Map
<
String
,
Object
>
getCategoryAndDefineByRecord
(
String
rowId
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
abe470e2
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
cb_data_dictionary
cb_data_dictionary
WHERE
WHERE
type= #{division}
type= #{division}
AND extend =
$
{county}
AND extend =
#
{county}
</select>
</select>
...
@@ -121,4 +121,14 @@
...
@@ -121,4 +121,14 @@
</select>
</select>
<select
id=
"getCategoryAndDefineByRecord"
resultType=
"java.util.Map"
>
SELECT
"EQU_CATEGORY",
"EQU_DEFINE"
FROM
idx_biz_jg_register_info
WHERE
"RECORD" = #{record}
</select>
</mapper>
</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 @
abe470e2
...
@@ -245,4 +245,17 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -245,4 +245,17 @@ public class EquipmentCategoryController extends BaseController {
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
)
{
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getRegion
(
level
,
parentId
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getRegion
(
level
,
parentId
));
}
}
/**
* 根据Record获取类别和品种
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCategoryAndDefineByRecord"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据Record获取类别和品种"
,
notes
=
"根据Record获取类别和品种"
)
public
ResponseModel
<
Object
>
getCategoryAndDefineById
(
@RequestParam
(
value
=
"rowId"
,
required
=
false
)
String
rowId
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getCategoryAndDefineByRecord
(
rowId
));
}
}
}
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 @
abe470e2
...
@@ -193,6 +193,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -193,6 +193,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
list
;
return
list
;
}
}
@Override
public
Map
<
String
,
Object
>
getCategoryAndDefineByRecord
(
String
record
)
{
if
(
ObjectUtils
.
isEmpty
(
record
)){
return
null
;
}
return
equipmentCategoryMapper
.
getCategoryAndDefineByRecord
(
record
);
}
private
List
<
LinkedHashMap
>
deleteTreeData
(
List
<
LinkedHashMap
>
result
,
String
type
)
{
private
List
<
LinkedHashMap
>
deleteTreeData
(
List
<
LinkedHashMap
>
result
,
String
type
)
{
Iterator
it
=
result
.
iterator
();
Iterator
it
=
result
.
iterator
();
if
(
ObjectUtils
.
isEmpty
(
type
))
{
if
(
ObjectUtils
.
isEmpty
(
type
))
{
...
@@ -235,7 +243,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -235,7 +243,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
supervisorCode
.
append
(
division
).
append
(
equipCategory
);
supervisorCode
.
append
(
division
).
append
(
equipCategory
)
.
append
(
"-"
)
;
//获取行政区划区县、市是否存在历史监管码
//获取行政区划区县、市是否存在历史监管码
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
//查询对应record对应数据
//查询对应record对应数据
...
...
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