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
14b8a1b4
Commit
14b8a1b4
authored
Oct 25, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
存量合同2.0开发 接口补充
parent
02ff8d8b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
FinancingInfoHistoryMapper.xml
...ain/resources/mapper/mysql/FinancingInfoHistoryMapper.xml
+1
-0
HistoryPeasantHouseholdController.java
...ygf/biz/controller/HistoryPeasantHouseholdController.java
+2
-0
HistoryPeasantHouseholdServiceImpl.java
.../biz/service/impl/HistoryPeasantHouseholdServiceImpl.java
+12
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoHistoryMapper.xml
View file @
14b8a1b4
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
hhpf.owners_name ownersName,
hhpf.owners_name ownersName,
hhpf.peasant_household_no peasantHouseholdNo,
hhpf.peasant_household_no peasantHouseholdNo,
hhpf.province,
hhpf.province,
hhpf.sequence_nbr as sequenceNbr,
hhpf.house_address houseAddress,
hhpf.house_address houseAddress,
hhpf.basic_grid_capacity basicGridCapacity,
hhpf.basic_grid_capacity basicGridCapacity,
IFNULL(hfih.status,'待推送') status,
IFNULL(hfih.status,'待推送') status,
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HistoryPeasantHouseholdController.java
View file @
14b8a1b4
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
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.entity.HistoryPeasantHousehold
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -170,6 +171,7 @@ public class HistoryPeasantHouseholdController extends BaseController {
...
@@ -170,6 +171,7 @@ public class HistoryPeasantHouseholdController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存量合同电站上传"
,
notes
=
"存量合同电站上传"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存量合同电站上传"
,
notes
=
"存量合同电站上传"
)
@PostMapping
(
value
=
"/uploadData"
)
@PostMapping
(
value
=
"/uploadData"
)
@Transactional
public
void
upload
(
MultipartFile
multipartFile
)
throws
Exception
{
public
void
upload
(
MultipartFile
multipartFile
)
throws
Exception
{
historyPeasantHouseholdServiceImpl
.
uploadData
(
multipartFile
);
historyPeasantHouseholdServiceImpl
.
uploadData
(
multipartFile
);
...
...
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 @
14b8a1b4
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.HistoryPeasantHouseholdMappe
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.HistoryPeasantHouseholdMappe
import
com.yeejoin.amos.boot.module.hygf.api.service.IHistoryPeasantHouseholdService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IHistoryPeasantHouseholdService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HistoryPeasantHouseholdDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HistoryPeasantHouseholdDto
;
import
com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -48,7 +49,7 @@ public class HistoryPeasantHouseholdServiceImpl extends BaseService<HistoryPeasa
...
@@ -48,7 +49,7 @@ public class HistoryPeasantHouseholdServiceImpl extends BaseService<HistoryPeasa
public
List
<
HistoryPeasantHouseholdDto
>
queryForHistoryPeasantHouseholdList
()
{
public
List
<
HistoryPeasantHouseholdDto
>
queryForHistoryPeasantHouseholdList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
@Transactional
public
void
uploadData
(
MultipartFile
multipartFile
)
throws
Exception
{
public
void
uploadData
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
HistoryPeasantHouseholdDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
HistoryPeasantHouseholdDto
.
class
,
1
);
List
<
HistoryPeasantHouseholdDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
HistoryPeasantHouseholdDto
.
class
,
1
);
...
@@ -56,6 +57,16 @@ public class HistoryPeasantHouseholdServiceImpl extends BaseService<HistoryPeasa
...
@@ -56,6 +57,16 @@ public class HistoryPeasantHouseholdServiceImpl extends BaseService<HistoryPeasa
for
(
HistoryPeasantHouseholdDto
dto
:
excelDtoList
)
{
for
(
HistoryPeasantHouseholdDto
dto
:
excelDtoList
)
{
HistoryPeasantHousehold
convert
=
BeanDtoUtils
.
convert
(
dto
,
HistoryPeasantHousehold
.
class
);
HistoryPeasantHousehold
convert
=
BeanDtoUtils
.
convert
(
dto
,
HistoryPeasantHousehold
.
class
);
convert
.
setStatus
(
"待上传"
);
convert
.
setStatus
(
"待上传"
);
LambdaQueryWrapper
<
HistoryPeasantHousehold
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
HistoryPeasantHousehold:
:
getPeasantHouseholdNo
,
convert
.
getPeasantHouseholdNo
());
List
<
HistoryPeasantHousehold
>
list1
=
this
.
getBaseMapper
().
selectList
(
wrapper
);
if
(
CollectionUtil
.
isNotEmpty
(
list1
)){
throw
new
BadRequest
(
convert
.
getPeasantHouseholdNo
()+
"编号重复"
);
}
list
.
add
(
convert
);
list
.
add
(
convert
);
}
}
this
.
saveBatch
(
list
);
this
.
saveBatch
(
list
);
...
...
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