Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
035072b7
Commit
035072b7
authored
Mar 22, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限修改 合同修改
parent
02f2ff13
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
22 deletions
+66
-22
HouseholdContractMapper.java
.../boot/module/hygf/api/mapper/HouseholdContractMapper.java
+3
-2
HouseholdContractMapper.xml
...c/main/resources/mapper/mysql/HouseholdContractMapper.xml
+43
-0
HouseholdContractServiceImpl.java
...e/hygf/biz/service/impl/HouseholdContractServiceImpl.java
+20
-20
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/HouseholdContractMapper.java
View file @
035072b7
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HouseholdContractPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -16,6 +17,6 @@ import org.apache.ibatis.annotations.Param;
...
@@ -16,6 +17,6 @@ import org.apache.ibatis.annotations.Param;
*/
*/
public
interface
HouseholdContractMapper
extends
BaseMapper
<
HouseholdContract
>
{
public
interface
HouseholdContractMapper
extends
BaseMapper
<
HouseholdContract
>
{
@UserEmpower
(
field
={
"regional_companies_code"
}
,
dealerField
={
"de
velop
er_code"
,
"regional_companies_code"
,
"developer_user_id"
}
,
fieldConditions
={
"in"
,
"in"
,
"in"
}
,
relationship
=
"and"
)
@UserEmpower
(
field
={
"regional_companies_code"
}
,
dealerField
={
"de
al
er_code"
,
"regional_companies_code"
,
"developer_user_id"
}
,
fieldConditions
={
"in"
,
"in"
,
"in"
}
,
relationship
=
"and"
)
IPage
<
HouseholdContract
>
selectPage
(
IPage
<
HouseholdContract
>
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
HouseholdContract
>
queryWrapper
);
IPage
<
HouseholdContract
>
selectPage
(
@Param
(
"dto"
)
HouseholdContractPageDto
dto
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/HouseholdContractMapper.xml
View file @
035072b7
...
@@ -2,4 +2,47 @@
...
@@ -2,4 +2,47 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.HouseholdContractMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.HouseholdContractMapper"
>
<select
id=
"selectPage"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.HouseholdContract"
>
select
*
from hygf_household_contract
LEFT JOIN
(select developer_user_id,developer_code FROM hygf_peasant_household ) php ON php.developer_code= hygf_household_contract.dealer_code
<where>
<if
test=
"dto.name != null "
>
and hygf_household_contract.name like concat('%',#{dto.name},'%')
</if>
<if
test=
"dto.contractNumber != null "
>
and hygf_household_contract.contractNumber like concat('%',#{dto.contractNumber},'%')
</if>
<if
test=
"dto.initiateStatus != null "
>
and hygf_household_contract.initiateStatus = #{dto.initiateStatus}
</if>
<if
test=
"dto.peasantHouseholdId != null "
>
and hygf_household_contract.peasantHouseholdId = #{dto.peasantHouseholdId}
</if>
<if
test=
"dto.dealerId != null "
>
and hygf_household_contract.dealerId = #{dto.dealerId}
</if>
<if
test=
"dto.surveyStatus != null "
>
and hygf_household_contract.surveyStatus = #{dto.surveyStatus}
</if>
<if
test=
"dto.signStatus != null "
>
and hygf_household_contract.signStatus = #{dto.signStatus}
</if>
<if
test=
"dto.userId != null "
>
and hygf_household_contract.userId = #{dto.userId}
</if>
<if
test=
"dto.partyA != null "
>
and hygf_household_contract.partyA like concat('%',#{dto.partyA},'%')
</if>
</where>
<if
test=
"dto.orderBy == null "
>
ORDER BY hygf_household_contract.rec_date DESC
</if>
<if
test=
"dto.orderBy != null "
>
ORDER BY hygf_household_contract.${orderBy} ${dto.isAsc}
</if>
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HouseholdContractServiceImpl.java
View file @
035072b7
...
@@ -70,26 +70,26 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
...
@@ -70,26 +70,26 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
*/
*/
public
IPage
<
HouseholdContract
>
queryForPreparationMoneyPage
(
HouseholdContractPageDto
dto
)
{
public
IPage
<
HouseholdContract
>
queryForPreparationMoneyPage
(
HouseholdContractPageDto
dto
)
{
//列表数据组装
//
//列表数据组装
QueryWrapper
<
HouseholdContract
>
qw
=
new
QueryWrapper
<>();
//
QueryWrapper<HouseholdContract> qw = new QueryWrapper<>();
qw
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getName
()),
"name"
,
dto
.
getName
());
//
qw.like(StringUtils.isNotEmpty(dto.getName()), "name", dto.getName());
qw
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getContractNumber
()),
"contract_number"
,
dto
.
getContractNumber
());
//
qw.like(StringUtils.isNotEmpty(dto.getContractNumber()), "contract_number", dto.getContractNumber());
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getInitiateStatus
()),
"initiate_status"
,
dto
.
getInitiateStatus
()
);
//
qw.eq(StringUtils.isNotEmpty(dto.getInitiateStatus()), "initiate_status",dto.getInitiateStatus() );
//
qw
.
eq
(
dto
.
getPeasantHouseholdId
()!=
null
,
"peasant_household_id"
,
dto
.
getPeasantHouseholdId
()
);
//
qw.eq(dto.getPeasantHouseholdId()!=null, "peasant_household_id",dto.getPeasantHouseholdId() );
qw
.
eq
(
dto
.
getDealerId
()!=
null
,
"dealer_id"
,
dto
.
getDealerId
()
);
//
qw.eq(dto.getDealerId()!=null, "dealer_id",dto.getDealerId() );
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getSurveyStatus
()),
"survey_status"
,
dto
.
getSurveyStatus
()
);
//
qw.eq(StringUtils.isNotEmpty(dto.getSurveyStatus()), "survey_status",dto.getSurveyStatus() );
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getSignStatus
()),
"sign_status"
,
dto
.
getSignStatus
()
);
//
qw.eq(StringUtils.isNotEmpty(dto.getSignStatus()), "sign_status",dto.getSignStatus() );
qw
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getUserId
()),
"project_user_id"
,
dto
.
getUserId
()
);
//
qw.eq(StringUtils.isNotEmpty(dto.getUserId()), "project_user_id",dto.getUserId() );
qw
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getPartyA
()),
"party_a"
,
dto
.
getPartyA
()
);
//
qw.like(StringUtils.isNotEmpty(dto.getPartyA()), "party_a",dto.getPartyA() );
//
//
if
(
StringUtils
.
isNotEmpty
(
dto
.
getOrderBy
()))
{
//
if (StringUtils.isNotEmpty(dto.getOrderBy())) {
qw
.
orderBy
(
Boolean
.
TRUE
,
dto
.
getIsASC
(),
dto
.
getOrderBy
());
//
qw.orderBy(Boolean.TRUE, dto.getIsASC(), dto.getOrderBy());
}
else
{
//
}else{
qw
.
orderBy
(
Boolean
.
TRUE
,
Boolean
.
FALSE
,
"rec_date"
);
//
qw.orderBy(Boolean.TRUE, Boolean.FALSE, "rec_date");
}
//
}
IPage
<
HouseholdContract
>
warningQuestionInfoIPage
=
householdContractMapper
.
selectPage
(
dto
,
qw
);
IPage
<
HouseholdContract
>
warningQuestionInfoIPage
=
householdContractMapper
.
selectPage
(
dto
);
return
warningQuestionInfoIPage
;
return
warningQuestionInfoIPage
;
}
}
...
...
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