Commit a28810e5 authored by hongguangwu's avatar hongguangwu

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

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
parents 41de80f4 b733e573
...@@ -28,7 +28,7 @@ import lombok.Data; ...@@ -28,7 +28,7 @@ import lombok.Data;
@Data @Data
public class TGzEmpInfoPushGzVoSkill { public class TGzEmpInfoPushGzVoSkill {
private String orderId; private Integer orderId;
private String skillName; private String skillName;
private String skillDate; private String skillDate;
private String skillOrg; private String skillOrg;
......
...@@ -75,11 +75,6 @@ public class GzConfig { ...@@ -75,11 +75,6 @@ public class GzConfig {
String cnapsId; String cnapsId;
for (int i=0;i<dataArray.size(); i++) { for (int i=0;i<dataArray.size(); i++) {
dataObject = (JSONObject)dataArray.get(i); dataObject = (JSONObject)dataArray.get(i);
bankCd = dataObject.getString("bankCd");
cnapsId = dataObject.getString("cnapsId");
// TODO - 继续解析参数并存储 —— 根据 cnapsId 字段,选择新增还是修改
// System.out.println("bankCd=" + bankCd)
// System.out.println("cnapsId=" + cnapsId)
} }
return true; return true;
} }
...@@ -112,7 +107,6 @@ public class GzConfig { ...@@ -112,7 +107,6 @@ public class GzConfig {
String result = restTemplate.exchange(gzUpdateStatusUrl, HttpMethod.POST, entity, String.class).getBody(); String result = restTemplate.exchange(gzUpdateStatusUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result); returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) { if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result); JSONObject resultObject = JSON.parseObject(result);
String code = resultObject.getString("code"); String code = resultObject.getString("code");
...@@ -151,7 +145,6 @@ public class GzConfig { ...@@ -151,7 +145,6 @@ public class GzConfig {
// 发送POST请求 // 发送POST请求
String result = restTemplate.exchange(gzEmpInfoUrl, HttpMethod.POST, entity, String.class).getBody(); String result = restTemplate.exchange(gzEmpInfoUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result); returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) { if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result); JSONObject resultObject = JSON.parseObject(result);
...@@ -190,7 +183,6 @@ public class GzConfig { ...@@ -190,7 +183,6 @@ public class GzConfig {
// 发送POST请求 // 发送POST请求
String result = restTemplate.exchange(gzContractUrl, HttpMethod.POST, entity, String.class).getBody(); String result = restTemplate.exchange(gzContractUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result); returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) { if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result); JSONObject resultObject = JSON.parseObject(result);
...@@ -220,12 +212,10 @@ public class GzConfig { ...@@ -220,12 +212,10 @@ public class GzConfig {
// 发送GET请求 // 发送GET请求
String result = restTemplate.exchange(gzBankUrl, HttpMethod.POST, entity, String.class).getBody(); String result = restTemplate.exchange(gzBankUrl, HttpMethod.POST, entity, String.class).getBody();
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) { if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result); JSONObject resultObject = JSON.parseObject(result);
String code = resultObject.getString("code"); String code = resultObject.getString("code");
if (Common.isNotNull(code) && "S00000".equals(code)) { if (Common.isNotNull(code) && "S00000".equals(code)) {
System.out.println("成功");
return true; return true;
} }
} }
...@@ -260,13 +250,12 @@ public class GzConfig { ...@@ -260,13 +250,12 @@ public class GzConfig {
// 发送GET请求 // 发送GET请求
String result = restTemplate.exchange(gzBankUrl, HttpMethod.POST, entity, String.class).getBody(); String result = restTemplate.exchange(gzBankUrl, HttpMethod.POST, entity, String.class).getBody();
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) { if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result); JSONObject resultObject = JSON.parseObject(result);
String code = resultObject.getString("code"); String code = resultObject.getString("code");
if (Common.isNotNull(code) && "S00000".equals(code)) { if (Common.isNotNull(code) && "S00000".equals(code)) {
fileId = resultObject.getString("data"); fileId = resultObject.getString("data");
System.out.println("成功:fileId="+fileId);
} }
} }
return fileId; return fileId;
...@@ -303,7 +292,6 @@ public class GzConfig { ...@@ -303,7 +292,6 @@ public class GzConfig {
String result = restTemplate.exchange(gzAttachUrl, HttpMethod.POST, entity, String.class).getBody(); String result = restTemplate.exchange(gzAttachUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result); returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) { if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result); JSONObject resultObject = JSON.parseObject(result);
......
...@@ -186,7 +186,7 @@ public class LGuaziOfferRecordServiceImpl extends ServiceImpl<LGuaziOfferRecordM ...@@ -186,7 +186,7 @@ public class LGuaziOfferRecordServiceImpl extends ServiceImpl<LGuaziOfferRecordM
statusMap.put("3","待发送Offer"); statusMap.put("3","待发送Offer");
statusMap.put("4","待接受Offer"); statusMap.put("4","待接受Offer");
statusMap.put("5","拒绝Offer"); statusMap.put("5","拒绝Offer");
statusMap.put("7","接受offer"); statusMap.put("6","接受offer");
statusMap.put("9","候选人填写信息"); statusMap.put("9","候选人填写信息");
statusMap.put("10","取消offer"); statusMap.put("10","取消offer");
statusMap.put("12","候选人信息审核"); statusMap.put("12","候选人信息审核");
......
...@@ -2853,36 +2853,29 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2853,36 +2853,29 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo.setContactAddress(empAdd.getContactAddress()); employeeInfo.setContactAddress(empAdd.getContactAddress());
if (empAdd.getHignEducation().equals("文盲")) { if (empAdd.getHignEducation().equals("文盲")) {
employeeInfo.setHignEducation("1"); employeeInfo.setHignEducation("1");
} }else if (empAdd.getHignEducation().equals("小学")) {
if (empAdd.getHignEducation().equals("小学")) {
employeeInfo.setHignEducation("2"); employeeInfo.setHignEducation("2");
} }else if (empAdd.getHignEducation().equals("初中")) {
if (empAdd.getHignEducation().equals("初中")) {
employeeInfo.setHignEducation("3"); employeeInfo.setHignEducation("3");
} }else if (empAdd.getHignEducation().equals("高中")) {
if (empAdd.getHignEducation().equals("高中")) {
employeeInfo.setHignEducation("4"); employeeInfo.setHignEducation("4");
} }else if (empAdd.getHignEducation().equals("大专")) {
if (empAdd.getHignEducation().equals("大专")) {
employeeInfo.setHignEducation("5"); employeeInfo.setHignEducation("5");
} }else if (empAdd.getHignEducation().equals("本科")) {
if (empAdd.getHignEducation().equals("本科")) {
employeeInfo.setHignEducation("6"); employeeInfo.setHignEducation("6");
} }else if (empAdd.getHignEducation().equals("硕士")) {
if (empAdd.getHignEducation().equals("硕士")) {
employeeInfo.setHignEducation("7"); employeeInfo.setHignEducation("7");
} }else if (empAdd.getHignEducation().equals("博士")) {
if (empAdd.getHignEducation().equals("博士")) {
employeeInfo.setHignEducation("8"); employeeInfo.setHignEducation("8");
} }else if (empAdd.getHignEducation().equals("技工")) {
if (empAdd.getHignEducation().equals("技工")) {
employeeInfo.setHignEducation("9"); employeeInfo.setHignEducation("9");
} }else if (empAdd.getHignEducation().equals("职高")) {
if (empAdd.getHignEducation().equals("职高")) {
employeeInfo.setHignEducation("10"); employeeInfo.setHignEducation("10");
} }else if (empAdd.getHignEducation().equals("中专")) {
if (empAdd.getHignEducation().equals("中专")) {
employeeInfo.setHignEducation("11"); employeeInfo.setHignEducation("11");
}else {
//优化 如果非设定的最高学历 直接默认空
employeeInfo.setHignEducation(null);
} }
if ("5".equals(employeeInfo.getHignEducation()) if ("5".equals(employeeInfo.getHignEducation())
|| "6".equals(employeeInfo.getHignEducation()) || "6".equals(employeeInfo.getHignEducation())
......
...@@ -65,7 +65,10 @@ public class TGzContractServiceImpl implements TGzContractService { ...@@ -65,7 +65,10 @@ public class TGzContractServiceImpl implements TGzContractService {
TGzEmpInfo gzEmpInfo = tGzEmpInfoMapper.getInfoByOfferId(offerId); TGzEmpInfo gzEmpInfo = tGzEmpInfoMapper.getInfoByOfferId(offerId);
if (Common.isNotNull(gzEmpInfo)) { if (Common.isNotNull(gzEmpInfo)) {
// 确认 用合同编号(用户在页面上填写的) // 确认 用合同编号(用户在页面上填写的)
gzEmpInfo.setContractNum(contractInfo.getContractNo()); // gzEmpInfo.setContractNum(contractInfo.getContractNo());
// 1.7.13: 换成用合同申请号
gzEmpInfo.setContractNum(contractInfo.getApplyNo());
// 客服申请处选择“标准合同”传“外签-劳动合同 ”;“实习协议”传“外签-实习协议 ” // 客服申请处选择“标准合同”传“外签-劳动合同 ”;“实习协议”传“外签-实习协议 ”
if ("标准合同".equals(contractInfo.getContractName())) { if ("标准合同".equals(contractInfo.getContractName())) {
gzEmpInfo.setContractType("1E"); gzEmpInfo.setContractType("1E");
......
...@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -53,6 +54,9 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz ...@@ -53,6 +54,9 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz
@Lazy @Lazy
private DoJointTask doJointTask; private DoJointTask doJointTask;
// 任务类型是改状态的: 4:待接受Offer,5:拒绝Offer,6:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署
private final String[] taskTypeArr = {"4", "5", "6", "9", "10", "12", "13", "97", "8", "99"};
/** /**
* 瓜子系统交互任务跟进表简单分页查询 * 瓜子系统交互任务跟进表简单分页查询
* *
...@@ -90,7 +94,9 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz ...@@ -90,7 +94,9 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz
} }
// 先改为推送中 // 先改为推送中
findInfo.setPushTime(LocalDateTime.now());
findInfo.setPushStatus(CommonConstants.THREE_STRING); findInfo.setPushStatus(CommonConstants.THREE_STRING);
findInfo.setFailReason("");
findInfo.setUpdateBy(user.getId()); findInfo.setUpdateBy(user.getId());
findInfo.setUpdateTime(LocalDateTime.now()); findInfo.setUpdateTime(LocalDateTime.now());
this.updateById(tGzPushEntry); this.updateById(tGzPushEntry);
...@@ -108,6 +114,15 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz ...@@ -108,6 +114,15 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz
*/ */
@Override @Override
public void addPushEntry(TGzPushEntry tGzPushEntry) { public void addPushEntry(TGzPushEntry tGzPushEntry) {
// 流程是0的,不推送
if(CommonConstants.ZERO_STRING.equals(tGzPushEntry.getBizId())){
return;
}
// 仅存指定状态的任务
if (!ArrayUtils.contains(taskTypeArr, tGzPushEntry.getTaskType())) {
return;
}
// offer状态是 7 的,改为推送 6 // offer状态是 7 的,改为推送 6
if(CommonConstants.SEVEN_STRING.equals(tGzPushEntry.getTaskType())){ if(CommonConstants.SEVEN_STRING.equals(tGzPushEntry.getTaskType())){
......
...@@ -16,10 +16,12 @@ ...@@ -16,10 +16,12 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.archives.config.GzConfig; import com.yifu.cloud.plus.v1.yifu.archives.config.GzConfig;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TGzEmpInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TGzEmpInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TGzOfferInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*; import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -56,6 +58,8 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService { ...@@ -56,6 +58,8 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
private final TGzEmpInfoMapper tGzEmpInfoMapper; private final TGzEmpInfoMapper tGzEmpInfoMapper;
private final TGzOfferInfoMapper tGzOfferInfoMapper;
private final TGzEmpInfoService tGzEmpInfoService; private final TGzEmpInfoService tGzEmpInfoService;
private final TAttaInfoService tAttaInfoService; private final TAttaInfoService tAttaInfoService;
...@@ -172,6 +176,16 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService { ...@@ -172,6 +176,16 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("bizId", pushInfo.getBizId()); params.put("bizId", pushInfo.getBizId());
params.put("status", pushInfo.getTaskType()); params.put("status", pushInfo.getTaskType());
// 获取offer的信息,拿邮箱和手机号
TGzOfferInfo findOffer = tGzOfferInfoMapper.selectOne(Wrappers.<TGzOfferInfo>query().lambda()
.eq(TGzOfferInfo::getBizId, pushInfo.getBizId())
.eq(TGzOfferInfo::getDelFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if(Common.isNotNull(findOffer)){
params.put("phone", findOffer.getPhone());
params.put("email", findOffer.getEmail());
}
// 调瓜子接口 // 调瓜子接口
Map<String,String> returnMap = gzConfig.updateGzOfferStatus(restTemplate, params); Map<String,String> returnMap = gzConfig.updateGzOfferStatus(restTemplate, params);
// 公共处理瓜子返回的信息 // 公共处理瓜子返回的信息
...@@ -250,6 +264,14 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService { ...@@ -250,6 +264,14 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
// 公共处理瓜子返回的信息 // 公共处理瓜子返回的信息
this.handlePushReturnCommon(pushInfo, returnMap); this.handlePushReturnCommon(pushInfo, returnMap);
// 改档案里的【档案推送状态】为 已推送
if(CommonConstants.GZ_SUCCESS_CODE.equals(returnMap.get("responseCode"))){
LambdaUpdateWrapper<TGzEmpInfo> updateEmpWrapper = new LambdaUpdateWrapper<>();
updateEmpWrapper.eq(TGzEmpInfo::getBizId, pushInfo.getBizId())
.set(TGzEmpInfo::getEmpPushStatus, CommonConstants.ZERO_STRING);
tGzEmpInfoService.update(null, updateEmpWrapper);
}
} }
} }
...@@ -268,6 +290,14 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService { ...@@ -268,6 +290,14 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
// 公共处理瓜子返回的信息 // 公共处理瓜子返回的信息
this.handlePushReturnCommon(pushInfo, returnMap); this.handlePushReturnCommon(pushInfo, returnMap);
// 改档案里的【合同信息推送状态】状态为 已推送
if(CommonConstants.GZ_SUCCESS_CODE.equals(returnMap.get("responseCode"))){
LambdaUpdateWrapper<TGzEmpInfo> updateEmpWrapper = new LambdaUpdateWrapper<>();
updateEmpWrapper.eq(TGzEmpInfo::getBizId, pushInfo.getBizId())
.set(TGzEmpInfo::getContractPushStatus, CommonConstants.ZERO_STRING);
tGzEmpInfoService.update(null, updateEmpWrapper);
}
} }
} }
...@@ -341,6 +371,15 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService { ...@@ -341,6 +371,15 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
// 公共处理瓜子返回的信息 // 公共处理瓜子返回的信息
this.handlePushReturnCommon(pushInfo, returnMap); this.handlePushReturnCommon(pushInfo, returnMap);
// 改档案里的【合同附件推送状态】为 已推送
if(CommonConstants.GZ_SUCCESS_CODE.equals(returnMap.get("responseCode"))){
LambdaUpdateWrapper<TGzEmpInfo> updateEmpWrapper = new LambdaUpdateWrapper<>();
updateEmpWrapper.eq(TGzEmpInfo::getBizId, pushInfo.getBizId())
.set(TGzEmpInfo::getContractAttaPushStatus, CommonConstants.ZERO_STRING);
tGzEmpInfoService.update(null, updateEmpWrapper);
}
} catch (Exception e) { } catch (Exception e) {
log.error("瓜子附件推送失败!"); log.error("瓜子附件推送失败!");
pushInfo.setPushStatus(CommonConstants.ONE_STRING); pushInfo.setPushStatus(CommonConstants.ONE_STRING);
......
...@@ -793,7 +793,7 @@ ...@@ -793,7 +793,7 @@
FROM t_atta_info a FROM t_atta_info a
where a.RELATION_TYPE not in ('41','42','43') and a.domain_id = #{gzEmpId} where a.RELATION_TYPE not in ('41','42','43') and a.domain_id = #{gzEmpId}
</select> </select>
<!--推送瓜子的瓜子档案信息-合同--> <!--推送瓜子的瓜子档案信息-合同 注意:2025年7月17号,瓜子接口变更了,取值时:试用期预计结束日期 和 预计转正日期,调换了-->
<select id="getGzEmpInfoToPushGzByIdContract" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoPushGzContractVo"> <select id="getGzEmpInfoToPushGzByIdContract" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoPushGzContractVo">
SELECT SELECT
a.biz_id bizId, a.biz_id bizId,
...@@ -806,8 +806,8 @@ ...@@ -806,8 +806,8 @@
date_format(a.contract_end_dt, '%Y-%m-%d') contractEndDt, date_format(a.contract_end_dt, '%Y-%m-%d') contractEndDt,
date_format(a.contract_exp_end_dt, '%Y-%m-%d') contrctExpEndDt, date_format(a.contract_exp_end_dt, '%Y-%m-%d') contrctExpEndDt,
a.probation probation, a.probation probation,
date_format(a.prc_exp_dt, '%Y-%m-%d') prcExpDt, date_format(a.prc_exp_dt, '%Y-%m-%d') probationDt,
date_format(a.probation_dt, '%Y-%m-%d') probationDt, date_format(a.probation_dt, '%Y-%m-%d') prcExpDt,
a.nee_provider_id neeProviderId, a.nee_provider_id neeProviderId,
a.work_location workLocation, a.work_location workLocation,
'' fileId, '' fileId,
......
/*
* 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.ekp.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.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
* 预警配置表
*
* @author fxj
* @date 2025-07-21 09:49:56
*/
@Data
@TableName("ekp_alert_table")
@Schema(description = "预警配置表")
public class EkpAlertTable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String fdId;
/**
* 预警科目ID
*/
@ExcelAttribute(name = "预警科目ID", maxLength = 1000)
@Length(max = 1000, message = "预警科目ID不能超过1000个字符")
@ExcelProperty("预警科目ID")
@Schema(description = "预警科目ID")
private String fdAlertSubject;
/**
* 预警科目
*/
@ExcelAttribute(name = "预警科目", maxLength = 1000)
@Length(max = 1000, message = "预警科目不能超过1000个字符")
@ExcelProperty("预警科目")
@Schema(description = "预警科目")
private String fdAlertSubjectText;
/**
* 有效日期始
*/
@ExcelAttribute(name = "有效日期始", isDate = true)
@ExcelProperty("有效日期始")
@Schema(description = "有效日期始")
private Date fdEffectiveStartDate;
/**
* 有效日期止
*/
@ExcelAttribute(name = "有效日期止", isDate = true)
@ExcelProperty("有效日期止")
@Schema(description = "有效日期止")
private Date fdEffectiveEndDate;
/**
* 检测方式
*/
@ExcelAttribute(name = "检测方式", maxLength = 200)
@Length(max = 200, message = "检测方式不能超过200个字符")
@ExcelProperty("检测方式")
@Schema(description = "检测方式")
private String fdDetectionMethod;
/**
* 阈值(%)
*/
@ExcelAttribute(name = "阈值")
@ExcelProperty("阈值")
@Schema(description = "阈值")
private Integer fdThresholdValue;
/**
* 是否有效:是 否
*/
@ExcelAttribute(name = "是否有效", maxLength = 200)
@Length(max = 200, message = "是否有效不能超过200个字符")
@ExcelProperty("是否有效")
@Schema(description = "是否有效")
private String fdIsActive;
/**
* 预警内容
*/
@ExcelAttribute(name = "预警内容")
@ExcelProperty("预警内容")
@Schema(description = "预警内容")
private String fdAlertMessage;
/**
* 检测方式-每日时间
*/
@ExcelAttribute(name = "检测方式-每日", isDate = true)
@ExcelProperty("检测方式-每日")
@Schema(description = "检测方式-每日")
private Date fdEverydayTime;
/**
* 检测方式-每月:每月时间(日)
*/
@ExcelAttribute(name = "检测方式", maxLength = 20)
@Length(max = 20, message = "检测方式不能超过20个字符")
@ExcelProperty("检测方式")
@Schema(description = "检测方式")
private String fdChecktype;
/**
* 检测方式-每月:1.每月 2.每日
*/
@ExcelAttribute(name = "检测方式-每月")
@ExcelProperty("检测方式-每月")
@Schema(description = "检测方式-每月")
private Integer fdMonthday;
}
/*
* 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.ekp.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 org.hibernate.validator.constraints.Length;
import java.util.Date;
/**
* EKP预算预警表
*
* @author fxj
* @date 2025-07-15 11:53:01
*/
@Data
@TableName("ekp_budget_warning_info")
@Schema(description = "EKP预算预警表")
public class EkpBudgetWarningInfo{
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String fdId;
/**
* 预警内容
*/
@ExcelAttribute(name = "预警内容", maxLength = 300)
@Length(max = 300, message = "预警内容不能超过300个字符")
@ExcelProperty("预警内容")
@Schema(description = "预警内容")
private String fdContent;
/**
* 预警时间
*/
@ExcelAttribute(name = "预警时间", isDate = true)
@ExcelProperty("预警时间")
@Schema(description = "预警时间")
private Date fdCreateTime;
/**
* 科目
*/
@ExcelAttribute(name = "科目", maxLength = 50)
@Length(max = 50, message = "科目不能超过50个字符")
@ExcelProperty("科目")
@Schema(description = "科目")
private String fdSubject;
/**
* 阅读状态:0未读 1已读
*/
@ExcelAttribute(name = "阅读状态:0未读 1已读", maxLength = 10)
@Length(max = 10, message = "阅读状态:0未读 1已读不能超过10个字符")
@ExcelProperty("阅读状态:0未读 1已读")
@Schema(description = "阅读状态:0未读 1已读")
private String fdReadStatus;
/**
* 接受人姓名
*/
@ExcelAttribute(name = "接受人姓名", maxLength = 50)
@Length(max = 50, message = "接受人姓名不能超过50个字符")
@ExcelProperty("接受人姓名")
@Schema(description = "接受人姓名")
private String fdRecipientName;
/**
* 接收人账号
*/
@ExcelAttribute(name = "接收人账号", maxLength = 50)
@Length(max = 50, message = "接收人账号不能超过50个字符")
@ExcelProperty("接收人账号")
@Schema(description = "接收人账号")
private String fdRecipientAccount;
/**
* 接收人ID(EKP-ID)
*/
@ExcelAttribute(name = "接收人ID(EKP-ID)", maxLength = 36)
@Length(max = 36, message = "接收人ID(EKP-ID)不能超过36个字符")
@ExcelProperty("接收人ID(EKP-ID)")
@Schema(description = "接收人ID(EKP-ID)")
private String fdRecipientId;
}
/*
* 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.ekp.vo;
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 com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
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 fxj
* @date 2025-07-21 09:49:56
*/
@Data
@Schema(description = "预警配置表")
public class BudgetWarningVo {
/**
* 科目
*/
@Schema(description = "科目")
private String km;
/**
* 提醒时间
*/
@Schema(description = "提醒时间")
private String at;
/**
* 余额
*/
@Schema(description = "余额")
private Double ye;
/**
* 比率
*/
@Schema(description = "比率")
private Double bl;
/**
* 二级成本中心
*/
@Schema(description = "二级成本中心")
private String cbzx;
/**
* 二级成本中心-提醒人
*/
@Schema(description = "二级成本中心-提醒人")
private String txr;
/**
* 阀值-剩余
*/
@Schema(description = "阀值-剩余")
private Integer fz;
}
package com.yifu.cloud.plus.v1.ekp.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;
@Value("${wx.domainName}")
private String domainName;
@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.debug("发企业微信===请求:{}", 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.debug("发企业微信===返回:{}",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);
}
}
/*
* 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.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.service.EkpAlertTableService;
import com.yifu.cloud.plus.v1.ekp.vo.EkpIncomePushInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 预警配置表
*
* @author fxj
* @date 2025-07-21 09:49:56
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/ekpalerttable")
@Tag(name = "预警配置表管理")
public class EkpAlertTableController {
private final EkpAlertTableService ekpAlertTableService;
/**
* @return
* @Author fxj
* @Description 定时任务推送 预算超额预警信息 按日推送
* @Date 10:03 2025/7/21
* @Param
**/
@Inner
@PostMapping("/inner/pushBudgetAlertInfoTomanager")
public void pushRiskInfoToEkp() {
ekpAlertTableService.pushBudgetAlertInfoTomanager(1);
}
/**
* @return
* @Author fxj
* @Description 定时任务推送 预算超额预警信息 按月推送
* @Date 10:03 2025/7/21
* @Param
**/
@Inner
@PostMapping("/inner/pushBudgetAlertInfoTomanagerMonth")
public void pushBudgetAlertInfoTomanagerMonth() {
ekpAlertTableService.pushBudgetAlertInfoTomanager(0);
}
}
/*
* 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.ekp.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.ekp.entity.EkpAlertTable;
import com.yifu.cloud.plus.v1.ekp.vo.BudgetWarningVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 预警配置表
*
* @author fxj
* @date 2025-07-21 09:49:56
*/
@Mapper
public interface EkpAlertTableMapper extends BaseMapper<EkpAlertTable> {
/**
* 预警配置表简单分页查询
*
* @param ekpAlertTable 预警配置表
* @return
*/
IPage<EkpAlertTable> getEkpAlertTablePage(Page<EkpAlertTable> page, @Param("ekpAlertTable") EkpAlertTable ekpAlertTable);
List<BudgetWarningVo> getBudgetWarningVos(@Param("km") String km);
List<EkpAlertTable> getEkpAlertTableList(int type);
}
/*
* 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.ekp.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.ekp.entity.EkpBudgetWarningInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* EKP预算预警表
*
* @author fxj
* @date 2025-07-15 11:53:01
*/
@Mapper
public interface EkpBudgetWarningInfoMapper extends BaseMapper<EkpBudgetWarningInfo> {
/**
* EKP预算预警表简单分页查询
*
* @param ekpBudgetWarningInfo EKP预算预警表
* @return
*/
IPage<EkpBudgetWarningInfo> getEkpBudgetWarningInfoPage(Page<EkpBudgetWarningInfo> page, @Param("ekpBudgetWarningInfo") EkpBudgetWarningInfo ekpBudgetWarningInfo);
}
/*
* 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.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpAlertTable;
/**
* 预警配置表
*
* @author fxj
* @date 2025-07-21 09:49:56
*/
public interface EkpAlertTableService extends IService<EkpAlertTable> {
void pushBudgetAlertInfoTomanager(int type);
}
/*
* 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.ekp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.ekp.config.WxConfig;
import com.yifu.cloud.plus.v1.ekp.entity.EkpAlertTable;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBudgetWarningInfo;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpAlertTableMapper;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpBudgetWarningInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.EkpAlertTableService;
import com.yifu.cloud.plus.v1.ekp.vo.BudgetWarningVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo;
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.dapr.util.UpmsDaprUtils;
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.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/**
* 预警配置表
*
* @author fxj
* @date 2025-07-21 09:49:56
*/
@Log4j2
@Service
public class EkpAlertTableServiceImpl extends ServiceImpl<EkpAlertTableMapper, EkpAlertTable> implements EkpAlertTableService {
@Autowired
private WxConfig wxConfig;
@Autowired
private UpmsDaprUtils upmsDaprUtils;
@Autowired
private EkpBudgetWarningInfoMapper warningInfoMapper;
/**
* @Author fxj
* @Description 推送企业微信消息
* @Date 15:29 2025/7/21
**/
private void pushInsuranceAlertToWx(List<BudgetWarningVo> vos) {
try {
if (Common.isNotKong(vos)){
// 科目+二级成本中心 作为key 创建预警信息map
Map<String, BudgetWarningVo> pushMap = new HashMap<>();
// 科目+二级成本中心 作为key 创建用户信息map
Map<String, List<SysUser>> sysUserMap = new HashMap<>();
Map<String, List<String>> sysUserEkpMap = new HashMap<>();
// 遍历预警信息列表,按科目+二级成本中心初始化Map
for (BudgetWarningVo vo : vos) {
// 创建组合键
String key = vo.getKm() + "_" + vo.getCbzx();
// 将预警信息放入Map中
pushMap.put(key, vo);
sysUserMap.putAll(getMapInfo(vo));
sysUserEkpMap.putAll(getMapInfoEkp(vo));
}
//开始推送信息到企业微信
if (Common.isNotKong(pushMap) && Common.isNotNull(sysUserEkpMap)){
List<SysUser> users;
List<String> userIds;
BudgetWarningVo config;
String content;
for (Map.Entry<String, BudgetWarningVo> entry : pushMap.entrySet()){
users = sysUserMap.get(entry.getKey());
userIds = sysUserEkpMap.get(entry.getKey());
config = pushMap.get(entry.getKey());
if (Common.isNotKong(config)){
content = String.format("系统告警:%s 当前您所属的成本中心:%s下的%s预算余额剩余%s元,已不足%s%%,请关注预算使用情况。如有需要,可尽快追加预算,以免影响人员报销。",
config.getAt(),
config.getCbzx(),
config.getKm(),
config.getYe(),
config.getFz(),
config.getFz());
// 处理推送信息保存
hanlderWarning(users, config, content,userIds);
}
}
}
}
} catch (Exception e){
log.error("推送预算预警信息到企业微信异常",e);
}
}
private void hanlderWarning(List<SysUser> users, BudgetWarningVo config, String content, List<String> userIds) {
EkpBudgetWarningInfo warningInfo;
HashMap<String,SysUser> userWxMap = new HashMap<>();
if (Common.isNotKong(users)){
for (SysUser user : users){
userWxMap.put(user.getUsername(),user);
}
}
if (Common.isNotKong(userIds)){
SysUser userTemp;
for (String userId : userIds){
String[] temp = userId.split("_");
if (temp.length > 1){
userTemp =userWxMap.get(temp[0]);
sendMessageToWx(null== userTemp?null:userTemp.getWxMessage(), content);
warningInfo = new EkpBudgetWarningInfo();
warningInfo.setFdContent(content);
warningInfo.setFdReadStatus(CommonConstants.ZERO_STRING);
warningInfo.setFdCreateTime(new Date());
warningInfo.setFdSubject(config.getKm());
warningInfo.setFdRecipientName(null== userTemp?null:userTemp.getNickname());
warningInfo.setFdRecipientAccount(null== userTemp?temp[0]:userTemp.getUsername());
warningInfo.setFdRecipientId(temp[1]);
warningInfoMapper.insert(warningInfo);
}
}
}
}
/**
* @Author fxj
* @Description 初始化 账号对应的用户信息
* @Date 19:49 2025/4/23
**/
private Map<String, List<SysUser>> getMapInfo(BudgetWarningVo vo) {
Map<String, List<SysUser>> sysUserMap = new HashMap<>();
if (Common.isNotKong(vo) && Common.isNotKong(vo.getTxr())) {
if (vo.getTxr().length() > CommonConstants.ZERO_INT) {
R<SysUserListVo> res = upmsDaprUtils.getUserIdsByUserNames(getLoginNames(vo.getTxr()));
List<SysUser> users = null;
if (Common.isNotNull(res) && Common.isNotNull(res.getData()) && Common.isNotNull(res.getData().getUserList())) {
users = res.getData().getUserList();
}
if (Common.isNotKong(users)) {
sysUserMap.put(vo.getKm() + "_" +vo.getCbzx(), users);
}
}
}
return sysUserMap;
}
private Map<String, List<String>> getMapInfoEkp(BudgetWarningVo vo) {
Map<String, List<String>> map = new HashMap<>();
if (Common.isNotKong(vo) && Common.isNotKong(vo.getTxr())) {
List<String> loginNames = Arrays.stream(vo.getTxr().split(","))
.filter(loginName -> !loginName.isEmpty())
.collect(Collectors.toList());
if (Common.isNotNull(loginNames)) {
map.put(vo.getKm() + "_" +vo.getCbzx(), loginNames);
}
}
return map;
}
private String getLoginNames(String txr) {
//txr格式 loginName_id 获取到所有的loginName
if (Common.isEmpty(txr)) {
return txr;
}
return Arrays.stream(txr.split(","))
.map(part -> part.split("_")[0])
.filter(loginName -> !loginName.isEmpty())
.collect(Collectors.joining( ","));
}
//发送企业微信待办
private void sendMessageToWx(String useruserWx, String content) {
if (Common.isEmpty(useruserWx) || Common.isEmpty(content)) {
return;
}
StringBuilder sendUser = null;
if (Common.isNotKong(useruserWx)) {
sendUser = new StringBuilder(useruserWx);
}
if (sendUser != null) {
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>();
textcard.put("title", "预算预警");
// 传参77 企微详情提升“请至EKP系统处理!”
textcard.put("url", String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "77" ));
textcard.put("description", content.toString());
requestMap.put("touser", sendUser);
requestMap.put("agentid", wxConfig.getAgentid());
requestMap.put("msgtype", "textcard");
requestMap.put("textcard", textcard);
// 必须加上header说明
if (!wxConfig.sendTextCard(restTemplate, requestMap)) {
wxConfig.sendTextCard(restTemplate, requestMap);
}
}
}
/**
* @Author fxj
* @Description
* @Date 16:39 2025/7/21
* @Param type 0 按月 1 按日
* @return
**/
@Override
public void pushBudgetAlertInfoTomanager(int type) {
try {
// 1. 获取当前时间
LocalDateTime now = LocalDateTime.now();
// 2. 查询所有有效的预警配置
List<EkpAlertTable> alertSubjects = baseMapper.getEkpAlertTableList(type);
// 3. 处理每个预警配置
List<BudgetWarningVo> budgetWarningVos = new ArrayList<>();
for (EkpAlertTable config : alertSubjects) {
// 4. 判断是否满足执行条件
if (shouldTriggerAlert(config,now,type)){
// 5. 获取实际数据并判断是否达到阈值,符合条件则返回预警信息
budgetWarningVos.addAll(isBudgetExceeded(config));
}
}
if (Common.isNotNull(budgetWarningVos)) {
// 6. 发送预警信息 + 记录预警信息
pushInsuranceAlertToWx(budgetWarningVos);
}
} catch (Exception e) {
log.error("执行预算预警任务时发生异常:", e);
}
}
/**
* @param config 预警配置
* @return 是否超额
*/
private List<BudgetWarningVo> isBudgetExceeded(EkpAlertTable config) {
List<BudgetWarningVo> resList = new ArrayList<>();
if (null == config || null == config.getFdThresholdValue() || null == config.getFdAlertSubjectText()) {
return resList;
}
//通过传参 科目获取需要预警的预算数据
List<BudgetWarningVo> list = baseMapper.getBudgetWarningVos(config.getFdAlertSubjectText());
if (Common.isNotKong(list)) {
for (BudgetWarningVo vo : list) {
//大于阀值且二级成本中心审核人不为空
if (vo.getBl() >= Double.valueOf(config.getFdThresholdValue()) && Common.isNotNull(vo.getTxr())) {
vo.setFz(100-(null==config.getFdThresholdValue()?0:config.getFdThresholdValue().intValue()));
resList.add(vo);
}
}
}
return resList;
}
/**
* 检查预警是否应该触发
*
* @param config 预警配置
* @param currentDateTime 当前时间
* @return 是否应该触发预警
*/
private boolean shouldTriggerAlert(EkpAlertTable config, LocalDateTime currentDateTime,int type) {
if (!"自动".equals(config.getFdDetectionMethod())){
return false;
}
if (type == 1){
// 处理按日配置
if ("每日".equals(config.getFdChecktype())) {
Date dailyTime = config.getFdEverydayTime(); // 获取每日执行时间
if (dailyTime != null) {
// 如果当前时间的小时 正好等于配置的时间的小时返回true
return currentDateTime.getHour() == dailyTime.getHours();
}
}
}{
// 处理按日配置
if ("每月".equals(config.getFdChecktype())) {
if (null != config.getFdMonthday()) {
// 当前日等于配置的日 返回 true
return currentDateTime.getDayOfMonth() == config.getFdMonthday().intValue();
}
}
}
return false;
}
}
...@@ -45,4 +45,11 @@ entry: ...@@ -45,4 +45,11 @@ entry:
entryFdFlowId: 191919ae533d0484bb60c5ed74e55a4b entryFdFlowId: 191919ae533d0484bb60c5ed74e55a4b
entryDocStatus: 20 entryDocStatus: 20
entryLoginName: admin entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口 entryDocSubject: 入账明细推送ekp接口
\ No newline at end of file
wx:
corpid: wwbcb090af0dfe50e5
corpsecret: R0nKkvsY-oF41fuQvUXZ-kFG3_g_Ce0bpZt6mByx524
agentid: 1000009
authUrl: https://wx.worfu.com/yifu-auth/method/oauth/wxLogin
domainName: https://wx.worfu.com
\ No newline at end of file
...@@ -111,4 +111,11 @@ entry: ...@@ -111,4 +111,11 @@ entry:
entryFdFlowId: 191919ae533d080b60e6e784c55a3c8b entryFdFlowId: 191919ae533d080b60e6e784c55a3c8b
entryDocStatus: 20 entryDocStatus: 20
entryLoginName: admin entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口 entryDocSubject: 入账明细推送ekp接口
\ No newline at end of file
wx:
corpid: wwbcb090af0dfe50e5
corpsecret: 16kqEL_eU-ARwYyqLgEBWHgxm8gXVnkzv_eJMLy9NpU
agentid: 1000010
authUrl: https://test-wx.worfu.com/yifu-auth/method/oauth/wxLogin
domainName: https://test-wx.worfu.com
\ No newline at end of file
<?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.ekp.mapper.EkpAlertTableMapper">
<resultMap id="budgetWarningMap" type="com.yifu.cloud.plus.v1.ekp.vo.BudgetWarningVo">
<id property="km" column="km"/>
<result property="at" column="at"/>
<result property="ye" column="ye"/>
<result property="bl" column="bl"/>
<result property="cbzx" column="cbzx"/>
<result property="txr" column="txr"/>
</resultMap>
<resultMap id="ekpAlertTableMap" type="com.yifu.cloud.plus.v1.ekp.entity.EkpAlertTable">
<id property="fdId" column="fd_id"/>
<result property="fdAlertSubject" column="fd_alert_subject"/>
<result property="fdAlertSubjectText" column="fd_alert_subject_text"/>
<result property="fdEffectiveStartDate" column="fd_effective_start_date"/>
<result property="fdEffectiveEndDate" column="fd_effective_end_date"/>
<result property="fdDetectionMethod" column="fd_detection_method"/>
<result property="fdThresholdValue" column="fd_threshold_value"/>
<result property="fdIsActive" column="fd_is_active"/>
<result property="fdAlertMessage" column="fd_alert_message"/>
<result property="fdEverydayTime" column="fd_everyday_time"/>
<result property="fdChecktype" column="fd_checktype"/>
<result property="fdMonthday" column="fd_monthday"/>
</resultMap>
<sql id="Base_Column_List">
a.fd_id,
a.fd_alert_subject,
a.fd_alert_subject_text,
a.fd_effective_start_date,
a.fd_effective_end_date,
a.fd_detection_method,
a.fd_threshold_value,
a.fd_is_active,
a.fd_alert_message,
a.fd_everyday_time,
a.fd_checktype,
a.fd_monthday
</sql>
<sql id="ekpAlertTable_where">
<if test="ekpAlertTable != null">
<if test="ekpAlertTable.fdId != null and ekpAlertTable.fdId.trim() != ''">
AND a.fd_id = #{ekpAlertTable.fdId}
</if>
<if test="ekpAlertTable.fdAlertSubject != null and ekpAlertTable.fdAlertSubject.trim() != ''">
AND a.fd_alert_subject = #{ekpAlertTable.fdAlertSubject}
</if>
<if test="ekpAlertTable.fdAlertSubjectText != null and ekpAlertTable.fdAlertSubjectText.trim() != ''">
AND a.fd_alert_subject_text = #{ekpAlertTable.fdAlertSubjectText}
</if>
<if test="ekpAlertTable.fdEffectiveStartDate != null">
AND a.fd_effective_start_date = #{ekpAlertTable.fdEffectiveStartDate}
</if>
<if test="ekpAlertTable.fdEffectiveEndDate != null">
AND a.fd_effective_end_date = #{ekpAlertTable.fdEffectiveEndDate}
</if>
<if test="ekpAlertTable.fdDetectionMethod != null and ekpAlertTable.fdDetectionMethod.trim() != ''">
AND a.fd_detection_method = #{ekpAlertTable.fdDetectionMethod}
</if>
<if test="ekpAlertTable.fdThresholdValue != null">
AND a.fd_threshold_value = #{ekpAlertTable.fdThresholdValue}
</if>
<if test="ekpAlertTable.fdIsActive != null and ekpAlertTable.fdIsActive.trim() != ''">
AND a.fd_is_active = #{ekpAlertTable.fdIsActive}
</if>
<if test="ekpAlertTable.fdAlertMessage != null and ekpAlertTable.fdAlertMessage.trim() != ''">
AND a.fd_alert_message = #{ekpAlertTable.fdAlertMessage}
</if>
<if test="ekpAlertTable.fdEverydayTime != null">
AND a.fd_everyday_time = #{ekpAlertTable.fdEverydayTime}
</if>
<if test="ekpAlertTable.fdChecktype != null and ekpAlertTable.fdChecktype.trim() != ''">
AND a.fd_checktype = #{ekpAlertTable.fdChecktype}
</if>
<if test="ekpAlertTable.fdMonthday != null">
AND a.fd_monthday = #{ekpAlertTable.fdMonthday}
</if>
</if>
</sql>
<!--ekpAlertTable简单分页查询-->
<select id="getEkpAlertTablePage" resultMap="ekpAlertTableMap">
SELECT
<include refid="Base_Column_List"/>
FROM ekp_alert_table a
<where>
1=1
<include refid="ekpAlertTable_where"/>
</where>
</select>
<select id="getBudgetWarningVos" resultMap="budgetWarningMap">
select
a.fd_ke_mu as 'km',
DATE_FORMAT(NOW(),"%Y-%m-%d %H:%i") as 'at',
ROUND((sum(a.fd_money) - sum(ifnull(b.fd_money,0))),2) as 'ye'
,ROUND(sum(ifnull(b.fd_money,0))/sum(a.fd_money)*100,2) as 'bl',
a.fd_cheng_ben_two as 'cbzx',c.txr
from (select sum(a.fd_money) fd_money,a.fd_cheng_ben_two,a.fd_ke_mu,a.fd_fee_type,a.fd_id from view_xing_zheng_yu_suan_all a where a.fd_date_month like concat(DATE_FORMAT(now(),'%Y-'),'%') GROUP BY a.fd_ke_mu,a.fd_cheng_ben_two) a
left join (
select
ifnull(sum(a.fd_money),0) fd_money,fd_ke_mu,fd_cheng_ben_two
from view_xing_zheng_yu_suan a where DATE_FORMAT(a.fd_date,'%Y') = DATE_FORMAT(now(),'%Y')
GROUP BY fd_ke_mu,fd_cheng_ben_two
) b on b.fd_ke_mu = a.fd_ke_mu and b.fd_cheng_ben_two = a.fd_cheng_ben_two
LEFT JOIN (
select GROUP_CONCAT(DISTINCT CONCAT(d.fd_login_name,"_",d.fd_id)) as 'txr',cb.fd_3c290891cded14 from ekp_3cf9b7112e544ba9fe18 cb
LEFT JOIN ekporg_18ca06406b8e5d35104b t on t.fd_parent_id=cb.fd_id
LEFT JOIN sys_org_person d on t.sys_org_person_id=d.fd_id
GROUP BY cb.fd_id
) c on c.fd_3c290891cded14 = a.fd_cheng_ben_two
where a.fd_ke_mu = #{km}
GROUP BY a.fd_ke_mu,a.fd_cheng_ben_two ORDER BY a.fd_id
</select>
<select id="getEkpAlertTableList" resultMap="ekpAlertTableMap">
SELECT
<include refid="Base_Column_List"/>
FROM ekp_alert_table a
<where>
1=1
AND a.fd_effective_start_date <![CDATA[ <= ]]> NOW()
AND a.fd_effective_end_date >= NOW()
AND a.fd_is_active = '是'
<if test="type ==0 ">
AND fd_checktype = '每月'
</if>
<if test="type ==1 ">
AND fd_checktype = '每日'
</if>
</where>
</select>
</mapper>
<?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.ekp.mapper.EkpBudgetWarningInfoMapper">
<resultMap id="ekpBudgetWarningInfoMap" type="com.yifu.cloud.plus.v1.ekp.entity.EkpBudgetWarningInfo">
<id property="fdId" column="fd_id"/>
<result property="fdContent" column="fd_content"/>
<result property="fdCreateTime" column="fd_create_time"/>
<result property="fdSubject" column="fd_subject"/>
<result property="fdReadStatus" column="fd_read_status"/>
<result property="fdRecipientName" column="fd_recipient_name"/>
<result property="fdRecipientAccount" column="fd_recipient_account"/>
<result property="fdRecipientId" column="fd_recipient_id"/>
</resultMap>
<sql id="Base_Column_List">
a.fd_id,
a.fd_content,
a.fd_create_time,
a.fd_subject,
a.fd_read_status,
a.fd_recipient_name,
a.fd_recipient_account,
a.fd_recipient_id
</sql>
<sql id="ekpBudgetWarningInfo_where">
<if test="ekpBudgetWarningInfo != null">
<if test="ekpBudgetWarningInfo.fdId != null and ekpBudgetWarningInfo.fdId.trim() != ''">
AND a.fd_id = #{ekpBudgetWarningInfo.fdId}
</if>
<if test="ekpBudgetWarningInfo.fdContent != null and ekpBudgetWarningInfo.fdContent.trim() != ''">
AND a.fd_content = #{ekpBudgetWarningInfo.fdContent}
</if>
<if test="ekpBudgetWarningInfo.fdCreateTime != null">
AND a.fd_create_time = #{ekpBudgetWarningInfo.fdCreateTime}
</if>
<if test="ekpBudgetWarningInfo.fdSubject != null and ekpBudgetWarningInfo.fdSubject.trim() != ''">
AND a.fd_subject = #{ekpBudgetWarningInfo.fdSubject}
</if>
<if test="ekpBudgetWarningInfo.fdReadStatus != null and ekpBudgetWarningInfo.fdReadStatus.trim() != ''">
AND a.fd_read_status = #{ekpBudgetWarningInfo.fdReadStatus}
</if>
<if test="ekpBudgetWarningInfo.fdRecipientName != null and ekpBudgetWarningInfo.fdRecipientName.trim() != ''">
AND a.fd_recipient_name = #{ekpBudgetWarningInfo.fdRecipientName}
</if>
<if test="ekpBudgetWarningInfo.fdRecipientAccount != null and ekpBudgetWarningInfo.fdRecipientAccount.trim() != ''">
AND a.fd_recipient_account = #{ekpBudgetWarningInfo.fdRecipientAccount}
</if>
<if test="ekpBudgetWarningInfo.fdRecipientId != null and ekpBudgetWarningInfo.fdRecipientId.trim() != ''">
AND a.fd_recipient_id = #{ekpBudgetWarningInfo.fdRecipientId}
</if>
</if>
</sql>
<!--ekpBudgetWarningInfo简单分页查询-->
<select id="getEkpBudgetWarningInfoPage" resultMap="ekpBudgetWarningInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM ekp_budget_warning_info a
<where>
1=1
<include refid="ekpBudgetWarningInfo_where"/>
</where>
</select>
</mapper>
...@@ -72,4 +72,25 @@ public class EkpTask { ...@@ -72,4 +72,25 @@ public class EkpTask {
HttpDaprUtil.invokeMethodPost(daprEkpProperties.getAppUrl(),daprEkpProperties.getAppId(),"/icbcIssue/inner/getPdfFile","", Object.class, SecurityConstants.FROM_IN); HttpDaprUtil.invokeMethodPost(daprEkpProperties.getAppUrl(),daprEkpProperties.getAppId(),"/icbcIssue/inner/getPdfFile","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时生成生成昨日的回单文件-定时任务结束------------"); log.info("------------定时生成生成昨日的回单文件-定时任务结束------------");
} }
/**
* @Author fxj
* @Description 每日预算预警信息
* @Date 16:49 2025/7/21
**/
public void pushBudgetAlertInfoTomanager() {
log.info("------------定时生成每日预算预警信息-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprEkpProperties.getAppUrl(),daprEkpProperties.getAppId(),"/ekpalerttable/inner/pushBudgetAlertInfoTomanager","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时生成生每日预算预警信息-定时任务结束------------");
}
/**
* @Author fxj
* @Description 每月预算预警信息
* @Date 16:49 2025/7/21
**/
public void pushBudgetAlertInfoTomanagerMonth() {
log.info("------------定时生成每月预算预警信息-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprEkpProperties.getAppUrl(),daprEkpProperties.getAppId(),"/ekpalerttable/inner/pushBudgetAlertInfoTomanagerMonth","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时生成每月预算预警信息-定时任务结束------------");
}
} }
\ No newline at end of file
...@@ -179,4 +179,13 @@ public class SocialHandleSearchVo extends TDispatchInfo { ...@@ -179,4 +179,13 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@ExcelIgnore @ExcelIgnore
private String[] socialHandleStatusArr; private String[] socialHandleStatusArr;
/**
* @Author fxj
* @Description 社保反馈文件下载标识
* @Date 12:28 2025/7/17
**/
@ExcelProperty("社保反馈文件下载标识" )
@ExcelIgnore
private String backFileFlag;
} }
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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 org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author hgw
* @Description 社保士兵自动办理导出
* @Date 2024-5-13 10:56:51
* @Param
* @return
**/
@Data
public class SocialSoldierBackVo implements Serializable {
/**
* 派单ID
*/
@ExcelAttribute(name = "派单ID")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单ID")
private String dispatchId;
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
private String empName;
/**
* 员工身份证
*/
@ExcelAttribute(name = "员工身份证", errorInfo = "员工身份证不能为空", maxLength = 20, needExport = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工身份证")
private String empIdcard;
@ExcelAttribute(name = "养老工伤失业-办理状态", readConverterExp = "0=无,1=待办理,2=自动办理中,3=继续办理,4=中止办理,5=人工处理,6=成功,7=提交成功", needExport = true)
@Schema(description = "养老工伤失业-办理状态")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老工伤失业-办理状态")
private String ygsHandleStatus;
@ExcelAttribute(name = "医保生育大病-办理状态", readConverterExp = "0=无,1=待办理,2=自动办理中,3=继续办理,4=中止办理,5=人工处理,6=成功,7=提交成功", needExport = true)
@Schema(description = "医保生育大病-办理状态")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保生育大病-办理状态")
private String ysdHandleStatus;
@ExcelAttribute(name = "社保明细ID")
@Schema(description = "社保明细ID")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保明细ID")
private String socialId;
/**
* 社保户
*/
@ExcelAttribute(name = "社保户", needExport = true)
@Schema(description = "社保户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保户")
private String socialHouseholdName;
}
...@@ -131,4 +131,15 @@ public class TSocialSoldierPageVo extends TDispatchInfo { ...@@ -131,4 +131,15 @@ public class TSocialSoldierPageVo extends TDispatchInfo {
@ExcelProperty("社保顺延时间" ) @ExcelProperty("社保顺延时间" )
private Date ygsSocialStartDateNext; private Date ygsSocialStartDateNext;
/**
* @Author fxj
* @Description 社保反馈文件下载标识
* @Date 12:28 2025/7/17
**/
@ExcelAttribute(name = "社保反馈文件下载标识", maxLength = 20)
@Schema(description = "社保反馈文件下载标识" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保反馈文件下载标识" )
private String backFileFlag;
} }
...@@ -9,9 +9,12 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException; ...@@ -9,9 +9,12 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
import com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult; import com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult;
import com.yifu.cloud.plus.v1.yifu.social.vo.SociaFriendYgsAddVo; import com.yifu.cloud.plus.v1.yifu.social.vo.SociaFriendYgsAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierBackVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierExportVo;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -19,13 +22,12 @@ import org.springframework.context.annotation.Configuration; ...@@ -19,13 +22,12 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.http.*; import org.springframework.http.*;
import org.springframework.security.core.parameters.P; import org.springframework.security.core.parameters.P;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import java.net.URL;
import java.security.SignatureException; import java.security.SignatureException;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.TreeMap;
import static com.alibaba.fastjson.serializer.SerializerFeature.*; import static com.alibaba.fastjson.serializer.SerializerFeature.*;
...@@ -64,6 +66,12 @@ public class SocialFriendConfig { ...@@ -64,6 +66,12 @@ public class SocialFriendConfig {
// url拉结果数据 // url拉结果数据
@Value("${socialFriend.urlUpload}") @Value("${socialFriend.urlUpload}")
private String urlUpload; private String urlUpload;
// url人员维度网厅源文件下载(个人审核查询证明)
@Value("${socialFriend.urlDownloadEmployeeAsync}")
private String urlDownloadEmployeeAsync;
@Value("${socialFriend.urlDownloadEmployeeFeedback}")
// URL人员维度网厅源文件下载反馈
private String urlDownloadEmployeeFeedback;
private static final String APP_KEY = "appKey"; private static final String APP_KEY = "appKey";
...@@ -71,10 +79,11 @@ public class SocialFriendConfig { ...@@ -71,10 +79,11 @@ public class SocialFriendConfig {
private static final String X_REQ_NONCE = "xReqNonce"; private static final String X_REQ_NONCE = "xReqNonce";
private static final String VERSION = "version"; private static final String VERSION = "version";
private static final SerializerFeature[] features = new SerializerFeature[] { private static final SerializerFeature[] features = new SerializerFeature[]{
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty, WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty,WriteDateUseDateFormat WriteNullStringAsEmpty, WriteDateUseDateFormat
}; };
/** /**
* @param : listVo 同一类(户、增减)的前100个 * @param : listVo 同一类(户、增减)的前100个
* @param : vo 第一个,存账密等信息 * @param : vo 第一个,存账密等信息
...@@ -158,11 +167,11 @@ public class SocialFriendConfig { ...@@ -158,11 +167,11 @@ public class SocialFriendConfig {
if (Common.isNotNull(vo.getQyzgshbxzyhmc())) { if (Common.isNotNull(vo.getQyzgshbxzyhmc())) {
JSONArray qyzgshbxzyhmclbArr = new JSONArray(); JSONArray qyzgshbxzyhmclbArr = new JSONArray();
qyzgshbxzyhmclbArr.add(vo.getQyzgshbxzyhmc()); qyzgshbxzyhmclbArr.add(vo.getQyzgshbxzyhmc());
if (type <3 && vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) { if (type < 3 && vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) {
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松 // 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgListYgs()); qyzgshbxzyhmclbArr.addAll(vo.getImgListYgs());
} }
if (type >2 && vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) { if (type > 2 && vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) {
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松 // 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgListYsd()); qyzgshbxzyhmclbArr.addAll(vo.getImgListYsd());
} }
...@@ -174,11 +183,11 @@ public class SocialFriendConfig { ...@@ -174,11 +183,11 @@ public class SocialFriendConfig {
} else if (Common.isNotNull(vo.getQyzgjbylbxcbdjb())) { } else if (Common.isNotNull(vo.getQyzgjbylbxcbdjb())) {
JSONArray qyzgshbxzyhmclbArr = new JSONArray(); JSONArray qyzgshbxzyhmclbArr = new JSONArray();
qyzgshbxzyhmclbArr.add(vo.getQyzgjbylbxcbdjb()); qyzgshbxzyhmclbArr.add(vo.getQyzgjbylbxcbdjb());
if (type <3 && vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) { if (type < 3 && vo.getImgListYgs() != null && !vo.getImgListYgs().isEmpty()) {
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松 // 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgListYgs()); qyzgshbxzyhmclbArr.addAll(vo.getImgListYgs());
} }
if (type >2 && vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) { if (type > 2 && vo.getImgListYsd() != null && !vo.getImgListYsd().isEmpty()) {
// 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松 // 税友新附件接口说用原来的:那就一批任务里面用一份文件就可以了 还是原来的那个字段 2025-5-16 16:57:00 王赣松
qyzgshbxzyhmclbArr.addAll(vo.getImgListYsd()); qyzgshbxzyhmclbArr.addAll(vo.getImgListYsd());
} }
...@@ -295,7 +304,7 @@ public class SocialFriendConfig { ...@@ -295,7 +304,7 @@ public class SocialFriendConfig {
} }
} }
} else { } else {
backLog.setSocialId(appAddUrl+"返回dataResultList为空"); backLog.setSocialId(appAddUrl + "返回dataResultList为空");
} }
return urlStr; return urlStr;
} }
...@@ -662,7 +671,7 @@ public class SocialFriendConfig { ...@@ -662,7 +671,7 @@ public class SocialFriendConfig {
JSONObject blxmjglb; JSONObject blxmjglb;
String zt; String zt;
String cwxx; String cwxx;
for (int i=0; i<ryywbljglbArr.size(); i++) { for (int i = 0; i < ryywbljglbArr.size(); i++) {
ryywbljglb = (JSONObject) ryywbljglbArr.get(i); ryywbljglb = (JSONObject) ryywbljglbArr.get(i);
result = new FriendResult(); result = new FriendResult();
// 身份证 // 身份证
...@@ -757,4 +766,190 @@ public class SocialFriendConfig { ...@@ -757,4 +766,190 @@ public class SocialFriendConfig {
return birthStr; return birthStr;
} }
/**
* @return
* @Author fxj
* @Description
* @Date 14:33 2025/7/15
* @Param type 0 社保 1 医保
* @Param subType 0 增员 1 减员
**/
public HashMap<String, String> getDownloadEmployeeAsync(RestTemplate restTemplate, SysHouseHoldInfo houseHold,
SocialSoldierBackVo backVo) {
HashMap<String, String> result = new HashMap<>();
try {
// 构建请求头
HttpHeaders headers = buildCommonHeaders(null);
// 构建请求体 JSON
JSONObject requestBody = buildDownloadRequestJson(houseHold, backVo);
HttpEntity<String> formEntity = new HttpEntity<>(requestBody.toJSONString(), headers);
// 发起异步下载请求
String downloadEmployeeAsyncUrl = urlPre + urlDownloadEmployeeAsync;
String dataResultList = restTemplate.postForObject(downloadEmployeeAsyncUrl, formEntity, String.class);
if (Common.isNotNull(dataResultList)) {
JSONObject response = JSON.parseObject(dataResultList);
JSONObject head = JSON.parseObject(response.getString("head"));
if ("Y".equals(head.getString("status"))) {
String requestId = JSON.parseObject(response.getString("body")).getString("requestId");
result.put(backVo.getSocialId(), requestId);
/*if (Common.isNotNull(requestId)) {
urls.addAll(getDownloadFeedbackUrls(restTemplate, requestId));
}*/
}
}
} catch (Exception e) {
log.error("获取税友人员审核查询证明文件失败", e);
}
return result;
}
// 构建公共请求头
private HttpHeaders buildCommonHeaders(String requestId) throws SignatureException {
String version = "1.0.0";
String timestamp = String.valueOf(new Date().getTime());
String xReqNonce = "1";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("accept", MediaType.ALL_VALUE);
headers.add(APP_KEY, appKey);
headers.add(TIMESTAMP, timestamp);
headers.add(X_REQ_NONCE, xReqNonce);
headers.add(VERSION, version);
String signature = SocialFriendSign.qianMing(getMapParam(appKey, appSecret, xReqNonce, version, timestamp, requestId));
headers.add("signature", signature);
return headers;
}
// 构建请求参数 JSON
private JSONObject buildDownloadRequestJson(SysHouseHoldInfo vo, SocialSoldierBackVo exportVo) {
JSONObject json = new JSONObject();
/*json.put("bizNo", "211429621163811844098020250715-172343");
json.put("qymc", "安徽皖信人力资源管理有限公司0");
json.put("nsrsbh", "91340152570242449C");
json.put("areaid", "340100");*/
json.put("bizNo", exportVo.getSocialId());
json.put("qymc", vo.getName());
json.put("nsrsbh", vo.getUnitCreditCode());
json.put("areaid", vo.getAreaCode());
JSONArray ywblzhlbArr = new JSONArray();
JSONObject jsonYwblzhlbYgs = new JSONObject();
jsonYwblzhlbYgs.put("mm", vo.getSocialPassword());
jsonYwblzhlbYgs.put("blxm", "社保");
jsonYwblzhlbYgs.put("dwbh", vo.getCustomerNo());
jsonYwblzhlbYgs.put("zh", vo.getSocialAccount());
jsonYwblzhlbYgs.put("mmlx", "4");
ywblzhlbArr.add(jsonYwblzhlbYgs);
json.put("ywblzhlb", ywblzhlbArr);
JSONArray rylbArr = new JSONArray();
JSONObject rylbContent = new JSONObject();
rylbContent.put("xm", exportVo.getEmpName());
rylbContent.put("zzlx", "居民身份证");
rylbContent.put("zzhm", exportVo.getEmpIdcard());
rylbContent.put("blxmlb", new String[]{});
JSONObject tszdxx = new JSONObject();
tszdxx.put("jblx", "增员");
rylbContent.put("tszdxx", tszdxx);
rylbArr.add(rylbContent);
json.put("rylb", rylbArr);
json.put("ywlx", "个人审核查询证明");
JSONArray blxmbArr = new JSONArray();
JSONObject blxm = new JSONObject();
blxm.put("blxm", "社保");
blxmbArr.add(blxm);
json.put("blxmlb", blxmbArr);
return json;
}
// 获取反馈 URL 列表
public List<String> getDownloadFeedbackUrls(RestTemplate restTemplate, String requestId) {
List<String> urls = new ArrayList<>();
String downloadEmployeeFeedbackUrl = urlPre + urlDownloadEmployeeFeedback + "?requestId=" + requestId;
int retryCount = 0;
final int maxRetries = 2;
final long delayMillis = 2000; // 2 seconds
try {
// 构建请求头
HttpHeaders headers = buildCommonHeaders(requestId);
// 构建请求体
HttpEntity<String> formEntity = new HttpEntity<>(headers);
while (retryCount <= maxRetries) {
ResponseEntity<String> response = restTemplate.exchange(
downloadEmployeeFeedbackUrl, HttpMethod.GET, formEntity, String.class);
// 处理返回值
if (response != null && response.getStatusCodeValue() == 200) {
JSONObject dataObject = JSON.parseObject(response.getBody());
String head = dataObject.getString("head");
if (Common.isNotNull(head)) {
JSONObject headObject = JSON.parseObject(head);
if ("Y".equals(headObject.getString("status"))) {
JSONObject bodyObject = JSON.parseObject(dataObject.getString("body"));
String ryywbljglb = bodyObject.getString("ryywbljglb");
JSONArray ryywbljglbArr = JSON.parseArray(ryywbljglb);
if (ryywbljglbArr != null && !ryywbljglbArr.isEmpty()){
for (Object itemObj : ryywbljglbArr) {
JSONObject ryywbljglbItem = (JSONObject) itemObj;
JSONArray blxmjglbArr = JSON.parseArray(ryywbljglbItem.getString("blxmjglb"));
if (blxmjglbArr != null && !blxmjglbArr.isEmpty()){
for (Object blxmjglbObj : blxmjglbArr) {
JSONObject blxmjglbItem = (JSONObject) blxmjglbObj;
JSONArray jgmxlbArr = JSON.parseArray(blxmjglbItem.getString("jgmxlb"));
if (jgmxlbArr != null && !jgmxlbArr.isEmpty()){
for (Object jgmxlbObj : jgmxlbArr) {
JSONObject jgmxlbItem = (JSONObject) jgmxlbObj;
JSONArray wjdzlb = jgmxlbItem.getJSONArray("wjdzlb");
if (wjdzlb != null && !wjdzlb.isEmpty()) {
urls.addAll(wjdzlb.toJavaList(String.class));
}
}
}
}
}
}
}
}
}
}
// 如果成功获取到数据,则跳出循环
if (!urls.isEmpty()) {
break;
}
// 如果没有获取到数据,等待一段时间后重试
if (retryCount < maxRetries) {
Thread.sleep(delayMillis);
retryCount++;
} else {
break;
}
}
} catch (Exception e) {
log.error("获取税友人员审核查询证明文件反馈链接失败", e);
}
return urls;
}
} }
...@@ -947,4 +947,28 @@ public class TDispatchInfoController { ...@@ -947,4 +947,28 @@ public class TDispatchInfoController {
return tDispatchInfoService.doExportRoster(socialId,type,unitCreditCode); return tDispatchInfoService.doExportRoster(socialId,type,unitCreditCode);
} }
/**
* @Author fxj
* @Description
* @Date 15:20 2025/7/15
**/
@PostMapping("/doExportSocialSoldierAllBackFile")
@Operation(description = "自动化办理查询导出反馈文件")
@SysLog("自动化办理查询导出反馈文件")
public void doExportSocialSoldierAllBackFile(HttpServletResponse response, HttpServletRequest request,
@RequestBody SocialHandleSearchVo searchVo) {
tDispatchInfoService.doExportSocialSoldierAllBackFile(response,searchVo,searchVo.getIdStr());
}
/**
* @Author fxj
* @Description
* @Date 15:20 2025/7/15
**/
@PostMapping("/doExportSocialSoldierBackFileById")
@Operation(description = "自动化办理查询导出反馈文件单个")
@SysLog("自动化办理查询导出反馈文件单个")
public R<String> doExportSocialSoldierBackFileById(@RequestBody SocialHandleSearchVo searchVo) {
return tDispatchInfoService.doExportSocialSoldierBackFileById(searchVo.getIdStr());
}
} }
...@@ -70,4 +70,14 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> { ...@@ -70,4 +70,14 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo> * @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo>
**/ **/
List<SysHouseHoldInfo> getAttaSrcByAutoDoc(); List<SysHouseHoldInfo> getAttaSrcByAutoDoc();
/**
* @Author fxj
* @Description 获取启用自动化的户信息
* @Date 9:35 2025/7/17
* @Param
* @return
**/
List<SysHouseHoldInfo> getHouseInfoAutoDoc();
} }
...@@ -306,4 +306,14 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -306,4 +306,14 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
List<String> getSingleFlagMap(@Param("idsList")List<String> idsList); List<String> getSingleFlagMap(@Param("idsList")List<String> idsList);
// 获取自动生成减员离职证明的派单ID // 获取自动生成减员离职证明的派单ID
List<String> getAutoDocFlagMap(@Param("idsList")List<String> idsList); List<String> getAutoDocFlagMap(@Param("idsList")List<String> idsList);
/**
* @Author fxj
* @Description 自动化办理查询导出反馈文件
* @Date 15:29 2025/7/15
**/
List<SocialSoldierBackVo> getSocialSoldierAllListBackFile(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("idsStr") List<String> idsStr);
int updateBackFileFlag(@Param("idsStr") List<String> idsStr);
} }
...@@ -187,4 +187,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -187,4 +187,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
List<SocialHandleExportVo> getRecordRosterList(SocialHandleSearchVo searchVo, String idStr); List<SocialHandleExportVo> getRecordRosterList(SocialHandleSearchVo searchVo, String idStr);
R<URL> doExportRoster(String socialId, String type,String unitCreditCode); R<URL> doExportRoster(String socialId, String type,String unitCreditCode);
void doExportSocialSoldierAllBackFile(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr);
R<String> doExportSocialSoldierBackFileById(String idStr);
} }
...@@ -70,6 +70,8 @@ socialFriend: ...@@ -70,6 +70,8 @@ socialFriend:
urlGetInfoAdd : /gateway/socins/hrss/employee/v2/getRegisterFeedback urlGetInfoAdd : /gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce : /gateway/socins/hrss/employee/v2/stop urlPushReduce : /gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce : /gateway/socins/hrss/employee/v2/getStopFeedback urlGetInfoReduce : /gateway/socins/hrss/employee/v2/getStopFeedback
urlDownloadEmployeeAsync: /gateway/pts/hrss/sourceFile/downloadEmployeeAsync
urlDownloadEmployeeFeedback: /gateway/pts/hrss/sourceFile/downloadEmployeeFeedback
urlUpload : /gateway/file/upload urlUpload : /gateway/file/upload
#测试 #测试
appKey : 89357285571962202409230949030 appKey : 89357285571962202409230949030
......
...@@ -63,6 +63,8 @@ socialFriend: ...@@ -63,6 +63,8 @@ socialFriend:
urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce: /gateway/socins/hrss/employee/v2/stop urlPushReduce: /gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback
urlDownloadEmployeeAsync: /gateway/pts/hrss/sourceFile/downloadEmployeeAsync
urlDownloadEmployeeFeedback: /gateway/pts/hrss/sourceFile/downloadEmployeeFeedback
urlUpload : /gateway/file/upload urlUpload : /gateway/file/upload
appKey : 3082B14EE2114C2D93B3A222DD925C26= appKey : 3082B14EE2114C2D93B3A222DD925C26=
appSecret : VmURqoxqmoKnNLXzAWynqQ== appSecret : VmURqoxqmoKnNLXzAWynqQ==
\ No newline at end of file
...@@ -57,11 +57,23 @@ soldier: ...@@ -57,11 +57,23 @@ soldier:
urlPre : http://36.7.147.29:55555 urlPre : http://36.7.147.29:55555
#税友相关属性配置 #税友相关属性配置
socialFriend: socialFriend:
urlPre : https://test-openapi.17win.com #urlPre : https://test-openapi.17win.com
#urlPushAdd: /gateway/socins/hrss/employee/v2/register
#urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback
#urlPushReduce: /gateway/socins/hrss/employee/v2/stop
#urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback
#urlDownloadEmployeeAsync: /gateway/pts/hrss/sourceFile/downloadEmployeeAsync
#urlDownloadEmployeeFeedback: /gateway/pts/hrss/sourceFile/downloadEmployeeFeedback
#urlUpload : /gateway/file/upload
#appKey : 89357285571962202409230949030
#appSecret : V52dkvxtFUgIvzlfNE9G8g==
urlPre: https://openapi.17win.com
urlPushAdd: /gateway/socins/hrss/employee/v2/register urlPushAdd: /gateway/socins/hrss/employee/v2/register
urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce: /gateway/socins/hrss/employee/v2/stop urlPushReduce: /gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload : /gateway/file/upload urlDownloadEmployeeAsync: /gateway/pts/hrss/sourceFile/downloadEmployeeAsync
appKey : 89357285571962202409230949030 urlDownloadEmployeeFeedback: /gateway/pts/hrss/sourceFile/downloadEmployeeFeedback
appSecret : V52dkvxtFUgIvzlfNE9G8g== urlUpload: /gateway/file/upload
\ No newline at end of file appKey: 3082B14EE2114C2D93B3A222DD925C26=
appSecret: VmURqoxqmoKnNLXzAWynqQ==
\ No newline at end of file
...@@ -235,4 +235,13 @@ ...@@ -235,4 +235,13 @@
FROM t_atta_info a join sys_house_hold_info h on h.id=a.DOMAIN_ID FROM t_atta_info a join sys_house_hold_info h on h.id=a.DOMAIN_ID
where a.RELATION_TYPE = '1' and h.IS_AUTO_LEAVE_DOC = '1' where a.RELATION_TYPE = '1' and h.IS_AUTO_LEAVE_DOC = '1'
</select> </select>
<select id="getHouseInfoAutoDoc" resultMap="sysHouseHoldInfoMap" >
SELECT
<include refid="Base_Column_List"/>
,AREA_CODE
FROM sys_house_hold_info a
where a.AUTO_STATUS = '0'
</select>
</mapper> </mapper>
...@@ -356,7 +356,16 @@ ...@@ -356,7 +356,16 @@
<result property="firstPayTime" column="FIRST_PAY_TIME"/> <result property="firstPayTime" column="FIRST_PAY_TIME"/>
<result property="graduationTime" column="GRADUATION_TIME"/> <result property="graduationTime" column="GRADUATION_TIME"/>
</resultMap> </resultMap>
<!-- 社保反馈文件下载专用 -->
<resultMap id="socialSoldierBackMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierBackVo">
<result property="dispatchId" column="id"/>
<result property="socialId" column="social_id"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="ygsHandleStatus" column="ygs_Handle_Status"/>
<result property="ysdHandleStatus" column="ysd_Handle_Status"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.EMP_ID, a.EMP_ID,
...@@ -1514,6 +1523,7 @@ ...@@ -1514,6 +1523,7 @@
<result property="ysdRequestId" column="YSD_REQUEST_ID"/> <result property="ysdRequestId" column="YSD_REQUEST_ID"/>
<result property="ygsSocialStartDateNext" column="YGS_SOCIAL_START_DATE_NEXT"/> <result property="ygsSocialStartDateNext" column="YGS_SOCIAL_START_DATE_NEXT"/>
<result property="ysdSocialStartDateNext" column="YSD_SOCIAL_START_DATE_NEXT"/> <result property="ysdSocialStartDateNext" column="YSD_SOCIAL_START_DATE_NEXT"/>
<result property="backFileFlag" column="BACK_FILE_FLAG"/>
</resultMap> </resultMap>
<!-- hgw 2024-5-10 10:42:33 社保士兵列表查询 --> <!-- hgw 2024-5-10 10:42:33 社保士兵列表查询 -->
...@@ -1602,6 +1612,7 @@ ...@@ -1602,6 +1612,7 @@
,s.YGS_REQUEST_ID,s.YSD_REQUEST_ID ,s.YGS_REQUEST_ID,s.YSD_REQUEST_ID
,if(a.type ='0',YGS_SOCIAL_START_DATE_NEXT,null) YGS_SOCIAL_START_DATE_NEXT ,if(a.type ='0',YGS_SOCIAL_START_DATE_NEXT,null) YGS_SOCIAL_START_DATE_NEXT
,if(a.type ='0',YSD_SOCIAL_START_DATE_NEXT,null) YSD_SOCIAL_START_DATE_NEXT ,if(a.type ='0',YSD_SOCIAL_START_DATE_NEXT,null) YSD_SOCIAL_START_DATE_NEXT
,a.BACK_FILE_FLAG
,a.IS_SINGLE ,a.IS_SINGLE
,a.IS_AUTO_LEAVE_DOC ,a.IS_AUTO_LEAVE_DOC
FROM t_dispatch_info a FROM t_dispatch_info a
......
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