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
c597bc22
Commit
c597bc22
authored
Jul 05, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
f8a6473a
528f434d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
747 additions
and
660 deletions
+747
-660
HygfReplenishmentDto.java
...n/amos/boot/module/hygf/api/dto/HygfReplenishmentDto.java
+2
-1
HygfReplenishment.java
...n/amos/boot/module/hygf/api/entity/HygfReplenishment.java
+1
-1
PreparationMoney.java
...in/amos/boot/module/hygf/api/entity/PreparationMoney.java
+4
-0
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+4
-6
QiyuesuoController.java
...s/boot/module/hygf/biz/controller/QiyuesuoController.java
+11
-6
SurveyInformationController.java
...dule/hygf/biz/controller/SurveyInformationController.java
+2
-1
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+83
-20
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+640
-625
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/HygfReplenishmentDto.java
View file @
c597bc22
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
*
*
...
@@ -28,6 +29,6 @@ public class HygfReplenishmentDto extends BaseDto {
...
@@ -28,6 +29,6 @@ public class HygfReplenishmentDto extends BaseDto {
private
String
comment
;
private
String
comment
;
@ApiModelProperty
(
value
=
"补货文件"
)
@ApiModelProperty
(
value
=
"补货文件"
)
private
String
file
;
private
List
<
Object
>
file
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HygfReplenishment.java
View file @
c597bc22
...
@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity {
...
@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件
* 补货文件
*/
*/
@TableField
(
value
=
"file"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
@TableField
(
value
=
"file"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
file
;
private
String
file
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PreparationMoney.java
View file @
c597bc22
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -150,6 +151,9 @@ public class PreparationMoney extends BaseEntity {
...
@@ -150,6 +151,9 @@ public class PreparationMoney extends BaseEntity {
private
List
<
PreparationMoneyLog
>
preparationMoneyLog
;
//发货单流水
private
List
<
PreparationMoneyLog
>
preparationMoneyLog
;
//发货单流水
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
HygfReplenishmentDto
>
files
;
//发货单流水
@TableField
(
exist
=
false
)
private
String
instanceId
;
//发货单流水
private
String
instanceId
;
//发货单流水
//订单状态
//订单状态
@TableField
(
"order_status"
)
@TableField
(
"order_status"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
c597bc22
...
@@ -11,13 +11,11 @@ and hygf_peasant_household.developer_id=#{developerId}
...
@@ -11,13 +11,11 @@ and hygf_peasant_household.developer_id=#{developerId}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.survey_or_not=3 and hygf_peasant_household.sequence_nbr not in
and hygf_peasant_household.survey_or_not=3 and hygf_peasant_household.sequence_nbr not in
(select hygf_document_station.station_id from hygf_preparation_money RIGHT JOIN hygf_document_station
(select hygf_document_station.station_id from hygf_preparation_money RIGHT JOIN hygf_document_station
on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nbr where hygf_preparation_money.order_status ='待发货'
on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nbr where
hygf_document_station.station_id is not null
<if
test=
"ids!=null and ids !=''"
>
<if
test=
"ids!=null and ids !=''"
>
and hygf_document_station.preparation_money_id !=#{ids}
and hygf_document_station.preparation_money_id !=#{ids}
</if>
</if>
)
and hygf_document_station.station_id is not null
)
<if
test=
"peasantHouseholdNo!=null and peasantHouseholdNo !=''"
>
<if
test=
"peasantHouseholdNo!=null and peasantHouseholdNo !=''"
>
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
</if>
</if>
...
@@ -70,7 +68,7 @@ and hygf_document_station.station_id is not null
...
@@ -70,7 +68,7 @@ and hygf_document_station.station_id is not null
<if
test=
"developerCode!=null and developerCode !=''"
>
<if
test=
"developerCode!=null and developerCode !=''"
>
and developer_code = #{developerCode}
and developer_code = #{developerCode}
</if>
</if>
ORDER BY
rec_dat
e DESC
ORDER BY
creation_tim
e DESC
</select>
</select>
<select
id=
"selectUserIsHouse"
resultType=
"java.util.Map"
>
<select
id=
"selectUserIsHouse"
resultType=
"java.util.Map"
>
SELECT
SELECT
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/QiyuesuoController.java
View file @
c597bc22
...
@@ -108,17 +108,22 @@ public class QiyuesuoController extends BaseController {
...
@@ -108,17 +108,22 @@ public class QiyuesuoController extends BaseController {
@PostMapping
(
value
=
"/getContractTokengz/{sequenceNbr}"
)
@PostMapping
(
value
=
"/getContractTokengz/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
getContractSdkResponseSequenceNbr
(
@RequestBody
ContractMiniappTicketRequest
request
,
public
ResponseModel
<
Object
>
getContractSdkResponseSequenceNbr
(
@RequestBody
ContractMiniappTicketRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
QueryWrapper
<
SealDictionary
>
queryWrapper
=
new
QueryWrapper
();
SealDictionary
sealDictionary
=
sealDictionaryMapper
.
selectById
(
sequenceNbr
);
queryWrapper
.
eq
(
"amos_company_seq"
,
sequenceNbr
);
request
.
setUser
(
new
User
(
sealDictionary
.
getSealedPhone
(),
"MOBILE"
));
List
<
SealDictionary
>
sealDictionaryList
=
sealDictionaryMapper
.
selectList
(
queryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
sealDictionaryList
)){
request
.
setUser
(
new
User
(
sealDictionaryList
.
get
(
0
).
getSealedPhone
(),
"MOBILE"
));
}
SdkResponse
<
MiniappTicketResult
>
result
=
qiyuesuoService
.
getContractSdkResponse
(
request
);
SdkResponse
<
MiniappTicketResult
>
result
=
qiyuesuoService
.
getContractSdkResponse
(
request
);
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取所有盖章人员"
,
notes
=
"获取所有盖章人员"
)
@GetMapping
(
value
=
"/getAllUserByCompanySeq"
)
public
ResponseModel
<
List
<
SealDictionary
>>
getAll
(
@RequestParam
(
value
=
"companySeq"
)
Long
companySeq
)
{
QueryWrapper
<
SealDictionary
>
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"amos_company_seq"
,
companySeq
);
return
ResponseHelper
.
buildResponse
(
sealDictionaryMapper
.
selectList
(
queryWrapper
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取合同浏览令牌"
,
notes
=
"获取合同浏览令牌"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取合同浏览令牌"
,
notes
=
"获取合同浏览令牌"
)
@GetMapping
(
value
=
"/getContractTokenTicket/{sequenceNbr}"
)
@GetMapping
(
value
=
"/getContractTokenTicket/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
getContractTokenTicket
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
Object
>
getContractTokenTicket
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/SurveyInformationController.java
View file @
c597bc22
...
@@ -119,12 +119,13 @@ public class SurveyInformationController extends BaseController {
...
@@ -119,12 +119,13 @@ public class SurveyInformationController extends BaseController {
* 勘察信息数据提交
* 勘察信息数据提交
*
*
* @return
* @return
* @throws Exception
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"勘察信息数据提交"
,
notes
=
"勘察信息数据提交"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"勘察信息数据提交"
,
notes
=
"勘察信息数据提交"
)
@PostMapping
(
value
=
"/surveySubmit"
)
@PostMapping
(
value
=
"/surveySubmit"
)
public
ResponseModel
<
SurveyInfoAllDto
>
surveySubmit
(
@RequestBody
SurveyInfoAllDto
surveyInfoAllDto
,
public
ResponseModel
<
SurveyInfoAllDto
>
surveySubmit
(
@RequestBody
SurveyInfoAllDto
surveyInfoAllDto
,
@RequestParam
(
value
=
"operationType"
)
String
operationType
)
{
@RequestParam
(
value
=
"operationType"
)
String
operationType
)
throws
Exception
{
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
saveSurveyInfo
(
surveyInfoAllDto
,
operationType
);
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
saveSurveyInfo
(
surveyInfoAllDto
,
operationType
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
View file @
c597bc22
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
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
;
...
@@ -47,6 +48,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -47,6 +48,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* 发货单服务实现类
* 发货单服务实现类
...
@@ -188,6 +190,21 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -188,6 +190,21 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
List
<
DocumentStation
>
li
=
documentStationMapper
.
selectList
(
q
);
List
<
DocumentStation
>
li
=
documentStationMapper
.
selectList
(
q
);
preparationMoney
.
setPeasantHouseholdId
(
li
);
preparationMoney
.
setPeasantHouseholdId
(
li
);
LambdaQueryWrapper
<
HygfReplenishment
>
h
=
new
LambdaQueryWrapper
<>();
h
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments
=
hygfReplenishmentMapper
.
selectList
(
h
);
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
!
hygfReplenishments
.
isEmpty
()
){
hygfReplenishments
.
forEach
(
e
->{
HygfReplenishmentDto
hygfReplenishmentDto
=
new
HygfReplenishmentDto
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishmentDto
);
hygfReplenishmentDto
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishmentDtos
.
add
(
hygfReplenishmentDto
);
});
preparationMoney
.
setFiles
(
hygfReplenishmentDtos
);
}
return
preparationMoney
;
return
preparationMoney
;
}
}
...
@@ -215,12 +232,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -215,12 +232,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
qu
.
eq
(
PreparationMoney:
:
getSequenceNbr
,
sequenceNbr
);
qu
.
eq
(
PreparationMoney:
:
getSequenceNbr
,
sequenceNbr
);
PreparationMoney
preparationMoney
=
preparationMoneyMapper
.
selectOne
(
qu
);
PreparationMoney
preparationMoney
=
preparationMoneyMapper
.
selectOne
(
qu
);
LambdaUpdateWrapper
<
HygfReplenishment
>
h
=
new
LambdaUpdateWrapper
<>();
h
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments
=
hygfReplenishmentMapper
.
selectList
(
h
);
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
hygfReplenishments
.
size
()>
0
){
map
.
put
(
"files"
,
hygfReplenishments
);
}
LambdaUpdateWrapper
<
HygfPreparationMoneyAuditing
>
audit
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
HygfPreparationMoneyAuditing
>
audit
=
new
LambdaUpdateWrapper
<>();
audit
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
audit
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfPreparationMoneyAuditing
>
hygfPreparationMoneyAuditings
=
hygfPreparationMoneyAuditingService
.
getBaseMapper
().
selectList
(
audit
);
List
<
HygfPreparationMoneyAuditing
>
hygfPreparationMoneyAuditings
=
hygfPreparationMoneyAuditingService
.
getBaseMapper
().
selectList
(
audit
);
...
@@ -308,7 +319,25 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -308,7 +319,25 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
designInformation
.
setInverter
(
inverter
);
designInformation
.
setInverter
(
inverter
);
designInformation
.
setElectricityMeter
(
electricityMeter
);
designInformation
.
setElectricityMeter
(
electricityMeter
);
designInformation
.
setCable
(
cable
);
designInformation
.
setCable
(
cable
);
map
.
put
(
"preparationMoney"
,
preparationMoney
);
Map
<
String
,
Object
>
map2
=
Bean
.
BeantoMap
(
preparationMoney
);
LambdaUpdateWrapper
<
HygfReplenishment
>
h
=
new
LambdaUpdateWrapper
<>();
h
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments
=
hygfReplenishmentMapper
.
selectList
(
h
);
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
!
hygfReplenishments
.
isEmpty
()
){
hygfReplenishments
.
forEach
(
e
->{
HygfReplenishmentDto
hygfReplenishmentDto
=
new
HygfReplenishmentDto
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishmentDto
);
hygfReplenishmentDto
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishmentDtos
.
add
(
hygfReplenishmentDto
);
});
map2
.
put
(
"files"
,
hygfReplenishmentDtos
);
}
map
.
put
(
"preparationMoney"
,
map2
);
map
.
put
(
"designInformation"
,
designInformation
);
map
.
put
(
"designInformation"
,
designInformation
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"preparationMoneyLog"
,
liD
);
map1
.
put
(
"preparationMoneyLog"
,
liD
);
...
@@ -602,8 +631,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -602,8 +631,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//更新电站施工状态
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
preparationMoneyMapper
.
insert
(
model
);
preparationMoneyMapper
.
insert
(
model
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
if
(
isSubmit
.
equals
(
"0"
))
{
if
(
isSubmit
.
equals
(
"0"
))
{
...
@@ -655,9 +682,9 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -655,9 +682,9 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
listDocumentStation
.
add
(
documentStation
);
listDocumentStation
.
add
(
documentStation
);
}
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
peasantHouseholdMapper
.
update
(
null
,
up
);
documentStationService
.
saveBatch
(
listDocumentStation
);
documentStationService
.
saveBatch
(
listDocumentStation
);
}
}
peasantHouseholdMapper
.
update
(
null
,
up
);
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
...
@@ -732,10 +759,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -732,10 +759,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
//电站信息存储
//电站信息存储
LambdaQueryWrapper
<
DocumentStation
>
query1
=
new
LambdaQueryWrapper
<>();
query1
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
List
<
Long
>
oldIds
=
documentStationMapper
.
selectList
(
query1
).
stream
().
map
(
DocumentStation:
:
getStationId
).
collect
(
Collectors
.
toList
());
LambdaUpdateWrapper
<
PeasantHousehold
>
up1
=
new
LambdaUpdateWrapper
<>();
up1
.
in
(
BaseEntity:
:
getSequenceNbr
,
oldIds
);
up1
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待发货
.
getCode
());
up1
.
set
(
PeasantHousehold:
:
getConstructionState
,
"勘察完成"
);
peasantHouseholdMapper
.
update
(
null
,
up1
);
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
documentStationMapper
.
delete
(
up3
);
//电站信息存储
//电站信息存储
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
...
@@ -1061,29 +1098,55 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -1061,29 +1098,55 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
if
(
"1"
.
equals
(
isSubmit
)){
if
(
"1"
.
equals
(
isSubmit
)){
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
}
else
{
}
else
{
if
(
CollectionUtil
.
isEmpty
(
model
.
getPeasantHouseholdId
())){
throw
new
BadRequest
(
"提交时选择电站不可为空"
);
}
if
(
CollectionUtil
.
isEmpty
(
model
.
getDeliveryFile
())){
throw
new
BadRequest
(
"提交时发货单不可为空"
);
}
//isSubmit = 0 表示提交 也对应工作流表达式 可直接使用
//isSubmit = 0 表示提交 也对应工作流表达式 可直接使用
model
.
setOrderStatus
(
DeliveryStateeEnum
.
待确认
.
getCode
());
model
.
setOrderStatus
(
DeliveryStateeEnum
.
待确认
.
getCode
());
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待补货
.
getName
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
待补货
.
getName
());
peasantHouseholdMapper
.
update
(
null
,
up
);
this
.
wofkflowExcute
(
instanceId
,
isSubmit
,
""
);
this
.
wofkflowExcute
(
instanceId
,
isSubmit
,
""
);
}
}
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
//电站信息存储
//电站信息存储
LambdaQueryWrapper
<
DocumentStation
>
query1
=
new
LambdaQueryWrapper
<>();
query1
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
List
<
Long
>
oldIds
=
documentStationMapper
.
selectList
(
query1
).
stream
().
map
(
DocumentStation:
:
getStationId
).
collect
(
Collectors
.
toList
());
LambdaUpdateWrapper
<
PeasantHousehold
>
up1
=
new
LambdaUpdateWrapper
<>();
up1
.
in
(
BaseEntity:
:
getSequenceNbr
,
oldIds
);
up1
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待发货
.
getCode
());
up1
.
set
(
PeasantHousehold:
:
getConstructionState
,
"勘察完成"
);
peasantHouseholdMapper
.
update
(
null
,
up1
);
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
documentStationMapper
.
delete
(
up3
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
//电站信息存储
for
(
DocumentStation
documentStation
:
ids
)
{
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
listDocumentStation
.
add
(
documentStation
);
List
<
Long
>
idsH
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
ids
)
{
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
documentStation
.
setSequenceNbr
(
null
);
idsH
.
add
(
documentStation
.
getStationId
());
listDocumentStation
.
add
(
documentStation
);
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待补货
.
getName
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
待补货
.
getName
());
peasantHouseholdMapper
.
update
(
null
,
up
);
documentStationService
.
saveBatch
(
listDocumentStation
);
}
}
documentStationService
.
saveBatch
(
listDocumentStation
);
return
model
;
return
model
;
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
c597bc22
...
@@ -54,350 +54,364 @@ import java.util.stream.Stream;
...
@@ -54,350 +54,364 @@ import java.util.stream.Stream;
@Service
@Service
@Slf4j
@Slf4j
public
class
SurveyInformationServiceImpl
public
class
SurveyInformationServiceImpl
extends
BaseService
<
SurveyInformationDto
,
SurveyInformation
,
SurveyInformationMapper
>
extends
BaseService
<
SurveyInformationDto
,
SurveyInformation
,
SurveyInformationMapper
>
implements
ISurveyInformationService
{
implements
ISurveyInformationService
{
@Autowired
@Autowired
SurveyDetailsServiceImpl
surveyDetailsService
;
SurveyDetailsServiceImpl
surveyDetailsService
;
@Autowired
@Autowired
InformationServiceImpl
informationService
;
InformationServiceImpl
informationService
;
@Autowired
@Autowired
ExtendedInformationServiceImpl
extendedInformationService
;
ExtendedInformationServiceImpl
extendedInformationService
;
@Autowired
@Autowired
CommercialServiceImpl
commercialService
;
CommercialServiceImpl
commercialService
;
@Autowired
@Autowired
PeasantHouseholdServiceImpl
peasantHouseholdServiceImpl
;
PeasantHouseholdServiceImpl
peasantHouseholdServiceImpl
;
@Autowired
@Autowired
DesignInformationServiceImpl
designInformationService
;
DesignInformationServiceImpl
designInformationService
;
@Autowired
@Autowired
WorkflowFeignClient
workflowFeignClient
;
WorkflowFeignClient
workflowFeignClient
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
@Autowired
IdxFeginService
idxFeginService
;
IdxFeginService
idxFeginService
;
@Autowired
@Autowired
RegionalCompaniesMapper
regionalCompaniesMapper
;
RegionalCompaniesMapper
regionalCompaniesMapper
;
@Autowired
@Autowired
IPowerStationService
powerStationService
;
IPowerStationService
powerStationService
;
@Autowired
@Autowired
ToDoTasksMapper
toDoTasksMapper
;
PowerStationMapper
powerStationMapper
;
@Autowired
@Autowired
UserMessageMapper
userMessageMapper
;
ToDoTasksMapper
toDoTasksMapper
;
@Value
(
"${power.station.examine.pageId}"
)
@Autowired
private
long
pageId
;
UserMessageMapper
userMessageMapper
;
@Autowired
@Value
(
"${power.station.examine.pageId}"
)
protected
EmqKeeper
emqKeeper
;
private
long
pageId
;
@Value
(
"${power.station.examine.planId}"
)
@Autowired
private
String
planId
;
protected
EmqKeeper
emqKeeper
;
@Value
(
"${power.station.examine.planId}"
)
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
String
planId
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
private
static
final
String
OPERATION_TYPE_SUBMIT
=
"submit"
;
@Autowired
private
static
final
String
OPERATION_TYPE_APPLY
=
"apply"
;
PersonnelBusinessMapper
personnelBusinessMapper
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
@Autowired
@Autowired
PeasantHouseholdMapper
peasantHouseholdMapper
;
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
@Autowired
PeasantHouseholdMapper
peasantHouseholdMapper
;
WorkOrderMapper
workOrderMapper
;
@Autowired
@Autowired
HygfOnGridMapper
hygfOnGridMapper
;
WorkOrderMapper
workOrderMapper
;
@Autowired
@Autowired
ConstructionRecordsServiceImpl
constructionRecordsServiceImpl
;
HygfOnGridMapper
hygfOnGridMapper
;
@Autowired
@Autowired
ConstructionRecordsMapper
constructionRecordsMapper
;
ConstructionRecordsServiceImpl
constructionRecordsServiceImpl
;
@Autowired
@Autowired
BasicGridAcceptanceMapper
basicGridAcceptanceMapper
;
ConstructionRecordsMapper
constructionRecordsMapper
;
@Autowired
@Autowired
BasicGridAcceptanceMapper
basicGridAcceptanceMapper
;
SurveyInformationMapper
surveyInformationMapper
;
@Autowired
@Autowired
PowerStationConstructionDataMapper
powerStationConstructionDataMapper
;
SurveyInformationMapper
surveyInformationMapper
;
@Autowired
@Autowired
PowerStationEngineeringInfoMapper
powerStationEngineeringInfoMapper
;
PowerStationConstructionDataMapper
powerStationConstructionDataMapper
;
@Autowired
@Autowired
WorkOrderPowerStationMapper
workOrderPowerStationMapper
;
PowerStationEngineeringInfoMapper
powerStationEngineeringInfoMapper
;
@Autowired
@Autowired
AmosRequestContext
requestContext
;
WorkOrderPowerStationMapper
workOrderPowerStationMapper
;
@Resource
(
type
=
RedisLockUtil
.
class
)
@Autowired
private
RedisLockUtil
redisLockUtil
;
AmosRequestContext
requestContext
;
@Autowired
@Resource
(
type
=
RedisLockUtil
.
class
)
WorkflowImpl
workflow
;
private
RedisLockUtil
redisLockUtil
;
@Autowired
/**
WorkflowImpl
workflow
;
* 分页查询
*/
/**
public
Page
<
SurveyInformationDto
>
queryForSurveyInformationPage
(
Page
<
SurveyInformationDto
>
page
)
{
* 分页查询
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
);
*/
}
public
Page
<
SurveyInformationDto
>
queryForSurveyInformationPage
(
Page
<
SurveyInformationDto
>
page
)
{
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
);
/**
}
* 列表查询 示例
*/
/**
public
List
<
SurveyInformationDto
>
queryForSurveyInformationList
()
{
* 列表查询 示例
return
this
.
queryForList
(
""
,
false
);
*/
}
public
List
<
SurveyInformationDto
>
queryForSurveyInformationList
()
{
return
this
.
queryForList
(
""
,
false
);
@GlobalTransactional
}
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
String
lockName
=
null
;
@GlobalTransactional
try
{
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
String
lockName
=
null
;
JSONArray
regionName
=
getRegionName
();
try
{
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
JSONArray
regionName
=
getRegionName
();
// 更新勘察基本信息
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
SurveyInformation
surveyInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getSurveyInformation
(),
SurveyInformation
.
class
);
// 更新勘察基本信息
SurveyInformation
surveyInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getSurveyInformation
(),
lockName
=
String
.
format
(
"LockName:saveSurveyInfo:%s"
,
surveyInformation
.
getSequenceNbr
());
SurveyInformation
.
class
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
lockName
=
String
.
format
(
"LockName:saveSurveyInfo:%s"
,
surveyInformation
.
getSequenceNbr
());
throw
new
BadRequest
(
"其他用户正在操作,请刷新后再试!"
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
}
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
throw
new
BadRequest
(
"其他用户正在操作,请刷新后再试!"
);
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
}
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformation
.
getSequenceNbr
());
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
()
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
.
selectOne
(
peasantHouseholdQueryWrapper
);
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformation
.
getSequenceNbr
());
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
()
if
(
ArrivalStateeEnum
.
勘察中
.
getCode
().
equals
(
peasantHousehold
.
getConstructionState
()))
{
.
selectOne
(
peasantHouseholdQueryWrapper
);
throw
new
BadRequest
(
"勘察中,请稍后再试!"
);
}
PowerStation
powerStation
=
powerStationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
PowerStation
>()
.
eq
(
PowerStation:
:
getPeasantHouseholdId
,
peasantHousehold
.
getSequenceNbr
()));
surveyInformation
.
setReview
(
0
);
if
(
ArrivalStateeEnum
.
勘察中
.
getCode
().
equals
(
peasantHousehold
.
getConstructionState
()))
{
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)
&&
null
==
surveyInformation
.
getCreatorTime
())
{
// 驳回后重新提交是勘察中->勘察中导致此逻辑有问题,所以去掉这种情况
surveyInformation
.
setCreatorTime
(
new
Date
());
if
(
powerStation
!=
null
}
&&
PowerStationProcessStateEnum
.
不通过
.
getName
().
equals
(
powerStation
.
getProcessStatus
()))
{
this
.
saveOrUpdate
(
surveyInformation
);
}
else
{
// 更新扩展信息
throw
new
BadRequest
(
"勘察中,请稍后再试!"
);
ExtendedInformation
extendedInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getExtendedInformation
(),
}
ExtendedInformation
.
class
);
extendedInformation
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
}
// 避免生成多份数据
extendedInformationService
.
saveOrUpdate
(
extendedInformation
,
new
LambdaQueryWrapper
<
ExtendedInformation
>()
surveyInformation
.
setReview
(
0
);
.
eq
(
ExtendedInformation:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)
&&
null
==
surveyInformation
.
getCreatorTime
())
{
//extendedInformationService.saveOrUpdate(extendedInformation);
surveyInformation
.
setCreatorTime
(
new
Date
());
}
// 更新勘察明细信息
this
.
saveOrUpdate
(
surveyInformation
);
SurveyDetailsDto
oldSurveyDetails
=
surveyInfoAllDto
.
getSurveyDetails
();
SurveyDetails
surveyDetails
=
BeanDtoUtils
.
convert
(
oldSurveyDetails
,
SurveyDetails
.
class
);
// 更新扩展信息
surveyDetails
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
ExtendedInformation
extendedInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getExtendedInformation
(),
// 避免生成多份数据
ExtendedInformation
.
class
);
surveyDetailsService
.
saveOrUpdate
(
surveyDetails
,
new
LambdaQueryWrapper
<
SurveyDetails
>()
extendedInformation
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
.
eq
(
SurveyDetails:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
// 避免生成多份数据
//surveyDetailsService.saveOrUpdate(surveyDetails);
extendedInformationService
.
saveOrUpdate
(
extendedInformation
,
new
LambdaQueryWrapper
<
ExtendedInformation
>()
.
eq
(
ExtendedInformation:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
// 更新商务信息
// extendedInformationService.saveOrUpdate(extendedInformation);
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
Commercial
commercial
=
BeanDtoUtils
.
convert
(
oldCommercial
,
Commercial
.
class
);
// 更新勘察明细信息
// 处理省市县
SurveyDetailsDto
oldSurveyDetails
=
surveyInfoAllDto
.
getSurveyDetails
();
String
paddressName
=
""
;
SurveyDetails
surveyDetails
=
BeanDtoUtils
.
convert
(
oldSurveyDetails
,
SurveyDetails
.
class
);
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
surveyDetails
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
for
(
RegionModel
re
:
list
)
{
// 避免生成多份数据
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
surveyDetailsService
.
saveOrUpdate
(
surveyDetails
,
new
LambdaQueryWrapper
<
SurveyDetails
>()
paddressName
=
paddressName
+
re
.
getRegionName
()
+
"/"
;
.
eq
(
SurveyDetails:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
}
// surveyDetailsService.saveOrUpdate(surveyDetails);
}
}
// 更新商务信息
commercial
.
setProjectAddressName
(
paddressName
.
substring
(
0
,
paddressName
.
length
()
-
1
));
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
commercial
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
Commercial
commercial
=
BeanDtoUtils
.
convert
(
oldCommercial
,
Commercial
.
class
);
// 避免生成多份数据
// 处理省市县
commercialService
.
saveOrUpdate
(
commercial
,
new
LambdaQueryWrapper
<
Commercial
>()
String
paddressName
=
""
;
.
eq
(
Commercial:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
//commercialService.saveOrUpdate(commercial);
for
(
RegionModel
re
:
list
)
{
// 勘察后,更新状态
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
// QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new QueryWrapper<>();
paddressName
=
paddressName
+
re
.
getRegionName
()
+
"/"
;
// peasantHouseholdQueryWrapper.eq("survey_information_id", surveyInformation.getSequenceNbr());
}
// PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper()
}
// .selectOne(peasantHouseholdQueryWrapper);
}
commercial
.
setProjectAddressName
(
paddressName
.
substring
(
0
,
paddressName
.
length
()
-
1
));
// 更新资料归档信息
commercial
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
Information
information
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getInformation
(),
Information
.
class
);
// 避免生成多份数据
information
.
setHouseProve
(
null
==
commercial
?
null
commercialService
.
saveOrUpdate
(
commercial
,
new
LambdaQueryWrapper
<
Commercial
>()
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())
?
commercial
.
getRealEstateLegal
()
.
eq
(
Commercial:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
:
null
));
// commercialService.saveOrUpdate(commercial);
information
.
setCardFile
(
null
==
commercial
?
null
// 勘察后,更新状态
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())
?
commercial
.
getIdCardCredit
()
:
null
));
// QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new
information
.
setCardFile
(
commercial
.
getAgentLegal
());
// QueryWrapper<>();
information
// peasantHouseholdQueryWrapper.eq("survey_information_id",
.
setArchivesNumber
(
this
.
getNo
(
CodeEnum
.
档案
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
// surveyInformation.getSequenceNbr());
information
.
setFileNumber
(
this
.
getNo
(
CodeEnum
.
文件
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
// PeasantHousehold peasantHousehold =
information
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
// peasantHouseholdServiceImpl.getBaseMapper()
// .selectOne(peasantHouseholdQueryWrapper);
// 避免生成多份数据
informationService
.
saveOrUpdate
(
information
,
new
LambdaQueryWrapper
<
Information
>()
// 更新资料归档信息
.
eq
(
Information:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
Information
information
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getInformation
(),
Information
.
class
);
//informationService.saveOrUpdate(information);
information
.
setHouseProve
(
null
==
commercial
?
null
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())
?
commercial
.
getRealEstateLegal
()
peasantHousehold
.
setOwnersName
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersName
());
:
null
));
peasantHousehold
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
information
.
setCardFile
(
null
==
commercial
?
null
peasantHousehold
.
setIdCard
(
surveyInfoAllDto
.
getSurveyInformation
().
getIdCard
());
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())
?
commercial
.
getIdCardCredit
()
:
null
));
peasantHousehold
.
setMailbox
(
surveyInfoAllDto
.
getSurveyInformation
().
getMailbox
());
information
.
setCardFile
(
commercial
.
getAgentLegal
());
peasantHousehold
.
setProjectAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
());
information
peasantHousehold
.
setProjectAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddressDetail
());
.
setArchivesNumber
(
this
.
getNo
(
CodeEnum
.
档案
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
peasantHousehold
.
setPermanentAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
());
information
.
setFileNumber
(
this
.
getNo
(
CodeEnum
.
文件
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
peasantHousehold
information
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
peasantHousehold
// 避免生成多份数据
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
informationService
.
saveOrUpdate
(
information
,
new
LambdaQueryWrapper
<
Information
>()
.
eq
(
Information:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
// 处理项目地址
// informationService.saveOrUpdate(information);
String
projectAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
peasantHousehold
.
setOwnersName
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersName
());
for
(
RegionModel
re
:
list
)
{
peasantHousehold
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
peasantHousehold
.
setIdCard
(
surveyInfoAllDto
.
getSurveyInformation
().
getIdCard
());
projectAddressName
=
projectAddressName
+
re
.
getRegionName
()
+
"/"
;
peasantHousehold
.
setMailbox
(
surveyInfoAllDto
.
getSurveyInformation
().
getMailbox
());
}
peasantHousehold
.
setProjectAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
());
}
peasantHousehold
.
setProjectAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddressDetail
());
}
peasantHousehold
.
setPermanentAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
());
peasantHousehold
.
setProjectAddressName
(
projectAddressName
.
substring
(
0
,
projectAddressName
.
length
()
-
1
));
peasantHousehold
// 常住地址
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
String
permanentAddressName
=
""
;
peasantHousehold
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
())
{
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
// 处理项目地址
permanentAddressName
=
permanentAddressName
+
re
.
getRegionName
()
+
"/"
;
String
projectAddressName
=
""
;
}
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
}
for
(
RegionModel
re
:
list
)
{
}
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
peasantHousehold
projectAddressName
=
projectAddressName
+
re
.
getRegionName
()
+
"/"
;
.
setPermanentAddressName
(
permanentAddressName
.
substring
(
0
,
permanentAddressName
.
length
()
-
1
));
}
}
if
(
OPERATION_TYPE_SUBMIT
.
equals
(
operationType
))
{
}
// peasantHousehold.setSurveyOrNot(1);
peasantHousehold
.
setProjectAddressName
(
projectAddressName
.
substring
(
0
,
projectAddressName
.
length
()
-
1
));
}
else
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
))
{
// 常住地址
// 提交审核
String
permanentAddressName
=
""
;
submitExamine
(
peasantHousehold
);
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
())
{
LambdaQueryWrapper
<
ToDoTasks
>
wrapper
=
new
LambdaQueryWrapper
<>();
for
(
RegionModel
re
:
list
)
{
wrapper
.
eq
(
ToDoTasks:
:
getType
,
TaskTypeStationEnum
.
电站勘察
.
getCode
());
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
wrapper
.
eq
(
ToDoTasks:
:
getState
,
"待办"
);
permanentAddressName
=
permanentAddressName
+
re
.
getRegionName
()
+
"/"
;
wrapper
.
eq
(
ToDoTasks:
:
getBusinessId
,
peasantHousehold
.
getSequenceNbr
());
}
ToDoTasks
doTasks
=
toDoTasksMapper
.
selectOne
(
wrapper
);
}
if
(
doTasks
!=
null
)
{
}
doTasks
.
setState
(
"已办"
);
peasantHousehold
doTasks
.
setCompleteTime
(
new
Date
());
.
setPermanentAddressName
(
permanentAddressName
.
substring
(
0
,
permanentAddressName
.
length
()
-
1
));
toDoTasksMapper
.
updateById
(
doTasks
);
emqKeeper
.
getMqttClient
().
publish
(
"TASK_MESSAGE"
,
JSON
.
toJSONString
(
doTasks
).
getBytes
(),
2
,
false
);
if
(
OPERATION_TYPE_SUBMIT
.
equals
(
operationType
))
{
// peasantHousehold.setSurveyOrNot(1);
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
}
else
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
))
{
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()
+
"已完成"
,
// 提交审核
doTasks
.
getAmosOrgCode
());
submitExamine
(
peasantHousehold
);
userMessageMapper
.
insert
(
userMessage
);
LambdaQueryWrapper
<
ToDoTasks
>
wrapper
=
new
LambdaQueryWrapper
<>();
emqKeeper
.
getMqttClient
().
publish
(
"MY_MESSAGE"
,
JSON
.
toJSONString
(
userMessage
).
getBytes
(),
2
,
wrapper
.
eq
(
ToDoTasks:
:
getType
,
TaskTypeStationEnum
.
电站勘察
.
getCode
());
false
);
wrapper
.
eq
(
ToDoTasks:
:
getState
,
"待办"
);
wrapper
.
eq
(
ToDoTasks:
:
getBusinessId
,
peasantHousehold
.
getSequenceNbr
());
}
ToDoTasks
doTasks
=
toDoTasksMapper
.
selectOne
(
wrapper
);
}
if
(
doTasks
!=
null
)
{
peasantHouseholdServiceImpl
.
saveOrUpdate
(
peasantHousehold
);
doTasks
.
setState
(
"已办"
);
doTasks
.
setCompleteTime
(
new
Date
());
}
catch
(
Exception
e
)
{
toDoTasksMapper
.
updateById
(
doTasks
);
e
.
printStackTrace
();
emqKeeper
.
getMqttClient
().
publish
(
"TASK_MESSAGE"
,
JSON
.
toJSONString
(
doTasks
).
getBytes
(),
2
,
false
);
}
finally
{
if
(
StringUtils
.
isNotEmpty
(
lockName
))
{
UserMessage
userMessage
=
new
UserMessage
(
doTasks
.
getType
(),
doTasks
.
getBusinessId
(),
redisLockUtil
.
releaseLock
(
lockName
);
doTasks
.
getAmosUserId
(),
new
Date
(),
doTasks
.
getTaskName
()
+
"已完成"
,
}
doTasks
.
getAmosOrgCode
());
}
userMessageMapper
.
insert
(
userMessage
);
emqKeeper
.
getMqttClient
().
publish
(
"MY_MESSAGE"
,
JSON
.
toJSONString
(
userMessage
).
getBytes
(),
2
,
return
surveyInfoAllDto
;
false
);
}
}
public
String
getNo
(
String
type
,
Long
sequenceNbr
)
{
}
RegionalCompanies
da
=
regionalCompaniesMapper
.
selectRegionName
(
sequenceNbr
);
peasantHouseholdServiceImpl
.
saveOrUpdate
(
peasantHousehold
);
if
(
da
.
getCompanyCode
()
==
null
||
da
.
getCompanyCode
().
isEmpty
())
{
throw
new
BadRequest
(
"区域公司编号为空, 请设置编号"
);
}
catch
(
Exception
e
)
{
}
e
.
printStackTrace
();
if
(
da
.
getRegionalAddress
()
==
null
||
da
.
getRegionalAddress
().
isEmpty
())
{
}
finally
{
throw
new
BadRequest
(
"区域公司省市区为空, 请设置省市区"
);
if
(
StringUtils
.
isNotEmpty
(
lockName
))
{
}
redisLockUtil
.
releaseLock
(
lockName
);
String
code
=
NumberUtil
.
getCode
(
type
,
da
.
getCompanyCode
(),
da
.
getRegionalAddress
());
}
return
code
;
}
}
return
surveyInfoAllDto
;
private
void
submitExamine
(
PeasantHousehold
peasantHousehold
)
{
}
PowerStation
powerStation
=
powerStationService
.
getObjByNhId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()),
public
String
getNo
(
String
type
,
Long
sequenceNbr
)
{
PowerStationProcessStateEnum
.
作废
.
getCode
());
RegionalCompanies
da
=
regionalCompaniesMapper
.
selectRegionName
(
sequenceNbr
);
if
(
da
.
getCompanyCode
()
==
null
||
da
.
getCompanyCode
().
isEmpty
())
{
String
taskId
=
null
;
throw
new
BadRequest
(
"区域公司编号为空, 请设置编号"
);
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>(
1
);
}
objectMap
.
put
(
"describe"
,
"经销商已上传信息"
);
if
(
da
.
getRegionalAddress
()
==
null
||
da
.
getRegionalAddress
().
isEmpty
())
{
throw
new
BadRequest
(
"区域公司省市区为空, 请设置省市区"
);
// 保存并审核
}
try
{
String
code
=
NumberUtil
.
getCode
(
type
,
da
.
getCompanyCode
(),
da
.
getRegionalAddress
());
return
code
;
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
}
if
(
ObjectUtils
.
isNotEmpty
(
powerStation
))
{
// 工作流执行一步
private
void
submitExamine
(
PeasantHousehold
peasantHousehold
)
{
// taskId = powerStation.getTaskId();
StandardDto
standardDto
=
new
StandardDto
();
PowerStation
powerStation
=
powerStationService
.
getObjByNhId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()),
standardDto
.
setResult
(
"0"
);
PowerStationProcessStateEnum
.
作废
.
getCode
());
standardDto
.
setTaskId
(
powerStation
.
getFlowTaskId
());
VariableDto
variable
=
new
VariableDto
();
String
taskId
=
null
;
variable
.
setApprovalStatus
(
"0"
);
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>(
1
);
standardDto
.
setVariable
(
variable
);
objectMap
.
put
(
"describe"
,
"经销商已上传信息"
);
workflow
.
standard
(
basicGridAcceptance
,
standardDto
,
requestContext
.
getUserId
());
}
else
{
// 保存并审核
// 第一步启动工作流
try
{
// 发起工作流
// 调用工作流执行第一个节点
BasicGridAcceptance
basicGridAcceptance
=
new
BasicGridAcceptance
();
ProcessDto
processDto
=
new
ProcessDto
();
if
(
ObjectUtils
.
isNotEmpty
(
powerStation
))
{
processDto
.
setBusinessKey
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
// 工作流执行一步
processDto
.
setProcessDefinitionKey
(
"hygf_10001"
);
// taskId = powerStation.getTaskId();
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
StandardDto
standardDto
=
new
StandardDto
();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
standardDto
.
setResult
(
"0"
);
process
.
add
(
processDto
);
standardDto
.
setTaskId
(
powerStation
.
getFlowTaskId
());
startProcessDto
.
setProcess
(
process
);
VariableDto
variable
=
new
VariableDto
();
workflow
.
startProcess
(
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
variable
.
setApprovalStatus
(
"0"
);
powerStation
=
new
PowerStation
();
standardDto
.
setVariable
(
variable
);
}
workflow
.
standard
(
basicGridAcceptance
,
standardDto
,
requestContext
.
getUserId
());
peasantHousehold
.
setSurveyOrNot
(
2
);
}
else
{
peasantHousehold
.
setReview
(
1
);
// 第一步启动工作流
// 插入记录表
// 发起工作流
powerStation
.
setPlanInstanceId
(
planId
);
// 调用工作流执行第一个节点
powerStation
.
setPowerStationCode
(
peasantHousehold
.
getPeasantHouseholdNo
());
ProcessDto
processDto
=
new
ProcessDto
();
powerStation
.
setOwnersName
(
peasantHousehold
.
getOwnersName
());
processDto
.
setBusinessKey
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
powerStation
.
setProjectAddress
(
peasantHousehold
.
getProjectAddressName
());
processDto
.
setProcessDefinitionKey
(
"hygf_10001"
);
powerStation
.
setPeasantHouseholdId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
进行中
.
getName
());
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
powerStation
.
setServiceAgent
(
peasantHousehold
.
getDeveloperName
());
process
.
add
(
processDto
);
// 获取流程信息
startProcessDto
.
setProcess
(
process
);
powerStation
.
setTaskId
(
basicGridAcceptance
.
getNextTaskId
());
workflow
.
startProcess
(
basicGridAcceptance
,
startProcessDto
,
requestContext
.
getUserId
());
powerStation
.
setProcessInstanceId
(
basicGridAcceptance
.
getInstanceId
());
powerStation
=
new
PowerStation
();
powerStation
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
}
powerStation
.
setNodeRole
(
basicGridAcceptance
.
getNextExecutorIds
());
peasantHousehold
.
setSurveyOrNot
(
2
);
powerStation
.
setNodeRouting
(
PowerStationEnum
.
getNodeByKey
(
basicGridAcceptance
.
getNextNodeKey
()));
peasantHousehold
.
setReview
(
1
);
powerStation
.
setNextProcessNode
(
PowerStationNodeEnum
.
设计审核
.
getCode
());
// 插入记录表
powerStation
.
setPromoter
(
basicGridAcceptance
.
getPromoter
());
powerStation
.
setPlanInstanceId
(
planId
);
powerStation
.
setNextExecuteUserIds
(
basicGridAcceptance
.
getNextExecuteUserIds
());
powerStation
.
setPowerStationCode
(
peasantHousehold
.
getPeasantHouseholdNo
());
powerStation
.
setNextNodeName
(
basicGridAcceptance
.
getNextNodeName
());
powerStation
.
setOwnersName
(
peasantHousehold
.
getOwnersName
());
powerStation
.
setTechnologyStatus
(
""
);
powerStation
.
setProjectAddress
(
peasantHousehold
.
getProjectAddressName
());
powerStation
.
setDesignStatus
(
""
);
powerStation
.
setPeasantHouseholdId
(
String
.
valueOf
(
peasantHousehold
.
getSequenceNbr
()));
powerStation
.
setBusinessStatus
(
""
);
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
进行中
.
getName
());
powerStation
.
setServiceAgent
(
peasantHousehold
.
getDeveloperName
());
powerStationService
.
savePowerStation
(
powerStation
,
true
,
powerStation
.
getOwnersName
(),
""
);
// 获取流程信息
//
powerStation
.
setTaskId
(
basicGridAcceptance
.
getNextTaskId
());
peasantHousehold
.
setConstructionState
(
ArrivalStateeEnum
.
勘察中
.
getCode
());
powerStation
.
setProcessInstanceId
(
basicGridAcceptance
.
getInstanceId
());
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
powerStation
.
setFlowTaskId
(
basicGridAcceptance
.
getNextTaskId
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
勘察中
.
getCode
());
powerStation
.
setNodeRole
(
basicGridAcceptance
.
getNextExecutorIds
());
long
idsk
=
peasantHousehold
.
getSequenceNbr
();
powerStation
.
setNodeRouting
(
PowerStationEnum
.
getNodeByKey
(
basicGridAcceptance
.
getNextNodeKey
()));
up
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
idsk
);
powerStation
.
setNextProcessNode
(
PowerStationNodeEnum
.
设计审核
.
getCode
());
peasantHouseholdMapper
.
update
(
null
,
up
);
powerStation
.
setPromoter
(
basicGridAcceptance
.
getPromoter
());
powerStation
.
setNextExecuteUserIds
(
basicGridAcceptance
.
getNextExecuteUserIds
());
}
catch
(
Exception
e
)
{
powerStation
.
setNextNodeName
(
basicGridAcceptance
.
getNextNodeName
());
e
.
printStackTrace
();
powerStation
.
setTechnologyStatus
(
""
);
log
.
error
(
"submitExamine error:"
,
e
);
powerStation
.
setDesignStatus
(
""
);
}
powerStation
.
setBusinessStatus
(
""
);
powerStationService
.
savePowerStation
(
powerStation
,
true
,
powerStation
.
getOwnersName
(),
""
);
//
peasantHousehold
.
setConstructionState
(
ArrivalStateeEnum
.
勘察中
.
getCode
());
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
勘察中
.
getCode
());
long
idsk
=
peasantHousehold
.
getSequenceNbr
();
up
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
idsk
);
peasantHouseholdMapper
.
update
(
null
,
up
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"submitExamine error:"
,
e
);
}
// PowerStation powerStation = powerStationService.getObjByNhId(String.valueOf(peasantHousehold.getSequenceNbr()), PowerStationProcessStateEnum.作废.getCode());
// PowerStation powerStation = powerStationService.getObjByNhId(String.valueOf(peasantHousehold.getSequenceNbr()), PowerStationProcessStateEnum.作废.getCode());
//
//
...
@@ -445,285 +459,285 @@ public class SurveyInformationServiceImpl
...
@@ -445,285 +459,285 @@ public class SurveyInformationServiceImpl
// e.printStackTrace();
// e.printStackTrace();
// throw new BaseException("获取工作流节点失败!","400","获取工作流节点失败!");
// throw new BaseException("获取工作流节点失败!","400","获取工作流节点失败!");
// }
// }
}
}
public
SurveyInfoAllDto
querySurveyInfo
(
String
surveyInformationId
,
String
peasantHouseholdId
,
public
SurveyInfoAllDto
querySurveyInfo
(
String
surveyInformationId
,
String
peasantHouseholdId
,
String
processInstanceId
,
AgencyUserModel
userInfo
)
{
String
processInstanceId
,
AgencyUserModel
userInfo
)
{
SurveyInfoAllDto
surveyInfoAllDto
=
new
SurveyInfoAllDto
();
SurveyInfoAllDto
surveyInfoAllDto
=
new
SurveyInfoAllDto
();
PeasantHousehold
peasantHousehold
=
new
PeasantHousehold
();
PeasantHousehold
peasantHousehold
=
new
PeasantHousehold
();
if
(!
StringUtils
.
isEmpty
(
peasantHouseholdId
))
{
if
(!
StringUtils
.
isEmpty
(
peasantHouseholdId
))
{
LambdaQueryWrapper
<
PeasantHousehold
>
peasantHouseholdWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PeasantHousehold
>
peasantHouseholdWrapper
=
new
LambdaQueryWrapper
<>();
peasantHouseholdWrapper
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
peasantHouseholdId
);
peasantHouseholdWrapper
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
peasantHouseholdId
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdWrapper
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdWrapper
);
surveyInformationId
=
String
.
valueOf
(
peasantHousehold
.
getSurveyInformationId
());
surveyInformationId
=
String
.
valueOf
(
peasantHousehold
.
getSurveyInformationId
());
}
else
{
}
else
{
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
}
}
// 勘察基本信息
// 勘察基本信息
LambdaQueryWrapper
<
SurveyInformation
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SurveyInformation
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SurveyInformation:
:
getSequenceNbr
,
surveyInformationId
);
queryWrapper
.
eq
(
SurveyInformation:
:
getSequenceNbr
,
surveyInformationId
);
SurveyInformation
surveyInformation
=
this
.
baseMapper
.
selectOne
(
queryWrapper
);
SurveyInformation
surveyInformation
=
this
.
baseMapper
.
selectOne
(
queryWrapper
);
surveyInfoAllDto
.
setSurveyInformation
(
BeanDtoUtils
.
convert
(
surveyInformation
,
SurveyInformationDto
.
class
));
surveyInfoAllDto
.
setSurveyInformation
(
BeanDtoUtils
.
convert
(
surveyInformation
,
SurveyInformationDto
.
class
));
// 农户信息
// 农户信息
// 获取用户所在经销商单位
// 获取用户所在经销商单位
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
.
getUserUnitInformationDto
(
peasantHousehold
.
getDeveloperUserId
());
.
getUserUnitInformationDto
(
peasantHousehold
.
getDeveloperUserId
());
BeanUtils
.
copyProperties
(
peasantHousehold
,
surveyInfoAllDto
.
getSurveyInformation
());
BeanUtils
.
copyProperties
(
peasantHousehold
,
surveyInfoAllDto
.
getSurveyInformation
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperName
(
userUnitInformationDto
.
getAmosDealerName
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperName
(
userUnitInformationDto
.
getAmosDealerName
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperCode
(
userUnitInformationDto
.
getAmosDealerOrgCode
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperCode
(
userUnitInformationDto
.
getAmosDealerOrgCode
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperId
(
userUnitInformationDto
.
getAmosDealerId
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperId
(
userUnitInformationDto
.
getAmosDealerId
());
if
(
surveyInfoAllDto
.
getSurveyInformation
().
getSalesmanId
()
==
null
)
{
if
(
surveyInfoAllDto
.
getSurveyInformation
().
getSalesmanId
()
==
null
)
{
surveyInfoAllDto
.
getSurveyInformation
().
setSalesmanId
(
peasantHousehold
.
getDeveloperUserId
());
surveyInfoAllDto
.
getSurveyInformation
().
setSalesmanId
(
peasantHousehold
.
getDeveloperUserId
());
surveyInfoAllDto
.
getSurveyInformation
().
setSalesman
(
peasantHousehold
.
getDeveloper
());
surveyInfoAllDto
.
getSurveyInformation
().
setSalesman
(
peasantHousehold
.
getDeveloper
());
surveyInfoAllDto
.
getSurveyInformation
().
setCreator
(
peasantHousehold
.
getDeveloper
());
surveyInfoAllDto
.
getSurveyInformation
().
setCreator
(
peasantHousehold
.
getDeveloper
());
}
}
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getProjectAddressName
()))
{
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getProjectAddressName
()))
{
surveyInfoAllDto
.
getSurveyInformation
()
surveyInfoAllDto
.
getSurveyInformation
()
.
setProjectAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getProjectAddressName
().
split
(
"/"
)));
.
setProjectAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getProjectAddressName
().
split
(
"/"
)));
}
}
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getPermanentAddressName
()))
{
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getPermanentAddressName
()))
{
surveyInfoAllDto
.
getSurveyInformation
()
surveyInfoAllDto
.
getSurveyInformation
()
.
setPermanentAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getPermanentAddressName
().
split
(
"/"
)));
.
setPermanentAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getPermanentAddressName
().
split
(
"/"
)));
}
}
if
(
peasantHousehold
.
getPermanentAddress
()
==
null
)
{
if
(
peasantHousehold
.
getPermanentAddress
()
==
null
)
{
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddress
(
peasantHousehold
.
getProjectAddress
());
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddress
(
peasantHousehold
.
getProjectAddress
());
surveyInfoAllDto
.
getSurveyInformation
().
setIsPermanent
(
"1"
);
surveyInfoAllDto
.
getSurveyInformation
().
setIsPermanent
(
"1"
);
}
}
surveyInfoAllDto
.
getSurveyInformation
().
setSequenceNbr
(
surveyInformation
.
getSequenceNbr
());
surveyInfoAllDto
.
getSurveyInformation
().
setSequenceNbr
(
surveyInformation
.
getSequenceNbr
());
// 制单时间
// 制单时间
surveyInfoAllDto
.
getSurveyInformation
().
setCreatorTime
(
surveyInformation
.
getCreatorTime
());
surveyInfoAllDto
.
getSurveyInformation
().
setCreatorTime
(
surveyInformation
.
getCreatorTime
());
QueryWrapper
<
SurveyDetails
>
surveyDetailsQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
SurveyDetails
>
surveyDetailsQueryWrapper
=
new
QueryWrapper
<>();
surveyDetailsQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
surveyDetailsQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
SurveyDetails
surveyDetails
=
surveyDetailsService
.
getBaseMapper
().
selectOne
(
surveyDetailsQueryWrapper
);
SurveyDetails
surveyDetails
=
surveyDetailsService
.
getBaseMapper
().
selectOne
(
surveyDetailsQueryWrapper
);
if
(
surveyDetails
==
null
)
{
if
(
surveyDetails
==
null
)
{
surveyInfoAllDto
.
setSurveyDetails
(
new
SurveyDetailsDto
());
surveyInfoAllDto
.
setSurveyDetails
(
new
SurveyDetailsDto
());
}
else
{
}
else
{
surveyInfoAllDto
.
setSurveyDetails
(
BeanDtoUtils
.
convert
(
surveyDetails
,
SurveyDetailsDto
.
class
));
surveyInfoAllDto
.
setSurveyDetails
(
BeanDtoUtils
.
convert
(
surveyDetails
,
SurveyDetailsDto
.
class
));
}
}
QueryWrapper
<
Information
>
informationQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Information
>
informationQueryWrapper
=
new
QueryWrapper
<>();
informationQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
informationQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
Information
information
=
informationService
.
getBaseMapper
().
selectOne
(
informationQueryWrapper
);
Information
information
=
informationService
.
getBaseMapper
().
selectOne
(
informationQueryWrapper
);
QueryWrapper
<
Commercial
>
commercialQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Commercial
>
commercialQueryWrapper
=
new
QueryWrapper
<>();
commercialQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
commercialQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
Commercial
commercial
=
commercialService
.
getBaseMapper
().
selectOne
(
commercialQueryWrapper
);
Commercial
commercial
=
commercialService
.
getBaseMapper
().
selectOne
(
commercialQueryWrapper
);
if
(
commercial
==
null
)
{
if
(
commercial
==
null
)
{
commercial
=
new
Commercial
();
commercial
=
new
Commercial
();
}
}
if
(
information
==
null
)
{
if
(
information
==
null
)
{
surveyInfoAllDto
.
setInformation
(
new
InformationDto
());
surveyInfoAllDto
.
setInformation
(
new
InformationDto
());
}
else
{
}
else
{
information
.
setHouseProve
(
null
==
commercial
?
new
ArrayList
<>()
information
.
setHouseProve
(
null
==
commercial
?
new
ArrayList
<>()
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())
?
commercial
.
getRealEstateLegal
()
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())
?
commercial
.
getRealEstateLegal
()
:
new
ArrayList
<>()));
:
new
ArrayList
<>()));
information
.
setCardFile
(
null
==
commercial
?
new
ArrayList
<>()
information
.
setCardFile
(
null
==
commercial
?
new
ArrayList
<>()
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())
?
commercial
.
getIdCardCredit
()
:
(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())
?
commercial
.
getIdCardCredit
()
:
new
ArrayList
<>()));
:
new
ArrayList
<>()));
surveyInfoAllDto
.
setInformation
(
BeanDtoUtils
.
convert
(
information
,
InformationDto
.
class
));
surveyInfoAllDto
.
setInformation
(
BeanDtoUtils
.
convert
(
information
,
InformationDto
.
class
));
}
}
commercial
.
setApplicant
(
peasantHousehold
.
getOwnersName
());
commercial
.
setApplicant
(
peasantHousehold
.
getOwnersName
());
commercial
.
setIdCard
(
peasantHousehold
.
getIdCard
());
commercial
.
setIdCard
(
peasantHousehold
.
getIdCard
());
commercial
.
setTelephone
(
peasantHousehold
.
getTelephone
());
commercial
.
setTelephone
(
peasantHousehold
.
getTelephone
());
commercial
.
setProjectAddress
(
peasantHousehold
.
getProjectAddress
());
commercial
.
setProjectAddress
(
peasantHousehold
.
getProjectAddress
());
commercial
.
setProjectAddressName
(
peasantHousehold
.
getProjectAddressName
());
commercial
.
setProjectAddressName
(
peasantHousehold
.
getProjectAddressName
());
commercial
.
setProjectAddressDetail
(
peasantHousehold
.
getProjectAddressDetail
());
commercial
.
setProjectAddressDetail
(
peasantHousehold
.
getProjectAddressDetail
());
commercial
.
setLegalContactTelephone
(
peasantHousehold
.
getTelephone
());
commercial
.
setLegalContactTelephone
(
peasantHousehold
.
getTelephone
());
List
<
Object
>
list
=
new
ArrayList
<>();
List
<
Object
>
list
=
new
ArrayList
<>();
if
(
null
!=
surveyDetails
)
{
if
(
null
!=
surveyDetails
)
{
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getSurroundingHouseSurvey
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getSurroundingHouseSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getSurroundingHouseSurvey
());
list
.
addAll
(
surveyDetails
.
getSurroundingHouseSurvey
());
}
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getOverallHousingSurvey
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getOverallHousingSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getOverallHousingSurvey
());
list
.
addAll
(
surveyDetails
.
getOverallHousingSurvey
());
}
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPanoramaSurvey
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPanoramaSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getPanoramaSurvey
());
list
.
addAll
(
surveyDetails
.
getPanoramaSurvey
());
}
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPlanSketchSurvey
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getPlanSketchSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getPlanSketchSurvey
());
list
.
addAll
(
surveyDetails
.
getPlanSketchSurvey
());
}
}
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getAzimuthSurvey
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
surveyDetails
.
getAzimuthSurvey
()))
{
list
.
addAll
(
surveyDetails
.
getAzimuthSurvey
());
list
.
addAll
(
surveyDetails
.
getAzimuthSurvey
());
}
}
}
}
commercial
.
setSurveyPhotosWeb
(
list
);
commercial
.
setSurveyPhotosWeb
(
list
);
if
(
information
==
null
)
{
if
(
information
==
null
)
{
CommercialDto
commercialDto
=
BeanDtoUtils
.
convert
(
commercial
,
CommercialDto
.
class
);
CommercialDto
commercialDto
=
BeanDtoUtils
.
convert
(
commercial
,
CommercialDto
.
class
);
commercialDto
.
setType
(
"zrr"
);
commercialDto
.
setType
(
"zrr"
);
commercialDto
.
setLegalType
(
"zjdnhw"
);
commercialDto
.
setLegalType
(
"zjdnhw"
);
surveyInfoAllDto
.
setCommercial
(
commercialDto
);
surveyInfoAllDto
.
setCommercial
(
commercialDto
);
}
else
{
}
else
{
surveyInfoAllDto
.
setCommercial
(
BeanDtoUtils
.
convert
(
commercial
,
CommercialDto
.
class
));
surveyInfoAllDto
.
setCommercial
(
BeanDtoUtils
.
convert
(
commercial
,
CommercialDto
.
class
));
if
(
commercial
!=
null
&&
!
StringUtils
.
isEmpty
(
commercial
.
getProjectAddressName
()))
{
if
(
commercial
!=
null
&&
!
StringUtils
.
isEmpty
(
commercial
.
getProjectAddressName
()))
{
surveyInfoAllDto
.
getCommercial
()
surveyInfoAllDto
.
getCommercial
()
.
setProjectAddressText
(
Arrays
.
asList
(
commercial
.
getProjectAddressName
().
split
(
"/"
)));
.
setProjectAddressText
(
Arrays
.
asList
(
commercial
.
getProjectAddressName
().
split
(
"/"
)));
}
}
}
}
QueryWrapper
<
ExtendedInformation
>
extendedInformationQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
ExtendedInformation
>
extendedInformationQueryWrapper
=
new
QueryWrapper
<>();
extendedInformationQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
extendedInformationQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
ExtendedInformation
extendedInformation
=
extendedInformationService
.
getBaseMapper
()
ExtendedInformation
extendedInformation
=
extendedInformationService
.
getBaseMapper
()
.
selectOne
(
extendedInformationQueryWrapper
);
.
selectOne
(
extendedInformationQueryWrapper
);
if
(
information
==
null
)
{
if
(
information
==
null
)
{
surveyInfoAllDto
.
setExtendedInformation
(
new
ExtendedInformationDto
());
surveyInfoAllDto
.
setExtendedInformation
(
new
ExtendedInformationDto
());
}
else
{
}
else
{
surveyInfoAllDto
surveyInfoAllDto
.
setExtendedInformation
(
BeanDtoUtils
.
convert
(
extendedInformation
,
ExtendedInformationDto
.
class
));
.
setExtendedInformation
(
BeanDtoUtils
.
convert
(
extendedInformation
,
ExtendedInformationDto
.
class
));
}
}
QueryWrapper
<
DesignInformation
>
designInformationQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
DesignInformation
>
designInformationQueryWrapper
=
new
QueryWrapper
<>();
designInformationQueryWrapper
.
eq
(
"peasant_household_id"
,
peasantHousehold
.
getSequenceNbr
());
designInformationQueryWrapper
.
eq
(
"peasant_household_id"
,
peasantHousehold
.
getSequenceNbr
());
DesignInformation
designInformation
=
designInformationService
.
getBaseMapper
()
DesignInformation
designInformation
=
designInformationService
.
getBaseMapper
()
.
selectOne
(
designInformationQueryWrapper
);
.
selectOne
(
designInformationQueryWrapper
);
if
(
designInformation
==
null
)
{
if
(
designInformation
==
null
)
{
surveyInfoAllDto
.
setDesignInformation
(
new
DesignInformationDto
());
surveyInfoAllDto
.
setDesignInformation
(
new
DesignInformationDto
());
}
else
{
}
else
{
surveyInfoAllDto
.
setDesignInformation
(
BeanDtoUtils
.
convert
(
designInformation
,
DesignInformationDto
.
class
));
surveyInfoAllDto
.
setDesignInformation
(
BeanDtoUtils
.
convert
(
designInformation
,
DesignInformationDto
.
class
));
}
}
LambdaQueryWrapper
<
WorkOrderPowerStation
>
up1
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
WorkOrderPowerStation
>
up1
=
new
LambdaQueryWrapper
();
up1
.
eq
(
WorkOrderPowerStation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
up1
.
eq
(
WorkOrderPowerStation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
WorkOrderPowerStation
workOrderPowerStation
=
workOrderPowerStationMapper
.
selectOne
(
up1
);
WorkOrderPowerStation
workOrderPowerStation
=
workOrderPowerStationMapper
.
selectOne
(
up1
);
if
(
workOrderPowerStation
!=
null
)
{
if
(
workOrderPowerStation
!=
null
)
{
Long
workOrderId
=
workOrderPowerStation
.
getWorkOrderId
();
Long
workOrderId
=
workOrderPowerStation
.
getWorkOrderId
();
Long
workOrderPowerStationId
=
workOrderPowerStation
.
getSequenceNbr
();
Long
workOrderPowerStationId
=
workOrderPowerStation
.
getSequenceNbr
();
// 派工单信息
// 派工单信息
LambdaQueryWrapper
<
WorkOrder
>
upl
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
WorkOrder
>
upl
=
new
LambdaQueryWrapper
();
upl
.
eq
(
WorkOrder:
:
getSequenceNbr
,
workOrderId
);
upl
.
eq
(
WorkOrder:
:
getSequenceNbr
,
workOrderId
);
WorkOrder
workOrder
=
workOrderMapper
.
selectOne
(
upl
);
WorkOrder
workOrder
=
workOrderMapper
.
selectOne
(
upl
);
// 施工信息
// 施工信息
LambdaQueryWrapper
<
PowerStationConstructionData
>
up2
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
PowerStationConstructionData
>
up2
=
new
LambdaQueryWrapper
();
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderId
,
workOrderId
);
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderId
,
workOrderId
);
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
up2
.
eq
(
PowerStationConstructionData:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
PowerStationConstructionData
powerStationConstructionData
=
powerStationConstructionDataMapper
PowerStationConstructionData
powerStationConstructionData
=
powerStationConstructionDataMapper
.
selectOne
(
up2
);
.
selectOne
(
up2
);
// 工程信息
// 工程信息
LambdaQueryWrapper
<
PowerStationEngineeringInfo
>
up3
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
PowerStationEngineeringInfo
>
up3
=
new
LambdaQueryWrapper
();
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderId
,
workOrderId
);
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderId
,
workOrderId
);
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
up3
.
eq
(
PowerStationEngineeringInfo:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
PowerStationEngineeringInfo
powerStationEngineeringInfo
=
powerStationEngineeringInfoMapper
.
selectOne
(
up3
);
PowerStationEngineeringInfo
powerStationEngineeringInfo
=
powerStationEngineeringInfoMapper
.
selectOne
(
up3
);
if
(
powerStationConstructionData
!=
null
)
{
if
(
powerStationConstructionData
!=
null
)
{
powerStationEngineeringInfo
=
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo
powerStationEngineeringInfo
=
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo
:
new
PowerStationEngineeringInfo
();
:
new
PowerStationEngineeringInfo
();
powerStationEngineeringInfo
powerStationEngineeringInfo
.
setConstructionComponentInfo
(
powerStationConstructionData
.
getConstructionComponentInfo
());
.
setConstructionComponentInfo
(
powerStationConstructionData
.
getConstructionComponentInfo
());
powerStationEngineeringInfo
powerStationEngineeringInfo
.
setConstructionInverterInfo
(
powerStationConstructionData
.
getConstructionInverterInfo
());
.
setConstructionInverterInfo
(
powerStationConstructionData
.
getConstructionInverterInfo
());
powerStationEngineeringInfo
.
setConstructionCollectorBoxInfo
(
powerStationEngineeringInfo
.
setConstructionCollectorBoxInfo
(
powerStationConstructionData
.
getConstructionCollectorBoxInfo
());
powerStationConstructionData
.
getConstructionCollectorBoxInfo
());
powerStationEngineeringInfo
powerStationEngineeringInfo
.
setConstructionGridBoxInfo
(
powerStationConstructionData
.
getConstructionGridBoxInfo
());
.
setConstructionGridBoxInfo
(
powerStationConstructionData
.
getConstructionGridBoxInfo
());
powerStationEngineeringInfo
.
setProjectRegionManager
(
workOrder
.
getProjectRegionManager
());
powerStationEngineeringInfo
.
setProjectRegionManager
(
workOrder
.
getProjectRegionManager
());
powerStationEngineeringInfo
.
setProjectRegionManagerPhone
(
workOrder
.
getProjectRegionManagerPhone
());
powerStationEngineeringInfo
.
setProjectRegionManagerPhone
(
workOrder
.
getProjectRegionManagerPhone
());
powerStationEngineeringInfo
.
setConstructionRegionManager
(
workOrder
.
getConstructionRegionManager
());
powerStationEngineeringInfo
.
setConstructionRegionManager
(
workOrder
.
getConstructionRegionManager
());
powerStationEngineeringInfo
powerStationEngineeringInfo
.
setConstructionRegionManagerPhone
(
workOrder
.
getConstructionRegionManagerPhone
());
.
setConstructionRegionManagerPhone
(
workOrder
.
getConstructionRegionManagerPhone
());
}
}
// 并网信息
// 并网信息
LambdaQueryWrapper
<
HygfOnGrid
>
up4
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
HygfOnGrid
>
up4
=
new
LambdaQueryWrapper
();
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderId
,
workOrderId
);
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderId
,
workOrderId
);
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
up4
.
eq
(
HygfOnGrid:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
HygfOnGrid
hygfOnGrid
=
hygfOnGridMapper
.
selectOne
(
up4
);
HygfOnGrid
hygfOnGrid
=
hygfOnGridMapper
.
selectOne
(
up4
);
surveyInfoAllDto
.
setHygfOnGrid
(
hygfOnGrid
!=
null
?
hygfOnGrid
:
new
HygfOnGrid
());
surveyInfoAllDto
.
setHygfOnGrid
(
hygfOnGrid
!=
null
?
hygfOnGrid
:
new
HygfOnGrid
());
surveyInfoAllDto
surveyInfoAllDto
.
setPowerStationConstructionData
(
powerStationConstructionData
!=
null
?
powerStationConstructionData
.
setPowerStationConstructionData
(
powerStationConstructionData
!=
null
?
powerStationConstructionData
:
new
PowerStationConstructionData
());
:
new
PowerStationConstructionData
());
surveyInfoAllDto
surveyInfoAllDto
.
setPowerStationEngineeringInfo
(
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo
.
setPowerStationEngineeringInfo
(
powerStationEngineeringInfo
!=
null
?
powerStationEngineeringInfo
:
new
PowerStationEngineeringInfo
());
:
new
PowerStationEngineeringInfo
());
surveyInfoAllDto
.
setWorkOrder
(
workOrder
!=
null
?
workOrder
:
new
WorkOrder
());
surveyInfoAllDto
.
setWorkOrder
(
workOrder
!=
null
?
workOrder
:
new
WorkOrder
());
}
else
{
}
else
{
surveyInfoAllDto
.
setHygfOnGrid
(
new
HygfOnGrid
());
surveyInfoAllDto
.
setHygfOnGrid
(
new
HygfOnGrid
());
surveyInfoAllDto
.
setPowerStationConstructionData
(
new
PowerStationConstructionData
());
surveyInfoAllDto
.
setPowerStationConstructionData
(
new
PowerStationConstructionData
());
surveyInfoAllDto
.
setPowerStationEngineeringInfo
(
new
PowerStationEngineeringInfo
());
surveyInfoAllDto
.
setPowerStationEngineeringInfo
(
new
PowerStationEngineeringInfo
());
surveyInfoAllDto
.
setWorkOrder
(
new
WorkOrder
());
surveyInfoAllDto
.
setWorkOrder
(
new
WorkOrder
());
}
}
if
(!
StringUtils
.
isEmpty
(
processInstanceId
))
{
if
(!
StringUtils
.
isEmpty
(
processInstanceId
))
{
try
{
try
{
Map
<
String
,
Object
>
flowLoggerMap
=
workflowFeignClient
.
getFlowLogger
(
processInstanceId
).
getResult
();
Map
<
String
,
Object
>
flowLoggerMap
=
workflowFeignClient
.
getFlowLogger
(
processInstanceId
).
getResult
();
List
<
LinkedHashMap
>
flowLogger
=
(
List
<
LinkedHashMap
>)
flowLoggerMap
.
get
(
"flowLogger"
);
List
<
LinkedHashMap
>
flowLogger
=
(
List
<
LinkedHashMap
>)
flowLoggerMap
.
get
(
"flowLogger"
);
if
(
flowLogger
.
size
()
>
0
)
{
if
(
flowLogger
.
size
()
>
0
)
{
Collections
.
reverse
(
flowLogger
);
Collections
.
reverse
(
flowLogger
);
}
}
List
<
LinkedHashMap
>
flowLoggernew
=
new
ArrayList
<>();
List
<
LinkedHashMap
>
flowLoggernew
=
new
ArrayList
<>();
for
(
LinkedHashMap
linkedHashMap
:
flowLogger
)
{
for
(
LinkedHashMap
linkedHashMap
:
flowLogger
)
{
if
(
linkedHashMap
.
get
(
"operateDate"
)
!=
null
if
(
linkedHashMap
.
get
(
"operateDate"
)
!=
null
&&
!
linkedHashMap
.
get
(
"operateDate"
).
toString
().
isEmpty
())
{
&&
!
linkedHashMap
.
get
(
"operateDate"
).
toString
().
isEmpty
())
{
LinkedHashMap
linke
=
new
LinkedHashMap
();
LinkedHashMap
linke
=
new
LinkedHashMap
();
linke
.
put
(
"approvalStatue"
,
linkedHashMap
.
get
(
"approvalStatue"
).
toString
());
linke
.
put
(
"approvalStatue"
,
linkedHashMap
.
get
(
"approvalStatue"
).
toString
());
// 审核意见
// 审核意见
List
<
LinkedHashMap
>
approvalSuggestion
=
(
List
<
LinkedHashMap
>)
linkedHashMap
List
<
LinkedHashMap
>
approvalSuggestion
=
(
List
<
LinkedHashMap
>)
linkedHashMap
.
get
(
"approvalSuggestion"
);
.
get
(
"approvalSuggestion"
);
if
(
approvalSuggestion
!=
null
&&
!
approvalSuggestion
.
isEmpty
())
{
if
(
approvalSuggestion
!=
null
&&
!
approvalSuggestion
.
isEmpty
())
{
linke
.
put
(
"approvalSuggestion"
,
approvalSuggestion
.
get
(
0
).
get
(
"message"
));
linke
.
put
(
"approvalSuggestion"
,
approvalSuggestion
.
get
(
0
).
get
(
"message"
));
}
}
linke
.
put
(
"taskName"
,
linkedHashMap
.
get
(
"taskName"
).
toString
());
linke
.
put
(
"taskName"
,
linkedHashMap
.
get
(
"taskName"
).
toString
());
linke
.
put
(
"operator"
,
linkedHashMap
.
get
(
"operator"
).
toString
());
linke
.
put
(
"operator"
,
linkedHashMap
.
get
(
"operator"
).
toString
());
linke
.
put
(
"operateDate"
,
linkedHashMap
.
get
(
"operateDate"
).
toString
());
linke
.
put
(
"operateDate"
,
linkedHashMap
.
get
(
"operateDate"
).
toString
());
flowLoggernew
.
add
(
linke
);
flowLoggernew
.
add
(
linke
);
}
}
}
}
LoggerDto
loggerDto
=
new
LoggerDto
();
LoggerDto
loggerDto
=
new
LoggerDto
();
loggerDto
.
setLogger
(
flowLoggernew
);
loggerDto
.
setLogger
(
flowLoggernew
);
surveyInfoAllDto
.
setOrderTracking
(
loggerDto
);
surveyInfoAllDto
.
setOrderTracking
(
loggerDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
return
surveyInfoAllDto
;
return
surveyInfoAllDto
;
}
}
public
JSONArray
getRegionName
()
{
public
JSONArray
getRegionName
()
{
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
jsonArray
=
new
JSONArray
();
if
(
redisUtils
.
hasKey
(
regionRedis
))
{
if
(
redisUtils
.
hasKey
(
regionRedis
))
{
jsonArray
=
JSONArray
.
parseArray
(
redisUtils
.
get
(
regionRedis
).
toString
());
jsonArray
=
JSONArray
.
parseArray
(
redisUtils
.
get
(
regionRedis
).
toString
());
}
else
{
}
else
{
Collection
<
RegionModel
>
regionChild
=
new
ArrayList
<>();
Collection
<
RegionModel
>
regionChild
=
new
ArrayList
<>();
RegionModel
regionModel1
=
new
RegionModel
();
RegionModel
regionModel1
=
new
RegionModel
();
regionChild
.
add
(
regionModel1
);
regionChild
.
add
(
regionModel1
);
FeignClientResult
<
Collection
<
RegionModel
>>
collectionFeignClientResult
=
Systemctl
.
regionClient
FeignClientResult
<
Collection
<
RegionModel
>>
collectionFeignClientResult
=
Systemctl
.
regionClient
.
queryForTreeParent
(
610000L
);
.
queryForTreeParent
(
610000L
);
Collection
<
RegionModel
>
result
=
collectionFeignClientResult
.
getResult
();
Collection
<
RegionModel
>
result
=
collectionFeignClientResult
.
getResult
();
for
(
RegionModel
regionModel
:
result
)
{
for
(
RegionModel
regionModel
:
result
)
{
if
(
regionModel
.
getChildren
()
!=
null
&&
!
regionModel
.
getChildren
().
isEmpty
())
{
if
(
regionModel
.
getChildren
()
!=
null
&&
!
regionModel
.
getChildren
().
isEmpty
())
{
for
(
RegionModel
child
:
regionModel
.
getChildren
())
{
for
(
RegionModel
child
:
regionModel
.
getChildren
())
{
if
(
child
.
getChildren
()
!=
null
&&
!
child
.
getChildren
().
isEmpty
())
{
if
(
child
.
getChildren
()
!=
null
&&
!
child
.
getChildren
().
isEmpty
())
{
for
(
RegionModel
childChild
:
child
.
getChildren
())
{
for
(
RegionModel
childChild
:
child
.
getChildren
())
{
jsonArray
.
add
(
childChild
);
jsonArray
.
add
(
childChild
);
}
}
child
.
setChildren
(
regionChild
);
child
.
setChildren
(
regionChild
);
jsonArray
.
add
(
child
);
jsonArray
.
add
(
child
);
}
}
}
}
}
}
regionModel
.
setChildren
(
regionChild
);
regionModel
.
setChildren
(
regionChild
);
jsonArray
.
add
(
regionModel
);
jsonArray
.
add
(
regionModel
);
}
}
redisUtils
.
set
(
regionRedis
,
jsonArray
);
redisUtils
.
set
(
regionRedis
,
jsonArray
);
}
}
return
jsonArray
;
return
jsonArray
;
}
}
}
}
\ No newline at end of file
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