Commit dc6ef209 by hongzhong

薪资单调整,1,AGMS可以预览

parent 3409816e
...@@ -14,4 +14,9 @@ public class QuerySalaryDetailRequestVO { ...@@ -14,4 +14,9 @@ public class QuerySalaryDetailRequestVO {
private Long practitionerId; private Long practitionerId;
private String isBasic; private String isBasic;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
} }
...@@ -16,6 +16,19 @@ public class PayScaleInfo { ...@@ -16,6 +16,19 @@ public class PayScaleInfo {
private String years; private String years;
private String month; private String month;
private String isBasic; private String isBasic;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
public Long getMonShId() { public Long getMonShId() {
return monShId; return monShId;
......
...@@ -9,6 +9,10 @@ public class PayScaleQueryRequestVO { ...@@ -9,6 +9,10 @@ public class PayScaleQueryRequestVO {
* 0-查本年 1-查历史 2-查全部 * 0-查本年 1-查历史 2-查全部
*/ */
private String isHistory; private String isHistory;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
public String getPractitionerIdEG() { public String getPractitionerIdEG() {
return practitionerIdEG; return practitionerIdEG;
...@@ -33,4 +37,12 @@ public class PayScaleQueryRequestVO { ...@@ -33,4 +37,12 @@ public class PayScaleQueryRequestVO {
public void setIsHistory(String isHistory) { public void setIsHistory(String isHistory) {
this.isHistory = isHistory; this.isHistory = isHistory;
} }
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
} }
...@@ -3,6 +3,7 @@ package com.yd.dal.entity.agms.fortune; ...@@ -3,6 +3,7 @@ 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
...@@ -83,6 +84,75 @@ public class WithdrawLabelInfo { ...@@ -83,6 +84,75 @@ public class WithdrawLabelInfo {
*/ */
private Long insurerBranchId; private Long insurerBranchId;
/**
* 投保人
*/
private String insuredName;
/**
* 保险公司
*/
private String insurerName;
/**
* 产品名称
*/
private String productName;
/**
* 计划名称
*/
private String planName;
/**
* 有效时间
*/
private String effectiveStartDate;
/**
* 保单号
*/
private String policyNo;
/**
* 保费
*/
private BigDecimal orderPrice;
/**
*公告佣金
*/
private BigDecimal fycAmount;
/**
* 职佣
*/
private BigDecimal gradeCommissionRate;
/**
*佣金比率
*/
private BigDecimal commissionRate;
/**
*公告佣率
*/
private BigDecimal fycRate;
/**
*分摊比率
*/
private BigDecimal shareRate;
/**
*公告佣类型
*/
private String dropOptionCode;
private Integer isActive;
private String remark;
/**
*佣金类型
*/
private String commissionType;
/**
*佣金来源的计算公式
*/
private String calculationFormula;
} }
...@@ -50,6 +50,12 @@ public class AgAclLifePractitionerSalary implements Serializable { ...@@ -50,6 +50,12 @@ public class AgAclLifePractitionerSalary implements Serializable {
private String isBasic; private String isBasic;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
...@@ -116,6 +122,14 @@ public class AgAclLifePractitionerSalary implements Serializable { ...@@ -116,6 +122,14 @@ public class AgAclLifePractitionerSalary implements Serializable {
this.pdfOssPath = pdfOssPath; this.pdfOssPath = pdfOssPath;
} }
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
@Override @Override
public boolean equals(Object that) { public boolean equals(Object that) {
if (this == that) { if (this == that) {
......
...@@ -38,4 +38,13 @@ public interface AgmsFortuneMapper { ...@@ -38,4 +38,13 @@ public interface AgmsFortuneMapper {
*/ */
List<WithdrawLabelInfo> transformForWithdrawLabel(@Param("item")WithdrawQueryInfo info); List<WithdrawLabelInfo> transformForWithdrawLabel(@Param("item")WithdrawQueryInfo info);
/**
* 薪资单保单明细
* @param info 过滤条件
* @return 返回结果
*/
List<WithdrawLabelInfo> salaryPolicyNoDetails(@Param("item")WithdrawQueryInfo info);
} }
...@@ -18,9 +18,9 @@ public interface AgAclLifePractitionerSalaryMapper { ...@@ -18,9 +18,9 @@ public interface AgAclLifePractitionerSalaryMapper {
int updateByPrimaryKey(AgAclLifePractitionerSalary record); int updateByPrimaryKey(AgAclLifePractitionerSalary record);
List<AgAclLifePractitionerSalary> queryListByPractitionerId(Long practitionerId); List<AgAclLifePractitionerSalary> queryListByPractitionerId(@Param("practitionerId") Long practitionerId,@Param("isActive") Integer isActive);
List<AgAclLifePractitionerSalary> queryListByPractitionerIdAndIsbasic(@Param("practitionerId") Long practitionerId, @Param("isBasic") Integer isBasic); List<AgAclLifePractitionerSalary> queryListByPractitionerIdAndIsbasic(@Param("practitionerId") Long practitionerId, @Param("isBasic") Integer isBasic,@Param("isActive") Integer isActive);
List<AgAclLifePractitionerSalary> queryByRecord(AgAclLifePractitionerSalary lifePractitionerSalary); List<AgAclLifePractitionerSalary> queryByRecord(AgAclLifePractitionerSalary lifePractitionerSalary);
} }
...@@ -42,4 +42,11 @@ public interface AgmsFortuneDALService { ...@@ -42,4 +42,11 @@ public interface AgmsFortuneDALService {
*/ */
List<WithdrawLabelInfo> transformForWithdrawLabel(WithdrawQueryInfo info); List<WithdrawLabelInfo> transformForWithdrawLabel(WithdrawQueryInfo info);
/**
* 薪资单保单明细
* @param info 过滤条件
* @return 返回结果
*/
List<WithdrawLabelInfo> salaryPolicyNoDetails(WithdrawQueryInfo info);
} }
...@@ -68,4 +68,8 @@ public class AgmsFortuneDALServiceImpl implements AgmsFortuneDALService { ...@@ -68,4 +68,8 @@ public class AgmsFortuneDALServiceImpl implements AgmsFortuneDALService {
return agmsFortuneMapper.transformForWithdrawLabel(info); return agmsFortuneMapper.transformForWithdrawLabel(info);
} }
@Override
public List<WithdrawLabelInfo> salaryPolicyNoDetails(WithdrawQueryInfo info) {
return agmsFortuneMapper.salaryPolicyNoDetails(info);
}
} }
...@@ -34,6 +34,9 @@ public class Commission { ...@@ -34,6 +34,9 @@ public class Commission {
private String Comments; private String Comments;
private String calculationFormula;
public Commission() { public Commission() {
} }
...@@ -161,4 +164,12 @@ public class Commission { ...@@ -161,4 +164,12 @@ public class Commission {
public void setComments(String comments) { public void setComments(String comments) {
Comments = comments; Comments = comments;
} }
public String getCalculationFormula() {
return calculationFormula;
}
public void setCalculationFormula(String calculationFormula) {
this.calculationFormula = calculationFormula;
}
} }
...@@ -9,6 +9,7 @@ public class OtherCommission { ...@@ -9,6 +9,7 @@ public class OtherCommission {
private String Commission; //奖金金额 private String Commission; //奖金金额
private String Comments;//备注 private String Comments;//备注
private Long withdrawedId; private Long withdrawedId;
private String calculationFormula;//佣金计算公式
public OtherCommission() { public OtherCommission() {
} }
...@@ -52,4 +53,12 @@ public class OtherCommission { ...@@ -52,4 +53,12 @@ public class OtherCommission {
public void setProject_Id(String project_Id) { public void setProject_Id(String project_Id) {
Project_Id = project_Id; Project_Id = project_Id;
} }
public String getCalculationFormula() {
return calculationFormula;
}
public void setCalculationFormula(String calculationFormula) {
this.calculationFormula = calculationFormula;
}
} }
...@@ -8,6 +8,7 @@ public class RenewalYearPerformanceCommission { ...@@ -8,6 +8,7 @@ public class RenewalYearPerformanceCommission {
private String Rate; private String Rate;
private String Commission; private String Commission;
private String Comments; private String Comments;
private String calculationFormula;//佣金计算公式
public RenewalYearPerformanceCommission() { public RenewalYearPerformanceCommission() {
} }
...@@ -52,4 +53,12 @@ public class RenewalYearPerformanceCommission { ...@@ -52,4 +53,12 @@ public class RenewalYearPerformanceCommission {
public void setComments(String comments) { public void setComments(String comments) {
Comments = comments; Comments = comments;
} }
public String getCalculationFormula() {
return calculationFormula;
}
public void setCalculationFormula(String calculationFormula) {
this.calculationFormula = calculationFormula;
}
} }
...@@ -18,5 +18,5 @@ public class SearchStaffSalaryDetailsRequestBody { ...@@ -18,5 +18,5 @@ public class SearchStaffSalaryDetailsRequestBody {
private Long practitionerId; private Long practitionerId;
private String isBasic; private String isBasic;
private Integer isActive;
} }
...@@ -250,6 +250,24 @@ ...@@ -250,6 +250,24 @@
<result column="taxAmount" jdbcType="DECIMAL" property="taxAmount" /> <result column="taxAmount" jdbcType="DECIMAL" property="taxAmount" />
<result column="afterTaxAmount" jdbcType="DECIMAL" property="afterTaxAmount" /> <result column="afterTaxAmount" jdbcType="DECIMAL" property="afterTaxAmount" />
<result column="insurerBranchId" jdbcType="BIGINT" property="insurerBranchId" /> <result column="insurerBranchId" jdbcType="BIGINT" property="insurerBranchId" />
<result column="insuredName" jdbcType="VARCHAR" property="insuredName" />
<result column="insurerName" jdbcType="VARCHAR" property="insurerName" />
<result column="productName" jdbcType="VARCHAR" property="productName" />
<result column="planName" jdbcType="VARCHAR" property="planName" />
<result column="effectiveStartDate" jdbcType="VARCHAR" property="effectiveStartDate" />
<result column="policyNo" jdbcType="VARCHAR" property="policyNo" />
<result column="orderPrice" jdbcType="DECIMAL" property="orderPrice" />
<result column="fycAmount" jdbcType="DECIMAL" property="fycAmount" />
<result column="gradeCommissionRate" jdbcType="DECIMAL" property="gradeCommissionRate" />
<result column="commissionRate" jdbcType="DECIMAL" property="commissionRate" />
<result column="fycRate" jdbcType="DECIMAL" property="fycRate" />
<result column="shareRate" jdbcType="DECIMAL" property="shareRate" />
<result column="dropOptionCode" jdbcType="DECIMAL" property="dropOptionCode" />
<result column="is_active" jdbcType="INTEGER" property="isActive"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="commissionType" jdbcType="VARCHAR" property="commissionType"/>
<result column="calculationFormula" jdbcType="VARCHAR" property="calculationFormula"/>
</resultMap> </resultMap>
<select id="transformForWithdrawLabel" <select id="transformForWithdrawLabel"
parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo" parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo"
...@@ -269,7 +287,8 @@ ...@@ -269,7 +287,8 @@
pra.ID practitionerId, pra.ID practitionerId,
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
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_po_order o on o.id = f.order_id --> <!-- inner JOIN ag_po_order o on o.id = f.order_id -->
...@@ -311,4 +330,55 @@ ...@@ -311,4 +330,55 @@
</if> </if>
order by pb.payout_yearmonth order by pb.payout_yearmonth
</select> </select>
<select id="salaryPolicyNoDetails"
parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo"
resultMap="WithdrawLabelInfo">
select
(select off.name from ag_acl_policyholder off where off.order_id=o.id and off.type=2) insuredName,
i.name insurerName,
p.name productName,
pp.name planName,
o.effective_start_date effectiveStartDate,
o.policy_no policyNo,
f.order_price orderPrice,
f.fyc_amount fycAmount,
f.grade_commission_rate gradeCommissionRate,
(select s.name from ag_acl_practitioner_subordinate_system s where s.id = pra.subordinate_system_id) subordinateSystemName,
pra.name practitionerName,
if(f.commission_rate is null,0,f.commission_rate) commissionRate,
if(f.fyc_rate is null,0,f.fyc_rate) fycRate,
if(f.share_rate is null,100,f.share_rate) shareRate,
f.drop_option_code dropOptionCode,
f.remark remark,
f.commission_type commissionType,
f.referral_amount referralAmount,
f.calculation_formula calculationFormula,
f.withdrawed_id withdrawId
from ag_acl_customer_fortune f
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 p on p.id = o.product_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_practitioner pra on pra.customer_id = f.customer_id
left join ag_acl_life_insurance_practitioner lifepra on pra.id=lifepra.practitioner_id and lifepra.order_id=o.id
inner join ag_acl_practitioner_setting setting on pra.id = setting.practitioner_id
left join ag_md_drop_options op
left join ag_md_drop_master mas on mas.id = op.drop_master_id on op.drop_option_code = f.commission_payout_status
where (o.status = 3 or o.status = 4 or o.status is null)
AND mas.drop_code like 'Commission_Payout_Status'
AND (f.order_price != 0 or f.order_price is null) and setting.practitioner_type_id = 28
and f.commission_payout_status = 4
<if test="item.payoutYearmonth != null">
and pb.payout_yearmonth = #{item.payoutYearmonth,jdbcType=VARCHAR}
</if>
<if test="item.practitionerId != null">
and pra.id = #{item.practitionerId,jdbcType=BIGINT}
</if>
</select>
</mapper> </mapper>
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
<result column="net_amount" jdbcType="DECIMAL" property="netAmount" /> <result column="net_amount" jdbcType="DECIMAL" property="netAmount" />
<result column="pdf_oss_path" jdbcType="VARCHAR" property="pdfOssPath" /> <result column="pdf_oss_path" jdbcType="VARCHAR" property="pdfOssPath" />
<result column="is_basic" jdbcType="BIGINT" property="isBasic" /> <result column="is_basic" jdbcType="BIGINT" property="isBasic" />
<result column="is_active" jdbcType="BIGINT" property="isActive" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, practitioner_id, practitioner_code, `year_month`, payable_amount, taxout_amount, id, practitioner_id, practitioner_code, `year_month`, payable_amount, taxout_amount,
net_amount, pdf_oss_path, is_basic net_amount, pdf_oss_path, is_basic,is_active
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
...@@ -126,6 +128,9 @@ ...@@ -126,6 +128,9 @@
select <include refid="Base_Column_List" /> select <include refid="Base_Column_List" />
from ag_acl_life_practitioner_salary from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT} where practitioner_id = #{practitionerId,jdbcType=BIGINT}
<if test="isActive != null ">
and is_active = #{isActive,jdbcType=BIGINT}
</if>
</select> </select>
<select id="queryListByPractitionerIdAndIsbasic" resultMap="BaseResultMap"> <select id="queryListByPractitionerIdAndIsbasic" resultMap="BaseResultMap">
...@@ -133,6 +138,10 @@ ...@@ -133,6 +138,10 @@
from ag_acl_life_practitioner_salary from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT} where practitioner_id = #{practitionerId,jdbcType=BIGINT}
and is_basic = #{isBasic,jdbcType=BIGINT} and is_basic = #{isBasic,jdbcType=BIGINT}
<if test="isActive != null ">
and is_active = #{isActive,jdbcType=BIGINT}
</if>
</select> </select>
<select id="queryByRecord" resultMap="BaseResultMap"> <select id="queryByRecord" resultMap="BaseResultMap">
...@@ -147,5 +156,8 @@ ...@@ -147,5 +156,8 @@
<if test="yearMonth != null"> <if test="yearMonth != null">
and `year_month` = #{yearMonth,jdbcType=VARCHAR} and `year_month` = #{yearMonth,jdbcType=VARCHAR}
</if> </if>
<if test="isActive != null">
and is_active = #{isActive,jdbcType=VARCHAR}
</if>
</select> </select>
</mapper> </mapper>
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