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
4afaaf13
Commit
4afaaf13
authored
Jul 05, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发货电站 电站信息处理
parent
edc621e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
13 deletions
+40
-13
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+40
-13
No files found.
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 @
4afaaf13
...
...
@@ -47,6 +47,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 发货单服务实现类
...
...
@@ -611,8 +612,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
preparationMoneyMapper
.
insert
(
model
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
if
(
isSubmit
.
equals
(
"0"
))
{
...
...
@@ -664,9 +663,9 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
listDocumentStation
.
add
(
documentStation
);
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
peasantHouseholdMapper
.
update
(
null
,
up
);
documentStationService
.
saveBatch
(
listDocumentStation
);
}
peasantHouseholdMapper
.
update
(
null
,
up
);
preparationMoneyMapper
.
updateById
(
model
);
...
...
@@ -741,10 +740,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
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
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
//电站信息存储
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
...
...
@@ -1081,26 +1090,44 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//isSubmit = 0 表示提交 也对应工作流表达式 可直接使用
model
.
setOrderStatus
(
DeliveryStateeEnum
.
待确认
.
getCode
());
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
,
""
);
}
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
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
ids
)
{
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
listDocumentStation
.
add
(
documentStation
);
//电站信息存储
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
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
;
}
...
...
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