Commit 4048f3ff authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into MVP1.7.10-Friend

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialInfoServiceImpl.java
parents 1de38be3 04a9725b
......@@ -184,9 +184,9 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelProperty("档案柜号")
private String fileCabinetNo;
/**
* 离职日期
* 离职日期 fxj 2025-05-08 优化线上邮件报错 isDate = true
*/
@ExcelAttribute(name = "离职日期")
@ExcelAttribute(name = "离职日期",isDate = true)
@Schema(description = "离职日期")
@ExcelProperty("离职日期")
private String leaveDate;
......
......@@ -159,4 +159,10 @@ public class ExcelAttributeConstants {
public static final String SOCIAL_DISPATCH_HANDLE_REASON = "social-conduct-add-reason";
// 公积金办理失败类型
public static final String FUND_DISPATCH_HANDLE_REASON = "fund-conduct-add-reason";
//社保派增委托备注
public static final String TRUST_REMARK_REDUCE = "trustRemarkReduce";
//社保派减委托备注
public static final String TRUST_REMARK_ADD = "trustRemark";
}
......@@ -23,9 +23,9 @@ spring:
activate:
on-profile: prd
redis:
host: 192.168.10.153
host: 192.168.0.222
port: 22379
password: '@yf_2017'
password: '@yf_2022'
## spring security 配置
security:
oauth2:
......
......@@ -2989,6 +2989,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//兼容处理,结算月为空时赋值null huych
if(Common.isEmpty(param.getSettleMonth())){
param.setSettleMonth(null);
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 + 购买标准 是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
......@@ -3357,6 +3361,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//兼容处理,结算月为空时赋值null huych
if(Common.isEmpty(param.getSettleMonth())){
param.setSettleMonth(null);
}
//记录查重校验:姓名 + 身份证号 + 保单号 + 保险公司 + 险种 + 购买标准
//待投保、投保中、已投保(有效、未过期)
......
......@@ -96,19 +96,45 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
log.error("商险不购买提醒初始化停用客服异常:",e);
}
//处理已经离职数据,分批请求,每次请求1000条数据,返回在职人员信息
R<Set<String>> onlineSet;
R<Set<String>> onlineSetTemp = new R<>();
if (list.size() <= 1000){
if (list.size() <= 2000){
onlineSetTemp = archivesDaprUtil.getEmpOnlineMap(list.stream().map(TInsuranceAlert::getEmpIdcardNo).collect(Collectors.toList()));
}else {
for (int i = 0; i < list.size(); i++) {
if (i % 1000 == 0) {
onlineSet = archivesDaprUtil.getEmpOnlineMap(list.stream().map(TInsuranceAlert::getEmpIdcardNo).collect(Collectors.toList()));
if (null != onlineSet && Common.isNotNull(onlineSet.getData())) {
onlineSetTemp.getData().addAll(onlineSet.getData());
// 提前提取身份证号列表,避免重复 stream 操作
List<String> idCardNoList = list.stream()
.map(TInsuranceAlert::getEmpIdcardNo)
.collect(Collectors.toList());
int batchSize = 2000;
int totalSize = idCardNoList.size();
// 初始化 onlineSetTemp,防止 NullPointerException
if (onlineSetTemp == null) {
onlineSetTemp = new R<>(); // 替换为实际类型
}
R<Set<String>> onlineSet;
Set<String> temp = new HashSet<>();
for (int i = 0; i < totalSize; i++) {
if (i % batchSize == 0) {
// 计算当前批次的结束索引
int end = Math.min(i + batchSize, totalSize);
// 获取当前批次的数据
List<String> subList = idCardNoList.subList(i, end);
// 调用接口获取在职人员信息
onlineSet = archivesDaprUtil.getEmpOnlineMap(subList);
// 判空处理
if (onlineSet != null && onlineSet.getData() != null && Common.isNotNull(onlineSet.getData())) {
temp.addAll(onlineSet.getData());
}
}
}
if (temp != null){
onlineSetTemp.setData(temp);
}
}
//如果不存在离职人员直接走生成逻辑
if (Common.isNotKong(onlineSetTemp.getData())){
......@@ -358,7 +384,7 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
if (Common.isEmpty(content)){
content = new StringBuilder();
content.append(String.format("项目数:%d、商险临期人数:%d、商险过期人数:%d,<br/>",
temp.getDomainNum(), temp.getGqNum(), temp.getLqNum())); pushMap.put(user.getWxMessage(), content);
temp.getDomainNum(), temp.getLqNum(), temp.getGqNum())); pushMap.put(user.getWxMessage(), content);
}
}
}
......@@ -410,7 +436,7 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>();
textcard.put("title", "<b>商险待办提醒</b>");
textcard.put("title", "商险待办提醒");
textcard.put("url", String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "66" ));
content.append("请及时至HRO系统进行处理,以免人员脱保!");
textcard.put("description", content.toString());
......
......@@ -154,6 +154,6 @@
select a.DEPT_NAME,a.DEPT_NO,
SUM(case when a.IS_OVERDUE='0' THEN 1 ELSE 0 END) as 'lq',
SUM(CASE WHEN a.IS_OVERDUE='1' THEN 1 ELSE 0 END) as 'gq'
from t_insurance_alert a GROUP BY a.DEPT_NO,a.IS_OVERDUE
from t_insurance_alert a GROUP BY a.DEPT_NO
</select>
</mapper>
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
......@@ -13,22 +14,57 @@ import java.io.Serializable;
@Data
public class TSalaryAccountExportSpecialVo implements Serializable {
private static final long serialVersionUID = 1L;
// 工资月份,发放状态,结算月份,项目名称,员工姓名,银行卡号,开户行,身份证号,工资发放方式,社保扣缴月份" +
// ",公积金扣缴月份,社保优先级,公积金优先级,年终奖扣税方案,是否扣除社保,是否扣除公积金
@ExcelProperty("工资月份")
private String export1;
@ExcelProperty("发放状态")
private String export2;
@ExcelProperty("结算月份")
private String export3;
@ExcelProperty("项目名称")
private String export4;
@ExcelProperty("员工姓名")
private String export5;
@ExcelProperty("银行卡号")
private String export6;
@ExcelProperty("开户行")
private String export7;
@ExcelProperty("身份证号")
private String export8;
@ExcelProperty("工资发放方式")
private String export9;
@ExcelProperty("社保扣缴月份")
private String export10;
@ExcelProperty("公积金扣缴月份")
private String export11;
@ExcelProperty("社保优先级")
private String export12;
@ExcelProperty("公积金优先级")
private String export13;
@ExcelProperty("年终奖扣税方案")
private String export14;
@ExcelProperty("是否扣除社保")
private String export15;
@ExcelProperty("是否扣除公积金")
private String export16;
@ExcelProperty("工资表主键")
private String accountId;
}
......@@ -387,7 +387,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
private void getEmpAccountExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo) {
String fileName = "工资条查询导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TSalaryAccountExportVo> list = new ArrayList<>();
List<TSalaryAccountExportSpecialVo> list = new ArrayList<>();
long count = baseMapper.getEmpAccountCount(searchVo);
ServletOutputStream out = null;
......
......@@ -588,7 +588,7 @@
<select id="getEmpAccountExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountExportSpecialVo">
SELECT
a.SALARY_MONTH export1,
if(a.DISTRIBUTION_FLAG='1','发放成功',if(a.DISTRIBUTION_FLAG='2','发放失败','未发放')) export2,
if(a.PAY_SETTLE_FLAG='0','已发放',if(a.PAY_SETTLE_FLAG='1','发放中','未发放')) export2,
a.SETTLEMENT_MONTH export3,
a.DEPT_NAME export4,
a.EMP_NAME export5,
......@@ -613,7 +613,6 @@
</if>
where a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
order by a.SETTLEMENT_MONTH asc
<if test="tSalaryAccount != null">
<if test="tSalaryAccount.limitStart != null">
limit #{tSalaryAccount.limitStart},#{tSalaryAccount.limitEnd}
......@@ -669,7 +668,6 @@
</if>
where a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
order by a.SETTLEMENT_MONTH asc
</select>
<!--tSalaryAccount简单分页查询-->
<select id="getTSalaryAccountPageDataByIds" resultMap="tSalaryAccountMap">
......
......@@ -507,7 +507,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 委托备注
*/
@Length(max = 100, message = "委托备注 不能超过100 个字符" )
@ExcelAttribute(name = "委托备注", maxLength = 100)
@ExcelAttribute(name = "委托备注", maxLength = 100,isDataId = true,dataType = ExcelAttributeConstants.TRUST_REMARK_ADD,isConvert = false)
@Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" )
......
......@@ -104,7 +104,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
/**
* 委托备注
*/
@ExcelAttribute(name = "委托备注" , maxLength = 200)
@ExcelAttribute(name = "委托备注" , maxLength = 200,isDataId = true,dataType = ExcelAttributeConstants.TRUST_REMARK_REDUCE,isConvert = false)
@Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" )
......
......@@ -540,7 +540,9 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
return R.failed("未找到社保");
} else {
TDispatchInfo disExist = dispatchInfoMapper.selectOne(Wrappers.<TDispatchInfo>query().lambda()
.eq(TDispatchInfo::getSocialId, id).last(CommonConstants.LAST_ONE_SQL));
.eq(TDispatchInfo::getSocialId, id)
.eq(TDispatchInfo::getStatus, CommonConstants.TWO_STRING)
.orderByDesc(TDispatchInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
String handleRemark = "派增";
// 有可以转的项目,则可以转
boolean canUpdate = false;
......@@ -619,7 +621,9 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
return R.failed("未找到社保");
} else {
TDispatchInfo disExist = dispatchInfoMapper.selectOne(Wrappers.<TDispatchInfo>query().lambda()
.eq(TDispatchInfo::getSocialId, id).last(CommonConstants.LAST_ONE_SQL));
.eq(TDispatchInfo::getSocialId, id)
.eq(TDispatchInfo::getStatus, CommonConstants.TWO_STRING)
.orderByDesc(TDispatchInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
String handleRemark = "派增";
// 有可以转的项目,则可以转
boolean canUpdate = false;
......@@ -652,14 +656,14 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
&& Common.isNotNull(socialInfo.getYsdHandleStatus())
&& CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
// 医生大状态为待办理或派减待办理
if (CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())
if (CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) {
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())) {
socialInfo.setYsdHandleStatus(CommonConstants.ONE_STRING);
handleRemark += "医疗、生育、大病手动转自动化";
canUpdate = true;
......@@ -695,7 +699,11 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
, CommonConstants.ONE_STRING);
return R.ok("成功");
} else {
return R.failed("状态未变更,请刷新后查看列表状态!");
if (Common.isNotNull(handleRemark) && handleRemark.length() > 2) {
return R.failed("【"+handleRemark+"】状态未变更,请刷新后查看列表状态!");
} else {
return R.failed("状态未变更,请刷新后查看列表状态!");
}
}
}
......
......@@ -1414,12 +1414,12 @@
a.FIRST_PAY_TIME,
a.GRADUATION_TIME,
IF(a.LEAVE_DATE is not null,DATE_FORMAT(a.LEAVE_DATE,"%Y-%m-%d"),"") as "LEAVE_DATE"
,if(a.type ='1', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='1', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='1', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='1', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='1', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='1', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
......@@ -1665,12 +1665,12 @@
a.GRADUATION_TIME,a.AUTO_FLAG
,a.SOCIAL_HOUSEHOLD_NAME
,s.YGS_REMARK_OLD,s.YSD_REMARK_OLD
,if(a.type ='1', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='1', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='1', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='1', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='1', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='1', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
......
......@@ -528,8 +528,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List<String> list2 = list.stream().map(PersonVo::getUid).collect(Collectors.toList());
List<String> collect = list1.stream().filter(s -> !list2.contains(s)
).collect(Collectors.toList());
log.error("要重置为不可用的用户列表:" + collect);
if (!collect.isEmpty()) {
log.error("要重置为不可用的用户列表:" + collect);
LambdaUpdateWrapper<SysUser> settleUpdate = new LambdaUpdateWrapper<>();
settleUpdate.in(SysUser::getUsername, collect)
.set(SysUser::getDelFlag, CommonConstants.ONE_STRING);
......
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