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
29a24476
Commit
29a24476
authored
Jul 04, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 20235 、20255、20232、20340、20228
parent
b54f6632
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
6 deletions
+29
-6
AcceptanceStatusEnum.java
.../amos/boot/module/hygf/api/Enum/AcceptanceStatusEnum.java
+11
-0
AcceptanceRectificationOrderServiceImpl.java
...service/impl/AcceptanceRectificationOrderServiceImpl.java
+1
-1
AcceptanceServiceImpl.java
...t/module/hygf/biz/service/impl/AcceptanceServiceImpl.java
+2
-2
BasicGridAcceptanceServiceImpl.java
...hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
+13
-1
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+1
-1
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/AcceptanceStatusEnum.java
View file @
29a24476
...
@@ -72,4 +72,15 @@ public enum AcceptanceStatusEnum {
...
@@ -72,4 +72,15 @@ public enum AcceptanceStatusEnum {
}
}
return
acceptanceStatusEnum
.
getCode
();
return
acceptanceStatusEnum
.
getCode
();
}
}
public
static
AcceptanceStatusEnum
getAcceptanceStatusByKey
(
String
Key
,
String
state
)
{
AcceptanceStatusEnum
acceptanceStatusEnum
=
null
;
for
(
AcceptanceStatusEnum
type
:
AcceptanceStatusEnum
.
values
())
{
if
(
type
.
getKey
().
contains
(
Key
)
&&
type
.
getState
().
equals
(
state
))
{
acceptanceStatusEnum
=
type
;
break
;
}
}
return
acceptanceStatusEnum
;
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/AcceptanceRectificationOrderServiceImpl.java
View file @
29a24476
...
@@ -114,7 +114,7 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
...
@@ -114,7 +114,7 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
String
lockName
=
String
.
format
(
"LockName:updateAndDriveWorkflow:%s"
,
entity
.
getSequenceNbr
());
String
lockName
=
String
.
format
(
"LockName:updateAndDriveWorkflow:%s"
,
entity
.
getSequenceNbr
());
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
throw
new
BadRequest
(
"其他用户正在操作,请
稍
后再试!"
);
throw
new
BadRequest
(
"其他用户正在操作,请
刷新
后再试!"
);
}
}
try
{
try
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/AcceptanceServiceImpl.java
View file @
29a24476
...
@@ -120,12 +120,12 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
...
@@ -120,12 +120,12 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
String
lockName
=
String
.
format
(
"LockName:checkAccept:%s"
,
basicGridAcceptanceId
);
String
lockName
=
String
.
format
(
"LockName:checkAccept:%s"
,
basicGridAcceptanceId
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
throw
new
BadRequest
(
"其他用户正在操作,请
稍
后再试!"
);
throw
new
BadRequest
(
"其他用户正在操作,请
刷新
后再试!"
);
}
}
try
{
try
{
BasicGridAcceptance
basicGridAcceptanc
=
basicGridAcceptanceMapper
.
selectById
(
basicGridAcceptanceId
);
BasicGridAcceptance
basicGridAcceptanc
=
basicGridAcceptanceMapper
.
selectById
(
basicGridAcceptanceId
);
if
(
AcceptanceStatusEnum
.
待投融验收
.
getCode
().
equals
(
basicGridAcceptanc
.
getAcceptanceStatus
()))
{
if
(
AcceptanceStatusEnum
.
待投融验收
.
getCode
().
equals
(
basicGridAcceptanc
.
getAcceptanceStatus
()))
{
throw
new
BadRequest
(
"待投融验收,请稍后再试!"
);
throw
new
BadRequest
(
"
验收状态已变更为
待投融验收,请稍后再试!"
);
}
}
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
待投融验收
.
getCode
());
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
待投融验收
.
getCode
());
basicGridAcceptanc
.
setAcceptanceRecDate
(
new
Date
());
basicGridAcceptanc
.
setAcceptanceRecDate
(
new
Date
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
View file @
29a24476
...
@@ -210,12 +210,18 @@ public class BasicGridAcceptanceServiceImpl
...
@@ -210,12 +210,18 @@ public class BasicGridAcceptanceServiceImpl
String
lockName
=
String
.
format
(
"LockName:executeWorkflow:%s"
,
dto
.
getBasicGridAcceptanceId
());
String
lockName
=
String
.
format
(
"LockName:executeWorkflow:%s"
,
dto
.
getBasicGridAcceptanceId
());
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
throw
new
BadRequest
(
"其他用户正在操作,请
稍
后再试!"
);
throw
new
BadRequest
(
"其他用户正在操作,请
刷新
后再试!"
);
}
}
try
{
try
{
// 查询并网审批信息
// 查询并网审批信息
BasicGridAcceptance
basicGridAcceptanc
=
basicGridAcceptanceMapper
.
selectById
(
dto
.
getBasicGridAcceptanceId
());
BasicGridAcceptance
basicGridAcceptanc
=
basicGridAcceptanceMapper
.
selectById
(
dto
.
getBasicGridAcceptanceId
());
String
beforeAcceptanceStatus
=
basicGridAcceptanc
.
getAcceptanceStatus
();
String
nextNodeKey
=
basicGridAcceptanc
.
getNextNodeKey
();
String
nextNodeKey
=
basicGridAcceptanc
.
getNextNodeKey
();
AcceptanceStatusEnum
acceptanceStatus
=
AcceptanceStatusEnum
.
getAcceptanceStatusByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
());
if
(
acceptanceStatus
==
null
)
{
// 说明工作流节点状态执行错误
throw
new
BadRequest
(
"其他用户正在操作,请刷新后再试!"
);
}
if
(
OK
.
equals
(
dto
.
getApprovalStatus
()))
{
if
(
OK
.
equals
(
dto
.
getApprovalStatus
()))
{
if
(
BasicGridAcceptancEnum
.
并网管理端工程审核
.
getCode
().
equals
(
nextNodeKey
))
{
if
(
BasicGridAcceptancEnum
.
并网管理端工程审核
.
getCode
().
equals
(
nextNodeKey
))
{
basicGridAcceptanc
.
setGridStatus
(
GridStatusEnum
.
YWC
.
getCode
());
basicGridAcceptanc
.
setGridStatus
(
GridStatusEnum
.
YWC
.
getCode
());
...
@@ -273,6 +279,12 @@ public class BasicGridAcceptanceServiceImpl
...
@@ -273,6 +279,12 @@ public class BasicGridAcceptanceServiceImpl
}
}
}
}
if
(
AcceptanceStatusEnum
.
线下验收不通过
.
getCode
().
equals
(
basicGridAcceptanc
.
getAcceptanceStatus
()))
{
if
(
AcceptanceStatusEnum
.
线下验收完成
.
getCode
().
equals
(
beforeAcceptanceStatus
))
{
throw
new
BadRequest
(
"验收状态已更改为线下验收不通过,请刷新后再试!"
);
}
}
if
(
nextNodeKey
.
equals
(
BasicGridAcceptancEnum
.
管理端工程线下验
.
getCode
()))
{
if
(
nextNodeKey
.
equals
(
BasicGridAcceptancEnum
.
管理端工程线下验
.
getCode
()))
{
dto
.
setWorkOrderId
(
basicGridAcceptanc
.
getWorkOrderId
());
dto
.
setWorkOrderId
(
basicGridAcceptanc
.
getWorkOrderId
());
dto
.
setWorkOrderPowerStationId
(
basicGridAcceptanc
.
getWorkOrderPowerStationId
());
dto
.
setWorkOrderPowerStationId
(
basicGridAcceptanc
.
getWorkOrderPowerStationId
());
...
...
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 @
29a24476
...
@@ -246,7 +246,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
...
@@ -246,7 +246,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
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
))
{
throw
new
com
.
yeejoin
.
amos
.
component
.
robot
.
BadRequest
(
"其他用户正在操作,请
稍
后再试!"
);
throw
new
com
.
yeejoin
.
amos
.
component
.
robot
.
BadRequest
(
"其他用户正在操作,请
刷新
后再试!"
);
}
}
String
meg
=
""
;
String
meg
=
""
;
// 1. 业务相关数据落表
// 1. 业务相关数据落表
...
...
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 @
29a24476
...
@@ -162,7 +162,7 @@ public class SurveyInformationServiceImpl
...
@@ -162,7 +162,7 @@ public class SurveyInformationServiceImpl
lockName
=
String
.
format
(
"LockName:saveSurveyInfo:%s"
,
surveyInformation
.
getSequenceNbr
());
lockName
=
String
.
format
(
"LockName:saveSurveyInfo:%s"
,
surveyInformation
.
getSequenceNbr
());
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
Boolean
isLocked
=
redisLockUtil
.
tryLock
(
lockName
,
lockName
,
10
,
1
);
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
if
(
BooleanUtils
.
isNotTrue
(
isLocked
))
{
throw
new
BadRequest
(
"其他用户正在操作,请
稍
后再试!"
);
throw
new
BadRequest
(
"其他用户正在操作,请
刷新
后再试!"
);
}
}
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
...
...
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