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;
@Data
public class TGzEmpInfoPushGzVoSkill {
private String orderId;
private Integer orderId;
private String skillName;
private String skillDate;
private String skillOrg;
......
......@@ -75,11 +75,6 @@ public class GzConfig {
String cnapsId;
for (int i=0;i<dataArray.size(); 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;
}
......@@ -112,7 +107,6 @@ public class GzConfig {
String result = restTemplate.exchange(gzUpdateStatusUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result);
String code = resultObject.getString("code");
......@@ -151,7 +145,6 @@ public class GzConfig {
// 发送POST请求
String result = restTemplate.exchange(gzEmpInfoUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result);
......@@ -190,7 +183,6 @@ public class GzConfig {
// 发送POST请求
String result = restTemplate.exchange(gzContractUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result);
......@@ -220,12 +212,10 @@ public class GzConfig {
// 发送GET请求
String result = restTemplate.exchange(gzBankUrl, HttpMethod.POST, entity, String.class).getBody();
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result);
String code = resultObject.getString("code");
if (Common.isNotNull(code) && "S00000".equals(code)) {
System.out.println("成功");
return true;
}
}
......@@ -260,13 +250,12 @@ public class GzConfig {
// 发送GET请求
String result = restTemplate.exchange(gzBankUrl, HttpMethod.POST, entity, String.class).getBody();
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result);
String code = resultObject.getString("code");
if (Common.isNotNull(code) && "S00000".equals(code)) {
fileId = resultObject.getString("data");
System.out.println("成功:fileId="+fileId);
}
}
return fileId;
......@@ -303,7 +292,6 @@ public class GzConfig {
String result = restTemplate.exchange(gzAttachUrl, HttpMethod.POST, entity, String.class).getBody();
returnMap.put("responseData", result);
System.out.println(result);
if (result != null && result.contains("code") && result.contains("data")) {
JSONObject resultObject = JSON.parseObject(result);
......
......@@ -186,7 +186,7 @@ public class LGuaziOfferRecordServiceImpl extends ServiceImpl<LGuaziOfferRecordM
statusMap.put("3","待发送Offer");
statusMap.put("4","待接受Offer");
statusMap.put("5","拒绝Offer");
statusMap.put("7","接受offer");
statusMap.put("6","接受offer");
statusMap.put("9","候选人填写信息");
statusMap.put("10","取消offer");
statusMap.put("12","候选人信息审核");
......
......@@ -2853,36 +2853,29 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo.setContactAddress(empAdd.getContactAddress());
if (empAdd.getHignEducation().equals("文盲")) {
employeeInfo.setHignEducation("1");
}
if (empAdd.getHignEducation().equals("小学")) {
}else if (empAdd.getHignEducation().equals("小学")) {
employeeInfo.setHignEducation("2");
}
if (empAdd.getHignEducation().equals("初中")) {
}else if (empAdd.getHignEducation().equals("初中")) {
employeeInfo.setHignEducation("3");
}
if (empAdd.getHignEducation().equals("高中")) {
}else if (empAdd.getHignEducation().equals("高中")) {
employeeInfo.setHignEducation("4");
}
if (empAdd.getHignEducation().equals("大专")) {
}else if (empAdd.getHignEducation().equals("大专")) {
employeeInfo.setHignEducation("5");
}
if (empAdd.getHignEducation().equals("本科")) {
}else if (empAdd.getHignEducation().equals("本科")) {
employeeInfo.setHignEducation("6");
}
if (empAdd.getHignEducation().equals("硕士")) {
}else if (empAdd.getHignEducation().equals("硕士")) {
employeeInfo.setHignEducation("7");
}
if (empAdd.getHignEducation().equals("博士")) {
}else if (empAdd.getHignEducation().equals("博士")) {
employeeInfo.setHignEducation("8");
}
if (empAdd.getHignEducation().equals("技工")) {
}else if (empAdd.getHignEducation().equals("技工")) {
employeeInfo.setHignEducation("9");
}
if (empAdd.getHignEducation().equals("职高")) {
}else if (empAdd.getHignEducation().equals("职高")) {
employeeInfo.setHignEducation("10");
}
if (empAdd.getHignEducation().equals("中专")) {
}else if (empAdd.getHignEducation().equals("中专")) {
employeeInfo.setHignEducation("11");
}else {
//优化 如果非设定的最高学历 直接默认空
employeeInfo.setHignEducation(null);
}
if ("5".equals(employeeInfo.getHignEducation())
|| "6".equals(employeeInfo.getHignEducation())
......
......@@ -65,7 +65,10 @@ public class TGzContractServiceImpl implements TGzContractService {
TGzEmpInfo gzEmpInfo = tGzEmpInfoMapper.getInfoByOfferId(offerId);
if (Common.isNotNull(gzEmpInfo)) {
// 确认 用合同编号(用户在页面上填写的)
gzEmpInfo.setContractNum(contractInfo.getContractNo());
// gzEmpInfo.setContractNum(contractInfo.getContractNo());
// 1.7.13: 换成用合同申请号
gzEmpInfo.setContractNum(contractInfo.getApplyNo());
// 客服申请处选择“标准合同”传“外签-劳动合同 ”;“实习协议”传“外签-实习协议 ”
if ("标准合同".equals(contractInfo.getContractName())) {
gzEmpInfo.setContractType("1E");
......
......@@ -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 lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
......@@ -53,6 +54,9 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz
@Lazy
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
}
// 先改为推送中
findInfo.setPushTime(LocalDateTime.now());
findInfo.setPushStatus(CommonConstants.THREE_STRING);
findInfo.setFailReason("");
findInfo.setUpdateBy(user.getId());
findInfo.setUpdateTime(LocalDateTime.now());
this.updateById(tGzPushEntry);
......@@ -108,6 +114,15 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz
*/
@Override
public void addPushEntry(TGzPushEntry tGzPushEntry) {
// 流程是0的,不推送
if(CommonConstants.ZERO_STRING.equals(tGzPushEntry.getBizId())){
return;
}
// 仅存指定状态的任务
if (!ArrayUtils.contains(taskTypeArr, tGzPushEntry.getTaskType())) {
return;
}
// offer状态是 7 的,改为推送 6
if(CommonConstants.SEVEN_STRING.equals(tGzPushEntry.getTaskType())){
......
......@@ -16,10 +16,12 @@
*/
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.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.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.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
......@@ -56,6 +58,8 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
private final TGzEmpInfoMapper tGzEmpInfoMapper;
private final TGzOfferInfoMapper tGzOfferInfoMapper;
private final TGzEmpInfoService tGzEmpInfoService;
private final TAttaInfoService tAttaInfoService;
......@@ -172,6 +176,16 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
Map<String, Object> params = new HashMap<>();
params.put("bizId", pushInfo.getBizId());
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);
// 公共处理瓜子返回的信息
......@@ -250,6 +264,14 @@ public class TGzPushHandleServiceImpl implements TGzPushHandleService {
// 公共处理瓜子返回的信息
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 {
// 公共处理瓜子返回的信息
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 {
// 公共处理瓜子返回的信息
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) {
log.error("瓜子附件推送失败!");
pushInfo.setPushStatus(CommonConstants.ONE_STRING);
......
......@@ -793,7 +793,7 @@
FROM t_atta_info a
where a.RELATION_TYPE not in ('41','42','43') and a.domain_id = #{gzEmpId}
</select>
<!--推送瓜子的瓜子档案信息-合同-->
<!--推送瓜子的瓜子档案信息-合同 注意:2025年7月17号,瓜子接口变更了,取值时:试用期预计结束日期 和 预计转正日期,调换了-->
<select id="getGzEmpInfoToPushGzByIdContract" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoPushGzContractVo">
SELECT
a.biz_id bizId,
......@@ -806,8 +806,8 @@
date_format(a.contract_end_dt, '%Y-%m-%d') contractEndDt,
date_format(a.contract_exp_end_dt, '%Y-%m-%d') contrctExpEndDt,
a.probation probation,
date_format(a.prc_exp_dt, '%Y-%m-%d') prcExpDt,
date_format(a.probation_dt, '%Y-%m-%d') probationDt,
date_format(a.prc_exp_dt, '%Y-%m-%d') probationDt,
date_format(a.probation_dt, '%Y-%m-%d') prcExpDt,
a.nee_provider_id neeProviderId,
a.work_location workLocation,
'' 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);
}
......@@ -46,3 +46,10 @@ entry:
entryDocStatus: 20
entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口
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
......@@ -112,3 +112,10 @@ entry:
entryDocStatus: 20
entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口
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 {
HttpDaprUtil.invokeMethodPost(daprEkpProperties.getAppUrl(),daprEkpProperties.getAppId(),"/icbcIssue/inner/getPdfFile","", Object.class, SecurityConstants.FROM_IN);
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 {
@ExcelIgnore
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 {
@ExcelProperty("社保顺延时间" )
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;
}
......@@ -947,4 +947,28 @@ public class TDispatchInfoController {
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> {
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo>
**/
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> {
List<String> getSingleFlagMap(@Param("idsList")List<String> idsList);
// 获取自动生成减员离职证明的派单ID
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> {
List<SocialHandleExportVo> getRecordRosterList(SocialHandleSearchVo searchVo, String idStr);
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:
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
......
......@@ -63,6 +63,8 @@ socialFriend:
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 : 3082B14EE2114C2D93B3A222DD925C26=
appSecret : VmURqoxqmoKnNLXzAWynqQ==
\ No newline at end of file
......@@ -57,11 +57,23 @@ soldier:
urlPre : http://36.7.147.29:55555
#税友相关属性配置
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
urlGetInfoAdd: /gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce: /gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce: /gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload : /gateway/file/upload
appKey : 89357285571962202409230949030
appSecret : V52dkvxtFUgIvzlfNE9G8g==
\ No newline at end of file
urlDownloadEmployeeAsync: /gateway/pts/hrss/sourceFile/downloadEmployeeAsync
urlDownloadEmployeeFeedback: /gateway/pts/hrss/sourceFile/downloadEmployeeFeedback
urlUpload: /gateway/file/upload
appKey: 3082B14EE2114C2D93B3A222DD925C26=
appSecret: VmURqoxqmoKnNLXzAWynqQ==
\ No newline at end of file
......@@ -235,4 +235,13 @@
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'
</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>
......@@ -356,7 +356,16 @@
<result property="firstPayTime" column="FIRST_PAY_TIME"/>
<result property="graduationTime" column="GRADUATION_TIME"/>
</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">
a.ID,
a.EMP_ID,
......@@ -1514,6 +1523,7 @@
<result property="ysdRequestId" column="YSD_REQUEST_ID"/>
<result property="ygsSocialStartDateNext" column="YGS_SOCIAL_START_DATE_NEXT"/>
<result property="ysdSocialStartDateNext" column="YSD_SOCIAL_START_DATE_NEXT"/>
<result property="backFileFlag" column="BACK_FILE_FLAG"/>
</resultMap>
<!-- hgw 2024-5-10 10:42:33 社保士兵列表查询 -->
......@@ -1602,6 +1612,7 @@
,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',YSD_SOCIAL_START_DATE_NEXT,null) YSD_SOCIAL_START_DATE_NEXT
,a.BACK_FILE_FLAG
,a.IS_SINGLE
,a.IS_AUTO_LEAVE_DOC
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