Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
86c29321
Commit
86c29321
authored
Dec 31, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
ebbbf57d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
43 deletions
+31
-43
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+3
-1
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+13
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+14
-41
RepaymentServiceImpl.java
...ot/module/hygf/biz/service/impl/RepaymentServiceImpl.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
86c29321
...
...
@@ -37,8 +37,9 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
JpStation
>
getJpStationList
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"ORG_CODE"
}
,
dealerField
={
"ORG_CODE"
},
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
,
specific
=
false
)
List
<
DropDown
>
getRegion
(
String
regionName
);
List
<
DropDown
>
getRegion
(
String
regionName
,
String
address
);
List
<
String
>
getRegionAddress
();
@UserEmpower
(
field
={
"ORG_CODE"
}
,
dealerField
={
"ORG_CODE"
},
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
,
specific
=
false
)
List
<
DropDown
>
getRegionByProvince
(
@Param
(
value
=
"ids"
)
List
<
String
>
ids
);
...
...
@@ -100,4 +101,5 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
Map
<
String
,
String
>>
queryUnitInfo
();
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
86c29321
...
...
@@ -254,6 +254,19 @@
<if
test=
"regionName!=null and regionName!=''"
>
and privilege_company.COMPANY_NAME like concat('%',#{regionName}, '%')
</if>
<if
test=
"address!=null and address!='' and address !='未知省份'"
>
and privilege_company.ADDRESS like concat('%',#{address}, '%')
</if>
<if
test=
"address!=null and address!='' and address == '未知省份'"
>
and privilege_company.ADDRESS is null
</if>
</select>
<select
id=
"getRegionAddress"
resultType=
"String"
>
SELECT DISTINCT IFNULL(privilege_company.address, '未知省份') AS address
FROM privilege_company
WHERE IS_DELETED = 0
and privilege_company.COMPANY_TYPE = 'region'
</select>
<select
id=
"getRegionNode"
resultType=
"string"
>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
86c29321
...
...
@@ -429,9 +429,9 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司"
,
notes
=
"查询当前登录人权限区域公司"
)
@GetMapping
(
value
=
"/getRegion"
)
@UserLimits
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getRegion
(
@RequestParam
(
required
=
false
)
String
regionName
)
{
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getRegion
(
@RequestParam
(
required
=
false
)
String
regionName
,
@RequestParam
(
required
=
false
)
String
address
)
{
List
<
DropDown
>
list
=
jpStationMapper
.
getRegion
(
regionName
);
List
<
DropDown
>
list
=
jpStationMapper
.
getRegion
(
regionName
,
address
);
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<>();
list
.
forEach
(
dropDown
->
{
Map
<
String
,
String
>
item
=
new
HashMap
<>();
...
...
@@ -445,45 +445,18 @@ public class JpStationController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司
"
,
notes
=
"查询当前登录人权限区域公司
"
)
@GetMapping
(
value
=
"/getRegion
Group
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司
地址"
,
notes
=
"查询当前登录人权限区域公司地址
"
)
@GetMapping
(
value
=
"/getRegion
Address
"
)
@UserLimits
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getRegionGroup
(
@RequestParam
(
required
=
false
)
String
regionName
)
{
List
<
DropDown
>
list
=
jpStationMapper
.
getRegion
(
regionName
);
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
list
.
forEach
(
item
->{
if
(
StringUtils
.
isEmpty
(
item
.
getAddress
())){
item
.
setAddress
(
"未知省份"
);
}
});
Map
<
String
,
List
<
DropDown
>>
map
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
DropDown:
:
getAddress
));
map
.
forEach
((
k
,
v
)->{
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
children
=
new
ArrayList
<>();
map1
.
put
(
"value"
,
k
);
map1
.
put
(
"label"
,
k
);
map1
.
put
(
"children"
,
children
);
if
(
CollectionUtils
.
isNotEmpty
(
v
)){
for
(
DropDown
dropDown
:
v
)
{
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
map2
.
put
(
"value"
,
dropDown
.
getOrgCode
());
map2
.
put
(
"label"
,
dropDown
.
getName
());
children
.
add
(
map2
);
}
}
resultList
.
add
(
map1
);
});
}
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
item
.
put
(
"value"
,
"全国"
);
item
.
put
(
"label"
,
"全国"
);
item
.
put
(
"children"
,
resultList
);
result
.
add
(
item
);
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getRegionAddress
()
{
List
<
String
>
list
=
jpStationMapper
.
getRegionAddress
();
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<>();
list
.
forEach
(
address
->
{
Map
<
String
,
String
>
item
=
new
HashMap
<>();
item
.
put
(
"text"
,
address
);
item
.
put
(
"value"
,
address
);
result
.
add
(
item
);
});
return
ResponseHelper
.
buildResponse
(
result
);
}
//查询当前登录人权限区域公司
...
...
@@ -974,7 +947,7 @@ public class JpStationController extends BaseController {
@UserLimits
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getRegionStatistics
(
@RequestParam
(
required
=
false
)
String
regionName
)
{
// 获取区域公司列表
List
<
DropDown
>
regionlist
=
jpStationMapper
.
getRegion
(
regionName
);
List
<
DropDown
>
regionlist
=
jpStationMapper
.
getRegion
(
regionName
,
null
);
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/RepaymentServiceImpl.java
View file @
86c29321
...
...
@@ -241,7 +241,7 @@ public class RepaymentServiceImpl extends BaseService<RepaymentDto, Repayment, R
public
void
importRepaymentExcel
(
MultipartFile
file
)
{
//获取当前用户权限的公司
try
{
List
<
DropDown
>
region
=
jpStationMapper
.
getRegion
(
null
);
List
<
DropDown
>
region
=
jpStationMapper
.
getRegion
(
null
,
null
);
if
(
CollectionUtil
.
isEmpty
(
region
))
{
throw
new
BadRequest
(
"该用户没有公司"
);
}
...
...
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