Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
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
AutogeneralShanghai
yd-backend
Commits
f23654d3
Commit
f23654d3
authored
Mar 21, 2022
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard-02和发佣检核加备注字段
parent
4fdd060e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
174 additions
and
42 deletions
+174
-42
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
+14
-0
yd-api/src/main/java/com/yd/api/agms/service/AgmsFortuneService.java
+2
-0
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsDashboardServiceImpl.java
+20
-30
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsFortuneServiceImpl.java
+25
-4
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsPEPRequestVO.java
+1
-0
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsPractitionerInfo.java
+9
-0
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsPractitionerRequestVO.java
+9
-0
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsSalesInfo.java
+9
-0
yd-api/src/main/java/com/yd/api/agms/vo/fortune/CommissionPayoutAddRemarkRequestVO.java
+21
-0
yd-api/src/main/java/com/yd/dal/entity/agms/fortune/CommissionPayoutStatus.java
+15
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerFortune.java
+6
-0
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsDashboardMapper.java
+2
-2
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsFortuneMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/agms/AgmsDashboardDALService.java
+2
-2
yd-api/src/main/java/com/yd/dal/service/agms/AgmsFortuneDALService.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsDashboardDALServiceImpl.java
+6
-4
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsFortuneDALServiceImpl.java
+16
-0
yd-api/src/main/resources/mapper/agms/AgmsDashboardMapper.xml
+0
-0
yd-api/src/main/resources/mapper/agms/AgmsFortuneMapper.xml
+2
-0
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
+9
-0
No files found.
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
View file @
f23654d3
...
...
@@ -163,6 +163,20 @@ public class AgmsController {
}
/**
* AGMS -- 发佣添加备注
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping
(
value
=
"/commissionPayoutAddRemark"
)
public
Object
commissionPayoutAddRemark
(
@RequestBody
CommissionPayoutAddRemarkRequestVO
requestVO
)
{
JsonResult
result
=
new
JsonResult
();
CommissionPayoutStatusUpdateResponseVO
responseVO
=
agmsFortuneService
.
commissionPayoutAddRemark
(
requestVO
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
}
/**
* AGMS -- 修改佣金发放状态列表
* @param requestVO 请求数据
* @return 响应数据
...
...
yd-api/src/main/java/com/yd/api/agms/service/AgmsFortuneService.java
View file @
f23654d3
...
...
@@ -68,4 +68,6 @@ public interface AgmsFortuneService {
ExportCommissionPayoutStatusQueryResponseVO
exportCommissionPayoutStatusQuery
(
CommissionPayoutStatusQueryRequestVO
requestVO
,
HttpServletResponse
response
);
ExportCommissionPayoutStatusQueryResponseVO
exportCommissionPayoutStatusQuerySheet2
(
CommissionPayoutStatusQueryRequestVO
requestVO
,
HttpServletResponse
response
);
CommissionPayoutStatusUpdateResponseVO
commissionPayoutAddRemark
(
CommissionPayoutAddRemarkRequestVO
requestVO
);
}
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsDashboardServiceImpl.java
View file @
f23654d3
...
...
@@ -24,7 +24,6 @@ import java.util.ArrayList;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
(
"agmsDashboardService"
)
public
class
AgmsDashboardServiceImpl
implements
AgmsDashboardService
{
...
...
@@ -112,15 +111,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
type
=
Strings
.
isNullOrEmpty
(
type
)
?
"b"
:
type
;
List
<
StatisticsSalesInfo
>
statisticsSalesInfos
=
null
;
try
{
if
(
"life"
.
equals
(
category
))
{
//寿险
// 查询N22接口获取寿险数据
statisticsSalesInfos
=
this
.
statisticsSalesN22
(
category
,
type
,
time
);
}
else
if
(
"pc"
.
equals
(
category
))
{
//产险
statisticsSalesInfos
=
agmsDashboardDALService
.
statisticsSalesYD
(
type
,
time
);
}
else
{
statisticsSalesInfos
=
getAll
(
category
,
type
,
time
);
}
statisticsSalesInfos
=
getAll
(
category
,
type
,
time
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
e
.
getMessage
()));
...
...
@@ -283,7 +274,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
* @return 数据
*/
private
List
<
StatisticsSalesInfo
>
getAll
(
String
category
,
String
type
,
String
time
)
throws
Exception
{
StatisticsSalesInfo
statisticsSalesInfo
=
new
StatisticsSalesInfo
();
List
<
StatisticsSalesInfo
>
statisticsSalesInfos
=
new
ArrayList
<>();
String
unitPremium
=
"0"
;
Double
fyp
=
0
D
,
fyc
=
0
D
;
...
...
@@ -291,26 +282,24 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
// List<StatisticsSalesInfo> statisticsSalesInfosLife = agmsDashboardDALService.statisticsSalesEG(type,time);
// 查询N22接口获取寿险数据
List
<
StatisticsSalesInfo
>
statisticsSalesInfosLife
=
this
.
statisticsSalesN22
(
category
,
type
,
time
);
List
<
StatisticsSalesInfo
>
statisticsSalesInfosPC
=
agmsDashboardDALService
.
statisticsSalesYD
(
type
,
time
);
statisticsSalesInfosLife
.
addAll
(
statisticsSalesInfosPC
);
if
(
statisticsSalesInfosLife
.
size
()
>
0
){
for
(
StatisticsSalesInfo
item
:
statisticsSalesInfosLife
){
fyp
+=
Double
.
parseDouble
(
item
.
getFyp
());
fyc
+=
item
.
getFyc
();
pieces
+=
item
.
getPieces
();
}
if
(
pieces
!=
0
){
unitPremium
=
BigDecimal
.
valueOf
(
fyp
/
pieces
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
();
// List<StatisticsSalesInfo> statisticsSalesInfosLife = this.statisticsSalesN22(category, type, time);
statisticsSalesInfos
=
agmsDashboardDALService
.
statisticsSalesYD
(
category
,
type
,
time
);
if
(
statisticsSalesInfos
.
size
()
>
0
){
for
(
StatisticsSalesInfo
item
:
statisticsSalesInfos
){
fyp
=
Double
.
parseDouble
(
item
.
getFyp
());
fyc
=
item
.
getFyc
();
pieces
=
item
.
getPieces
();
// 计算件均保费
unitPremium
=
"0"
;
if
(
pieces
!=
0
){
unitPremium
=
BigDecimal
.
valueOf
(
fyp
/
pieces
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
();
}
item
.
setUnitPremium
(
unitPremium
);
// 处理格式
item
.
setFyc
(
Double
.
parseDouble
(
new
DecimalFormat
(
"0.00"
).
format
(
fyc
)));
item
.
setFyp
(
new
DecimalFormat
(
"0.00"
).
format
(
fyp
));
}
}
statisticsSalesInfo
.
setFyc
(
Double
.
parseDouble
(
new
DecimalFormat
(
"0.00"
).
format
(
fyc
)));
statisticsSalesInfo
.
setFyp
(
new
DecimalFormat
(
"0.00"
).
format
(
fyp
));
statisticsSalesInfo
.
setPieces
(
pieces
);
statisticsSalesInfo
.
setUnitPremium
(
unitPremium
);
statisticsSalesInfo
.
setTypeName
(
"寿险+财险"
);
statisticsSalesInfos
.
add
(
statisticsSalesInfo
);
return
statisticsSalesInfos
;
}
...
...
@@ -318,8 +307,9 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
public
StatisticsPractitionerResponseVO
statisticsPractitioner
(
StatisticsPractitionerRequestVO
requestVO
)
{
StatisticsPractitionerResponseVO
responseVO
=
new
StatisticsPractitionerResponseVO
();
String
type
=
requestVO
.
getType
();
String
time
=
requestVO
.
getTime
();
type
=
Strings
.
isNullOrEmpty
(
type
)
?
"b"
:
type
;
List
<
StatisticsPractitionerInfo
>
statisticsPractitionerInfos
=
agmsDashboardDALService
.
statisticsPractitioner
(
type
);
List
<
StatisticsPractitionerInfo
>
statisticsPractitionerInfos
=
agmsDashboardDALService
.
statisticsPractitioner
(
type
,
time
);
responseVO
.
setStatisticsPractitionerInfos
(
statisticsPractitionerInfos
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
...
...
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsFortuneServiceImpl.java
View file @
f23654d3
...
...
@@ -11,7 +11,6 @@ import com.yd.api.result.CommonResult;
import
com.yd.dal.entity.agms.fortune.*
;
import
com.yd.dal.entity.customer.*
;
import
com.yd.dal.entity.customer.practitioner.PractitionerSubordinateInfo
;
import
com.yd.dal.entity.meta.MdDropOptions
;
import
com.yd.dal.entity.meta.MdIncometaxRate
;
import
com.yd.dal.entity.order.PoOrder
;
import
com.yd.dal.entity.product.Product
;
...
...
@@ -987,6 +986,27 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
return
responseVO
;
}
@Override
public
CommissionPayoutStatusUpdateResponseVO
commissionPayoutAddRemark
(
CommissionPayoutAddRemarkRequestVO
requestVO
)
{
CommissionPayoutStatusUpdateResponseVO
responseVO
=
new
CommissionPayoutStatusUpdateResponseVO
();
Long
fortuneId
=
requestVO
.
getFortuneId
();
String
remark
=
requestVO
.
getRemark
();
Long
loginId
=
requestVO
.
getLoginId
();
if
(
fortuneId
==
null
)
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
"fortuneId不能为空"
));
return
responseVO
;
}
if
(
StringUtils
.
isBlank
(
remark
))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
"remark不能为空"
));
return
responseVO
;
}
agmsFortuneDalService
.
commissionPayoutAddRemark
(
requestVO
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
private
void
generateSheet2
(
XSSFWorkbook
wkb
,
List
<
Long
>
fortuneIdList
,
List
<
Long
>
fortuneIdList2
)
{
XSSFSheet
sheet2
=
wkb
.
createSheet
(
"保单清算明细报表"
);
// 1.设置表头
...
...
@@ -1137,7 +1157,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
private
void
exportCommissionPayoutStatusQueryCSV
(
List
<
CommissionPayoutStatus
>
commissionPayoutStatusList
,
HttpServletResponse
response
)
{
String
[]
columnName
=
new
String
[]{
"序号"
,
"来佣检核年月"
,
"发佣状态"
,
"预计发佣年月"
,
"实际发佣年月"
,
"保险公司"
,
"保单号"
,
"保费"
,
"来佣金额"
,
"佣金类型"
,
"应发佣率"
,
"应发金额"
,
"经纪人"
,
"经纪人职级"
,
"体系"
,
"营业部"
,
"购买方案"
,
"缴费年限"
,
"保障期间"
};
"经纪人"
,
"经纪人职级"
,
"体系"
,
"营业部"
,
"购买方案"
,
"缴费年限"
,
"保障期间"
,
"备注"
};
String
tableName
=
"YD_CommissionPayout"
+
System
.
currentTimeMillis
()
+
".csv"
;
String
CSV_COLUMN_SEPARATOR
=
","
;
//CSV文件列分隔符
...
...
@@ -1154,9 +1174,9 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
for
(
int
i
=
0
;
i
<
commissionPayoutStatusList
.
size
();
i
++)
{
CommissionPayoutStatus
info
=
commissionPayoutStatusList
.
get
(
i
);
//遍历每个对象
buf
.
append
(
i
+
1
).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getCommissionPayoutYearmonth
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getCommissionPayoutYearmonth
()).
append
(
"\t"
).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getCommissionPayoutStatus
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
CommonUtil
.
dateParseString
(
info
.
getPredictMonthPeriod
(),
"yyyy-MM
-dd HH:mm:ss"
)
).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
CommonUtil
.
dateParseString
(
info
.
getPredictMonthPeriod
(),
"yyyy-MM
"
)).
append
(
"\t"
).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getMonthPeriod
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getInsurerName
()
==
null
?
""
:
info
.
getInsurerName
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
"\t"
).
append
(
info
.
getPolicyNo
()
==
null
?
""
:
info
.
getPolicyNo
()).
append
(
"\t"
).
append
(
CSV_COLUMN_SEPARATOR
);
...
...
@@ -1172,6 +1192,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
buf
.
append
(
info
.
getProductName
()
==
null
?
""
:
info
.
getProductName
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getPaymentTermUnit
()
==
null
?
""
:
info
.
getPaymentTermUnit
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getCoverTermType
()
==
null
?
""
:
info
.
getCoverTermType
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
info
.
getRemark
()
==
null
?
""
:
info
.
getRemark
()).
append
(
CSV_COLUMN_SEPARATOR
);
buf
.
append
(
CSV_ROW_SEPARATOR
);
}
...
...
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsPEPRequestVO.java
View file @
f23654d3
...
...
@@ -5,4 +5,5 @@ import lombok.Data;
@Data
public
class
StatisticsPEPRequestVO
{
private
String
type
;
// B:分公司 T:团队
private
String
time
;
//D:今天 W:周 M:月 Q:季度 Y:年
}
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsPractitionerInfo.java
View file @
f23654d3
...
...
@@ -5,6 +5,7 @@ public class StatisticsPractitionerInfo {
private
Long
typeId
;
private
Integer
amount
;
private
Integer
realAmount
;
private
Integer
hiringAmount
;
private
Double
realRate
;
private
Integer
mdrt
;
...
...
@@ -55,4 +56,12 @@ public class StatisticsPractitionerInfo {
public
void
setMdrt
(
Integer
mdrt
)
{
this
.
mdrt
=
mdrt
;
}
public
Integer
getHiringAmount
()
{
return
hiringAmount
;
}
public
void
setHiringAmount
(
Integer
hiringAmount
)
{
this
.
hiringAmount
=
hiringAmount
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsPractitionerRequestVO.java
View file @
f23654d3
package
com
.
yd
.
api
.
agms
.
vo
.
dashboard
;
public
class
StatisticsPractitionerRequestVO
{
private
String
time
;
private
String
type
;
public
String
getType
()
{
...
...
@@ -10,4 +11,12 @@ public class StatisticsPractitionerRequestVO {
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getTime
()
{
return
time
;
}
public
void
setTime
(
String
time
)
{
this
.
time
=
time
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsSalesInfo.java
View file @
f23654d3
...
...
@@ -3,6 +3,7 @@ package com.yd.api.agms.vo.dashboard;
public
class
StatisticsSalesInfo
{
private
String
typeName
;
private
Long
typeId
;
private
String
level
;
private
String
fyp
;
private
Double
fyc
;
private
Double
api
;
...
...
@@ -64,4 +65,12 @@ public class StatisticsSalesInfo {
public
void
setUnitPremium
(
String
unitPremium
)
{
this
.
unitPremium
=
unitPremium
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/fortune/CommissionPayoutAddRemarkRequestVO.java
0 → 100644
View file @
f23654d3
package
com
.
yd
.
api
.
agms
.
vo
.
fortune
;
import
lombok.Data
;
@Data
public
class
CommissionPayoutAddRemarkRequestVO
{
/**
* 登入者id,loginId
*/
private
Long
loginId
;
/**
* 财富id,fortuneId
*/
private
Long
fortuneId
;
/**
* 备注
*/
private
String
remark
;
}
yd-api/src/main/java/com/yd/dal/entity/agms/fortune/CommissionPayoutStatus.java
View file @
f23654d3
package
com
.
yd
.
dal
.
entity
.
agms
.
fortune
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -102,6 +103,8 @@ public class CommissionPayoutStatus {
*/
private
String
monthPeriod
;
private
String
remark
;
public
String
getCommissionPayoutYearmonth
()
{
return
commissionPayoutYearmonth
;
}
...
...
@@ -231,6 +234,9 @@ public class CommissionPayoutStatus {
}
public
String
getMonthPeriod
()
{
if
(
StringUtils
.
isEmpty
(
monthPeriod
))
{
return
StringUtils
.
EMPTY
;
}
return
monthPeriod
;
}
...
...
@@ -276,6 +282,7 @@ public class CommissionPayoutStatus {
", referralAmount="
+
referralAmount
+
", commissionPayoutStatus='"
+
commissionPayoutStatus
+
'\''
+
", monthPeriod='"
+
monthPeriod
+
'\''
+
", remark='"
+
remark
+
'\''
+
'}'
;
}
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
...
...
@@ -286,4 +293,12 @@ public class CommissionPayoutStatus {
public
void
setPredictMonthPeriod
(
Date
predictMonthPeriod
)
{
this
.
predictMonthPeriod
=
predictMonthPeriod
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
}
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerFortune.java
View file @
f23654d3
...
...
@@ -180,4 +180,9 @@ public class AclCustomerFortune {
private
Double
achievements
;
//业绩
private
Double
examineFyc
;
//考核FYC
private
Double
comprehensiveFyc
;
//综合业绩FYC
/**
* 更新时间
*/
private
Date
updatedAt
;
private
Long
updatedBy
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsDashboardMapper.java
View file @
f23654d3
...
...
@@ -18,9 +18,9 @@ public interface AgmsDashboardMapper {
List
<
Map
<
String
,
Long
>>
getPractitionerNums
(
@Param
(
"type"
)
String
type
);
List
<
StatisticsSalesInfo
>
statisticsSalesYD
(
@Param
(
"type"
)
String
type
,
@Param
(
"time"
)
String
time
);
List
<
StatisticsSalesInfo
>
statisticsSalesYD
(
@Param
(
"
category"
)
String
category
,
@Param
(
"
type"
)
String
type
,
@Param
(
"time"
)
String
time
);
List
<
StatisticsPractitionerInfo
>
statisticsPractitioner
(
@Param
(
"type"
)
String
type
);
List
<
StatisticsPractitionerInfo
>
statisticsPractitioner
(
@Param
(
"type"
)
String
type
,
@Param
(
"time"
)
String
time
);
List
<
StatisticsSalesInfo
>
statisticsSalesEG
(
@Param
(
"type"
)
String
type
,
@Param
(
"time"
)
String
time
);
...
...
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsFortuneMapper.java
View file @
f23654d3
package
com
.
yd
.
dal
.
mapper
.
agms
;
import
com.yd.api.agms.vo.fortune.CommissionPayoutAddRemarkRequestVO
;
import
com.yd.dal.entity.agms.fortune.*
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -50,4 +51,6 @@ public interface AgmsFortuneMapper {
List
<
Long
>
querySalePractitionerFortune
(
List
<
Long
>
fortuneIdList
);
List
<
Long
>
querySalePractitionerFortune1
(
List
<
Long
>
fortuneIdList
);
void
commissionPayoutAddRemark
(
CommissionPayoutAddRemarkRequestVO
requestVO
);
}
yd-api/src/main/java/com/yd/dal/service/agms/AgmsDashboardDALService.java
View file @
f23654d3
...
...
@@ -14,9 +14,9 @@ public interface AgmsDashboardDALService {
List
<
StatisticsOpportunityInfo
>
statisticsOpportunity
(
String
type
,
String
time
,
Long
id
);
List
<
StatisticsSalesInfo
>
statisticsSalesYD
(
String
type
,
String
time
);
List
<
StatisticsSalesInfo
>
statisticsSalesYD
(
String
category
,
String
type
,
String
time
);
List
<
StatisticsPractitionerInfo
>
statisticsPractitioner
(
String
type
);
List
<
StatisticsPractitionerInfo
>
statisticsPractitioner
(
String
type
,
String
time
);
List
<
StatisticsSalesInfo
>
statisticsSalesEG
(
String
type
,
String
time
);
...
...
yd-api/src/main/java/com/yd/dal/service/agms/AgmsFortuneDALService.java
View file @
f23654d3
package
com
.
yd
.
dal
.
service
.
agms
;
import
com.yd.api.agms.vo.fortune.CommissionPayoutAddRemarkRequestVO
;
import
com.yd.dal.entity.agms.fortune.*
;
import
java.util.List
;
...
...
@@ -50,4 +51,6 @@ public interface AgmsFortuneDALService {
List
<
Long
>
querySalePractitionerFortune
(
List
<
Long
>
fortuneIdList
);
List
<
Long
>
querySalePractitionerFortune1
(
List
<
Long
>
fortuneIdList
);
void
commissionPayoutAddRemark
(
CommissionPayoutAddRemarkRequestVO
requestVO
);
}
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsDashboardDALServiceImpl.java
View file @
f23654d3
...
...
@@ -99,8 +99,8 @@ public class AgmsDashboardDALServiceImpl implements AgmsDashboardDALService {
}
@Override
public
List
<
StatisticsSalesInfo
>
statisticsSalesYD
(
String
type
,
String
time
)
{
List
<
StatisticsSalesInfo
>
statisticsSalesInfos
=
agmsDashboardMapper
.
statisticsSalesYD
(
type
,
time
);
public
List
<
StatisticsSalesInfo
>
statisticsSalesYD
(
String
category
,
String
type
,
String
time
)
{
List
<
StatisticsSalesInfo
>
statisticsSalesInfos
=
agmsDashboardMapper
.
statisticsSalesYD
(
category
,
type
,
time
);
getUnitPremium
(
statisticsSalesInfos
);
return
statisticsSalesInfos
;
}
...
...
@@ -159,8 +159,8 @@ public class AgmsDashboardDALServiceImpl implements AgmsDashboardDALService {
}
@Override
public
List
<
StatisticsPractitionerInfo
>
statisticsPractitioner
(
String
type
)
{
List
<
StatisticsPractitionerInfo
>
statisticsPractitionerInfos
=
agmsDashboardMapper
.
statisticsPractitioner
(
type
);
public
List
<
StatisticsPractitionerInfo
>
statisticsPractitioner
(
String
type
,
String
time
)
{
List
<
StatisticsPractitionerInfo
>
statisticsPractitionerInfos
=
agmsDashboardMapper
.
statisticsPractitioner
(
type
,
time
);
//计算实动率
if
(
statisticsPractitionerInfos
!=
null
&&
statisticsPractitionerInfos
.
size
()
>
0
){
Integer
realAmount
,
amount
;
...
...
@@ -170,6 +170,8 @@ public class AgmsDashboardDALServiceImpl implements AgmsDashboardDALService {
if
(
amount
>
0
){
item
.
setRealRate
(
BigDecimal
.
valueOf
((
realAmount
.
doubleValue
()
/
amount
.
doubleValue
())
*
100
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
}
// 前端取amount作为报聘人数
item
.
setAmount
(
item
.
getHiringAmount
());
}
}
return
statisticsPractitionerInfos
;
...
...
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsFortuneDALServiceImpl.java
View file @
f23654d3
package
com
.
yd
.
dal
.
service
.
agms
.
impl
;
import
com.yd.api.agms.vo.fortune.CommissionPayoutAddRemarkRequestVO
;
import
com.yd.dal.entity.agms.fortune.*
;
import
com.yd.dal.entity.customer.AclCustomerFortune
;
import
com.yd.dal.mapper.agms.AgmsFortuneMapper
;
import
com.yd.dal.mapper.customer.AclCustomerFortuneMapper
;
import
com.yd.dal.service.agms.AgmsFortuneDALService
;
import
com.yd.util.deshandler.DESTypeHandler
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -18,6 +21,9 @@ public class AgmsFortuneDALServiceImpl implements AgmsFortuneDALService {
@Autowired
private
AgmsFortuneMapper
agmsFortuneMapper
;
@Autowired
private
AclCustomerFortuneMapper
aclCustomerFortuneMapper
;
@Override
public
Map
<
Long
,
CustomerFortuneStatisticalInfo
>
findFortuneStatisticalByCustomers
(
Set
<
Long
>
customerIds
)
{
...
...
@@ -87,4 +93,14 @@ public class AgmsFortuneDALServiceImpl implements AgmsFortuneDALService {
public
List
<
Long
>
querySalePractitionerFortune1
(
List
<
Long
>
fortuneIdList
)
{
return
agmsFortuneMapper
.
querySalePractitionerFortune1
(
fortuneIdList
);
}
@Override
public
void
commissionPayoutAddRemark
(
CommissionPayoutAddRemarkRequestVO
requestVO
)
{
AclCustomerFortune
fortune
=
new
AclCustomerFortune
();
fortune
.
setId
(
requestVO
.
getFortuneId
());
fortune
.
setRemark
(
requestVO
.
getRemark
());
fortune
.
setUpdatedBy
(
requestVO
.
getLoginId
());
fortune
.
setUpdatedAt
(
new
Date
());
aclCustomerFortuneMapper
.
updateByPrimaryKeySelective
(
fortune
);
}
}
yd-api/src/main/resources/mapper/agms/AgmsDashboardMapper.xml
View file @
f23654d3
This diff is collapsed.
Click to expand it.
yd-api/src/main/resources/mapper/agms/AgmsFortuneMapper.xml
View file @
f23654d3
...
...
@@ -80,6 +80,7 @@
t.referral_amount referralAmount,
t.predict_month_period predictMonthPeriod,
op.drop_option_name commissionPayoutStatus,
t.remark,
pb.payout_yearmonth monthPeriod
FROM ag_acl_customer_fortune t
LEFT JOIN ag_po_order o ON o.id = t.order_id
...
...
@@ -166,6 +167,7 @@
t.referral_amount referralAmount,
t.predict_month_period predictMonthPeriod,
op.drop_option_name commissionPayoutStatus,
t.remark,
pb.payout_yearmonth monthPeriod
FROM ag_acl_customer_fortune t
LEFT JOIN ag_acl_practitioner pra ON pra.id = t.practitioner_id
...
...
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
View file @
f23654d3
...
...
@@ -420,6 +420,15 @@
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
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