Commit 4ea96990 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.5.6' into MVP1.5.6

parents 9250eaab b4c28267
...@@ -17,4 +17,7 @@ public class TDispatchFundSumVo { ...@@ -17,4 +17,7 @@ public class TDispatchFundSumVo {
@ExcelAttribute(name = "合计补缴金额(大写)" ) @ExcelAttribute(name = "合计补缴金额(大写)" )
@ExcelProperty("合计补缴金额(大写)") @ExcelProperty("合计补缴金额(大写)")
private BigDecimal supplementaryAmountSum; private BigDecimal supplementaryAmountSum;
private String number;
} }
...@@ -62,6 +62,7 @@ public class CustomCellStyleFourStrategy extends AbstractVerticalCellStyleStrate ...@@ -62,6 +62,7 @@ public class CustomCellStyleFourStrategy extends AbstractVerticalCellStyleStrate
headWriteCellStyle.setFillForegroundColor(IndexedColors.BLACK.getIndex()); headWriteCellStyle.setFillForegroundColor(IndexedColors.BLACK.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont); headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT); headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
headWriteCellStyle.setBorderLeft(BorderStyle.THIN); headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
headWriteCellStyle.setBorderTop(BorderStyle.THIN); headWriteCellStyle.setBorderTop(BorderStyle.THIN);
headWriteCellStyle.setBorderRight(BorderStyle.THIN); headWriteCellStyle.setBorderRight(BorderStyle.THIN);
......
...@@ -164,6 +164,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -164,6 +164,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
int getSocialDisRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); int getSocialDisRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
int getFCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/** /**
* @Author huyc * @Author huyc
...@@ -239,11 +240,11 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -239,11 +240,11 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
List<TDispatchFundPersionExportVo> getFundPersionExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); List<TDispatchFundPersionExportVo> getFundPersionExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
List<TDispatchFundSupplementaryExportVo> getFundSupplementarynExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); List<TDispatchFundSupplementaryExportVo> getFundSupplementarynExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,@Param("companyPro") Double companyPro);
TDispatchFundSumExportVo getFundSumExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); TDispatchFundSumExportVo getFundSumExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
TDispatchFundSumVo getFundSumExportVoOne(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); TDispatchFundSumVo getFundSumExportVoOne(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,@Param("companyPro") Double companyPro);
CompanyProVo getFundPersionExportVoOne(@Param("houseName") String houseName); CompanyProVo getFundPersionExportVoOne(@Param("houseName") String houseName);
......
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
<resultMap id="FundSupplementary" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumVo"> <resultMap id="FundSupplementary" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumVo">
<result property="supplementaryAmountSum" column="SUPPLEMENTART_AMOUNT_SUM"/> <result property="supplementaryAmountSum" column="SUPPLEMENTART_AMOUNT_SUM"/>
<result property="number" column="NUMBER"/>
</resultMap> </resultMap>
<resultMap id="FundSumExport" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo"> <resultMap id="FundSumExport" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo">
...@@ -1265,6 +1265,25 @@ ...@@ -1265,6 +1265,25 @@
group by a.EMP_IDCARD) h group by a.EMP_IDCARD) h
</select> </select>
<select id="getFCount" resultType="java.lang.Integer">
SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a
<where>
<include refid="where_getFundDisRecord"/>
</where>
group by a.EMP_IDCARD ,a.TYPE) h
</select>
<select id="getSocialDisRecordCount" resultType="java.lang.Integer">
SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a
<where>
<include refid="where_getSocialDisRecord"/>
</where>
group by a.EMP_IDCARD) h
</select>
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getSocialDisRecord" resultMap="socialDisExportMap"> <select id="getSocialDisRecord" resultMap="socialDisExportMap">
...@@ -1954,6 +1973,30 @@ ...@@ -1954,6 +1973,30 @@
</if> </if>
</if> </if>
</sql>
<sql id="where_getFund">
a.DELETE_FLAG = 0
AND a.fund_id is not null
AND a.STATUS in ('2','4')
AND a.DISPATCH_ITEM like concat('%','公积金','%')
<if test="tDispatchInfo != null">
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
<if test="tDispatchInfo.type != null and tDispatchInfo.type.trim() != ''">
AND a.TYPE = #{tDispatchInfo.type}
</if>
<if test="tDispatchInfo.disMonth != null and tDispatchInfo.disMonth.trim() != ''">
AND replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') = #{tDispatchInfo.disMonth}
</if>
<if test="tDispatchInfo.fundHandleStatus != null and tDispatchInfo.fundHandleStatus.trim() != ''">
AND a.FUND_HANDLE_STATUS = #{tDispatchInfo.fundHandleStatus}
</if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql}
</if>
</if>
</sql> </sql>
<sql id="where_getSocialPersionDisRecord"> <sql id="where_getSocialPersionDisRecord">
...@@ -1999,41 +2042,62 @@ ...@@ -1999,41 +2042,62 @@
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getFundPersionExportVo" resultMap="FundExport"> <select id="getFundPersionExportVo" resultMap="FundExport">
SELECT SELECT
(@i :=@i+1) as NUM, ( @i := @i + 1 ) AS NUM,
a.EMP_NAME, h.EMP_NAME,
a.EMP_IDCARD, h.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE , h.DEPOSIT_BASE,
IF(a.TYPE=0 ,s.UNIT_PROVIDENT_FEE*2,NULL) as MOTHLY_INCREASE, h.MOTHLY_INCREASE,
IF(a.TYPE=1 ,s.UNIT_PROVIDENT_FEE*2,NULL) as MOTHLY_DECREASE, h.MOTHLY_DECREASE,
case when a.TYPE=0 then "新增" h.CAUSE_CHANGE
else "减少" end as CAUSE_CHANGE FROM
FROM t_dispatch_info a (
left join t_provident_fund s on s.id=a.FUND_ID SELECT
,(select @i:=0) as itable a.EMP_NAME,
a.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE,
IF
( a.TYPE = 0, s.UNIT_PROVIDENT_FEE * 2, NULL ) AS MOTHLY_INCREASE,
IF
( a.TYPE = 1, s.UNIT_PROVIDENT_FEE * 2, NULL ) AS MOTHLY_DECREASE,
CASE
WHEN a.TYPE = 0 THEN
"新增" ELSE "减少"
END AS CAUSE_CHANGE
FROM
t_dispatch_info a
LEFT JOIN t_provident_fund s ON s.id = a.FUND_ID
<where> <where>
<include refid="where_getFundDisRecord"/> <include refid="where_getFundDisRecord"/>
</where> </where>
GROUP BY
a.EMP_IDCARD,
a.TYPE
ORDER BY
a.TYPE
) h,(select @i:=0) as itable
</select> </select>
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getFundSupplementarynExportVo" resultMap="FundSupplementaryExport"> <select id="getFundSupplementarynExportVo" resultMap="FundSupplementaryExport">
SELECT SELECT
(@i :=@i+1) as NUM, ( @i := @i + 1 ) AS NUM,
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE , s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE,
replace( DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"),'-','') as ORIGINATE, REPLACE ( DATE_FORMAT( s.PROVIDENT_START, "%Y-%m" ), '-', '' ) AS ORIGINATE,
replace( DATE_FORMAT(DATE(CURDATE()),"%Y-%m"),'-','') as END, #{tDispatchInfo.disMonth} AS END,
ROUND(SUM((abs(PERIOD_DIFF(replace(DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"), '-', ''), ROUND((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE ( DATE_FORMAT( s.PROVIDENT_START, "%Y-%m" ), '-', '' )))*#{companyPro}*s.UNIT_PROVIDENG_CARDINAL*0.01 ) AS SUPPLEMENTART_AMOUNT
#{tDispatchInfo.disMonth})))*s.UNIT_PROVIDENT_PER*s.UNIT_PROVIDENG_CARDINAL ) FROM
) t_dispatch_info a
AS SUPPLEMENTART_AMOUNT LEFT JOIN t_provident_fund s ON s.id = a.FUND_ID,(
FROM t_dispatch_info a SELECT
left join t_provident_fund s on s.id=a.FUND_ID @i := 0
,(select @i:=0) as itable ) AS itable
<where> <where>
<include refid="where_getFundDisRecord"/> <include refid="where_getFund"/>
</where> </where>
</select> </select>
<select id="getFundSumExportVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo"> <select id="getFundSumExportVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo">
...@@ -2050,13 +2114,12 @@ ...@@ -2050,13 +2114,12 @@
</select> </select>
<select id="getFundSumExportVoOne" resultMap="FundSupplementary"> <select id="getFundSumExportVoOne" resultMap="FundSupplementary">
SELECT SELECT
ROUND(SUM((abs(PERIOD_DIFF(replace(DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"), '-', ''), count(a.EMP_IDCARD) as NUMBER,
#{tDispatchInfo.disMonth})))*0.1*s.UNIT_PROVIDENG_CARDINAL ) SUM(ROUND((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE (DATE_FORMAT( DATE_ADD(s.PROVIDENT_START,INTERVAL 1 MONTH), "%Y-%m" ), '-', '' )))*#{companyPro}*s.UNIT_PROVIDENG_CARDINAL*0.01 )) AS SUPPLEMENTART_AMOUNT_SUM
) AS SUPPLEMENTART_AMOUNT_SUM
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_provident_fund s on s.id = a.FUND_ID left join t_provident_fund s on s.id = a.FUND_ID
<where> <where>
<include refid="where_getFundDisRecord"/> <include refid="where_getFund"/>
</where> </where>
</select> </select>
......
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