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)));
}
}
......@@ -64,3 +64,9 @@ springdoc:
- group: mail
#按包路径匹配
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
......
......@@ -36,12 +36,13 @@
SALARY_ACCOUNT_ID,
CN_NAME,
JAVA_FIED_NAME,
SALARY_MONEY,
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);
}
}
......@@ -38,4 +38,11 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<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 社保户公积金户数据
......
......@@ -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>
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