Commit 43337c90 authored by huyuchen's avatar huyuchen

Merge branch 'develop'

# Conflicts:
#	yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/MsgTask.java
parents d132d956 a884e6a6
......@@ -518,6 +518,7 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "减少原因")
private String reduceReason;
/**
* @Author fxj
* 查询数据起
......@@ -532,4 +533,5 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "查询limit 数据条数")
@TableField(exist = false)
private int limitEnd;
}
......@@ -521,6 +521,12 @@ public class TSettleDomain extends BaseEntity {
*/
@Schema(description = "BU归属")
private String buBelong;
@Schema(description = "一级指标归属", name = "firstIndicatorBelong")
private String firstIndicatorBelong ;
@Schema(description = "二级指标归属", name = "secondIndicatorBelong")
private String secondIndicatorBelong ;
/**
* 代发户状态(0否;1是代发户)
*/
......
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 {
@Schema(description = "终止原因")
@ExcelProperty("终止原因")
private String reduceReason;
/**
* 备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "备注")
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
}
......@@ -286,4 +286,9 @@ public class EmployeeContractExportVO implements Serializable {
private Set<String> exportFields;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "备注")
@Schema(description = "备注")
@ExcelProperty("备注")
private String memo;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2023-07-17 16:50:08
* @Description 二级指标归属Vo
* @Version 1.0
*/
@Data
public class SecondBelongVo implements Serializable {
private String departNo;
private String secondIndicatorBelong;
}
......@@ -441,4 +441,10 @@ public class TSettleDomainEkpVo implements Serializable {
*/
@Schema(description = "BU归属")
private String buBelong;
@Schema(description = "一级指标归属",name = "firstIndicatorBelong")
private String firstIndicatorBelong ;
@Schema(description = "二级指标归属",name = "secondIndicatorBelong")
private String secondIndicatorBelong ;
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService;
......@@ -75,6 +76,19 @@ public class TSettleDomainController {
return R.ok(tSettleDomainService.getPage(page, tSettleDomain));
}
/**
* 二级指标归属分页查询
*
* @param page 分页对象
* @param tSettleDomain 项目表
* @return
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/twoBlongPage")
public R<IPage<SecondBelongVo>> getTwoBlongPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.getTwoBlongPage(page, tSettleDomain));
}
/**
* 不分页查询
*
......@@ -397,4 +411,15 @@ public class TSettleDomainController {
List<TSettleDomainUpServerTeamVo> list= JSONObject.parseArray(jsonStr, TSettleDomainUpServerTeamVo.class);
return tSettleDomainService.updateProjectServerTeam(list);
}
/**
* 分页查询 客户信息
* @return
*/
@Operation(summary = "代发户切换按钮", description = "代发户切换按钮")
@PostMapping("/changeIssueStatus")
public R<Boolean> changeIssueStatus(@RequestBody ChangeIssueStatusVo changeIssueStatusVo) {
return tSettleDomainService.changeIssueStatus(changeIssueStatusVo);
}
}
......@@ -40,6 +40,8 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, @Param("tSettleDomain") TSettleDomain tSettleDomain);
IPage<SecondBelongVo> getTwoBlongPage(Page<TSettleDomain> page, @Param("tSettleDomain") TSettleDomain tSettleDomain);
List<TSettleDomain> getPage(@Param("tSettleDomain") TSettleDomain tSettleDomain);
/**
......@@ -106,4 +108,7 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
IPage<CustomerOwnerSelectVo> getCustomerOwnerPage(Page page,
@Param("customerName")String customerName,
@Param("userId")String userId);
void changeIssueStatus(@Param("changeIssueStatusVo")ChangeIssueStatusVo changeIssueStatusVo);
}
......@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.TEmpDisabilityInfo;
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.common.core.util.R;
......@@ -46,6 +47,16 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
**/
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain);
/**
* @param page
* @param tSettleDomain
* @Description: 分页列表
* @Author: hgw
* @Date: 2022/12/1 14:22
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain>
**/
IPage<SecondBelongVo> getTwoBlongPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain);
/**
* @param tSettleDomain
* @Description: 全部list
......@@ -124,4 +135,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
R<IPage<CustomerOwnerSelectVo>> getCustomerOwnerPage(Page<CustomerOwnerSelectVo> page, String customerName, String userId);
R<Boolean> updateProjectServerTeam(List<TSettleDomainUpServerTeamVo> list);
R<Boolean> changeIssueStatus(ChangeIssueStatusVo changeIssueStatusVo);
}
......@@ -24,9 +24,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
......@@ -218,7 +219,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(employeeProject)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_NEW_SEARCH_NOT_EXIST, excel.getNewSettleCode()));
errorMsg.add(MsgUtils.getMessage(ErrorCodes.CHECKS_CHANGE_EMP_PROJECT, excel.getNewSettleCode()));
}
// 数据合法情况
if (CollUtil.isEmpty(errorMsg)) {
......
......@@ -43,7 +43,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -74,6 +73,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return baseMapper.getPage(page, tSettleDomain);
}
@Override
public IPage<SecondBelongVo> getTwoBlongPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain) {
return baseMapper.getTwoBlongPage(page, tSettleDomain);
}
@Override
public List<TSettleDomain> getList(TSettleDomain tSettleDomain) {
return baseMapper.getPage(tSettleDomain);
......@@ -496,6 +500,12 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
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) {
if (Common.isNotNull(domain.getServiceTeam())){
R<SysUserListVo> res = upmsDaprUtils.getUserIdsByUserNames(domain.getServiceTeam());
......
......@@ -26,7 +26,7 @@ mybatis-plus:
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# spring security 配置
security:
......
......@@ -141,6 +141,7 @@
<result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/>
<result property="remark" column="REMARK"/>
<result property="memo" column="MEMO"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -203,7 +204,8 @@
a.TYPE,
a.LEAVE_DATE,
a.AUDIT_USER_NAME,
a.REDUCE_REASON,a.type
a.REDUCE_REASON,
a.type
</sql>
......@@ -510,6 +512,7 @@
WHEN a.type =4 THEN "派减-终止"
ELSE a.type END as "type",
b.REMARK,
a.REMARK as memo,
a.CREATE_TIME
FROM t_employee_contract_info a
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
......@@ -653,7 +656,7 @@
a.LEAVE_DATE,
a.CONTRACT_NO,
a.REDUCE_REASON,
b.REMARK
a.REMARK
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
......
......@@ -91,10 +91,17 @@
<result property="unitSeriousIllnessProp" column="UNIT_SERIOUS_ILLNESS_PROP"/>
<result property="bpoFlag" column="BPO_FLAG"/>
<result property="buBelong" column="BU_BELONG"/>
<result property="firstIndicatorBelong" column="FIRST_INDICATOR_BELONG"/>
<result property="secondIndicatorBelong" column="SECOND_INDICATOR_BELONG"/>
<result property="lineType" column="LINE_TYPE"/>
<result property="issueStatus" column="ISSUE_STATUS"/>
</resultMap>
<resultMap id="tSettleDomainTwoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.SecondBelongVo">
<result property="departNo" column="DEPART_NO"/>
<result property="secondIndicatorBelong" column="SECOND_INDICATOR_BELONG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DEPART_NO,
......@@ -168,8 +175,10 @@
a.UNIT_SERIOUS_ILLNESS_PROP,
a.BPO_FLAG,
a.BU_BELONG,
a.LINE_TYPE,
a.ISSUE_STATUS
a.ISSUE_STATUS,
a.FIRST_INDICATOR_BELONG,
a.SECOND_INDICATOR_BELONG,
a.LINE_TYPE
</sql>
<resultMap id="tSettleDomainSelectVoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
......@@ -229,7 +238,31 @@
<if test="tSettleDomain.buBelong != null and tSettleDomain.buBelong.trim() != ''">
and a.BU_BELONG = #{tSettleDomain.buBelong}
</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>
order by CREATE_TIME desc
</select>
<select id="getTwoBlongPage" resultMap="tSettleDomainTwoMap">
SELECT
a.DEPART_NO,
a.SECOND_INDICATOR_BELONG
FROM t_settle_domain a
WHERE a.DELETE_FLAG = '0' and a.SECOND_INDICATOR_BELONG is not null
<if test="tSettleDomain != null">
<if test="tSettleDomain.departNo != null and tSettleDomain.departNo.trim() != ''">
and a.DEPART_NO = #{tSettleDomain.departNo}
</if>
<if test="tSettleDomain.secondIndicatorBelong != null and tSettleDomain.secondIndicatorBelong.trim() != ''">
and a.SECOND_INDICATOR_BELONG like concat('%', #{tSettleDomain.secondIndicatorBelong} ,'%')
</if>
</if>
group by a.SECOND_INDICATOR_BELONG
order by CREATE_TIME desc
</select>
......@@ -471,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'
group by a.CUSTOMER_NO order by CREATE_TIME desc
</select>
<update id="changeIssueStatus">
update t_settle_domain a
set a.ISSUE_STATUS=#{changeIssueStatusVo.issueStatus}
WHERE a.ID=#{changeIssueStatusVo.id}
</update>
</mapper>
......@@ -163,4 +163,6 @@ public interface CacheConstants {
String EMP_ADD_LOCK ="emp_add_lock";
String FUND_IMPORT_HANDLE_LOCK = "fund_import_handle_handle_lock";
public static final String WX_ACCOSS_TOKEN = "WX_ACCOSS_TOKEN";
}
......@@ -124,4 +124,32 @@ public interface SecurityConstants {
*/
String CLIENT_ID = "clientId";
/**
* @Author: huyc
* @Date: 2023/7/28
* @Description: 企业微信获取access_token
* @return:
**/
String WX_GET_ACCOSS_TOKEN="https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s";
/**
* @Author: huyc
* @Date: 2023/7/28
* @Description: 企业微信发送消息
* @return:
**/
String WX_SEND_MESSAGE = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=%s";
/**
* @Author: huyc
* @Date: 2023/7/28
* @Description: 企业微信发送消息授权路径
* @return:
* 下面链接中的state参数是和前端进行交互区分的重要参数,如果新增,请不要和以前的前缀相同
* 1,2,3,4 前缀为合同审批待处理、抄送和垫付审批中的待处理、抄送。 5 前缀为突发事件待处理页面的标识
* 1=垫付审批待处理,2=垫付审批抄送,3=合同审批待处理,4=合同审批抄送,5=事件审批待处理
**/
String WX_GET_MESSAGE_AUTH_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect";
}
......@@ -603,4 +603,8 @@ public interface ErrorCodes {
* 派减异常: 单减公积金,是否同步终止合同、减项、减档不能为是
*/
String EMP_DISPATCH_FUND_NOT_EMPTY_SIGNLE = "emp.dispatch.fund.not.empty.signle";
/**
* 公积金未派减,请核实!
*/
String EMP_DISPATCH_SIGNLE_REDUCE = "emp.dispatch.signle.reduce";
}
......@@ -231,6 +231,8 @@ social.import.same.info=\u8BE5\u6570\u636E\u5DF2\u5904\u7406\uFF0C\u8BF7\u52FF\u
emp.dispatch.fund.not.empty.change=\u5355\u51CF\u793E\u4FDD\uFF0C\u5B58\u5728\u6B63\u5E38/\u5BA1\u6279\u4E2D\u7684\u516C\u79EF\u91D1\uFF0C\u7981\u6B62\u201C\u540C\u6B65\u7EC8\u6B62\u5408\u540C\u3001\u51CF\u9879\u3001\u51CF\u6863\u201D
emp.dispatch.fund.not.empty.signle=\u5355\u51CF\u516C\u79EF\u91D1\uFF0C\u662F\u5426\u540C\u6B65\u7EC8\u6B62\u5408\u540C\u3001\u51CF\u9879\u3001\u51CF\u6863\u4E0D\u80FD\u4E3A\u662F
emp.dispatch.signle.reduce=\u516C\u79EF\u91D1\u672A\u6D3E\u51CF\uFF0C\u8BF7\u6838\u5B9E\uFF01
......
......@@ -26,13 +26,13 @@ public class MsgTask {
/**
* @Author fxj
* @Description 每1分钟刷新 超时待办提醒
* @Description 每29分钟刷新 超时待办提醒
* @Date 20:01 2023/5/30
* @Param
* @return
**/
public void createOderOverTimeMsg() {
log.info("-------------每1分钟刷新 超时待办提醒-定时任务开始------------");
log.info("-------------每29分钟刷新 超时待办提醒-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprMsgProperties.getAppUrl(), daprMsgProperties.getAppId(),
"/msg/inner/updateOverTimeMsg", "", Object.class,
SecurityConstants.FROM_IN);
......@@ -47,11 +47,11 @@ public class MsgTask {
* @return
**/
public void statusChangeTimeMsg() {
log.info("-------------每29分钟刷新 薪资状态变更待支出提醒-定时任务开始------------");
log.info("-------------每1分钟刷新 薪资状态变更待支出提醒-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprMsgProperties.getAppUrl(), daprMsgProperties.getAppId(),
"/msg/inner/statusChangeTimeMsg", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每29分钟刷新 薪资状态变更待支出提醒定时任务结束------------");
log.info("-------------每1分钟刷新 薪资状态变更待支出提醒定时任务结束------------");
}
/**
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.msg.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@Data
@TableName("t_message_info")
@EqualsAndHashCode()
@Schema(description = "消息提醒")
public class TMessageInfo {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("ID")
@Schema(description = "ID")
private String id;
/**
* 提交人-表单制作人
*/
@ExcelAttribute(name = "提交人-表单制作人", maxLength = 10)
@Length(max = 10, message = "提交人-表单制作人不能超过10个字符")
@ExcelProperty("提交人-表单制作人")
@Schema(description = "提交人-表单制作人")
private String submitUser;
/**
* 0 待办 1 待阅
*/
@ExcelAttribute(name = "0 待办 1 待阅", maxLength = 1)
@Length(max = 1, message = "0 待办 1 待阅不能超过1个字符")
@ExcelProperty("0 待办 1 待阅")
@Schema(description = "0 待办 1 待阅")
private String alertType;
/**
* 0 已处理 1 未处理
*/
@ExcelAttribute(name = "0 已处理 1 未处理", maxLength = 1)
@Length(max = 1, message = "0 已处理 1 未处理不能超过1个字符")
@ExcelProperty("0 已处理 1 未处理")
@Schema(description = "0 已处理 1 未处理")
private String handlerStatus;
/**
* 处理人-当前提醒人
*/
@ExcelAttribute(name = "处理人-当前提醒人", maxLength = 10)
@Length(max = 10, message = "处理人-当前提醒人不能超过10个字符")
@ExcelProperty("处理人-当前提醒人")
@Schema(description = "处理人-当前提醒人")
private String alertUser;
/**
* 处理人-当前提醒人
*/
@Schema(description = "处理人-当前提醒人id")
private String alertUserId;
/**
* 是否通知企业微信用户 0 是 1 否
*/
@ExcelAttribute(name = "是否通知企业微信用户", maxLength = 1)
@ExcelProperty("是否通知企业微信用户")
@Schema(description = "是否通知企业微信用户 0 是 1 否")
private String wxFlag;
/**
* listUrl
*/
@ExcelAttribute(name = "listUrl", maxLength = 200)
@Length(max = 200, message = "listUrl不能超过200个字符")
@ExcelProperty("listUrl")
@Schema(description = "listUrl")
private String listUrl;
/**
* infoUrl
*/
@ExcelAttribute(name = "infoUrl", maxLength = 200)
@Length(max = 200, message = "infoUrl不能超过200个字符")
@ExcelProperty("infoUrl")
@Schema(description = "infoUrl")
private String infoUrl;
/**
* 模块
*/
@ExcelAttribute(name = "模块", maxLength = 20)
@Length(max = 20, message = "模块不能超过20个字符")
@ExcelProperty("模块")
@Schema(description = "模块")
private String modelType;
/**
* 关联id
*/
@ExcelAttribute(name = "关联id", maxLength = 32)
@Length(max = 32, message = "关联id不能超过32个字符")
@ExcelProperty("关联id")
@Schema(description = "关联id")
private String modelId;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@ExcelProperty("创建时间")
@Schema(description = "创建时间")
private Date createTime;
}
package com.yifu.cloud.plus.v1.msg.config;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AuthenticationServiceException;
import org.springframework.web.client.RestTemplate;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @Author: huyc
* @Date: 2023/7/28
* @Description:
* @return: 企业微信配置
**/
@Configuration
@Data
@Slf4j
public class WxConfig {
@Value("${wx.corpid}")
private String corpid;
@Value("${wx.corpsecret}")
private String corpsecret;
@Value("${wx.agentid}")
private String agentid;
@Value("${wx.authUrl}")
private String authUrl;
@Autowired
private RedisTemplate redisTemplate;
//未授权
private String accossTokenInvliad = "40014";
/**
* @param
* @Author: huyc
* @Date: 2023/7/28
* @Description: 获取微信accos_token
* @return: java.lang.String
**/
public String getAccessToken(RestTemplate restTemplate) {
if (Common.isNotNull(agentid)) {
return this.getToken(restTemplate, CacheConstants.WX_ACCOSS_TOKEN.concat(agentid), corpsecret);
}
return this.getToken(restTemplate, CacheConstants.WX_ACCOSS_TOKEN, corpsecret);
}
public String getAccessToken(RestTemplate restTemplate,String corpsecret)throws AuthenticationServiceException {
if(Common.isEmpty(corpsecret)){
throw new AuthenticationServiceException("未找到对应的corpsecret请联系管理员配置");
}
return this.getToken(restTemplate, CacheConstants.WX_ACCOSS_TOKEN.concat(agentid), corpsecret);
}
/**
* @param restTemplate
* @param tokenKey
* @param corpsecretKey
* @Description: 获取token
* @Author: huyc
* @Date: 2023/7/28 14:46
* @return: java.lang.String
**/
public String getToken(RestTemplate restTemplate,String tokenKey, String corpsecretKey) {
Object wxToken = redisTemplate.opsForValue().get(tokenKey);
if (null != wxToken) {
return String.valueOf(wxToken);
}
String requestTokenUrl = String.format(SecurityConstants.WX_GET_ACCOSS_TOKEN, corpid, corpsecretKey);
String result = restTemplate.getForObject(requestTokenUrl, String.class);
if (Common.isEmpty(result)) {
throw new CheckedException("微信授权失败");
}
String token = JSON.parseObject(result).getString("access_token");
if (Common.isEmpty(token)) {
log.info(result);
throw new CheckedException("获取微信token失败");
}
redisTemplate.opsForValue().set(tokenKey, token);
redisTemplate.expire(tokenKey, 3600, TimeUnit.SECONDS);
return token;
}
/**
* @param
* @Author: huyc
* @Date: 2023/7/28 14:43
* @Description: 移除微信accossToken
* @return: java.lang.String
**/
public void removeAccessToken() {
redisTemplate.delete(CacheConstants.WX_ACCOSS_TOKEN);
}
/**
* @param restTemplate
* @param requestMap 请求内容
* @Author: huyc
* @Date: 2023/7/28 14:48
* @Description: 发送卡片消息
* @return: java.lang.String
**/
public boolean sendTextCard(RestTemplate restTemplate, Map<String, Object> requestMap) {
// 必须加上header说明
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
Gson gson = new Gson();
log.info(gson.toJson(requestMap));
HttpEntity<String> requestEntity = new HttpEntity<>(gson.toJson(requestMap), headers);
String accessToken = getAccessToken(restTemplate);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(String.format(SecurityConstants.WX_SEND_MESSAGE, accessToken), requestEntity, String.class);
log.info(JSON.toJSONString(responseEntity));
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(responseEntity));
JSONObject jsonBody = jsonObject.getJSONObject("body");
if (jsonBody != null) {
String errcode = jsonBody.getString("errcode");
if (accossTokenInvliad.equals(errcode)) {
//删除accossToken缓存
removeAccessToken();
return false;
}
if (!CommonConstants.ZERO_STRING.equals(errcode)) { //非正常,则打印错误日志
log.info(jsonObject.toJSONString());
}
} else {
log.info(jsonObject.toJSONString());
}
return true;
}
/**
* @param restTemplate
* @param requestMap 请求内容
* @Author: huyc
* @Date: 2023/7/28 14:50
* @Description: 发送卡片消息
* @return: java.lang.String
**/
public boolean sendAppTextCard(RestTemplate restTemplate, Map<String, Object> requestMap) {
// 必须加上header说明
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
Gson gson = new Gson();
log.info("发企业微信===请求:{}", gson.toJson(requestMap));
HttpEntity<String> requestEntity = new HttpEntity<>(gson.toJson(requestMap), headers);
String accessToken = getAppAccessToken(restTemplate);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(String.format(SecurityConstants.WX_SEND_MESSAGE, accessToken), requestEntity, String.class);
log.info("发企业微信===返回:{}",JSON.toJSONString(responseEntity));
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(responseEntity));
JSONObject jsonBody = jsonObject.getJSONObject("body");
if (jsonBody != null) {
String errcode = jsonBody.getString("errcode");
if (accossTokenInvliad.equals(errcode)) {
//删除accossToken缓存
removeAccessToken();
return false;
}
if (!CommonConstants.ZERO_STRING.equals(errcode)) { //非正常,则打印错误日志
log.info(jsonObject.toJSONString());
}
} else {
log.info(jsonObject.toJSONString());
}
return true;
}
/**
* 功能描述: 获取微信accos_token
* @Author: huyc
* @Date: 2023/7/28 14:50
* @return: java.lang.String
*/
public String getAppAccessToken(RestTemplate restTemplate) {
return this.getToken(restTemplate, CacheConstants.WX_ACCOSS_TOKEN, corpsecret);
}
}
......@@ -14,5 +14,7 @@ public interface MesConstants {
/**
* 項目订单URL
**/
String orderUrl ="http://ekp.wanxinwork.com/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=";
//String orderUrl ="http://ekp.wanxinwork.com/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=";
String orderUrl ="http://36.7.147.19:28080/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=";
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.msg.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import com.yifu.cloud.plus.v1.msg.service.TMessageInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tmessageinfo" )
@Tag(name = "消息提醒管理")
public class TMessageInfoController {
private final TMessageInfoService tMessageInfoService;
/**
* 简单分页查询
* @param page 分页对象
* @param tMessageInfo 消息提醒
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TMessageInfo>> getTMessageInfoPage(Page<TMessageInfo> page, TMessageInfo tMessageInfo) {
return new R<>(tMessageInfoService.getTMessageInfoPage(page,tMessageInfo));
}
/**
* 通过id查询消息提醒
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
public R<TMessageInfo> getById(@PathVariable("id" ) String id) {
return R.ok(tMessageInfoService.getById(id));
}
/**
* 新增消息提醒
* @param tMessageInfo 消息提醒
* @return R
*/
@Operation(summary = "新增消息提醒", description = "新增消息提醒")
@SysLog("新增消息提醒" )
@PostMapping("/saveMessageInfo")
public R<Boolean> save(@RequestBody TMessageInfo tMessageInfo) {
return tMessageInfoService.saveMessage(tMessageInfo);
}
/**
* 修改消息提醒
* @param tMessageInfo 消息提醒
* @return R
*/
@Operation(summary = "修改消息提醒", description = "修改消息提醒")
@SysLog("修改消息提醒" )
@PutMapping
public R<Boolean> updateById(@RequestBody TMessageInfo tMessageInfo) {
return R.ok(tMessageInfoService.updateById(tMessageInfo));
}
/**
* @Author huyc
* @Description 更新消息信息
* @Date 14:30 2023/7/26
* @Param
* @return
**/
@Operation(summary = "更新消息信息", description = "更新消息信息")
@Inner
@PostMapping("/inner/updateInnerMessageInfo")
public void updateInnerMessageInfo(@RequestBody TMessageInfo tMessageInfo) {
tMessageInfoService.updateMessageInfo(tMessageInfo);
}
/**
* @Author huyc
* @Description 更新消息信息
* @Date 14:30 2023/7/26
* @Param
* @return
**/
@Operation(summary = "更新消息信息", description = "更新消息信息")
@PostMapping("/updateMessageInfo")
public void updateMessageInfo(@RequestBody TMessageInfo tMessageInfo) {
tMessageInfoService.updateMessageInfo(tMessageInfo);
}
/**
* @Author huyc
* @Description 查询消息数量
* @Date 14:30 2023/7/26
* @Param
* @return
**/
@Operation(summary = "查询消息数量", description = "查询消息数量")
@PostMapping("/selectMessageCount")
public R<Long> selectMessageCount(@RequestBody TMessageInfo tMessageInfo) {
return tMessageInfoService.selectMessageCount(tMessageInfo);
}
/**
* 通过id删除消息提醒
* @param id id
* @return R
*/
@Operation(summary = "通过id删除消息提醒", description = "通过id删除消息提醒")
@SysLog("通过id删除消息提醒" )
@DeleteMapping("/{id}" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tMessageInfoService.removeById(id));
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.msg.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@Mapper
public interface TMessageInfoMapper extends BaseMapper<TMessageInfo> {
/**
* 消息提醒简单分页查询
* @param tMessageInfo 消息提醒
* @return
*/
IPage<TMessageInfo> getTMessageInfoPage(Page<TMessageInfo> page, @Param("tMessageInfo") TMessageInfo tMessageInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.msg.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
public interface TMessageInfoService extends IService<TMessageInfo> {
/**
* 消息提醒简单分页查询
* @param tMessageInfo 消息提醒
* @return
*/
IPage<TMessageInfo> getTMessageInfoPage(Page<TMessageInfo> page, TMessageInfo tMessageInfo);
R<Boolean> saveMessage(TMessageInfo tMessageInfo);
void updateMessageInfo(TMessageInfo tMessageInfo);
R<Long> selectMessageCount(TMessageInfo tMessageInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.msg.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.msg.config.WxConfig;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import com.yifu.cloud.plus.v1.msg.mapper.TMessageInfoMapper;
import com.yifu.cloud.plus.v1.msg.service.TMessageInfoService;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.HashMap;
import java.util.Map;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@Log4j2
@Service
@AllArgsConstructor
public class TMessageInfoServiceImpl extends ServiceImpl<TMessageInfoMapper, TMessageInfo> implements TMessageInfoService {
@Autowired
private final UpmsDaprUtils upmsDaprUtils;
@Autowired
private WxConfig wxConfig;
/**
* 消息提醒简单分页查询
* @param tMessageInfo 消息提醒
* @return
*/
@Override
public IPage<TMessageInfo> getTMessageInfoPage(Page<TMessageInfo> page, TMessageInfo tMessageInfo){
return baseMapper.getTMessageInfoPage(page,tMessageInfo);
}
@Override
public R<Boolean> saveMessage(TMessageInfo tMessageInfo) {
//企业微信通知
if (CommonConstants.ZERO_STRING.equals(tMessageInfo.getWxFlag())) {
//获取人员的账号
R<SysUser> simpleUser = upmsDaprUtils.getSimpleUser(tMessageInfo.getAlertUserId());
if(null != simpleUser && null != simpleUser.getData()) {
SysUser user = simpleUser.getData();
if (Common.isEmpty(user) || Common.isEmpty(user.getWxMessage())) {
return R.failed("未找到对应的人员信息");
} else {
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> textcard = new HashMap<>();
Map<String, Object> requestMap = new HashMap<>();
String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getAuthUrl(), CommonConstants.ONE_STRING + tMessageInfo.getModelId());
textcard.put("title", "审批待处理");
textcard.put("url", authUrl);
StringBuilder description = new StringBuilder();
description.append("申请人:").append(tMessageInfo.getSubmitUser()).append("<br>");
description.append("待处理人:").append(tMessageInfo.getAlertUser()).append("<br>");
description.append("模块:").append(tMessageInfo.getModelType());
textcard.put("description", description.toString());
requestMap.put("touser", user.getWxMessage());
requestMap.put("agentid", wxConfig.getAgentid());
requestMap.put("msgtype", "textcard");
requestMap.put("textcard", textcard);
// 必须加上header说明
if (!wxConfig.sendTextCard(restTemplate, requestMap)) {
wxConfig.sendTextCard(restTemplate, requestMap);
}
}
}
}
baseMapper.insert(tMessageInfo);
return R.ok();
}
@Override
public void updateMessageInfo(TMessageInfo tMessageInfo) {
if (Common.isNotNull(tMessageInfo) && Common.isNotNull(tMessageInfo.getAlertUser())) {
TMessageInfo tMessageInfo1 = null;
if (Common.isNotNull(tMessageInfo.getModelId())) {
tMessageInfo1 = baseMapper.selectOne(Wrappers.<TMessageInfo>query().lambda()
.eq(TMessageInfo::getAlertUser, tMessageInfo.getAlertUser())
.eq(TMessageInfo::getModelId, tMessageInfo.getModelId())
.orderByDesc(TMessageInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
} else if (Common.isNotNull(tMessageInfo.getInfoUrl())){
tMessageInfo1 = baseMapper.selectOne(Wrappers.<TMessageInfo>query().lambda()
.eq(TMessageInfo::getAlertUser, tMessageInfo.getAlertUser())
.eq(TMessageInfo::getInfoUrl, tMessageInfo.getInfoUrl())
.orderByDesc(TMessageInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(tMessageInfo1)) {
tMessageInfo1.setHandlerStatus(tMessageInfo.getHandlerStatus());
}
}
}
@Override
public R<Long> selectMessageCount(TMessageInfo tMessageInfo) {
YifuUser user = SecurityUtils.getUser();
return R.ok(baseMapper.selectCount(Wrappers.<TMessageInfo>query().lambda()
.eq(TMessageInfo::getAlertUserId,user.getId())
.eq(TMessageInfo::getHandlerStatus,CommonConstants.ONE_STRING)));
}
}
......@@ -63,4 +63,10 @@ springdoc:
#分组名
- group: mail
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.msg.controller
\ No newline at end of file
packagesToScan: com.yifu.cloud.plus.v1.msg.controller
wx:
corpid: ww59249a765dd499ad
corpsecret: o3fLn0u9SFHh5_htpIRBSp2bOibTa8pZGcOJIJqvidQ
agentid: 1000003
authUrl: https://wx.worfu.com/auth/oauth/wxLogin
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.msg.mapper.TMessageInfoMapper">
<resultMap id="tMessageInfoMap" type="com.yifu.cloud.plus.v1.msg.entity.TMessageInfo">
<id property="id" column="ID"/>
<result property="submitUser" column="SUBMIT_USER"/>
<result property="alertType" column="ALERT_TYPE"/>
<result property="handlerStatus" column="HANDLER_STATUS"/>
<result property="alertUser" column="ALERT_USER"/>
<result property="alertUserId" column="ALERT_USER_ID"/>
<result property="wxFlag" column="WX_FLAG"/>
<result property="listUrl" column="LIST_URL"/>
<result property="infoUrl" column="INFO_URL"/>
<result property="modelType" column="MODEL_TYPE"/>
<result property="modelId" column="MODEL_ID"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.SUBMIT_USER,
a.ALERT_TYPE,
a.HANDLER_STATUS,
a.ALERT_USER,
a.LIST_URL,
a.INFO_URL,
a.MODEL_TYPE,
a.MODEL_ID,
a.ALERT_USER_ID,
a.CREATE_TIME
</sql>
<sql id="tMessageInfo_where">
<if test="tMessageInfo != null">
<if test="tMessageInfo.submitUser != null and tMessageInfo.submitUser.trim() != ''">
AND a.SUBMIT_USER = #{tMessageInfo.submitUser}
</if>
<if test="tMessageInfo.alertType != null and tMessageInfo.alertType.trim() != ''">
AND a.ALERT_TYPE = #{tMessageInfo.alertType}
</if>
<if test="tMessageInfo.handlerStatus != null and tMessageInfo.handlerStatus.trim() != ''">
AND a.HANDLER_STATUS = #{tMessageInfo.handlerStatus}
</if>
<if test="tMessageInfo.alertUser != null and tMessageInfo.alertUser.trim() != ''">
AND a.ALERT_USER = #{tMessageInfo.alertUser}
</if>
<if test="tMessageInfo.alertUserId != null and tMessageInfo.alertUserId.trim() != ''">
AND a.ALERT_USER_ID = #{tMessageInfo.alertUserId}
</if>
<if test="tMessageInfo.infoUrl != null and tMessageInfo.infoUrl.trim() != ''">
AND a.INFO_URL = #{tMessageInfo.infoUrl}
</if>
<if test="tMessageInfo.listUrl != null and tMessageInfo.listUrl.trim() != ''">
AND a.LIST_URL = #{tMessageInfo.listUrl}
</if>
<if test="tMessageInfo.modelType != null and tMessageInfo.modelType.trim() != ''">
AND a.MODEL_TYPE = #{tMessageInfo.modelType}
</if>
</if>
</sql>
<!--tMessageInfo简单分页查询-->
<select id="getTMessageInfoPage" resultMap="tMessageInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_message_info a
<where>
1=1
<include refid="tMessageInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -361,5 +361,13 @@ public class TSalaryAccountVo implements Serializable {
@ExcelProperty("是否新员工(默认否)")
private String isNewEmployee;
/**
* 通讯补贴(不计税)
*/
@ExcelAttribute(name = "通讯补贴(不计税)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通讯补贴(不计税)")
private BigDecimal phoneSubsidy;
private List<TSalaryAccountItemVo> saiList = new ArrayList<>(); //工资组成部分明细
}
......@@ -97,6 +97,12 @@ public class TSalaryStandardExportVo implements Serializable {
@ExcelProperty("表单类型")
private String formType;
@ExcelAttribute(name = "代发户状态(0正常;1代发户)" )
@ExcelProperty("代发户状态")
@Schema(description ="代发户状态(0正常;1代发户)")
private String issueStatus;
/**
* 创建时间
*/
......
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
......@@ -38,6 +39,7 @@ import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.json.Json;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
......
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
......@@ -50,5 +51,7 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> {
TSalaryEmployee getByEmpIdCard(@Param("empIdCard") String empIdCard);
TSalaryAccountItem selectByIdCard(@Param("empIdCard") String empIdCard, @Param("nowMonth") String nowMonth);
List<TSalaryEmpRosterVo> getSalaryEmpRoster(@Param("idCards") List<String> idCardList);
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
......@@ -50,6 +51,8 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
List<TSalaryEmployeeExportVo> noPageDiy(TSalaryEmployeeSearchVo searchVo);
TSalaryAccountItem selectByIdcard(String idCard,String nowMonth);
/**
* @param notLabour 是:非劳务费人员。 否:劳务费,不保存
* @param employee
......
......@@ -43,6 +43,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TBankSetService;
......@@ -164,6 +165,11 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return baseMapper.noPageDiy(searchVo,Common.getList(searchVo.getIds()));
}
@Override
public TSalaryAccountItem selectByIdcard(String idCard,String nowMonth) {
return baseMapper.selectByIdCard(idCard,nowMonth);
}
private Long noPageCountDiy(TSalaryEmployeeSearchVo searchVo) {
LambdaQueryWrapper<TSalaryEmployee> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
......
......@@ -11,6 +11,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
......@@ -21,6 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo;
import lombok.Data;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import java.io.Serializable;
import java.lang.reflect.Field;
......@@ -119,6 +121,7 @@ public class SalaryAccountUtil implements Serializable {
String empName;
String salaryStyle;//工资发放方式(0现金/1银行)/2线下
BigDecimal relaySalary; //应发工资
BigDecimal phoneSubsidy;
BigDecimal relaySalarySum; //应发工资合计,算3500与5000使用的
BigDecimal money3500 = new BigDecimal("3500"); //特殊金额3500
BigDecimal money5000 = new BigDecimal("5000"); //特殊金额5000
......@@ -154,6 +157,7 @@ public class SalaryAccountUtil implements Serializable {
saiList = new ArrayList<>();
salaryStyle = SalaryConstants.SALARY_STYLE_BANK;
relaySalary = null;
phoneSubsidy =null;
actualSalarySum = null;
entity.setSettlementMonth(nowMonth);
for (Map.Entry<String, TSalaryConfigStandard> entry : salaryConfigMap.entrySet()) {
......@@ -174,6 +178,16 @@ public class SalaryAccountUtil implements Serializable {
if (SalaryConstants.ANNUAL_BONUS_JAVA.equals(scs.getJavaFiedName()) && Common.isNotNull(cellValueStr)) {
annualBonusFlag = true;
}
if (SalaryConstants.PHONE_SUBSIDY_JAVA.equals(scs.getJavaFiedName())) {
BigDecimal bigDecimal1 = NumberUtils.createBigDecimal(cellValueStr);
if(bigDecimal1.compareTo(BigDecimal.valueOf(300)) == 1) {
errorFlag = false;
error = "第" + (i + 2) + "行:本次发放"+cellValueStr+"元,超出300元的限制,禁止导入";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (SalaryConstants.ANNUAL_BONUS_TAX_TYPE.equals(scs.getJavaFiedName())) {
if (SalaryConstants.ANNUAL_BONUS_ALONE.equals(cellValueStr)) {
entity.setAnnualBonusType(SalaryConstants.ANNUAL_BONUS_TAX_TYPE_VALUE[1]);
......@@ -198,6 +212,22 @@ public class SalaryAccountUtil implements Serializable {
continue;
}
}
if (SalaryConstants.PHONE_SUBSIDY_JAVA.equals(scs.getJavaFiedName())) {
try {
phoneSubsidy = new BigDecimal(cellValueStr.replace(",", ""));
sai = new TSalaryAccountItemVo();
sai.setCnName(dbFiedName);
sai.setJavaFiedName(scs.getJavaFiedName());
sai.setIsTax(CommonConstants.ONE_INT);
sai.setSalaryMoney(phoneSubsidy);
saiList.add(sai);
} catch (Exception e) {
errorFlag = false;
error = "第" + (i + 2) + "行:通讯补贴:'" + cellValueStr + "'错误,请检查数据";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(scs.getJavaFiedName())) {
try {
actualSalarySum = new BigDecimal(cellValueStr.replace(",", ""));
......@@ -230,6 +260,7 @@ public class SalaryAccountUtil implements Serializable {
}
newEmp.setEmpName(empName);
}
if ((SalaryConstants.IF_NEW_EMPLOYEE.equals(dbFiedName) || SalaryConstants.IS_NEW_EMPLOYEE.equals(dbFiedName))
&& SalaryConstants.IS_NEW.equals(cellValueStr)) {
isNewEmployee = true;
......@@ -250,10 +281,13 @@ public class SalaryAccountUtil implements Serializable {
emp = empIdCardMap.get(cellValueStr);
newEmp.setEmpIdcard(cellValueStr);
}
if (SalaryConstants.SALARY_GIVE_TIME.equals(cellValueStr)) {
salaryGiveTimeFlag = false;
entity.setSalaryGiveTime(CommonConstants.ONE_STRING);
}
field = fieldsMap.get(scs.getJavaFiedName());
if (field == null) {
sai = new TSalaryAccountItemVo();
......@@ -299,13 +333,9 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), "请注意:工资发放时间,只能是【立即发】或【暂停发】!你的内容:【"+cellValueStr+"】"));
continue;
}
if (SalaryConstants.SALARY_STYLE.equals(scs.getJavaFiedName())
&& !SalaryConstants.SALARY_STYLE_YIN.equals(cellValueStr)
&& !SalaryConstants.SALARY_STYLE_XIAN.equals(cellValueStr)) {
errorFlag = false;
errorList.add(new ErrorMessage((i + 2), "请注意:发放方式,只能是【银行】或【现金】!你的内容:【"+cellValueStr+"】"));
continue;
}
if (SalaryConstants.IS_PERSON_TAX.equals(scs.getJavaFiedName())
&& !SalaryConstants.IS_COMPANY.equals(cellValueStr)
&& !SalaryConstants.IS_PERSON_OTHER.equals(cellValueStr)
......@@ -341,7 +371,17 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
TSalaryAccountItem item=tSalaryEmployeeService.selectByIdcard(newEmp.getEmpIdcard(),nowMonth);
if(Common.isNotNull(item)) {
BigDecimal LL = item.getSalaryMoney().add(phoneSubsidy);
if (LL.compareTo(BigDecimal.valueOf(300)) == 1) {
BigDecimal HH = LL.subtract(phoneSubsidy);
error = "第" + (i + 2) + "行:当月已发" + HH + "元,本次发放" + phoneSubsidy + "元,累计超出300元限制,禁止发放!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (annualBonusFlag && Common.isEmpty(entity.getAnnualBonusType())) {
error = "第" + (i + 2) + "行:年终奖有值,【年终奖扣税方式】需填写【单独】/【合并】";
errorList.add(new ErrorMessage((i + 2), error));
......@@ -369,7 +409,6 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
// 版本2.6.6判重:对同一“项目”、同一“结算月份”、同一“报表类型”、同一“工资月份”、同一“身份证号”、同一“应发金额”进行校验
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
entity.setIsRepeat(CommonConstants.ZERO_INT);
......@@ -450,6 +489,10 @@ public class SalaryAccountUtil implements Serializable {
entity.setIsDeductFund("0");
}
}
//通讯补贴导入限制
//验证扣社保以及扣公积金时的关联关系
if (CommonConstants.dingleDigitStrArray[1].equals(entity.getIsDeductSocial()) && Common.isEmpty(entity.getDeduSocialMonth())) {
error = "第" + (i + 2) + "行:扣社保无社保扣缴月份";
......@@ -482,6 +525,7 @@ public class SalaryAccountUtil implements Serializable {
List<TSalaryEmployee> saveNewEmpList = new ArrayList<>();
List<String> checkTaxMonthList = new ArrayList<>();
boolean isContinue = true;
if (!newEmpList.isEmpty()) {
TSalaryEmployee newEmps;
for (int i = 0; i < newEmpList.size(); i++) {
......
......@@ -198,6 +198,6 @@ public class SalaryConstants {
public static final String SALARY_STYLE = "salaryStyle";
public static final String SALARY_STYLE_YIN = "银行";
public static final String SALARY_STYLE_XIAN = "现金";
public static final String SALARY_PHONES = "通讯补贴(不计税)";
public static final String IS_PERSON_TAX = "isPersonTax";
}
......@@ -8,7 +8,6 @@ spring:
redis:
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
......
......@@ -31,17 +31,18 @@
<!--tSalaryAccountItem简单分页查询-->
<select id="getTSalaryAccountItemPage" resultMap="tSalaryAccountItemMap">
SELECT
ID,
SALARY_ACCOUNT_ID,
CN_NAME,
JAVA_FIED_NAME,
SALARY_MONEY,
TEXT_VALUE,
IS_TAX
FROM
SELECT
ID,
SALARY_ACCOUNT_ID,
CN_NAME,
JAVA_FIED_NAME,
SUM(SALARY_MONEY)SALARY_MONEY,
TEXT_VALUE,
IS_TAX
FROM
<if test="tSalaryAccountItem.salaryMonth == null or tSalaryAccountItem.salaryMonth.trim() >= '202201'">
t_salary_account_item a
</if>
<if test="tSalaryAccountItem.salaryMonth != null and tSalaryAccountItem.salaryMonth.trim() &lt; '202201' ">
t_salary_account_item_hro_2021 a
......@@ -63,6 +64,7 @@
AND SALARY_MONEY = #{tSalaryAccountItem.salaryMoney}
</if>
</where>
GROUP BY CN_NAME
</select>
<select id="getAllTSalaryAccountItem" resultMap="tSalaryAccountItemMap">
......
......@@ -264,6 +264,25 @@
where a.EMP_IDCARD = #{empIdCard}
ORDER BY a.BANK_CITY DESC LIMIT 1
</select>
<select id="selectByIdCard" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem">
SELECT
a.ID,
a.SALARY_ACCOUNT_ID,
a.CN_NAME,
a.JAVA_FIED_NAME,
SUM(a.SALARY_MONEY)SALARY_MONEY,
a.IS_TAX,
a.TEXT_VALUE,
b.EMP_IDCARD,
b.SALARY_MONTH,
b.DELETE_FLAG
FROM `t_salary_account_item` a LEFT JOIN t_salary_account b on a.SALARY_ACCOUNT_ID =b.ID
WHERE a.JAVA_FIED_NAME ='phoneSubsidy'
and b.EMP_IDCARD= #{empIdCard}
and b.SETTLEMENT_MONTH=#{nowMonth}
and b.DELETE_FLAG='0'
</select>
<!-- 人员花名册薪资信息 -->
<select id="getSalaryEmpRoster" resultMap="salaryEmpRosterMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo">
select a.EMP_IDCARD,BANK_NO,BANK_NAME,BANK_SUB_NAME,a.BANK_PROVINCE,a.BANK_CITY from t_salary_employee a
......
......@@ -34,6 +34,8 @@ public class DispatchConstants {
public static final String DISPATCH_SOCIAL_REDUCE = "社保派减";
public static final String SOCIAL_RECORD_ROSTER_EXPORT = "社保花名册导出";
public static final String SOCIAL_RECORD_EXPORT = "公积金变更清册导出";
public static final String SOCIAL_MEDICAL_EXPORT = "社保-医疗";
public static final String SOCIAL_PERSION_EXPORT = "社保-养老三险";
public static final String DISPATCH_PENSION = "养老、";
public static final String DISPATCH_MEDICAL = "医疗、";
public static final String DISPATCH_BIRTH = "生育、";
......@@ -45,6 +47,8 @@ public class DispatchConstants {
public static final String DISPATCH_FUND_REDUCE_FAIL = "公积金派减办理失败:";
public static final String DISPATCH_SYN_DOC_EXE ="同步人员档案、项目档案的社保公积金状态失败!";
public static final String DISPATCH_EXCEPTION = "派单办理异常:";
public static final String FUND_RECORD_EXPORT = "公积金变更清册导出";
public static final String FUND_SUPPLEMENTARY_EXPORT = "公积金补缴清册";
/**
......
......@@ -167,6 +167,42 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("办理人")
private String handleUserName;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute(name = "类型" )
@Schema(description ="类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("类型")
private String houseType;
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号" )
@Schema(description ="单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
private String customerNo;
/**
* 单位统一信用代码
*/
@ExcelAttribute(name = "单位统一信用代码" )
@Schema(description ="单位统一信用代码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位统一信用代码")
private String unitCreditCode;
/**
* 公积金承办银行
*/
@ExcelAttribute(name = "公积金承办银行" )
@Schema(description ="公积金承办银行")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金承办银行")
private String fundBank;
/**
* 审核人部门
*/
......
......@@ -19,9 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
......@@ -654,6 +652,15 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty("支出信息付款状态")
private String payCollectFlag;
/**
* 二级指标归属
*/
@ExcelAttribute(name = "二级指标归属", maxLength = 50)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("二级指标归属")
@Schema(description = "二级指标归属")
private String secondIndicatorBelong ;
/**
* EKP的 是否BPO: 是 否
*/
......
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 String companyPro;
}
......@@ -9,6 +9,7 @@ import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;
/**
* @Author fxj
......@@ -91,4 +92,31 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@Schema(description = "mid" )
@ExcelIgnore
private String mId;
/**
* 单位编号
*/
@TableField(exist = false)
@Schema(description ="单位编号")
@ExcelIgnore
private String customerNo;
/**
* 单位统一信用代码
*/
@TableField(exist = false)
@Schema(description ="单位统一信用代码")
@ExcelIgnore
private String unitCreditCode;
/**
* 派单增/减月份
*/
@TableField(exist = false)
@Schema(description ="派单增/减月份")
@ExcelIgnore
private String disMonth;
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
}
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;
private String number;
}
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;
}
......@@ -95,7 +95,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因",isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@ExcelAttribute(name = "减少原因", isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("减少原因" )
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
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.io.Serializable;
import java.math.BigDecimal;
/**
*
*
* @author huyc
* @date 2023-07-18 11:38:05
*/
@Data
public class TDispatchSocialExportVo implements Serializable {
/**
* 序号
*/
@Schema(description = "序号" )
@ExcelAttribute(name = "序号" )
@ExcelProperty("序号")
private Integer num;
/**
* 员工姓名
*/
@Schema(description = "姓名" )
@ExcelAttribute(name = "姓名" )
@ExcelProperty("姓名")
private String empName;
/**
* 身份证件类型
*/
@Schema(description = "身份证件类型" )
@ExcelAttribute(name = "身份证件类型" )
@ExcelProperty("身份证件类型")
private String idcardType;
/**
* 身份证号
*/
@Schema(description = "身份证件号码" )
@ExcelAttribute(name = "身份证件号码" )
@ExcelProperty("身份证件号码")
private String empIdcard;
/**
* 员工类型
*/
@Schema(description = "参保/停保时间" )
@ExcelAttribute(name = "参保/停保时间" )
@ExcelProperty("参保/停保时间")
private String disMonth;
/**
* 申报工资(元)
*/
@Schema(description = "申报工资(元)" )
@ExcelAttribute(name = "申报工资(元)" )
@ExcelProperty("申报工资(元)")
private BigDecimal medicalCardinal;
/**
* 新增
*/
@Schema(description = "新增" )
@ExcelAttribute(name = "新增" )
@ExcelProperty("新增")
private String changeTypeOne;
/**
* 续保
*/
@Schema(description = "续保" )
@ExcelAttribute(name = "续保" )
@ExcelProperty("续保")
private String changeTypeTwo;
/**
* 中断
*/
@Schema(description = "中断" )
@ExcelAttribute(name = "中断" )
@ExcelProperty("中断")
private String changeTypeThree;
/**
* 终止
*/
@Schema(description = "终止" )
@ExcelAttribute(name = "终止" )
@ExcelProperty("终止")
private String changeTypeFour;
/**
* 手机号码
*/
@Schema(description = "手机号码" )
@ExcelAttribute(name = "手机号码" )
@ExcelProperty("手机号码")
private String empMobile;
/**
* 学历
*/
@Schema(description = "学历")
@ExcelAttribute(name = "学历" )
@ExcelProperty("学历")
private String educationName;
/**
* 备注
*/
@Schema(description = "备注")
@ExcelAttribute(name = "备注" )
@ExcelProperty("备注")
private String remark;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
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.io.Serializable;
import java.math.BigDecimal;
/**
*
*
* @author huyc
* @date 2023-07-18 11:38:05
*/
@Data
public class TDispatchSocialPersionExportVo implements Serializable {
/**
* 序号
*/
@Schema(description = "序号" )
@ExcelAttribute(name = "序号" )
@ExcelProperty("序号")
private Integer num;
/**
* 员工姓名
*/
@Schema(description = "姓名" )
@ExcelAttribute(name = "姓名" )
@ExcelProperty("姓名")
private String empName;
/**
* 职工编码
*/
@Schema(description = "职工编码" )
@ExcelAttribute(name = "职工编码" )
@ExcelProperty("职工编码")
private String empNo;
/**
* 社会保障号码
*/
@Schema(description = "社会保障号码(身份证号码)" )
@ExcelAttribute(name = "社会保障号码(身份证号码)" )
@ExcelProperty("社会保障号码(身份证号码)")
private String empIdcard;
/**
* 性别:1男 2女
*/
@ExcelAttribute(name = "性别" )
@ExcelProperty("性别")
@Schema(description ="性别")
private String sex;
/**
* 民族
*/
@Schema(description = "民族")
@ExcelAttribute(name = "民族")
@ExcelProperty("民族")
private String empNational;
/**
* 参加工作时间
*/
@Schema(description = "参加工作时间" )
@ExcelAttribute(name = "参加工作时间" )
@ExcelProperty("参加工作时间")
private String workDate;
/**
* 户口性质
*/
@Schema(description = "户口性质" )
@ExcelAttribute(name = "户口性质" )
@ExcelProperty("户口性质")
private String type;
/**
* 个人身份
*/
@Schema(description = "个人身份" )
@ExcelAttribute(name = "个人身份" )
@ExcelProperty("个人身份")
private String signleType;
/**
* 养老
*/
@Schema(description = "养老" )
@ExcelAttribute(name = "养老" )
@ExcelProperty("养老")
private String insuranceTypeOne;
/**
* 失业
*/
@Schema(description = "失业" )
@ExcelAttribute(name = "失业" )
@ExcelProperty("失业")
private String insuranceTypeTwo;
/**
* 医疗
*/
@Schema(description = "医疗" )
@ExcelAttribute(name = "医疗" )
@ExcelProperty("医疗")
private String insuranceTypeThree;
/**
* 工伤
*/
@Schema(description = "工伤" )
@ExcelAttribute(name = "工伤" )
@ExcelProperty("工伤")
private String insuranceTypeFour;
/**
* 生育
*/
@Schema(description = "生育" )
@ExcelAttribute(name = "生育" )
@ExcelProperty("生育")
private String insuranceTypeFive;
/**
* 月工资收入(元)
*/
@Schema(description = "月工资收入(元)" )
@ExcelAttribute(name = "月工资收入(元)" )
@ExcelProperty("月工资收入(元)")
private BigDecimal persionCardinal;
/**
* 补缴保险属期
*/
@Schema(description = "补缴保险属期" )
@ExcelAttribute(name = "补缴保险属期" )
@ExcelProperty("补缴保险属期")
private String dateOne;
/**
* 户籍所在地
*/
@Schema(description = "户籍所在地")
@ExcelAttribute(name = "户籍所在地" )
@ExcelProperty("户籍所在地")
private String contactAddress;
/**
* 学历
*/
@Schema(description = "备注")
@ExcelAttribute(name = "备注" )
@ExcelProperty("备注")
private String remark;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
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.io.Serializable;
/**
*
*
* @author huyc
* @date 2023-07-18 11:38:05
*/
@Data
public class TDispatchSocialPersionReduceExportVo implements Serializable {
/**
* 序号
*/
@Schema(description = "序号" )
@ExcelAttribute(name = "序号" )
@ExcelProperty("序号")
private Integer num;
/**
* 职工编码
*/
@Schema(description = "职工编码" )
@ExcelAttribute(name = "职工编码" )
@ExcelProperty("职工编码")
private String empNo;
/**
* 员工姓名
*/
@Schema(description = "姓名" )
@ExcelAttribute(name = "姓名" )
@ExcelProperty("姓名")
private String empName;
/**
* 社会保障号码
*/
@Schema(description = "社会保障号码(身份证号码)" )
@ExcelAttribute(name = "社会保障号码(身份证号码)" )
@ExcelProperty("社会保障号码(身份证号码)")
private String empIdcard;
/**
* 停止缴费时间
*/
@Schema(description = "停止缴费时间" )
@ExcelAttribute(name = "停止缴费时间" )
@ExcelProperty("停止缴费时间")
private String workDate;
/**
* 辞职
*/
@Schema(description = "辞职" )
@ExcelAttribute(name = "辞职" )
@ExcelProperty("辞职")
private String typeA;
/**
* 辞退
*/
@Schema(description = "辞退" )
@ExcelAttribute(name = "辞退" )
@ExcelProperty("辞退")
private String typeB;
/**
* 参军
*/
@Schema(description = "参军" )
@ExcelAttribute(name = "参军" )
@ExcelProperty("参军")
private String typeC;
/**
* 辞退
*/
@Schema(description = "上学" )
@ExcelAttribute(name = "上学" )
@ExcelProperty("上学")
private String typeD;
/**
* 辞退
*/
@Schema(description = "劳改" )
@ExcelAttribute(name = "劳改" )
@ExcelProperty("劳改")
private String typeE;
/**
* 劳教
*/
@Schema(description = "劳教" )
@ExcelAttribute(name = "劳教" )
@ExcelProperty("劳教")
private String typeW;
/**
* 劳教
*/
@Schema(description = "除名" )
@ExcelAttribute(name = "除名" )
@ExcelProperty("除名")
private String typeF;
/**
* 人员失踪
*/
@Schema(description = "人员失踪" )
@ExcelAttribute(name = "人员失踪" )
@ExcelProperty("人员失踪")
private String typeG;
/**
* 停薪留职
*/
@Schema(description = "停薪留职" )
@ExcelAttribute(name = "停薪留职" )
@ExcelProperty("停薪留职")
private String typeH;
/**
* 合同期满
*/
@Schema(description = "合同期满" )
@ExcelAttribute(name = "合同期满" )
@ExcelProperty("合同期满")
private String typeZ;
/**
* 解除合同
*/
@Schema(description = "解除合同" )
@ExcelAttribute(name = "解除合同" )
@ExcelProperty("解除合同")
private String typeI;
/**
* 统筹内调出
*/
@Schema(description = "统筹内调出" )
@ExcelAttribute(name = "统筹内调出" )
@ExcelProperty("统筹内调出")
private String typeJ;
/**
* 调出统筹范围
*/
@Schema(description = "调出统筹范围" )
@ExcelAttribute(name = "调出统筹范围" )
@ExcelProperty("调出统筹范围")
private String typeK;
/**
* 退休
*/
@Schema(description = "退休" )
@ExcelAttribute(name = "退休" )
@ExcelProperty("退休")
private String typeL;
/**
* 死亡
*/
@Schema(description = "死亡" )
@ExcelAttribute(name = "死亡" )
@ExcelProperty("死亡")
private String typeM;
/**
* 出国定居
*/
@Schema(description = "出国定居" )
@ExcelAttribute(name = "出国定居" )
@ExcelProperty("出国定居")
private String typeN;
/**
* 港澳台定居
*/
@Schema(description = "港澳台定居" )
@ExcelAttribute(name = "港澳台定居" )
@ExcelProperty("港澳台定居")
private String typeO;
/**
* 退保
*/
@Schema(description = "退保" )
@ExcelAttribute(name = "退保" )
@ExcelProperty("退保")
private String typeP;
/**
* 其他
*/
@Schema(description = "其他" )
@ExcelAttribute(name = "其他" )
@ExcelProperty("其他")
private String typeQ;
/**
* 学历
*/
@Schema(description = "备注")
@ExcelAttribute(name = "备注" )
@ExcelProperty("备注")
private String remark;
}
......@@ -88,6 +88,15 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
@ExcelProperty("项目编码" )
private String settleDomainCode;
/**
* 二级指标归属
*/
@ExcelAttribute(name = "二级指标归属", maxLength = 50)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("二级指标归属")
@Schema(description = "二级指标归属")
private String secondIndicatorBelong ;
/**
* 社保户
*/
......
......@@ -402,4 +402,13 @@ public class TPaymentInfoNewVo extends RowIndex implements Serializable {
@Schema(description = "分组键")
private String keyGroup;
/**
* 二级指标归属
*/
@ExcelAttribute(name = "二级指标归属", maxLength = 50)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("二级指标归属")
@Schema(description = "二级指标归属")
private String secondIndicatorBelong ;
}
......@@ -16,11 +16,14 @@
*/
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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Set;
/**
* 公积金信息
......@@ -55,4 +58,23 @@ private int limitStart;
@Schema(description = "查询limit 数据条数")
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.BorderStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleFiveStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleFiveStrategy(List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@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.CENTER);
headWriteCellStyle.setBorderLeft(BorderStyle.NONE);
headWriteCellStyle.setBorderBottom(BorderStyle.NONE);
headWriteCellStyle.setBorderRight(BorderStyle.NONE);
headWriteCellStyle.setBorderTop(BorderStyle.NONE);
return headWriteCellStyle;
}
}
\ No newline at end of file
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.setVerticalAlignment(VerticalAlignment.CENTER);
headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
headWriteCellStyle.setBorderTop(BorderStyle.THIN);
headWriteCellStyle.setBorderRight(BorderStyle.THIN);
headWriteCellStyle.setBorderBottom(BorderStyle.THIN);
return headWriteCellStyle;
}
}
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.BorderStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleOneStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleOneStrategy(List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@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);
headWriteCellStyle.setBorderLeft(BorderStyle.NONE);
headWriteCellStyle.setBorderBottom(BorderStyle.NONE);
headWriteCellStyle.setBorderRight(BorderStyle.NONE);
headWriteCellStyle.setBorderTop(BorderStyle.NONE);
return headWriteCellStyle;
}
}
\ No newline at end of file
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.BorderStyle;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleStrategy( 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)20);
// 边框
headWriteFont.setBold(true);
headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setBorderLeft(BorderStyle.NONE);
headWriteCellStyle.setBorderBottom(BorderStyle.NONE);
headWriteCellStyle.setBorderRight(BorderStyle.NONE);
headWriteCellStyle.setBorderTop(BorderStyle.NONE);
return headWriteCellStyle;
}
}
\ No newline at end of file
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 CustomCellStyleThreeStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleThreeStrategy(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);
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.CENTER);
headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
headWriteCellStyle.setBorderTop(BorderStyle.THIN);
headWriteCellStyle.setBorderRight(BorderStyle.THIN);
headWriteCellStyle.setBorderBottom(BorderStyle.THIN);
return headWriteCellStyle;
}
}
\ No newline at end of file
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.BorderStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleTwoStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleTwoStrategy(List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@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);
headWriteCellStyle.setBorderLeft(BorderStyle.NONE);
headWriteCellStyle.setBorderBottom(BorderStyle.NONE);
headWriteCellStyle.setBorderRight(BorderStyle.NONE);
headWriteCellStyle.setBorderTop(BorderStyle.NONE);
return headWriteCellStyle;
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellWriteWidthConfig extends AbstractColumnWidthStyleStrategy {
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(3, 5500);
sheet.setColumnWidth(6, 1500);
sheet.setColumnWidth(7, 1500);
sheet.setColumnWidth(8, 1500);
sheet.setColumnWidth(9, 1500);
sheet.setColumnWidth(10, 3500);
sheet.setColumnWidth(12, 3000);
}
}
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellWriteWidthOneConfig extends AbstractColumnWidthStyleStrategy {
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(2, 3500);
sheet.setColumnWidth(3, 5000);
sheet.setColumnWidth(4, 1000);
sheet.setColumnWidth(6, 5000);
sheet.setColumnWidth(7, 4700);
sheet.setColumnWidth(9, 1000);
sheet.setColumnWidth(10, 1000);
sheet.setColumnWidth(11, 1000);
sheet.setColumnWidth(12, 1000);
sheet.setColumnWidth(13, 1000);
sheet.setColumnWidth(14, 1800);
sheet.setColumnWidth(15, 5000);
sheet.setColumnWidth(16, 3200);
sheet.setColumnWidth(17, 3000);
}
}
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellWriteWidthTwoConfig extends AbstractColumnWidthStyleStrategy {
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(1, 3000);
sheet.setColumnWidth(3, 5000);
sheet.setColumnWidth(5, 1000);
sheet.setColumnWidth(6, 1000);
sheet.setColumnWidth(7, 1000);
sheet.setColumnWidth(8, 1000);
sheet.setColumnWidth(9, 1000);
sheet.setColumnWidth(10, 1000);
sheet.setColumnWidth(11, 1000);
sheet.setColumnWidth(12, 1500);
sheet.setColumnWidth(13, 1500);
sheet.setColumnWidth(14, 1500);
sheet.setColumnWidth(15, 1500);
sheet.setColumnWidth(16, 1500);
sheet.setColumnWidth(17, 1500);
sheet.setColumnWidth(18, 1000);
sheet.setColumnWidth(19, 1000);
sheet.setColumnWidth(20, 1500);
sheet.setColumnWidth(21, 1500);
sheet.setColumnWidth(22, 1000);
sheet.setColumnWidth(23, 1000);
sheet.setColumnWidth(24, 3500);
}
}
}
}
\ No newline at end of file
......@@ -62,6 +62,18 @@ public class SysHouseHoldInfoController {
return new R<>(sysHouseHoldInfoService.getSysHouseHoldInfoPage(page,sysHouseHoldInfo));
}
/**
* 获取所有的独立户数据
* @param page 分页对象
* @return
*/
@Operation(description = "获取所有的独立户数据")
@GetMapping("/getAllSingleSocail" )
public R<IPage<SysHouseHoldInfo>> getAllSingleSocailPage(Page page) {
return new R<>(sysHouseHoldInfoService.getAllSingleSocailPage(page));
}
/**
* 不分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
......
......@@ -415,7 +415,8 @@ public class TDispatchInfoController {
@SysLog("派单信息记录表 批量导入-派减")
@PostMapping("/importListReduce")
//@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo-batch-reduce')")
public R<List<ErrorMessage>> importListReduce(@RequestBody MultipartFile file, @RequestParam(required = false)String orderId){
public R<List<ErrorMessage>> importListReduce(@RequestBody MultipartFile file, @RequestParam(required = false)String orderId
,@RequestParam(required = false) String flag){
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
......@@ -431,7 +432,7 @@ public class TDispatchInfoController {
try {
if (Common.isNotNull(requestId)) {
//主动释放锁
return tDispatchInfoService.importReduceDiy(file.getInputStream(),orderId);
return tDispatchInfoService.importReduceDiy(file.getInputStream(),orderId,flag);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
......@@ -457,7 +458,7 @@ public class TDispatchInfoController {
list.add(excelVOList);
YifuUser user = SecurityUtils.getUser();
List<ErrorMessage> errorMessageList = new ArrayList<>();
tDispatchInfoService.batchReduceDispatch(list, errorMessageList, user, orderId);
tDispatchInfoService.batchReduceDispatch(list, errorMessageList, user, orderId,null);
return R.ok(errorMessageList);
}
......@@ -753,4 +754,91 @@ public class TDispatchInfoController {
}
return tDispatchInfoService.updateExportFundFlagById(id,status);
}
/**
* @Author huyc
* @Description 导出 导出医保花名册
* @Date 10:05 2023/7/14
* @Param
* @return
**/
@PostMapping("/doexportMedicalInfo")
@Operation(description = "导出医保花名册")
@SysLog("导出医保花名册")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_doexportFundRecordChange')")
public void doexportMedicalInfo(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.doexportSocialRecordNew(response,searchVo);
}
/**
* @Author huyc
* @Description 导出 导出三险花名册
* @Date 14:01 2023/7/20
* @Param
* @return
**/
@PostMapping("/doexportPensionInfo")
@Operation(description = "导出三险花名册")
@SysLog("导出三险花名册")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_doexportFundRecordChange')")
public void doexportPensionInfo(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.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);
}
}
......@@ -33,9 +33,16 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
IPage<SysHouseHoldInfo> getSysHouseHoldInfoPage(Page<SysHouseHoldInfo> page, @Param("sysHouseHoldInfo") SysHouseHoldInfo sysHouseHoldInfo);
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
IPage<SysHouseHoldInfo> getSysHouseHoldInfoPage(Page<SysHouseHoldInfo> page, @Param("sysHouseHoldInfo") SysHouseHoldInfo sysHouseHoldInfo);
/**
* 获取所有的独立户数据
* @param page
* @return
*/
IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page);
}
......@@ -154,6 +154,72 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
int getFundRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("idsStr") List<String> idsStr);
/**
* @Author huyc
* @Description 社保派单医保模版count
* @Date 15:47 2023/7/18
* @Param
* @return
**/
int getSocialDisRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
int getFCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单医保模版
* @Date 15:47 2023/7/18
* @Param
* @return
**/
List<TDispatchSocialExportVo> getSocialDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单医保模版
* @Date 15:47 2023/7/18
* @Param
* @return
**/
List<TDispatchSocialExportVo> getSocialReduceDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单养老模版count
* @Date 15:47 2023/7/18
* @Param
* @return
**/
int getSocialPersionDisCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单养老模版
* @Date 15:47 2023/7/18
* @Param
* @return
**/
List<TDispatchSocialPersionExportVo> getSocialPersionDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单养老模版count
* @Date 15:47 2023/7/18
* @Param
* @return
**/
int getSocialPersionReduceDisCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单养老模版
* @Date 15:47 2023/7/18
* @Param
* @return
**/
List<TDispatchSocialPersionReduceExportVo> getSocialPersionReduceDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
List<FundHandleExportVo> getFundRecordList(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("idsStr") List<String> idsStr);
/**
......@@ -172,4 +238,15 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
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,@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
HouseNameConfigVo getFundSumExportVoTwo(@Param("houseName") String houseName,@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
}
......@@ -46,4 +46,6 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
R<Boolean> saveInfo (SysHouseHoldInfo sysHouseHoldInfo);
R<Boolean> updateByIdAsso(SysHouseHoldInfo sysHouseHoldInfo);
IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page);
}
......@@ -67,11 +67,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
List<ErrorMessage> errorMessageList,
YifuUser user, String orderId, Map<String, String> idCardMap);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId,String flag);
@Transactional
@ShardingTransactionType(TransactionType.BASE)
void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user, String orderId);
void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user, String orderId,String flag);
R<Boolean> removeByIdDiy(String id);
......@@ -93,6 +93,10 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
void doexportFundRecordChange(HttpServletResponse response,String idStr, SocialHandleSearchVo searchVo);
void doexportSocialRecordNew(HttpServletResponse response, SocialHandleSearchVo searchVo);
void doexportSocialPensionRecord(HttpServletResponse response, SocialHandleSearchVo searchVo);
/**
* 获取社保和公积金派减日期
* @Author hgw
......@@ -126,4 +130,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
* @return: boolean
**/
boolean haveRole(YifuUser user, long roleId);
void doexportFundInfo(HttpServletResponse response, SocialHandleSearchVo searchVo);
void doexportFundInfoOne(HttpServletResponse response, SocialHandleSearchVo searchVo);
}
......@@ -60,6 +60,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
return baseMapper.getSysHouseHoldInfoPage(page,sysHouseHoldInfo);
}
/**
* 获取所有的独立户数据
* @param page
* @return
*/
@Override
public IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page){
return baseMapper.getAllSingleSocailPage(page);
}
/**
* 户新增
* @param sysHouseHoldInfo 社保户公积金户数据
......
......@@ -20,16 +20,23 @@ import cn.hutool.core.collection.CollUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.WriteTable;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.row.SimpleRowHeightStyleStrategy;
import com.baomidou.lock.annotation.Lock4j;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
......@@ -48,6 +55,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.config.*;
import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
......@@ -61,6 +69,8 @@ import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.shardingsphere.transaction.annotation.ShardingTransactionType;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -835,7 +845,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (excel.getEducationName().equals("中专")) {
vo.setHighEducation("11");
}
else {
vo.setHighEducation("");
}
}
}
}
......@@ -2765,7 +2777,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
public R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId) {
public R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId,String flag) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
R.failed(CommonConstants.USER_FAIL);
......@@ -2814,7 +2826,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
batchReduceDispatch(cachedDataList, errorMessageList,user,orderId);
batchReduceDispatch(cachedDataList, errorMessageList,user,orderId,flag);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -2826,7 +2838,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
@Override
public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user, String orderId) {
public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList,
YifuUser user, String orderId, String flag) {
if (!Common.isNotNull(excelVOList)){
return;
}
......@@ -2836,16 +2849,46 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List<String> codes = new ArrayList<>();
// 初始化参数
initIdcard(excelVOList, idcards,codes);
// 通过身份证和项目编码获取档案&项目档案&最新合同
Map<String, DispatchEmpVo> empVoMap = getDispatchEmpVo(idcards, codes);
// 通过身份证查询社保&公积金&社保公积金查询信息: 身份证维度唯一
Map<String, TSocialFundInfo> socialFundMap = getSocialFundMap(idcards);
TSocialFundInfo socialFund;
TDispatchReduceVo excel;
//批量派减:校验待派减人员五险一金缴纳情况,若有公积金未派减,则会显示社保已派减,公积金未派减,并弹窗提示有派减失败数据,可同步导出派减数据表单
//flag为1时 单独派减社保时校验公积金是否可用
if (Common.isNotNull(flag) && CommonConstants.ONE_STRING.equals(flag)) {
List<ErrorMessage> errorMessageList1 = new ArrayList<>();
for (int i = 0; i < excelVOList.size(); i++) {
socialFund = null;
excel = excelVOList.get(i);
if (Common.isNotNull(socialFundMap)) {
socialFund = socialFundMap.get(excel.getEmpIdcard());
}
//单减社保,判断是否有正常的公积金
if (Common.isNotNull(excel.getSocialReduceDate()) && Common.isEmpty(excel.getFundReduceDate())
&& Common.isNotNull(socialFund)
&& (CommonConstants.THREE_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.EIGHT_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.ZERO_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.ONE_STRING.equals(socialFund.getFundStatus()))) {
errorMessageList1.add(new ErrorMessage(excel.getRowIndex(), excel.getEmpIdcard() + "-" +excel.getEmpName(), CommonConstants.RED, CommonConstants.ONE_STRING));
}
}
if (!errorMessageList1.isEmpty() && errorMessageList1.stream().anyMatch(e -> CommonConstants.ONE_STRING.equals(e.getName()))) {
errorMessageList.clear();
errorMessageList.addAll(errorMessageList1);
return;
}
}
// 通过身份证和项目编码获取档案&项目档案&最新合同
Map<String, DispatchEmpVo> empVoMap = getDispatchEmpVo(idcards, codes);
// 获取项目编码数据 以供校验
Map<String, ProjectSetInfoVo> projectVoMap = getProjectVoMap(codes);
DispatchEmpVo empVo;
TDispatchInfo dispatch;
TDispatchReduceVo excel;
TSocialFundInfo socialFund;
ProjectSetInfoVo setInfoVo;
// 是否SSC:SSC派单组-1659015946137583618L SSC审核组-1659016108176130049L
long roleId = 1659015946137583618L;
......@@ -2859,6 +2902,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialFundMap)){
socialFund = socialFundMap.get(excel.getEmpIdcard());
}
if (Common.isEmpty(excel.getReasonType())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "减少原因不能为空"));
continue;
}
if (Common.isEmpty(setInfoVo)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_PROJECT_NOT_FOUND)));
continue;
......@@ -5040,6 +5087,331 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 10:05 2023/7/18
* @Param
* @return
**/
@Override
public void doexportSocialRecordNew(HttpServletResponse response,SocialHandleSearchVo searchVo) {
String fileName = DispatchConstants.SOCIAL_MEDICAL_EXPORT + searchVo.getSocialHouseholdName() + "_" + searchVo.getDisMonth() + CommonConstants.XLSX;
//获取要导出的列表
List<TDispatchSocialExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
WriteTable writeTable2;
WriteTable writeTable3;
WriteTable writeTable4;
TDispatchSocialExportVo vo;
List<Integer> columnIndexes = Arrays.asList(0,12);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(headOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(headTwo(searchVo.getSocialHouseholdName(),searchVo.getUnitCreditCode())).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(headThree()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(headFour()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)50,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(headFive()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
//派增的数据
searchVo.setType(CommonConstants.ZERO_STRING);
long count = getSocialDisRecordCount(searchVo);
if (count > CommonConstants.ZERO_INT){
list = getSocialDisRecord(searchVo);
if (Common.isNotNull(list)) {
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet("增员").build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
} else {
writeSheet = EasyExcel.writerSheet("增员").build();
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
int num = 1;
for (int i =1;i<= 10;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
//派减的数据
searchVo.setType(CommonConstants.ONE_STRING);
long count1 = getSocialDisRecordCount(searchVo);
if (count1 > CommonConstants.ZERO_INT){
list = baseMapper.getSocialReduceDisRecord(searchVo);
if (Common.isNotNull(list)) {
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet("减员").build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
} else {
writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
int num = 1;
list = new ArrayList<>();
for (int i =1;i<= 10;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
if (excelWriter!= null) {
excelWriter.finish();
}
}catch (Exception e){
log.error("执行异常" ,e);
}
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 14:05 2023/7/20
* @Param
* @return
**/
@Override
public void doexportSocialPensionRecord(HttpServletResponse response,SocialHandleSearchVo searchVo) {
String fileName = DispatchConstants.SOCIAL_PERSION_EXPORT + searchVo.getSocialHouseholdName() + "_" + searchVo.getDisMonth() + CommonConstants.XLSX;
//获取要导出的列表
List<TDispatchSocialPersionExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
WriteTable writeTable2;
WriteTable writeTable3;
WriteTable writeTable4;
TDispatchSocialPersionExportVo vo;
TDispatchSocialPersionReduceExportVo reduceVo;
//派增的数据
searchVo.setType(CommonConstants.ZERO_STRING);
long count = getSocialPersionDisCount(searchVo);
List<Integer> columnIndexes = Arrays.asList(0,17);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(persionHeadOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionHead()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthOneConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)30,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionHeadThree()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)150,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(persionHead1()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20))
.build();
if (count > CommonConstants.ZERO_INT){
list = getSocialPersionDisRecord(searchVo);
if (Common.isNotNull(list)) {
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchSocialPersionExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet("增员").build();
// 第一次写入会创建头
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
} else {
writeSheet = EasyExcel.writerSheet("增员").build();
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
int num = 1;
for (int i =1;i<= 10;i++) {
vo = new TDispatchSocialPersionExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
//派减的数据
searchVo.setType(CommonConstants.ONE_STRING);
long count1 = getSocialPersionReduceDisCount(searchVo);
//获取要导出的列表
List<TDispatchSocialPersionReduceExportVo> listReduce = new ArrayList<>();
List<Integer> columnIndex = Arrays.asList(0,24);
CustomCellStyleStrategy customCellStyleStrategy1 = new CustomCellStyleStrategy(columnIndex);
CustomCellStyleOneStrategy customCellStyleStrategy2 = new CustomCellStyleOneStrategy(columnIndex);
CustomCellStyleTwoStrategy customCellStyleStrategy3 = new CustomCellStyleTwoStrategy(columnIndex);
CustomCellStyleThreeStrategy customCellStyleStrategy4 = new CustomCellStyleThreeStrategy(columnIndex);
writeTable0 = EasyExcel.writerTable(0).
head(persionReduceHeadOne()).
registerWriteHandler(customCellStyleStrategy1).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionReduceHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategy2).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionReduceHead()).
registerWriteHandler(customCellStyleStrategy4).
registerWriteHandler(new CustomCellWriteWidthTwoConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)50,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionReduceHead1()).
registerWriteHandler(customCellStyleStrategy3).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20))
.build();
if (count1 > CommonConstants.ZERO_INT){
listReduce = getSocialPersionReduceDisRecord(searchVo);
if (Common.isNotNull(listReduce)) {
//判断list的大小是否大于10
if (listReduce.size() < 10) {
int size = 10 - listReduce.size();
int num = listReduce.size() + 1;
for (int i =1;i<= size;i++) {
reduceVo = new TDispatchSocialPersionReduceExportVo();
reduceVo.setNum(num);
num ++;
listReduce.add(reduceVo);
}
}
writeSheet = EasyExcel.writerSheet("减员").build();
// 第一次写入会创建头
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(listReduce, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
}
} else {
writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
int num = 1;
for (int i =1;i<= 10;i++) {
reduceVo = new TDispatchSocialPersionReduceExportVo();
reduceVo.setNum(num);
num ++;
listReduce.add(reduceVo);
}
excelWriter.write(listReduce, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
}
if (excelWriter!= null) {
excelWriter.finish();
}
}catch (Exception e){
log.error("执行异常" ,e);
}
}
private List<FundHandleExportVo> getFundRecordList(SocialHandleSearchVo searchVo, String idStr) {
return baseMapper.getFundRecordList(searchVo,Common.getList(idStr));
}
......@@ -5052,6 +5424,53 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return baseMapper.getFundRecordCount(searchVo,Common.getList(idStr));
}
private long getSocialDisRecordCount(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialDisRecordCount(searchVo);
}
private long getFCount(SocialHandleSearchVo searchVo) {
return baseMapper.getFCount(searchVo);
}
private List<TDispatchSocialExportVo> getSocialDisRecord(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialDisRecord(searchVo);
}
private List<TDispatchFundPersionExportVo> getDispatchFundPersion(SocialHandleSearchVo searchVo) {
return baseMapper.getFundPersionExportVo(searchVo);
}
private List<TDispatchFundSupplementaryExportVo> getDispatchFundSupplementary(SocialHandleSearchVo searchVo) {
return baseMapper.getFundSupplementarynExportVo(searchVo);
}
private TDispatchFundSumExportVo getFundSumExportVo(SocialHandleSearchVo searchVo) {
return baseMapper.getFundSumExportVo(searchVo);
}
private TDispatchFundSumVo getFundSumVo(SocialHandleSearchVo searchVo ) {
return baseMapper.getFundSumExportVoOne(searchVo);
}
private CompanyProVo companyProVo(String houseName,SocialHandleSearchVo searchVo) {
return baseMapper.getFundPersionExportVoOne(houseName,searchVo);
}
private HouseNameConfigVo getFundSumExportVoTwo(String houseName,SocialHandleSearchVo searchVo ){
return baseMapper.getFundSumExportVoTwo(houseName,searchVo );
}
private long getSocialPersionDisCount(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialPersionDisCount(searchVo);
}
private List<TDispatchSocialPersionExportVo> getSocialPersionDisRecord(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialPersionDisRecord(searchVo);
}
private long getSocialPersionReduceDisCount(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialPersionReduceDisCount(searchVo);
}
private List<TDispatchSocialPersionReduceExportVo> getSocialPersionReduceDisRecord(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialPersionReduceDisRecord(searchVo);
}
/**
* @param socialFundInfo
* @Description: 获取最小起缴日
......@@ -5131,6 +5550,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (!errorMessageList.isEmpty() && errorMessageList.stream().noneMatch(e-> e.getColor().equals(CommonConstants.RED))) {
return R.ok();
}
if (!errorMessageList.isEmpty() && errorMessageList.stream().anyMatch(e -> CommonConstants.ONE_STRING.equals(e.getName()))) {
return R.ok(errorMessageList,"error");
}
return R.ok(errorMessageList);
}
......@@ -5598,4 +6020,1127 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return false;
}
@Override
public void doexportFundInfo(HttpServletResponse response, SocialHandleSearchVo searchVo) {
String fileName = DispatchConstants.FUND_RECORD_EXPORT + "_"+searchVo.getProvidentHouseholdName() + "_" + searchVo.getDisMonth() + CommonConstants.XLSX;
//获取要导出的列表
List<TDispatchFundPersionExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
WriteTable writeTable2;
WriteTable writeTable3;
WriteTable writeTable4;
WriteTable writeTable5;
TDispatchFundPersionExportVo vo;
List<Integer> columnIndexes = Arrays.asList(0,7);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
CustomCellStyleFourStrategy customCellStyleStrategyFour= new CustomCellStyleFourStrategy(columnIndexes);
CustomCellStyleFiveStrategy customCellStyleStrategyFive= new CustomCellStyleFiveStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(headFisrt()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)100)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(headSecond(searchVo.getProvidentHouseholdName(),searchVo)).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)100)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(headW()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthConfig(){
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 3000);
sheet.setColumnWidth(1, 4000);
sheet.setColumnWidth(2, 4000);
sheet.setColumnWidth(3, 6000);
sheet.setColumnWidth(4, 4000);
sheet.setColumnWidth(6, 5000);
sheet.setColumnWidth(5, 5000);
sheet.setColumnWidth(7,3500);
}
}
}
}).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(headQ(searchVo)).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(FundHeadR()).
registerWriteHandler(customCellStyleStrategyFour).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20))
.build();
writeTable5 = EasyExcel.writerTable(5).
head(FundHeadT()).
registerWriteHandler(customCellStyleStrategyFive).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
//派增的数据
long count = getFCount(searchVo);
if (count > CommonConstants.ZERO_INT){
list = getDispatchFundPersion(searchVo);
if (Common.isNotNull(list)) {
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchFundPersionExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet(searchVo.getDisMonth()).build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable5);
}
} else {
list = getDispatchFundPersion(searchVo);
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchFundPersionExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet(searchVo.getDisMonth()).build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable5);
}
if (excelWriter!= null) {
excelWriter.finish();
}
}catch (Exception e){
log.error("执行异常" ,e);
}
}
@Override
public void doexportFundInfoOne(HttpServletResponse response, SocialHandleSearchVo searchVo) {
String fileName = DispatchConstants.FUND_SUPPLEMENTARY_EXPORT + "_"+searchVo.getProvidentHouseholdName() + "_" + searchVo.getDisMonth() + CommonConstants.XLSX;
//获取要导出的列表
List<TDispatchFundSupplementaryExportVo> list = new ArrayList<>();
try (ServletOutputStream out = response.getOutputStream()){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
WriteTable writeTable2;
WriteTable writeTable3;
WriteTable writeTable4;
WriteTable writeTable5;
WriteTable writeTable6;
WriteTable writeTable7;
TDispatchFundSupplementaryExportVo vo;
List<Integer> columnIndexes = Arrays.asList(0,6);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
CustomCellStyleFourStrategy customCellStyleStrategyFour = new CustomCellStyleFourStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(headFisrtOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)100
)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(headQOne(searchVo.getProvidentHouseholdName())).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthConfig(){
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 2) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(2, 1000);
sheet.setColumnWidth(6, 2000);
sheet.setColumnWidth(4,1500);
}
}
}
}).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(headQTwo(searchVo.getProvidentHouseholdName(),searchVo)).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthConfig(){
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 2000);
sheet.setColumnWidth(1, 4000);
sheet.setColumnWidth(2, 6000);
sheet.setColumnWidth(3, 6000);
sheet.setColumnWidth(6, 5000);
sheet.setColumnWidth(5, 5000);
sheet.setColumnWidth(4,4500);
}
}
}
}).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)).
build();
writeTable3 = EasyExcel.writerTable(3).
head(headWone(searchVo)).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthConfig(){
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 4) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 3000);
sheet.setColumnWidth(1, 4000);
sheet.setColumnWidth(2, 6000);
sheet.setColumnWidth(3, 6000);
sheet.setColumnWidth(6, 6000);
sheet.setColumnWidth(5, 6000);
sheet.setColumnWidth(4,6000);
}
}
}
}).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(headQThree(searchVo)).
registerWriteHandler(customCellStyleStrategyFour).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)).
build();
writeTable5 = EasyExcel.writerTable(5).
head(headQFour(searchVo)).
registerWriteHandler(customCellStyleStrategyFour).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)25)).
build();
writeTable6 = EasyExcel.writerTable(6).
head(headQFive()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20)).
build();
writeTable7 = EasyExcel.writerTable(7).
head(FundSix()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)40)).
build();
//派增的数据
long count = getFCount(searchVo);
if (count > CommonConstants.ZERO_INT){
list = getDispatchFundSupplementary(searchVo);
if (Common.isNotNull(list)) {
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchFundSupplementaryExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet(searchVo.getDisMonth()).build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(),writeSheet, writeTable2);
excelWriter.write(list, writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable4);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable5);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable6);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable7);
}
} else {
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchFundSupplementaryExportVo();
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet(searchVo.getDisMonth()).build();
// 第一次写入会创建头
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(),writeSheet, writeTable2);
excelWriter.write(list, writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable4);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable5);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable6);
excelWriter.write(new ArrayList<>(),writeSheet, writeTable7);
}
if (excelWriter!= null) {
excelWriter.finish();
}
}catch (Exception e){
log.error("执行异常" ,e);
}
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="合肥市基本医疗保险参保登记表";
//第一列-第十三列
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String b = "单位名称(盖章): " + houseName + " 单位统一信用代码:" + (null == cusNo ? " " : cusNo);
String c = "人员类型: □√单位职工 □灵活就业人员";
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(b,c));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headThree() {
List<List<String>> list = new ArrayList<>();
//表头数据
String d="变更类别";
//第一列
list.add( Lists.newArrayList("序号","序号"));
//第二列
list.add( Lists.newArrayList("姓名","姓名"));
//第三列
list.add( Lists.newArrayList("身份证件类型","身份证件类型"));
//第四列
list.add( Lists.newArrayList("身份证件号码","身份证件号码"));
//第五列
list.add( Lists.newArrayList("参报/停保时间","参报/停保时间"));
//第六列
list.add( Lists.newArrayList("申报工资(元)","申报工资(元)"));
//变更类别
List<String> orderSpeaces = Lists.newArrayList("新增","续保","中断","终止");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(d ,e) );
});
//第十一列
list.add( Lists.newArrayList("手机号码","手机号码"));
//第十二列
list.add( Lists.newArrayList("学历","学历"));
//第十三列
list.add( Lists.newArrayList("备注","备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headFour() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "备注: 1.身份证类型填写:身份证、护照、港澳台通行证等; \n" +
" 2.增加人员勾选新增或续保,减少人员勾选中断或终止,按相应类型进行勾选;\n" +
" 3.联系电话务必填写准确的手机号码;";
//第一列-第十三列
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headFive() {
List<List<String>> list = new ArrayList<>();
String b="填报人: 联系电话: 经办人(盖章): " +
DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " +
DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " +
DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十三列
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(b));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionHeadOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="职 工 社 会 保 险 增 加 花 名 册";
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionHeadTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="单位名称(签章): " + houseName + " 单位编码:" + (null == cusNo ? " " : cusNo);
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/21
* @return
*/
public List<List<String>> persionHead() {
List<List<String>> list = new ArrayList<>();
//表头数据
String c="参加保险险种";
//第一列
list.add( Lists.newArrayList("序号","序号"));
//第二列
list.add( Lists.newArrayList("姓名","姓名"));
//第三列
list.add( Lists.newArrayList("职工编码","职工编码"));
//第四列
list.add( Lists.newArrayList("社会保障号码 (身份证号码)","社会保障号码 (身份证号码)"));
//第五列
list.add( Lists.newArrayList("性别","性别"));
//第六列
list.add( Lists.newArrayList("民族","民族"));
//第七列
list.add( Lists.newArrayList("参加工作时间","参加工作时间"));
//第八列
list.add( Lists.newArrayList("户口性质","户口性质"));
//第九列
list.add( Lists.newArrayList("个人身份","个人身份"));
//参加保险险种
List<String> orderSpeaces = Lists.newArrayList("养老","失业","医疗","工伤","生育");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(c,e) );
});
//第十五列
list.add( Lists.newArrayList("月工资收入(元)","月工资收入(元)"));
//第十六列
list.add( Lists.newArrayList("补缴保险属期","补缴保险属期"));
//第十七列
list.add( Lists.newArrayList("户籍所在地","户籍所在地"));
//第十八列
list.add( Lists.newArrayList("备注","备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
* @return
*/
public List<List<String>> persionHeadThree() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "1、“户口性质”栏按下列类别填写:非农业户口(城镇)、本地非农业户口(本地城镇)、外地非农业户口(外地城镇)、农业户口(农村)、 \n" +
" 本地农业户口(本地农村)、外地农业户口(外地农村)、港澳台、外籍 \n" +
"2、“个人身份”栏按下列类别填写:“企业职工”、“国家公务员”、“事业单位在编人员”、“编外人员”、“现役军人”、“协保人员”、“公益性岗位”“农民工医保” \n" +
"3、“参加保险险种”栏可对应选项打“√” \n" +
"4、新增人员(含断保再次缴费人员),个人月工资收入按起薪工资额申报。\n" +
"5、补缴时段超过3个月的,缴费基数为历年安徽省社平工资,同时加征利息(含参保当月的缴费基数)。\n" +
"6、如属军队退役人员或劳模人员在备注栏中填写,“退役军人类别”栏按下列类别填写:军队转业干部、计划分配的军队转业干部、自主择业的军队转业干部、退伍复员军人、转业复员士官、退伍 \n" +
"义务兵(含伤病残义务兵)、复员干部,“劳模级别”栏按下列类别填写:国家级、省(自治区、直辖市)级、部(委)级、地(市、厅、局)级、其他 \n" +
"7、本表需填制一式两份,经办机构审核盖章后方可有效,一份单位自存,一份报市社会保险经办机构。";
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
* @return
*/
public List<List<String>> persionHead1() {
List<List<String>> list = new ArrayList<>();
//表头数据
String b="填表人: 单位联系电话: 社保经办机构审核人: " + "填报日期: " + DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(b));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionReduceHeadOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="社 会 保 险 缴 费 单 位 人 员 减 少 花 名 册";
//第一列-第二十五列
for (int i =1;i<= 25;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionReduceHeadTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="单位名称(签章): " + houseName + " 单位编码:" + (null == cusNo ? " " : cusNo);
//第一列-第二十五列cusNo
for (int i =1;i<= 25;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/21
* @return
*/
public List<List<String>> persionReduceHead() {
List<List<String>> list = new ArrayList<>();
//表头数据
String c="减少原因";
//第一列
list.add( Lists.newArrayList("序号","序号"));
//第二列
list.add( Lists.newArrayList("职工编码","职工编码"));
//第三列
list.add( Lists.newArrayList("姓名","姓名"));
//第四列
list.add( Lists.newArrayList("社会保障号码 (身份证号码)","社会保障号码 (身份证号码)"));
//第五列
list.add( Lists.newArrayList("停止缴费时间","停止缴费时间"));
//减少原因
List<String> orderSpeaces = Lists.newArrayList("辞职","辞退","参军","上学","劳改","劳教","除名","人员失踪","停薪留职","合同期满","解除合同","统筹内调出","调出统筹范围","退休","死亡","出国定居","港澳台定居","退保","其他");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(c,e) );
});
list.add( Lists.newArrayList("备注","备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
* @return
*/
public List<List<String>> persionReduceHead1() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "说明1、“减少原因”栏可对应选项打“√”; \n" +
"2、本表需填制一式二份,经办机构审核盖章后方可有效,一份单位自存,一份报市社会保险经办机构。";
String b="填表人: 单位联系电话: 社保经办机构审核人: " + "填报日期: " + DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十八列
for (int i =1;i<= 25;i++) {
list.add(Lists.newArrayList(a,b));
}
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/19
*/
public List<List<String>> headFisrt() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "合肥市住房公积金变更清册";
//第一列-第十三列
for (int i = 1; i <= 8; i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/19
*/
public List<List<String>> headSecond(String houseName,SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a=null;
if(houseName!=null) {
HouseNameConfigVo vo = getFundSumExportVoTwo(houseName, searchVo);
if (vo == null) {
a = "单位名称(签章): " + houseName + " 单位公积金账号:" + "" + " 单边缴纳比例:" + "" ;
} else {
if (vo.getCustomerNo() == null) {
vo.setCustomerNo("");
}
if (vo.getCompanyPro() == null) {
vo.setCompanyPro("");
}
a = "单位名称(签章): " + houseName + " 单位公积金账号:" + vo.getCustomerNo() + " 单边缴纳比例:" + vo.getCompanyPro() + "%";
}
//第一列-第十八列
for (int i = 1; i <= 8; i++) {
list.add(Lists.newArrayList(a));
}
}
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headW() {
List<List<String>> list = new ArrayList<>();
//表头数据
String c = "月缴存金额";
//第一列
list.add(Lists.newArrayList("序号", "序号"));
//第二列
list.add(Lists.newArrayList("个人帐号", "个人帐号"));
//第三列
list.add(Lists.newArrayList("姓 名", "姓 名"));
//第四列
list.add(Lists.newArrayList("身份证号码", "身份证号码"));
//第五列
list.add(Lists.newArrayList("缴存基数", "缴存基数"));
//第六列
list.add(Lists.newArrayList("月缴存金额", "本月增加"));
//第七列
list.add(Lists.newArrayList("月缴存金额", "本月减少"));
//第八列
list.add(Lists.newArrayList("变更原因", "变更原因"));
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headQ(SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "";
String b = " ";
String c = " ";
String d = " ";
//第一列
TDispatchFundSumExportVo dispatchFundSumExportVo = getFundSumExportVo(searchVo);
if (Common.isNotNull(dispatchFundSumExportVo)) {
if (dispatchFundSumExportVo.getNumOne() != null) {
a = dispatchFundSumExportVo.getNumOne().toString();
}
if (dispatchFundSumExportVo.getNumTwo() != null) {
b = dispatchFundSumExportVo.getNumTwo().toString();
}
if (dispatchFundSumExportVo.getMonenyOne() != null) {
c = dispatchFundSumExportVo.getMonenyOne().toString();
}
if (dispatchFundSumExportVo.getMonenyTwo() != null) {
d = dispatchFundSumExportVo.getMonenyTwo().toString();
}
if (dispatchFundSumExportVo.getNumOne() == 0) {
a = "";
}
if (dispatchFundSumExportVo.getNumTwo() == 0) {
b = " ";
}
if (dispatchFundSumExportVo.getMonenyOne() == null) {
c = "";
}
if (dispatchFundSumExportVo.getMonenyTwo() == null) {
d= " ";
}
}
list.add(Lists.newArrayList("项目合计", "项目合计", "本月小计"));
//第二列
list.add(Lists.newArrayList("项目合计", "项目合计", "本月小计"));
//第三列
list.add(Lists.newArrayList("本月增加汇款", "人数", b));
list.add(Lists.newArrayList("本月增加汇款", "金额", c));
//第四列
list.add(Lists.newArrayList("本月减少汇款", "人数", a));
//第五列
list.add(Lists.newArrayList("本月减少汇款", "金额", d));
//第六列
list.add(Lists.newArrayList("本月汇款", "人数", ""));
//第七列
list.add(Lists.newArrayList("本月汇款", "金额", " "));
return list;
}
/**
* @return
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
*/
public List<List<String>> FundHeadT() {
List<List<String>> list = new ArrayList<>();
//表头数据
String b = "制表人: 电话: " + "制表时间: " + DateUtil.getYear(DateUtil.getCurrentDateTime()) + " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) + " 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十八列
for (int i = 1; i <= 8; i++) {
list.add(Lists.newArrayList(b));
}
return list;
}
/**
* @return
* @Author wzb
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
*/
public List<List<String>> FundHeadR() {
List<List<String>> list = new ArrayList<>();
//表头数据
list.add(Lists.newArrayList(" 备注", " 备注"));
list.add(Lists.newArrayList(" 备注", " 备注"));
String a="1.新增人员必须填写身份证号码。\n"+
"2.本表只提供单位缴存人数变动使用。\n"+
"3.对于工资基数调整及个人补缴业务不得使用此表。\n"+
"4.单位封存人员启封时,如缴存基数发生变化须附基数调整清册\n"+"本单位承诺变更清册中所填内容均真实、合法、有效,如有不实之处,单位承担相应的法律责任及由此产生的一切后果。";
for (int i = 2; i <= 7; i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/19
*/
public List<List<String>> headFisrtOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "合肥市住房公积金补缴申请书";
//第一列-第十三列
for (int i = 1; i <= 7; i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headQOne(String houseName) {
List<List<String>> list = new ArrayList<>();
list.add(Lists.newArrayList("单位名称(公章)", "单位名称(公章)"));
//第二列
if(houseName==null){
houseName="";
}
list.add(Lists.newArrayList(houseName, houseName));
list.add(Lists.newArrayList(houseName, houseName));
//第三列
list.add(Lists.newArrayList("经 办 人", "电话"));
list.add(Lists.newArrayList("经 办 人", "电话"));
list.add(Lists.newArrayList("赵云", "63432400"));
list.add(Lists.newArrayList("赵云", "63432400"));
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headQTwo(String houseName,SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>();
HouseNameConfigVo houseNameConfigVo=getFundSumExportVoTwo(houseName, searchVo);
if(Common.isNotNull(houseNameConfigVo)) {
if (houseNameConfigVo.getFundBank() == null) {
houseNameConfigVo.setFundBank("");
}
if (houseNameConfigVo.getCustomerNo() == null) {
houseNameConfigVo.setCustomerNo("");
}
String h = houseNameConfigVo.getCompanyPro() + "%";
if (houseNameConfigVo.getCompanyPro() == null) {
h = "";
}
list.add(Lists.newArrayList("公积金承办银行", "公积金承办银行"));
list.add(Lists.newArrayList(houseNameConfigVo.getFundBank(), houseNameConfigVo.getFundBank()));
list.add(Lists.newArrayList(houseNameConfigVo.getFundBank(), houseNameConfigVo.getFundBank()));
//第二列
//第三列
list.add(Lists.newArrayList("单位公积金账号", "单边缴存比例"));
list.add(Lists.newArrayList("单位公积金账号", "单边缴存比例"));
list.add(Lists.newArrayList(houseNameConfigVo.getCustomerNo(), h));
list.add(Lists.newArrayList(houseNameConfigVo.getCustomerNo(), h));
}else {
list.add(Lists.newArrayList("公积金承办银行", "公积金承办银行"));
list.add(Lists.newArrayList("", ""));
list.add(Lists.newArrayList("", ""));
//第二列
//第三列
list.add(Lists.newArrayList("单位公积金账号", "单边缴存比例"));
list.add(Lists.newArrayList("单位公积金账号", "单边缴存比例"));
list.add(Lists.newArrayList("", " "));
list.add(Lists.newArrayList("", " "));
}
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headWone(SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String c = "补缴时间";
//第一列
list.add(Lists.newArrayList("序号", "序号"));
//第二列
list.add(Lists.newArrayList("个人帐号", "个人帐号"));
//第三列
list.add(Lists.newArrayList("姓 名", "姓 名"));
//第四列
//第五列
list.add(Lists.newArrayList("缴存基数", "缴存基数"));
//第六列
list.add(Lists.newArrayList("补缴金额", "补缴金额"));
//第七列
list.add(Lists.newArrayList("补缴时间", "起始(年月日)"));
list.add(Lists.newArrayList("补缴时间", "截至(年月日)"));
//第八列
return list;
}
private String int2big(int b) {
final String num[] = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};
final String unit[] = {"圆", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟"};
String dst = "";
int count = 0;
while (b> 0) {
dst = (num[b % 10] + unit[count]) + dst;
b = b / 10;
count++;
}
return dst.replaceAll("零[仟佰拾]", "零").replaceAll("零+万", "万")
.replaceAll("零+亿", "亿").replaceAll("亿万", "亿零")
.replaceAll("零+", "零").replaceAll("零圆", "圆");
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headQThree(SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>();
//表头数据
//第一列
String a="";
HouseNameConfigVo houseNameConfigVo=getFundSumExportVoTwo(searchVo.getProvidentHouseholdName(),searchVo);
if(houseNameConfigVo!=null) {
TDispatchFundSumVo tDispatchFundSumVo = getFundSumVo(searchVo);
if (tDispatchFundSumVo != null) {
if (tDispatchFundSumVo.getSupplementaryAmountSum() != null) {
a = tDispatchFundSumVo.getSupplementaryAmountSum().toString();
} else {
a = "0";
}
}
}
else {
a = "0";
}
list.add(Lists.newArrayList("", ""));
//第二列
list.add(Lists.newArrayList("", ""));
list.add(Lists.newArrayList("合计补缴金额(大写):", "合计补缴金额(大写):"));
//第三列
//第四列
int b=Double.valueOf(a).intValue();
String c=int2big(b);
//第五列
list.add(Lists.newArrayList(c, c));
list.add(Lists.newArrayList(c, c));
list.add(Lists.newArrayList(c, c));
list.add(Lists.newArrayList(c, c));
//第八列
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headQFour(SocialHandleSearchVo searchVo) {
List<List<String>> list = new ArrayList<>();
//表头数据
//第一列
TDispatchFundSumVo dispatchFundSumVo=getFundSumVo(searchVo);
String F=dispatchFundSumVo.getNumber();
list.add(Lists.newArrayList(" 单位申请\n" +" 补缴意见"));
list.add(Lists.newArrayList(" 单位申请\n" +" 补缴意见"));
//第二列
list.add(Lists.newArrayList("", "","","",""," 负责人:"," 年 月 日"));
list.add(Lists.newArrayList("", "","","",""," 负责人:"," 年 月 日"));
//第三列
list.add(Lists.newArrayList(" 补缴合计", " 补缴合计"," 补缴合计"," 补缴原因"," 补缴原因"," 补缴原因"));
if(dispatchFundSumVo.getNumber()==null){
dispatchFundSumVo.setNumber("0");
}
if(dispatchFundSumVo.getSupplementaryAmountSum()==null){
dispatchFundSumVo.setSupplementaryAmountSum(BigDecimal.ZERO );
}
list.add(Lists.newArrayList("此次申请补缴共有"+dispatchFundSumVo.getNumber()+"人", "补缴总额"+dispatchFundSumVo.getSupplementaryAmountSum().toString()+"元",""));
list.add(Lists.newArrayList("此次申请补缴共有"+dispatchFundSumVo.getNumber()+"人", "补缴总额"+dispatchFundSumVo.getSupplementaryAmountSum().toString()+"元",""));
//第四列
//第八列
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> headQFive() {
List<List<String>> list = new ArrayList<>();
//表头数据
//第一列
list.add(Lists.newArrayList("市住房公积金管理中\n" +"心审核意见"));
list.add(Lists.newArrayList("市住房公积金管理中\n" +"心审核意见"));
//第二列
list.add(Lists.newArrayList("", "","","","","审批人:"," 年 月 日"));
list.add(Lists.newArrayList("", "","","","","审批人:"," 年 月 日"));
//第三列
list.add(Lists.newArrayList("承办银行\n" +"审核意见"));
list.add(Lists.newArrayList("", "","","","","审批人:"," 年 月 日"));
list.add(Lists.newArrayList("", "","","","","审批人:"," 年 月 日"));
//第四列
//第八列
return list;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public List<List<String>> FundSix() {
List<List<String>> list = new ArrayList<>();
//表头数据
String b = "网址:www.hfgjj.com 咨询电话:0551-12329";
//第一列-第十八列
for (int i = 1; i <= 7; i++) {
list.add(Lists.newArrayList(b));
}
return list;
}
}
......@@ -1351,6 +1351,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
paymentInfo.setBpoFlag(domain.getBpoFlag());
paymentInfo.setSecondIndicatorBelong(domain.getSecondIndicatorBelong());
paymentInfo.setSettleDomainId(socialInfo.getSettleDomain());
paymentInfo.setSettleDomainName(socialInfo.getSettleDomainName());
paymentInfo.setSettleDomainCode(socialInfo.getSettleDomainCode());
......@@ -1377,6 +1378,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
paymentInfo.setSettleDomainName(domain.getDepartName());
paymentInfo.setSecondIndicatorBelong(domain.getSecondIndicatorBelong());
paymentInfo.setUnitId(domain.getCustomerId());
paymentInfo.setUnitName(domain.getCustomerName());
paymentInfo.setBpoFlag(domain.getBpoFlag());
......@@ -1863,6 +1865,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
paymentInfo.setBpoFlag(domain.getBpoFlag());
paymentInfo.setSettleDomainId(fund.getSettleDomainFund());
paymentInfo.setSecondIndicatorBelong(domain.getSecondIndicatorBelong());
paymentInfo.setSettleDomainName(fund.getSettleDomainNameFund());
paymentInfo.setSettleDomainCode(fund.getSettleDomainCodeFund());
paymentInfo.setUnitId(fund.getUnitIdFund());
......@@ -1888,6 +1891,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
paymentInfo.setSettleDomainName(domain.getDepartName());
paymentInfo.setSecondIndicatorBelong(domain.getSecondIndicatorBelong());
paymentInfo.setUnitId(domain.getCustomerId());
paymentInfo.setUnitName(domain.getCustomerName());
paymentInfo.setBpoFlag(domain.getBpoFlag());
......@@ -2545,6 +2549,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
payExists.setBpoFlag(domain.getBpoFlag());
payExists.setSecondIndicatorBelong(domain.getSecondIndicatorBelong());
payExists.setSettleDomainId(socialInfo.getSettleDomain());
payExists.setSettleDomainCode(Common.isNotNull(socialInfo.getSettleDomainCode()) ? socialInfo.getSettleDomainCode(): "");
payExists.setUnitId(Common.isNotNull(socialInfo.getUnitId()) ? socialInfo.getUnitId(): "");
......@@ -2571,6 +2576,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
payExists.setSettleDomainId(tSocialInfo.getSettleDomain());
payExists.setSettleDomainCode(tSocialInfo.getSettleDomainCode());
payExists.setSecondIndicatorBelong(domain.getSecondIndicatorBelong());
payExists.setSettleDomainName(domain.getDepartName());
payExists.setUnitId(domain.getCustomerId());
payExists.setUnitName(domain.getCustomerName());
......
......@@ -434,7 +434,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo.setChangeContractAndEmployee(preInfo.getChangeContractAndEmployee());
List<TDispatchReduceVo> dispatchImportList = new ArrayList<>();
dispatchImportList.add(dispatchReduceVo);
dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user, null);
dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user, null,null);
// 处理派减结果
errorMessage = handleDispatchAddRes(preInfo,errorMessageList);
if (null != errorMessage){
......@@ -620,7 +620,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo.setChangeContractAndEmployee(pre.getChangeContractAndEmployee());
List<TDispatchReduceVo> dispatchImportList = new ArrayList<>();
dispatchImportList.add(dispatchReduceVo);
dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user, null);
dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user, null,null);
//处理派减结果
handleDispatchAddRes(pre, errorMessageList);
......
......@@ -44,7 +44,20 @@
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="houseType" column="HOUSE_TYPE"/>
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
<result property="fundBank" column="FUND_BANK"/>
</resultMap>
<resultMap id="sysHouseHoldSingleInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
<id property="id" column="ID"/>
<result property="name" column="NAME"/>
<result property="type" column="TYPE"/>
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.ORGAN_ID,
......@@ -64,6 +77,10 @@
a.AUDIT_USER,
a.AUDIT_USER_NAME,
a.HANDLE_USER,
a.HOUSE_TYPE,
a.CUSTOMER_NO,
a.UNIT_CREDIT_CODE,
a.FUND_BANK,
a.HANDLE_USER_NAME
</sql>
<sql id="sysHouseHoldInfo_where">
......@@ -86,6 +103,9 @@
<if test="sysHouseHoldInfo.type != null and sysHouseHoldInfo.type.trim() != ''">
AND a.TYPE = #{sysHouseHoldInfo.type}
</if>
<if test="sysHouseHoldInfo.houseType != null and sysHouseHoldInfo.houseType.trim() != ''">
AND a.HOUSE_TYPE = #{sysHouseHoldInfo.houseType}
</if>
<if test="sysHouseHoldInfo.province != null and sysHouseHoldInfo.province.trim() != ''">
AND a.PROVINCE = #{sysHouseHoldInfo.province}
</if>
......@@ -126,4 +146,17 @@
</where>
order by a.CREATE_TIME desc
</select>
<!--sysHouseHoldInfo简单分页查询-->
<select id="getAllSingleSocailPage" resultMap="sysHouseHoldSingleInfoMap">
SELECT
a.ID,
a.TYPE,
a.CUSTOMER_NO,
a.UNIT_CREDIT_CODE,
a.NAME
FROM sys_house_hold_info a
where HOUSE_TYPE = '0'
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -175,6 +175,114 @@
<result property="empName" column="EMP_NAME"/>
</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"/>
<result property="number" column="NUMBER"/>
</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">
<result property="num" column="NUM"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="idcardType" column="IDCARD_TYPE"/>
<result property="empName" column="EMP_NAME"/>
<result property="medicalCardinal" column="MEDICAL_CARDINAL"/>
<result property="empMobile" column="EMP_MOBILE"/>
<result property="educationName" column="EDUCATION_NAME"/>
<result property="disMonth" column="DIS_MONTH"/>
<result property="changeTypeOne" column="CHANGE_TYPE_ONE"/>
<result property="changeTypeTwo" column="CHANGE_TYPE_TWO"/>
<result property="changeTypeThree" column="CHANGE_TYPE_THREE"/>
<result property="changeTypeFour" column="CHANGE_TYPE_FOUR"/>
<result property="remark" column="REMARK"/>
</resultMap>
<resultMap id="socialPersionDisExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchSocialPersionExportVo">
<result property="num" column="num"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empNo" column="EMP_NO"/>
<result property="empName" column="EMP_NAME"/>
<result property="sex" column="sex"/>
<result property="empNational" column="EMP_NATIONAL"/>
<result property="workDate" column="WORK_DATE"/>
<result property="type" column="type"/>
<result property="signleType" column="SIGNLE_TYPE"/>
<result property="insuranceTypeOne" column="INSURANCE_TYPE_ONE"/>
<result property="insuranceTypeTwo" column="INSURANCE_TYPE_TWO"/>
<result property="insuranceTypeThree" column="INSURANCE_TYPE_THREE"/>
<result property="insuranceTypeFour" column="INSURANCE_TYPE_FOUR"/>
<result property="insuranceTypeFive" column="INSURANCE_TYPE_FIVE"/>
<result property="persionCardinal" column="PERSION_CARDINAL"/>
<result property="dateOne" column="DATE_ONE"/>
<result property="contactAddress" column="CONTRACT_ADRESS"/>
<result property="remark" column="REMARK"/>
</resultMap>
<resultMap id="socialPersionReduceDisExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchSocialPersionReduceExportVo">
<result property="num" column="num"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empNo" column="EMP_NO"/>
<result property="empName" column="EMP_NAME"/>
<result property="workDate" column="WORK_DATE"/>
<result property="typeA" column="typeA"/>
<result property="typeB" column="typeB"/>
<result property="typeC" column="typeC"/>
<result property="typeD" column="typeD"/>
<result property="typeE" column="typeE"/>
<result property="typeW" column="typeW"/>
<result property="typeF" column="typeF"/>
<result property="typeG" column="typeG"/>
<result property="typeH" column="typeH"/>
<result property="typeI" column="typeI"/>
<result property="typeJ" column="typeJ"/>
<result property="typeK" column="typeK"/>
<result property="typeL" column="typeL"/>
<result property="typeM" column="typeM"/>
<result property="typeN" column="typeN"/>
<result property="typeO" column="typeO"/>
<result property="typeP" column="typeP"/>
<result property="typeQ" column="typeQ"/>
<result property="typeZ" column="typeZ"/>
<result property="remark" column="REMARK"/>
</resultMap>
<!-- 派单审核导出vo -->
<resultMap id="exportAuditMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchAuditExportVo">
<result property="empName" column="EMP_NAME"/>
......@@ -645,14 +753,11 @@
when a.TYPE = 1 then "派减"
else null end as "TYPE" ,
a.SOCIAL_HOUSEHOLD_NAME,
case when s.HANDLE_STATUS = 0 then "派增待办理"
when s.HANDLE_STATUS = 1 then "派增办理成功"
when s.HANDLE_STATUS = 2 then "派增办理失败"
when s.HANDLE_STATUS = 3 then "已派减"
when s.HANDLE_STATUS = 4 then "派增办理中"
when s.HANDLE_STATUS = 5 then "派增部分办理失败"
when s.HANDLE_STATUS = 6 then "派减办理中"
when s.HANDLE_STATUS = 7 then "派减部分办理失败"
case when a.SOCIAL_HANDLE_STATUS = 0 then "待办理"
when a.SOCIAL_HANDLE_STATUS = 1 then "办理成功"
when a.SOCIAL_HANDLE_STATUS = 2 then "办理失败"
when a.SOCIAL_HANDLE_STATUS = 3 then "部分办理失败"
when a.SOCIAL_HANDLE_STATUS = 4 then "办理中"
else null end as "SOCIAL_HANDLE_STATUS",
IF(a.TYPE='0',
case when s.PENSION_HANDLE = 0 then "派增待办理"
......@@ -1148,6 +1253,263 @@
order by a.APPLY_NO desc
</where>) a
</select>
<!--tDispatchInfo 社保花名册派单数据count-->
<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>
<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 社保医疗花名册派单数据-->
<select id="getSocialDisRecord" resultMap="socialDisExportMap">
SELECT
(@i :=@i+1) as NUM,
h.EMP_NAME,
h.IDCARD_TYPE,
h.EMP_IDCARD,
h.DIS_MONTH,
h.MEDICAL_CARDINAL,
h.CHANGE_TYPE_ONE,
h.CHANGE_TYPE_TWO,
h.CHANGE_TYPE_THREE,
h.CHANGE_TYPE_FOUR,
h.EMP_MOBILE,
h.EDUCATION_NAME,
h.REMARK
from (
select
a.EMP_NAME,
'身份证' as IDCARD_TYPE,
a.EMP_IDCARD,
replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') as DIS_MONTH,
s.UNIT_MEDICAL_CARDINAL as MEDICAL_CARDINAL,
'' as CHANGE_TYPE_ONE,
'√' as CHANGE_TYPE_TWO,
'' as CHANGE_TYPE_THREE,
'' as CHANGE_TYPE_FOUR,
a.EMP_MOBILE,
a.EDUCATION_NAME,
'' as REMARK
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
<where>
<include refid="where_getSocialDisRecord"/>
</where>
group by a.EMP_IDCARD) h,(select @i:=0) as itable
</select>
<!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getSocialReduceDisRecord" resultMap="socialDisExportMap">
SELECT
(@i :=@i+1) as NUM,
h.EMP_NAME,
h.IDCARD_TYPE,
h.EMP_IDCARD,
h.DIS_MONTH,
h.MEDICAL_CARDINAL,
h.CHANGE_TYPE_ONE,
h.CHANGE_TYPE_TWO,
h.CHANGE_TYPE_THREE,
h.CHANGE_TYPE_FOUR,
h.EMP_MOBILE,
h.EDUCATION_NAME,
h.REMARK
from (
select
a.EMP_NAME,
'身份证' as IDCARD_TYPE,
a.EMP_IDCARD,
replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') as DIS_MONTH,
s.UNIT_MEDICAL_CARDINAL as MEDICAL_CARDINAL,
'' as CHANGE_TYPE_ONE,
'' as CHANGE_TYPE_TWO,
'√' as CHANGE_TYPE_THREE,
'' as CHANGE_TYPE_FOUR,
'' as EMP_MOBILE,
'' as EDUCATION_NAME,
'' as REMARK
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
<where>
<include refid="where_getSocialDisRecord"/>
</where>
group by a.EMP_IDCARD) h,(select @i:=0) as itable
</select>
<!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionDisCount" resultType="java.lang.Integer">
SELECT count(1) from (
select 1
FROM t_dispatch_info a
<where>
<include refid="where_getSocialPersionDisRecord"/>
</where>
group by a.EMP_IDCARD) h
</select>
<!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionDisRecord" resultMap="socialPersionDisExportMap">
SELECT
(@i :=@i+1) as num,
h.EMP_NAME,
h.EMP_NO,
h.EMP_IDCARD,
h.sex,
h.EMP_NATIONAL,
h.WORK_DATE,
h.type,
h.SIGNLE_TYPE,
h.INSURANCE_TYPE_ONE,
h.INSURANCE_TYPE_TWO,
h.INSURANCE_TYPE_THREE,
h.INSURANCE_TYPE_FOUR,
h.INSURANCE_TYPE_FIVE,
h.PERSION_CARDINAL,
h.MEDICAL_CARDINAL,
h.DATE_ONE,
h.CONTRACT_ADRESS,
h.REMARK
FROM (
SELECT
a.EMP_NAME,
'' as EMP_NO,
a.EMP_IDCARD,
CASE (SUBSTR(a.EMP_IDCARD,17,1)%2)
WHEN 1 THEN '男'
WHEN 0 THEN '女'
else '男'
END sex,
case when a.EMP_NATIONAL = 1 then "汉族"
when a.EMP_NATIONAL = 2 then "傣族"
when a.EMP_NATIONAL = 3 then "回族"
when a.EMP_NATIONAL = 4 then "未知"
when a.EMP_NATIONAL = 5 then "满族"
when a.EMP_NATIONAL = 6 then "壮族"
when a.EMP_NATIONAL = 7 then "黎族"
when a.EMP_NATIONAL = 8 then "蒙古族"
when a.EMP_NATIONAL = 9 then "白族"
when a.EMP_NATIONAL = 10 then "仫佬族"
when a.EMP_NATIONAL = 11 then "土家族"
when a.EMP_NATIONAL = 12 then "畬族"
when a.EMP_NATIONAL = 13 then "苗族"
else "汉族" end as EMP_NATIONAL,
concat(ifnull(DATE_FORMAT(a.CONTRACT_START,"%Y%m%d"),''),'-',ifnull(DATE_FORMAT(a.CONTRACT_END,"%Y%m%d"),'')) as WORK_DATE,
'非农业户口(城镇)' as type,
'企业职工' as SIGNLE_TYPE,
'√' as INSURANCE_TYPE_ONE,
'√' as INSURANCE_TYPE_TWO,
'' as INSURANCE_TYPE_THREE,
'√' as INSURANCE_TYPE_FOUR,
'' as INSURANCE_TYPE_FIVE,
s.RECORD_BASE as PERSION_CARDINAL,
s.UNIT_MEDICAL_CARDINAL as MEDICAL_CARDINAL,
concat(ifnull(DATE_FORMAT(a.CONTRACT_START,"%Y%m"),''),'-',ifnull(DATE_FORMAT(a.CONTRACT_END,"%Y%m"),'')) as DATE_ONE,
'安徽省合肥市' as CONTRACT_ADRESS,
a.EMP_MOBILE as REMARK
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
<where>
<include refid="where_getSocialPersionDisRecord"/>
</where>
group by a.EMP_IDCARD)h,(select @i:=0) as itable
</select>
<!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionReduceDisCount" resultType="java.lang.Integer">
SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a
<where>
<include refid="where_getSocialPersionDisRecord"/>
</where>
group by a.EMP_IDCARD) h
</select>
<!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionReduceDisRecord" resultMap="socialPersionReduceDisExportMap">
SELECT
(@i :=@i+1) as num,
h.EMP_NO,
h.EMP_NAME,
h.EMP_IDCARD,
h.WORK_DATE,
h.typeA,
h.typeB,
h.typeC,
h.typeD,
h.typeE,
h.typeW,
h.typeF,
h.typeG,
h.typeH,
h.typeZ,
h.typeJ,
h.typeK,
h.typeL,
h.typeM,
h.typeN,
h.typeO,
h.typeP,
h.typeQ,
h.REMARK
FROM (
SELECT
'' as EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
DATE_FORMAT(a.CREATE_TIME,"%Y%m") as WORK_DATE,
'√' as typeA,
'' as typeB,
'' as typeC,
'' as typeD,
'' as typeE,
'' as typeW,
'' as typeF,
'' as typeG,
'' as typeH,
'' as typeZ,
'' as typeJ,
'' as typeK,
'' as typeL,
'' as typeM,
'' as typeN,
'' as typeO,
'' as typeP,
'' as typeQ,
a.EMP_MOBILE as REMARK
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
<where>
<include refid="where_getSocialPersionDisRecord"/>
</where>
group by a.EMP_IDCARD) h,(select @i:=0) as itable
</select>
<!--tDispatchInfo 公积金变更清册查询-->
<select id="getFundRecordList" resultMap="fundHandleMap">
SELECT
......@@ -1561,6 +1923,112 @@
</if>
</sql>
<sql id="where_getSocialDisRecord">
a.DELETE_FLAG = 0
AND a.social_id is not null
AND a.STATUS in ('2','4')
AND a.DISPATCH_ITEM like concat('%','医疗','%')
<if test="tDispatchInfo != null">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</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.socialHandleStatus != null and tDispatchInfo.socialHandleStatus.trim() != '' and tDispatchInfo.socialHandleStatus != 1">
AND a.SOCIAL_HANDLE_STATUS = #{tDispatchInfo.socialHandleStatus}
</if>
<if test="tDispatchInfo.socialHandleStatus != null and tDispatchInfo.socialHandleStatus.trim() != '' and tDispatchInfo.socialHandleStatus == 1">
AND a.SOCIAL_HANDLE_STATUS in ('1','3')
</if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql}
</if>
</if>
</sql>
<sql id="where_getFundDisRecord">
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 id="where_getFund">
a.DELETE_FLAG = 0
AND a.fund_id is not null
AND a.STATUS in ('2','4')
AND ((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE ( DATE_FORMAT( s.PROVIDENT_START, "%Y-%m" ), '-', '' )))+1) >0
AND a.DISPATCH_ITEM like concat('%','公积金','%')
AND a.Type=0
<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">
a.DELETE_FLAG = 0
AND a.social_id is not null
AND a.STATUS in ('2','4')
AND (a.DISPATCH_ITEM like concat('%','工伤','%') or a.DISPATCH_ITEM like concat('%','养老','%') or a.DISPATCH_ITEM like concat('%','失业','%'))
<if test="tDispatchInfo != null">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</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.socialHandleStatus != null and tDispatchInfo.socialHandleStatus.trim() != '' and tDispatchInfo.socialHandleStatus != 1">
AND a.SOCIAL_HANDLE_STATUS = #{tDispatchInfo.socialHandleStatus}
</if>
<if test="tDispatchInfo.socialHandleStatus != null and tDispatchInfo.socialHandleStatus.trim() != '' and tDispatchInfo.socialHandleStatus == 1">
AND a.SOCIAL_HANDLE_STATUS in ('1','3')
</if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql}
</if>
</if>
</sql>
<!-- 获取当日最大的编码 -->
<select id="getMaxDispatchCode" resultType="java.lang.String">
SELECT ifnull(max(right(e.APPLY_NO,4)),0) APPLY_NO FROM t_dispatch_info e where e.DELETE_FLAG = 0 and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')
......@@ -1572,4 +2040,120 @@
<update id="updateExportFundFlagById">
update t_dispatch_info a set a.EXPORT_FUND_FLAG = #{status} WHERE a.id = #{id}
</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
<where>
<include refid="where_getFundDisRecord"/>
</where>
ORDER BY
a.TYPE
</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,
#{tDispatchInfo.disMonth} AS END,
ROUND(((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE ( DATE_FORMAT( s.PROVIDENT_START, "%Y-%m" ), '-', '' )))+1)*s.UNIT_PROVIDENT_FEE*2 ) 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_getFund"/>
</where>
</select>
<select id="getFundSumExportVo" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo">
SELECT
sum(h.NUM_ONE) as NUM_ONE,
sum(h.NUM_TWO) as NUM_TWO,
sum(h.MONENY_ONE) AS MONENY_ONE ,
sum(h.MONENY_TWO) AS MONENY_TWO
FROM(
SELECT
IF(a.TYPE=1, 1,0) as NUM_ONE ,
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>
GROUP BY
a.EMP_IDCARD,
a.TYPE
ORDER BY
a.TYPE
)h, (select @i:=0) as itable
</select>
<select id="getFundSumExportVoOne" resultMap="FundSupplementary">
SELECT
count(a.EMP_IDCARD) as NUMBER,
SUM(ROUND(((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE ( DATE_FORMAT( s.PROVIDENT_START, "%Y-%m" ), '-', '' )))+1)*s.UNIT_PROVIDENT_FEE*2 )) 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_getFund"/>
</where>
</select>
<select id="getFundPersionExportVoOne" resultMap="CompanyProVo">
SELECT
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,
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})
AND E.`STATUS` = '0'
AND
(PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE ( DATE_FORMAT( E.APPLY_START_DATE , "%Y-%m" ), '-', '' )))>0
and
((PERIOD_DIFF(#{tDispatchInfo.disMonth},REPLACE ( DATE_FORMAT( E.APPLY_END_DATE , "%Y-%m" ), '-', '' ))) <![CDATA[ < ]]>0
OR ( APPLY_END_DATE IS NULL OR APPLY_END_DATE = '' ))
GROUP BY A.`NAME`
</select>
</mapper>
......@@ -105,6 +105,7 @@
<result property="paySettleFlag" column="PAY_SETTLE_FLAG"/>
<result property="payCollectFlag" column="PAY_COLLECT_FLAG"/>
<result property="bpoFlag" column="BPO_FLAG"/>
<result property="secondIndicatorBelong" column="SECOND_INDICATOR_BELONG"/>
</resultMap>
<resultMap id="tPaymentInfoSumMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo">
<result property="empName" column="EMP_NAME"/>
......@@ -300,6 +301,7 @@
<result property="unitSocialFundSum" column="UNIT_SOCIAL_FUND_SUM"/>
<result property="socialFundPersonalSum" column="SOCIAL_FUND_PERSONAL_SUM"/>
<result property="keyGroup" column="keyGroup"/>
<result property="secondIndicatorBelong" column="SECOND_INDICATOR_BELONG"/>
</resultMap>
<resultMap id="tPaymentInfoNewExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoNewExportVo">
......@@ -348,6 +350,7 @@
<result property="personalProidentSet" column="PERSONAL_PROIDENT_SET"/>
<result property="personalProvidentSum" column="PERSONAL_PROVIDENT_SUM"/>
<result property="keyGroup" column="keyGroup"/>
<result property="secondIndicatorBelong" column="SECOND_INDICATOR_BELONG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -850,6 +853,9 @@
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND c.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
<if test="tPaymentInfo.secondIndicatorBelong != null and tPaymentInfo.secondIndicatorBelong.trim() != ''">
AND c.SECOND_INDICATOR_BELONG = #{tPaymentInfo.secondIndicatorBelong}
</if>
</if>
</if>
</sql>
......@@ -869,6 +875,9 @@
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND k.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
<if test="tPaymentInfo.secondIndicatorBelong != null and tPaymentInfo.secondIndicatorBelong.trim() != ''">
AND k.SECOND_INDICATOR_BELONG = #{tPaymentInfo.secondIndicatorBelong}
</if>
</if>
</if>
</sql>
......@@ -1159,6 +1168,7 @@
c.EMP_NAME,
c.UNIT_NAME,
c.SETTLE_DOMAIN_NAME,
c.SECOND_INDICATOR_BELONG,
c.SOCIAL_HOUSEHOLD,
c.SOCIAL_PAY_ADDR,
c.SOCIAL_PAY_MONTH,
......@@ -1175,6 +1185,7 @@
w.EMP_NAME,
w.UNIT_NAME,
w.SETTLE_DOMAIN_NAME,
w.SECOND_INDICATOR_BELONG,
w.SOCIAL_HOUSEHOLD,
w.SOCIAL_PAY_ADDR,
w.SOCIAL_PAY_MONTH,
......@@ -1191,6 +1202,7 @@
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SECOND_INDICATOR_BELONG,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_PAY_ADDR,
a.SOCIAL_PAY_MONTH,
......@@ -1214,6 +1226,7 @@
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SECOND_INDICATOR_BELONG,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_PAY_ADDR,
a.PROVIDENT_PAY_MONTH as SOCIAL_PAY_MONTH,
......@@ -1245,6 +1258,7 @@
k.EMP_NAME,
k.UNIT_NAME,
k.SETTLE_DOMAIN_NAME,
k.SECOND_INDICATOR_BELONG,
k.SOCIAL_HOUSEHOLD,
k.SOCIAL_SECURITY_NO,
k.SOCIAL_PAY_ADDR,
......@@ -1294,6 +1308,7 @@
w.EMP_NAME,
w.UNIT_NAME,
w.SETTLE_DOMAIN_NAME,
w.SECOND_INDICATOR_BELONG,
w.SOCIAL_HOUSEHOLD,
MAX( w.SOCIAL_SECURITY_NO ) AS SOCIAL_SECURITY_NO,
w.SOCIAL_PAY_ADDR,
......@@ -1343,6 +1358,7 @@
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SECOND_INDICATOR_BELONG,
a.SOCIAL_HOUSEHOLD,
MAX( a.SOCIAL_SECURITY_NO ) AS SOCIAL_SECURITY_NO,
a.SOCIAL_PAY_ADDR,
......@@ -1397,6 +1413,7 @@
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SECOND_INDICATOR_BELONG,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_SECURITY_NO,
a.SOCIAL_PAY_ADDR,
......@@ -1457,11 +1474,12 @@
SELECT
count(1)
FROM (
select w.SOCIAL_HOUSEHOLD,w.PROVIDENT_HOUSEHOLD from (
select w.SOCIAL_HOUSEHOLD,w.PROVIDENT_HOUSEHOLD,w.SECOND_INDICATOR_BELONG from (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
a.PROVIDENT_HOUSEHOLD,
a.SECOND_INDICATOR_BELONG
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1'
......@@ -1473,7 +1491,8 @@
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
a.PROVIDENT_HOUSEHOLD,
a.SECOND_INDICATOR_BELONG
FROM t_payment_info a
<where>
IFNULL(a.FUND_ID,'1') != '1'
......@@ -1498,6 +1517,7 @@
c.EMP_NAME,
c.UNIT_NAME,
c.SETTLE_DOMAIN_CODE,
c.SECOND_INDICATOR_BELONG,
c.SETTLE_DOMAIN_NAME,
c.SOCIAL_HOUSEHOLD,
c.SOCIAL_SECURITY_NO,
......@@ -1545,6 +1565,7 @@
w.EMP_NAME,
w.UNIT_NAME,
w.SETTLE_DOMAIN_CODE,
w.SECOND_INDICATOR_BELONG,
w.SETTLE_DOMAIN_NAME,
w.SOCIAL_HOUSEHOLD,
MAX( w.SOCIAL_SECURITY_NO ) AS SOCIAL_SECURITY_NO,
......@@ -1592,6 +1613,7 @@
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_CODE,
a.SECOND_INDICATOR_BELONG,
a.SETTLE_DOMAIN_NAME,
a.SOCIAL_HOUSEHOLD,
MAX( a.SOCIAL_SECURITY_NO ) AS SOCIAL_SECURITY_NO,
......@@ -1646,6 +1668,7 @@
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_CODE,
a.SECOND_INDICATOR_BELONG,
a.SETTLE_DOMAIN_NAME,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_SECURITY_NO,
......@@ -2316,6 +2339,7 @@
,p.SETTLE_DOMAIN_CODE = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.SECOND_INDICATOR_BELONG = #{dept.secondIndicatorBelong}
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=")">
#{item}
......
......@@ -138,6 +138,11 @@ public class SysUser extends BaseEntity {
*/
private String wxOpenid;
/**
* 微信公众号的openid(工资条使用)
*/
private String wxMessage;
/**
* LDAP_DN
*/
......
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