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
707bd684
Commit
707bd684
authored
Mar 27, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
10d2306c
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
121 additions
and
35 deletions
+121
-35
HouseholdPvDto.java
...eejoin/amos/boot/module/jxiop/api/dto/HouseholdPvDto.java
+4
-0
HouseholdPvExport.java
...oin/amos/boot/module/jxiop/api/dto/HouseholdPvExport.java
+1
-0
HouseholdPvImport.java
...oin/amos/boot/module/jxiop/api/dto/HouseholdPvImport.java
+1
-1
HouseholdPvDistrictMapper.java
...ot/module/jxiop/api/mapper/HouseholdPvDistrictMapper.java
+2
-0
IHouseholdPvDistrictService.java
...module/jxiop/api/service/IHouseholdPvDistrictService.java
+1
-1
IHouseholdPvService.java
...os/boot/module/jxiop/api/service/IHouseholdPvService.java
+2
-0
HouseholdPvDistrictMapper.xml
...i/src/main/resources/mapper/HouseholdPvDistrictMapper.xml
+12
-0
HouseholdPvMapper.xml
...jxiop-api/src/main/resources/mapper/HouseholdPvMapper.xml
+6
-3
HouseholdPvController.java
...ot/module/jxiop/biz/controller/HouseholdPvController.java
+40
-25
HouseholdPvDistrictController.java
...e/jxiop/biz/controller/HouseholdPvDistrictController.java
+2
-2
HouseholdPvDistrictServiceImpl.java
...xiop/biz/service/impl/HouseholdPvDistrictServiceImpl.java
+22
-2
HouseholdPvServiceImpl.java
...module/jxiop/biz/service/impl/HouseholdPvServiceImpl.java
+28
-1
householdExport.xls
...xiop-biz/src/main/resources/templates/householdExport.xls
+0
-0
householdTemplates.xls
...p-biz/src/main/resources/templates/householdTemplates.xls
+0
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/HouseholdPvDto.java
View file @
707bd684
...
...
@@ -106,4 +106,8 @@ public class HouseholdPvDto extends BaseDto {
private
List
<
Long
>
ids
;
/**
* 安装地址
*/
private
String
installAddress
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/HouseholdPvExport.java
View file @
707bd684
...
...
@@ -13,6 +13,7 @@ public class HouseholdPvExport {
* 基础信息
*/
private
String
platformCompanyId
;
private
String
districtId
;
private
String
number
;
private
String
name
;
private
String
sex
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/HouseholdPvImport.java
View file @
707bd684
...
...
@@ -10,7 +10,7 @@ public class HouseholdPvImport {
@ExcelProperty
(
value
=
"所属场站"
,
index
=
0
)
private
String
platformCompanyId
;
@ColumnWidth
(
15
)
@ExcelProperty
(
value
=
"
所属区域
"
,
index
=
1
)
@ExcelProperty
(
value
=
"
乡镇
"
,
index
=
1
)
private
String
districtId
;
@ColumnWidth
(
15
)
@ExcelProperty
(
value
=
"户号"
,
index
=
2
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/HouseholdPvDistrictMapper.java
View file @
707bd684
...
...
@@ -17,6 +17,8 @@ public interface HouseholdPvDistrictMapper extends BaseMapper<HouseholdPvDistric
List
<
CompanyTreeDto
>
getList
();
List
<
CompanyTreeDto
>
getListByParentId
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"parentId"
)
Long
parentId
);
Integer
countTreeNodesById
(
@Param
(
"id"
)
Long
id
);
Integer
countHouseholdById
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/service/IHouseholdPvDistrictService.java
View file @
707bd684
...
...
@@ -17,7 +17,7 @@ public interface IHouseholdPvDistrictService extends IService<HouseholdPvDistric
List
<
CompanyTreeDto
>
getTree
();
List
<
CompanyTreeDto
>
getBusinessTree
();
List
<
CompanyTreeDto
>
getBusinessTree
(
Long
parentId
);
HouseholdPvDistrict
treeAdd
(
Long
parentId
,
String
name
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/service/IHouseholdPvService.java
View file @
707bd684
...
...
@@ -31,4 +31,6 @@ public interface IHouseholdPvService extends IService<HouseholdPv>{
HouseholdPvDto
update
(
HouseholdPvDto
householdPvDto
);
HouseholdPvDto
getBySeq
(
Long
id
);
Integer
countRepeat
(
HouseholdPvDto
householdPvDto
,
String
type
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/HouseholdPvDistrictMapper.xml
View file @
707bd684
...
...
@@ -27,4 +27,16 @@
<select
id=
"selectIds"
resultType=
"java.lang.Long"
>
select hp.sequence_nbr from household_pv_district hp where hp.biz_org_code like concat(#{bizOrgCode}, '%')
</select>
<select
id=
"getListByParentId"
resultType=
"com.yeejoin.amos.boot.module.jxiop.api.dto.CompanyTreeDto"
>
SELECT
hpd.sequence_nbr AS id,
hpd.NAME,
hpd.parent_id AS parentId,
hpd.parent_type AS type
FROM
household_pv_district hpd
WHERE
hpd.is_delete = 0 and hpd.sequence_nbr != #{parentId}
AND hpd.biz_org_code LIKE CONCAT(#{bizOrgCode}, '%' )
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/HouseholdPvMapper.xml
View file @
707bd684
...
...
@@ -17,6 +17,7 @@
hp.address,
hp.postcode,
hp.service_address AS serviceAddress,
hp.district_id AS districtId,
hpc.number AS contactNumber,
hpc.period,
hpc.description ,
...
...
@@ -61,13 +62,14 @@
SELECT * from household_pv_device hpd WHERE hpd.household_pv_id = #{id}
</select>
<select
id=
"selectPageMessage"
resultType=
"com.yeejoin.amos.boot.module.jxiop.api.dto.HouseholdPvDto"
>
select * from household_pv hp
select hp.*,hpl.install_address as installAddress from household_pv hp
LEFT JOIN household_pv_lease hpl on hp.sequence_nbr = hpl.household_pv_id
<where>
<if
test=
"dto.name != null and dto.name != ''"
>
and hp.name like concat('%',#{dto.name},'%')
</if>
<if
test=
"dto.
residenceAddress != null and dto.residence
Address != ''"
>
and hp
.residence_address like concat('%',#{dto.residence
Address},'%')
<if
test=
"dto.
installAddress != null and dto.install
Address != ''"
>
and hp
l.install_address like concat('%',#{dto.install
Address},'%')
</if>
<if
test=
"dto.number != null and dto.number != ''"
>
and hp.number like concat('%',#{dto.number},'%')
...
...
@@ -76,6 +78,7 @@
and hp.biz_org_code like concat('%',#{dto.bizOrgCode},'%')
</if>
</where>
order by hp.rec_date desc
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/HouseholdPvController.java
View file @
707bd684
...
...
@@ -61,6 +61,13 @@ public class HouseholdPvController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增户用光伏表"
,
notes
=
"新增户用光伏表"
)
public
ResponseModel
<
HouseholdPvDto
>
save
(
@RequestBody
HouseholdPvDto
model
)
{
Integer
count
=
householdPvServiceImpl
.
countRepeat
(
model
,
"add"
);
if
(
count
>
0
){
ResponseModel
<
HouseholdPvDto
>
result
=
new
ResponseModel
<>();
result
.
setStatus
(
500
);
result
.
setMessage
(
"户号已经存在"
);
return
result
;
}
model
=
householdPvServiceImpl
.
save
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
@@ -76,6 +83,13 @@ public class HouseholdPvController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新户用光伏表"
,
notes
=
"根据sequenceNbr更新户用光伏表"
)
public
ResponseModel
<
HouseholdPvDto
>
updateBySequenceNbrHouseholdPv
(
@RequestBody
HouseholdPvDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
Integer
count
=
householdPvServiceImpl
.
countRepeat
(
model
,
"upd"
);
if
(
count
>
0
){
ResponseModel
<
HouseholdPvDto
>
result
=
new
ResponseModel
<>();
result
.
setStatus
(
500
);
result
.
setMessage
(
"户号已经存在"
);
return
result
;
}
return
ResponseHelper
.
buildResponse
(
householdPvServiceImpl
.
update
(
model
));
}
...
...
@@ -175,31 +189,32 @@ public class HouseholdPvController extends BaseController {
int
lastRowNum
=
sheet
.
getLastRowNum
()
+
1
;
Row
row
=
sheet
.
createRow
((
short
)
(
lastRowNum
));
row
.
createCell
(
0
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getPlatformCompanyId
())
?
""
:
item
.
getPlatformCompanyId
());
row
.
createCell
(
1
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getNumber
())
?
""
:
item
.
getNumber
());
row
.
createCell
(
2
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getName
())
?
""
:
item
.
getName
());
row
.
createCell
(
3
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getSex
())
?
""
:
item
.
getSex
());
row
.
createCell
(
4
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getIdNumber
())
?
""
:
item
.
getIdNumber
());
row
.
createCell
(
5
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getExpiryTime
())
?
""
:
item
.
getExpiryTime
());
row
.
createCell
(
6
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getIssuingAuthority
())
?
""
:
item
.
getIssuingAuthority
());
row
.
createCell
(
7
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getResidenceAddress
())
?
""
:
item
.
getResidenceAddress
());
row
.
createCell
(
8
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getPhone
())
?
""
:
item
.
getPhone
());
row
.
createCell
(
9
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getAddress
())
?
""
:
item
.
getAddress
());
row
.
createCell
(
10
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getPostcode
())
?
""
:
item
.
getPostcode
());
row
.
createCell
(
11
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getServiceAddress
())
?
""
:
item
.
getServiceAddress
());
row
.
createCell
(
12
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getContactNumber
())
?
""
:
item
.
getContactNumber
());
row
.
createCell
(
13
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getPeriod
())
?
""
:
item
.
getPeriod
());
row
.
createCell
(
14
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getDescription
())
?
""
:
item
.
getDescription
());
row
.
createCell
(
15
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getEquipmentMessage
())
?
""
:
item
.
getEquipmentMessage
());
row
.
createCell
(
16
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallAddress
())
?
""
:
item
.
getInstallAddress
());
row
.
createCell
(
17
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallDate
())
?
""
:
item
.
getInstallDate
());
row
.
createCell
(
18
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getEstimatedPower
())
?
""
:
item
.
getEstimatedPower
());
row
.
createCell
(
19
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getMonolithicPower
())
?
""
:
item
.
getMonolithicPower
());
row
.
createCell
(
20
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallCount
())
?
""
:
item
.
getInstallCount
());
row
.
createCell
(
21
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getActualCapacity
())
?
""
:
item
.
getActualCapacity
());
row
.
createCell
(
22
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getStationType
())
?
""
:
item
.
getStationType
());
row
.
createCell
(
23
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getModuleType
())
?
""
:
item
.
getModuleType
());
row
.
createCell
(
24
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallStation
())
?
""
:
item
.
getInstallStation
());
row
.
createCell
(
25
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallDescription
())
?
""
:
item
.
getInstallDescription
());
row
.
createCell
(
1
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getDistrictId
())
?
""
:
item
.
getDistrictId
());
row
.
createCell
(
2
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getNumber
())
?
""
:
item
.
getNumber
());
row
.
createCell
(
3
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getName
())
?
""
:
item
.
getName
());
row
.
createCell
(
4
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getSex
())
?
""
:
item
.
getSex
());
row
.
createCell
(
5
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getIdNumber
())
?
""
:
item
.
getIdNumber
());
row
.
createCell
(
6
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getExpiryTime
())
?
""
:
item
.
getExpiryTime
());
row
.
createCell
(
7
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getIssuingAuthority
())
?
""
:
item
.
getIssuingAuthority
());
row
.
createCell
(
8
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getResidenceAddress
())
?
""
:
item
.
getResidenceAddress
());
row
.
createCell
(
9
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getPhone
())
?
""
:
item
.
getPhone
());
row
.
createCell
(
10
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getAddress
())
?
""
:
item
.
getAddress
());
row
.
createCell
(
11
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getPostcode
())
?
""
:
item
.
getPostcode
());
row
.
createCell
(
12
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getServiceAddress
())
?
""
:
item
.
getServiceAddress
());
row
.
createCell
(
13
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getContactNumber
())
?
""
:
item
.
getContactNumber
());
row
.
createCell
(
14
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getPeriod
())
?
""
:
item
.
getPeriod
());
row
.
createCell
(
15
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getDescription
())
?
""
:
item
.
getDescription
());
row
.
createCell
(
16
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getEquipmentMessage
())
?
""
:
item
.
getEquipmentMessage
());
row
.
createCell
(
17
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallAddress
())
?
""
:
item
.
getInstallAddress
());
row
.
createCell
(
18
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallDate
())
?
""
:
item
.
getInstallDate
());
row
.
createCell
(
19
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getEstimatedPower
())
?
""
:
item
.
getEstimatedPower
());
row
.
createCell
(
20
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getMonolithicPower
())
?
""
:
item
.
getMonolithicPower
());
row
.
createCell
(
21
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallCount
())
?
""
:
item
.
getInstallCount
());
row
.
createCell
(
22
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getActualCapacity
())
?
""
:
item
.
getActualCapacity
());
row
.
createCell
(
23
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getStationType
())
?
""
:
item
.
getStationType
());
row
.
createCell
(
24
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getModuleType
())
?
""
:
item
.
getModuleType
());
row
.
createCell
(
25
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallStation
())
?
""
:
item
.
getInstallStation
());
row
.
createCell
(
26
).
setCellValue
(
ObjectUtils
.
isEmpty
(
item
.
getInstallDescription
())
?
""
:
item
.
getInstallDescription
());
});
response
.
setCharacterEncoding
(
"UTF-8"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/HouseholdPvDistrictController.java
View file @
707bd684
...
...
@@ -131,8 +131,8 @@ public class HouseholdPvDistrictController extends BaseController {
@GetMapping
(
value
=
"/getBusinessTree"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"厂站树"
,
notes
=
"厂站树"
)
public
ResponseModel
<
Object
>
getBusinessTree
()
{
return
ResponseHelper
.
buildResponse
(
householdPvDistrictService
.
getBusinessTree
());
public
ResponseModel
<
Object
>
getBusinessTree
(
@RequestParam
(
"platformCompanyId"
)
Long
parentId
)
{
return
ResponseHelper
.
buildResponse
(
householdPvDistrictService
.
getBusinessTree
(
parentId
));
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HouseholdPvDistrictServiceImpl.java
View file @
707bd684
...
...
@@ -25,6 +25,7 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -133,11 +134,30 @@ public class HouseholdPvDistrictServiceImpl extends BaseService<HouseholdPvDistr
}
@Override
public
List
<
CompanyTreeDto
>
getBusinessTree
()
{
List
<
CompanyTreeDto
>
list
=
householdPvDistrictMapper
.
getList
();
public
List
<
CompanyTreeDto
>
getBusinessTree
(
Long
parentId
)
{
String
orgCode
=
getOrgCode
(
parentId
);
if
(
ObjectUtils
.
isEmpty
(
orgCode
)){
return
new
ArrayList
<>();
}
List
<
CompanyTreeDto
>
list
=
householdPvDistrictMapper
.
getListByParentId
(
orgCode
,
parentId
);
return
list
.
stream
().
filter
(
a
->
list
.
stream
().
noneMatch
(
c
->
c
.
getId
().
equals
(
a
.
getParentId
()))).
peek
(
b
->
b
.
setChildren
(
getCompanyBuildingChildrenTree
(
b
.
getId
(),
list
))).
collect
(
Collectors
.
toList
());
}
private
String
getOrgCode
(
Long
platformCompanyId
)
{
String
bizOrgCode
=
null
;
HouseholdPvDistrict
parentDetail
=
householdPvDistrictMapper
.
selectById
(
platformCompanyId
);
if
(
ObjectUtils
.
isEmpty
(
parentDetail
))
{
FeignClientResult
<
CompanyModel
>
companyModelFeignClientResult
=
Privilege
.
companyClient
.
seleteOne
(
platformCompanyId
);
CompanyModel
result
=
companyModelFeignClientResult
.
getResult
();
if
(!
ObjectUtils
.
isEmpty
(
result
)
&&
!
ObjectUtils
.
isEmpty
(
result
.
getLevel
())
&&
"station"
.
equals
(
result
.
getLevel
()))
{
bizOrgCode
=
result
.
getOrgCode
();
}
}
else
{
bizOrgCode
=
parentDetail
.
getBizOrgCode
();
}
return
bizOrgCode
;
}
private
void
change
(
Collection
<
UserOrgTreeModel
>
data
,
List
<
CompanyTreeDto
>
result
)
{
data
.
forEach
(
item
->
{
CompanyTreeDto
dto
=
new
CompanyTreeDto
();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HouseholdPvServiceImpl.java
View file @
707bd684
...
...
@@ -141,7 +141,7 @@ public class HouseholdPvServiceImpl extends BaseService<HouseholdPvDto, Househol
householdPv
.
setBizOrgCode
(
getOrgCode
(
householdPv
.
getPlatformCompanyId
()));
}
}
// 所属
区域
// 所属
乡镇
if
(!
ObjectUtils
.
isEmpty
(
item
.
getDistrictId
()))
{
if
(
map
.
containsKey
(
item
.
getDistrictId
()))
{
householdPv
.
setDistrictId
(
Long
.
parseLong
(
String
.
valueOf
(
map
.
get
(
item
.
getDistrictId
()))));
...
...
@@ -182,6 +182,7 @@ public class HouseholdPvServiceImpl extends BaseService<HouseholdPvDto, Househol
Map
<
String
,
Object
>
companyMap
=
companyList
();
List
<
HouseholdPvExport
>
householdPvExports
=
householdPvMapper
.
selectExportList
(
dto
,
ids
);
householdPvExports
.
forEach
(
item
->
{
// 所属场站
if
(!
ObjectUtils
.
isEmpty
(
item
.
getPlatformCompanyId
()))
{
if
(
companyMap
.
containsKey
(
item
.
getPlatformCompanyId
()))
{
item
.
setPlatformCompanyId
(
companyMap
.
get
(
item
.
getPlatformCompanyId
()).
toString
());
...
...
@@ -189,6 +190,22 @@ public class HouseholdPvServiceImpl extends BaseService<HouseholdPvDto, Househol
item
.
setPlatformCompanyId
(
""
);
}
}
// 乡镇
if
(!
ObjectUtils
.
isEmpty
(
item
.
getDistrictId
()))
{
if
(
companyMap
.
containsKey
(
item
.
getDistrictId
()))
{
item
.
setDistrictId
(
companyMap
.
get
(
item
.
getDistrictId
()).
toString
());
}
else
{
item
.
setDistrictId
(
""
);
}
}
// 安装信息-所属场站
if
(!
ObjectUtils
.
isEmpty
(
item
.
getInstallStation
()))
{
if
(
companyMap
.
containsKey
(
item
.
getInstallStation
()))
{
item
.
setInstallStation
(
companyMap
.
get
(
item
.
getInstallStation
()).
toString
());
}
else
{
item
.
setInstallStation
(
""
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
item
.
getPeriod
()))
{
JSONArray
objects
=
JSON
.
parseArray
(
item
.
getPeriod
());
if
(!
ObjectUtils
.
isEmpty
(
objects
)
&&
objects
.
size
()
>=
2
)
{
...
...
@@ -299,6 +316,16 @@ public class HouseholdPvServiceImpl extends BaseService<HouseholdPvDto, Househol
}
@Override
public
Integer
countRepeat
(
HouseholdPvDto
householdPvDto
,
String
type
)
{
LambdaQueryWrapper
<
HouseholdPv
>
lambda
=
new
QueryWrapper
<
HouseholdPv
>().
lambda
();
lambda
.
eq
(
HouseholdPv:
:
getNumber
,
householdPvDto
.
getNumber
());
if
(
"upd"
.
equals
(
type
)){
lambda
.
ne
(
HouseholdPv:
:
getSequenceNbr
,
householdPvDto
.
getSequenceNbr
());
}
return
householdPvMapper
.
selectCount
(
lambda
);
}
@Override
public
HouseholdPvDto
getBySeq
(
Long
id
)
{
HouseholdPv
householdPv
=
this
.
getById
(
id
);
HouseholdPvDto
householdPvDto
=
new
HouseholdPvDto
();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/resources/templates/householdExport.xls
View file @
707bd684
No preview for this file type
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/resources/templates/householdTemplates.xls
View file @
707bd684
No preview for this file type
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