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
56677fe9
Commit
56677fe9
authored
Sep 02, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电站管理列表添加字段
parent
763a1e03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
62 deletions
+78
-62
PowerStationDto.java
...eejoin/amos/boot/module/hygf/api/dto/PowerStationDto.java
+3
-0
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+75
-62
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PowerStationDto.java
View file @
56677fe9
...
@@ -94,4 +94,7 @@ public class PowerStationDto extends BaseDto {
...
@@ -94,4 +94,7 @@ public class PowerStationDto extends BaseDto {
@ApiModelProperty
(
value
=
"合同状态"
)
@ApiModelProperty
(
value
=
"合同状态"
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
value
=
"电站安装规模"
)
private
String
scale
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PowerStationServiceImpl.java
View file @
56677fe9
...
@@ -94,7 +94,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -94,7 +94,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
private
RedisLockUtil
redisLockUtil
;
private
RedisLockUtil
redisLockUtil
;
public
Page
<
PowerStationDto
>
queryForPowerStationUserRoles
(
Page
<
PowerStationDto
>
page
,
String
powerStationCode
,
public
Page
<
PowerStationDto
>
queryForPowerStationUserRoles
(
Page
<
PowerStationDto
>
page
,
String
powerStationCode
,
String
ownersName
,
AgencyUserModel
userInfo
,
String
serviceAgent
,
String
regionalCompaniesName
,
String
processStatus
)
{
String
ownersName
,
AgencyUserModel
userInfo
,
String
serviceAgent
,
String
regionalCompaniesName
,
String
processStatus
)
{
// Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles();
// Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles();
// Collection<List<RoleModel>> roleModels = orgRoles.values();
// Collection<List<RoleModel>> roleModels = orgRoles.values();
// if(roleModels !=null){
// if(roleModels !=null){
...
@@ -118,13 +118,26 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -118,13 +118,26 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// return
// return
// this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent);
// this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent);
return
this
.
queryPage
((
int
)
page
.
getCurrent
(),
(
int
)
page
.
getSize
(),
powerStationCode
,
ownersName
,
serviceAgent
,
regionalCompaniesName
,
processStatus
);
Page
<
PowerStationDto
>
powerStationDtoPage
=
this
.
queryPage
((
int
)
page
.
getCurrent
(),
(
int
)
page
.
getSize
(),
powerStationCode
,
ownersName
,
serviceAgent
,
regionalCompaniesName
,
processStatus
);
if
(
powerStationDtoPage
.
getRecords
()
!=
null
&&
powerStationDtoPage
.
getRecords
().
size
()
>
0
)
{
powerStationDtoPage
.
getRecords
().
forEach
(
e
->
{
if
(
e
.
getPowerStationCode
()
!=
null
)
{
e
.
setScale
(
householdContractMapper
.
getHygfCommercialScale
(
e
.
getPowerStationCode
()));
}
});
}
return
powerStationDtoPage
;
}
}
// 查询电站审核记录
// 查询电站审核记录
public
Page
<
PowerStationDto
>
queryPage
(
int
current
,
int
size
,
String
powerStationCode
,
String
ownersName
,
public
Page
<
PowerStationDto
>
queryPage
(
int
current
,
int
size
,
String
powerStationCode
,
String
ownersName
,
String
serviceAgent
,
String
regionalCompaniesName
,
String
processStatus
)
{
String
serviceAgent
,
String
regionalCompaniesName
,
String
processStatus
)
{
PageHelper
.
startPage
(
current
,
size
);
PageHelper
.
startPage
(
current
,
size
);
List
<
PowerStationDto
>
list
=
powerStationMapper
.
queryPage
(
powerStationCode
,
ownersName
,
serviceAgent
,
regionalCompaniesName
,
processStatus
);
List
<
PowerStationDto
>
list
=
powerStationMapper
.
queryPage
(
powerStationCode
,
ownersName
,
serviceAgent
,
regionalCompaniesName
,
processStatus
);
...
@@ -241,7 +254,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -241,7 +254,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
@Override
@Override
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
String
lockName
=
String
.
format
(
"LockName:powerStationExamine:%s"
,
stationId
);
String
lockName
=
String
.
format
(
"LockName:powerStationExamine:%s"
,
stationId
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
...
@@ -266,33 +279,33 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -266,33 +279,33 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
}
}
PowerStationProcessStateEnum
resultObj
=
PowerStationProcessStateEnum
.
getStateByResult
(
result
);
PowerStationProcessStateEnum
resultObj
=
PowerStationProcessStateEnum
.
getStateByResult
(
result
);
switch
(
nodeByCode
)
{
switch
(
nodeByCode
)
{
case
设计审核
:
case
设计审核
:
powerStation
.
setTechnologyStatus
(
resultObj
.
getName
());
powerStation
.
setTechnologyStatus
(
resultObj
.
getName
());
break
;
break
;
case
投融审核
:
case
投融审核
:
powerStation
.
setDesignStatus
(
resultObj
.
getName
());
powerStation
.
setDesignStatus
(
resultObj
.
getName
());
break
;
break
;
case
法务审核
:
case
法务审核
:
powerStation
.
setBusinessStatus
(
resultObj
.
getName
());
powerStation
.
setBusinessStatus
(
resultObj
.
getName
());
if
(
VERIFY_RESULT_YES
.
equals
(
result
))
{
if
(
VERIFY_RESULT_YES
.
equals
(
result
))
{
LambdaUpdateWrapper
<
HouseholdContract
>
lambdaUw
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
HouseholdContract
>
lambdaUw
=
new
LambdaUpdateWrapper
<>();
lambdaUw
.
eq
(
HouseholdContract:
:
getPeasantHouseholdId
,
powerStation
.
getPeasantHouseholdId
());
lambdaUw
.
eq
(
HouseholdContract:
:
getPeasantHouseholdId
,
powerStation
.
getPeasantHouseholdId
());
lambdaUw
.
set
(
HouseholdContract:
:
getSurveyStatus
,
HouseholdContractEnum
.
勘察状态
_
已勘察
.
getCode
());
lambdaUw
.
set
(
HouseholdContract:
:
getSurveyStatus
,
HouseholdContractEnum
.
勘察状态
_
已勘察
.
getCode
());
householdContractServiceImpl
.
update
(
lambdaUw
);
householdContractServiceImpl
.
update
(
lambdaUw
);
}
}
break
;
break
;
case
文件审核
:
case
文件审核
:
if
(
VERIFY_RESULT_YES
.
equals
(
result
))
{
if
(
VERIFY_RESULT_YES
.
equals
(
result
))
{
flag
=
false
;
flag
=
false
;
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
完成
.
getName
());
powerStation
.
setProcessStatus
(
PowerStationProcessStateEnum
.
完成
.
getName
());
}
}
powerStation
.
setDrawingReview
(
resultObj
.
getName
());
powerStation
.
setDrawingReview
(
resultObj
.
getName
());
break
;
break
;
default
:
default
:
break
;
break
;
}
}
}
}
meg
=
"任务明细:"
+
nodeByCode
+
(
VERIFY_RESULT_YES
.
equals
(
result
)
?
"通过"
:
"不通过"
);
meg
=
"任务明细:"
+
nodeByCode
+
(
VERIFY_RESULT_YES
.
equals
(
result
)
?
"通过"
:
"不通过"
);
...
@@ -462,45 +475,45 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -462,45 +475,45 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
public
WorkDto
getNodeInfoCode
(
String
flowTaskId
)
{
public
WorkDto
getNodeInfoCode
(
String
flowTaskId
)
{
WorkDto
workDto
=
null
;
WorkDto
workDto
=
null
;
FeignClientResult
<
JSONObject
>
jSONObject
=
workflowFeignClient
.
getNodeInfo
(
flowTaskId
);
FeignClientResult
<
JSONObject
>
jSONObject
=
workflowFeignClient
.
getNodeInfo
(
flowTaskId
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
getStatus
())))
{
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
getStatus
())))
{
JSONObject
js
=
jSONObject
.
getResult
();
JSONObject
js
=
jSONObject
.
getResult
();
if
(
js
==
null
)
{
if
(
js
==
null
)
{
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
LinkedHashMap
taskInfo
=
js
.
get
(
"taskInfo"
)
!=
null
?
(
LinkedHashMap
)
js
.
get
(
"taskInfo"
)
:
null
;
String
nextProcessNode
=
taskInfo
!=
null
?
taskInfo
.
get
(
"taskDefinitionKey"
).
toString
()
:
null
;
List
<
LinkedHashMap
>
executor
=
js
.
get
(
"executor"
)
!=
null
?
(
List
<
LinkedHashMap
>)
js
.
get
(
"executor"
)
:
null
;
String
nodeRole
=
null
;
if
(!
executor
.
isEmpty
())
{
List
<
String
>
idList
=
executor
.
stream
().
map
(
e
->
e
.
get
(
"groupId"
).
toString
())
.
collect
(
Collectors
.
toList
());
nodeRole
=
StringUtils
.
join
(
idList
,
","
);
}
LinkedHashMap
extensionInfo
=
js
.
get
(
"extensionInfo"
)
!=
null
?
(
LinkedHashMap
)
js
.
get
(
"extensionInfo"
)
:
null
;
String
nodeRouting
=
extensionInfo
!=
null
?
extensionInfo
.
get
(
"nodeRole"
).
toString
()
:
null
;
workDto
=
new
WorkDto
(
nodeRouting
,
nodeRole
,
nextProcessNode
);
}
}
LinkedHashMap
taskInfo
=
js
.
get
(
"taskInfo"
)
!=
null
?
(
LinkedHashMap
)
js
.
get
(
"taskInfo"
)
:
null
;
String
nextProcessNode
=
taskInfo
!=
null
?
taskInfo
.
get
(
"taskDefinitionKey"
).
toString
()
:
null
;
List
<
LinkedHashMap
>
executor
=
js
.
get
(
"executor"
)
!=
null
?
(
List
<
LinkedHashMap
>)
js
.
get
(
"executor"
)
:
null
;
String
nodeRole
=
null
;
if
(!
executor
.
isEmpty
())
{
List
<
String
>
idList
=
executor
.
stream
().
map
(
e
->
e
.
get
(
"groupId"
).
toString
())
.
collect
(
Collectors
.
toList
());
nodeRole
=
StringUtils
.
join
(
idList
,
","
);
}
LinkedHashMap
extensionInfo
=
js
.
get
(
"extensionInfo"
)
!=
null
?
(
LinkedHashMap
)
js
.
get
(
"extensionInfo"
)
:
null
;
String
nodeRouting
=
extensionInfo
!=
null
?
extensionInfo
.
get
(
"nodeRole"
).
toString
()
:
null
;
workDto
=
new
WorkDto
(
nodeRouting
,
nodeRole
,
nextProcessNode
);
}
return
workDto
;
return
workDto
;
}
}
public
String
getTaskNoAuth
(
String
processInstanceId
)
{
public
String
getTaskNoAuth
(
String
processInstanceId
)
{
String
flowTaskId
=
null
;
String
flowTaskId
=
null
;
JSONObject
jSONObject
=
workflowFeignClient
.
getTaskNoAuth
(
processInstanceId
);
JSONObject
jSONObject
=
workflowFeignClient
.
getTaskNoAuth
(
processInstanceId
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
get
(
"code"
))))
{
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
get
(
"code"
))))
{
LinkedHashMap
jsd
=
jSONObject
.
get
(
"data"
)
!=
null
?
(
LinkedHashMap
)
jSONObject
.
get
(
"data"
)
:
null
;
LinkedHashMap
jsd
=
jSONObject
.
get
(
"data"
)
!=
null
?
(
LinkedHashMap
)
jSONObject
.
get
(
"data"
)
:
null
;
flowTaskId
=
jsd
!=
null
?
jsd
.
get
(
"id"
).
toString
()
:
null
;
flowTaskId
=
jsd
!=
null
?
jsd
.
get
(
"id"
).
toString
()
:
null
;
}
}
if
(
flowTaskId
==
null
)
{
if
(
flowTaskId
==
null
)
{
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
return
flowTaskId
;
return
flowTaskId
;
}
}
...
...
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