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
f38f4cac
Commit
f38f4cac
authored
Nov 08, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计bug修改
parent
379aa2b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
394 additions
and
391 deletions
+394
-391
StatisicsHomePageEnum.java
...amos/boot/module/hygf/api/Enum/StatisicsHomePageEnum.java
+36
-35
StatisticsHomepageMapper.xml
.../main/resources/mapper/mysql/StatisticsHomepageMapper.xml
+1
-0
PeasantHouseholdController.java
...odule/hygf/biz/controller/PeasantHouseholdController.java
+8
-8
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+330
-329
StatisticsHomepageServiceImpl.java
.../hygf/biz/service/impl/StatisticsHomepageServiceImpl.java
+19
-19
homePageExport.xlsx
...hygf-biz/src/main/resources/templates/homePageExport.xlsx
+0
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/StatisicsHomePageEnum.java
View file @
f38f4cac
...
...
@@ -14,41 +14,42 @@ public enum StatisicsHomePageEnum {
项目公司
(
"regionalCompaniesName"
,
2
),
代理商
(
"developerName"
,
3
),
实际建设容量
(
"realScale"
,
4
),
勘察未通过
(
"kcwtg"
,
5
),
勘察未通过容量
(
"kcwtgrl"
,
6
),
勘察进行中
(
"kcjxz"
,
7
),
勘察进行中容量
(
"kcjxzrl"
,
8
),
勘察已完成
(
"kcywc"
,
9
),
勘察已完成容量
(
"kcywcrl"
,
10
),
备货未通过
(
"bhwtg"
,
11
),
备货未通过容量
(
"bhwtgrl"
,
12
),
备货进行中
(
"bhjxz"
,
13
),
备货进行中容量
(
"bhjxzrl"
,
14
),
备货已完成
(
"bhywc"
,
15
),
备货已完成容量
(
"bhywcrl"
,
16
),
施工未通过
(
"sgwtg"
,
17
),
施工未通过容量
(
"sgwtgrl"
,
18
),
施工进行中
(
"sgjxz"
,
19
),
施工进行中容量
(
"sgjxzrl"
,
20
),
施工已完成
(
"sgywc"
,
21
),
施工已完成容量
(
"sgywcrl"
,
22
),
并网未通过
(
"bwwtg"
,
23
),
并网未通过容量
(
"bwwtgrl"
,
24
),
并网进行中
(
"bwjxz"
,
25
),
并网进行中容量
(
"bwjxzrl"
,
26
),
并网已完成
(
"bwywc"
,
27
),
并网已完成容量
(
"bwywcrl"
,
28
),
验收未通过
(
"yswtg"
,
29
),
验收未通过容量
(
"yswtgrl"
,
30
),
验收进行中
(
"ysjxz"
,
31
),
验收进行中容量
(
"ysjxzrl"
,
32
),
验收已完成
(
"ysywc"
,
33
),
验收已完成容量
(
"ysywcrl"
,
34
),
融资公司
(
"rzgs"
,
35
),
融资户数
(
"rzhs"
,
36
),
融资容量
(
"rzrl"
,
37
),
融资单价
(
"rzdj"
,
38
),
放款金额
(
"fkje"
,
39
);
未勘察
(
"wkc"
,
5
),
勘察未通过
(
"kcwtg"
,
6
),
勘察未通过容量
(
"kcwtgrl"
,
7
),
勘察进行中
(
"kcjxz"
,
8
),
勘察进行中容量
(
"kcjxzrl"
,
9
),
勘察已完成
(
"kcywc"
,
10
),
勘察已完成容量
(
"kcywcrl"
,
11
),
备货未通过
(
"bhwtg"
,
12
),
备货未通过容量
(
"bhwtgrl"
,
13
),
备货进行中
(
"bhjxz"
,
14
),
备货进行中容量
(
"bhjxzrl"
,
15
),
备货已完成
(
"bhywc"
,
16
),
备货已完成容量
(
"bhywcrl"
,
17
),
施工未通过
(
"sgwtg"
,
18
),
施工未通过容量
(
"sgwtgrl"
,
19
),
施工进行中
(
"sgjxz"
,
20
),
施工进行中容量
(
"sgjxzrl"
,
21
),
施工已完成
(
"sgywc"
,
22
),
施工已完成容量
(
"sgywcrl"
,
23
),
并网未通过
(
"bwwtg"
,
24
),
并网未通过容量
(
"bwwtgrl"
,
25
),
并网进行中
(
"bwjxz"
,
26
),
并网进行中容量
(
"bwjxzrl"
,
27
),
并网已完成
(
"bwywc"
,
28
),
并网已完成容量
(
"bwywcrl"
,
29
),
验收未通过
(
"yswtg"
,
30
),
验收未通过容量
(
"yswtgrl"
,
31
),
验收进行中
(
"ysjxz"
,
32
),
验收进行中容量
(
"ysjxzrl"
,
33
),
验收已完成
(
"ysywc"
,
34
),
验收已完成容量
(
"ysywcrl"
,
35
),
融资公司
(
"rzgs"
,
36
),
融资户数
(
"rzhs"
,
37
),
融资容量
(
"rzrl"
,
38
),
融资单价
(
"rzdj"
,
39
),
放款金额
(
"fkje"
,
40
);
/**
* 名称,描述
*/
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/StatisticsHomepageMapper.xml
View file @
f38f4cac
...
...
@@ -384,6 +384,7 @@
ph.regional_companies_name AS regionalCompaniesName,
ph.developer_name AS developerName,
ROUND(COALESCE(SUM(IFNULL(ei.real_scale, 0))/1000, 0), 2) AS realScale,
SUM(CASE WHEN ph.construction_state = '待勘察' THEN 1 ELSE 0 END) AS wkc,
SUM(CASE WHEN ps.process_status = '不通过' THEN 1 ELSE 0 END) AS kcwtg,
'' AS kcwtgrl,
SUM(CASE WHEN ps.process_status = '进行中' THEN 1 ELSE 0 END) AS kcjxz,
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdController.java
View file @
f38f4cac
...
...
@@ -305,14 +305,14 @@ public class PeasantHouseholdController extends BaseController {
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
deleteUser
(
sequenceNbr
,
peasantHouseholdNo
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新详情信息"
,
notes
=
"更新详情信息"
)
@PostMapping
(
value
=
"/saveHistory"
)
public
ResponseModel
updateDetail
(
@RequestBody
PowerStationEngineeringInfoAllDto
powerStationEngineeringInfoAllDto
,
@RequestParam
(
value
=
"operationType"
)
String
operationType
)
{
peasantHouseholdServiceImpl
.
saveHistoryPeasantHousehold
(
powerStationEngineeringInfoAllDto
,
operationType
);
return
ResponseHelper
.
buildResponse
(
null
);
}
//
@TycloudOperation(ApiLevel = UserType.AGENCY)
//
@ApiOperation(httpMethod = "POST",value = "更新详情信息", notes = "更新详情信息")
//
@PostMapping(value = "/saveHistory")
//
public ResponseModel updateDetail(@RequestBody PowerStationEngineeringInfoAllDto powerStationEngineeringInfoAllDto,@RequestParam(value = "operationType") String operationType) {
//
//
peasantHouseholdServiceImpl.saveHistoryPeasantHousehold(powerStationEngineeringInfoAllDto,operationType);
//
return ResponseHelper.buildResponse(null);
//
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
View file @
f38f4cac
...
...
@@ -102,8 +102,8 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
@Autowired
RegionalCompaniesMapper
regionalCompaniesMapper
;
private
Long
TOKEN_TIME
=
1209600
l
;
@Autowired
CommonServiceImpl
commonService
;
//
@Autowired
//
CommonServiceImpl commonService;
@Autowired
HygfOnGridServiceImpl
hygfOnGridService
;
@Autowired
...
...
@@ -1015,344 +1015,344 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
return
peasantHouseholdIPage
;
}
public
void
saveHistoryPeasantHousehold
(
PowerStationEngineeringInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
SurveyInformationDto
model
=
surveyInfoAllDto
.
getSurveyInformation
();
if
(
null
==
model
.
getDeveloperId
()||
null
==
model
.
getRegionalCompaniesSeq
()){
throw
new
BadRequest
(
"区域公司及经销商不可为空"
);
}
if
(
null
==
model
.
getTelephone
()){
throw
new
BadRequest
(
"联系电话不可为空"
);
}
if
(
null
==
model
.
getOwnersName
()){
throw
new
BadRequest
(
"业主姓名不可为空"
);
}
if
(
null
==
model
.
getIdCard
()){
throw
new
BadRequest
(
"身份证号码不可为空"
);
}
if
(
null
==
model
.
getIdCardFront
()||
null
==
model
.
getIdCardOpposite
()){
throw
new
BadRequest
(
"身份证图片不可为空"
);
}
if
(
null
==
model
.
getPermanentAddress
()){
throw
new
BadRequest
(
"常住地址不可为空"
);
}
if
(
null
==
model
.
getPermanentAddressDetail
()){
throw
new
BadRequest
(
"常住详细地址不可为空"
);
}
if
(
null
==
model
.
getProjectAddress
()){
throw
new
BadRequest
(
"项目地址不可为空"
);
}
if
(
null
==
model
.
getProjectAddressDetail
()){
throw
new
BadRequest
(
"项目详细地址不可为空"
);
}
List
<
String
>
ids
=
new
ArrayList
<>();
ids
.
add
(
String
.
valueOf
(
model
.
getDeveloperId
()));
ids
.
add
(
String
.
valueOf
(
model
.
getRegionalCompaniesSeq
()));
// MobileLoginParamDto mobileLoginParamDto = new MobileLoginParamDto();
// mobileLoginParamDto.setPhoneNo(model.getTelephone());
// // 机器人token
// RequestContext.setAppKey("AMOS_STUDIO");
// RequestContext.setProduct("AMOS_STUDIO_WEB");
// RequestContext.setToken(requestContext.getToken());
// AgencyUserModel registerUserModel = null;
// // region 判断有无在平台内部注册过用户 没有注册则去平台注册
// FeignClientResult<LoginInfoModel> loginInfo = Privilege.agencyUserClient.getLoginInfo(mobileLoginParamDto.getPhoneNo());
// public void saveHistoryPeasantHousehold(PowerStationEngineeringInfoAllDto surveyInfoAllDto,String operationType) {
//
// if (loginInfo != null && 200 == loginInfo.getStatus()) {
// LoginInfoModel loginInfoModel = loginInfo.getResult();
// if (loginInfoModel == null || !StringUtils.isNotBlank(loginInfoModel.getLoginId())) {
// FeignClientResult<AgencyUserModel> registerUserModelRestult = doRegister(mobileLoginParamDto);
// if (registerUserModelRestult == null || registerUserModelRestult.getStatus() != 200) {
// log.error("用户手机号码 => " + mobileLoginParamDto.getPhoneNo() + " 调用平台创建用户信息失败: " + registerUserModelRestult.getDevMessage());
// throw new RuntimeException(registerUserModelRestult.getMessage());
// SurveyInformationDto model = surveyInfoAllDto.getSurveyInformation();
// if (null == model.getDeveloperId()|| null == model.getRegionalCompaniesSeq()){
// throw new BadRequest("区域公司及经销商不可为空");
// }
// if (null == model.getTelephone()){
// throw new BadRequest("联系电话不可为空");
// }
// if (null == model.getOwnersName()){
// throw new BadRequest("业主姓名不可为空");
// }
// if (null == model.getIdCard()){
// throw new BadRequest("身份证号码不可为空");
// }
// if (null == model.getIdCardFront()|| null == model.getIdCardOpposite()){
// throw new BadRequest("身份证图片不可为空");
// }
// if (null == model.getPermanentAddress()){
// throw new BadRequest("常住地址不可为空");
// }
// if ( null == model.getPermanentAddressDetail()){
// throw new BadRequest("常住详细地址不可为空");
// }
// if (null == model.getProjectAddress()){
// throw new BadRequest("项目地址不可为空");
// }
// if (null == model.getProjectAddressDetail()){
// throw new BadRequest("项目详细地址不可为空");
// }
//
//
// List<String> ids = new ArrayList<>();
// ids.add(String.valueOf(model.getDeveloperId()));
// ids.add(String.valueOf(model.getRegionalCompaniesSeq()));
//// MobileLoginParamDto mobileLoginParamDto = new MobileLoginParamDto();
//// mobileLoginParamDto.setPhoneNo(model.getTelephone());
//// // 机器人token
//// RequestContext.setAppKey("AMOS_STUDIO");
//// RequestContext.setProduct("AMOS_STUDIO_WEB");
//// RequestContext.setToken(requestContext.getToken());
//// AgencyUserModel registerUserModel = null;
//// // region 判断有无在平台内部注册过用户 没有注册则去平台注册
//// FeignClientResult<LoginInfoModel> loginInfo = Privilege.agencyUserClient.getLoginInfo(mobileLoginParamDto.getPhoneNo());
////
//// if (loginInfo != null && 200 == loginInfo.getStatus()) {
//// LoginInfoModel loginInfoModel = loginInfo.getResult();
//// if (loginInfoModel == null || !StringUtils.isNotBlank(loginInfoModel.getLoginId())) {
//// FeignClientResult<AgencyUserModel> registerUserModelRestult = doRegister(mobileLoginParamDto);
//// if (registerUserModelRestult == null || registerUserModelRestult.getStatus() != 200) {
//// log.error("用户手机号码 => " + mobileLoginParamDto.getPhoneNo() + " 调用平台创建用户信息失败: " + registerUserModelRestult.getDevMessage());
//// throw new RuntimeException(registerUserModelRestult.getMessage());
//// }
//// registerUserModel = registerUserModelRestult.getResult();
//// }
//// }
//
//
//
//
//
// // 更新勘察基本信息
//
//
// //新增农户电站信息
// SurveyInformation surveyInformation = BeanDtoUtils.convert(model,
// SurveyInformation.class);
// surveyInformation.setSurveyNumber(Optional.ofNullable(surveyInformation).map(SurveyInformation::getSurveyNumber).orElse(this.getkcNo(model.getRegionalCompaniesSeq())));
// PeasantHousehold peasantHousehold = new PeasantHousehold();
// if (model.getSequenceNbr() != null ){
// peasantHousehold.setSequenceNbr(model.getPeasantHouseholdId());
// }
// if (model.getPeasantHouseholdNo() == null ){
// peasantHousehold.setPeasantHouseholdNo(this.getPeasantHouseholdNo(model.getRegionalCompaniesSeq()));
// }
// surveyInformationServiceImpl.saveOrUpdate(surveyInformation);
//
//
//
// peasantHousehold.setIsCertified(1);
// peasantHousehold.setIsHistory("1");
// peasantHousehold.setReview(2);
// peasantHousehold.setSurveyInformationId(surveyInformation.getSequenceNbr());
// if (operationType.equals("apply")){
// peasantHousehold.setConstructionState("验收完成");
// peasantHousehold.setPreparationMoneyState("建档完成");
// if (peasantHousehold.getSequenceNbr() != null ){
// //完成后需对投融数据进行处理。
// LambdaUpdateWrapper<FinancingInfo> wrapper = new LambdaUpdateWrapper<>();
// wrapper.eq(FinancingInfo::getPeasantHouseholdId,peasantHousehold.getSequenceNbr());
// wrapper.set(FinancingInfo::getStatus,"待推送");
// financingInfoService.update(null,wrapper);
//
// LambdaQueryWrapper<FinancingAuditing> finQuery = new LambdaQueryWrapper<>();
// finQuery.eq(FinancingAuditing::getPeasantHouseholdId,peasantHousehold.getSequenceNbr());
// finQuery.orderByDesc(BaseEntity::getRecDate);
// finQuery.last("limit 1");
// FinancingAuditing financingAuditing = financingAuditingService.getBaseMapper().selectOne(finQuery);
// if (!Objects.isNull(financingAuditing)){
// financingInfoService.execueFlow(MapBuilder.<String,Object>create().put("instanceId",financingAuditing.getInstanceId()).put("approvalStatus","0").put("isZG","1").build());
// }
// registerUserModel = registerUserModelRestult.getResult();
// }
//
// }else {
// if (null !=peasantHousehold.getSequenceNbr() ){
// PeasantHousehold peasantHousehold1 = this.getBaseMapper().selectById(peasantHousehold.getSequenceNbr());
// if (peasantHousehold1.getPreparationMoneyState().equals("待提交")){
// }else {
// peasantHousehold.setPreparationMoneyState("暂存中");
// }
// }else {
// peasantHousehold.setPreparationMoneyState("暂存中");
// }
// }
// 更新勘察基本信息
//新增农户电站信息
SurveyInformation
surveyInformation
=
BeanDtoUtils
.
convert
(
model
,
SurveyInformation
.
class
);
surveyInformation
.
setSurveyNumber
(
Optional
.
ofNullable
(
surveyInformation
).
map
(
SurveyInformation:
:
getSurveyNumber
).
orElse
(
this
.
getkcNo
(
model
.
getRegionalCompaniesSeq
())));
PeasantHousehold
peasantHousehold
=
new
PeasantHousehold
();
if
(
model
.
getSequenceNbr
()
!=
null
){
peasantHousehold
.
setSequenceNbr
(
model
.
getPeasantHouseholdId
());
}
if
(
model
.
getPeasantHouseholdNo
()
==
null
){
peasantHousehold
.
setPeasantHouseholdNo
(
this
.
getPeasantHouseholdNo
(
model
.
getRegionalCompaniesSeq
()));
}
surveyInformationServiceImpl
.
saveOrUpdate
(
surveyInformation
);
peasantHousehold
.
setIsCertified
(
1
);
peasantHousehold
.
setIsHistory
(
"1"
);
peasantHousehold
.
setReview
(
2
);
peasantHousehold
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
if
(
operationType
.
equals
(
"apply"
)){
peasantHousehold
.
setConstructionState
(
"验收完成"
);
peasantHousehold
.
setPreparationMoneyState
(
"建档完成"
);
if
(
peasantHousehold
.
getSequenceNbr
()
!=
null
){
//完成后需对投融数据进行处理。
LambdaUpdateWrapper
<
FinancingInfo
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
peasantHousehold
.
getSequenceNbr
());
wrapper
.
set
(
FinancingInfo:
:
getStatus
,
"待推送"
);
financingInfoService
.
update
(
null
,
wrapper
);
LambdaQueryWrapper
<
FinancingAuditing
>
finQuery
=
new
LambdaQueryWrapper
<>();
finQuery
.
eq
(
FinancingAuditing:
:
getPeasantHouseholdId
,
peasantHousehold
.
getSequenceNbr
());
finQuery
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
finQuery
.
last
(
"limit 1"
);
FinancingAuditing
financingAuditing
=
financingAuditingService
.
getBaseMapper
().
selectOne
(
finQuery
);
if
(!
Objects
.
isNull
(
financingAuditing
)){
financingInfoService
.
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"instanceId"
,
financingAuditing
.
getInstanceId
()).
put
(
"approvalStatus"
,
"0"
).
put
(
"isZG"
,
"1"
).
build
());
}
}
}
else
{
if
(
null
!=
peasantHousehold
.
getSequenceNbr
()
){
PeasantHousehold
peasantHousehold1
=
this
.
getBaseMapper
().
selectById
(
peasantHousehold
.
getSequenceNbr
());
if
(
peasantHousehold1
.
getPreparationMoneyState
().
equals
(
"待提交"
)){
}
else
{
peasantHousehold
.
setPreparationMoneyState
(
"暂存中"
);
}
}
else
{
peasantHousehold
.
setPreparationMoneyState
(
"暂存中"
);
}
}
// peasantHousehold.setAmosUserId(registerUserModel.getUserId());
peasantHousehold
.
setTelephone
(
model
.
getTelephone
());
peasantHousehold
.
setCreationTime
(
new
Date
());
List
<
Map
<
String
,
Object
>>
maps
=
financingInfoService
.
getBaseMapper
().
selectCompany
(
ids
);
UnitInfo
unitInfo
=
unitInfoService
.
getBaseMapper
().
selectById
(
model
.
getDeveloperId
());
if
(
unitInfo
!=
null
){
peasantHousehold
.
setDeveloperCode
(
unitInfo
.
getAmosCompanyCode
());
// 开发方code
peasantHousehold
.
setDeveloperId
(
unitInfo
.
getAmosCompanySeq
());
// 开发方id
peasantHousehold
.
setDeveloperName
(
unitInfo
.
getName
());
// 开发方名称
// peasantHousehold.setDeveloper();// 开发人
// peasantHousehold.setDeveloperUserId();
}
maps
.
stream
().
forEach
(
e
->{
if
(
String
.
valueOf
(
e
.
get
(
"SEQUENCE_NBR"
))
.
equals
(
String
.
valueOf
(
model
.
getRegionalCompaniesSeq
()))){
peasantHousehold
.
setRegionalCompaniesCode
(
e
.
get
(
"ORG_CODE"
).
toString
());
// 开发方code
peasantHousehold
.
setRegionalCompaniesSeq
(
model
.
getRegionalCompaniesSeq
());
// 开发方id
peasantHousehold
.
setRegionalCompaniesName
(
e
.
get
(
"COMPANY_NAME"
).
toString
());
// 开发方名称
}
});
// PeasantHouseholdDto peasantHouseholdDto = buildDefaultPeasantHouseholdDto(wxDTO.getAmosUserId(), wxDTO.getQrCodeType(), wxDTO.getPhoneNo());
//
// peasantHousehold.setRegionalCompaniesSeq(Optional.ofNullable(peasantHouseholdDto).map(PeasantHouseholdDto::getRegionalCompaniesSeq).orElse(null));
// peasantHousehold.setRegionalCompaniesCode(Optional.ofNullable(peasantHouseholdDto).map(PeasantHouseholdDto::getRegionalCompaniesCode).orElse(null));
// peasantHousehold.setRegionalCompaniesName(Optional.ofNullable(peasantHouseholdDto).map(PeasantHouseholdDto::getRegionalCompaniesName).orElse(null));
// peasantHousehold.setIsCertified(1);// 这里就实名认证
peasantHousehold
.
setSurveyOrNot
(
3
);
peasantHousehold
.
setReview
(
2
);
JSONArray
regionName
=
commonService
.
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
// // peasantHousehold.setAmosUserId(registerUserModel.getUserId());
// peasantHousehold.setTelephone(model.getTelephone());
// peasantHousehold.setCreationTime(new Date());
//
// List<Map<String, Object>> maps = financingInfoService.getBaseMapper().selectCompany(ids);
// UnitInfo unitInfo = unitInfoService.getBaseMapper().selectById(model.getDeveloperId());
// if (unitInfo != null){
// peasantHousehold.setDeveloperCode(unitInfo.getAmosCompanyCode());// 开发方code
// peasantHousehold.setDeveloperId(unitInfo.getAmosCompanySeq());// 开发方id
// peasantHousehold.setDeveloperName(unitInfo.getName());// 开发方名称
// // peasantHousehold.setDeveloper();// 开发人
// // peasantHousehold.setDeveloperUserId();
// }
// maps.stream().forEach(e->{
//
// if (String.valueOf(e.get("SEQUENCE_NBR")) .equals(String.valueOf(model.getRegionalCompaniesSeq()))){
// peasantHousehold.setRegionalCompaniesCode(e.get("ORG_CODE").toString());// 开发方code
// peasantHousehold.setRegionalCompaniesSeq(model.getRegionalCompaniesSeq());// 开发方id
// peasantHousehold.setRegionalCompaniesName(e.get("COMPANY_NAME").toString());// 开发方名称
// }
//
// });
//
//// PeasantHouseholdDto peasantHouseholdDto = buildDefaultPeasantHouseholdDto(wxDTO.getAmosUserId(), wxDTO.getQrCodeType(), wxDTO.getPhoneNo());
////
//// peasantHousehold.setRegionalCompaniesSeq(Optional.ofNullable(peasantHouseholdDto).map(PeasantHouseholdDto::getRegionalCompaniesSeq).orElse(null));
//// peasantHousehold.setRegionalCompaniesCode(Optional.ofNullable(peasantHouseholdDto).map(PeasantHouseholdDto::getRegionalCompaniesCode).orElse(null));
//// peasantHousehold.setRegionalCompaniesName(Optional.ofNullable(peasantHouseholdDto).map(PeasantHouseholdDto::getRegionalCompaniesName).orElse(null));
//// peasantHousehold.setIsCertified(1);// 这里就实名认证
// peasantHousehold.setSurveyOrNot(3);
// peasantHousehold.setReview(2);
// JSONArray regionName = commonService.getRegionName();
// List<RegionModel> list = JSONArray.parseArray(regionName.toJSONString(), RegionModel.class);
//// // 处理项目地址
//// String area = "";
//// if (model.getProjectAddress() != null && model.getProjectAddress().size() != 0) {
//// for (Integer reg : model.getProjectAddress())
//// for (RegionModel re : list) {
//// if (re.getRegionCode().equals(Integer.valueOf(reg))) {
//// area = area + re.getRegionName() + "/";
//// }
//// }
//// model.setProjectAddressName(area.length() > 2 ? area.substring(0, area.length() - 1) : area);
//// if ("1".equals(model.getIsPermanent()) || "true".equals(model.getIsPermanent())) {
//// peasantHousehold.setPermanentAddress(model.getProjectAddress());
//// peasantHousehold.setPermanentAddressDetail(model.getProjectAddressDetail());
//// peasantHousehold.setPermanentAddressName(area.length() > 2 ? area.substring(0, area.length() - 1) : area);
//// } else {
//// // 处理常住地址
//// String permanent = "";
//// if (model.getPermanentAddress() != null && model.getPermanentAddress().size() != 0) {
//// for (Integer reg : model.getPermanentAddress())
//// for (RegionModel re : list) {
//// if (re.getRegionCode().equals(Integer.valueOf(reg))) {
//// permanent = permanent + re.getRegionName() + "/";
//// }
//// }
//// peasantHousehold.setPermanentAddressName(permanent.length() > 2 ? permanent.substring(0, permanent.length() - 1) : permanent);
//// }
//// }
//// }
//
//
//
//
//
// surveyInformation.setReview(0);
// surveyInformation.setCreatorTime(new Date());
// surveyInformationServiceImpl.saveOrUpdate(surveyInformation);
//
// // 更新扩展信息
// ExtendedInformation extendedInformation = BeanDtoUtils.convert(surveyInfoAllDto.getExtendedInformation(),
// ExtendedInformation.class);
// extendedInformation.setSurveyInformationId(surveyInformation.getSequenceNbr());
// // 避免生成多份数据
// extendedInformationService.saveOrUpdate(extendedInformation, new LambdaQueryWrapper<ExtendedInformation>()
// .eq(ExtendedInformation::getSurveyInformationId, surveyInformation.getSequenceNbr()));
// // extendedInformationService.saveOrUpdate(extendedInformation);
//
// // 更新勘察明细信息
// SurveyDetailsDto oldSurveyDetails = surveyInfoAllDto.getSurveyDetails();
// SurveyDetails surveyDetails = BeanDtoUtils.convert(oldSurveyDetails, SurveyDetails.class);
// surveyDetails.setSurveyInformationId(surveyInformation.getSequenceNbr());
// // 避免生成多份数据
// surveyDetailsService.saveOrUpdate(surveyDetails, new LambdaQueryWrapper<SurveyDetails>()
// .eq(SurveyDetails::getSurveyInformationId, surveyInformation.getSequenceNbr()));
// // surveyDetailsService.saveOrUpdate(surveyDetails);
//
// // 更新商务信息
// CommercialDto oldCommercial = surveyInfoAllDto.getCommercial();
// Commercial commercial = BeanDtoUtils.convert(oldCommercial, Commercial.class);
// // 处理省市县
// String paddressName = "";
// if (null != surveyInfoAllDto.getSurveyInformation().getProjectAddress()){
// for (Integer reg : surveyInfoAllDto.getSurveyInformation().getProjectAddress()) {
// for (RegionModel re : list) {
// if (re.getRegionCode().equals(Integer.valueOf(reg))) {
// paddressName = paddressName + re.getRegionName() + "/";
// }
// }
// }
// commercial.setProjectAddressName(paddressName.substring(0, paddressName.length() - 1));
// }
//
// commercial.setSurveyInformationId(surveyInformation.getSequenceNbr());
// // 避免生成多份数据
// commercialService.saveOrUpdate(commercial, new LambdaQueryWrapper<Commercial>()
// .eq(Commercial::getSurveyInformationId, surveyInformation.getSequenceNbr()));
// // commercialService.saveOrUpdate(commercial);
// // 勘察后,更新状态
// // QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new
// // QueryWrapper<>();
// // peasantHouseholdQueryWrapper.eq("survey_information_id",
// // surveyInformation.getSequenceNbr());
// // PeasantHousehold peasantHousehold =
// // peasantHouseholdServiceImpl.getBaseMapper()
// // .selectOne(peasantHouseholdQueryWrapper);
//
// // 更新资料归档信息
// Information information = BeanDtoUtils.convert(surveyInfoAllDto.getInformation(), Information.class);
// information.setHouseProve(null == commercial ? null
// : (CollectionUtil.isNotEmpty(commercial.getRealEstateLegal()) ? commercial.getRealEstateLegal()
// : null));
// information.setCardFile(null == commercial ? null
// : (CollectionUtil.isNotEmpty(commercial.getIdCardCredit()) ? commercial.getIdCardCredit() : null));
// information.setCardFile(commercial.getAgentLegal());
// information
// .setArchivesNumber(surveyInformationServiceImpl.getNo(CodeEnum.档案.getCode(), peasantHousehold.getRegionalCompaniesSeq()));
// information.setFileNumber(surveyInformationServiceImpl.getNo(CodeEnum.文件.getCode(), peasantHousehold.getRegionalCompaniesSeq()));
// information.setSurveyInformationId(surveyInformation.getSequenceNbr());
//
// // 避免生成多份数据
// informationService.saveOrUpdate(information, new LambdaQueryWrapper<Information>()
// .eq(Information::getSurveyInformationId, surveyInformation.getSequenceNbr()));
// // informationService.saveOrUpdate(information);
//
// peasantHousehold.setOwnersName(surveyInfoAllDto.getSurveyInformation().getOwnersName());
// peasantHousehold.setTelephone(surveyInfoAllDto.getSurveyInformation().getTelephone());
// peasantHousehold.setIdCard(surveyInfoAllDto.getSurveyInformation().getIdCard());
// peasantHousehold.setIdCardFront(model.getIdCardFront());
// peasantHousehold.setIdCardOpposite(model.getIdCardOpposite());
// peasantHousehold.setMailbox(surveyInfoAllDto.getSurveyInformation().getMailbox());
// peasantHousehold.setProjectAddress(surveyInfoAllDto.getSurveyInformation().getProjectAddress());
// peasantHousehold.setProjectAddressDetail(surveyInfoAllDto.getSurveyInformation().getProjectAddressDetail());
// peasantHousehold.setPermanentAddress(surveyInfoAllDto.getSurveyInformation().getPermanentAddress());
// peasantHousehold
// .setPermanentAddressDetail(surveyInfoAllDto.getSurveyInformation().getPermanentAddressDetail());
// peasantHousehold
// .setPermanentAddressDetail(surveyInfoAllDto.getSurveyInformation().getPermanentAddressDetail());
//
// // 处理项目地址
// String
area
= "";
// if (
model.getProjectAddress() != null && model.getProjectAddress().size() != 0)
{
// for (Integer reg :
model.getProjectAddress())
// String
projectAddressName
= "";
// if (
null != surveyInfoAllDto.getSurveyInformation().getProjectAddress())
{
// for (Integer reg :
surveyInfoAllDto.getSurveyInformation().getProjectAddress()) {
// for (RegionModel re : list) {
// if (re.getRegionCode().equals(Integer.valueOf(reg))) {
//
area = area
+ re.getRegionName() + "/";
//
projectAddressName = projectAddressName
+ re.getRegionName() + "/";
// }
// }
// model.setProjectAddressName(area.length() > 2 ? area.substring(0, area.length() - 1) : area);
// if ("1".equals(model.getIsPermanent()) || "true".equals(model.getIsPermanent())) {
// peasantHousehold.setPermanentAddress(model.getProjectAddress());
// peasantHousehold.setPermanentAddressDetail(model.getProjectAddressDetail());
// peasantHousehold.setPermanentAddressName(area.length() > 2 ? area.substring(0, area.length() - 1) : area);
// } else {
// // 处理常住地址
// String permanent = "";
// if (model.getPermanentAddress() != null && model.getPermanentAddress().size() != 0) {
// for (Integer reg : model.getPermanentAddress())
// for (RegionModel re : list) {
// if (re.getRegionCode().equals(Integer.valueOf(reg))) {
// permanent = permanent + re.getRegionName() + "/";
// }
// }
// peasantHousehold.setPermanentAddressName(permanent.length() > 2 ? permanent.substring(0, permanent.length() - 1) : permanent);
// }
// peasantHousehold.setProjectAddressName(projectAddressName.substring(0, projectAddressName.length() - 1));
// }
// if (null != surveyInfoAllDto.getSurveyInformation().getPermanentAddress()){
// // 常住地址
// String permanentAddressName = "";
// for (Integer reg : surveyInfoAllDto.getSurveyInformation().getPermanentAddress()) {
// for (RegionModel re : list) {
// if (re.getRegionCode().equals(Integer.valueOf(reg))) {
// permanentAddressName = permanentAddressName + re.getRegionName() + "/";
// }
// }
// }
// peasantHousehold
// .setPermanentAddressName(permanentAddressName.substring(0, permanentAddressName.length() - 1));
//
// }
surveyInformation
.
setReview
(
0
);
surveyInformation
.
setCreatorTime
(
new
Date
());
surveyInformationServiceImpl
.
saveOrUpdate
(
surveyInformation
);
// 更新扩展信息
ExtendedInformation
extendedInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getExtendedInformation
(),
ExtendedInformation
.
class
);
extendedInformation
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
// 避免生成多份数据
extendedInformationService
.
saveOrUpdate
(
extendedInformation
,
new
LambdaQueryWrapper
<
ExtendedInformation
>()
.
eq
(
ExtendedInformation:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
// extendedInformationService.saveOrUpdate(extendedInformation);
// 更新勘察明细信息
SurveyDetailsDto
oldSurveyDetails
=
surveyInfoAllDto
.
getSurveyDetails
();
SurveyDetails
surveyDetails
=
BeanDtoUtils
.
convert
(
oldSurveyDetails
,
SurveyDetails
.
class
);
surveyDetails
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
// 避免生成多份数据
surveyDetailsService
.
saveOrUpdate
(
surveyDetails
,
new
LambdaQueryWrapper
<
SurveyDetails
>()
.
eq
(
SurveyDetails:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
// surveyDetailsService.saveOrUpdate(surveyDetails);
// 更新商务信息
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
Commercial
commercial
=
BeanDtoUtils
.
convert
(
oldCommercial
,
Commercial
.
class
);
// 处理省市县
String
paddressName
=
""
;
if
(
null
!=
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
()){
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
paddressName
=
paddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
commercial
.
setProjectAddressName
(
paddressName
.
substring
(
0
,
paddressName
.
length
()
-
1
));
}
commercial
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
// 避免生成多份数据
commercialService
.
saveOrUpdate
(
commercial
,
new
LambdaQueryWrapper
<
Commercial
>()
.
eq
(
Commercial:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
// commercialService.saveOrUpdate(commercial);
// 勘察后,更新状态
// QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new
// QueryWrapper<>();
// peasantHouseholdQueryWrapper.eq("survey_information_id",
// surveyInformation.getSequenceNbr());
// PeasantHousehold peasantHousehold =
// peasantHouseholdServiceImpl.getBaseMapper()
// .selectOne(peasantHouseholdQueryWrapper);
// 更新资料归档信息
Information
information
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getInformation
(),
Information
.
class
);
information
.
setHouseProve
(
null
==
commercial
?
null
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())
?
commercial
.
getRealEstateLegal
()
:
null
));
information
.
setCardFile
(
null
==
commercial
?
null
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())
?
commercial
.
getIdCardCredit
()
:
null
));
information
.
setCardFile
(
commercial
.
getAgentLegal
());
information
.
setArchivesNumber
(
surveyInformationServiceImpl
.
getNo
(
CodeEnum
.
档案
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
information
.
setFileNumber
(
surveyInformationServiceImpl
.
getNo
(
CodeEnum
.
文件
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
information
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
// 避免生成多份数据
informationService
.
saveOrUpdate
(
information
,
new
LambdaQueryWrapper
<
Information
>()
.
eq
(
Information:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
// informationService.saveOrUpdate(information);
peasantHousehold
.
setOwnersName
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersName
());
peasantHousehold
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
peasantHousehold
.
setIdCard
(
surveyInfoAllDto
.
getSurveyInformation
().
getIdCard
());
peasantHousehold
.
setIdCardFront
(
model
.
getIdCardFront
());
peasantHousehold
.
setIdCardOpposite
(
model
.
getIdCardOpposite
());
peasantHousehold
.
setMailbox
(
surveyInfoAllDto
.
getSurveyInformation
().
getMailbox
());
peasantHousehold
.
setProjectAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
());
peasantHousehold
.
setProjectAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddressDetail
());
peasantHousehold
.
setPermanentAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
// 处理项目地址
String
projectAddressName
=
""
;
if
(
null
!=
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
()){
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
projectAddressName
=
projectAddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
peasantHousehold
.
setProjectAddressName
(
projectAddressName
.
substring
(
0
,
projectAddressName
.
length
()
-
1
));
}
if
(
null
!=
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
()){
// 常住地址
String
permanentAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
permanentAddressName
=
permanentAddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
peasantHousehold
.
setPermanentAddressName
(
permanentAddressName
.
substring
(
0
,
permanentAddressName
.
length
()
-
1
));
}
this
.
saveOrUpdate
(
peasantHousehold
);
//更新施工信息
PowerStationConstructionData
powerStationConstructionData
=
surveyInfoAllDto
.
getPowerStationConstructionData
();
powerStationConstructionData
.
setWorkOrderPowerStationId
(
peasantHousehold
.
getSequenceNbr
());
// 避免生成多份数据
powerStationConstructionDataService
.
saveOrUpdate
(
powerStationConstructionData
,
new
LambdaQueryWrapper
<
PowerStationConstructionData
>()
.
eq
(
PowerStationConstructionData:
:
getWorkOrderPowerStationId
,
peasantHousehold
.
getSequenceNbr
()));
//更新工程
PowerStationEngineeringInfo
powerStationEngineeringInfo
=
surveyInfoAllDto
.
getPowerStationEngineeringInfo
();
if
(
Objects
.
nonNull
(
powerStationEngineeringInfo
)){
powerStationEngineeringInfo
.
setWorkOrderPowerStationId
(
peasantHousehold
.
getSequenceNbr
());
powerStationEngineeringInfoService
.
saveOrUpdate
(
powerStationEngineeringInfo
,
new
LambdaQueryWrapper
<
PowerStationEngineeringInfo
>()
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderPowerStationId
,
peasantHousehold
.
getSequenceNbr
()));
//更新施工组件信息
LambdaUpdateWrapper
<
PowerStationConstructionData
>
powerStationConstructionDataWrapper
=
new
LambdaUpdateWrapper
<>();
powerStationConstructionDataWrapper
.
set
(
PowerStationConstructionData:
:
getConstructionComponentInfo
,
JSONArray
.
toJSONString
(
powerStationEngineeringInfo
.
getConstructionComponentInfo
()));
powerStationConstructionDataWrapper
.
set
(
PowerStationConstructionData:
:
getConstructionInverterInfo
,
JSONArray
.
toJSONString
(
powerStationEngineeringInfo
.
getConstructionInverterInfo
()));
powerStationConstructionDataWrapper
.
set
(
PowerStationConstructionData:
:
getConstructionCollectorBoxInfo
,
JSONArray
.
toJSONString
(
powerStationEngineeringInfo
.
getConstructionCollectorBoxInfo
()));
powerStationConstructionDataWrapper
.
set
(
PowerStationConstructionData:
:
getConstructionGridBoxInfo
,
JSONArray
.
toJSONString
(
powerStationEngineeringInfo
.
getConstructionGridBoxInfo
()));
powerStationConstructionDataWrapper
.
eq
(
PowerStationConstructionData:
:
getWorkOrderPowerStationId
,
peasantHousehold
.
getSequenceNbr
());
powerStationConstructionDataWrapper
.
eq
(
PowerStationConstructionData:
:
getSequenceNbr
,
powerStationConstructionData
.
getSequenceNbr
());
powerStationConstructionDataService
.
update
(
null
,
powerStationConstructionDataWrapper
);
}
//更新并网信息
HygfOnGrid
hygfOnGrid
=
surveyInfoAllDto
.
getHygfOnGrid
();
hygfOnGrid
.
setPeasantHouseholdId
(
peasantHousehold
.
getSequenceNbr
());
// 避免生成多份数据
hygfOnGridService
.
saveOrUpdate
(
hygfOnGrid
,
new
LambdaQueryWrapper
<
HygfOnGrid
>()
.
eq
(
HygfOnGrid:
:
getPeasantHouseholdId
,
peasantHousehold
.
getSequenceNbr
()));
hygfOnGridService
.
saveOrUpdate
(
hygfOnGrid
);
//更新设计信息
DesignInformationDto
designInformationDto
=
surveyInfoAllDto
.
getDesignInformation
();
DesignInformation
designInformation
=
BeanDtoUtils
.
convert
(
designInformationDto
,
DesignInformation
.
class
);
designInformation
.
setPeasantHouseholdId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
designInformationService
.
saveOrUpdate
(
designInformation
,
new
LambdaQueryWrapper
<
DesignInformation
>()
.
eq
(
DesignInformation:
:
getPeasantHouseholdId
,
peasantHousehold
.
getSequenceNbr
()));
}
//
//
// this.saveOrUpdate(peasantHousehold);
//
//
//
// //更新施工信息
// PowerStationConstructionData powerStationConstructionData = surveyInfoAllDto.getPowerStationConstructionData();
//
// powerStationConstructionData.setWorkOrderPowerStationId(peasantHousehold.getSequenceNbr());
// // 避免生成多份数据
// powerStationConstructionDataService.saveOrUpdate(powerStationConstructionData, new LambdaQueryWrapper<PowerStationConstructionData>()
// .eq(PowerStationConstructionData::getWorkOrderPowerStationId, peasantHousehold.getSequenceNbr()));
//
// //更新工程
// PowerStationEngineeringInfo powerStationEngineeringInfo = surveyInfoAllDto.getPowerStationEngineeringInfo();
// if(Objects.nonNull(powerStationEngineeringInfo)){
// powerStationEngineeringInfo.setWorkOrderPowerStationId(peasantHousehold.getSequenceNbr());
// powerStationEngineeringInfoService.saveOrUpdate(powerStationEngineeringInfo, new LambdaQueryWrapper<PowerStationEngineeringInfo>()
// .eq(PowerStationEngineeringInfo::getWorkOrderPowerStationId, peasantHousehold.getSequenceNbr()));
// //更新施工组件信息
// LambdaUpdateWrapper<PowerStationConstructionData> powerStationConstructionDataWrapper = new LambdaUpdateWrapper<>();
// powerStationConstructionDataWrapper.set(PowerStationConstructionData::getConstructionComponentInfo, JSONArray.toJSONString(powerStationEngineeringInfo.getConstructionComponentInfo()));
// powerStationConstructionDataWrapper.set(PowerStationConstructionData::getConstructionInverterInfo,JSONArray.toJSONString(powerStationEngineeringInfo.getConstructionInverterInfo()));
// powerStationConstructionDataWrapper.set(PowerStationConstructionData::getConstructionCollectorBoxInfo,JSONArray.toJSONString(powerStationEngineeringInfo.getConstructionCollectorBoxInfo()));
// powerStationConstructionDataWrapper.set(PowerStationConstructionData::getConstructionGridBoxInfo,JSONArray.toJSONString(powerStationEngineeringInfo.getConstructionGridBoxInfo()));
// powerStationConstructionDataWrapper.eq(PowerStationConstructionData::getWorkOrderPowerStationId, peasantHousehold.getSequenceNbr());
// powerStationConstructionDataWrapper.eq(PowerStationConstructionData::getSequenceNbr, powerStationConstructionData.getSequenceNbr());
// powerStationConstructionDataService.update(null,powerStationConstructionDataWrapper);
//
// }
// //更新并网信息
// HygfOnGrid hygfOnGrid = surveyInfoAllDto.getHygfOnGrid();
// hygfOnGrid.setPeasantHouseholdId( peasantHousehold.getSequenceNbr());
// // 避免生成多份数据
// hygfOnGridService.saveOrUpdate(hygfOnGrid, new LambdaQueryWrapper<HygfOnGrid>()
// .eq(HygfOnGrid::getPeasantHouseholdId, peasantHousehold.getSequenceNbr()));
// hygfOnGridService.saveOrUpdate(hygfOnGrid);
// //更新设计信息
// DesignInformationDto designInformationDto = surveyInfoAllDto.getDesignInformation();
//
// DesignInformation designInformation = BeanDtoUtils.convert(designInformationDto,
// DesignInformation.class);
// designInformation.setPeasantHouseholdId(String.valueOf(peasantHousehold.getSequenceNbr()));
// designInformationService.saveOrUpdate(designInformation, new LambdaQueryWrapper<DesignInformation>()
// .eq(DesignInformation::getPeasantHouseholdId, peasantHousehold.getSequenceNbr()));
//
//
// }
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/StatisticsHomepageServiceImpl.java
View file @
f38f4cac
...
...
@@ -105,7 +105,7 @@ public class StatisticsHomepageServiceImpl {
List
<
String
>
surveKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"未通过"
,
"未勘察"
,
"已完成(法务审核)"
,
"进行中(审核)"
));
List
<
String
>
contractKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"双方已签署"
,
"农户已签署"
,
"未
发起
"
,
"已作废"
));
List
<
String
>
contractKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"双方已签署"
,
"农户已签署"
,
"未
签署
"
,
"已作废"
));
List
<
String
>
workOrder
=
new
ArrayList
<>(
Arrays
.
asList
(
"派工发料"
,
"未通过"
,
"施工资料已上传"
,
"完工登记"
,
"完工自审"
,
"审核中"
,
"已完成"
,
"整改待审核"
,
"待整改"
));
List
<
String
>
preparationMoneyKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"待发货"
,
"已收货"
,
"已发货"
));
List
<
String
>
desionKeys
=
new
ArrayList
<>(
Arrays
.
asList
(
"施工图已上传"
,
"典设图已上传"
));
...
...
@@ -358,13 +358,13 @@ public class StatisticsHomepageServiceImpl {
//判断是不是区域公司存在还款计划 若不存在则给0
for
(
Map
<
String
,
Object
>
stringObjectMap
:
rent
)
{
if
(
stringObjectMap
.
get
(
"regionalCompaniesCode"
).
equals
(
map
.
get
(
"regionalCompaniesCode"
))){
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
0
);
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
cell3
.
setCellValue
(
stringObjectMap
.
get
(
"yhk"
).
toString
());
applyBorder
(
cell3
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
cell1
.
setCellValue
(
stringObjectMap
.
get
(
"jnwhk"
).
toString
());
applyBorder
(
cell1
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
3
);
cell2
.
setCellValue
(
stringObjectMap
.
get
(
"sywhk"
).
toString
());
applyBorder
(
cell2
);
...
...
@@ -373,13 +373,13 @@ public class StatisticsHomepageServiceImpl {
}
if
(
flag
){
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
0
);
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
cell3
.
setCellValue
(
0
);
applyBorder
(
cell3
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
cell1
.
setCellValue
(
0
);
applyBorder
(
cell1
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
3
);
cell2
.
setCellValue
(
0
);
applyBorder
(
cell2
);
}
...
...
@@ -387,9 +387,9 @@ public class StatisticsHomepageServiceImpl {
CellRangeAddress
cellRangeAddress2
=
new
CellRangeAddress
(
startNum
,
endNum
,
1
,
1
);
CellRangeAddress
cellRangeAddress
=
new
CellRangeAddress
(
startNum
,
endNum
,
2
,
2
);
CellRangeAddress
cellRangeAddress1
=
new
CellRangeAddress
(
startNum
,
endNum
,
35
,
35
);
CellRangeAddress
cellRangeAddress3
=
new
CellRangeAddress
(
startNum
,
endNum
,
4
0
,
40
);
CellRangeAddress
cellRangeAddress4
=
new
CellRangeAddress
(
startNum
,
endNum
,
4
1
,
41
);
CellRangeAddress
cellRangeAddress5
=
new
CellRangeAddress
(
startNum
,
endNum
,
4
2
,
42
);
CellRangeAddress
cellRangeAddress3
=
new
CellRangeAddress
(
startNum
,
endNum
,
4
1
,
41
);
CellRangeAddress
cellRangeAddress4
=
new
CellRangeAddress
(
startNum
,
endNum
,
4
2
,
42
);
CellRangeAddress
cellRangeAddress5
=
new
CellRangeAddress
(
startNum
,
endNum
,
4
3
,
43
);
firstSheet
.
addMergedRegion
(
cellRangeAddress
);
firstSheet
.
addMergedRegion
(
cellRangeAddress1
);
firstSheet
.
addMergedRegion
(
cellRangeAddress2
);
...
...
@@ -419,13 +419,13 @@ public class StatisticsHomepageServiceImpl {
//判断是不是区域公司存在还款计划 若不存在则给0
for
(
Map
<
String
,
Object
>
stringObjectMap
:
rent
)
{
if
(
stringObjectMap
.
get
(
"regionalCompaniesCode"
).
equals
(
map
.
get
(
"regionalCompaniesCode"
))){
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
0
);
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
cell3
.
setCellValue
(
stringObjectMap
.
get
(
"yhk"
).
toString
());
applyBorder
(
cell3
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
cell1
.
setCellValue
(
stringObjectMap
.
get
(
"jnwhk"
).
toString
());
applyBorder
(
cell1
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
3
);
cell2
.
setCellValue
(
stringObjectMap
.
get
(
"sywhk"
).
toString
());
applyBorder
(
cell2
);
flag
=
false
;
...
...
@@ -433,13 +433,13 @@ public class StatisticsHomepageServiceImpl {
}
if
(
flag
){
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
0
);
Cell
cell3
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
cell3
.
setCellValue
(
0
);
applyBorder
(
cell3
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
1
);
Cell
cell1
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
cell1
.
setCellValue
(
0
);
applyBorder
(
cell1
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
2
);
Cell
cell2
=
firstSheet
.
getRow
(
startNum
).
createCell
(
4
3
);
cell2
.
setCellValue
(
0
);
applyBorder
(
cell2
);
}
...
...
@@ -469,13 +469,13 @@ public class StatisticsHomepageServiceImpl {
Cell
cell2
=
row
.
createCell
(
2
);
cell2
.
setCellValue
(
map
.
get
(
"regionalCompaniesName"
).
toString
());
applyBorder
(
cell2
);
Cell
cell40
=
row
.
createCell
(
4
0
);
Cell
cell40
=
row
.
createCell
(
4
1
);
cell40
.
setCellValue
(
map
.
get
(
"yhk"
).
toString
());
applyBorder
(
cell40
);
Cell
cell41
=
row
.
createCell
(
4
1
);
Cell
cell41
=
row
.
createCell
(
4
2
);
cell41
.
setCellValue
(
map
.
get
(
"jnwhk"
).
toString
());
applyBorder
(
cell41
);
Cell
cell42
=
row
.
createCell
(
4
2
);
Cell
cell42
=
row
.
createCell
(
4
3
);
cell42
.
setCellValue
(
map
.
get
(
"sywhk"
).
toString
());
applyBorder
(
cell42
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/templates/homePageExport.xlsx
View file @
f38f4cac
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