Commit a4e49e70 authored by hongguangwu's avatar hongguangwu

MVP1.6.9-企微招聘平台

parent c8ba7ef0
......@@ -67,4 +67,18 @@ public class EkpPermissionTask {
log.info("-------------获取HCM出差数据-定时任务结束------------");
}
/**
* @Author hgw
* @Description 每天1点30,定时同步企微招聘数据
* @Date 2024-8-28 11:39:32
* @Param
**/
public void everyDaySaveQiWeiZhaoPin() throws Exception {
log.info("-------------获取企微招聘数据-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprEkpPermissionProperties.getAppUrl(), daprEkpPermissionProperties.getAppId(),
"/qiWei/inner/everyDaySaveQiWeiZhaoPin", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------获取企微招聘数据-定时任务结束------------");
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.permission.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 企业微信出差
*/
@TableName(value = "ekp_qiwei_zhaopin")
@Data
@Schema(description = "企业微信招聘")
public class EkpQiwiZhaoPin {
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键", name = "fdId")
private String fdId;
@Schema(description = "审批编号")
@NotBlank(message = "审批编号不能为空")
private String fdSpNo;
@Schema(description = "申请人姓名")
@NotBlank(message = "申请人姓名不能为空")
private String fdApplyUserName;
@Schema(description = "申请人部门")
@NotBlank(message = "申请人部门不能为空")
private String fdApplyUserDept;
@Schema(description = "申请日期")
@NotNull(message = "申请日期不能为空")
private LocalDateTime fdApplyDate;
@Schema(description = "开始时间")
private LocalDate fdNewBegin;
@Schema(description = "结束时间")
private LocalDate fdNewEnd;
// status 0 初始;1已结算;
@Schema(description = "结算状态")
private String fdStatus;
@Schema(description = "关联结算ID")
private String fdSettleFormId;
@Schema(description = "创建时间")
private LocalDateTime createTime;
// 企微、HCM
@Schema(description = "数据源")
private String fdDataSource;
// 新字段
@Schema(description = "申请子 (分) 公司或部门名称")
@NotBlank(message = "申请子 (分) 公司或部门名称")
private String fdUserDeptName;
@Schema(description = "购买方式")
private String fdBuyStyle;
@Schema(description = "平台名称")
private String fdPingTaiName;
@Schema(description = "平台产品名称")
private String fdPingTaiChanPin;
@Schema(description = "数量")
private String fdNum;
@Schema(description = "单价")
private String fdMoney;
@Schema(description = "总计金额")
private String fdMoneySum;
@Schema(description = "使用项目名称")
private String fdDeptName;
@Schema(description = "使用岗位名称")
private String fdPostName;
@Schema(description = "成本归属")
private String fdCostName;
// 招聘运营部填写
@Schema(description = "购买/调配方式是否合理")
private String fdTwoIsHeLi;
@Schema(description = "平台名称")
private String fdTwoPingTaiName;
@Schema(description = "产品名称")
private String fdTwoPingTaiChanPin;
@Schema(description = "数量")
private String fdTwoNum;
@Schema(description = "金额")
private String fdTwoMoneySum;
@Schema(description = "被调配的业务单元名称")
private String fdTwoYeWu;
@Schema(description = "备注")
private String fdTwoRemark;
@Schema(description = "关联结算单号")
private String fdSettleFormNo;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.permission.controller;
import com.yifu.cloud.plus.v1.permission.service.QiWeiService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiChuchai;
import com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiZhaoPin;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -85,4 +88,49 @@ public class QiWeiController {
return wxSalaryService.getQiWeiChuChaiAndSave(startTime, endTime, 2);
}
/**
* @Description: 每日获取当日企业微信审批里的【招聘平台采购/调配】
* @Author: hgw
* @Date: 2024-8-22 11:16:58
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TEventFeeDetail>>
**/
@PostMapping("/inner/everyDaySaveQiWeiZhaoPin")
@Inner
public R<List<EkpQiwiZhaoPin>> everyDaySaveQiWeiZhaoPin() {
String startDay = DateUtil.addDay(-29);
String endDay = DateUtil.addDay(0);
return wxSalaryService.getQiWeiZhaoPinAndSave(startDay, endDay);
}
/**
* @Description: 手动同步企微信息--EKP调用接口
* @Author: hgw
* @Date: 2024-8-28 11:23:18
**/
@Operation(summary = "手动同步企微信息--EKP调用接口", description = "手动同步企微信息--EKP调用接口")
@SysLog("手动同步企微信息--EKP调用接口")
@GetMapping("/getQiWeiZhaoPinInfo")
public R<String> getQiWeiZhaoPinInfo() {
String startDay = DateUtil.addDay(-29);
String endDay = DateUtil.addDay(0);
R<List<EkpQiwiZhaoPin>> returnR = wxSalaryService.getQiWeiZhaoPinAndSave(startDay, endDay);
if (returnR != null && returnR.getCode() == CommonConstants.SUCCESS) {
return R.ok();
}
return R.failed();
}
/**
* @param startTime
* @param endTime
* @Description: 获取企业微信审批里的【招聘平台采购/调配】
* @Author: hgw
* @Date: 2024-8-22 11:16:58
**/
@Operation(description = "获取企业微信审批里的招聘平台采购数据:startTime格式:2024-04-10")
@PostMapping("/getQiWeiZhaoPinInfoAndSave")
public R<List<EkpQiwiZhaoPin>> getQiWeiZhaoPinInfoAndSave(@RequestParam String startTime, @RequestParam String endTime) {
return wxSalaryService.getQiWeiZhaoPinAndSave(startTime, endTime);
}
}
/*
* 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.permission.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiZhaoPin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 企微招聘
*
* @author hgw
* @date 2024-08-26 17:44:50
*/
@Mapper
public interface EkpQiweiZhaopinMapper extends BaseMapper<EkpQiwiZhaoPin> {
/**
* @param status 状态
* @Description: 获取全部的列表,用来: 拉取企业微信时,不覆盖数据
* @Author: hgw
* @Date: 2024-8-26 17:52:26
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.salary.TStatisticsProjectReimburse>
**/
List<EkpQiwiZhaoPin> getZhaoPinAllInfo(@Param("status") String status);
}
/*
* 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.permission.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiZhaoPin;
import java.util.Map;
/**
* 企微招聘
*
* @author hgw
* @date 2024-08-26 17:44:50
*/
public interface EkpQiweiZhaopinService extends IService<EkpQiwiZhaoPin> {
/**
* @Description: 获取全部的列表,用来: 拉取企业微信时,不覆盖数据
* @Author: hgw
* @Date: 2024/8/26 17:56
* @return: java.util.Map<java.lang.String, java.lang.String>
**/
Map<String, String> getZhaoPinAllMap();
}
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.permission.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiChuchai;
import com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiZhaoPin;
import java.util.List;
......@@ -25,4 +26,13 @@ public interface QiWeiService extends IService<EkpQiwiChuchai> {
**/
R<List<EkpQiwiChuchai>> getQiWeiChuChaiAndSave(String startTime, String endTime, int type);
/**
* @Description: 获取企业微信审批里的【招聘平台采购/调配】
* @Author: hgw
* @Date: 2024/8/22 11:18
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiChuchai>>
**/
R<List<EkpQiwiZhaoPin>> getQiWeiZhaoPinAndSave(String startTime, String endTime);
}
/*
* 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.permission.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.permission.mapper.EkpQiweiZhaopinMapper;
import com.yifu.cloud.plus.v1.permission.service.EkpQiweiZhaopinService;
import com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiZhaoPin;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 企微招聘
*
* @author hgw
* @date 2024-08-26 17:44:50
*/
@Log4j2
@Service
public class EkpQiweiZhaopinServiceImpl extends ServiceImpl<EkpQiweiZhaopinMapper, EkpQiwiZhaoPin> implements EkpQiweiZhaopinService {
/**
* @Description: 获取全部的列表,用来: 拉取企业微信时,不覆盖数据
* @Author: hgw
* @Date: 2024-8-26 17:54:23
* @return: java.util.Map<java.lang.String, java.lang.String>
**/
@Override
public Map<String, String> getZhaoPinAllMap() {
List<EkpQiwiZhaoPin> cpHistoryList = baseMapper.getZhaoPinAllInfo(null);
Map<String, String> cpMap = new HashMap<>();
for (EkpQiwiZhaoPin cpHis : cpHistoryList) {
cpMap.put(cpHis.getFdSpNo(), "0");
}
return cpMap;
}
}
<?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.permission.mapper.EkpQiweiZhaopinMapper">
<resultMap id="ekpQiweiZhaopinMap" type="com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiZhaoPin">
<id property="fdId" column="FD_ID"/>
<result property="fdSpNo" column="FD_SP_NO"/>
<result property="fdApplyUserName" column="FD_APPLY_USER_NAME"/>
<result property="fdApplyUserDept" column="FD_APPLY_USER_DEPT"/>
<result property="fdApplyDate" column="FD_APPLY_DATE"/>
<result property="fdNewBegin" column="FD_NEW_BEGIN"/>
<result property="fdNewEnd" column="FD_NEW_END"/>
<result property="fdStatus" column="FD_STATUS"/>
<result property="fdSettleFormId" column="FD_SETTLE_FORM_ID"/>
<result property="fdSettleFormNo" column="FD_SETTLE_FORM_NO"/>
<result property="createTime" column="create_time"/>
<result property="fdDataSource" column="FD_DATA_SOURCE"/>
<result property="fdUserDeptName" column="FD_USER_DEPT_NAME"/>
<result property="fdBuyStyle" column="FD_BUY_STYLE"/>
<result property="fdPingTaiName" column="FD_PING_TAI_NAME"/>
<result property="fdPingTaiChanPin" column="FD_PING_TAI_CHAN_PIN"/>
<result property="fdNum" column="FD_NUM"/>
<result property="fdMoney" column="FD_MONEY"/>
<result property="fdMoneySum" column="FD_MONEY_SUM"/>
<result property="fdDeptName" column="FD_DEPT_NAME"/>
<result property="fdPostName" column="FD_POST_NAME"/>
<result property="fdCostName" column="FD_COST_NAME"/>
<result property="fdTwoIsHeLi" column="FD_TWO_IS_HE_LI"/>
<result property="fdTwoPingTaiName" column="FD_TWO_PING_TAI_NAME"/>
<result property="fdTwoPingTaiChanPin" column="FD_TWO_PING_TAI_CHAN_PIN"/>
<result property="fdTwoNum" column="FD_TWO_NUM"/>
<result property="fdTwoMoneySum" column="FD_TWO_MONEY_SUM"/>
<result property="fdTwoYeWu" column="FD_TWO_YE_WU"/>
<result property="fdTwoRemark" column="FD_TWO_REMARK"/>
</resultMap>
<sql id="Base_Column_List">
a.FD_ID,
a.FD_SP_NO,
a.FD_APPLY_USER_NAME,
a.FD_APPLY_USER_DEPT,
a.FD_APPLY_DATE,
a.FD_NEW_BEGIN,
a.FD_NEW_END,
a.FD_STATUS,
a.FD_SETTLE_FORM_ID,
a.FD_SETTLE_FORM_NO,
a.create_time,
a.FD_DATA_SOURCE,
a.FD_USER_DEPT_NAME,
a.FD_BUY_STYLE,
a.FD_PING_TAI_NAME,
a.FD_PING_TAI_CHAN_PIN,
a.FD_NUM,
a.FD_MONEY,
a.FD_MONEY_SUM,
a.FD_DEPT_NAME,
a.FD_POST_NAME,
a.FD_COST_NAME,
a.FD_TWO_IS_HE_LI,
a.FD_TWO_PING_TAI_NAME,
a.FD_TWO_PING_TAI_CHAN_PIN,
a.FD_TWO_NUM,
a.FD_TWO_MONEY_SUM,
a.FD_TWO_YE_WU,
a.FD_TWO_REMARK
</sql>
<!--获取全部的,用来: 拉取企业微信时,不覆盖数据 -->
<select id="getZhaoPinAllInfo" resultMap="ekpQiweiZhaopinMap">
SELECT
<include refid="Base_Column_List"/>
FROM ekp_qiwei_zhaopin a
<where>
1=1
<if test="status != null and status.trim() != ''">
AND a.FD_STATUS = #{status}
</if>
</where>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment