Commit 8bfccdad authored by huyuchen's avatar huyuchen

优化修改

parent a10503e7
...@@ -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">
...@@ -1450,48 +1474,96 @@ ...@@ -1450,48 +1474,96 @@
SELECT 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 +1575,49 @@ ...@@ -1503,25 +1575,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'
......
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