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
c33e4d18
Commit
c33e4d18
authored
Jul 05, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复发货详情接口
parent
c95dbdd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
10 deletions
+55
-10
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+55
-10
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 @
c33e4d18
...
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.*;
import
com.yeejoin.amos.boot.module.hygf.api.service.IHygfPreparationMoneyAuditingService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IPreparationMoneyService
;
import
com.yeejoin.amos.boot.module.hygf.api.util.NumberUtil
;
import
com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -33,7 +34,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang
3
.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -92,6 +93,8 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
private
HygfPreparationMoneyAuditingServiceImpl
hygfPreparationMoneyAuditingService
;
@Autowired
private
HygfReplenishmentMapper
hygfReplenishmentMapper
;
@Autowired
private
WorkflowFeignClient
workflowFeignClient
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
private
static
final
String
PROCESSKEY
=
"DeliveryManagement"
;
...
...
@@ -218,6 +221,44 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
hygfReplenishments
.
size
()>
0
){
map
.
put
(
"files"
,
hygfReplenishments
);
}
LambdaUpdateWrapper
<
HygfPreparationMoneyAuditing
>
audit
=
new
LambdaUpdateWrapper
<>();
audit
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfPreparationMoneyAuditing
>
hygfPreparationMoneyAuditings
=
hygfPreparationMoneyAuditingService
.
getBaseMapper
().
selectList
(
audit
);
if
(
CollectionUtil
.
isNotEmpty
(
hygfPreparationMoneyAuditings
)
&&
hygfPreparationMoneyAuditings
.
size
()>
0
){
if
(!
StringUtils
.
isEmpty
(
hygfPreparationMoneyAuditings
.
get
(
0
).
getInstanceId
()))
{
try
{
Map
<
String
,
Object
>
flowLoggerMap
=
workflowFeignClient
.
getFlowLogger
(
hygfPreparationMoneyAuditings
.
get
(
0
).
getInstanceId
()).
getResult
();
List
<
LinkedHashMap
>
flowLogger
=
(
List
<
LinkedHashMap
>)
flowLoggerMap
.
get
(
"flowLogger"
);
if
(
flowLogger
.
size
()
>
0
)
{
Collections
.
reverse
(
flowLogger
);
}
List
<
LinkedHashMap
>
flowLoggernew
=
new
ArrayList
<>();
for
(
LinkedHashMap
linkedHashMap
:
flowLogger
)
{
if
(
linkedHashMap
.
get
(
"operateDate"
)
!=
null
&&
!
linkedHashMap
.
get
(
"operateDate"
).
toString
().
isEmpty
())
{
LinkedHashMap
linke
=
new
LinkedHashMap
();
linke
.
put
(
"approvalStatue"
,
linkedHashMap
.
get
(
"approvalStatue"
).
toString
());
// 审核意见
List
<
LinkedHashMap
>
approvalSuggestion
=
(
List
<
LinkedHashMap
>)
linkedHashMap
.
get
(
"approvalSuggestion"
);
if
(
approvalSuggestion
!=
null
&&
!
approvalSuggestion
.
isEmpty
())
{
linke
.
put
(
"approvalSuggestion"
,
approvalSuggestion
.
get
(
0
).
get
(
"message"
));
}
linke
.
put
(
"taskName"
,
linkedHashMap
.
get
(
"taskName"
).
toString
());
linke
.
put
(
"operator"
,
linkedHashMap
.
get
(
"operator"
).
toString
());
linke
.
put
(
"operateDate"
,
linkedHashMap
.
get
(
"operateDate"
).
toString
());
flowLoggernew
.
add
(
linke
);
}
}
LoggerDto
loggerDto
=
new
LoggerDto
();
loggerDto
.
setLogger
(
flowLoggernew
);
map
.
put
(
"orderTracking"
,
loggerDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
LambdaUpdateWrapper
<
DocumentStation
>
q
=
new
LambdaUpdateWrapper
<>();
q
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
sequenceNbr
);
...
...
@@ -562,11 +603,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
List
<
Long
>
idsH
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
idsk
)
{
idsH
.
add
(
documentStation
.
getStationId
());
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
preparationMoneyMapper
.
insert
(
model
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
if
(
isSubmit
.
equals
(
"0"
))
{
...
...
@@ -606,18 +643,23 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
暂存发货
.
getCode
());
model
.
setOrderStatus
(
DeliveryStateeEnum
.
待提交
.
getName
());
}
peasantHouseholdMapper
.
update
(
null
,
up
);
preparationMoneyMapper
.
updateById
(
model
);
//电站信息存储
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
);
documentStationService
.
saveBatch
(
listDocumentStation
);
}
peasantHouseholdMapper
.
update
(
null
,
up
);
preparationMoneyMapper
.
updateById
(
model
);
}
else
{
...
...
@@ -694,17 +736,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
//电站信息存储
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
);
peasantHouseholdMapper
.
update
(
null
,
up
);
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