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
ccf364cc
Commit
ccf364cc
authored
Aug 30, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加整改类型
parent
1f5f3c6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
21 deletions
+54
-21
HygfRectificationOrderController.java
...hygf/biz/controller/HygfRectificationOrderController.java
+54
-21
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HygfRectificationOrderController.java
View file @
ccf364cc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.RectificationOrderEnum
;
...
...
@@ -67,8 +69,8 @@ public class HygfRectificationOrderController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增审核单"
,
notes
=
"新增审核单"
)
public
ResponseModel
<
HygfRectificationOrderDto
>
save
(
@RequestBody
HygfRectificationOrderDto
model
)
{
model
=
hygfRectificationOrderServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
model
=
hygfRectificationOrderServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
...
...
@@ -81,8 +83,8 @@ public class HygfRectificationOrderController extends BaseController {
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新审核单"
,
notes
=
"根据sequenceNbr更新审核单"
)
public
ResponseModel
<
HygfRectificationOrderDto
>
updateBySequenceNbrHygfRectificationOrder
(
@RequestBody
HygfRectificationOrderDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
hygfRectificationOrderServiceImpl
.
updateWithModel
(
model
));
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
hygfRectificationOrderServiceImpl
.
updateWithModel
(
model
));
}
/**
...
...
@@ -108,10 +110,10 @@ public class HygfRectificationOrderController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个审核单"
,
notes
=
"根据sequenceNbr查询单个审核单"
)
public
ResponseModel
<
HygfRectificationOrder
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
HygfRectificationOrder
hygfRectificationOrder
=
hygfRectificationOrderServiceImpl
.
getBaseMapper
().
selectById
(
sequenceNbr
);
HygfRectificationOrder
hygfRectificationOrder
=
hygfRectificationOrderServiceImpl
.
getBaseMapper
().
selectById
(
sequenceNbr
);
RectificationRoleEnum
enums
=
RectificationRoleEnum
.
getNodeByName
(
hygfRectificationOrder
.
getRectificationSource
());
hygfRectificationOrder
.
setRectificationSourceName
(
enums
!=
null
?
enums
.
name
():
null
);
return
ResponseHelper
.
buildResponse
(
hygfRectificationOrder
);
return
ResponseHelper
.
buildResponse
(
hygfRectificationOrder
);
}
/**
...
...
@@ -152,22 +154,32 @@ public class HygfRectificationOrderController extends BaseController {
Page
<
HygfRectificationOrder
>
page
=
hygfRectificationOrderServiceImpl
.
queryForHygfRectificationOrderPage
(
current
,
size
,
workOrderPowerStationNodes
,
peasantHouseholeId
,
status
);
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
page
.
getRecords
().
forEach
(
e
->{
if
(
longs
.
contains
(
areaId
)
&&
e
.
getRectificationSource
().
equals
(
"area"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
engineeringId
)
&&
e
.
getRectificationSource
().
equals
(
"engineering"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
designId
)
&&
e
.
getRectificationSource
().
equals
(
"design"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
deveEngineeringId
)&&
(
e
.
getRectificationStatus
().
equals
(
"待审核"
)
||
e
.
getRectificationStatus
().
equals
(
"整改中"
))){
e
.
setIsAudit
(
"0"
);
}
else
{
e
.
setIsAudit
(
"1"
);
}
});
page
.
getRecords
().
forEach
(
e
->{
if
(
e
.
getRectificationIdea
()
!=
null
&&
e
.
getRectificationIdea
().
size
()
>
0
)
{
List
<
String
>
types
=
new
ArrayList
<>();
e
.
getRectificationIdea
().
forEach
(
t
->
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
t
));
types
.
add
(
jsonObject
.
getString
(
"type"
));
});
e
.
setRectificationType
(
String
.
join
(
","
,
types
));
}
if
(
longs
.
contains
(
areaId
)
&&
e
.
getRectificationSource
().
equals
(
"area"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
engineeringId
)
&&
e
.
getRectificationSource
().
equals
(
"engineering"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
designId
)
&&
e
.
getRectificationSource
().
equals
(
"design"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
deveEngineeringId
)&&
(
e
.
getRectificationStatus
().
equals
(
"待审核"
)
||
e
.
getRectificationStatus
().
equals
(
"整改中"
))){
e
.
setIsAudit
(
"0"
);
}
else
{
e
.
setIsAudit
(
"1"
);
}
});
}
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
...
...
@@ -219,9 +231,21 @@ public class HygfRectificationOrderController extends BaseController {
}
Page
<
HygfRectificationOrder
>
page
=
hygfRectificationOrderServiceImpl
.
queryForHygfRectificationOrderPage
(
current
,
size
,
workOrderPowerStationNodes
,
peasantHouseholeId
,
status
);
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
page
.
getRecords
().
forEach
(
e
->{
if
(
e
.
getRectificationIdea
()
!=
null
&&
e
.
getRectificationIdea
().
size
()
>
0
)
{
List
<
String
>
types
=
new
ArrayList
<>();
e
.
getRectificationIdea
().
forEach
(
t
->
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
t
));
types
.
add
(
jsonObject
.
getString
(
"type"
));
});
e
.
setRectificationType
(
String
.
join
(
","
,
types
));
}
if
(
longs
.
contains
(
areaId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-area"
)
&&
rectificationSource
.
contains
(
e
.
getRectificationSource
())){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
engineeringId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-engineering"
)&&
rectificationSource
.
contains
(
e
.
getRectificationSource
())){
...
...
@@ -240,7 +264,6 @@ public class HygfRectificationOrderController extends BaseController {
}
/**
* 列表分页查询
*
...
...
@@ -301,6 +324,16 @@ public class HygfRectificationOrderController extends BaseController {
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
page
.
getRecords
().
forEach
(
e
->{
if
(
e
.
getRectificationIdea
()
!=
null
&&
e
.
getRectificationIdea
().
size
()
>
0
)
{
List
<
String
>
types
=
new
ArrayList
<>();
e
.
getRectificationIdea
().
forEach
(
t
->
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
t
));
types
.
add
(
jsonObject
.
getString
(
"type"
));
});
e
.
setRectificationType
(
String
.
join
(
","
,
types
));
}
if
(
longs
.
contains
(
areaId
)
&&
e
.
getRectificationSource
().
equals
(
"ys-area"
)
&&
rectificationSource
.
contains
(
e
.
getRectificationSource
())
){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
tourongId
)
&&
e
.
getRectificationSource
().
equals
(
"ys-tourong"
)&&
rectificationSource
.
contains
(
e
.
getRectificationSource
())){
...
...
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