Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
161128bb
Commit
161128bb
authored
Apr 10, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into prod
parents
4c6de5d8
b7accbd9
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
117 additions
and
9 deletions
+117
-9
yd-csf-api/src/main/java/com/yd/csf/api/dto/ExecuteBillingDto.java
+5
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+22
-2
yd-csf-service/src/main/java/com/yd/csf/service/dao/AgentAccumulatedFycMapper.java
+5
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/UserGradeDto.java
+22
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/IAgentAccumulatedFycService.java
+5
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/AgentAccumulatedFycServiceImpl.java
+12
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
+14
-5
yd-csf-service/src/main/java/com/yd/csf/service/vo/PayableReportVO.java
+12
-1
yd-csf-service/src/main/resources/mappers/AgentAccumulatedFycMapper.xml
+17
-0
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+3
-1
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/dto/ExecuteBillingDto.java
View file @
161128bb
...
@@ -38,6 +38,11 @@ public class ExecuteBillingDto {
...
@@ -38,6 +38,11 @@ public class ExecuteBillingDto {
private
Integer
issueNumber
;
private
Integer
issueNumber
;
/**
/**
* 出账总期数(实际出账期数)
*/
private
Integer
paymentTerm
;
/**
* 保单和转介人信息
* 保单和转介人信息
*/
*/
private
QueryPolicyAndBrokerDto
policyAndBrokerDto
;
private
QueryPolicyAndBrokerDto
policyAndBrokerDto
;
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
161128bb
...
@@ -29,6 +29,7 @@ import com.yd.csf.feign.response.expectedfortune.ApiGenerateExpectedFortuneRespo
...
@@ -29,6 +29,7 @@ import com.yd.csf.feign.response.expectedfortune.ApiGenerateExpectedFortuneRespo
import
com.yd.csf.service.dto.CommissionRuleBindingDto
;
import
com.yd.csf.service.dto.CommissionRuleBindingDto
;
import
com.yd.csf.service.dto.QueryPolicyAndBrokerDto
;
import
com.yd.csf.service.dto.QueryPolicyAndBrokerDto
;
import
com.yd.csf.service.dto.QueryPolicyBrokerDto
;
import
com.yd.csf.service.dto.QueryPolicyBrokerDto
;
import
com.yd.csf.service.dto.UserGradeDto
;
import
com.yd.csf.service.enums.CurrencyEnum
;
import
com.yd.csf.service.enums.CurrencyEnum
;
import
com.yd.csf.service.enums.FortuneStatusEnum
;
import
com.yd.csf.service.enums.FortuneStatusEnum
;
import
com.yd.csf.service.helper.FeignResultHelper
;
import
com.yd.csf.service.helper.FeignResultHelper
;
...
@@ -116,6 +117,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -116,6 +117,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
@Autowired
@Autowired
private
ApiCommissionConditionService
apiCommissionConditionService
;
private
ApiCommissionConditionService
apiCommissionConditionService
;
@Autowired
private
IAgentAccumulatedFycService
iAgentAccumulatedFycService
;
/**
/**
* 生成预计发佣
* 生成预计发佣
...
@@ -207,6 +210,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -207,6 +210,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
}
}
//根据保单号查询保单和转介人列表信息
//根据保单号查询保单和转介人列表信息
List
<
QueryPolicyAndBrokerDto
>
queryPolicyAndBrokerDtoList
=
policyService
.
queryPolicyBrokerList
(
request
.
getPolicyNo
());
List
<
QueryPolicyAndBrokerDto
>
queryPolicyAndBrokerDtoList
=
policyService
.
queryPolicyBrokerList
(
request
.
getPolicyNo
());
log
.
info
(
"根据保单号查询保单和转介人列表信息======>,{}"
,
JSON
.
toJSONString
(
queryPolicyAndBrokerDtoList
));
if
(
CollectionUtils
.
isEmpty
(
queryPolicyAndBrokerDtoList
))
{
if
(
CollectionUtils
.
isEmpty
(
queryPolicyAndBrokerDtoList
))
{
throw
new
BusinessException
(
"保单和转介人信息不存在"
);
throw
new
BusinessException
(
"保单和转介人信息不存在"
);
}
}
...
@@ -533,6 +537,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -533,6 +537,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
.
name
(
brokerDto
.
getBrokerName
())
.
name
(
brokerDto
.
getBrokerName
())
.
policyAndBrokerDto
(
brokerDto
)
.
policyAndBrokerDto
(
brokerDto
)
.
issueNumber
(
i
)
.
issueNumber
(
i
)
.
paymentTerm
(
paymentTerm
)
.
build
());
.
build
());
if
(!
CollectionUtils
.
isEmpty
(
commissionRuleBindingList
))
{
if
(!
CollectionUtils
.
isEmpty
(
commissionRuleBindingList
))
{
...
@@ -542,6 +547,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -542,6 +547,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
.
name
(
binding
.
getTargetName
())
.
name
(
binding
.
getTargetName
())
.
policyAndBrokerDto
(
brokerDto
)
.
policyAndBrokerDto
(
brokerDto
)
.
issueNumber
(
i
)
.
issueNumber
(
i
)
.
paymentTerm
(
paymentTerm
)
.
build
());
.
build
());
}
}
}
}
...
@@ -674,7 +680,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -674,7 +680,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
//发佣期数
//发佣期数
.
fortunePeriod
(
dto
.
getIssueNumber
())
.
fortunePeriod
(
dto
.
getIssueNumber
())
//发佣总期数
//发佣总期数
.
fortuneTotalPeriod
(
brokerDto
.
getPaymentTerm
())
// .fortuneTotalPeriod(brokerDto.getPaymentTerm())
.
fortuneTotalPeriod
(
dto
.
getPaymentTerm
())
//发佣类型 TODO
//发佣类型 TODO
// .fortuneType()
// .fortuneType()
//发佣日期 保单生效日期 + 3个月
//发佣日期 保单生效日期 + 3个月
...
@@ -749,7 +756,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -749,7 +756,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
//发佣期数
//发佣期数
.
fortunePeriod
(
dto
.
getIssueNumber
())
.
fortunePeriod
(
dto
.
getIssueNumber
())
//发佣总期数
//发佣总期数
.
fortuneTotalPeriod
(
brokerDto
.
getPaymentTerm
())
// .fortuneTotalPeriod(brokerDto.getPaymentTerm())
.
fortuneTotalPeriod
(
dto
.
getPaymentTerm
())
//发佣类型 TODO
//发佣类型 TODO
// .fortuneType()
// .fortuneType()
//发佣日期
//发佣日期
...
@@ -1065,6 +1073,14 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1065,6 +1073,14 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
public
IPage
<
PayableReportVO
>
convertPayableReportVO
(
IPage
<
PayableReportVO
>
payableReportPage
)
{
public
IPage
<
PayableReportVO
>
convertPayableReportVO
(
IPage
<
PayableReportVO
>
payableReportPage
)
{
if
(!
CollectionUtils
.
isEmpty
(
payableReportPage
.
getRecords
()))
{
if
(!
CollectionUtils
.
isEmpty
(
payableReportPage
.
getRecords
()))
{
List
<
String
>
brokerBizIdList
=
payableReportPage
.
getRecords
().
stream
().
map
(
PayableReportVO:
:
getBrokerBizId
).
collect
(
Collectors
.
toList
());
List
<
UserGradeDto
>
userGradeDtoList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
brokerBizIdList
))
{
userGradeDtoList
=
iAgentAccumulatedFycService
.
queryUserGradeList
(
brokerBizIdList
);
}
Map
<
String
,
UserGradeDto
>
userGradeMap
=
userGradeDtoList
.
stream
()
.
collect
(
Collectors
.
toMap
(
UserGradeDto:
:
getClientUserBizId
,
Function
.
identity
()));
List
<
String
>
policyNoList
=
payableReportPage
.
getRecords
().
stream
().
map
(
PayableReportVO:
:
getPolicyNo
).
collect
(
Collectors
.
toList
());
List
<
String
>
policyNoList
=
payableReportPage
.
getRecords
().
stream
().
map
(
PayableReportVO:
:
getPolicyNo
).
collect
(
Collectors
.
toList
());
List
<
Policy
>
policyList
=
new
ArrayList
<>();
List
<
Policy
>
policyList
=
new
ArrayList
<>();
List
<
PolicyFollow
>
policyFollowList
=
new
ArrayList
<>();
List
<
PolicyFollow
>
policyFollowList
=
new
ArrayList
<>();
...
@@ -1083,8 +1099,12 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1083,8 +1099,12 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
List
<
PayableReportVO
>
voList
=
payableReportPage
.
getRecords
().
stream
().
map
(
vo
->
{
List
<
PayableReportVO
>
voList
=
payableReportPage
.
getRecords
().
stream
().
map
(
vo
->
{
Policy
policy
=
policyMap
.
get
(
vo
.
getPolicyNo
());
Policy
policy
=
policyMap
.
get
(
vo
.
getPolicyNo
());
PolicyFollow
policyFollow
=
policyFollowMap
.
get
(
vo
.
getPolicyNo
());
PolicyFollow
policyFollow
=
policyFollowMap
.
get
(
vo
.
getPolicyNo
());
UserGradeDto
userGradeDto
=
userGradeMap
.
get
(
vo
.
getBrokerBizId
());
vo
.
setCurrency
(
CurrencyEnum
.
toLabel
(
vo
.
getCurrency
()));
vo
.
setCurrency
(
CurrencyEnum
.
toLabel
(
vo
.
getCurrency
()));
if
(
userGradeDto
!=
null
)
{
vo
.
setBrokerGradeName
(
userGradeDto
.
getGradeName
());
}
if
(
policy
!=
null
)
{
if
(
policy
!=
null
)
{
vo
.
setPolicyCurrency
(
CurrencyEnum
.
toLabel
(
policy
.
getCurrency
()));
vo
.
setPolicyCurrency
(
CurrencyEnum
.
toLabel
(
policy
.
getCurrency
()));
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dao/AgentAccumulatedFycMapper.java
View file @
161128bb
package
com
.
yd
.
csf
.
service
.
dao
;
package
com
.
yd
.
csf
.
service
.
dao
;
import
com.yd.csf.service.dto.UserGradeDto
;
import
com.yd.csf.service.model.AgentAccumulatedFyc
;
import
com.yd.csf.service.model.AgentAccumulatedFyc
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
AgentAccumulatedFycMapper
extends
BaseMapper
<
AgentAccumulatedFyc
>
{
public
interface
AgentAccumulatedFycMapper
extends
BaseMapper
<
AgentAccumulatedFyc
>
{
List
<
UserGradeDto
>
queryUserGradeList
(
@Param
(
"userBizIdList"
)
List
<
String
>
userBizIdList
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/UserGradeDto.java
0 → 100644
View file @
161128bb
package
com
.
yd
.
csf
.
service
.
dto
;
import
lombok.Data
;
@Data
public
class
UserGradeDto
{
/**
* 客户端用户表唯一业务ID
*/
private
String
clientUserBizId
;
/**
* 等级
*/
private
String
gradeCode
;
/**
* 等级名称
*/
private
String
gradeName
;
}
yd-csf-service/src/main/java/com/yd/csf/service/service/IAgentAccumulatedFycService.java
View file @
161128bb
package
com
.
yd
.
csf
.
service
.
service
;
package
com
.
yd
.
csf
.
service
.
service
;
import
com.yd.csf.service.dto.UserGradeDto
;
import
com.yd.csf.service.model.AgentAccumulatedFyc
;
import
com.yd.csf.service.model.AgentAccumulatedFyc
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 业务员累计积分表 - 存储业务员的累计FYC积分和当前等级信息 服务类
* 业务员累计积分表 - 存储业务员的累计FYC积分和当前等级信息 服务类
...
@@ -14,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -14,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
public
interface
IAgentAccumulatedFycService
extends
IService
<
AgentAccumulatedFyc
>
{
public
interface
IAgentAccumulatedFycService
extends
IService
<
AgentAccumulatedFyc
>
{
AgentAccumulatedFyc
queryOne
(
String
agentId
);
AgentAccumulatedFyc
queryOne
(
String
agentId
);
List
<
UserGradeDto
>
queryUserGradeList
(
List
<
String
>
userBizIdList
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/AgentAccumulatedFycServiceImpl.java
View file @
161128bb
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yd.csf.service.dto.UserGradeDto
;
import
com.yd.csf.service.model.AgentAccumulatedFyc
;
import
com.yd.csf.service.model.AgentAccumulatedFyc
;
import
com.yd.csf.service.dao.AgentAccumulatedFycMapper
;
import
com.yd.csf.service.dao.AgentAccumulatedFycMapper
;
import
com.yd.csf.service.service.IAgentAccumulatedFycService
;
import
com.yd.csf.service.service.IAgentAccumulatedFycService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 业务员累计积分表 - 存储业务员的累计FYC积分和当前等级信息 服务实现类
* 业务员累计积分表 - 存储业务员的累计FYC积分和当前等级信息 服务实现类
...
@@ -28,4 +31,13 @@ public class AgentAccumulatedFycServiceImpl extends ServiceImpl<AgentAccumulated
...
@@ -28,4 +31,13 @@ public class AgentAccumulatedFycServiceImpl extends ServiceImpl<AgentAccumulated
return
this
.
getOne
(
new
LambdaQueryWrapper
<
AgentAccumulatedFyc
>().
eq
(
AgentAccumulatedFyc:
:
getAgentId
,
agentId
).
last
(
"limit 1"
));
return
this
.
getOne
(
new
LambdaQueryWrapper
<
AgentAccumulatedFyc
>().
eq
(
AgentAccumulatedFyc:
:
getAgentId
,
agentId
).
last
(
"limit 1"
));
}
}
/**
* 根据客户端用户业务ID列表查询对应的等级列表
* @return
*/
@Override
public
List
<
UserGradeDto
>
queryUserGradeList
(
List
<
String
>
userBizIdList
)
{
return
this
.
baseMapper
.
queryUserGradeList
(
userBizIdList
);
}
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
161128bb
...
@@ -748,6 +748,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -748,6 +748,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
// 1. 生效日期独立验证(第一步)
// 1. 生效日期独立验证(第一步)
Date
effectiveDate
=
policy
.
getEffectiveDate
();
Date
effectiveDate
=
policy
.
getEffectiveDate
();
List
<
ApiExpectedSpeciesListResponse
>
validDateList
=
filterAndCheck
(
List
<
ApiExpectedSpeciesListResponse
>
validDateList
=
filterAndCheck
(
expectedSpeciesList
,
expectedSpeciesList
,
i
->
isEffective
(
i
.
getEffectiveStart
(),
i
.
getEffectiveEnd
(),
effectiveDate
),
i
->
isEffective
(
i
.
getEffectiveStart
(),
i
.
getEffectiveEnd
(),
effectiveDate
),
...
@@ -758,8 +759,16 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -758,8 +759,16 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
return
new
MatchResult
(
Collections
.
emptyList
(),
unmatchedConditions
);
return
new
MatchResult
(
Collections
.
emptyList
(),
unmatchedConditions
);
}
}
if
(
validDateList
.
isEmpty
())
{
// 1. 出单经纪公司独立验证
return
new
MatchResult
(
Collections
.
emptyList
(),
Collections
.
emptyList
());
String
reconciliationCompanyBizId
=
policy
.
getReconciliationCompanyBizId
();
validDateList
=
filterAndCheck
(
validDateList
,
i
->
i
.
getReconciliationCompany
().
equals
(
reconciliationCompanyBizId
),
unmatchedConditions
,
"出单经纪公司["
+
policy
.
getReconciliationCompany
()
+
"]"
);
if
(!
unmatchedConditions
.
isEmpty
())
{
return
new
MatchResult
(
Collections
.
emptyList
(),
unmatchedConditions
);
}
}
// 2. 获取第一个规格的条件模板
// 2. 获取第一个规格的条件模板
...
@@ -900,12 +909,12 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -900,12 +909,12 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
ApiExpectedSpeciesListRequest
apiExpectedSpeciesListRequest
=
new
ApiExpectedSpeciesListRequest
();
ApiExpectedSpeciesListRequest
apiExpectedSpeciesListRequest
=
new
ApiExpectedSpeciesListRequest
();
apiExpectedSpeciesListRequest
.
setProductLaunchBizId
(
productLaunchBizId
);
apiExpectedSpeciesListRequest
.
setProductLaunchBizId
(
productLaunchBizId
);
Result
<
List
<
ApiExpectedSpeciesListResponse
>>
result
=
apiExpectedSpeciesFeignClient
.
list
(
apiExpectedSpeciesListRequest
);
Result
<
List
<
ApiExpectedSpeciesListResponse
>>
result
=
apiExpectedSpeciesFeignClient
.
list
(
apiExpectedSpeciesListRequest
);
log
.
info
(
"查询预计
出
佣规格queryExpectedSpeciesByFeign==========>,{}"
,
JSON
.
toJSONString
(
result
));
log
.
info
(
"查询预计
来
佣规格queryExpectedSpeciesByFeign==========>,{}"
,
JSON
.
toJSONString
(
result
));
if
(
result
!=
null
&&
result
.
getCode
()
==
200
)
{
if
(
result
!=
null
&&
result
.
getCode
()
==
200
)
{
return
result
.
getData
();
return
result
.
getData
();
}
else
{
}
else
{
log
.
error
(
"查询预计
出
佣规格失败: productLaunchBizId={}"
,
productLaunchBizId
);
log
.
error
(
"查询预计
来
佣规格失败: productLaunchBizId={}"
,
productLaunchBizId
);
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"查询预计
出
佣规格失败"
);
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"查询预计
来
佣规格失败"
);
}
}
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/PayableReportVO.java
View file @
161128bb
...
@@ -3,7 +3,6 @@ package com.yd.csf.service.vo;
...
@@ -3,7 +3,6 @@ package com.yd.csf.service.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
...
@@ -28,6 +27,18 @@ public class PayableReportVO {
...
@@ -28,6 +27,18 @@ public class PayableReportVO {
private
String
broker
;
private
String
broker
;
/**
/**
* 转介人业务ID
*/
@Schema
(
description
=
"转介人业务ID"
)
private
String
brokerBizId
;
/**
* 转介人等级名称
*/
@Schema
(
description
=
"转介人等级名称"
)
private
String
brokerGradeName
;
/**
* 出账期数(1=第一年; 2=第二年; 3=第三年; 4=第四年; 5=第五年)
* 出账期数(1=第一年; 2=第二年; 3=第三年; 4=第四年; 5=第五年)
*/
*/
@Schema
(
description
=
"出账期数"
)
@Schema
(
description
=
"出账期数"
)
...
...
yd-csf-service/src/main/resources/mappers/AgentAccumulatedFycMapper.xml
View file @
161128bb
...
@@ -2,4 +2,21 @@
...
@@ -2,4 +2,21 @@
<!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.yd.csf.service.dao.AgentAccumulatedFycMapper"
>
<mapper
namespace=
"com.yd.csf.service.dao.AgentAccumulatedFycMapper"
>
<select
id=
"queryUserGradeList"
resultType=
"com.yd.csf.service.dto.UserGradeDto"
>
select
aaf.agent_id as clientUserBizId,
mgc.grade_code as gradeCode,
mgc.grade_name as gradeName
from agent_accumulated_fyc aaf
left join member_grade_config mgc on aaf.current_grade_code = mgc.grade_code and mgc.is_deleted = 0
<where>
<if
test=
"userBizIdList != null and userBizIdList.size > 0"
>
aaf.agent_id in
<foreach
collection=
"userBizIdList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
and aaf.is_deleted = 0
</where>
</select>
</mapper>
</mapper>
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
161128bb
...
@@ -76,11 +76,12 @@
...
@@ -76,11 +76,12 @@
else 100
else 100
end as unpaidRatio,
end as unpaidRatio,
MAX(first_broker.broker_name) as broker,
MAX(first_broker.broker_name) as broker,
MAX(first_broker.broker_biz_id) as brokerBizId,
DATE_ADD(DATE_ADD(MAX(p.effective_date), INTERVAL 2 MONTH), INTERVAL (ef.fortune_period - 1) YEAR) as payoutDate
DATE_ADD(DATE_ADD(MAX(p.effective_date), INTERVAL 2 MONTH), INTERVAL (ef.fortune_period - 1) YEAR) as payoutDate
from expected_fortune ef
from expected_fortune ef
left join policy p on ef.policy_no = p.policy_no
left join policy p on ef.policy_no = p.policy_no
left join (
left join (
SELECT pb1.policy_no, pb1.broker_name
SELECT pb1.policy_no, pb1.broker_name
,pb1.broker_biz_id
FROM policy_broker pb1
FROM policy_broker pb1
WHERE pb1.id = (
WHERE pb1.id = (
SELECT pb2.id
SELECT pb2.id
...
@@ -128,6 +129,7 @@
...
@@ -128,6 +129,7 @@
else 100
else 100
end as unpaidRatio,
end as unpaidRatio,
ef.broker as broker,
ef.broker as broker,
ef.broker_biz_id as brokerBizId,
ef.payout_date as payoutDate
ef.payout_date as payoutDate
from expected_fortune ef
from expected_fortune ef
left join policy p on ef.policy_no = p.policy_no
left join policy p on ef.policy_no = p.policy_no
...
...
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