Commit 87d4212b authored by hongguangwu's avatar hongguangwu

B端人员相关

parent 3986e920
...@@ -8,8 +8,6 @@ import com.baomidou.mybatisplus.annotation.TableLogic; ...@@ -8,8 +8,6 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data; import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString; import lombok.ToString;
import java.time.LocalDate; import java.time.LocalDate;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @description: 分页查询VO
* @author: wangweiguo
* @date: 2021/8/10
*/
@Setter
@Getter
@ToString
public class BusinessEmployeeExtendListVO implements Serializable {
/**
* 人员表主键
*/
@Schema(description = "人员表主键", name = "id")
private String id;
/**
* 人员拓展表主键
*/
@Schema(description = "人员拓展表主键", name = "extendId")
private String extendId;
/**
* 姓名
*/
@Schema(description = "姓名", name = "empName")
private String empName;
/**
* 身份证号
*/
@Schema(description = "身份证号")
private String empIdcard;
/**
* 入职日期
*/
@Schema(description = "入职日期", name = "businessEnjoinDate")
private LocalDate businessEnjoinDate;
/**
* 业务项目
*/
@Schema(description = "业务项目", name = "settleDomain")
private String settleDomain;
/**
* 部门名称
*/
@Schema(description ="所属部门")
private String departName;
/**
* 部门id
*/
@Schema(description ="部门id")
private Integer departId;
/**
* b端岗位
*/
@Schema(description ="岗位")
private String businessPost;
/**
* b端员工工号
*/
@Schema(description ="电信工号")
private String businessTelecomNumber;
/**
* 标签,字典值(英文逗号分割)
*/
@Schema(description ="标签,字典值(英文逗号分割)")
private String employeeTags;
/**
* B端在职状态 0在职 1离职 3临时
*/
@Schema(description ="B端在职状态 0在职 1离职 3临时")
private String businessWorkingStatus;
/**
* hro在职状态 0 在职 1 离职
*/
@Schema(description ="职状态 0 在职 1 离职 和businessWorkFlag字段联合判断临时")
private String workFlag;
/**
* hro在职状态 3临时
*/
@Schema(description ="3 临时,其他状态不判断")
private String workingStatusSub;
/**
* B端维护的离职时间
*/
@Schema(description ="B端维护的离职时间")
private LocalDateTime businessLeaveDate;
/**
* 证件类型 逗号分割
*/
@Schema(description ="证件类型 逗号分割")
private String documentType;
/**
* 结算主体名称
*/
@Schema(description ="结算主体名称")
private String settleDomainName;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @description: b端人员信息导出excel VO
* @author: wangweiguo
* @date: 2021/8/10
*/
@Getter
@Setter
@ToString
public class BusinessEmployeeExtentExcelVO implements Serializable {
/**
* 姓名
*/
@Schema(description = "姓名", name = "empName")
private String empName;
/**
* 身份证号
*/
@Schema(description = "身份证号")
private String empIdcard;
/**
* b端员工工号
*/
@Schema(description ="电信工号")
private String businessTelecomNumber;
/**
* 部门名称
*/
@Schema(description ="所属部门")
private String departName;
/**
* 部门id
*/
@Schema(description ="部门id")
private Integer departId;
/**
* 业务项目
*/
@Schema(description = "业务项目", name = "settleDomain")
private String settleDomain;
/**
* b端岗位
*/
@Schema(description ="岗位")
private String businessPost;
/**
* 第一学历和专业
*/
@Schema(description ="第一学历和专业")
private String firstDegreeAndMajor;
/**
* 第一学历院校
*/
@Schema(description ="第一学历院校")
private String firstDegreeGraduateSchool;
/**
* 最高学历和专业
*/
@Schema(description ="最高学历和专业")
private String highestDegreeAndMajor;
/**
* 最高学历院校
*/
@Schema(description ="最高学历院校")
private String highestDegreeGraduateSchool;
/**
* 联系方式
*/
@Schema(description ="联系方式")
private String contactInfo;
/**
* 档案所在地
*/
@Schema(description ="档案所在地")
private String archivesAddr;
/**
* 入职日期
*/
@Schema(description = "入职日期", name = "businessEnjoinDate")
private LocalDate businessEnjoinDate;
/**
* 标签,字典值(英文逗号分割)
*/
@Schema(description ="标签,字典值(英文逗号分割)")
private String employeeTags;
/**
* B端在职状态 0在职 1离职 3临时
*/
@Schema(description ="B端在职状态 0在职 1离职 3临时")
private String businessWorkingStatus;
/**
* hro在职状态 0 在职 1 离职
*/
@Schema(description ="职状态 0 在职 1 离职 和businessWorkFlag字段联合判断临时")
private String workFlag;
/**
* hro在职状态 3临时
*/
@Schema(description ="3 临时,其他状态不判断")
private String workingStatusSub;
/**
* B端维护的离职时间
*/
@Schema(description ="B端维护的离职时间")
private LocalDateTime businessLeaveDate;
/**
* 证件类型 逗号分割
*/
@Schema(description ="证件类型 逗号分割")
private String documentType;
/**
* 结算主体名称
*/
@Schema(description ="结算主体名称")
private String settleDomainName;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo;
import lombok.Data;
import java.util.List;
/**
* @author hgw2
* @description B端使用的远程接口
* @date 2023/1/4
*/
@Data
public class BusinessEmployeeListVo {
private List<TBusinessEmployeeExtendInfo> empList;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* B端员工合同列表对象
* @Author fxj
* @Date 2020-08-25
**/
@Data
public class EmpContractBusinessPageVo {
/**
* 主键
*/
@Schema(description = "主键", name = "id")
private String id;
/**
* 员工主键
*/
@Schema(description = "员工主键", name = "empId")
private String empId;
/**
* 员工编码
*/
@Schema(description = "员工编码", name = "empNo")
private String empNo;
/**
* 员工姓名
*/
@Schema(description = "姓名", name = "empName")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号", name = "empIdcard")
private String empIdcard;
/**
* 合同性质
*/
@Schema(description = "合同性质", name = "contractName")
private String contractName;
/**
* 合同类型
*/
@Schema(description = "合同类型", name = "contractType")
private String contractType;
/**
* 合同起始日期
*/
@Schema(description = "合同起始日期", name = "contractStart")
private LocalDate contractStart;
/**
* 合同结束日期
*/
@Schema(description = "合同结束日期", name = "contractEnd")
private LocalDate contractEnd;
/**
* 签订情况
*/
@Schema(description = "签订情况", name = "situation")
private String situation;
/**
* 是否作废 0否/1是
*/
@Schema(description = "是否作废 0否/1是", name = "isObsolete")
private String isObsolete;
/**
* 是否在用 0是/1否
*/
@Schema(description = "是否在用 0是/1否", name = "inUse")
private String inUse;
/**
* 结算主体
*/
@Schema(description = "结算主体", name = "settleDomain")
private String settleDomain;
/**
* 续签次数
*/
@Schema(description = "续签次数", name = "settleDomain")
@TableField(exist = false)
private Integer renewCount;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import lombok.Data;
import java.util.List;
/**
* 获取B端员工详情
* @Author fxj
* @Date 2020-08-25
**/
@Data
public class EmployeeBusinessDetailVo {
/**
* 员工详情
**/
private EmployeeBusinessVo employeeBusinessVo;
/**
* 员工合同信息
**/
private List<TEmployeeContractInfo> contractInfoList;
/**
* 员工劳动合同开始日期
**/
private String contractStartDate;
/**
* 员工劳动合同结束日期
**/
private String contractEndDate;
/**
* 合同签订情况 新签/续签
**/
private String situation;
/**
* 累计续签次数
**/
private Integer situationCount;
/**
* 合同过期天数 默认提醒3个月的到期的合同,如果三个月外才到期的不做提示
**/
private Integer contractOverdue;
/**
* 社保停缴时间 如果有离职日期 限制对应离职的那条档案的社保派减日期
**/
private String socialReduceDate;
/**
* 公积金停缴时间 如果有离职日期 限制对应离职的那条档案的公积金派减日期
**/
private String fundReduceDate;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
/**
* 获取社保公积金派减日期
* @Author fxj
* @Date 2020-08-25
**/
@Data
public class SocialAndFundReduceVo {
private String empId;
/**
* 社保停缴时间 如果有离职日期 限制对应离职的那条档案的社保派减日期
**/
private String socialReduceDate;
/**
* 公积金停缴时间 如果有离职日期 限制对应离职的那条档案的公积金派减日期
**/
private String fundReduceDate;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.util.List;
/**
* @description: hroB端人员信息列表查询条件
* @author: wangweiguo
* @date: 2021/8/9
*/
@Getter
@Setter
@ToString
public class THroBusinessUserQuery implements Serializable {
/**
* 身份证号码
*/
@Schema(description ="身份证号码")
private String empIdcard;
/**
* 员工姓名
*/
@Schema(description ="姓名")
private String empName;
/**
* 部门名称
*/
@Schema(description ="部门名称")
private String departName;
/**
* 部门id
*/
@Schema(description ="部门id")
private String departId;
/**
* b端岗位
*/
@Schema(description ="岗位")
private String businessPost;
/**
* b端员工工号
*/
@Schema(description ="电信工号")
private String businessTelecomNumber;
/**
* 标签,字典值(英文逗号分割)
*/
@Schema(description ="标签名称")
private String employeeTagName;
/**
* 0 在职 1 个人离职 2 临时
*/
@Schema(description ="0 在职 1 离职 3 临时")
private String businessWorkingStatus;
/**
* 是否持证 0否 1是
*/
@Schema(description ="是否持证 0否 1是")
private String documentStatus;
/**
* 结算主体id
*/
@Schema(description ="结算主体id")
private String settleDomainId;
@JsonIgnore
private String deleteFlag;
@JsonIgnore
List<String> settleDomainIds;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
<dependencies> <dependencies>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-business-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.yifu.cloud.plus.v1</groupId> <groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-check-api</artifactId> <artifactId>yifu-check-api</artifactId>
......
...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -87,4 +84,17 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac ...@@ -87,4 +84,17 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
List<EmployeeContractExportAuditVO> noPageDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo); List<EmployeeContractExportAuditVO> noPageDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo);
int noPageCountDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo); int noPageCountDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo);
/**
* B端获取在用合同信息
**/
IPage<EmpContractBusinessPageVo> getContractBusinessPage(Page page, @Param("tEmployeeContractInfo") EmpContractBusinessPageVo tEmployeeContractInfo, @Param("settleDomainIds") List<String> settleDomainIds, @Param("flag") Integer flag);
/**
* B获取3个月内的到期合同提醒
**/
Integer getContractBusinessAlertCount(@Param("tEmployeeContractInfo") EmpContractBusinessPageVo tEmployeeContractInfo
, @Param("settleDomainIds") List<String> settleDomainIds, @Param("alertMonth")Integer alertMonth);
List<EmpContractBusinessPageVo> getOtherContractBusinessInfo(@Param("empId")String empId, @Param("contractId")String contractId);
} }
...@@ -22,9 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,9 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -93,4 +91,24 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -93,4 +91,24 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
**/ **/
int everyDayUpdateEmployeContractStatus(); int everyDayUpdateEmployeContractStatus();
/**
* 分页:B端获取登录用户对应单位的员工数据
* @Author fxj
* @Date 2020-08-25
* @UpdateDate 2021-08-09 wwg
* @param page
* @param query
**/
IPage<BusinessEmployeeExtendListVO> getTEmployeeBusinessPage(Page page, @Param("query") THroBusinessUserQuery query);
/**
* 根据条件查询,不分页
* @description: 根据条件查询,不分页
* @param query
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtentExcelVO>
* @author: wangweiguo
* @date: 2021/8/10
*/
List<BusinessEmployeeExtentExcelVO> getTEmployeeBusinessList(@Param("query") THroBusinessUserQuery query);
} }
...@@ -3,7 +3,17 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -3,7 +3,17 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.BusinessEmployeeExtendByLeave;
import com.yifu.cloud.plus.v1.yifu.archives.vo.BusinessEmployeeExtendVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @description: b端员工信息拓展信息 service * @description: b端员工信息拓展信息 service
...@@ -11,36 +21,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO ...@@ -11,36 +21,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO
* @date: 2021/8/6 * @date: 2021/8/6
*/ */
public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEmployeeExtendInfo> { public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEmployeeExtendInfo> {
// /**
// * @description: 根据身份证号查询人员拓展表信息
// * @param empIdcard 身份证号
// * @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
// * @author: wangweiguo
// * @date: 2021/8/10
// */
// TBusinessEmployeeExtendInfo getByEmpIdCard(String empIdcard);
//
// /**
// * @param businessTelecomNumber
// * @Description: 根据工号返回附属信息
// * @Author: hgw
// * @Date: 2021/8/18 17:03
// * @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
// **/
// TBusinessEmployeeExtendInfo getByBusinessTelecomNumber(String businessTelecomNumber);
//
// /**
// * 根据jsonStr批量更新人员信息拓展表信息
// * @description:
// * @param jsonStr
// * @param empInfoMap
// * @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
// * @author: wangweiguo
// * @date: 2021/8/10
// */
// R<Boolean> batchUpdateEmployeeExtendByJsonStr(String jsonStr, HashMap<String, TEmployeeInfo> empInfoMap);
/** /**
* 更新人员信息冗余字段 * 更新人员信息冗余字段
* @description: 更新人员信息冗余字段 * @description: 更新人员信息冗余字段
...@@ -50,46 +30,74 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm ...@@ -50,46 +30,74 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
* @date: 2021/8/12 * @date: 2021/8/12
*/ */
Boolean updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO dto); Boolean updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO dto);
/**
* @description: 根据身份证号查询人员拓展表信息
* @param empIdcard 身份证号
* @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
* @author: wangweiguo
* @date: 2021/8/10
*/
TBusinessEmployeeExtendInfo getByEmpIdCard(String empIdcard);
/**
* @param businessTelecomNumber
* @Description: 根据工号返回附属信息
* @Author: hgw
* @Date: 2021/8/18 17:03
* @return: com.yifu.cloud.v1.hrms.api.entity.basic.TBusinessEmployeeExtendInfo
**/
TBusinessEmployeeExtendInfo getByBusinessTelecomNumber(String businessTelecomNumber);
/**
* 根据jsonStr批量更新人员信息拓展表信息
* @description:
* @param jsonStr
* @param empInfoMap
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/10
*/
R<List<ErrorMessage>> batchUpdateEmployeeExtendByJsonStr(String jsonStr, HashMap<String, TEmployeeProject> empInfoMap);
/**
* 根据身份证号获取拓展信息列表
* @description: 根据身份证号获取拓展信息列表
* @param idCardList
* @return: com.yifu.cloud.v1.common.core.util.R<List<TBusinessEmployeeExtendInfo>>
* @author: wangweiguo
* @date: 2021/8/16
*/
List<TBusinessEmployeeExtendInfo> getListByIdCardList(List<String> idCardList);
/**
* 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
* @author: wangweiguo
* @date: 2021/8/17
*/
R<List<BusinessEmployeeExtendVO>> getNotLeaveExtendList();
/**
* @param
* @Description: 获取所有附属信息
* @Author: hgw
* @Date: 2021/8/18 16:45
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/
R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap();
/**
* b端人员信息编辑拓展信息
* @description: b端人员信息编辑拓展信息
* @param tBusinessEmployeeExtendInfo 实体
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/19
*/
R<Boolean> saveOrUpdateData(TBusinessEmployeeExtendInfo tBusinessEmployeeExtendInfo);
boolean updateEmpExtendCertInfo(UpdateEmployeeExtendRedundancyDTO dto);
// /** TBusinessEmployeeExtendInfo getDataById(String extendId);
// * 根据身份证号获取拓展信息列表
// * @description: 根据身份证号获取拓展信息列表
// * @param idcardList
// * @return: com.yifu.cloud.v1.common.core.util.R<List<TBusinessEmployeeExtendInfo>>
// * @author: wangweiguo
// * @date: 2021/8/16
// */
// R<List<TBusinessEmployeeExtendInfo>> getListByIdcartList(List<String> idcardList);
//
// /**
// * 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
// * @description: 查询-列表:内部服务调用,获取所有非离职员工拓展表信息
// * @return: com.yifu.cloud.v1.common.core.util.R<java.util.List<com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendVO>>
// * @author: wangweiguo
// * @date: 2021/8/17
// */
// R<List<BusinessEmployeeExtendVO>> getNotLeaveExtendList();
//
// /**
// * @param
// * @Description: 获取所有附属信息
// * @Author: hgw
// * @Date: 2021/8/18 16:45
// * @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
// **/
// R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap();
//
// /**
// * b端人员信息编辑拓展信息
// * @description: b端人员信息编辑拓展信息
// * @param tBusinessEmployeeExtendInfo 实体
// * @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
// * @author: wangweiguo
// * @date: 2021/8/19
// */
// R<Boolean> saveOrUpdateData(TBusinessEmployeeExtendInfo tBusinessEmployeeExtendInfo);
//
// R<String> updateEmpExtendCertInfo(UpdateEmployeeExtendRedundancyDTO dto);
//
// TBusinessEmployeeExtendInfo getDataById(String extendId);
} }
...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractAuditVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...@@ -180,4 +177,11 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract ...@@ -180,4 +177,11 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
void exportAuditContractInfo(TEmployeeContractSearchVo contractInfo, HttpServletResponse response); void exportAuditContractInfo(TEmployeeContractSearchVo contractInfo, HttpServletResponse response);
R<List<ErrorMessage>> auditContractBatch(EmpContractAuditVo contractAuditVo, YifuUser user); R<List<ErrorMessage>> auditContractBatch(EmpContractAuditVo contractAuditVo, YifuUser user);
IPage<EmpContractBusinessPageVo> getContractBusinessPage(Page<EmpContractBusinessPageVo> page, EmpContractBusinessPageVo contractBusinessPageVo, List<String> settleDomainIds, Integer alertFlag);
Integer getContractBusinessAlertCount(List<String> settleDomainIds);
List<EmpContractBusinessPageVo> getOtherContractBusinessInfo(String empId, String contractId);
} }
...@@ -23,10 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -23,10 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainDataVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -228,4 +225,35 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -228,4 +225,35 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R<List<TSettleDomainDataVo>> selectSettleMentData(List<String> deptNoList); R<List<TSettleDomainDataVo>> selectSettleMentData(List<String> deptNoList);
/**
* B端获取登录用户对应单位的员工数据
* @Author fxj
* @Date 2020-08-25
* @UpdaeDate 2021-08-09 wwg
* @param page
* @param query
* @return
**/
IPage<BusinessEmployeeExtendListVO> getTEmployeeBusinessPage(Page<EmployeeBusinessVo> page, THroBusinessUserQuery query);
/**
* 获取档案B端要求数据
* @Author fxj
* @Date 2020-05-25
* @param empId
* @return
**/
EmployeeBusinessDetailVo getEmployeeBusinessInfoById(String empId, String settleDomain);
R<EmployeeBusinessVo> getEmployeeBusinessVoById(String empId);
/**
* b端人员信息导出
* @description: 导出:b端人员信息导出
* @param query
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/10
*/
R<List<BusinessEmployeeExtentExcelVO>> exportByParams(THroBusinessUserQuery query);
} }
...@@ -67,6 +67,7 @@ import java.math.BigDecimal; ...@@ -67,6 +67,7 @@ import java.math.BigDecimal;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
...@@ -1400,4 +1401,76 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1400,4 +1401,76 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
return R.ok(errorMessages); return R.ok(errorMessages);
} }
/**
* B端合同列表查询接口
* @Author fxj
* @Date 2020-08-25
* @param page
* @param contractBusinessPageVo
* @param flag 0 按3个月内到期提醒 1 不安提醒查询
* @return
**/
@Override
public IPage<EmpContractBusinessPageVo> getContractBusinessPage(Page<EmpContractBusinessPageVo> page, EmpContractBusinessPageVo contractBusinessPageVo, List<String> settleDomainIds, Integer flag) {
IPage<EmpContractBusinessPageVo> pageVoList = baseMapper.getContractBusinessPage(page, contractBusinessPageVo, settleDomainIds,flag);
List<EmpContractBusinessPageVo> voList = pageVoList.getRecords();
List<TEmployeeContractInfo> contractInfoList = null;
List<String> empIds = new ArrayList<>();
if (Common.isNotNull(voList)){
for (EmpContractBusinessPageVo vo:voList){
empIds.add(vo.getEmpId());
}
}
if (Common.isNotNull(empIds)){
contractInfoList = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.in(TEmployeeContractInfo::getEmpId,empIds));
}
HashMap<String,Integer> countMap = new HashMap<>();
if (Common.isNotNull(contractInfoList)){
Integer count;
for (TEmployeeContractInfo contractInfo:contractInfoList){
count = countMap.get(contractInfo.getEmpId());
count = null ==count?1:(count+1);
countMap.put(contractInfo.getEmpId(),count);
}
}
if (Common.isNotNull(voList)){
for (EmpContractBusinessPageVo pageVo:voList){
pageVo.setRenewCount(countMap.get(pageVo.getEmpId()));
}
}
pageVoList.setRecords(voList);
return pageVoList;
}
/**
* B端查询合同到期提醒数(查询3个月内到期的合同)
* @Author fxj
* @Date 2020-08-25
* @param
* @return
**/
@Override
public Integer getContractBusinessAlertCount(List<String> settleDomainIds) {
EmpContractBusinessPageVo contractBusinessPageVo = new EmpContractBusinessPageVo();
contractBusinessPageVo.setInUse(CommonConstants.ZERO_STRING);
contractBusinessPageVo.setIsObsolete(CommonConstants.ZERO_STRING);
return baseMapper.getContractBusinessAlertCount(contractBusinessPageVo,settleDomainIds,CommonConstants.THREE_INT);
}
/**
* B端查询对应员工指定合同ID之外的其他合同信息
* @Author fxj
* @Date 2020-08-25
* @param empId
* @param contractId
* @return
**/
@Override
public List<EmpContractBusinessPageVo> getOtherContractBusinessInfo(String empId, String contractId) {
return baseMapper.getOtherContractBusinessInfo(empId,contractId);
}
} }
...@@ -556,4 +556,126 @@ ...@@ -556,4 +556,126 @@
</if> </if>
</where> </where>
</select> </select>
<!--*********************************B端合同列表开始2020-08-27**************************************-->
<resultMap id="tEmpContractInfoBusinessMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractBusinessPageVo">
<id property="id" column="ID"/>
<result property="empNo" column="EMP_NO"/>
<result property="empId" column="EMP_ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="contractName" column="CONTRACT_NAME"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="situation" column="SITUATION"/>
<result property="isObsolete" column="IS_OBSOLETE"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="inUse" column="IN_USE"/>
</resultMap>
<!--B端合同列表简单分页查询-->
<select id="getContractBusinessPage" resultMap="tEmpContractInfoBusinessMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_contract_info a
LEFT JOIN t_employee_contract_info b on a.EMP_ID=b.EMP_ID and b.CREATE_TIME >a.CREATE_TIME
<where>
b.id is NULL
<if test="tEmployeeContractInfo != null">
<if test="tEmployeeContractInfo.empName != null and tEmployeeContractInfo.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%',#{tEmployeeContractInfo.empName},'%')
</if>
<if test="tEmployeeContractInfo.situation != null and tEmployeeContractInfo.situation != ''">
AND a.SITUATION = #{tEmployeeContractInfo.situation}
</if>
<if test="tEmployeeContractInfo.isObsolete != null and tEmployeeContractInfo.isObsolete.trim() != ''">
AND a.IS_OBSOLETE = #{tEmployeeContractInfo.isObsolete}
</if>
<if test="tEmployeeContractInfo.settleDomain != null and tEmployeeContractInfo.settleDomain != ''">
AND a.SETTLE_DOMAIN = #{tEmployeeContractInfo.settleDomain}
</if>
<if test="tEmployeeContractInfo.inUse != null and tEmployeeContractInfo.inUse.trim() != ''">
AND a.IN_USE = #{tEmployeeContractInfo.inUse}
</if>
</if>
<if test="settleDomainIds != null and settleDomainIds.size >0">
AND a.SETTLE_DOMAIN in
<foreach item="item" index="index" collection="settleDomainIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="flag != null and flag == 0">
AND a.CONTRACT_END <![CDATA[<]]> ADDDATE(current_date,INTERVAL 3 month) AND a.CONTRACT_END <![CDATA[>]]> now()
AND a.IN_USE = '0'
</if>
</where>
order by a.EMP_ID,a.CONTRACT_START DESC
</select>
<select id="getContractBusinessAlertCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_contract_info a
LEFT JOIN t_employee_contract_info b on a.EMP_ID=b.EMP_ID and b.CREATE_TIME >a.CREATE_TIME
<where>
b.id is NULL
<if test="tEmployeeContractInfo != null">
<if test="tEmployeeContractInfo.empName != null and tEmployeeContractInfo.empName.trim() != ''">
AND a.EMP_NAME like CONCAT(#{tEmployeeContractInfo.empName},'%')
</if>
<if test="tEmployeeContractInfo.situation != null and tEmployeeContractInfo.situation != ''">
AND a.SITUATION = #{tEmployeeContractInfo.situation}
</if>
<if test="tEmployeeContractInfo.isObsolete != null and tEmployeeContractInfo.isObsolete.trim() != ''">
AND a.IS_OBSOLETE = #{tEmployeeContractInfo.isObsolete}
</if>
<if test="tEmployeeContractInfo.settleDomain != null and tEmployeeContractInfo.settleDomain != ''">
AND a.SETTLE_DOMAIN = #{tEmployeeContractInfo.settleDomain}
</if>
<if test="tEmployeeContractInfo.inUse != null and tEmployeeContractInfo.inUse.trim() != ''">
AND a.IN_USE = #{tEmployeeContractInfo.inUse}
</if>
</if>
<if test="settleDomainIds != null and settleDomainIds.size >0">
AND a.SETTLE_DOMAIN in
<foreach item="item" index="index" collection="settleDomainIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="alertMonth != null">
AND a.CONTRACT_END <![CDATA[<]]> ADDDATE(current_date,INTERVAL #{alertMonth} month) AND a.CONTRACT_END <![CDATA[>]]> now()
</if>
</where>
</select>
<!--获取最新合同,通过员工身份证-->
<select id="getOtherContractBusinessInfo" resultMap="tEmpContractInfoBusinessMap">
SELECT
a.ID,
a.EMP_NO,
a.EMP_ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.CONTRACT_NAME,
a.CONTRACT_TYPE,
a.CONTRACT_START,
a.CONTRACT_END,
a.SITUATION,
a.IS_OBSOLETE,
a.SETTLE_DOMAIN,
a.IN_USE
FROM t_employee_contract_info a
where
IS_OBSOLETE = '0'
<if test="empId != null">
AND a.EMP_ID = #{empId}
</if>
<if test="contractId != null">
AND a.id != #{contractId}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
</mapper> </mapper>
...@@ -874,4 +874,125 @@ ...@@ -874,4 +874,125 @@
where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d") where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d")
</update> </update>
<resultMap id="businessEmployeeExtendListVO" type="com.yifu.cloud.plus.v1.yifu.archives.vo.BusinessEmployeeExtendListVO">
</resultMap>
<select id="getTEmployeeBusinessPage" resultMap="businessEmployeeExtendListVO">
SELECT
a.ID,
b.ID as extendId,
a.EMP_NAME,
a.EMP_IDCARD,
if(b.BUSINESS_ENJOIN_DATE is not null, b.BUSINESS_ENJOIN_DATE, a.ENJOIN_DATE) as BUSINESS_ENJOIN_DATE,
a.DEPT_ID SETTLE_DOMAIN,
b.DEPART_NAME,
b.DEPART_ID,
b.BUSINESS_POST,
b.BUSINESS_TELECOM_NUMBER,
b.EMPLOYEE_TAGS,
if(b.BUSINESS_WORKING_STATUS is not null, b.BUSINESS_WORKING_STATUS, a.PROJECT_STATUS) as BUSINESS_WORKING_STATUS,
a.PROJECT_STATUS WORK_FLAG,
a.STATUS WORKING_STATUS_SUB,
if(b.BUSINESS_LEAVE_DATE is not null, b.BUSINESS_LEAVE_DATE, a.LEAVE_TIME) as BUSINESS_LEAVE_DATE,
b.DOCUMENT_TYPE,
c.DEPART_NAME as SETTLE_DOMAIN_NAME
FROM t_employee_project a
left join t_business_employee_extend_info b on a.EMP_IDCARD = b.EMP_IDCARD
left join t_settle_domain c on a.DEPT_ID = c.ID
where a.DELETE_FLAG = '0' and c.DELETE_FLAG = '0'
<include refid="BusinessQuery"/>
order by a.ENJOIN_DATE DESC
</select>
<sql id="BusinessQuery">
<if test="query.empIdcard != null and query.empIdcard.trim() != ''">
AND a.EMP_IDCARD like CONCAT('%', #{query.empIdcard},'%')
</if>
<if test="query.empName != null and query.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%',#{query.empName},'%')
</if>
<if test="query.settleDomainId != null and query.settleDomainId.trim() != ''">
AND a.DEPT_ID = #{query.settleDomainId}
</if>
<if test="query.businessPost != null and query.businessPost != ''">
AND b.BUSINESS_POST like CONCAT('%',#{query.businessPost},'%')
</if>
<if test="query.departName != null and query.departName.trim() != ''">
AND b.DEPART_NAME like CONCAT(#{query.departName},'%')
</if>
<if test="query.departId != null and query.departId != 1">
AND (b.DEPART_ID = #{query.departId} or b.DEPART_CODE like concat('%-', #{query.departId},'-%'))
</if>
<if test="query.businessTelecomNumber != null and query.businessTelecomNumber.trim() != ''">
AND b.BUSINESS_TELECOM_NUMBER like CONCAT('%',#{query.businessTelecomNumber} ,'%')
</if>
<if test="query.businessWorkingStatus == null">
<!--AND if(b.BUSINESS_WORKING_STATUS is not null, b.BUSINESS_WORKING_STATUS is not null, a.WORK_FLAG = '0') 2022-01-19 fxj 调整-->
AND a.PROJECT_STATUS = '0'
</if>
<!-- businessWorkingStatus: 0 在职 1 离职 -->
<if test="query.businessWorkingStatus != null and query.businessWorkingStatus.trim() != ''">
<!-- 0查询在职 -->
<if test="query.businessWorkingStatus == '0'.toString()">
<!-- 在职状态为 0在职 3临时 不等于1为在职 -->
<!-- AND if(b.BUSINESS_WORKING_STATUS is not null, b.BUSINESS_WORKING_STATUS <![CDATA[<>]]> '1', a.WORK_FLAG = '0') 2022-01-19 fxj 调整-->
AND a.PROJECT_STATUS = '0'
</if>
<!-- 1查询离职 -->
<if test="query.businessWorkingStatus == '1'.toString()">
<!-- 离职 1 -->
AND a.PROJECT_STATUS = '0'
AND b.BUSINESS_WORKING_STATUS = '1'
</if>
</if>
<if test="query.employeeTagName != null and query.employeeTagName.trim() != ''">
AND b.EMPLOYEE_TAGS like CONCAT('%',#{query.employeeTagName},'%')
</if>
<!-- 是否持证 0否 1是 -->
<if test="query.documentStatus != null and query.documentStatus.trim() != '' and query.documentStatus == '0'.toString()">
AND if(b.DOCUMENT_TYPE = '', b.DOCUMENT_TYPE = '', b.DOCUMENT_TYPE is null)
</if>
<if test="query.documentStatus != null and query.documentStatus.trim() != '' and query.documentStatus == '1'.toString()">
AND b.DOCUMENT_TYPE is NOT NULL AND b.DOCUMENT_TYPE <![CDATA[<>]]> ''
</if>
<if test="query.settleDomainIds != null and query.settleDomainIds.size >0">
and a.DEPT_ID in
<foreach item="settleDomainId" index="index" collection="query.settleDomainIds" open="(" separator="," close=")">
#{settleDomainId}
</foreach>
</if>
</sql>
<resultMap id="businessEmployeeExtentExcelVO" type="com.yifu.cloud.plus.v1.yifu.archives.vo.BusinessEmployeeExtentExcelVO">
</resultMap>
<select id="getTEmployeeBusinessList" resultMap="businessEmployeeExtentExcelVO">
SELECT
a.EMP_NAME,
a.EMP_IDCARD,
b.BUSINESS_TELECOM_NUMBER,
b.DEPART_NAME,
b.DEPART_ID,
a.DEPT_ID SETTLE_DOMAIN,
b.BUSINESS_POST,
b.FIRST_DEGREE_AND_MAJOR,
b.FIRST_DEGREE_GRADUATE_SCHOOL,
b.HIGHEST_DEGREE_AND_MAJOR,
b.HIGHEST_DEGREE_GRADUATE_SCHOOL,
b.CONTACT_INFO,
b.ARCHIVES_ADDR,
if(b.BUSINESS_ENJOIN_DATE is not null, b.BUSINESS_ENJOIN_DATE, a.ENJOIN_DATE) as BUSINESS_ENJOIN_DATE,
b.EMPLOYEE_TAGS,
if(b.BUSINESS_WORKING_STATUS is not null, b.BUSINESS_WORKING_STATUS, a.PROJECT_STATUS) as BUSINESS_WORKING_STATUS,
a.PROJECT_STATUS WORK_FLAG,
a.STATUS WORKING_STATUS_SUB,
if(b.BUSINESS_LEAVE_DATE is not null, b.BUSINESS_LEAVE_DATE, a.LEAVE_TIME) as BUSINESS_LEAVE_DATE,
b.DOCUMENT_TYPE,
c.DEPART_NAME as SETTLE_DOMAIN_NAME
FROM t_employee_project a
left join t_business_employee_extend_info b on a.EMP_IDCARD = b.EMP_IDCARD
left join t_settle_domain c on a.DEPT_ID = c.ID
where a.DELETE_FLAG = '0' and c.DELETE_FLAG = '0'
<include refid="BusinessQuery"/>
order by a.ENJOIN_DATE DESC
</select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.business.vo.cert;
import com.yifu.cloud.plus.v1.business.entity.cert.TCertInfo;
import com.yifu.cloud.plus.v1.business.entity.cert.TUpdateRecord;
import com.yifu.cloud.plus.v1.business.entity.system.TBusAttaInfo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @ClassName TCertInfoVo
* @Description 页面详情获取
* @Author fxj
* @Created 2021/8/18 17:36
* @Version 1.0
*/
@Data
public class TCertInfoVo implements Serializable {
/**
* 证件信息表
*/
private TCertInfo certInfo;
/**
* 变更记录表
*/
private List<TUpdateRecord> recordList;
/**
* 附件表
*/
private List<TBusAttaInfo> attaInfos;
}
package com.yifu.cloud.plus.v1.business.vo.system;
import com.yifu.cloud.plus.v1.business.entity.system.TBusDept;
import lombok.Data;
import java.util.List;
/**
* @Description: B端部门vo
* @Author: hgw
* @Date: 2023-1-4 11:32:01
**/
@Data
public class BusDeptVo {
private List<TBusDept> busDeptList;
}
package com.yifu.cloud.plus.v1.business.vo.system;
import com.yifu.cloud.plus.v1.business.entity.system.TBusLable;
import lombok.Data;
import java.util.List;
/**
* @Description: B端标签vo
* @Author: hgw
* @Date: 2023-1-4 11:32:01
**/
@Data
public class BusLableVo {
private List<TBusLable> busLableList;
}
package com.yifu.cloud.plus.v1.business.vo.vacation;
import lombok.*;
import java.io.Serializable;
/**
* @description: UpdateVacationMonitorRedundancyDTO
* @author: wangweiguo
* @date: 2021/8/23
*/
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class UpdateVacationRedundancyDTO implements Serializable {
/**
* 身份证号
*/
private String empIdcard;
/**
* 姓名
*/
private String empName;
/**
* 电信工号
*/
private String businessTelecomNumber;
/**
* 岗位
*/
private String businessPost;
/**
* 部门id
*/
private Integer departId;
/**
* 标签
*/
private String label;
}
package com.yifu.cloud.plus.v1.business.controller.cert;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.dto.vacation.UpdateVacationRedundancyDTO;
import com.yifu.cloud.plus.v1.business.entity.cert.TCertInfo;
import com.yifu.cloud.plus.v1.business.service.cert.TCertInfoService;
import com.yifu.cloud.plus.v1.business.vo.cert.TCertInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
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.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.time.LocalDateTime;
import java.util.List;
/**
* 人员证书信息表
*
* @author fxj
* @date 2021-08-16 15:34:16
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tcertinfo")
@Tag(name = "人员证书信息表")
public class TCertInfoController {
private final TCertInfoService tCertInfoService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tCertInfo 人员证书信息表
* @return
*/
@Operation(summary = "简单分页查询")
@GetMapping("/page")
public R<IPage<TCertInfo>> getTCertInfoPage(Page<TCertInfo> page, TCertInfo tCertInfo) {
if (StringUtils.isNotBlank(tCertInfo.getLabel())) {
String empTag = String.format(CommonConstants.TAG_FROMAT, Integer.valueOf(tCertInfo.getLabel()));
tCertInfo.setLabel(empTag);
}
return new R<>(tCertInfoService.getTCertInfoPage(page, tCertInfo));
}
/**
* 简单分页查询
*
* @param tCertInfo 人员证书信息表
* @return
*/
@Operation(summary = "导出查询")
@GetMapping("/getCertInfoForExport")
public R<List<TCertInfo>> getCertInfoForExport(TCertInfo tCertInfo) {
if (StringUtils.isNotBlank(tCertInfo.getLabel())) {
String empTag = String.format(CommonConstants.TAG_FROMAT, Integer.valueOf(tCertInfo.getLabel()));
tCertInfo.setLabel(empTag);
}
return R.ok(tCertInfoService.getCertInfoForExport(tCertInfo));
}
/**
* 通过id查询单条记录
*
* @param id
* @return R
*/
@Operation(summary = "id查询")
@GetMapping("/{id}")
public R<TCertInfoVo> getById(@PathVariable("id") String id) {
return tCertInfoService.getVoById(id);
}
/**
* 通过身份证号查询单条记录
*
* @param empIdcard
* @return R
*/
@Operation(summary = "empIdcard查询所有证件信息")
@GetMapping("/getByempIdcard")
public R<List<TCertInfoVo>> getByempIdcard(@RequestParam(name = "empIdcard") String empIdcard) {
return tCertInfoService.getByEmpIdcard(empIdcard);
}
/**
* 新增记录
*
* @param tCertInfo
* @return R
*/
@Operation(summary = "新增(yifu-hro-business:tcertinfo_add)")
@PostMapping
@PreAuthorize("@pms.hasPermission('yifu-hro-business:tcertinfo_add')")
public R<TCertInfo> save(@Valid @RequestBody TCertInfo tCertInfo) {
YifuUser user = SecurityUtils.getUser();
if (null == user) {
return R.failed("获取用户信息失败!");
}
tCertInfo.setStatus(CommonConstants.ZERO_STRING);
tCertInfo.setCreateUser(user.getNickname());
tCertInfo.setCreateTime(LocalDateTime.now());
return tCertInfoService.saveAsso(tCertInfo);
}
/**
* 修改记录
*
* @param tCertInfo
* @return R
*/
@Operation(summary = "修改(yifu-hro-business:tcertinfo_edit)")
@SysLog("修改人员证书信息表")
@PutMapping
@PreAuthorize("@pms.hasPermission('yifu-hro-business:tcertinfo_edit')")
public R<String> update(@RequestBody TCertInfo tCertInfo) {
return tCertInfoService.updateByIdDiy(tCertInfo);
}
/**
* 通过id删除一条记录
*
* @param id
* @return R
*/
@Operation(summary = "删除(yifu-hro-business:tcertinfo_del)")
@SysLog("删除人员证书信息表")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('yifu-hro-business:tcertinfo_del')")
public R<Boolean> removeById(@PathVariable String id) {
return tCertInfoService.removeByIdDiy(id);
}
/**
* b端人员证件信息批量导入
*
* @param jsonStr
* @description: b端人员证件信息批量导入
* @author: fxj
* @date: 2021/8/10
*/
@Operation(summary = "批量导入:b端人员证件信息批量导入")
@PutMapping("/batchImportCertByJsonStr")
public R<List<ErrorMessage>> batchImportCertByJsonStr(@RequestBody String jsonStr) {
return tCertInfoService.batchImportCertByJsonStr(jsonStr);
}
/**
* b端人员证件信息批量更新
*
* @param jsonStr
* @description: b端人员证件信息批量更新
* @author: fxj
* @date: 2021/8/10
*/
@Operation(summary = "批量更新:b端人员证件信息批量更新")
@PutMapping("/batchUpdateCertByJsonStr")
public R<List<ErrorMessage>> batchUpdateCertByJsonStr(@RequestBody String jsonStr) {
return tCertInfoService.batchUpdateCertByJsonStr(jsonStr);
}
/**
* 定时任务更新证件状态信息
*
* @return
* @date 2021-08-23
* @author: fxj
*/
@Inner
@Operation(summary = "B端定时更新证件状态")
@PostMapping("/inner/updateCertStatusTask")
public R<Boolean> updateCertStatusTask() {
return tCertInfoService.updateCertStatusTask();
}
/**
* 更新证件信息中的冗余信息
*
* @param dtoList
* @return
*/
@Inner
@PostMapping("/inner/updateRedundancyEmpOfCert")
public void updateRedundancyEmpOfCert(@RequestBody List<UpdateVacationRedundancyDTO> dtoList) {
tCertInfoService.updateRedundancyEmpOfCert(dtoList);
}
}
package com.yifu.cloud.plus.v1.business.controller.cert;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.cert.TUpdateRecord;
import com.yifu.cloud.plus.v1.business.service.cert.TUpdateRecordService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 证书变更记录表
*
* @author fxj
* @date 2021-08-16 15:34:16
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tupdaterecord")
@Tag(name = "证书变更记录表")
public class TUpdateRecordController {
private final TUpdateRecordService tUpdateRecordService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param updateRecord 证书变更记录表
* @return
*/
@Operation(summary = "简单分页查询")
@GetMapping("/page")
public R<IPage<TUpdateRecord>> getTCertInfoPage(Page<TUpdateRecord> page, TUpdateRecord updateRecord) {
return new R<>(tUpdateRecordService.getTUpdateRecordPage(page, updateRecord));
}
/**
* 通过id查询单条记录
*
* @param domainId
* @return R
*/
@Operation(summary = "通过实体类ID查询对应变更记录信息")
@GetMapping("/getRecordsByDomainId")
public R<List<TUpdateRecord>> getById(@PathVariable("domainId") String domainId) {
return tUpdateRecordService.getRecordsByDomainId(domainId);
}
}
package com.yifu.cloud.plus.v1.business.controller.fileupload;
import com.yifu.cloud.plus.v1.business.entity.system.TBusAttaInfo;
import com.yifu.cloud.plus.v1.business.service.system.TBusAttaInfoService;
import com.yifu.cloud.plus.v1.business.vo.BusFileVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* @author hgw
* 文件上传接口
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/fileUpload")
@Tag(name = "文件上传接口")
@Slf4j
public class FileUploadController {
private final OSSUtil ossUtil;
private final TBusAttaInfoService busAttaInfoService;
/**
* 阿里云处理文件上传
*
* @param file 文件
* @param filePath 如: import 或 import/test/test..../test
* @return
* @throws IOException
*/
// @ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
// @ApiImplicitParam(name = "filePath", value = "文件上传路径", dataType = "String", paramType = "form"),
// @ApiImplicitParam(name = "type", value = "上传类型0结算单;1社保;2公积金;3代发工资;4餐补;5春节大礼包;6证件附件;7假勤信息附件8学信网证明", required = true, dataType = "int", paramType = "form"),
// @ApiImplicitParam(name = "domain", value = "实体id(传入就插入对应关系)", paramType = "form")
@Operation(summary = "OSS文件上传接口", description = "上传文件并保持文件路径到数据库")
@PostMapping(value = "/ossUploadFile")
public R<BusFileVo> uploadFile(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
return busAttaInfoService.uploadFile(file, filePath, type, domain);
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
**/
@Operation(summary = "附件预览下载地址")
@GetMapping("/ossFileUrl/{id}")
public R ossFileUrl(@PathVariable String id) {
TBusAttaInfo busAtta = busAttaInfoService.getById(id);
if (null == busAtta) {
return R.failed("无对应附件信息");
}
URL url = ossUtil.getObjectUrl(null, busAtta.getAttaSrc());
busAtta.setAttaSrc(url.toString());
return new R<>(busAtta);
}
// @ApiImplicitParam(name = "file", value = "Form文件上传", required = true, allowMultiple = true, dataType = "__file", paramType = "form"),
// @ApiImplicitParam(name = "filePath", value = "文件上传路径", required = false, dataType = "String", paramType = "form"),
// @ApiImplicitParam(name = "type",allowMultiple = true, value = "上传类型0结算单;1社保;2公积金;3代发工资;4餐补;5春节大礼包;6证件附件;7假勤信息附件8学信网证明", required = true, dataType = "String", paramType = "form"),
// @ApiImplicitParam(name = "domain",allowMultiple = true, value = "实体id(传入就插入对应关系)", paramType = "form")
@Operation(summary = "OSS多文件上传接口", description = "上传文件并保持文件路径到数据库")
@PostMapping(value = "/ossUploadFileMultipart", headers = "content-type=multipart/form-data")
public R<List<R<BusFileVo>>> ossUploadFileMultipart(HttpServletRequest request,
@RequestParam(value = "filePath", required = false) String filePath,
@RequestParam(value = "type", required = true)String[] type,
@RequestParam(value = "domain", required = true)String[] domain,
@RequestParam(value = "file", required = true)MultipartFile[] file) throws IOException {
if (Common.isEmpty(file) || Common.isEmpty(type) || Common.isEmpty(domain)){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
if (type.length != domain.length || type.length != file.length || domain.length != file.length){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
List<R<BusFileVo>> fileVos = new ArrayList<>();
//filePath不传默认存储空间的根目录
for (int i=0;i<file.length;i++) {
fileVos.add(busAttaInfoService.uploadFile(file[i], filePath, Integer.parseInt(type[i]), domain[i]));
}
return R.ok(fileVos);
}
/**
* 删除数据库记录和OSS文件
*
* @param id
* @return
* @Author fxj
* @Date 2019-09-09
**/
@Operation(summary = "附件删除")
@SysLog("附件删除")
@GetMapping("/ossFileDelete/{id}")
public R<Boolean> ossFileDelete(@PathVariable String id) {
try {
TBusAttaInfo busAtta = busAttaInfoService.getById(id);
if (null == busAtta) {
return R.failed("无对应附件信息");
}
if (busAttaInfoService.removeById(id)) {
ossUtil.deleteObject(null, busAtta.getAttaSrc());
return R.ok();
}
} catch (Exception e) {
log.error("附件删除异常:" + e.getMessage());
return R.failed("附件删除异常!!");
}
return R.failed("删除失败!!");
}
}
...@@ -8,7 +8,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -8,7 +8,6 @@ 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.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -8,7 +8,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -8,7 +8,6 @@ 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.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -13,7 +13,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -13,7 +13,6 @@ 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.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -14,6 +14,7 @@ import org.springframework.security.access.prepost.PreAuthorize; ...@@ -14,6 +14,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -54,7 +55,9 @@ public class TBusSalaryItemController { ...@@ -54,7 +55,9 @@ public class TBusSalaryItemController {
@Operation(summary = "工资详情") @Operation(summary = "工资详情")
@GetMapping("/getListBySalaryId") @GetMapping("/getListBySalaryId")
public R<List<TBusSalaryItem>> getListBySalaryId(@RequestParam String salaryId) { public R<List<TBusSalaryItem>> getListBySalaryId(@RequestParam String salaryId) {
return new R<>(tBusSalaryItemService.getListBySalaryId(salaryId)); List<String> salaryIdList = new ArrayList<>();
salaryIdList.add(salaryId);
return new R<>(tBusSalaryItemService.getListBySalaryId(salaryIdList));
} }
......
...@@ -10,7 +10,6 @@ import com.yifu.cloud.plus.v1.business.vo.salary.TSalaryTotalVO; ...@@ -10,7 +10,6 @@ import com.yifu.cloud.plus.v1.business.vo.salary.TSalaryTotalVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.system.TBusDept; import com.yifu.cloud.plus.v1.business.entity.system.TBusDept;
import com.yifu.cloud.plus.v1.business.service.system.TBusDeptService; import com.yifu.cloud.plus.v1.business.service.system.TBusDeptService;
import com.yifu.cloud.plus.v1.business.vo.system.BusDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
...@@ -12,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -12,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; 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.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
...@@ -92,6 +94,21 @@ public class TBusDeptController { ...@@ -92,6 +94,21 @@ public class TBusDeptController {
return new R<>(tBusDeptService.getTBusDeptList(tBusDept)); return new R<>(tBusDeptService.getTBusDeptList(tBusDept));
} }
/**
* @param tBusDept
* @Description: B端人员调用的部门
* @Author: hgw
* @Date: 2023/1/4 11:38
* @return: com.yifu.cloud.plus.v1.business.vo.system.BusDeptVo
**/
@PostMapping("/inner/getTBusDeptList")
@Inner
public BusDeptVo innerGetTBusDeptList(TBusDept tBusDept) {
BusDeptVo vo = new BusDeptVo();
vo.setBusDeptList(tBusDeptService.getTBusDeptList(tBusDept));
return vo;
}
/** /**
* 查询所有的list 包含删除 * 查询所有的list 包含删除
* @param tBusDept B端部门表 * @param tBusDept B端部门表
......
...@@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.system.TBusLable; import com.yifu.cloud.plus.v1.business.entity.system.TBusLable;
import com.yifu.cloud.plus.v1.business.service.system.TBusLableService; import com.yifu.cloud.plus.v1.business.service.system.TBusLableService;
import com.yifu.cloud.plus.v1.business.vo.system.BusLableVo;
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.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; 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.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -58,6 +60,21 @@ public class TBusLableController { ...@@ -58,6 +60,21 @@ public class TBusLableController {
return new R<>(tBusLableService.getTBusLableList(tBusLable)); return new R<>(tBusLableService.getTBusLableList(tBusLable));
} }
/**
* @param tBusLable
* @Description: B端人员调用的标签
* @Author: hgw
* @Date: 2023/1/4 11:38
* @return: com.yifu.cloud.plus.v1.business.vo.system.BusLableVo
**/
@PostMapping("/inner/getTBusLableList")
@Inner
public BusLableVo innerGetTBusLableList(TBusLable tBusLable) {
BusLableVo busLableVo = new BusLableVo();
busLableVo.setBusLableList(tBusLableService.getTBusLableList(tBusLable));
return busLableVo;
}
/** /**
* 通过id查询单条记录 * 通过id查询单条记录
......
...@@ -132,8 +132,8 @@ public class TVacationInfoController { ...@@ -132,8 +132,8 @@ public class TVacationInfoController {
**/ **/
@Inner @Inner
@PostMapping("/inner/updateRedundancyEmployeeFields") @PostMapping("/inner/updateRedundancyEmployeeFields")
public R<Boolean> updateRedundancyEmployeeFields(@RequestBody List<UpdateVacationRedundancyDTO> dtoList) { public void updateRedundancyEmployeeFields(@RequestBody List<UpdateVacationRedundancyDTO> dtoList) {
return this.tVacationInfoService.updateRedundancyEmployeeFields(dtoList); tVacationInfoService.updateRedundancyEmployeeFields(dtoList);
} }
} }
......
...@@ -89,8 +89,8 @@ public class TVacationMonitorController { ...@@ -89,8 +89,8 @@ public class TVacationMonitorController {
*/ */
@Inner @Inner
@PostMapping("/inner/updateRedundancyEmployeeFields") @PostMapping("/inner/updateRedundancyEmployeeFields")
public R<Boolean> updateRedundancyEmployeeFields(@RequestBody List<UpdateVacationRedundancyDTO> dtoList) { public void updateRedundancyEmployeeFields(@RequestBody List<UpdateVacationRedundancyDTO> dtoList) {
return this.tVacationMonitorService.updateRedundancyEmployeeFields(dtoList); tVacationMonitorService.updateRedundancyEmployeeFields(dtoList);
} }
} }
......
package com.yifu.cloud.plus.v1.business.mapper.cert;
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.business.entity.cert.TCertInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 人员证书信息表
*
* @author fxj
* @date 2021-08-16 15:34:16
*/
@Mapper
public interface TCertInfoMapper extends BaseMapper<TCertInfo> {
/**
* 人员证书信息表简单分页查询
*
* @param tCertInfo 人员证书信息表
* @return
*/
IPage<TCertInfo> getTCertInfoPage(Page<TCertInfo> page, @Param("tCertInfo") TCertInfo tCertInfo);
List<TCertInfo> getCertInfoNoPage(@Param("tCertInfo") TCertInfo tCertInfo);
}
package com.yifu.cloud.plus.v1.business.mapper.cert;
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.business.entity.cert.TUpdateRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TUpdateRecordMapper extends BaseMapper<TUpdateRecord> {
/**
* 简单分页查询
*
* @param tUpdateRecord
* @return
*/
IPage<TUpdateRecord> getTUpdateRecordPage(Page page, @Param("tUpdateRecord") TUpdateRecord tUpdateRecord);
}
...@@ -25,6 +25,6 @@ public interface TBusSalaryItemMapper extends BaseMapper<TBusSalaryItem> { ...@@ -25,6 +25,6 @@ public interface TBusSalaryItemMapper extends BaseMapper<TBusSalaryItem> {
*/ */
IPage<TBusSalaryItem> getTBusSalaryItemPage(Page<TBusSalaryItem> page, @Param("tBusSalaryItem") TBusSalaryItem tBusSalaryItem); IPage<TBusSalaryItem> getTBusSalaryItemPage(Page<TBusSalaryItem> page, @Param("tBusSalaryItem") TBusSalaryItem tBusSalaryItem);
List<TBusSalaryItem> getListBySalaryId(@Param("salaryId") String salaryId); List<TBusSalaryItem> getListBySalaryId(@Param("salaryIdList") List<String> salaryIdList);
} }
package com.yifu.cloud.plus.v1.business.service.cert;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.business.dto.vacation.UpdateVacationRedundancyDTO;
import com.yifu.cloud.plus.v1.business.entity.cert.TCertInfo;
import com.yifu.cloud.plus.v1.business.vo.cert.TCertInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/**
* 人员证书信息表
*
* @author fxj
* @date 2021-08-16 15:34:16
*/
public interface TCertInfoService extends IService<TCertInfo> {
/**
* 人员证书信息表简单分页查询
*
* @param tCertInfo 人员证书信息表
* @return
*/
IPage<TCertInfo> getTCertInfoPage(Page<TCertInfo> page, TCertInfo tCertInfo);
R<List<ErrorMessage>> batchImportCertByJsonStr(String jsonStr);
R<TCertInfo> saveAsso(TCertInfo tCertInfo);
R<String> updateByIdDiy(TCertInfo tCertInfo);
R<TCertInfoVo> getVoById(String id);
R<List<TCertInfoVo>> getByEmpIdcard(String empIdcard);
R<Boolean> removeByIdDiy(String id);
R<List<ErrorMessage>> batchUpdateCertByJsonStr(String jsonStr);
List<TCertInfo> getCertInfoForExport(TCertInfo tCertInfo);
R<Boolean> updateCertStatusTask();
R<List<ErrorMessage>> updateRedundancyEmpOfCert(List<UpdateVacationRedundancyDTO> dtoList);
}
package com.yifu.cloud.plus.v1.business.service.cert;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.business.entity.cert.TUpdateRecord;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/**
* @ClassName TUpdateRecordService
* @Description 证件修改记录表
* @Author fxj
* @Created 2021/8/16 15:12
* @Version 1.0
*/
public interface TUpdateRecordService extends IService<TUpdateRecord> {
/**
* 简单分页查询
*
* @param updateRecord
* @return
*/
IPage<TUpdateRecord> getTUpdateRecordPage(Page<TUpdateRecord> page, TUpdateRecord updateRecord);
/**
* 生成修改记录
* @Author fxj
* @Date 2021-08-16 15:14
* @param id
* @param module
* @param oldInfo
* @param newInfo
* @param tClass
* @return
**/
<T> TUpdateRecord saveModificationRecord(String id,String module,T oldInfo, T newInfo,Class<T> tClass);
<T> TUpdateRecord saveModificationRecord(String id, String module, String differenceKey, T oldInfo, T newInfo, Class<T> tClass);
R<List<TUpdateRecord>> getRecordsByDomainId(String domainId);
}
package com.yifu.cloud.plus.v1.business.service.cert.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.business.entity.cert.TUpdateRecord;
import com.yifu.cloud.plus.v1.business.mapper.cert.TUpdateRecordMapper;
import com.yifu.cloud.plus.v1.business.service.cert.TUpdateRecordService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
import static com.alibaba.fastjson.serializer.SerializerFeature.*;
/**
* @ClassName TUpdateRecordServiceImpl
* @Description 证件修改记录表
* @Author fxj
* @Created 2021/8/16 15:16
* @Version 1.0
*/
@Service
public class TUpdateRecordServiceImpl extends ServiceImpl<TUpdateRecordMapper, TUpdateRecord> implements TUpdateRecordService {
@Override
public IPage<TUpdateRecord> getTUpdateRecordPage(Page<TUpdateRecord> page, TUpdateRecord updateRecord) {
return baseMapper.getTUpdateRecordPage(page,updateRecord);
}
@Override
public <T> TUpdateRecord saveModificationRecord(String id, String module, T oldInfo, T newInfo, Class<T> tClass) {
return saveModificationRecord(id,module,null,oldInfo,newInfo,tClass);
}
/**
* 生成修改记录
* @Author fxj
* @Date 2021-08-16
* @param id
* @param module
* @param differenceKey 非空串必须以逗号结尾
* @param oldInfo
* @param newInfo
* @param tClass
* @return
**/
@Override
public <T> TUpdateRecord saveModificationRecord(String id, String module, String differenceKey, T oldInfo, T newInfo, Class<T> tClass){
try{
//比较记录不影响业务逻辑,用try套住
//比较差异
differenceKey = HrEquator.comparisonValue(oldInfo, newInfo,differenceKey);
//如果有差异保存差异
if(Common.isNotNull(differenceKey)){
TUpdateRecord record = new TUpdateRecord();
YifuUser user = SecurityUtils.getUser();
if (null != user){
record.setCreateUser(String.valueOf(user.getId()));
record.setCreateUserName(user.getNickname());
}else {
record.setCreateUser("305");
record.setCreateUserName("管理员");
}
record.setModul(module);
record.setDomainId(id);
record.setCreateTime(LocalDateTime.now());
record.setNewInfo(JSON.toJSONString(newInfo,features));
record.setOldInfo(JSON.toJSONString(oldInfo,features));
record.setDifferenceInfo(differenceKey);
record.setFullClassName(tClass.getName());
baseMapper.insert(record);
return record;
}
}catch (Exception e){
log.error(JSON.toJSON(oldInfo)+"插入修改记录报错>>>",e);
}
return null;
}
@Override
public R<List<TUpdateRecord>> getRecordsByDomainId(String domainId) {
if (Common.isEmpty(domainId)){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return R.ok(baseMapper.selectList(Wrappers.<TUpdateRecord>query().lambda().eq(TUpdateRecord::getDomainId,domainId)));
}
private SerializerFeature[] features = new SerializerFeature[] {
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty,WriteDateUseDateFormat
};
}
...@@ -24,12 +24,12 @@ public interface TBusSalaryItemService extends IService<TBusSalaryItem> { ...@@ -24,12 +24,12 @@ public interface TBusSalaryItemService extends IService<TBusSalaryItem> {
IPage<TBusSalaryItem> getTBusSalaryItemPage(Page<TBusSalaryItem> page, TBusSalaryItem tBusSalaryItem); IPage<TBusSalaryItem> getTBusSalaryItemPage(Page<TBusSalaryItem> page, TBusSalaryItem tBusSalaryItem);
/** /**
* @param salaryId * @param salaryIdList
* @Description: 获取list * @Description: 获取list
* @Author: hgw * @Author: hgw
* @Date: 2021/9/15 14:56 * @Date: 2021/9/15 14:56
* @return: java.util.List<com.yifu.cloud.v1.hrobusiness.api.entity.salary.TBusSalaryItem> * @return: java.util.List<com.yifu.cloud.v1.hrobusiness.api.entity.salary.TBusSalaryItem>
**/ **/
List<TBusSalaryItem> getListBySalaryId(String salaryId); List<TBusSalaryItem> getListBySalaryId(List<String> salaryIdList);
} }
...@@ -31,8 +31,8 @@ public class TBusSalaryItemServiceImpl extends ServiceImpl<TBusSalaryItemMapper, ...@@ -31,8 +31,8 @@ public class TBusSalaryItemServiceImpl extends ServiceImpl<TBusSalaryItemMapper,
} }
@Override @Override
public List<TBusSalaryItem> getListBySalaryId(String salaryId) { public List<TBusSalaryItem> getListBySalaryId(List<String> salaryIdList) {
return baseMapper.getListBySalaryId(salaryId); return baseMapper.getListBySalaryId(salaryIdList);
} }
} }
...@@ -70,9 +70,23 @@ public class TBusSalaryServiceImpl extends ServiceImpl<TBusSalaryMapper, TBusSal ...@@ -70,9 +70,23 @@ public class TBusSalaryServiceImpl extends ServiceImpl<TBusSalaryMapper, TBusSal
vo.setSalaryList(salaryList); vo.setSalaryList(salaryList);
if (salaryList != null && !salaryList.isEmpty()) { if (salaryList != null && !salaryList.isEmpty()) {
Set<String> title = new HashSet<>(); Set<String> title = new HashSet<>();
List<String> salaryIdList = new ArrayList<>();
for (TBusSalary salary : salaryList) {
salaryIdList.add(salary.getId());
}
List<TBusSalaryItem> allItemList = busSalaryItemService.getListBySalaryId(salaryIdList);
Map<String, List<TBusSalaryItem>> itemMap = new HashMap<>();
List<TBusSalaryItem> itemList; List<TBusSalaryItem> itemList;
for (TBusSalaryItem item : allItemList) {
itemList = itemMap.get(item.getSalaryId());
if (itemList == null) {
itemList = new ArrayList<>();
}
itemList.add(item);
itemMap.put(item.getSalaryId(), itemList);
}
for (TBusSalary salary : salaryList) { for (TBusSalary salary : salaryList) {
itemList = busSalaryItemService.getListBySalaryId(salary.getId()); itemList = itemMap.get(salary.getId());
if (itemList != null && !itemList.isEmpty()) { if (itemList != null && !itemList.isEmpty()) {
salary.setBisList(itemList); salary.setBisList(itemList);
for (TBusSalaryItem items : itemList) { for (TBusSalaryItem items : itemList) {
......
...@@ -55,8 +55,11 @@ ...@@ -55,8 +55,11 @@
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_bus_salary_item a FROM t_bus_salary_item a
where a.SALARY_ID = #{salaryId} where a.SALARY_ID in
order by a.order_line asc <foreach item="item" index="index" collection="salaryIdList" open="(" separator="," close=")">
#{item}
</foreach>
order by a.SALARY_ID,a.order_line asc
</select> </select>
</mapper> </mapper>
...@@ -559,4 +559,8 @@ public interface CommonConstants { ...@@ -559,4 +559,8 @@ public interface CommonConstants {
* @Date 2020-10-13 * @Date 2020-10-13
**/ **/
public static final String SEARCH_SUCCESS = "查询成功!"; public static final String SEARCH_SUCCESS = "查询成功!";
String NO_SETTLE_DOMAIN_AUTH = "Hro系统中身份证号不存在,或者没有该人员的结算主体权限";
String HRO_EMPLOYEE_NULL = "Hro人员列表为空";
int THIRTY_INT_NEGATIVE = -30;
} }
...@@ -144,4 +144,12 @@ public class ExcelAttributeConstants { ...@@ -144,4 +144,12 @@ public class ExcelAttributeConstants {
//有工资无社保 //有工资无社保
public static final String HAVE_SALARY_NO_SOCIAL_TYPE="HAVE_SALARY_NO_SOCIAL_TYPE"; public static final String HAVE_SALARY_NO_SOCIAL_TYPE="HAVE_SALARY_NO_SOCIAL_TYPE";
// B端人员使用的
public static final String REDUCE_REASON = "reduce_reason";
// B端人员使用的
public static final String DEPART = "depart";
// B端人员使用的
public static final String CUSTOMER = "customer";
} }
...@@ -881,6 +881,41 @@ public class DateUtil { ...@@ -881,6 +881,41 @@ public class DateUtil {
} }
} }
/**
* @param date1
* @param date2
* @Description: date2比date1多的天数
* @Author: hgw
* @Date: 2023/1/5 10:18
* @return: int
**/
public static int getDayDiff(Date date1,Date date2) {
Calendar cal1 = Calendar.getInstance();
cal1.setTime(date1);
Calendar cal2 = Calendar.getInstance();
cal2.setTime(date2);
int day1= cal1.get(Calendar.DAY_OF_YEAR);
int day2 = cal2.get(Calendar.DAY_OF_YEAR);
int year1 = cal1.get(Calendar.YEAR);
int year2 = cal2.get(Calendar.YEAR);
//同一年
if (year1 != year2) {
int timeDistance = 0 ;
for (int i = year1 ; i < year2 ; i++) {
//闰年
if (i%4==0 && i%100!=0 || i%400==0) {
timeDistance += 366;
} else {
timeDistance += 365;
}
}
return timeDistance + (day2-day1) ;
} else {
return day2-day1;
}
}
public static int getMonthCountByDate(Date startDate, Date endDate) { public static int getMonthCountByDate(Date startDate, Date endDate) {
// type:1.当月缴当月的 2.当月缴次月的 // type:1.当月缴当月的 2.当月缴次月的
int monthC = 0; int monthC = 0;
......
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