Commit 7b331afc authored by wangzb's avatar wangzb

feature-wzb :公积金表格导出及代发户添加

parent a8b26698
...@@ -518,6 +518,7 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -518,6 +518,7 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "减少原因") @Schema(description = "减少原因")
private String reduceReason; private String reduceReason;
/** /**
* @Author fxj * @Author fxj
* 查询数据起 * 查询数据起
...@@ -532,4 +533,5 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -532,4 +533,5 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "查询limit 数据条数") @Schema(description = "查询limit 数据条数")
@TableField(exist = false) @TableField(exist = false)
private int limitEnd; private int limitEnd;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class ChangeIssueStatusVo {
/**
* id
*/
@Schema(description = "id")
private String id;
/**
* 是否代发户
*/
@Schema(description ="代发户状态(0否;1是代发户)")
private int issueStatus;
}
...@@ -178,4 +178,13 @@ public class EmployeeContractExportAuditVO implements Serializable { ...@@ -178,4 +178,13 @@ public class EmployeeContractExportAuditVO implements Serializable {
@Schema(description = "终止原因") @Schema(description = "终止原因")
@ExcelProperty("终止原因") @ExcelProperty("终止原因")
private String reduceReason; private String reduceReason;
/**
* 备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "备注")
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
} }
...@@ -286,4 +286,9 @@ public class EmployeeContractExportVO implements Serializable { ...@@ -286,4 +286,9 @@ public class EmployeeContractExportVO implements Serializable {
private Set<String> exportFields; private Set<String> exportFields;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "备注")
@Schema(description = "备注")
@ExcelProperty("备注")
private String memo;
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService;
...@@ -410,4 +411,15 @@ public class TSettleDomainController { ...@@ -410,4 +411,15 @@ public class TSettleDomainController {
List<TSettleDomainUpServerTeamVo> list= JSONObject.parseArray(jsonStr, TSettleDomainUpServerTeamVo.class); List<TSettleDomainUpServerTeamVo> list= JSONObject.parseArray(jsonStr, TSettleDomainUpServerTeamVo.class);
return tSettleDomainService.updateProjectServerTeam(list); return tSettleDomainService.updateProjectServerTeam(list);
} }
/**
* 分页查询 客户信息
* @return
*/
@Operation(summary = "代发户切换按钮", description = "代发户切换按钮")
@PostMapping("/changeIssueStatus")
public R<Boolean> changeIssueStatus(@RequestBody ChangeIssueStatusVo changeIssueStatusVo) {
return tSettleDomainService.changeIssueStatus(changeIssueStatusVo);
}
} }
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -108,4 +109,6 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> { ...@@ -108,4 +109,6 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
@Param("customerName")String customerName, @Param("customerName")String customerName,
@Param("userId")String userId); @Param("userId")String userId);
void changeIssueStatus(@Param("changeIssueStatusVo")ChangeIssueStatusVo changeIssueStatusVo);
} }
...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -134,4 +135,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> { ...@@ -134,4 +135,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
R<IPage<CustomerOwnerSelectVo>> getCustomerOwnerPage(Page<CustomerOwnerSelectVo> page, String customerName, String userId); R<IPage<CustomerOwnerSelectVo>> getCustomerOwnerPage(Page<CustomerOwnerSelectVo> page, String customerName, String userId);
R<Boolean> updateProjectServerTeam(List<TSettleDomainUpServerTeamVo> list); R<Boolean> updateProjectServerTeam(List<TSettleDomainUpServerTeamVo> list);
R<Boolean> changeIssueStatus(ChangeIssueStatusVo changeIssueStatusVo);
} }
...@@ -500,6 +500,12 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -500,6 +500,12 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return R.ok(Boolean.TRUE,CommonConstants.RESULT_DATA_SUCESS); return R.ok(Boolean.TRUE,CommonConstants.RESULT_DATA_SUCESS);
} }
@Override
public R <Boolean>changeIssueStatus(ChangeIssueStatusVo changeIssueStatusVo) {
baseMapper.changeIssueStatus(changeIssueStatusVo);
return R.ok(Boolean.TRUE,CommonConstants.RESULT_DATA_SUCESS);
}
private void initServerTeamPermission(TSettleDomain domain) { private void initServerTeamPermission(TSettleDomain domain) {
if (Common.isNotNull(domain.getServiceTeam())){ if (Common.isNotNull(domain.getServiceTeam())){
R<SysUserListVo> res = upmsDaprUtils.getUserIdsByUserNames(domain.getServiceTeam()); R<SysUserListVo> res = upmsDaprUtils.getUserIdsByUserNames(domain.getServiceTeam());
......
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
<result property="workingHours" column="WORKING_HOURS"/> <result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/> <result property="post" column="POST"/>
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
<result property="memo" column="MEMO"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -203,7 +204,8 @@ ...@@ -203,7 +204,8 @@
a.TYPE, a.TYPE,
a.LEAVE_DATE, a.LEAVE_DATE,
a.AUDIT_USER_NAME, a.AUDIT_USER_NAME,
a.REDUCE_REASON,a.type a.REDUCE_REASON,
a.type
</sql> </sql>
...@@ -510,6 +512,7 @@ ...@@ -510,6 +512,7 @@
WHEN a.type =4 THEN "派减-终止" WHEN a.type =4 THEN "派减-终止"
ELSE a.type END as "type", ELSE a.type END as "type",
b.REMARK, b.REMARK,
a.REMARK as memo,
a.CREATE_TIME a.CREATE_TIME
FROM t_employee_contract_info a FROM t_employee_contract_info a
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
...@@ -653,7 +656,7 @@ ...@@ -653,7 +656,7 @@
a.LEAVE_DATE, a.LEAVE_DATE,
a.CONTRACT_NO, a.CONTRACT_NO,
a.REDUCE_REASON, a.REDUCE_REASON,
b.REMARK a.REMARK
FROM t_employee_contract_info a FROM t_employee_contract_info a
left join (select REMARK,LINK_ID from t_employee_contract_audit where ROOT_NAME='合同审核') b on a.ID=b.LINK_ID left join (select REMARK,LINK_ID from t_employee_contract_audit where ROOT_NAME='合同审核') b on a.ID=b.LINK_ID
......
...@@ -238,6 +238,12 @@ ...@@ -238,6 +238,12 @@
<if test="tSettleDomain.buBelong != null and tSettleDomain.buBelong.trim() != ''"> <if test="tSettleDomain.buBelong != null and tSettleDomain.buBelong.trim() != ''">
and a.BU_BELONG = #{tSettleDomain.buBelong} and a.BU_BELONG = #{tSettleDomain.buBelong}
</if> </if>
<if test="tSettleDomain.buBelong != null and tSettleDomain.buBelong.trim() != ''">
and a.BU_BELONG = #{tSettleDomain.buBelong}
</if>
<if test="tSettleDomain.issueStatus != null">
and a.ISSUE_STATUS = #{tSettleDomain.issueStatus}
</if>
</if> </if>
order by CREATE_TIME desc order by CREATE_TIME desc
</select> </select>
...@@ -498,4 +504,10 @@ ...@@ -498,4 +504,10 @@
and a.id in (select b.settle_id from m_setttle_customer_user b where b.user_id = #{userId}) and a.DELETE_FLAG = '0' and a.id in (select b.settle_id from m_setttle_customer_user b where b.user_id = #{userId}) and a.DELETE_FLAG = '0'
group by a.CUSTOMER_NO order by CREATE_TIME desc group by a.CUSTOMER_NO order by CREATE_TIME desc
</select> </select>
<update id="changeIssueStatus">
update t_settle_domain a
set a.ISSUE_STATUS=#{changeIssueStatusVo.issueStatus}
WHERE a.ID=#{changeIssueStatusVo.id}
</update>
</mapper> </mapper>
...@@ -97,6 +97,12 @@ public class TSalaryStandardExportVo implements Serializable { ...@@ -97,6 +97,12 @@ public class TSalaryStandardExportVo implements Serializable {
@ExcelProperty("表单类型") @ExcelProperty("表单类型")
private String formType; private String formType;
@ExcelAttribute(name = "代发户状态(0正常;1代发户)" )
@ExcelProperty("代发户状态")
@Schema(description ="代发户状态(0正常;1代发户)")
private String issueStatus;
/** /**
* 创建时间 * 创建时间
*/ */
......
...@@ -36,6 +36,8 @@ public class DispatchConstants { ...@@ -36,6 +36,8 @@ public class DispatchConstants {
public static final String SOCIAL_RECORD_EXPORT = "公积金变更清册导出"; public static final String SOCIAL_RECORD_EXPORT = "公积金变更清册导出";
public static final String SOCIAL_MEDICAL_EXPORT = "合肥医保花名册"; public static final String SOCIAL_MEDICAL_EXPORT = "合肥医保花名册";
public static final String SOCIAL_PERSION_EXPORT = "合肥社保花名册"; public static final String SOCIAL_PERSION_EXPORT = "合肥社保花名册";
public static final String FUND_RECORD_EXPORT = "合肥公积金变更清册";
public static final String FUND_SUPPLEMENTARY_EXPORT = "合肥公积金补缴清册";
public static final String DISPATCH_PENSION = "养老、"; public static final String DISPATCH_PENSION = "养老、";
public static final String DISPATCH_MEDICAL = "医疗、"; public static final String DISPATCH_MEDICAL = "医疗、";
public static final String DISPATCH_BIRTH = "生育、"; public static final String DISPATCH_BIRTH = "生育、";
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class CompanyProVo {
@Schema(description = "比例")
private Double companyPro;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class HouseNameConfigVo {
@Schema(description = "编码")
private String customerNo ;
@Schema(description = "银行账户")
private String fundBank ;
@Schema(description = "比例")
private Double companyPro;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class TDispatchFundPersionExportVo {
/**
* 序号
*/
@Schema(description = "序号" )
@ExcelAttribute(name = "序号" )
@ExcelProperty("序号")
private Integer num;
@Schema(description = "个人账号" )
@ExcelAttribute(name = "个人账号" )
@ExcelProperty("个人账号")
private String personalAccount;
/**
* 员工姓名
*/
@Schema(description = "姓名" )
@ExcelAttribute(name = "姓名" )
@ExcelProperty("姓名")
private String empName;
/**
* 身份证号码
*/
@Schema(description = "身份证号码" )
@ExcelAttribute(name = "身份证号码" )
@ExcelProperty("身份证号码")
private String empIdcard;
/**
* 缴存基数
*/
@Schema(description = "缴存基数" )
@ExcelAttribute(name = "缴存基数" )
@ExcelProperty("缴存基数")
private BigDecimal depositBase;
/**
* 本月增加
*/
@Schema(description = "本月增加" )
@ExcelAttribute(name = "本月增加" )
@ExcelProperty("本月增加")
private String monthlyIncrease;
/**
* 本月减少
*/
@Schema(description = "本月减少" )
@ExcelAttribute(name = "本月减少" )
@ExcelProperty("本月减少")
private String monthlyDecrease;
/**
* 工伤
*/
@Schema(description = "变更原因" )
@ExcelAttribute(name = "变更原因" )
@ExcelProperty("变更原因")
private String causeChange;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class TDispatchFundSumExportVo {
/**
* 序号
*/
@Schema(description = "人数" )
@ExcelAttribute(name = "人数" )
@ExcelProperty("人数")
private Integer numOne;
/**
* 序号
*/
@Schema(description = "人数" )
@ExcelAttribute(name = "人数" )
@ExcelProperty("人数")
private Integer numTwo;
/**
* 缴存基数
*/
@Schema(description = "金额" )
@ExcelAttribute(name = "金额" )
@ExcelProperty("金额")
private BigDecimal monenyOne;
/**
* 缴存基数
*/
@Schema(description = "金额" )
@ExcelAttribute(name = "金额" )
@ExcelProperty("金额")
private BigDecimal monenyTwo;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class TDispatchFundSumVo {
/**
* 本月增加
*/
@Schema(description = "合计补缴金额(大写)" )
@ExcelAttribute(name = "合计补缴金额(大写)" )
@ExcelProperty("合计补缴金额(大写)")
private BigDecimal supplementaryAmountSum;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class TDispatchFundSupplementaryExportVo {
/**
* 序号
*/
@Schema(description = "序号" )
@ExcelAttribute(name = "序号" )
@ExcelProperty("序号")
private Integer num;
@Schema(description = "个人账号" )
@ExcelAttribute(name = "个人账号" )
@ExcelProperty("个人账号")
private String personalAccount;
/**
* 员工姓名
*/
@Schema(description = "姓名" )
@ExcelAttribute(name = "姓名" )
@ExcelProperty("姓名")
private String empName;
/**
* 缴存基数
*/
@Schema(description = "缴存基数" )
@ExcelAttribute(name = "缴存基数" )
@ExcelProperty("缴存基数")
private BigDecimal depositBase;
/**
* 本月增加
*/
@Schema(description = "补缴金额" )
@ExcelAttribute(name = "补缴金额" )
@ExcelProperty("补缴金额")
private BigDecimal supplementaryAmount;
/**
* 本月减少
*/
@Schema(description = "起始(年月日)" )
@ExcelAttribute(name = "起始(年月日)" )
@ExcelProperty("起始(年月日)")
private String originate;
/**
* 工伤
*/
@Schema(description = "截至(年月日)" )
@ExcelAttribute(name = "截至(年月日)" )
@ExcelProperty("截至(年月日)")
private String end;
}
...@@ -16,11 +16,14 @@ ...@@ -16,11 +16,14 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.vo; package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund; import com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Set;
/** /**
* 公积金信息 * 公积金信息
...@@ -55,4 +58,23 @@ private int limitStart; ...@@ -55,4 +58,23 @@ private int limitStart;
@Schema(description = "查询limit 数据条数") @Schema(description = "查询limit 数据条数")
private int limitEnd; private int limitEnd;
/**
* 单位编号
*/
@TableField(exist = false)
@Schema(description ="单位编号")
@ExcelIgnore
private String customerNo;
/**
* 单位统一信用代码
*/
@TableField(exist = false)
@Schema(description ="单位统一信用代码")
@ExcelIgnore
private String unitCreditCode;
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
} }
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.AbstractVerticalCellStyleStrategy;
import org.apache.poi.ss.usermodel.*;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleFourStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleFourStrategy(List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@Override
public void setHeadCellStyle(Cell cell, Head head, Integer relativeRowIndex) {
super.setHeadCellStyle(cell, head, relativeRowIndex);
}
@Override
protected WriteCellStyle headCellStyle(Head head) {
// 获取样式实例
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// 获取字体实例
WriteFont headWriteFont = new WriteFont();
// 设置字体样式
headWriteFont.setFontName("宋体");
// 设置字体大小
headWriteFont.setFontHeightInPoints((short)12);
// 边框
headWriteFont.setBold(false);
headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
return headWriteCellStyle;
}
@Override
protected WriteCellStyle contentCellStyle(Head head) {
// 获取样式实例
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// 获取字体实例
WriteFont headWriteFont = new WriteFont();
// 设置字体样式
headWriteFont.setFontName("宋体");
// 设置字体大小
headWriteFont.setFontHeightInPoints((short)12);
// 边框
headWriteFont.setBold(false);
headWriteCellStyle.setFillForegroundColor(IndexedColors.BLACK.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
headWriteCellStyle.setBorderTop(BorderStyle.THIN);
headWriteCellStyle.setBorderRight(BorderStyle.THIN);
headWriteCellStyle.setBorderBottom(BorderStyle.THIN);
return headWriteCellStyle;
}
}
...@@ -798,4 +798,47 @@ public class TDispatchInfoController { ...@@ -798,4 +798,47 @@ public class TDispatchInfoController {
searchVo.setCreateBy(user.getId()); searchVo.setCreateBy(user.getId());
tDispatchInfoService.doexportSocialPensionRecord(response,searchVo); tDispatchInfoService.doexportSocialPensionRecord(response,searchVo);
} }
/**
* @Author wzb
* @Description 导出 导出医保花名册
* @Date 10:05 2023/7/28
* @Param
* @return
**/
@PostMapping("/doexportFundInfo")
@Operation(description = "导出住房公积金变更清册")
@SysLog("导出住房公积金变更清册")
public void doexportFundInfo(HttpServletResponse response, HttpServletRequest request,
@RequestBody SocialHandleSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
searchVo.setCreateBy(user.getId());
tDispatchInfoService.doexportFundInfo(response,searchVo);
}
/**
* @Author wzb
* @Description 导出 导出医保花名册
* @Date 10:05 2023/7/28
* @Param
* @return
**/
@PostMapping("/doexportFundSupplementaryInfo")
@Operation(description = "导出住房公积金补缴申请书")
@SysLog("导出住房公积金补缴申请书")
public void doexportFundInfoOne(HttpServletResponse response, HttpServletRequest request,
@RequestBody SocialHandleSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
searchVo.setCreateBy(user.getId());
tDispatchInfoService.doexportFundInfoOne(response,searchVo);
}
} }
...@@ -163,6 +163,8 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -163,6 +163,8 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
**/ **/
int getSocialDisRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo); int getSocialDisRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/** /**
* @Author huyc * @Author huyc
* @Description 社保派单医保模版 * @Description 社保派单医保模版
...@@ -226,4 +228,15 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -226,4 +228,15 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
int updateExportFundFlagById(@Param("id")String id,@Param("status")String status); int updateExportFundFlagById(@Param("id")String id,@Param("status")String status);
List<TDispatchFundPersionExportVo> getFundPersionExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
List<TDispatchFundSupplementaryExportVo> getFundSupplementarynExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
TDispatchFundSumExportVo getFundSumExportVo(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
TDispatchFundSumVo getFundSumExportVoOne(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
CompanyProVo getFundPersionExportVoOne(@Param("houseName") String houseName);
HouseNameConfigVo getFundSumExportVoTwo(@Param("houseName") String houseName);
} }
...@@ -130,4 +130,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -130,4 +130,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
* @return: boolean * @return: boolean
**/ **/
boolean haveRole(YifuUser user, long roleId); boolean haveRole(YifuUser user, long roleId);
void doexportFundInfo(HttpServletResponse response, SocialHandleSearchVo searchVo);
void doexportFundInfoOne(HttpServletResponse response, SocialHandleSearchVo searchVo);
} }
...@@ -175,6 +175,49 @@ ...@@ -175,6 +175,49 @@
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
</resultMap> </resultMap>
<resultMap id="FundExport" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundPersionExportVo">
<result property="num" column="NUM"/>
<result property="personalAccount" column="PERSON_ACCOUNT"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empName" column="EMP_NAME"/>
<result property="depositBase" column="DEPOSIT_BASE"/>
<result property="monthlyIncrease" column="MOTHLY_INCREASE"/>
<result property="monthlyDecrease" column="MOTHLY_DECREASE"/>
<result property="causeChange" column="CAUSE_CHANGE"/>
</resultMap>
<resultMap id="CompanyProVo" type="com.yifu.cloud.plus.v1.yifu.social.vo.CompanyProVo">
<result property="companyPro" column="COMPANY_PRO"/>
</resultMap>
<resultMap id="HouseNameConfigVo" type="com.yifu.cloud.plus.v1.yifu.social.vo.HouseNameConfigVo">
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="fundBank" column="FUND_BANK"/>
<result property="companyPro" column="COMPANY_PRO"/>
</resultMap>
<resultMap id="FundSupplementaryExport" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSupplementaryExportVo">
<result property="num" column="NUM"/>
<result property="personalAccount" column="PERSON_ACCOUNT"/>
<result property="empName" column="EMP_NAME"/>
<result property="depositBase" column="DEPOSIT_BASE"/>
<result property="supplementaryAmount" column="SUPPLEMENTART_AMOUNT"/>
<result property="originate" column="ORIGINATE"/>
<result property="end" column="END"/>
</resultMap>
<resultMap id="FundSupplementary" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumVo">
<result property="supplementaryAmountSum" column="SUPPLEMENTART_AMOUNT_SUM"/>
</resultMap>
<resultMap id="FundSumExport" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo">
<result property="numOne" column="NUM_ONE"/>
<result property="numTwo" column="NUM_TWO"/>
<result property="monenyOne" column="MONEY_ONE"/>
<result property="monenyTwo" column="MONEY_TWO"/>
</resultMap>
<resultMap id="socialDisExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchSocialExportVo"> <resultMap id="socialDisExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchSocialExportVo">
<result property="num" column="NUM"/> <result property="num" column="NUM"/>
<result property="empIdcard" column="EMP_IDCARD"/> <result property="empIdcard" column="EMP_IDCARD"/>
...@@ -1223,6 +1266,7 @@ ...@@ -1223,6 +1266,7 @@
</where> </where>
</select> </select>
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getSocialDisRecord" resultMap="socialDisExportMap"> <select id="getSocialDisRecord" resultMap="socialDisExportMap">
SELECT SELECT
...@@ -1782,6 +1826,31 @@ ...@@ -1782,6 +1826,31 @@
</if> </if>
</sql> </sql>
<sql id="where_getFundDisRecord">
a.DELETE_FLAG = 0
AND a.fund_id is not null
AND a.STATUS = "2"
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 id="where_getSocialPersionDisRecord"> <sql id="where_getSocialPersionDisRecord">
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
AND a.social_id is not null AND a.social_id is not null
...@@ -1818,4 +1887,94 @@ ...@@ -1818,4 +1887,94 @@
<update id="updateExportFundFlagById"> <update id="updateExportFundFlagById">
update t_dispatch_info a set a.EXPORT_FUND_FLAG = #{status} WHERE a.id = #{id} update t_dispatch_info a set a.EXPORT_FUND_FLAG = #{status} WHERE a.id = #{id}
</update> </update>
<!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getFundPersionExportVo" resultMap="FundExport">
SELECT
(@i :=@i+1) as NUM,
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
,(select @i:=0) as itable
<where>
<include refid="where_getFundDisRecord"/>
</where>
</select>
<!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getFundSupplementarynExportVo" resultMap="FundSupplementaryExport">
SELECT
(@i :=@i+1) as NUM,
a.EMP_NAME,
a.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE ,
replace( DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"),'-','') as ORIGINATE,
replace( DATE_FORMAT(DATE(CURDATE()),"%Y-%m"),'-','') as END,
(abs(PERIOD_DIFF( replace( DATE_FORMAT(s.PROVIDENT_START,"%m"),'-',''),replace( DATE_FORMAT(DATE(CURDATE()),"%m"),'-','')))+1) *S.UNIT_PROVIDENG_CARDINAL*0.12
AS SUPPLEMENTART_AMOUNT
FROM t_dispatch_info a
left join t_provident_fund s on s.id=a.FUND_ID
,(select @i:=0) as itable
<where>
<include refid="where_getFundDisRecord"/>
</where>
</select>
<select id="getFundSumExportVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo">
SELECT
SUM(IF(a.TYPE=1, 1,0)) as NUM_ONE,
SUM(IF(a.TYPE=0, 1,0)) as NUM_TWO,
SUM(IF(a.TYPE=0 ,s.UNIT_PROVIDENT_FEE*2,NULL)) AS MONENY_ONE ,
SUM(IF(a.TYPE=1 ,s.UNIT_PROVIDENT_FEE*2,NULL)) AS MONENY_TWO
FROM t_dispatch_info a
left join t_provident_fund s on s.id=a.FUND_ID
<where>
<include refid="where_getFundDisRecord"/>
</where>
</select>
<select id="getFundSumExportVoOne" resultMap="FundSupplementary">
SELECT ROUND(SUM((abs(PERIOD_DIFF(replace(DATE_FORMAT(s.PROVIDENT_START, "%m"), '-', ''),
replace(DATE_FORMAT(DATE(CURDATE()),"%m"), '-', ''))) + 1) *
S.UNIT_PROVIDENG_CARDINAL * 0.12)
) AS SUPPLEMENTART_AMOUNT_SUM
FROM t_dispatch_info a
left join t_provident_fund s on s.id = a.FUND_ID
<where>
<include refid="where_getFundDisRecord"/>
</where>
</select>
<select id="getFundPersionExportVoOne" resultMap="CompanyProVo">
SELECT
GROUP_CONCAT(DISTINCT F.COMPANY_PRO) AS COMPANY_PRO
FROM `sys_house_hold_info` A
LEFT JOIN sys_area B ON A.PROVINCE = B.ID
LEFT JOIN sys_area C ON A.CITY = C.ID
LEFT JOIN sys_area D ON A.TOWN = D.ID
LEFT JOIN sys_base_set_info E ON A.ID = E.DEPART_ID
LEFT JOIN sys_pay_proportion F ON E.ID = F.SYS_BASE_SET_ID
WHERE A.TYPE = '1' AND A.`NAME` IN (#{houseName})
GROUP BY A.`NAME`
</select>
<select id="getFundSumExportVoTwo" resultMap="HouseNameConfigVo">
SELECT
A.CUSTOMER_NO ,A.FUND_BANK ,
GROUP_CONCAT(DISTINCT F.COMPANY_PRO) AS COMPANY_PRO
FROM `sys_house_hold_info` A
LEFT JOIN sys_area B ON A.PROVINCE = B.ID
LEFT JOIN sys_area C ON A.CITY = C.ID
LEFT JOIN sys_area D ON A.TOWN = D.ID
LEFT JOIN sys_base_set_info E ON A.ID = E.DEPART_ID
LEFT JOIN sys_pay_proportion F ON E.ID = F.SYS_BASE_SET_ID
WHERE A.TYPE = '1' AND A.`NAME` IN (#{houseName})
GROUP BY A.`NAME`
</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