Commit f0e199db authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents c6507e50 678dc25d
...@@ -43,6 +43,15 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -43,6 +43,15 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
@ExcelProperty("员工姓名") @ExcelProperty("员工姓名")
private String empName; private String empName;
/**
* 员工编码
*/
@ExcelAttribute(name = "员工编码" )
@Schema(description ="员工编码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工编码")
private String empNo;
/** /**
* 身份证号 * 身份证号
*/ */
...@@ -71,22 +80,13 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -71,22 +80,13 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
private String settleDomainName; private String settleDomainName;
/** /**
* 生成月份 * 项目编码
*/
@ExcelAttribute(name = "生成月份")
@Schema(description ="生成月份")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生成月份")
private String socialCreateMonth;
/**
* 缴纳月份
*/ */
@ExcelAttribute(name = "缴纳月份") @ExcelAttribute(name = "项目编码", maxLength = 50)
@Schema(description ="缴纳月份") @Schema(description = "项目编码" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("缴纳月份") @ExcelProperty("项目编码" )
private String socialPayMonth; private String settleDomainCode;
/** /**
* 社保户 * 社保户
...@@ -97,6 +97,15 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -97,6 +97,15 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
@ExcelProperty("社保户") @ExcelProperty("社保户")
private String socialHousehold; private String socialHousehold;
/**
* 社保编号
*/
@ExcelAttribute(name = "社保编号" )
@Schema(description ="社保编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保编号")
private String socialSecurityNo;
/** /**
* 社保缴纳地 * 社保缴纳地
*/ */
...@@ -107,55 +116,58 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -107,55 +116,58 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
private String socialPayAddr; private String socialPayAddr;
/** /**
* 养老金额 * 社保缴纳月份
*/
@ExcelAttribute(name = "养老金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老金额")
private BigDecimal pensionMoneySum;
/**
* 医疗金额
*/ */
@ExcelAttribute(name = "医疗金额") @ExcelAttribute(name = "社保缴纳月份")
@Schema(description ="社保缴纳月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗金额") @ExcelProperty("社保缴纳月份")
private BigDecimal medicalMoneySum; private String socialPayMonth;
/** /**
* 失业金额 * 社保生成月份
*/ */
@ExcelAttribute(name = "失业金额") @ExcelAttribute(name = "社保生成月份")
@Schema(description ="社保生成月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业金额") @ExcelProperty("社保生成月份")
private BigDecimal unemploymentMoneySum; private String socialCreateMonth;
/** /**
* 工伤金额 * 公积金缴纳月份
*/ */
@ExcelAttribute(name = "工伤金额") @ExcelAttribute(name = "公积金缴纳月份")
@Schema(description ="公积金缴纳月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤金额") @ExcelProperty("公积金缴纳月份")
private BigDecimal unitInjuryMoney; private String providentPayMonth;
/** /**
* 单位生育金额 * 公积金生成月份
*/ */
@ExcelAttribute(name = "生育金额") @ExcelAttribute(name = "公积金生成月份")
@Schema(description ="公积金生成月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育金额") @ExcelProperty("公积金生成月份")
private BigDecimal unitBirthMoney; private String providentCreateMonth;
/** /**
* 大病金额 * 公积金户
*/ */
@ExcelAttribute(name = "大病金额") @ExcelAttribute(name = "公积金户" )
@Schema(description ="公积金户")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病金额") @ExcelProperty("公积金户")
private BigDecimal bigmailmentMoneySum; private String providentHousehold;
/** /**
* 补缴利息 * 公积金缴纳地
*/ */
@ExcelAttribute(name = "补缴利息" ) @ExcelAttribute(name = "公积金缴纳地" )
@Schema(description ="公积金缴纳地")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("补缴利息") @ExcelProperty("公积金缴纳地")
private BigDecimal accrualSum; private String providentPayAddr;
/** /**
* 社保合计 * 社保合计
...@@ -167,30 +179,202 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -167,30 +179,202 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
private BigDecimal socialSum; private BigDecimal socialSum;
/** /**
* 公积金户 * 单位社保合计
*/ */
@ExcelAttribute(name = "公积金户" ) @ExcelAttribute(name = "单位社保合计" )
@Schema(description ="公积金户") @Schema(description ="单位社保合计")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金户") @ExcelProperty("单位社保合计")
private String providentHousehold; private BigDecimal unitSocialSum;
/** /**
* 公积金缴纳地 * 个人社保合计
*/ */
@ExcelAttribute(name = "公积金缴纳地" ) @ExcelAttribute(name = "个人社保合计" )
@Schema(description ="公积金缴纳地") @Schema(description ="个人社保合计")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地") @ExcelProperty("个人社保合计")
private String providentPayAddr; private BigDecimal socialSecurityPersonalSum;
/**
* 就职班组
*/
@ExcelAttribute(name = "就职班组" )
@Schema(description ="就职班组")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("就职班组")
private String inauguralTeam;
/**
* 单位社保补缴利息
*/
@ExcelAttribute(name = "单位社保补缴利息" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位社保补缴利息")
private BigDecimal companyAccrual;
/**
* 个人社保补缴利息
*/
@ExcelAttribute(name = "个人社保补缴利息" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人社保补缴利息")
private BigDecimal personalAccrual;
/**
* 单位养老基数
*/
@ExcelAttribute(name = "单位养老基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老基数")
private BigDecimal unitPensionSet;
/**
* 单位医疗基数
*/
@ExcelAttribute(name = "单位医疗基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗基数")
private BigDecimal unitMedicalSet;
/**
* 单位失业基数
*/
@ExcelAttribute(name = "单位失业基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业基数")
private BigDecimal unitUnemploymentSet;
/**
* 单位工伤基数
*/
@ExcelAttribute(name = "单位工伤基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位工伤基数")
private BigDecimal unitInjurySet;
/**
* 单位生育基数
*/
@ExcelAttribute(name = "单位生育基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位生育基数")
private BigDecimal unitBirthSet;
/**
* 单位养老金额
*/
@ExcelAttribute(name = "单位养老金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老金额")
private BigDecimal unitPensionMoney;
/**
* 单位医疗金额
*/
@ExcelAttribute(name = "单位医疗金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗金额")
private BigDecimal unitMedicalMoney;
/**
* 单位失业金额
*/
@ExcelAttribute(name = "单位失业金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业金额")
private BigDecimal unitUnemploymentMoney;
/**
* 单位工伤金额
*/
@ExcelAttribute(name = "单位工伤金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位工伤金额")
private BigDecimal unitInjuryMoney;
/**
* 单位生育金额
*/
@ExcelAttribute(name = "单位生育金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位生育金额")
private BigDecimal unitBirthMoney;
/**
* 单位大病金额
*/
@ExcelAttribute(name = "单位大病金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病金额")
private BigDecimal unitBigmailmentMoney;
/**
* 个人养老金额
*/
@ExcelAttribute(name = "个人养老金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人养老金额")
private BigDecimal personalPensionMoney;
/**
* 个人医疗金额
*/
@ExcelAttribute(name = "个人医疗金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人医疗金额")
private BigDecimal personalMedicalMoney;
/**
* 个人失业金额
*/
@ExcelAttribute(name = "个人失业金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业金额")
private BigDecimal personalUnemploymentMoney;
/**
* 个人大病金额
*/
@ExcelAttribute(name = "个人大病金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病金额")
private BigDecimal personalBigmailmentMoney;
/**
* 公积金编号
*/
@ExcelAttribute(name = "公积金编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金编号")
private String providentNo;
/**
* 单位公积金基数
*/
@ExcelAttribute(name = "单位公积金基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金基数")
private BigDecimal unitProvidentSet;
/**
* 单位公积金比例
*/
@ExcelAttribute(name = "单位公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金比例")
private BigDecimal providentPercent;
/**
* 单位公积金费用
*/
@ExcelAttribute(name = "单位公积金费用")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金费用")
private BigDecimal unitProvidentSum;
/**
* 个人公积金基数
*/
@ExcelAttribute(name = "个人公积金基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
* 个人公积金费用
*/
@ExcelAttribute(name = "个人公积金费用")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金费用")
private BigDecimal personalProvidentSum;
/** /**
* 公积金合计 * 公积金合计
*/ */
@ExcelAttribute(name = "公积金合计" ) @ExcelAttribute(name = "公积金合计" )
@Schema(description ="公积金合计") @Schema(description ="公积金合计")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金合计") @ExcelProperty("公积金合计")
private BigDecimal providentSum; private BigDecimal providentSum;
/** /**
......
...@@ -304,25 +304,49 @@ ...@@ -304,25 +304,49 @@
<resultMap id="tPaymentInfoNewExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoNewExportVo"> <resultMap id="tPaymentInfoNewExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoNewExportVo">
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
<result property="empNo" column="EMP_NO"/>
<result property="empIdcard" column="EMP_IDCARD"/> <result property="empIdcard" column="EMP_IDCARD"/>
<result property="unitName" column="UNIT_NAME"/> <result property="unitName" column="UNIT_NAME"/>
<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/> <result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="socialHousehold" column="SOCIAL_HOUSEHOLD"/> <result property="socialHousehold" column="SOCIAL_HOUSEHOLD"/>
<result property="socialSecurityNo" column="SOCIAL_SECURITY_NO"/>
<result property="socialPayAddr" column="SOCIAL_PAY_ADDR"/> <result property="socialPayAddr" column="SOCIAL_PAY_ADDR"/>
<result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/> <result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
<result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/> <result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
<result property="sumAll" column="SUM_ALL"/> <result property="sumAll" column="SUM_ALL"/>
<result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
<result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/> <result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/>
<result property="providentPayAddr" column="PROVIDENT_PAY_ADDR"/> <result property="providentPayAddr" column="PROVIDENT_PAY_ADDR"/>
<result property="socialSum" column="SOCIAL_SUM"/> <result property="socialSum" column="SOCIAL_SUM"/>
<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
<result property="socialSecurityPersonalSum" column="SOCIAL_SECURITY_PERSONAL_SUM"/>
<result property="providentSum" column="PROVIDENT_SUM"/> <result property="providentSum" column="PROVIDENT_SUM"/>
<result property="pensionMoneySum" column="PENSION_MONEY_SUM"/> <result property="inauguralTeam" column="INAUGURAL_TEAM"/>
<result property="medicalMoneySum" column="MEDICAL_MONEY_SUM"/> <result property="companyAccrual" column="COMPANY_ACCRUAL"/>
<result property="unemploymentMoneySum" column="UNEMPLOYMENT_MONEY_SUM"/> <result property="personalAccrual" column="PERSONAL_ACCRUAL"/>
<result property="unitPensionSet" column="UNIT_PENSION_SET"/>
<result property="unitMedicalSet" column="UNIT_MEDICAL_SET"/>
<result property="unitUnemploymentSet" column="UNIT_UNEMPLOYMENT_SET"/>
<result property="unitInjurySet" column="UNIT_INJURY_SET"/>
<result property="unitBirthSet" column="UNIT_BIRTH_SET"/>
<result property="unitPensionMoney" column="UNIT_PENSION_MONEY"/>
<result property="unitMedicalMoney" column="UNIT_MEDICAL_MONEY"/>
<result property="unitUnemploymentMoney" column="UNIT_UNEMPLOYMENT_MONEY"/>
<result property="unitInjuryMoney" column="UNIT_INJURY_MONEY"/> <result property="unitInjuryMoney" column="UNIT_INJURY_MONEY"/>
<result property="unitBirthMoney" column="UNIT_BIRTH_MONEY"/> <result property="unitBirthMoney" column="UNIT_BIRTH_MONEY"/>
<result property="bigmailmentMoneySum" column="BIGMAILMENT_MONEY_SUM"/> <result property="unitBigmailmentMoney" column="UNIT_BIGMAILMENT_MONEY"/>
<result property="accrualSum" column="ACCRUAL_SUM"/> <result property="personalPensionMoney" column="PERSONAL_PENSION_MONEY"/>
<result property="personalMedicalMoney" column="PERSONAL_MEDICAL_MONEY"/>
<result property="personalUnemploymentMoney" column="PERSONAL_UNEMPLOYMENT_MONEY"/>
<result property="personalBigmailmentMoney" column="PERSONAL_BIGMAILMENT_MONEY"/>
<result property="providentNo" column="PROVIDENT_NO"/>
<result property="unitProvidentSet" column="UNIT_PROVIDENT_SET"/>
<result property="providentPercent" column="PROVIDENT_PERCENT"/>
<result property="unitProvidentSum" column="UNIT_PROVIDENT_SUM"/>
<result property="personalProidentSet" column="PERSONAL_PROIDENT_SET"/>
<result property="personalProvidentSum" column="PERSONAL_PROVIDENT_SUM"/>
<result property="keyGroup" column="keyGroup"/> <result property="keyGroup" column="keyGroup"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -817,14 +841,14 @@ ...@@ -817,14 +841,14 @@
</if> </if>
</sql> </sql>
<sql id="tPaymentInfo_export_socialFund_where"> <sql id="tPaymentInfo_export_socialFund_where2">
<if test="tPaymentInfo != null"> <if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null"> <if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"> <if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND w.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold} AND c.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if> </if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''"> <if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND w.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold} AND c.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if> </if>
</if> </if>
</if> </if>
...@@ -1130,6 +1154,22 @@ ...@@ -1130,6 +1154,22 @@
<!--tPaymentInfo简单分页查询--> <!--tPaymentInfo简单分页查询-->
<select id="getTPaymentInfoNewPage" resultMap="tPaymentInfoNewMap"> <select id="getTPaymentInfoNewPage" resultMap="tPaymentInfoNewMap">
SELECT SELECT
c.keyGroup,
c.EMP_IDCARD,
c.EMP_NAME,
c.UNIT_NAME,
c.SETTLE_DOMAIN_NAME,
c.SOCIAL_HOUSEHOLD,
c.SOCIAL_PAY_ADDR,
c.SOCIAL_PAY_MONTH,
c.SOCIAL_CREATE_MONTH,
c.SUM_ALL AS SUM_ALL,
c.PROVIDENT_HOUSEHOLD AS PROVIDENT_HOUSEHOLD,
c.PROVIDENT_PAY_ADDR AS PROVIDENT_PAY_ADDR,
c.SOCIAL_SUM,
c.PROVIDENT_SUM AS PROVIDENT_SUM
from (
select
w.keyGroup, w.keyGroup,
w.EMP_IDCARD, w.EMP_IDCARD,
w.EMP_NAME, w.EMP_NAME,
...@@ -1191,11 +1231,11 @@ ...@@ -1191,11 +1231,11 @@
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
) )
) w ) w
GROUP BY w.keyGroup ) c
<where> <where>
1 = 1 1 = 1
<include refid="tPaymentInfo_export_socialFund_where"/> <include refid="tPaymentInfo_export_socialFund_where2"/>
</where> </where>
GROUP BY w.keyGroup
</select> </select>
<!--tPaymentInfo简单分页查询--> <!--tPaymentInfo简单分页查询-->
...@@ -1407,9 +1447,9 @@ ...@@ -1407,9 +1447,9 @@
) w ) w
GROUP BY w.keyGroup) k GROUP BY w.keyGroup) k
<where> <where>
1 = 1 1 = 1
<include refid="tPaymentInfo_export_socialFund_where1"/> <include refid="tPaymentInfo_export_socialFund_where1"/>
</where> </where>
</select> </select>
<!--tPaymentInfo数量查询--> <!--tPaymentInfo数量查询-->
...@@ -1417,81 +1457,180 @@ ...@@ -1417,81 +1457,180 @@
SELECT SELECT
count(1) count(1)
FROM ( FROM (
select * from ( select w.SOCIAL_HOUSEHOLD,w.PROVIDENT_HOUSEHOLD from (
(SELECT (SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
FROM t_payment_info a FROM t_payment_info a
<where> <where>
IFNULL(a.SOCIAL_ID,'1') != '1' IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/> <include refid="tPaymentInfo_export_social_where"/>
</where> </where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
) )
union all union all
(SELECT (SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
FROM t_payment_info a FROM t_payment_info a
<where> <where>
IFNULL(a.FUND_ID,'1') != '1' IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/> <include refid="tPaymentInfo_export_fund_where"/>
</where> </where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
) )
) w ) w
GROUP BY w.keyGroup) c
<where> <where>
1 = 1 1 = 1
<include refid="tPaymentInfo_export_socialFund_where"/> <include refid="tPaymentInfo_export_socialFund_where2"/>
</where> </where>
GROUP BY w.keyGroup) c
</select> </select>
<!--tPaymentInfo简单分页查询--> <!--tPaymentInfo简单分页查询-->
<select id="getTPaymentInfoNewExportInfo" resultMap="tPaymentInfoNewExportMap"> <select id="getTPaymentInfoNewExportInfo" resultMap="tPaymentInfoNewExportMap">
SELECT SELECT
c.keyGroup,
c.EMP_IDCARD,
c.EMP_NO,
c.EMP_NAME,
c.UNIT_NAME,
c.SETTLE_DOMAIN_CODE,
c.SETTLE_DOMAIN_NAME,
c.SOCIAL_HOUSEHOLD,
c.SOCIAL_SECURITY_NO,
c.SOCIAL_PAY_ADDR,
c.SOCIAL_PAY_MONTH,
c.SOCIAL_CREATE_MONTH,
c.PERSONAL_PROVIDENT_SUM,
c.SUM_ALL,
c.PROVIDENT_PAY_MONTH,
c.PROVIDENT_CREATE_MONTH,
c.PROVIDENT_HOUSEHOLD,
c.PROVIDENT_PAY_ADDR,
c.SOCIAL_SUM,
c.UNIT_SOCIAL_SUM,
c.SOCIAL_SECURITY_PERSONAL_SUM,
c.PROVIDENT_SUM,
c.INAUGURAL_TEAM,
c.COMPANY_ACCRUAL,
c.PERSONAL_ACCRUAL,
c.UNIT_PENSION_SET,
c.UNIT_MEDICAL_SET,
c.UNIT_UNEMPLOYMENT_SET,
c.UNIT_INJURY_SET,
c.UNIT_BIRTH_SET,
c.UNIT_PENSION_MONEY,
c.UNIT_MEDICAL_MONEY,
c.UNIT_UNEMPLOYMENT_MONEY,
c.UNIT_INJURY_MONEY,
c.UNIT_BIRTH_MONEY,
c.UNIT_BIGMAILMENT_MONEY,
c.PERSONAL_PENSION_MONEY,
c.PERSONAL_MEDICAL_MONEY,
c.PERSONAL_UNEMPLOYMENT_MONEY,
c.PERSONAL_BIGMAILMENT_MONEY,
c.PROVIDENT_NO AS PROVIDENT_NO,
c.PERSONAL_PROIDENT_SET,
c.UNIT_PROVIDENT_SET,
c.PROVIDENT_PERCENT,
c.UNIT_PROVIDENT_SUM
from (
select
w.keyGroup, w.keyGroup,
w.EMP_IDCARD, w.EMP_IDCARD,
w.EMP_NO,
w.EMP_NAME, w.EMP_NAME,
w.UNIT_NAME, w.UNIT_NAME,
w.SETTLE_DOMAIN_CODE,
w.SETTLE_DOMAIN_NAME, w.SETTLE_DOMAIN_NAME,
w.SOCIAL_HOUSEHOLD, w.SOCIAL_HOUSEHOLD,
MAX( w.SOCIAL_SECURITY_NO ) AS SOCIAL_SECURITY_NO,
w.SOCIAL_PAY_ADDR, w.SOCIAL_PAY_ADDR,
w.SOCIAL_PAY_MONTH, w.SOCIAL_PAY_MONTH,
w.SOCIAL_CREATE_MONTH, w.SOCIAL_CREATE_MONTH,
SUM( w.PERSONAL_PROVIDENT_SUM) AS PERSONAL_PROVIDENT_SUM,
SUM( w.SUM_ALL ) AS SUM_ALL, SUM( w.SUM_ALL ) AS SUM_ALL,
MAX( w.PROVIDENT_PAY_MONTH ) AS PROVIDENT_PAY_MONTH,
MAX( w.PROVIDENT_CREATE_MONTH ) AS PROVIDENT_CREATE_MONTH,
MAX( w.PROVIDENT_HOUSEHOLD ) AS PROVIDENT_HOUSEHOLD, MAX( w.PROVIDENT_HOUSEHOLD ) AS PROVIDENT_HOUSEHOLD,
MAX( w.PROVIDENT_PAY_ADDR ) AS PROVIDENT_PAY_ADDR, MAX( w.PROVIDENT_PAY_ADDR ) AS PROVIDENT_PAY_ADDR,
w.SOCIAL_SUM, w.SOCIAL_SUM,
w.UNIT_SOCIAL_SUM,
w.SOCIAL_SECURITY_PERSONAL_SUM,
SUM( w.PROVIDENT_SUM ) AS PROVIDENT_SUM, SUM( w.PROVIDENT_SUM ) AS PROVIDENT_SUM,
w.INAUGURAL_TEAM,
w.COMPANY_ACCRUAL,
w.PERSONAL_ACCRUAL,
w.UNIT_PENSION_SET,
w.UNIT_MEDICAL_SET,
w.UNIT_UNEMPLOYMENT_SET,
w.UNIT_INJURY_SET,
w.UNIT_BIRTH_SET,
w.UNIT_PENSION_MONEY,
w.UNIT_MEDICAL_MONEY,
w.UNIT_UNEMPLOYMENT_MONEY,
w.UNIT_INJURY_MONEY, w.UNIT_INJURY_MONEY,
w.UNIT_BIRTH_MONEY, w.UNIT_BIRTH_MONEY,
MAX(w.PENSION_MONEY_SUM ) as PENSION_MONEY_SUM, w.UNIT_BIGMAILMENT_MONEY,
MAX(w.MEDICAL_MONEY_SUM ) as MEDICAL_MONEY_SUM, w.PERSONAL_PENSION_MONEY,
MAX(w.UNEMPLOYMENT_MONEY_SUM ) as UNEMPLOYMENT_MONEY_SUM, w.PERSONAL_MEDICAL_MONEY,
MAX(w.BIGMAILMENT_MONEY_SUM ) as BIGMAILMENT_MONEY_SUM, w.PERSONAL_UNEMPLOYMENT_MONEY,
MAX(w.ACCRUAL_SUM ) as ACCRUAL_SUM w.PERSONAL_BIGMAILMENT_MONEY,
MAX( w.PROVIDENT_NO ) AS PROVIDENT_NO,
MAX( w.PERSONAL_PROIDENT_SET ) AS PERSONAL_PROIDENT_SET,
SUM( w.UNIT_PROVIDENT_SET ) AS UNIT_PROVIDENT_SET,
SUM( w.PROVIDENT_PERCENT ) AS PROVIDENT_PERCENT,
SUM( w.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM
FROM ( FROM (
(SELECT (SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup, CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.EMP_NAME, a.EMP_NAME,
a.EMP_NO,
a.EMP_IDCARD, a.EMP_IDCARD,
a.UNIT_NAME, a.UNIT_NAME,
a.SETTLE_DOMAIN_CODE,
a.SETTLE_DOMAIN_NAME, a.SETTLE_DOMAIN_NAME,
a.SOCIAL_HOUSEHOLD, a.SOCIAL_HOUSEHOLD,
MAX( a.SOCIAL_SECURITY_NO ) AS SOCIAL_SECURITY_NO,
a.SOCIAL_PAY_ADDR, a.SOCIAL_PAY_ADDR,
a.SOCIAL_PAY_MONTH, a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH, a.SOCIAL_CREATE_MONTH,
a.PERSONAL_PROVIDENT_SUM,
SUM( a.SUM_ALL ) AS SUM_ALL, SUM( a.SUM_ALL ) AS SUM_ALL,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
a.PROVIDENT_HOUSEHOLD, a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR, a.PROVIDENT_PAY_ADDR,
SUM( a.SOCIAL_SUM ) AS SOCIAL_SUM, SUM( a.SOCIAL_SUM ) AS SOCIAL_SUM,
SUM( a.UNIT_SOCIAL_SUM ) AS UNIT_SOCIAL_SUM,
SUM( a.SOCIAL_SECURITY_PERSONAL_SUM ) AS SOCIAL_SECURITY_PERSONAL_SUM,
a.PROVIDENT_SUM, a.PROVIDENT_SUM,
a.INAUGURAL_TEAM,
SUM( a.COMPANY_ACCRUAL ) AS COMPANY_ACCRUAL,
SUM( a.PERSONAL_ACCRUAL ) AS PERSONAL_ACCRUAL,
MAX(a.UNIT_PENSION_SET ) AS UNIT_PENSION_SET,
MAX(a.UNIT_MEDICAL_SET ) AS UNIT_MEDICAL_SET,
MAX(a.UNIT_UNEMPLOYMENT_SET ) AS UNIT_UNEMPLOYMENT_SET,
MAX(a.UNIT_INJURY_SET ) AS UNIT_INJURY_SET,
MAX(a.UNIT_BIRTH_SET ) AS UNIT_BIRTH_SET,
SUM( a.UNIT_PENSION_MONEY ) AS UNIT_PENSION_MONEY,
SUM( a.UNIT_MEDICAL_MONEY ) AS UNIT_MEDICAL_MONEY,
SUM( a.UNIT_UNEMPLOYMENT_MONEY ) AS UNIT_UNEMPLOYMENT_MONEY,
SUM( a.UNIT_INJURY_MONEY ) AS UNIT_INJURY_MONEY, SUM( a.UNIT_INJURY_MONEY ) AS UNIT_INJURY_MONEY,
SUM( a.UNIT_BIRTH_MONEY ) AS UNIT_BIRTH_MONEY, SUM( a.UNIT_BIRTH_MONEY ) AS UNIT_BIRTH_MONEY,
ifnull(SUM(a.UNIT_PENSION_MONEY),0)+ifnull(SUM(a.PERSONAL_PENSION_MONEY),0) as PENSION_MONEY_SUM, SUM( a.UNIT_BIGMAILMENT_MONEY ) AS UNIT_BIGMAILMENT_MONEY,
ifnull(SUM(a.UNIT_MEDICAL_MONEY),0)+ifnull(SUM(a.PERSONAL_MEDICAL_MONEY),0) as MEDICAL_MONEY_SUM, SUM( a.PERSONAL_PENSION_MONEY ) AS PERSONAL_PENSION_MONEY,
ifnull(SUM(a.UNIT_UNEMPLOYMENT_MONEY),0)+ifnull(SUM(a.PERSONAL_UNEMPLOYMENT_MONEY),0) as UNEMPLOYMENT_MONEY_SUM, SUM( a.PERSONAL_MEDICAL_MONEY ) AS PERSONAL_MEDICAL_MONEY,
ifnull(SUM(a.UNIT_BIGMAILMENT_MONEY),0)+ifnull(SUM(a.PERSONAL_BIGMAILMENT_MONEY),0) as BIGMAILMENT_MONEY_SUM, SUM( a.PERSONAL_UNEMPLOYMENT_MONEY ) AS PERSONAL_UNEMPLOYMENT_MONEY,
ifnull(SUM(a.COMPANY_ACCRUAL),0)+ifnull(SUM(a.PERSONAL_ACCRUAL),0) as ACCRUAL_SUM SUM( a.PERSONAL_BIGMAILMENT_MONEY ) AS PERSONAL_BIGMAILMENT_MONEY,
a.PROVIDENT_NO,
a.UNIT_PROVIDENT_SET,
a.PROVIDENT_PERCENT,
a.PERSONAL_PROIDENT_SET,
a.UNIT_PROVIDENT_SUM
FROM t_payment_info a FROM t_payment_info a
<where> <where>
IFNULL(a.SOCIAL_ID,'1') != '1' IFNULL(a.SOCIAL_ID,'1') != '1'
...@@ -1503,25 +1642,49 @@ ...@@ -1503,25 +1642,49 @@
(SELECT (SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup, CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.EMP_NAME, a.EMP_NAME,
a.EMP_NO,
a.EMP_IDCARD, a.EMP_IDCARD,
a.UNIT_NAME, a.UNIT_NAME,
a.SETTLE_DOMAIN_CODE,
a.SETTLE_DOMAIN_NAME, a.SETTLE_DOMAIN_NAME,
a.SOCIAL_HOUSEHOLD, a.SOCIAL_HOUSEHOLD,
a.SOCIAL_SECURITY_NO,
a.SOCIAL_PAY_ADDR, a.SOCIAL_PAY_ADDR,
a.PROVIDENT_PAY_MONTH as SOCIAL_PAY_MONTH, a.SOCIAL_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH as SOCIAL_CREATE_MONTH, a.SOCIAL_CREATE_MONTH,
SUM(a.PERSONAL_PROVIDENT_SUM) AS PERSONAL_PROVIDENT_SUM,
SUM( a.SUM_ALL ) AS SUM_ALL, SUM( a.SUM_ALL ) AS SUM_ALL,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
a.PROVIDENT_HOUSEHOLD, a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR, a.PROVIDENT_PAY_ADDR,
a.SOCIAL_SUM, a.SOCIAL_SUM,
a.UNIT_SOCIAL_SUM,
a.SOCIAL_SECURITY_PERSONAL_SUM,
SUM( a.PROVIDENT_SUM ) AS PROVIDENT_SUM, SUM( a.PROVIDENT_SUM ) AS PROVIDENT_SUM,
a.INAUGURAL_TEAM,
a.COMPANY_ACCRUAL,
a.PERSONAL_ACCRUAL,
a.UNIT_PENSION_SET,
a.UNIT_MEDICAL_SET,
a.UNIT_UNEMPLOYMENT_SET,
a.UNIT_INJURY_SET,
a.UNIT_BIRTH_SET,
a.UNIT_PENSION_MONEY,
a.UNIT_MEDICAL_MONEY,
a.UNIT_UNEMPLOYMENT_MONEY,
a.UNIT_INJURY_MONEY, a.UNIT_INJURY_MONEY,
a.UNIT_BIRTH_MONEY, a.UNIT_BIRTH_MONEY,
null PENSION_MONEY_SUM, a.UNIT_BIGMAILMENT_MONEY,
null MEDICAL_MONEY_SUM, a.PERSONAL_PENSION_MONEY,
null UNEMPLOYMENT_MONEY_SUM, a.PERSONAL_MEDICAL_MONEY,
null BIGMAILMENT_MONEY_SUM, a.PERSONAL_UNEMPLOYMENT_MONEY,
null ACCRUAL_SUM a.PERSONAL_BIGMAILMENT_MONEY,
a.PROVIDENT_NO,
a.UNIT_PROVIDENT_SET,
a.PROVIDENT_PERCENT,
a.PERSONAL_PROIDENT_SET,
SUM( a.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM
FROM t_payment_info a FROM t_payment_info a
<where> <where>
IFNULL(a.FUND_ID,'1') != '1' IFNULL(a.FUND_ID,'1') != '1'
...@@ -1530,11 +1693,11 @@ ...@@ -1530,11 +1693,11 @@
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
) )
) w ) w
GROUP BY w.keyGroup) c
<where> <where>
1 = 1 1 = 1
<include refid="tPaymentInfo_export_socialFund_where"/> <include refid="tPaymentInfo_export_socialFund_where2"/>
</where> </where>
GROUP BY w.keyGroup
limit #{tPaymentInfo.limitStart},#{tPaymentInfo.limitEnd} limit #{tPaymentInfo.limitStart},#{tPaymentInfo.limitEnd}
</select> </select>
...@@ -1861,8 +2024,8 @@ ...@@ -1861,8 +2024,8 @@
DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') AS CREATE_NAME DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') AS CREATE_NAME
FROM t_payment_info a FROM t_payment_info a
<where> <where>
IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STATUS = '1' IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STATUS = '1'
<include refid="tPaymentInfo_export_push_where"/> <include refid="tPaymentInfo_export_push_where"/>
</where> </where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SOCIAL_PAY_ADDR GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SOCIAL_PAY_ADDR
limit 0,10000 limit 0,10000
...@@ -1976,11 +2139,11 @@ ...@@ -1976,11 +2139,11 @@
<!--tPaymentInfo 按ID查收缴费库包含社保和公积金明细的数据查询--> <!--tPaymentInfo 按ID查收缴费库包含社保和公积金明细的数据查询-->
<select id="getAllPushInfoById" resultMap="tPaymentInfoMap"> <select id="getAllPushInfoById" resultMap="tPaymentInfoMap">
SELECT SELECT
ID, ID,
INCOME_SETTLE_FLAG, INCOME_SETTLE_FLAG,
INCOME_COLLECT_FLAG, INCOME_COLLECT_FLAG,
PAY_COLLECT_FLAG, PAY_COLLECT_FLAG,
PAY_SETTLE_FLAG PAY_SETTLE_FLAG
FROM t_payment_info a FROM t_payment_info a
where a.ID in (${idStr}) where a.ID in (${idStr})
</select> </select>
...@@ -2106,14 +2269,14 @@ ...@@ -2106,14 +2269,14 @@
<update id="updatePaymentSocialAndFound"> <update id="updatePaymentSocialAndFound">
update t_payment_info update t_payment_info
set UNIT_ID = #{infoVo.unitId}, set UNIT_ID = #{infoVo.unitId},
UNIT_NAME = #{infoVo.unitName}, UNIT_NAME = #{infoVo.unitName},
SETTLE_DOMAIN_NAME = #{infoVo.settleDomainName}, SETTLE_DOMAIN_NAME = #{infoVo.settleDomainName},
SETTLE_DOMAIN_CODE = #{infoVo.settleDomainCode}, SETTLE_DOMAIN_CODE = #{infoVo.settleDomainCode},
SETTLE_DOMAIN_ID = #{infoVo.settleDomainId} SETTLE_DOMAIN_ID = #{infoVo.settleDomainId}
where where
((SALARY_SOCIAL_FLAG = '0' and SOCIAL_CREATE_MONTH >= #{infoVo.socialCreateMonth}) or ((SALARY_SOCIAL_FLAG = '0' and SOCIAL_CREATE_MONTH >= #{infoVo.socialCreateMonth}) or
(SALARY_FUND_FLAG = '0' and PROVIDENT_CREATE_MONTH >= #{infoVo.socialCreateMonth})) (SALARY_FUND_FLAG = '0' and PROVIDENT_CREATE_MONTH >= #{infoVo.socialCreateMonth}))
and PUSH_STATUS = '1' and EMP_IDCARD = #{infoVo.empIdcard} and PUSH_STATUS = '1' and EMP_IDCARD = #{infoVo.empIdcard}
</update> </update>
<!-- 更改薪资公积金结算状态 --> <!-- 更改薪资公积金结算状态 -->
...@@ -2148,11 +2311,11 @@ ...@@ -2148,11 +2311,11 @@
<update id="changePaymentDept"> <update id="changePaymentDept">
update t_payment_info p update t_payment_info p
set set
p.SETTLE_DOMAIN_ID = #{dept.id} p.SETTLE_DOMAIN_ID = #{dept.id}
,p.SETTLE_DOMAIN_NAME = #{dept.departName} ,p.SETTLE_DOMAIN_NAME = #{dept.departName}
,p.SETTLE_DOMAIN_CODE = #{dept.departNo} ,p.SETTLE_DOMAIN_CODE = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId} ,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName} ,p.UNIT_NAME = #{dept.customerName}
where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")"> <foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item} #{item}
...@@ -2273,81 +2436,81 @@ ...@@ -2273,81 +2436,81 @@
<!--tPaymentInfo 缴费库包含明细的数据查询查询 核准表生成查询专用--> <!--tPaymentInfo 缴费库包含明细的数据查询查询 核准表生成查询专用-->
<select id="getPaymentAllInfoList" resultMap="tPaymentAllInfoMap"> <select id="getPaymentAllInfoList" resultMap="tPaymentAllInfoMap">
SELECT SELECT
a.ID, a.ID,
a.EMP_NAME, a.EMP_NAME,
a.EMP_NO, a.EMP_NO,
a.EMP_ID, a.EMP_ID,
a.EMP_IDCARD, a.EMP_IDCARD,
a.UNIT_ID, a.UNIT_ID,
a.SETTLE_DOMAIN_ID, a.SETTLE_DOMAIN_ID,
a.SOCIAL_HOUSEHOLD, a.SOCIAL_HOUSEHOLD,
a.SOCIAL_SECURITY_NO, a.SOCIAL_SECURITY_NO,
a.SOCIAL_PAY_ADDR, a.SOCIAL_PAY_ADDR,
a.SOCIAL_PAY_MONTH, a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH, a.SOCIAL_CREATE_MONTH,
a.CREATE_BY, a.CREATE_BY,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME, a.UPDATE_TIME,
a.LOCK_STATUS, a.LOCK_STATUS,
a.SUM_ALL, a.SUM_ALL,
a.PROVIDENT_PAY_MONTH, a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH, a.PROVIDENT_CREATE_MONTH,
a.PROVIDENT_HOUSEHOLD, a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR, a.PROVIDENT_PAY_ADDR,
a.FUND_PROVINCE, a.FUND_PROVINCE,
a.FUND_CITY, a.FUND_CITY,
a.FUND_TOWN, a.FUND_TOWN,
a.SOCIAL_PROVINCE, a.SOCIAL_PROVINCE,
a.SOCIAL_CITY, a.SOCIAL_CITY,
a.SOCIAL_TOWN, a.SOCIAL_TOWN,
a.SOCIAL_ID, a.SOCIAL_ID,
a.FUND_ID, a.FUND_ID,
a.SOCIAL_SUM, a.SOCIAL_SUM,
a.UNIT_SOCIAL_SUM, a.UNIT_SOCIAL_SUM,
a.SOCIAL_SECURITY_PERSONAL_SUM, a.SOCIAL_SECURITY_PERSONAL_SUM,
a.PROVIDENT_SUM, a.PROVIDENT_SUM,
a.INAUGURAL_TEAM, a.INAUGURAL_TEAM,
a.SALARY_SOCIAL_FLAG, a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG, a.SALARY_FUND_FLAG,
a.COMPANY_ACCRUAL, a.COMPANY_ACCRUAL,
a.PERSONAL_ACCRUAL, a.PERSONAL_ACCRUAL,
a.UNIT_PENSION_SET, a.UNIT_PENSION_SET,
a.UNIT_MEDICAL_SET, a.UNIT_MEDICAL_SET,
a.UNIT_UNEMPLOYMENT_SET, a.UNIT_UNEMPLOYMENT_SET,
a.UNIT_INJURY_SET, a.UNIT_INJURY_SET,
a.UNIT_BIRTH_SET, a.UNIT_BIRTH_SET,
a.UNIT_PENSION_SET as PERSONAL_PENSION_SET, a.UNIT_PENSION_SET as PERSONAL_PENSION_SET,
a.UNIT_MEDICAL_SET as PERSONAL_MEDICAL_SET, a.UNIT_MEDICAL_SET as PERSONAL_MEDICAL_SET,
a.UNIT_UNEMPLOYMENT_SET as PERSONAL_UNEMPLOYMENT_SET, a.UNIT_UNEMPLOYMENT_SET as PERSONAL_UNEMPLOYMENT_SET,
a.UNIT_PENSION_PER, a.UNIT_PENSION_PER,
a.UNIT_MEDICAL_PER, a.UNIT_MEDICAL_PER,
a.UNIT_UNEMPLOYMENT_PER, a.UNIT_UNEMPLOYMENT_PER,
a.UNIT_INJURY_PER, a.UNIT_INJURY_PER,
a.UNIT_BIRTH_PER, a.UNIT_BIRTH_PER,
a.PERSONAL_PENSION_PER, a.PERSONAL_PENSION_PER,
a.PERSONAL_MEDICAL_PER, a.PERSONAL_MEDICAL_PER,
a.PERSONAL_UNEMPLOYMENT_PER, a.PERSONAL_UNEMPLOYMENT_PER,
a.UNIT_BIGAILMENT_PER, a.UNIT_BIGAILMENT_PER,
a.PERSONAL_BIGAILMENT_PER, a.PERSONAL_BIGAILMENT_PER,
a.UNIT_PENSION_MONEY, a.UNIT_PENSION_MONEY,
a.UNIT_MEDICAL_MONEY, a.UNIT_MEDICAL_MONEY,
a.UNIT_UNEMPLOYMENT_MONEY, a.UNIT_UNEMPLOYMENT_MONEY,
a.UNIT_INJURY_MONEY, a.UNIT_INJURY_MONEY,
a.UNIT_BIRTH_MONEY, a.UNIT_BIRTH_MONEY,
a.UNIT_BIGMAILMENT_MONEY, a.UNIT_BIGMAILMENT_MONEY,
a.PERSONAL_PENSION_MONEY, a.PERSONAL_PENSION_MONEY,
a.PERSONAL_MEDICAL_MONEY, a.PERSONAL_MEDICAL_MONEY,
a.PERSONAL_UNEMPLOYMENT_MONEY, a.PERSONAL_UNEMPLOYMENT_MONEY,
a.PERSONAL_BIGMAILMENT_MONEY, a.PERSONAL_BIGMAILMENT_MONEY,
a.PROVIDENT_NO, a.PROVIDENT_NO,
a.UNIT_PROVIDENT_SET, a.UNIT_PROVIDENT_SET,
a.PROVIDENT_PERCENT, a.PROVIDENT_PERCENT,
a.UNIT_PROVIDENT_SUM, a.UNIT_PROVIDENT_SUM,
a.PERSONAL_PROIDENT_SET, a.PERSONAL_PROIDENT_SET,
a.PERSONAL_PROVIDENT_SUM a.PERSONAL_PROVIDENT_SUM
FROM t_payment_info a FROM t_payment_info a
<where> <where>
1=1 1=1
...@@ -2361,8 +2524,8 @@ ...@@ -2361,8 +2524,8 @@
<!-- 按年模糊查询B端查询个人指定年费的缴费库数据 --> <!-- 按年模糊查询B端查询个人指定年费的缴费库数据 -->
<if test="tPaymentInfo.likeYear != null and tPaymentInfo.likeYear.trim() != ''"> <if test="tPaymentInfo.likeYear != null and tPaymentInfo.likeYear.trim() != ''">
AND ( AND (
a.SOCIAL_PAY_MONTH like CONCAT(#{tPaymentInfo.likeYear},'%') a.SOCIAL_PAY_MONTH like CONCAT(#{tPaymentInfo.likeYear},'%')
or a.PROVIDENT_PAY_MONTH like CONCAT(#{tPaymentInfo.likeYear},'%') or a.PROVIDENT_PAY_MONTH like CONCAT(#{tPaymentInfo.likeYear},'%')
) )
</if> </if>
<if test="tPaymentInfo.id != null and tPaymentInfo.id.trim() != ''"> <if test="tPaymentInfo.id != null and tPaymentInfo.id.trim() != ''">
...@@ -2491,26 +2654,26 @@ ...@@ -2491,26 +2654,26 @@
<select id="getSocialAndFundBusinessDataPage" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialAndFundBusinessPageVo"> <select id="getSocialAndFundBusinessDataPage" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialAndFundBusinessPageVo">
SELECT SELECT
ifnull(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH) as 'month', ifnull(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH) as 'month',
a.SETTLE_DOMAIN_ID as 'settleDomainId', a.SETTLE_DOMAIN_ID as 'settleDomainId',
SUM( SUM(
IF(a.PERSONAL_ACCRUAL,a.PERSONAL_ACCRUAL,0) + IF(a.PERSONAL_ACCRUAL,a.PERSONAL_ACCRUAL,0) +
IF(a.PERSONAL_BIGMAILMENT_MONEY,a.PERSONAL_BIGMAILMENT_MONEY,0) + IF(a.PERSONAL_BIGMAILMENT_MONEY,a.PERSONAL_BIGMAILMENT_MONEY,0) +
IF(a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_MEDICAL_MONEY,0) + IF(a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_MEDICAL_MONEY,0) +
IF(a.PERSONAL_UNEMPLOYMENT_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY,0) + IF(a.PERSONAL_UNEMPLOYMENT_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY,0) +
IF(a.PERSONAL_PENSION_MONEY,a.PERSONAL_PENSION_MONEY,0) + IF(a.PERSONAL_PENSION_MONEY,a.PERSONAL_PENSION_MONEY,0) +
IF(a.PERSONAL_PROVIDENT_SUM,a.PERSONAL_PROVIDENT_SUM,0) IF(a.PERSONAL_PROVIDENT_SUM,a.PERSONAL_PROVIDENT_SUM,0)
) AS "personalSum", ) AS "personalSum",
SUM( SUM(
IF(a.UNIT_BIGMAILMENT_MONEY,a.UNIT_BIGMAILMENT_MONEY,0) + IF(a.UNIT_BIGMAILMENT_MONEY,a.UNIT_BIGMAILMENT_MONEY,0) +
IF(a.COMPANY_ACCRUAL,a.COMPANY_ACCRUAL,0) + IF(a.COMPANY_ACCRUAL,a.COMPANY_ACCRUAL,0) +
IF(a.UNIT_PENSION_MONEY,a.UNIT_PENSION_MONEY,0) + IF(a.UNIT_PENSION_MONEY,a.UNIT_PENSION_MONEY,0) +
IF(a.UNIT_MEDICAL_MONEY,a.UNIT_MEDICAL_MONEY,0) + IF(a.UNIT_MEDICAL_MONEY,a.UNIT_MEDICAL_MONEY,0) +
IF(a.UNIT_INJURY_MONEY,a.UNIT_INJURY_MONEY,0) + IF(a.UNIT_INJURY_MONEY,a.UNIT_INJURY_MONEY,0) +
IF(a.UNIT_UNEMPLOYMENT_MONEY,a.UNIT_UNEMPLOYMENT_MONEY,0) + IF(a.UNIT_UNEMPLOYMENT_MONEY,a.UNIT_UNEMPLOYMENT_MONEY,0) +
IF(a.UNIT_BIRTH_MONEY,a.UNIT_BIRTH_MONEY,0) + IF(a.UNIT_BIRTH_MONEY,a.UNIT_BIRTH_MONEY,0) +
IF(a.UNIT_PROVIDENT_SUM,a.UNIT_PROVIDENT_SUM,0) IF(a.UNIT_PROVIDENT_SUM,a.UNIT_PROVIDENT_SUM,0)
) AS "unitSum" ) AS "unitSum"
FROM t_payment_info a FROM t_payment_info a
<where> <where>
1=1 1=1
...@@ -2520,40 +2683,40 @@ ...@@ -2520,40 +2683,40 @@
</if> </if>
<if test="socialAndFundBusinessPageVo.year != null and socialAndFundBusinessPageVo.year.trim() != ''"> <if test="socialAndFundBusinessPageVo.year != null and socialAndFundBusinessPageVo.year.trim() != ''">
AND ( AND (
( (
a.SOCIAL_PAY_MONTH in( a.SOCIAL_PAY_MONTH in(
CONCAT(#{socialAndFundBusinessPageVo.year},'01'), CONCAT(#{socialAndFundBusinessPageVo.year},'01'),
CONCAT(#{socialAndFundBusinessPageVo.year},'02'), CONCAT(#{socialAndFundBusinessPageVo.year},'02'),
CONCAT(#{socialAndFundBusinessPageVo.year},'03'), CONCAT(#{socialAndFundBusinessPageVo.year},'03'),
CONCAT(#{socialAndFundBusinessPageVo.year},'04'), CONCAT(#{socialAndFundBusinessPageVo.year},'04'),
CONCAT(#{socialAndFundBusinessPageVo.year},'05'), CONCAT(#{socialAndFundBusinessPageVo.year},'05'),
CONCAT(#{socialAndFundBusinessPageVo.year},'06'), CONCAT(#{socialAndFundBusinessPageVo.year},'06'),
CONCAT(#{socialAndFundBusinessPageVo.year},'07'), CONCAT(#{socialAndFundBusinessPageVo.year},'07'),
CONCAT(#{socialAndFundBusinessPageVo.year},'08'), CONCAT(#{socialAndFundBusinessPageVo.year},'08'),
CONCAT(#{socialAndFundBusinessPageVo.year},'09'), CONCAT(#{socialAndFundBusinessPageVo.year},'09'),
CONCAT(#{socialAndFundBusinessPageVo.year},'10'), CONCAT(#{socialAndFundBusinessPageVo.year},'10'),
CONCAT(#{socialAndFundBusinessPageVo.year},'11'), CONCAT(#{socialAndFundBusinessPageVo.year},'11'),
CONCAT(#{socialAndFundBusinessPageVo.year},'12') CONCAT(#{socialAndFundBusinessPageVo.year},'12')
) )
AND a.SOCIAL_PAY_MONTH >= CONCAT(#{socialAndFundBusinessPageVo.year},'01') AND a.SOCIAL_PAY_MONTH >= CONCAT(#{socialAndFundBusinessPageVo.year},'01')
) or ) or
( (
a.PROVIDENT_PAY_MONTH in ( a.PROVIDENT_PAY_MONTH in (
CONCAT(#{socialAndFundBusinessPageVo.year},'01'), CONCAT(#{socialAndFundBusinessPageVo.year},'01'),
CONCAT(#{socialAndFundBusinessPageVo.year},'02'), CONCAT(#{socialAndFundBusinessPageVo.year},'02'),
CONCAT(#{socialAndFundBusinessPageVo.year},'03'), CONCAT(#{socialAndFundBusinessPageVo.year},'03'),
CONCAT(#{socialAndFundBusinessPageVo.year},'04'), CONCAT(#{socialAndFundBusinessPageVo.year},'04'),
CONCAT(#{socialAndFundBusinessPageVo.year},'05'), CONCAT(#{socialAndFundBusinessPageVo.year},'05'),
CONCAT(#{socialAndFundBusinessPageVo.year},'06'), CONCAT(#{socialAndFundBusinessPageVo.year},'06'),
CONCAT(#{socialAndFundBusinessPageVo.year},'07'), CONCAT(#{socialAndFundBusinessPageVo.year},'07'),
CONCAT(#{socialAndFundBusinessPageVo.year},'08'), CONCAT(#{socialAndFundBusinessPageVo.year},'08'),
CONCAT(#{socialAndFundBusinessPageVo.year},'09'), CONCAT(#{socialAndFundBusinessPageVo.year},'09'),
CONCAT(#{socialAndFundBusinessPageVo.year},'10'), CONCAT(#{socialAndFundBusinessPageVo.year},'10'),
CONCAT(#{socialAndFundBusinessPageVo.year},'11'), CONCAT(#{socialAndFundBusinessPageVo.year},'11'),
CONCAT(#{socialAndFundBusinessPageVo.year},'12') CONCAT(#{socialAndFundBusinessPageVo.year},'12')
) )
AND a.PROVIDENT_PAY_MONTH >= CONCAT(#{socialAndFundBusinessPageVo.year},'01') AND a.PROVIDENT_PAY_MONTH >= CONCAT(#{socialAndFundBusinessPageVo.year},'01')
) )
) )
</if> </if>
</if> </if>
...@@ -2646,49 +2809,49 @@ ...@@ -2646,49 +2809,49 @@
<select id="getPaymentBusinessPageVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.PaymentBusinessPageVo"> <select id="getPaymentBusinessPageVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.PaymentBusinessPageVo">
SELECT SELECT
a.EMP_NAME as 'empName', a.EMP_NAME as 'empName',
a.EMP_ID as 'empId', a.EMP_ID as 'empId',
ifnull(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH) as 'month', ifnull(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH) as 'month',
SUM( SUM(
IF(a.PERSONAL_ACCRUAL,a.PERSONAL_ACCRUAL,0) + IF(a.PERSONAL_ACCRUAL,a.PERSONAL_ACCRUAL,0) +
IF(a.PERSONAL_BIGMAILMENT_MONEY,a.PERSONAL_BIGMAILMENT_MONEY,0) + IF(a.PERSONAL_BIGMAILMENT_MONEY,a.PERSONAL_BIGMAILMENT_MONEY,0) +
IF(a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_MEDICAL_MONEY,0) + IF(a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_MEDICAL_MONEY,0) +
IF(a.PERSONAL_UNEMPLOYMENT_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY,0) + IF(a.PERSONAL_UNEMPLOYMENT_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY,0) +
IF(a.PERSONAL_PENSION_MONEY,a.PERSONAL_PENSION_MONEY,0) + IF(a.PERSONAL_PENSION_MONEY,a.PERSONAL_PENSION_MONEY,0) +
IF(a.PERSONAL_PROVIDENT_SUM,a.PERSONAL_PROVIDENT_SUM,0) IF(a.PERSONAL_PROVIDENT_SUM,a.PERSONAL_PROVIDENT_SUM,0)
) AS "personalSum", ) AS "personalSum",
SUM( SUM(
IF(a.UNIT_BIGMAILMENT_MONEY,a.UNIT_BIGMAILMENT_MONEY,0) + IF(a.UNIT_BIGMAILMENT_MONEY,a.UNIT_BIGMAILMENT_MONEY,0) +
IF(a.COMPANY_ACCRUAL,a.COMPANY_ACCRUAL,0) + IF(a.COMPANY_ACCRUAL,a.COMPANY_ACCRUAL,0) +
IF(a.UNIT_PENSION_MONEY,a.UNIT_PENSION_MONEY,0) + IF(a.UNIT_PENSION_MONEY,a.UNIT_PENSION_MONEY,0) +
IF(a.UNIT_MEDICAL_MONEY,a.UNIT_MEDICAL_MONEY,0) + IF(a.UNIT_MEDICAL_MONEY,a.UNIT_MEDICAL_MONEY,0) +
IF(a.UNIT_INJURY_MONEY,a.UNIT_INJURY_MONEY,0) + IF(a.UNIT_INJURY_MONEY,a.UNIT_INJURY_MONEY,0) +
IF(a.UNIT_UNEMPLOYMENT_MONEY,a.UNIT_UNEMPLOYMENT_MONEY,0) + IF(a.UNIT_UNEMPLOYMENT_MONEY,a.UNIT_UNEMPLOYMENT_MONEY,0) +
IF(a.UNIT_BIRTH_MONEY,a.UNIT_BIRTH_MONEY,0) + IF(a.UNIT_BIRTH_MONEY,a.UNIT_BIRTH_MONEY,0) +
IF(a.UNIT_PROVIDENT_SUM,a.UNIT_PROVIDENT_SUM,0) IF(a.UNIT_PROVIDENT_SUM,a.UNIT_PROVIDENT_SUM,0)
) AS "unitSum", ) AS "unitSum",
SUM( SUM(
IF(a.PERSONAL_PROVIDENT_SUM,a.PERSONAL_PROVIDENT_SUM,0) IF(a.PERSONAL_PROVIDENT_SUM,a.PERSONAL_PROVIDENT_SUM,0)
) AS "fundPersonalSum", ) AS "fundPersonalSum",
SUM( SUM(
IF(a.UNIT_PROVIDENT_SUM,a.UNIT_PROVIDENT_SUM,0) IF(a.UNIT_PROVIDENT_SUM,a.UNIT_PROVIDENT_SUM,0)
) AS "fundUnitSum", ) AS "fundUnitSum",
SUM( SUM(
IF(a.PERSONAL_ACCRUAL,a.PERSONAL_ACCRUAL,0) + IF(a.PERSONAL_ACCRUAL,a.PERSONAL_ACCRUAL,0) +
IF(a.PERSONAL_BIGMAILMENT_MONEY,a.PERSONAL_BIGMAILMENT_MONEY,0) + IF(a.PERSONAL_BIGMAILMENT_MONEY,a.PERSONAL_BIGMAILMENT_MONEY,0) +
IF(a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_MEDICAL_MONEY,0) + IF(a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_MEDICAL_MONEY,0) +
IF(a.PERSONAL_UNEMPLOYMENT_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY,0) + IF(a.PERSONAL_UNEMPLOYMENT_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY,0) +
IF(a.PERSONAL_PENSION_MONEY,a.PERSONAL_PENSION_MONEY,0) IF(a.PERSONAL_PENSION_MONEY,a.PERSONAL_PENSION_MONEY,0)
) AS "socialPersonalSum", ) AS "socialPersonalSum",
SUM( SUM(
IF(a.UNIT_BIGMAILMENT_MONEY,a.UNIT_BIGMAILMENT_MONEY,0) + IF(a.UNIT_BIGMAILMENT_MONEY,a.UNIT_BIGMAILMENT_MONEY,0) +
IF(a.COMPANY_ACCRUAL,a.COMPANY_ACCRUAL,0) + IF(a.COMPANY_ACCRUAL,a.COMPANY_ACCRUAL,0) +
IF(a.UNIT_PENSION_MONEY,a.UNIT_PENSION_MONEY,0) + IF(a.UNIT_PENSION_MONEY,a.UNIT_PENSION_MONEY,0) +
IF(a.UNIT_MEDICAL_MONEY,a.UNIT_MEDICAL_MONEY,0) + IF(a.UNIT_MEDICAL_MONEY,a.UNIT_MEDICAL_MONEY,0) +
IF(a.UNIT_INJURY_MONEY,a.UNIT_INJURY_MONEY,0) + IF(a.UNIT_INJURY_MONEY,a.UNIT_INJURY_MONEY,0) +
IF(a.UNIT_UNEMPLOYMENT_MONEY,a.UNIT_UNEMPLOYMENT_MONEY,0) + IF(a.UNIT_UNEMPLOYMENT_MONEY,a.UNIT_UNEMPLOYMENT_MONEY,0) +
IF(a.UNIT_BIRTH_MONEY,a.UNIT_BIRTH_MONEY,0) IF(a.UNIT_BIRTH_MONEY,a.UNIT_BIRTH_MONEY,0)
) AS "socialUnitSum" ) AS "socialUnitSum"
FROM t_payment_info a FROM t_payment_info a
<where> <where>
1=1 1=1
......
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