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
dcc740dd
Commit
dcc740dd
authored
Jul 08, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发货批量新增初始化接口
parent
68226638
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
PreparationMoneyController.java
...odule/hygf/biz/controller/PreparationMoneyController.java
+12
-0
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+39
-0
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 @
dcc740dd
...
...
@@ -31,6 +31,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Array
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -331,4 +333,14 @@ public class PreparationMoneyController extends BaseController {
return
ResponseHelper
.
buildResponse
(
preparationMoneyServiceImpl
.
preparationStation
(
current
,
size
,
preparationMoneyState
,
ownersName
,
regionalcompaniesSeq
,
developerId
,
state
))
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getFromInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取发货电站及区域,经销商公司"
,
notes
=
"获取发货电站及区域"
)
public
ResponseModel
<
PreparationMoney
>
getFromInfo
(
@RequestParam
(
value
=
"ids"
)
String
ids
){
List
<
String
>
list
=
Arrays
.
asList
(
ids
.
split
(
","
));
return
ResponseHelper
.
buildResponse
(
preparationMoneyServiceImpl
.
getFromInfo
(
list
))
;
}
}
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 @
dcc740dd
...
...
@@ -1160,4 +1160,42 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
return
pagenew
;
}
public
PreparationMoney
getFromInfo
(
List
<
String
>
list
)
{
LambdaQueryWrapper
<
PeasantHousehold
>
query
=
new
LambdaQueryWrapper
<>();
query
.
in
(
BaseEntity:
:
getSequenceNbr
,
list
);
List
<
PeasantHousehold
>
peasantHouseholds
=
peasantHouseholdMapper
.
selectList
(
query
);
PreparationMoney
preparationMoney
=
new
PreparationMoney
();
preparationMoney
.
setRegionalCompaniesSeq
(
peasantHouseholds
.
get
(
0
).
getRegionalCompaniesSeq
());
//农户表中存储的经销商id是平台的 表单经销商接口是unitinfo主键 无法对应 查询后赋值
LambdaQueryWrapper
<
UnitInfo
>
query1
=
new
LambdaQueryWrapper
<>();
query1
.
eq
(
UnitInfo:
:
getAmosCompanyCode
,
peasantHouseholds
.
get
(
0
).
getDeveloperCode
());
UnitInfo
unitInfo
=
unitInfoService
.
getBaseMapper
().
selectOne
(
query1
);
preparationMoney
.
setAmosUnitId
(
unitInfo
.
getSequenceNbr
());
LambdaQueryWrapper
<
RegionalCompanies
>
qu
=
new
LambdaQueryWrapper
();
qu
.
eq
(
RegionalCompanies:
:
getRegionalCompaniesSeq
,
peasantHouseholds
.
get
(
0
).
getRegionalCompaniesSeq
());
qu
.
eq
(
RegionalCompanies:
:
getUnitInfoId
,
unitInfo
.
getSequenceNbr
());
qu
.
eq
(
RegionalCompanies:
:
getIsDelete
,
false
);
RegionalCompanies
regionalCompanies
=
regionalCompaniesMapper
.
selectOne
(
qu
);
preparationMoney
.
setConsignee
(
regionalCompanies
.
getConsignee
());
preparationMoney
.
setPhone
(
regionalCompanies
.
getPhone
());
List
<
DocumentStation
>
stations
=
new
ArrayList
<>();
peasantHouseholds
.
forEach
(
e
->{
DocumentStation
documentStation
=
new
DocumentStation
();
documentStation
.
setStationId
(
e
.
getSequenceNbr
());
documentStation
.
setOwnersName
(
e
.
getOwnersName
());
documentStation
.
setDeveloperName
(
e
.
getDeveloperName
());
documentStation
.
setPeasantHouseholdNo
(
e
.
getPeasantHouseholdNo
());
documentStation
.
setProjectAddressName
(
e
.
getProjectAddressName
()+
"/"
+
e
.
getProjectAddressDetail
());
stations
.
add
(
documentStation
);
});
preparationMoney
.
setPeasantHouseholdId
(
stations
);
return
preparationMoney
;
}
}
\ No newline at end of file
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