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
3a48d2b1
Commit
3a48d2b1
authored
Dec 10, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电站配置
parent
9b0323c3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
182 additions
and
10 deletions
+182
-10
PVProducerInfoEnum.java
...in/amos/boot/module/hygf/api/Enum/PVProducerInfoEnum.java
+48
-0
JpStationDto.java
...m/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
+10
-1
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+4
-0
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+31
-2
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+31
-0
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+57
-6
hygfRouth.json
...ot-module-hygf-biz/src/main/resources/json/hygfRouth.json
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/PVProducerInfoEnum.java
0 → 100644
View file @
3a48d2b1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
Enum
;
public
enum
PVProducerInfoEnum
{
GDW
(
"固德威"
,
"GOODWE"
),
SH
(
"首航"
,
"SH"
),
JLY
(
"锦浪云"
,
"JLY"
),
KSOLAR
(
"科士达"
,
"KSD"
),
YG
(
"阳光"
,
"YG"
),
HUAWEI
(
"华为"
,
"HW"
),
TANYIN
(
"碳银"
,
"TY"
);
private
String
name
;
private
String
code
;
public
String
getName
()
{
return
name
;
}
PVProducerInfoEnum
(
String
name
,
String
code
)
{
this
.
name
=
name
;
this
.
code
=
code
;
}
public
static
String
getNameByCode
(
String
code
)
{
String
name
=
null
;
for
(
PVProducerInfoEnum
type:
PVProducerInfoEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
name
=
type
.
getName
();
break
;
}
}
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
View file @
3a48d2b1
...
@@ -172,7 +172,8 @@ public class JpStationDto extends BaseDto {
...
@@ -172,7 +172,8 @@ public class JpStationDto extends BaseDto {
private
String
regionalCompaniesCode
;
private
String
regionalCompaniesCode
;
@ExcelProperty
(
value
=
"项目公司名称"
,
index
=
8
)
@ExcelProperty
(
value
=
"项目公司名称"
,
index
=
8
)
private
String
regionalCompaniesName
;
private
String
regionalCompaniesName
;
@ExcelIgnore
private
String
amosCompanyName
;
@ExcelIgnore
@ExcelIgnore
private
String
amosCompanyCode
;
private
String
amosCompanyCode
;
...
@@ -210,4 +211,12 @@ public class JpStationDto extends BaseDto {
...
@@ -210,4 +211,12 @@ public class JpStationDto extends BaseDto {
String
dbsn
;
String
dbsn
;
@ExcelIgnore
@ExcelIgnore
String
qxysn
;
String
qxysn
;
@ExcelIgnore
String
bindType
;
@ExcelIgnore
Integer
current
;
@ExcelIgnore
Integer
size
;
@ExcelIgnore
String
thirdCodeName
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
3a48d2b1
...
@@ -93,4 +93,8 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
...
@@ -93,4 +93,8 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
@UserEmpower
(
field
={
"hygf_jp_station.regional_companies_code"
},
dealerField
={
"hygf_jp_station.amos_company_code"
,
"hygf_jp_station.regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
@UserEmpower
(
field
={
"hygf_jp_station.regional_companies_code"
},
dealerField
={
"hygf_jp_station.amos_company_code"
,
"hygf_jp_station.regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
JpStationDto
>
queryAllPowerStation
(
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
);
List
<
JpStationDto
>
queryAllPowerStation
(
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
);
List
<
Map
<
String
,
String
>>
queryCompany
();
List
<
JpStationDto
>
queryStation
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
3a48d2b1
...
@@ -832,9 +832,38 @@
...
@@ -832,9 +832,38 @@
ORDER BY all_statuses.status;
ORDER BY all_statuses.status;
</select>
</select>
<select
id=
"queryCompany"
resultType=
"java.util.Map"
>
SELECT privilege_company.ORG_CODE value,
privilege_company.COMPANY_NAME name
FROM privilege_company
WHERE IS_DELETED = 0
</select>
<select
id=
"queryStation"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
select sequence_nbr,name,third_code,address,regional_companies_code,amos_company_code
from hygf_jp_station
<where>
<if
test=
"dto.name!=null and dto.name != ''"
>
and name like concat('%',#{dto.name},'%')
</if>
<if
test=
"dto.thirdCode!=null and dto.thirdCode != ''"
>
and third_code like concat('%',#{dto.thirdCode},'%')
</if>
<if
test=
"dto.regionalCompaniesCode!=null and dto.regionalCompaniesCode != ''"
>
and regional_companies_code = #{dto.regionalCompaniesCode}
</if>
<if
test=
"dto.amosCompanyCode!=null and dto.amosCompanyCode != ''"
>
and amos_company_code = #{dto.amosCompanyCode}
</if>
<if
test=
"dto.bindType == '未绑定'"
>
and (amos_company_code is null or regional_companies_code is null )
</if>
<if
test=
"dto.bindType == '已绑定'"
>
and (amos_company_code is not null and regional_companies_code is not null )
</if>
</where>
order by rec_date DESC
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
3a48d2b1
...
@@ -833,6 +833,37 @@ public class JpStationController extends BaseController {
...
@@ -833,6 +833,37 @@ public class JpStationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateCompanyCode"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新项目公司和经销商"
,
notes
=
"更新项目公司和经销商"
)
public
ResponseModel
<?>
updateCompanyCode
(
@RequestBody
JpStationDto
reviewDto
)
{
jpStationServiceImpl
.
updateCompanyCode
(
reviewDto
);
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryStation"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询场站"
,
notes
=
"查询场站"
)
public
ResponseModel
<?>
queryStation
(
@RequestBody
JpStationDto
reviewDto
)
{
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryStation
(
reviewDto
);
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryCompany"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询公司"
,
notes
=
"查询公司"
)
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
queryCompany
()
{
List
<
Map
<
String
,
String
>>
map
=
jpStationServiceImpl
.
queryCompany
();
return
ResponseHelper
.
buildResponse
(
map
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getStationDetail"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询场站详情"
,
notes
=
"查询场站详情"
)
public
ResponseModel
<
JpStationDto
>
getStationDetail
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
JpStationDto
jpStationDto
=
jpStationServiceImpl
.
getStationDetail
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jpStationDto
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"登录人场站"
,
notes
=
"登录人场站"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"登录人场站"
,
notes
=
"登录人场站"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
3a48d2b1
...
@@ -7,9 +7,12 @@ import com.alibaba.excel.EasyExcel;
...
@@ -7,9 +7,12 @@ import com.alibaba.excel.EasyExcel;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PVProducerInfoEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
...
@@ -26,6 +29,7 @@ import org.apache.activemq.util.MapHelper;
...
@@ -26,6 +29,7 @@ import org.apache.activemq.util.MapHelper;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
@@ -66,8 +70,6 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
...
@@ -66,8 +70,6 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
MonthGenerateMapper
monthGenerateMapper
;
MonthGenerateMapper
monthGenerateMapper
;
@Autowired
@Autowired
YearGenerateMapper
yearGenerateMapper
;
YearGenerateMapper
yearGenerateMapper
;
@Autowired
RegionalCompaniesMapper
regionalCompaniesMapper
;
private
static
double
FDL
=
0.001
;
private
static
double
FDL
=
0.001
;
private
static
int
FD
=
1000
;
private
static
int
FD
=
1000
;
...
@@ -667,10 +669,12 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
...
@@ -667,10 +669,12 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
*/
*/
private
Map
<
String
,
String
>
getRegionalCompaniesNameMap
()
{
private
Map
<
String
,
String
>
getRegionalCompaniesNameMap
()
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
List
<
RegionalCompanies
>
regionalCompanies
=
regionalCompaniesMapper
.
selectList
(
null
);
List
<
Map
<
String
,
String
>>
maps
=
jpStationMapper
.
queryCompany
();
if
(
CollectionUtil
.
isNotEmpty
(
regionalCompanies
)){
if
(
CollectionUtil
.
isNotEmpty
(
maps
)){
for
(
RegionalCompanies
regionalCompany
:
regionalCompanies
)
{
for
(
Map
<
String
,
String
>
stringStringMap
:
maps
)
{
map
.
put
(
regionalCompany
.
getRegionalCompaniesCode
(),
regionalCompany
.
getRegionalCompaniesName
());
String
orgCode
=
stringStringMap
.
get
(
"value"
);
String
companyName
=
stringStringMap
.
get
(
"name"
);
map
.
put
(
orgCode
,
companyName
);
}
}
}
}
return
map
;
return
map
;
...
@@ -1056,5 +1060,51 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
...
@@ -1056,5 +1060,51 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateCompanyCode
(
JpStationDto
reviewDto
)
{
if
(
Objects
.
nonNull
(
reviewDto
.
getSequenceNbr
())){
LambdaUpdateWrapper
<
JpStation
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
set
(
JpStation:
:
getRecDate
,
new
Date
())
.
set
(
JpStation:
:
getRegionalCompaniesCode
,
reviewDto
.
getRegionalCompaniesCode
())
.
set
(
JpStation:
:
getAmosCompanyCode
,
reviewDto
.
getAmosCompanyCode
())
.
eq
(
JpStation:
:
getSequenceNbr
,
reviewDto
.
getSequenceNbr
());
update
(
null
,
wrapper
);
}
}
public
Page
<
JpStationDto
>
queryStation
(
JpStationDto
reviewDto
)
{
if
(
Objects
.
isNull
(
reviewDto
.
getBindType
())){
reviewDto
.
setBindType
(
"未知"
);
}
PageHelper
.
startPage
(
reviewDto
.
getCurrent
(),
reviewDto
.
getSize
());
List
<
JpStationDto
>
jpStationDtoList
=
jpStationMapper
.
queryStation
(
reviewDto
);
Map
<
String
,
String
>
regionalCompaniesNameMap
=
getRegionalCompaniesNameMap
();
if
(
CollectionUtil
.
isNotEmpty
(
jpStationDtoList
)){
for
(
JpStationDto
jpStationDto
:
jpStationDtoList
)
{
jpStationDto
.
setRegionalCompaniesName
(
regionalCompaniesNameMap
.
get
(
jpStationDto
.
getRegionalCompaniesCode
()));
jpStationDto
.
setAmosCompanyName
(
regionalCompaniesNameMap
.
get
(
jpStationDto
.
getAmosCompanyCode
()));
jpStationDto
.
setThirdCodeName
(
PVProducerInfoEnum
.
getNameByCode
(
jpStationDto
.
getThirdCode
()));
}
}
PageInfo
<
JpStationDto
>
page
=
new
PageInfo
<>(
jpStationDtoList
);
Page
<
JpStationDto
>
pageNew
=
new
Page
<>();
pageNew
.
setCurrent
(
reviewDto
.
getCurrent
());
pageNew
.
setTotal
(
page
.
getTotal
());
pageNew
.
setSize
(
reviewDto
.
getSize
());
pageNew
.
setRecords
(
page
.
getList
());
return
pageNew
;
}
public
List
<
Map
<
String
,
String
>>
queryCompany
()
{
return
jpStationMapper
.
queryCompany
();
}
public
JpStationDto
getStationDetail
(
Long
sequenceNbr
)
{
JpStationDto
jpStationDto
=
this
.
queryBySeq
(
sequenceNbr
);
if
(
Objects
.
nonNull
(
jpStationDto
)){
jpStationDto
.
setThirdCodeName
(
PVProducerInfoEnum
.
getNameByCode
(
jpStationDto
.
getThirdCode
()));
}
return
jpStationDto
;
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/json/hygfRouth.json
View file @
3a48d2b1
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
"key"
:
"hygf_httb"
,
"key"
:
"hygf_httb"
,
"taskType"
:
"合同填报"
,
"taskType"
:
"合同填报"
,
"name"
:
"合同填报"
,
"name"
:
"合同填报"
,
"url"
:
"
/view/mine/minepage/SurveyListgld
"
"url"
:
""
},
},
{
{
"key"
:
"fh_dtj"
,
"key"
:
"fh_dtj"
,
...
...
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