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
350c58e5
Commit
350c58e5
authored
Oct 29, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
存量合同2.0开发 接口补充
parent
dcb75a28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
HistoryPeasantHouseholdController.java
...ygf/biz/controller/HistoryPeasantHouseholdController.java
+2
-1
HistoryPeasantHouseholdServiceImpl.java
.../biz/service/impl/HistoryPeasantHouseholdServiceImpl.java
+15
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HistoryPeasantHouseholdController.java
View file @
350c58e5
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HistoryPeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -183,7 +184,7 @@ public class HistoryPeasantHouseholdController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"存量合同电站下载"
,
notes
=
"存量合同电站下载"
)
@GetMapping
(
value
=
"/export"
)
public
void
downTemplate
(
HttpServletResponse
response
,
@RequestParam
(
value
=
"ids"
)
List
<
String
>
ids
)
{
public
void
downTemplate
(
HttpServletResponse
response
,
@RequestParam
(
value
=
"ids"
,
required
=
false
)
List
<
String
>
ids
)
{
historyPeasantHouseholdServiceImpl
.
exportData
(
response
,
ids
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HistoryPeasantHouseholdServiceImpl.java
View file @
350c58e5
...
...
@@ -88,8 +88,13 @@ public class HistoryPeasantHouseholdServiceImpl extends BaseService<HistoryPeasa
public
void
exportData
(
HttpServletResponse
response
,
List
<
String
>
ids
){
LambdaQueryWrapper
<
HistoryPeasantHousehold
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
BaseEntity:
:
getSequenceNbr
,
ids
);
List
<
HistoryPeasantHousehold
>
list
=
this
.
getBaseMapper
().
selectBatchIds
(
ids
);
List
<
HistoryPeasantHousehold
>
list
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
ids
)){
wrapper
.
in
(
BaseEntity:
:
getSequenceNbr
,
ids
);
list
=
this
.
getBaseMapper
().
selectBatchIds
(
ids
);
}
else
{
list
=
this
.
getBaseMapper
().
selectList
(
wrapper
);
}
if
(
CollectionUtil
.
isNotEmpty
(
list
)){
ExcelUtil
.
createTemplate
(
response
,
"存量合同电站"
,
"存量合同电站"
,
list
,
HistoryPeasantHouseholdDto
.
class
,
null
,
false
);
...
...
@@ -97,6 +102,14 @@ public class HistoryPeasantHouseholdServiceImpl extends BaseService<HistoryPeasa
}
public
HistoryPeasantHouseholdDto
updateStation
(
HistoryPeasantHouseholdDto
model
){
LambdaQueryWrapper
<
HistoryPeasantHousehold
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
HistoryPeasantHousehold:
:
getPeasantHouseholdNo
,
model
.
getPeasantHouseholdNo
());
wrapper
.
ne
(
BaseEntity:
:
getSequenceNbr
,
model
.
getSequenceNbr
());
List
<
HistoryPeasantHousehold
>
list
=
this
.
getBaseMapper
().
selectList
(
wrapper
);
if
(
CollectionUtil
.
isNotEmpty
(
list
)){
throw
new
BadRequest
(
"农户编号重复"
);
}
if
(
model
.
getStatus
().
equals
(
"已提交"
)){
FinancingInfoHistory
financingInfoHistory
=
new
FinancingInfoHistory
();
financingInfoHistory
.
setPeasantHouseholdId
(
model
.
getSequenceNbr
());
...
...
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