Commit 0d281f9d by wenyang Committed by jianan

渠道规则开发3(执行关账、计算个税、预览薪资单、销售保单明细导出)

parent 34a0f389
...@@ -1275,7 +1275,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService { ...@@ -1275,7 +1275,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
FortunePayToOrderInfo info = fortunePayToOrderInfos.get(i);//遍历每个对象 FortunePayToOrderInfo info = fortunePayToOrderInfos.get(i);//遍历每个对象
buf.append(i + 1).append(CSV_COLUMN_SEPARATOR); buf.append(i + 1).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getPayoutYearmonth()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getPayoutYearmonth()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getPractitionerName()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getPractitionerName() == null ? info.getChannelName() : info.getPractitionerName()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getCommissionAmount() == null ? 0 : info.getCommissionAmount()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getCommissionAmount() == null ? 0 : info.getCommissionAmount()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getReferralAmount() == null ? 0 : info.getReferralAmount()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getReferralAmount() == null ? 0 : info.getReferralAmount()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getFycAmount() == null ? 0 : info.getFycAmount()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getFycAmount() == null ? 0 : info.getFycAmount()).append(CSV_COLUMN_SEPARATOR);
...@@ -1284,7 +1284,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService { ...@@ -1284,7 +1284,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
buf.append(info.getCommissionRate() == null ? 0 : info.getCommissionRate()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getCommissionRate() == null ? 0 : info.getCommissionRate()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getCommissionPayoutStatus()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getCommissionPayoutStatus()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getCommissionType() == null ? "" : info.getCommissionType()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getCommissionType() == null ? "" : info.getCommissionType()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getMobileNo()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getMobileNo() == null ? info.getContactPhone() : info.getMobileNo()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getPractitionerLevel() == null ? "" : info.getPractitionerLevel()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getPractitionerLevel() == null ? "" : info.getPractitionerLevel()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getInsurerBranchName() == null ? "" : info.getInsurerBranchName()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getInsurerBranchName() == null ? "" : info.getInsurerBranchName()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getInsurerBranchDeptName() == null ? "" : info.getInsurerBranchDeptName()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getInsurerBranchDeptName() == null ? "" : info.getInsurerBranchDeptName()).append(CSV_COLUMN_SEPARATOR);
......
...@@ -98,6 +98,15 @@ public class FortunePayToOrderInfo { ...@@ -98,6 +98,15 @@ public class FortunePayToOrderInfo {
*/ */
private BigDecimal fycAmount; private BigDecimal fycAmount;
/**
* 渠道名称
*/
private String channelName;
/**
* 渠道联系人手机号
*/
private String contactPhone;
/** /**
* 获取 保险公司 * 获取 保险公司
...@@ -422,8 +431,24 @@ public class FortunePayToOrderInfo { ...@@ -422,8 +431,24 @@ public class FortunePayToOrderInfo {
public void setFycAmount(BigDecimal fycAmount) { public void setFycAmount(BigDecimal fycAmount) {
this.fycAmount = fycAmount; this.fycAmount = fycAmount;
} }
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
public String getContactPhone() {
return contactPhone;
}
public void setContactPhone(String contactPhone) {
this.contactPhone = contactPhone;
}
@Override @Override
public String toString() { public String toString() {
return "FortunePayToOrderInfo{" + return "FortunePayToOrderInfo{" +
"insurerName='" + insurerName + '\'' + "insurerName='" + insurerName + '\'' +
...@@ -444,6 +469,8 @@ public class FortunePayToOrderInfo { ...@@ -444,6 +469,8 @@ public class FortunePayToOrderInfo {
", insurerBranchDeptName='" + insurerBranchDeptName + '\'' + ", insurerBranchDeptName='" + insurerBranchDeptName + '\'' +
", subordinateSystemName='" + subordinateSystemName + '\'' + ", subordinateSystemName='" + subordinateSystemName + '\'' +
", fycAmount=" + fycAmount + ", fycAmount=" + fycAmount +
", channelName=" + channelName +
", contactPhone=" + contactPhone +
'}'; '}';
} }
} }
......
...@@ -3,7 +3,6 @@ package com.yd.dal.entity.agms.fortune; ...@@ -3,7 +3,6 @@ package com.yd.dal.entity.agms.fortune;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* @author xxy * @author xxy
...@@ -158,6 +157,7 @@ public class WithdrawLabelInfo { ...@@ -158,6 +157,7 @@ public class WithdrawLabelInfo {
*匹配佣奖率的金额 *匹配佣奖率的金额
*/ */
private BigDecimal calculationAmount; private BigDecimal calculationAmount;
private String channelType;
} }
......
...@@ -209,7 +209,9 @@ ...@@ -209,7 +209,9 @@
dept.name insurerBranchDeptName, dept.name insurerBranchDeptName,
sub.name subordinateSystemName, sub.name subordinateSystemName,
ib.branch_name insurerBranchName, ib.branch_name insurerBranchName,
f.fyc_amount fycAmount f.fyc_amount fycAmount,
cha.name channelName,
cha.contact_phone contactPhone
from ag_acl_customer_fortune f from ag_acl_customer_fortune f
left join ag_po_order o on o.id = f.order_id left join ag_po_order o on o.id = f.order_id
left join ag_product_plan pp on pp.id = o.plan_id left join ag_product_plan pp on pp.id = o.plan_id
...@@ -217,6 +219,7 @@ ...@@ -217,6 +219,7 @@
left join ag_acl_insurer i on o.insurer_id = i.id left join ag_acl_insurer i on o.insurer_id = i.id
left join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id left join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id
LEFT JOIN ag_acl_practitioner pra ON pra.customer_id = f.customer_id LEFT JOIN ag_acl_practitioner pra ON pra.customer_id = f.customer_id
LEFT JOIN ag_acl_channel_new cha ON cha.customer_id = f.customer_id
LEFT JOIN ag_acl_insurer_branch ib on ib.id = pra.insurer_branch_id LEFT JOIN ag_acl_insurer_branch ib on ib.id = pra.insurer_branch_id
LEFT JOIN ag_acl_insurer_branch_dept dept ON pra.dept_id = dept.id LEFT JOIN ag_acl_insurer_branch_dept dept ON pra.dept_id = dept.id
LEFT JOIN ag_acl_practitioner_subordinate_system sub ON sub.id = pra.subordinate_system_id LEFT JOIN ag_acl_practitioner_subordinate_system sub ON sub.id = pra.subordinate_system_id
...@@ -269,6 +272,7 @@ ...@@ -269,6 +272,7 @@
<result column="calculationFormula" jdbcType="VARCHAR" property="calculationFormula"/> <result column="calculationFormula" jdbcType="VARCHAR" property="calculationFormula"/>
<result column="calculationRate" jdbcType="DECIMAL" property="calculationRate" /> <result column="calculationRate" jdbcType="DECIMAL" property="calculationRate" />
<result column="calculationAmount" jdbcType="DECIMAL" property="calculationAmount" /> <result column="calculationAmount" jdbcType="DECIMAL" property="calculationAmount" />
<result column="channelType" jdbcType="VARCHAR" property="channelType" />
</resultMap> </resultMap>
...@@ -291,7 +295,8 @@ ...@@ -291,7 +295,8 @@
if(salary.taxout_amount is null,0,salary.taxout_amount) taxAmount, if(salary.taxout_amount is null,0,salary.taxout_amount) taxAmount,
if(salary.net_amount is null,0,salary.net_amount) afterTaxAmount, if(salary.net_amount is null,0,salary.net_amount) afterTaxAmount,
ib.id insurerBranchId, ib.id insurerBranchId,
salary.is_active isActive salary.is_active isActive,
f.channel_type channelType
from ag_acl_customer_fortune_pay pay from ag_acl_customer_fortune_pay pay
inner join ag_acl_customer_fortune f on f.fortune_payed_id = pay.id inner join ag_acl_customer_fortune f on f.fortune_payed_id = pay.id
inner join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id inner join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment