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
d765cec4
Commit
d765cec4
authored
Jul 04, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发货流程问题修复
parent
7510df78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
18 deletions
+33
-18
PreparationMoneyController.java
...odule/hygf/biz/controller/PreparationMoneyController.java
+1
-1
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+32
-17
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PreparationMoneyController.java
View file @
d765cec4
...
@@ -256,7 +256,7 @@ public class PreparationMoneyController extends BaseController {
...
@@ -256,7 +256,7 @@ public class PreparationMoneyController extends BaseController {
@PostMapping
(
value
=
"/uploadVoucher"
)
@PostMapping
(
value
=
"/uploadVoucher"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传收获凭证"
,
notes
=
"上传收获凭证"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传收获凭证"
,
notes
=
"上传收获凭证"
)
@GlobalTransactional
@GlobalTransactional
public
ResponseModel
uploadVoucher
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
PreparationMoney
model
,
String
isSubmit
)
{
public
ResponseModel
uploadVoucher
(
@RequestParam
(
value
=
"instanceId"
,
required
=
false
)
String
instanceId
,
@RequestBody
PreparationMoney
model
,
String
isSubmit
)
{
preparationMoneyServiceImpl
.
uploadVoucher
(
model
,
instanceId
,
isSubmit
);
preparationMoneyServiceImpl
.
uploadVoucher
(
model
,
instanceId
,
isSubmit
);
return
CommonResponseNewUtil
.
success
();
return
CommonResponseNewUtil
.
success
();
...
...
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 @
d765cec4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -41,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -41,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
...
@@ -566,7 +568,11 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -566,7 +568,11 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
}
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
preparationMoneyMapper
.
insert
(
model
);
preparationMoneyMapper
.
insert
(
model
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
if
(
isSubmit
.
equals
(
"0"
))
{
if
(
isSubmit
.
equals
(
"0"
))
{
if
(
CollUtil
.
isEmpty
(
ids
)
&&
ids
.
isEmpty
()
){
throw
new
BadRequest
(
"提交时选择电站不可为空"
);
}
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
ArrivalStateeEnum
.
待收货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
ArrivalStateeEnum
.
待收货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
待收货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
待收货
.
getCode
());
//开启工作流 并执行一步
//开启工作流 并执行一步
...
@@ -601,13 +607,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -601,13 +607,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
peasantHouseholdMapper
.
update
(
null
,
up
);
peasantHouseholdMapper
.
update
(
null
,
up
);
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
//电站信息存储
//电站信息存储
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
ids
)
{
for
(
DocumentStation
documentStation
:
ids
)
{
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
listDocumentStation
.
add
(
documentStation
);
listDocumentStation
.
add
(
documentStation
);
}
documentStationService
.
saveBatch
(
listDocumentStation
);
}
}
documentStationService
.
saveBatch
(
listDocumentStation
);
}
else
{
}
else
{
//获取经销商单位信息
//获取经销商单位信息
...
@@ -638,9 +646,12 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -638,9 +646,12 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
model
.
setConsigneeRegion
(
ConsigneeRegion
);
model
.
setConsigneeRegion
(
ConsigneeRegion
);
}
}
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
if
(
isSubmit
.
equals
(
"0"
))
{
if
(
isSubmit
.
equals
(
"0"
))
{
if
(
CollUtil
.
isEmpty
(
ids
)
&&
ids
.
isEmpty
()
){
throw
new
BadRequest
(
"提交时选择电站不可为空"
);
}
//更新电站施工状态
//更新电站施工状态
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
...
@@ -680,15 +691,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -680,15 +691,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
documentStationMapper
.
delete
(
up3
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
ids
)
{
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
documentStation
.
setSequenceNbr
(
null
);
listDocumentStation
.
add
(
documentStation
);
}
documentStationService
.
saveBatch
(
listDocumentStation
);
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
ids
)
{
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
listDocumentStation
.
add
(
documentStation
);
}
documentStationService
.
saveBatch
(
listDocumentStation
);
}
}
}
...
@@ -867,10 +878,14 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -867,10 +878,14 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//更新电站施工状态
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
List
<
Long
>
idsH
=
new
ArrayList
<>();
List
<
Long
>
idsH
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
idsk
)
{
LambdaQueryWrapper
<
DocumentStation
>
stations
=
new
LambdaQueryWrapper
<>();
stations
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
List
<
DocumentStation
>
documentStations
=
documentStationMapper
.
selectList
(
stations
);
for
(
DocumentStation
documentStation
:
documentStations
)
{
idsH
.
add
(
documentStation
.
getStationId
());
idsH
.
add
(
documentStation
.
getStationId
());
}
}
if
(
kv
.
getOrDefault
(
"approvalStatus"
,
""
).
equals
(
"0"
))
{
if
(
kv
.
getOrDefault
(
"approvalStatus"
,
""
).
equals
(
"0"
))
{
...
...
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