Commit 1729eafd authored by huyuchen's avatar huyuchen

实缴查询导出和详情修改

parent 3a11690b
......@@ -1383,14 +1383,14 @@
ifnull(SUM( w.SOCIAL_SECURITY_PERSONAL_SUM ),0) + ifnull(SUM( w.PERSONAL_PROVIDENT_SUM ),0) AS SOCIAL_FUND_PERSONAL_SUM,
ifnull(SUM( w.UNIT_SOCIAL_SUM ),0) + ifnull(SUM( w.UNIT_PROVIDENT_SUM ),0) AS UNIT_SOCIAL_FUND_SUM,
SUM( w.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM,
w.UNIT_PENSION_PER,
w.UNIT_MEDICAL_PER,
w.UNIT_UNEMPLOYMENT_PER,
w.UNIT_INJURY_PER,
w.UNIT_BIRTH_PER,
w.PERSONAL_PENSION_PER,
w.PERSONAL_MEDICAL_PER,
w.PERSONAL_UNEMPLOYMENT_PER
MAX(w.UNIT_PENSION_PER) as UNIT_PENSION_PER,
MAX(w.UNIT_MEDICAL_PER) as UNIT_MEDICAL_PER,
MAX(w.UNIT_UNEMPLOYMENT_PER) as UNIT_UNEMPLOYMENT_PER,
MAX(w.UNIT_INJURY_PER) as UNIT_INJURY_PER,
MAX(w.UNIT_BIRTH_PER) as UNIT_BIRTH_PER,
MAX(w.PERSONAL_PENSION_PER) as PERSONAL_PENSION_PER,
MAX(w.PERSONAL_MEDICAL_PER) as PERSONAL_MEDICAL_PER,
MAX(w.PERSONAL_UNEMPLOYMENT_PER) as PERSONAL_UNEMPLOYMENT_PER
FROM (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
......@@ -1439,14 +1439,14 @@
a.PROVIDENT_PERCENT,
a.PERSONAL_PROIDENT_SET,
a.UNIT_PROVIDENT_SUM,
if(null = a.UNIT_PENSION_MONEY,'',round(a.UNIT_PENSION_MONEY/UNIT_PENSION_SET,4)) as UNIT_PENSION_PER,
if(null = a.UNIT_MEDICAL_MONEY,'',round(a.UNIT_MEDICAL_MONEY/UNIT_MEDICAL_SET,4)) as UNIT_MEDICAL_PER,
if(null = a.UNIT_UNEMPLOYMENT_MONEY,'',round(a.UNIT_UNEMPLOYMENT_MONEY/UNIT_UNEMPLOYMENT_SET,4)) as UNIT_UNEMPLOYMENT_PER,
if(null = a.UNIT_INJURY_MONEY,'',round(a.UNIT_INJURY_MONEY/UNIT_INJURY_SET,4)) as UNIT_INJURY_PER,
if(null = a.UNIT_BIRTH_MONEY,'',round(a.UNIT_BIRTH_MONEY/UNIT_BIRTH_SET,4)) as UNIT_BIRTH_PER,
if(null = a.PERSONAL_PENSION_MONEY,'',round(a.PERSONAL_PENSION_MONEY/UNIT_PENSION_SET,4)) as PERSONAL_PENSION_PER,
if(null = a.PERSONAL_MEDICAL_MONEY,'',round(a.PERSONAL_MEDICAL_MONEY/UNIT_MEDICAL_SET,4)) as PERSONAL_MEDICAL_PER,
if(null = a.PERSONAL_UNEMPLOYMENT_MONEY,'',round(a.PERSONAL_UNEMPLOYMENT_MONEY/UNIT_UNEMPLOYMENT_SET,4)) as PERSONAL_UNEMPLOYMENT_PER
if(null = a.UNIT_PENSION_MONEY,'',round(SUM(a.UNIT_PENSION_MONEY)/MAX(a.UNIT_PENSION_SET,4))) as UNIT_PENSION_PER,
if(null = a.UNIT_MEDICAL_MONEY,'',round(SUM(a.UNIT_MEDICAL_MONEY)/MAX(a.UNIT_MEDICAL_SET,4))) as UNIT_MEDICAL_PER,
if(null = a.UNIT_UNEMPLOYMENT_MONEY,'',round(SUM(a.UNIT_UNEMPLOYMENT_MONEY)/MAX(a.UNIT_UNEMPLOYMENT_SET,4))) as UNIT_UNEMPLOYMENT_PER,
if(null = a.UNIT_INJURY_MONEY,'',round(SUM(a.UNIT_INJURY_MONEY)/MAX(a.UNIT_INJURY_SET,4))) as UNIT_INJURY_PER,
if(null = a.UNIT_BIRTH_MONEY,'',round(SUM(a.UNIT_BIRTH_MONEY)/MAX(a.UNIT_BIRTH_SET,4))) as UNIT_BIRTH_PER,
if(null = a.PERSONAL_PENSION_MONEY,'',round(SUM(a.PERSONAL_PENSION_MONEY)/MAX(a.UNIT_PENSION_SET,4))) as PERSONAL_PENSION_PER,
if(null = a.PERSONAL_MEDICAL_MONEY,'',round(SUM(a.PERSONAL_MEDICAL_MONEY)/MAX(a.UNIT_MEDICAL_SET,4))) as PERSONAL_MEDICAL_PER,
if(null = a.PERSONAL_UNEMPLOYMENT_MONEY,'',round(SUM(a.PERSONAL_UNEMPLOYMENT_MONEY)/MAX(a.UNIT_UNEMPLOYMENT_SET,4))) as PERSONAL_UNEMPLOYMENT_PER,
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1'
......@@ -1738,14 +1738,14 @@
SUM( a.UNIT_INJURY_MONEY) as INJURY_MONEY_SUM,
SUM( a.UNIT_BIRTH_MONEY) as BIRTH_MONEY_SUM,
SUM( a.UNIT_BIGMAILMENT_MONEY + a.PERSONAL_BIGMAILMENT_MONEY) as BIGMAILMENT_MONEY_SUM,
if(null = a.UNIT_PENSION_MONEY,'',round(a.UNIT_PENSION_MONEY/UNIT_PENSION_SET,4)) as UNIT_PENSION_PER,
if(null = a.UNIT_MEDICAL_MONEY,'',round(a.UNIT_MEDICAL_MONEY/UNIT_MEDICAL_SET,4)) as UNIT_MEDICAL_PER,
if(null = a.UNIT_UNEMPLOYMENT_MONEY,'',round(a.UNIT_UNEMPLOYMENT_MONEY/UNIT_UNEMPLOYMENT_SET,4)) as UNIT_UNEMPLOYMENT_PER,
if(null = a.UNIT_INJURY_MONEY,'',round(a.UNIT_INJURY_MONEY/UNIT_INJURY_SET,4)) as UNIT_INJURY_PER,
if(null = a.UNIT_BIRTH_MONEY,'',round(a.UNIT_BIRTH_MONEY/UNIT_BIRTH_SET,4)) as UNIT_BIRTH_PER,
if(null = a.PERSONAL_PENSION_MONEY,'',round(a.PERSONAL_PENSION_MONEY/UNIT_PENSION_SET,4)) as PERSONAL_PENSION_PER,
if(null = a.PERSONAL_MEDICAL_MONEY,'',round(a.PERSONAL_MEDICAL_MONEY/UNIT_MEDICAL_SET,4)) as PERSONAL_MEDICAL_PER,
if(null = a.PERSONAL_UNEMPLOYMENT_MONEY,'',round(a.PERSONAL_UNEMPLOYMENT_MONEY/UNIT_UNEMPLOYMENT_SET,4)) as PERSONAL_UNEMPLOYMENT_PER,
if(null = a.UNIT_PENSION_MONEY,'',round(SUM(a.UNIT_PENSION_MONEY)/MAX(a.UNIT_PENSION_SET,4))) as UNIT_PENSION_PER,
if(null = a.UNIT_MEDICAL_MONEY,'',round(SUM(a.UNIT_MEDICAL_MONEY)/MAX(a.UNIT_MEDICAL_SET,4))) as UNIT_MEDICAL_PER,
if(null = a.UNIT_UNEMPLOYMENT_MONEY,'',round(SUM(a.UNIT_UNEMPLOYMENT_MONEY)/MAX(a.UNIT_UNEMPLOYMENT_SET,4))) as UNIT_UNEMPLOYMENT_PER,
if(null = a.UNIT_INJURY_MONEY,'',round(SUM(a.UNIT_INJURY_MONEY)/MAX(a.UNIT_INJURY_SET,4))) as UNIT_INJURY_PER,
if(null = a.UNIT_BIRTH_MONEY,'',round(SUM(a.UNIT_BIRTH_MONEY)/MAX(a.UNIT_BIRTH_SET,4))) as UNIT_BIRTH_PER,
if(null = a.PERSONAL_PENSION_MONEY,'',round(SUM(a.PERSONAL_PENSION_MONEY)/MAX(a.UNIT_PENSION_SET,4))) as PERSONAL_PENSION_PER,
if(null = a.PERSONAL_MEDICAL_MONEY,'',round(SUM(a.PERSONAL_MEDICAL_MONEY)/MAX(a.UNIT_MEDICAL_SET,4))) as PERSONAL_MEDICAL_PER,
if(null = a.PERSONAL_UNEMPLOYMENT_MONEY,'',round(SUM(a.PERSONAL_UNEMPLOYMENT_MONEY)/MAX(a.UNIT_UNEMPLOYMENT_SET,4))) as PERSONAL_UNEMPLOYMENT_PER,
a.PROVIDENT_NO,
a.UNIT_PROVIDENT_SET,
a.PROVIDENT_PERCENT,
......
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