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
cbd69c46
Commit
cbd69c46
authored
Nov 13, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer_bw' into developer_bw
parents
2da5c992
787561b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
28 deletions
+94
-28
HygfIcbcRecordMapper.java
...mos/boot/module/hygf/api/mapper/HygfIcbcRecordMapper.java
+3
-0
HygfIcbcRecordMapper.xml
.../src/main/resources/mapper/mysql/HygfIcbcRecordMapper.xml
+62
-12
HygfIcbcServiceImpl.java
...oot/module/hygf/biz/service/impl/HygfIcbcServiceImpl.java
+29
-16
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/HygfIcbcRecordMapper.java
View file @
cbd69c46
...
...
@@ -25,4 +25,7 @@ public interface HygfIcbcRecordMapper extends BaseMapper<HygfIcbcRecord> {
@UserEmpower
(
field
=
{
"ph.regional_companies_code"
},
dealerField
=
{
"ph.developer_code"
,
"ph.regional_companies_code"
,
"ph.developer_user_id"
},
fieldConditions
=
{
"in"
,
"in"
,
"in"
},
relationship
=
"and"
)
List
<
HygfIcbcRecordDTO
>
listObject
(
@Param
(
"param"
)
HygfIcbcRecordQueryDTO
hygfIcbcRecordQueryDTO
);
@UserEmpower
(
field
=
{
"ph.regional_companies_code"
},
dealerField
=
{
"ph.developer_code"
,
"ph.regional_companies_code"
,
"ph.developer_user_id"
},
fieldConditions
=
{
"in"
,
"in"
,
"in"
},
relationship
=
"and"
)
List
<
HygfIcbcRecordDTO
>
pageList
(
@Param
(
"param"
)
HygfIcbcRecordQueryDTO
hygfIcbcRecordQueryDTO
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/HygfIcbcRecordMapper.xml
View file @
cbd69c46
...
...
@@ -44,18 +44,67 @@
</where>
</select>
<select
id=
"listObject"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO"
>
SELECT DISTINCT
icbc.sequence_nbr,
ifnull(icbc.cust_name, ph.owners_name) as custName,
ifnull(icbc.phone, ph.telephone) as phone,
ifnull(icbc.id_card, ph.id_card) as idCard,
ph.amos_user_id,
icbc.open_account_status,
icbc.protocol_status,
ph.rec_date
<!-- <select id="listObject" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO">-->
<!-- SELECT DISTINCT-->
<!-- icbc.sequence_nbr,-->
<!-- ifnull(icbc.cust_name, ph.owners_name) as custName,-->
<!-- ifnull(icbc.phone, ph.telephone) as phone,-->
<!-- ifnull(icbc.id_card, ph.id_card) as idCard,-->
<!-- ph.amos_user_id,-->
<!-- icbc.open_account_status,-->
<!-- icbc.protocol_status,-->
<!-- ph.rec_date-->
<!-- FROM-->
<!-- hygf_peasant_household ph LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id-->
<!-- <where>-->
<!-- ph.is_delete = 0-->
<!-- <if test="param != null">-->
<!-- <if test="param.openAccountStatus != null and param.openAccountStatus != ''">-->
<!-- <if test="param.openAccountStatus != '00'">-->
<!-- AND icbc.open_account_status = #{param.openAccountStatus}-->
<!-- </if>-->
<!-- <if test="param.openAccountStatus == '00'">-->
<!-- AND (icbc.open_account_status = #{param.openAccountStatus} OR icbc.open_account_status is null)-->
<!-- </if>-->
<!-- </if>-->
<!-- <if test="param.custName != null and param.custName != ''">-->
<!-- AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%') OR icbc.cust_name LIKE CONCAT('%', #{param.custName}, '%'))-->
<!-- </if>-->
<!-- <if test="param.idCard != null and param.idCard != ''">-->
<!-- AND (ph.id_card LIKE CONCAT('%', #{param.idCard}, '%') OR icbc.id_card LIKE CONCAT('%', #{param.idCard}, '%'))-->
<!-- </if>-->
<!-- <if test="param.phone != null and param.phone != ''">-->
<!-- AND (ph.telephone LIKE CONCAT('%', #{param.phone}, '%') OR icbc.phone LIKE CONCAT('%', #{param.phone}, '%'))-->
<!-- </if>-->
<!-- <if test="param.regionalCompaniesName != null and param.regionalCompaniesName != ''">-->
<!-- AND ph.regional_companies_name LIKE CONCAT('%', #{param.regionalCompaniesName}, '%')-->
<!-- </if>-->
<!-- <if test="param.addressName != null and param.addressName != ''">-->
<!-- AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')-->
<!-- </if>-->
<!-- </if>-->
<!-- </where>-->
<!-- <if test="param.offset != null and param.limit != null">-->
<!-- LIMIT ${param.offset}, ${param.limit}-->
<!-- </if>-->
<!-- ORDER BY-->
<!-- ph.rec_date DESC-->
<!-- </select>-->
<select
id=
"pageList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO"
>
SELECT
icbc.sequence_nbr,
ifnull( icbc.cust_name, ph.owners_name ) AS custName,
ifnull( icbc.phone, ph.telephone ) AS phone,
ifnull( icbc.id_card, ph.id_card ) AS idCard,
ph.amos_user_id,
icbc.open_account_status,
icbc.protocol_status,
ph.rec_date,
FROM
hygf_peasant_household ph LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
(SELECT amos_user_id, is_delete, developer_code,regional_companies_code, developer_user_id, MAX( sequence_nbr ), owners_name, telephone, id_card,regional_companies_name,project_address, rec_date FROM hygf_peasant_household GROUP BY amos_user_id) ph
LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
<where>
ph.is_delete = 0
<if
test=
"param != null"
>
...
...
@@ -88,6 +137,6 @@
LIMIT ${param.offset}, ${param.limit}
</if>
ORDER BY
ph.rec_date DESC
ph.rec_date DESC
</select>
</mapper>
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HygfIcbcServiceImpl.java
View file @
cbd69c46
...
...
@@ -22,6 +22,8 @@ import javax.annotation.Resource;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationEngineeringInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HouseholdContractMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PowerStationEngineeringInfoMapper
;
...
...
@@ -445,22 +447,33 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
}
public
Page
<
HygfIcbcRecordDTO
>
queryForPage
(
int
current
,
int
size
,
HygfIcbcRecordQueryDTO
hygfIcbcRecordQueryDTO
)
{
// PageHelper.startPage(current, size);
Integer
total
=
hygfIcbcRecordMapper
.
listObjectCount
(
hygfIcbcRecordQueryDTO
);
hygfIcbcRecordQueryDTO
.
setLimit
(
size
);
if
(
current
==
1
)
{
hygfIcbcRecordQueryDTO
.
setOffset
(
0
);
}
else
{
// int offset = (current - 1) * size > total ? : (current - 1) * size;
hygfIcbcRecordQueryDTO
.
setOffset
((
current
-
1
)
*
size
);
}
List
<
HygfIcbcRecordDTO
>
list
=
hygfIcbcRecordMapper
.
listObject
(
hygfIcbcRecordQueryDTO
);
Page
<
HygfIcbcRecordDTO
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
page
.
setTotal
(
total
);
page
.
setRecords
(
toModels
(
list
));
return
page
;
PageHelper
.
startPage
(
current
,
size
);
List
<
HygfIcbcRecordDTO
>
list
=
hygfIcbcRecordMapper
.
pageList
(
hygfIcbcRecordQueryDTO
);
PageInfo
<
HygfIcbcRecordDTO
>
page
=
new
PageInfo
(
list
);
Page
<
HygfIcbcRecordDTO
>
pagenew
=
new
Page
<>();
pagenew
.
setCurrent
(
current
);
pagenew
.
setTotal
(
page
.
getTotal
());
pagenew
.
setSize
(
size
);
pagenew
.
setRecords
(
toModels
(
page
.
getList
()));
return
pagenew
;
// ======================================================統計錯誤=================================================================
// // PageHelper.startPage(current, size);
// Integer total = hygfIcbcRecordMapper.listObjectCount(hygfIcbcRecordQueryDTO);
// hygfIcbcRecordQueryDTO.setLimit(size);
// if (current == 1) {
// hygfIcbcRecordQueryDTO.setOffset(0);
// } else {
// // int offset = (current - 1) * size > total ? : (current - 1) * size;
// hygfIcbcRecordQueryDTO.setOffset((current - 1) * size);
// }
// List<HygfIcbcRecordDTO> list = hygfIcbcRecordMapper.listObject(hygfIcbcRecordQueryDTO);
// Page<HygfIcbcRecordDTO> page = new Page<>();
// page.setSize(size);
// page.setCurrent(current);
// page.setTotal(total);
// page.setRecords(toModels(list));
// return page;
}
private
List
<
HygfIcbcRecordDTO
>
toModels
(
List
<
HygfIcbcRecordDTO
>
hygfIcbcRecords
)
{
...
...
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