Commit 46059107 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/master'

parents f7015f8c c545d288
......@@ -62,7 +62,7 @@ spec: # 资源规范字段
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
memory: "500Mi"
memory: "1024Mi"
#livenessProbe: # pod 内部健康检查的设置
# httpGet: # 通过httpget检查健康,返回200-399之间,则认为容器正常
# path: /healthCheck # URI地址
......
......@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-mvp</artifactId>
<artifactId>yifu</artifactId>
<name>${project.artifactId}</name>
<version>1.0.0</version>
<packaging>pom</packaging>
......
......@@ -29,4 +29,8 @@ public class ArchivesConstants {
* 减档减项
*/
public static final String REDUCE_EMP_PROJECT_CONTENT = "减档减项";
/**
* 员工合同签订类型
*/
public static final String[] contractSituation = {"作废","离职再入职","合同未到期重新签订","正常签订","商务合同更改","正常续签","终止"};
}
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
/**
* 客户数据权限表
......@@ -21,106 +22,82 @@ import java.time.LocalDateTime;
* @date 2019-07-19 16:22:22
*/
@Data
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("t_cutsomer_data_permisson")
@Schema(description = "客户数据权限表")
public class TCutsomerDataPermisson extends Model<TCutsomerDataPermisson> {
public class TCutsomerDataPermisson implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键", name = "id")
private String id;
/**
* 是否是数据所有者(0是1否)
*/
@NotBlank(message = "是否是数据所有者(0是1否)不能为空")
@Length(max = 1, message = "是否是数据所有者(0是1否)不能超过1个字符")
@ExcelAttribute(name = "是否是数据所有者(0是1否)", isNotEmpty = true, errorInfo = "是否是数据所有者(0是1否)不能为空", maxLength = 1)
@Schema(description = "是否是数据所有者(0是1否)", name = "isOwner")
private String isOwner;
/**
* 客户id
*/
@Length(max = 32, message = "客户id不能超过32个字符")
@ExcelAttribute(name = "客户id", maxLength = 32)
@Schema(description = "客户id", name = "customerId")
private String customerId;
/**
* 合同主体id
*/
@Length(max = 32, message = "合同主体id不能超过32个字符")
@ExcelAttribute(name = "合同主体id", maxLength = 32)
@Schema(description = "合同主体id", name = "contractId")
private String contractId;
/**
* 项目id
*/
@Length(max = 32, message = "项目id不能超过32个字符")
@ExcelAttribute(name = "项目id", maxLength = 32)
@Schema(description = "项目id", name = "settleDomainId")
private String settleDomainId;
/**
* 授权来源
*/
@NotBlank(message = "授权来源不能为空")
@Length(max = 50, message = "授权来源不能超过50个字符")
@ExcelAttribute(name = "授权来源", isNotEmpty = true, errorInfo = "授权来源不能为空", maxLength = 50)
@Schema(description = "授权来源", name = "permissonSrc")
private String permissonSrc;
/**
* 授权等级
*/
@NotBlank(message = "授权等级不能为空")
@ExcelAttribute(name = "授权等级", isNotEmpty = true, errorInfo = "授权等级不能为空")
@Schema(description = "授权等级", name = "permissonLevel")
private Integer permissonLevel;
/**
* 授权人
*/
@NotBlank(message = "授权人不能为空")
@Length(max = 32, message = "授权人不能超过32个字符")
@Schema(description = "授权人", name = "permissionUser")
private String permissionUser;
/**
* 被授权人
*/
@Length(max = 1, message = "状态不能超过1个字符")
@ExcelAttribute(name = "状态", maxLength = 1)
@Schema(description = "状态0启用1禁用")
private String status;
@Length(max = 32, message = "备注不能超过32个字符")
@ExcelAttribute(name = "备注", maxLength = 32)
@Schema(description = "备注")
private String remark;
@Length(max = 32, message = "项目id不能超过32个字符")
@ExcelAttribute(name = "项目id", maxLength = 32)
@Schema(description = "项目id")
private String settleDomainId;
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
private String settleDomainName;
@Length(max = 32, message = "项目编码不能超过32个字符")
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Schema(description = "项目编码")
private String settleDomainNo;
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人")
private String createName;
@Schema(description = "创建人")
@TableField(fill = FieldFill.INSERT)
@ExcelIgnore
private String createBy;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@NotBlank(message = "被授权人不能为空")
@Length(max = 32, message = "被授权人不能超过32个字符")
@ExcelAttribute(name = "被授权人", isNotEmpty = true, errorInfo = "被授权人不能为空", maxLength = 32)
@Schema(description = "被授权人", name = "bePermissonUser")
private String bePermissonUser;
/**
* 被授权时间
*/
@NotBlank(message = "被授权时间不能为空")
@ExcelAttribute(name = "被授权时间", isNotEmpty = true, errorInfo = "被授权时间不能为空")
@Schema(description = "被授权时间", name = "bePermissionTime")
private LocalDateTime bePermissionTime;
/**
* 备注
*/
@Length(max = 50, message = "备注不能超过50个字符")
@ExcelAttribute(name = "备注", maxLength = 50)
@Schema(description = "备注", name = "remark")
private String remark;
@Schema(description = "被授权人")
private String userId;
@Length(max = 1, message = "是否是客服不能超过1个字符")
@Schema(description = "是否是客服(0是1否)", name = "isCustomerService")
private String isCustomerService;
@ExcelAttribute(name = "登录名", maxLength = 50)
@Schema(description = "登录名")
private String userLoginName;
@Schema(description = "类型0:客户1:合同2:项目", name = "type")
@ExcelAttribute(name = "用户名称", maxLength = 50)
@Schema(description = "用户名称(汉字)")
private String userNickName;
@ExcelAttribute(name = "所在部门", maxLength = 50)
@Schema(description = "所在部门")
private String userDeptName;
@ExcelIgnore
@Schema(description = "授权来源0ekp,1mvp,2mvp复制")
private String type;
/**
* 无参构造方法
* @Author pwang
* @Date 2019-11-15 12:12
* @param
* @return
**/
public TCutsomerDataPermisson(){
}
@TableField(exist = false)
@ExcelIgnore
@Schema(description = "导出选中的行id数组")
private List<String> idList;
}
/*
* 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.yifu.archives.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 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 javax.validation.constraints.NotBlank;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Data
@TableName("t_employee_contract_area_res")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "合同地市权限配置表")
public class TEmployeeContractAreaRes extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 登录人id
*/
@ExcelAttribute(name = "登录人id", isNotEmpty = true, errorInfo = "登录人id不能为空", maxLength = 32)
@NotBlank(message = "登录人id不能为空")
@Length(max = 32, message = "登录人id不能超过32个字符")
@ExcelProperty("登录人id")
@Schema(description = "登录人id")
private String userId;
/**
* 登录人姓名
*/
@ExcelProperty("审核人")
@Schema(description = "审核人")
private String userName;
/**
* 档案-省
*/
@ExcelAttribute(name = "档案-省",isArea = true,isNotEmpty = true, errorInfo = "档案-省不能为空")
@NotBlank(message = "档案-省不能为空")
@ExcelProperty("档案-省")
@Schema(description = "档案-省")
private Integer fileProvince;
/**
* 档案-市
*/
@ExcelAttribute(name = "档案-市",isArea = true,parentField = "fileProvince")
@ExcelProperty("档案-市")
@Schema(description = "档案-市")
private Integer fileCity;
/**
* 档案-县
*/
@ExcelAttribute(name = "档案-县",isArea = true,parentField = "fileCity")
@ExcelProperty("档案-县")
@Schema(description = "档案-县")
private Integer fileTown;
/**
* 申請人所在部门
*/
@ExcelAttribute(name = "审核人所在部门")
@ExcelProperty("办审核人所在部门")
@Schema(description = "审核人所在部门")
private String organName;
/**
* 状态 0 启用 1 禁用
*/
@ExcelAttribute(name = "状态")
@ExcelProperty("状态")
@Schema(description = "状态:0 启用 1 禁用")
private String status;
}
......@@ -405,10 +405,10 @@ public class TEmployeeContractInfo extends BaseEntity {
private String auditRemark;
/**
* 员工类型(字典值,0外包1派遣2代理)
* 员工类型(字典值,0外包1派遣2代理3内部员工
*/
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
@Size(max = 1, message = "员工类型不可超过1位")
private String empNatrue;
......@@ -478,4 +478,30 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "归档列表查询标志,1:是归档,去除作废、终止两种")
private Integer isFilePage;
/**
* @Author fxj
* @Description
* 1、增加“审核类型”,内容为:派增-社保派单、派增-无社保新签、派增-续签、派减-作废、派减-终止
* 2、社保派单过来的合同,审核类型统一为:派增-社保派单;
* 3、合同申请处申请类型为:新签(正常签订)——审核类型为:派增-无社保新签、;续签(合同未到期重新签订、离职再入职、商务合同更改)——审核类型统一为:派增-续签;
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增,1=派减")
@Schema(description = "审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止")
private String type;
/**
* 离职日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@ExcelAttribute(name = "离职日期")
@Schema(description = "离职日期", name = "contractEnd")
private String leaveDate;
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因", maxLength = 32, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因", name = "workingHours")
private String reduceReason;
}
......@@ -59,10 +59,10 @@ public class TEmployeeInfo extends BaseEntity {
private String empCode;
/**
* 员工类型(字典值,0外包1派遣2代理)
* 员工类型(字典值,0外包1派遣2代理3内部员工
*/
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
@NotNull(message = "员工类型不可为空")
@Size(max = 1, message = "员工类型不可超过1位")
private String empNatrue;
......@@ -292,15 +292,42 @@ public class TEmployeeInfo extends BaseEntity {
private Integer insuranceStatus;
/**
* 社保公积金状态:#
* 1.社保状态派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败 10 审核不通过)、派减(6待审核 7待办理 8办理成功 9 办理失败 )
* 2.公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 )
* 社保状态(字典)
*/
@Schema(description = "社保状态(字典)0初始状态")
* 1、派单处社保或公积金状态为待审核、待办理、办理中,项目档案处社保或公积金状态为处理中; 0,1,2 = 1
* 2、派单处社保或公积金状态为审核不通过或办理失败,项目档案处社保状态为无社保,公积金状态为无公积金; 10,5=0
* 3、派单处社保状态为部分办理失败,项目档案处社保状态为部分购买 4=2
* 4、派单处社保或公积金状态为办理成功,项目档案处社保或公积金状态为正常 3=3
* 派减:
* 1、派减状态为待审核、待办理、审核不通过、办理失败,项目档案处社保或公积金状态不变; 6,7,9 = 3
* 2、派减状态为办理成功,项目档案处社保或公积金状态变为已派减 8=4
* 人员档案处社保或公积金状态根据身份证+项目进行整合:
* 社保状态优先级:正常>部分购买>处理中>已派减>无社保
* 公积金状态优先级:正常>处理中>已派减>无公积金
*/
@Schema(description = "社保状态(字典)0初始状态: 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减")
private Integer socialStatus;
/**
* 社保公积金状态:#
* 1.社保状态派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败 10 审核不通过)、派减(6待审核 7待办理 8办理成功 9 办理失败 )
* 2.公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 )
* 社保状态(字典)
* 1、派单处社保或公积金状态为待审核、待办理、办理中,项目档案处社保或公积金状态为处理中; 0,1=1
* 2、派单处社保或公积金状态为审核不通过或办理失败,项目档案处社保状态为无社保,公积金状态为无公积金; 9,4=0
* 3、派单处社保状态为部分办理失败,项目档案处社保状态为部分购买
* 4、派单处社保或公积金状态为办理成功,项目档案处社保或公积金状态为正常 3=2
* 派减:
* 1、派减状态为待审核、待办理、审核不通过、办理失败,项目档案处社保或公积金状态不变; 5,6,8 =2
* 2、派减状态为办理成功,项目档案处社保或公积金状态变为已派减 7=3
* 人员档案处社保或公积金状态根据身份证+项目进行整合:
* 社保状态优先级:正常>部分购买>处理中>已派减>无社保
* 公积金状态优先级:正常>处理中>已派减>无公积金
* 公积金状态(字典)0初始状态
*/
@Schema(description = "公积金状态(字典)0初始状态")
@Schema(description = "公积金状态(字典)0初始状态:0 无公积金 1 处理中 2.正常 3.已派减")
private Integer fundStatus;
/**
......@@ -413,4 +440,8 @@ public class TEmployeeInfo extends BaseEntity {
@TableField(exist = false)
private String[] empNatureArray;
@Schema(description = "姓名或身份证")
@TableField(exist = false)
private String nameOrIdcard;
}
......@@ -66,9 +66,9 @@ public class TEmployeeProject extends BaseEntity {
private String empCode;
/**
* 员工类型(字典值,0外包1派遣2代理)
* 员工类型(字典值,0外包1派遣2代理3内部员工
*/
@Schema(description ="员工类型(字典值,0外包1派遣2代理)")
@Schema(description ="员工类型(字典值,0外包1派遣2代理3内部员工)")
@NotNull(message = "员工类型不能为空")
@Size(max = 1, message = "员工类型不可超过1位")
private String empNatrue;
......@@ -144,9 +144,9 @@ public class TEmployeeProject extends BaseEntity {
private Integer isLeaveEmployee;
/**
* 已产生未结算费用 0:划转 1:不划转
* 已产生未结算费用 0:不划转 1:划转
*/
@Schema(description ="已产生未结算费用(0:划转 1:不划转)")
@Schema(description ="已产生未结算费用(0:不划转 1:划转)")
@TableField(exist = false)
private String unsettleDeal;
......@@ -294,6 +294,17 @@ public class TEmployeeProject extends BaseEntity {
/**
* 社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
* /*派增:
* 1、派单处社保或公积金状态为待审核、待办理、办理中,项目档案处社保或公积金状态为处理中;
* 2、派单处社保或公积金状态为审核不通过或办理失败,项目档案处社保状态为无社保,公积金状态为无公积金;
* 3、派单处社保状态为部分办理失败,项目档案处社保状态为部分购买
* 4、派单处社保或公积金状态为办理成功,项目档案处社保或公积金状态为正常
* 派减:
* 1、派减状态为待审核、待办理、审核不通过、办理失败,项目档案处社保或公积金状态不变;
* 2、派减状态为办理成功,项目档案处社保或公积金状态变为已派减
* 人员档案处社保或公积金状态根据身份证+项目进行整合:
* 社保状态优先级:正常>部分购买>处理中>已派减>无社保
* 公积金状态优先级:正常>处理中>已派减>无公积金
*/
@Schema(description = "社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减")
......
......@@ -22,10 +22,10 @@ public class EmpAddDispatchVo extends TEmployeeInfo {
/**
* 员工类型(字典值,0外包1派遣2代理)
* 员工类型(字典值,0外包1派遣2代理3内部员工
*/
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
private String empNatrue;
/**
......
......@@ -64,9 +64,9 @@ public class EmpContractDispatchVo implements Serializable {
/**
* 员工类型
*/
@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@TableField(exist = false)
private String empType;
private String empNatrue;
/**
* 项目编码
*/
......
......@@ -44,7 +44,7 @@ public class EmpProjectDispatchVo implements Serializable {
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull(message = "员工类型不能为空")
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 2,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
private String empNatrue;
......
/*
* 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.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
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 javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
/**
* 员工合同
*
* @author hgw
* @date 2022-06-29 20:45:22
*/
@Data
@ColumnWidth(10)
public class EmployeeContractExportAuditVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* @Author fxj
* @Description 0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
* 1、增加“审核类型”,内容为:派增-社保派单、派增-无社保新签、派增-续签、派减-作废、派减-终止
* 2、社保派单过来的合同,审核类型统一为:派增-社保派单;
* 3、合同申请处申请类型为:新签(正常签订)——审核类型为:派增-无社保新签、;续签(合同未到期重新签订、离职再入职、商务合同更改)——审核类型统一为:派增-续签;
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止")
@Schema(description = "审核类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核类型")
private String type;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
private String createTime;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@Schema(description = "员工姓名", name = "empName")
private String empName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
@ExcelAttribute(name = "身份证号", maxLength = 32)
@Schema(description = "身份证号", name = "empIdcard")
private String empIdcard;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
@ExcelAttribute(name = "客户名称", maxLength = 128)
@Schema(description = "客户名称", name = "subjectDepart")
private String subjectUnit;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目名称")
@ExcelAttribute(name = "项目名称", maxLength = 128)
@Schema(description = "项目名称", name = "subjectDepart")
private String subjectDepart;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同类型")
@NotBlank(message = "合同类型不能为空")
@ExcelAttribute(name = "合同类型", isNotEmpty = true, errorInfo = "合同类型不能为空", maxLength = 32, needExport = true)
@Schema(description = "合同类型", name = "contractName")
private String contractName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("业务细分")
@ExcelAttribute(name = "业务细分", maxLength = 32, needExport = true)
@Schema(description = "业务细分", name = "contractName")
private String contractSubName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("签订类型")
@ExcelAttribute(name = "签订类型", isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_SITUATION_TYPE)
@Schema(description = "签订类型", name = "situation")
private String situation;
/**
* 原因说明-- 委托备注
*/
@ExcelAttribute(name = "原因说明", maxLength = 200, needExport = true)
@Schema(description = "原因说明", name = "reason")
@ExcelProperty("原因说明")
private String reason;
/**
* 创建者-姓名
*/
@Schema(description = "创建人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人")
private String createName;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同起始日期")
@ExcelAttribute(name = "合同起始日期", isNotEmpty = true, errorInfo = "合同起始日期不能为空")
@Schema(description = "合同起始日期", name = "contractStart")
private String contractStart;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同截止时间")
@ExcelAttribute(name = "合同截止时间", needExport = true)
@Schema(description = "合同截止时间", name = "contractEnd")
private String contractEnd;
/**
* 签订期限employee_contract_type
* 0 已完成一定工作任务为期限
* 1 固定期限
* 2 无固定期限
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("签订期限")
@ExcelAttribute(name = "签订期限", isNotEmpty = true, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE, needExport = true)
@Schema(description = "签订期限", name = "contractType")
private String contractType;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@ExcelAttribute(name = "工时制", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.WORKING_HOURS)
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制")
private String workingHours;
/**
* 离职日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期")
@ExcelAttribute(name = "离职日期")
@Schema(description = "离职日期", name = "contractEnd")
private String leaveDate;
/**
* 减少原因
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "减少原因", maxLength = 32, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因", name = "workingHours")
@ExcelProperty("减少原因")
private String reduceReason;
}
......@@ -44,7 +44,20 @@ import java.util.Set;
public class EmployeeContractExportVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* @Author fxj
* @Description 0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
* 1、增加“审核类型”,内容为:派增-社保派单、派增-无社保新签、派增-续签、派减-作废、派减-终止
* 2、社保派单过来的合同,审核类型统一为:派增-社保派单;
* 3、合同申请处申请类型为:新签(正常签订)——审核类型为:派增-无社保新签、;续签(合同未到期重新签订、离职再入职、商务合同更改)——审核类型统一为:派增-续签;
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止")
@Schema(description = "审核类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核类型")
private String type;
@Schema(description = "申请编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请编号")
......@@ -117,7 +130,7 @@ public class EmployeeContractExportVO implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
private String empNatrue;
@HeadFontStyle(fontHeightInPoints = 11)
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Date 2022/11/2
* @Description
* @Version 1.0
*/
@Data
public class EmployeeInfoSearchVo extends TEmployeeInfo {
/**
* 导出IDS
*/
@Schema(description = "导出IDS")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
private int limitEnd;
}
......@@ -22,7 +22,6 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
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 com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.Data;
import javax.validation.constraints.Past;
......@@ -38,7 +37,7 @@ import java.util.List;
*/
@Data
@ColumnWidth(15)
public class EmployeeProjectExportVO extends BaseEntity {
public class EmployeeProjectExportVO {
private static final long serialVersionUID = 1L;
......
......@@ -47,7 +47,7 @@ public class EmployeeProjectUpdateVO extends RowIndex implements Serializable {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
@ExcelAttribute(name = "员工类型",maxLength = 2,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelAttribute(name = "员工类型",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
private String empNatrue;
/**
......
......@@ -46,7 +46,7 @@ public class EmployeeProjectVO extends RowIndex implements Serializable {
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull(message = "员工类型不能为空")
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 2,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
private String empNatrue;
......
......@@ -71,7 +71,7 @@ public class EmployeeXProjectVO extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="减项原因")
@NotNull(message = "减项原因不能为空")
@ExcelAttribute(name = "减项原因",isNotEmpty = true, errorInfo = "减项原因不能为空",maxLength = 100,isDataId = true,dataType = "reduce_project_reason")
@ExcelAttribute(name = "减项原因",isNotEmpty = true, errorInfo = "减项原因不能为空",maxLength = 100,isDataId = true,dataType = "social_reduce_reason")
private String leaveReason;
/**
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Date 2022-10-21 09:50:08
* @Description 通用Vo
* @Version 1.0
*/
@Data
public class IdNameNoVo implements Serializable {
private String id;
private String name;
private String no;
}
......@@ -78,7 +78,6 @@ public class TEmpChangeInfoVO implements Serializable {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="已产生未结算费用")
@NotNull(message = "已产生未结算费用不能为空")
private String unsettleDeal;
/**
......
/*
* 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.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes;
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 javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Data
public class TEmpContractAreaExportVo implements Serializable {
/**
* 登录人姓名
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
@Schema(description = "审核人")
private String userName;
/**
* 申請人所在部门
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "审核人所在部门")
@ExcelProperty("审核人所在部门")
@Schema(description = "审核人所在部门")
private String organName;
/**
* 档案-省
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-省",isArea = true, isNotEmpty = true, errorInfo = "档案-省不能为空")
@NotBlank(message = "档案-省不能为空")
@ExcelProperty("档案-省")
@Schema(description = "档案-省")
private String fileProvince;
/**
* 档案-市
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-市",isArea = true,parentField = "fileProvince")
@ExcelProperty("档案-市")
@Schema(description = "档案-市")
private String fileCity;
/**
* 档案-县
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "档案-县",isArea = true,parentField = "fileCity")
@ExcelProperty("档案-县")
@Schema(description = "档案-县")
private String fileTown;
/**
* 状态 0 启用 1 禁用
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "授权状态",readConverterExp = "0=启用,1=禁用")
@ExcelProperty("授权状态")
@Schema(description = "授权状态:0 启用 1 禁用")
private 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.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Data
public class TEmployeeContractAreaResSearchVo extends TEmployeeContractAreaRes {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* 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.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Data
public class TEmployeeContractAreaResVo extends RowIndex implements Serializable {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "id 不能为空")
@Length(max = 32, message = "id 不能超过32 个字符")
@ExcelAttribute(name = "id", isNotEmpty = true, errorInfo = "id 不能为空", maxLength = 32)
@Schema(description = "id")
@ExcelProperty("id")
private String id;
/**
* 登录人id
*/
@NotBlank(message = "登录人id 不能为空")
@Length(max = 32, message = "登录人id 不能超过32 个字符")
@ExcelAttribute(name = "登录人id", isNotEmpty = true, errorInfo = "登录人id 不能为空", maxLength = 32)
@Schema(description = "登录人id")
@ExcelProperty("登录人id")
private String userId;
/**
* 档案-省
*/
@NotBlank(message = "档案-省 不能为空")
@ExcelAttribute(name = "档案-省", isNotEmpty = true, errorInfo = "档案-省 不能为空")
@Schema(description = "档案-省")
@ExcelProperty("档案-省")
private String fileProvince;
/**
* 档案-市
*/
@ExcelAttribute(name = "档案-市")
@Schema(description = "档案-市")
@ExcelProperty("档案-市")
private String fileCity;
/**
* 档案-县
*/
@ExcelAttribute(name = "档案-县")
@Schema(description = "档案-县")
@ExcelProperty("档案-县")
private String fileTown;
}
/*
* 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.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 合同查询
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Data
public class TEmployeeContractSearchVo extends TEmployeeContractInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
......@@ -19,6 +19,7 @@ public class EmployeeConstants {
public static final String CONTACT_ADDRESS = "通信地址必填!";
public static final String EMP_NATRUE_ZERO = "派遣";
public static final String EMP_NATRUE_ONE = "外包";
public static final String EMP_NATRUE_THREE = "内部员工";
public static final String HIGN_EDUCATION = "最高学历必填";
public static final String SCHOOL = "学校必填";
public static final String MAJOR = "专业必填";
......
......@@ -9,6 +9,7 @@ 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.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAttaVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
......@@ -18,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -114,4 +116,31 @@ public class FileUploadController {
}
return new R<>(attas);
}
/**
* 获取附件
* @author hgw
* @return R
*/
@Operation(summary = "获取薪资原表附件--EKP调用接口", description = "获取薪资原表附件--EKP调用接口")
@SysLog("获取薪资原表附件--EKP调用接口")
@GetMapping("/getAttaListBySalaryId")
public R<List<SalaryAttaVo>> getAttaListBySalaryId(@RequestParam String salaryId) {
List<SalaryAttaVo> voList = new ArrayList<>();
List<TAttaInfo> attaList = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda()
.eq(TAttaInfo::getRelationType,11)
.eq(TAttaInfo::getDomainId,salaryId));
if (attaList != null && !attaList.isEmpty()) {
SalaryAttaVo vo;
URL url;
for (TAttaInfo a : attaList){
url = ossUtil.getObjectUrl(null, a.getAttaSrc());
vo = new SalaryAttaVo();
vo.setAttaName(a.getAttaName());
vo.setAttaUrl(url.toString().replace("http","https"));
voList.add(vo);
}
}
return R.ok(voList);
}
}
......@@ -3,10 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCutsomerDataPermissonService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo;
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;
......@@ -16,10 +16,10 @@ 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.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
/**
......@@ -45,9 +45,21 @@ public class TCutsomerDataPermissonController {
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TCutsomerDataPermissonVo>> getTCutsomerDataPermissonPage(Page<TCutsomerDataPermissonVo> page, TCutsomerDataPermissonVo tCutsomerDataPermisson) {
public R<IPage<TCutsomerDataPermisson>> getTCutsomerDataPermissonPage(Page<TCutsomerDataPermisson> page, TCutsomerDataPermisson tCutsomerDataPermisson) {
return new R<>(tCutsomerDataPermissonService.getTCutsomerDataPermissonPage(page,tCutsomerDataPermisson));
}
/**
* 导出list
* @param tCutsomerDataPermisson 客户数据权限表
* @return
*/
@Operation(description = "导出的list")
@GetMapping("/getList")
public R<List<TCutsomerDataPermisson>> getTCutsomerDataPermissonList(TCutsomerDataPermisson tCutsomerDataPermisson) {
return new R<>(tCutsomerDataPermissonService.getTCutsomerDataPermissonList(tCutsomerDataPermisson));
}
/**
* @Author fxj
* @Description 获取实体的权限: type-类型0:客户1:合同2:项目(不传默认2项目)
......@@ -55,21 +67,11 @@ public class TCutsomerDataPermissonController {
* @Param
* @return
**/
@Operation(description = "获取实体的权限: type-类型0:客户1:合同2:项目(不传默认2项目)")
@Operation(description = "获取实体的权限:默认项目")
@GetMapping("/getPermissonByTypeAndId")
public R<IPage<TCutsomerDataPermisson>> getTCutsomerDataPermissonByTypeAndId(String id, String type) {
if(Common.isEmpty(id)){
return R.failed("实体id");
}
public R<IPage<TCutsomerDataPermisson>> getTCutsomerDataPermissonByTypeAndId(@RequestParam String settleDomainId) {
TCutsomerDataPermisson tp = new TCutsomerDataPermisson();
if(CommonConstants.dingleDigitStrArray[0].equals(type)){
tp.setCustomerId(id);
}else if(CommonConstants.dingleDigitStrArray[1].equals(type)){
tp.setContractId(id);
}else{
tp.setSettleDomainId(id);
}
tp.setSettleDomainId(settleDomainId);
return new R(tCutsomerDataPermissonService.list(Wrappers.lambdaQuery(tp)));
}
......@@ -82,10 +84,9 @@ public class TCutsomerDataPermissonController {
**/
@Operation(description = "权限复制 权限同项目分配客服(wxhr:tsettledomain_assign_customerservice)")
@GetMapping("/copy")
@PreAuthorize("@pms.hasPermission('wxhr:tsettledomain_assign_customerservice')")
public R insertForCopyCutsomerDataPermisson(String[] srcUser, String[] beUser) {
public R<String> insertForCopyCutsomerDataPermisson(String[] srcUser, String[] beUser) {
YifuUser user = SecurityUtils.getUser();
R result = tCutsomerDataPermissonService.insertForCopyCutsomerDataPermisson(srcUser, beUser, user);
R<String> result = tCutsomerDataPermissonService.insertForCopyCutsomerDataPermisson(srcUser, beUser, user);
if(CommonConstants.SUCCESS.equals(result.getCode())){//权限刷新
settleDomainService.removeSettleCache(user, Arrays.asList(beUser));
}
......@@ -111,9 +112,22 @@ public class TCutsomerDataPermissonController {
@Operation(description = "新增")
@SysLog("新增客户数据权限表")
@PostMapping
@PreAuthorize("@pms.hasPermission('wxhr:tcutsomerdatapermisson_add')")
public R save(@RequestBody TCutsomerDataPermisson tCutsomerDataPermisson){
return new R<>(tCutsomerDataPermissonService.save(tCutsomerDataPermisson));
public R<String> save(@RequestBody TCutsomerDataPermisson tCutsomerDataPermisson){
YifuUser user = SecurityUtils.getUser();
settleDomainService.removeSettleCache(user, Arrays.asList(tCutsomerDataPermisson.getUserId()));
if (Common.isNotNull(tCutsomerDataPermisson.getUserId()) && Common.isNotNull(tCutsomerDataPermisson.getSettleDomainId())) {
List<TCutsomerDataPermisson> list = tCutsomerDataPermissonService.list(Wrappers.<TCutsomerDataPermisson>query().lambda()
.eq(TCutsomerDataPermisson::getUserId, tCutsomerDataPermisson.getUserId())
.eq(TCutsomerDataPermisson::getSettleDomainId, tCutsomerDataPermisson.getSettleDomainId())
);
if (list != null && !list.isEmpty()) {
return R.failed("该用户已存在该项目");
}
tCutsomerDataPermissonService.save(tCutsomerDataPermisson);
return R.ok();
} else {
return R.failed("用户id与项目id必填");
}
}
/**
......@@ -124,8 +138,9 @@ public class TCutsomerDataPermissonController {
@Operation(description = "修改")
@SysLog("修改客户数据权限表")
@PutMapping
@PreAuthorize("@pms.hasPermission('wxhr:tcutsomerdatapermisson_edit')")
public R update(@RequestBody TCutsomerDataPermisson tCutsomerDataPermisson){
public R<Boolean> update(@RequestBody TCutsomerDataPermisson tCutsomerDataPermisson) {
YifuUser user = SecurityUtils.getUser();
settleDomainService.removeSettleCache(user, Arrays.asList(tCutsomerDataPermisson.getUserId()));
return new R<>(tCutsomerDataPermissonService.updateById(tCutsomerDataPermisson));
}
......@@ -134,18 +149,17 @@ public class TCutsomerDataPermissonController {
* @param id
* @return R
*/
@Operation(description = "删除(wxhr:tcutsomerdatapermisson_del)")
@Operation(description = "删除(tcutsomerdatapermisson_del)")
@SysLog("删除客户数据权限表")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('wxhr:tcutsomerdatapermisson_del')")
public R removeById(@PathVariable String id){
public R<Boolean> removeById(@PathVariable String id){
YifuUser user = SecurityUtils.getUser();
TCutsomerDataPermisson tdp = tCutsomerDataPermissonService.getById(id);
if(null == tdp){
return new R<>("权限已删除!");
return new R<>(true);
}
//刷新缓存
settleDomainService.removeSettleCache(user, Arrays.asList(tdp.getBePermissonUser()));
settleDomainService.removeSettleCache(user, Arrays.asList(tdp.getUserId()));
return new R<>(tCutsomerDataPermissonService.removeById(id));
}
......
......@@ -125,8 +125,9 @@ public class TEmpChangeInfoController {
*/
@Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page,String departName) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName));
public R<IPage<TSettleDomain>> getItemNamePage(Page page,@RequestParam(required = false) String departName
, @RequestParam(required = false) String customerId) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, customerId));
}
/**
......@@ -138,8 +139,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有项目名称", description = "获取所有项目名称")
@SysLog("获取所有项目名称" )
@GetMapping("/getAllDept" )
public R<List<TSettleDomain>> getAllDept() {
return tEmpChangeInfoService.getAllDept();
public R<List<TSettleDomain>> getAllDept(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllDept(customerName);
}
/**
......@@ -151,8 +152,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有单位名称", description = "获取所有单位名称")
@SysLog("获取所有单位名称" )
@GetMapping("/getAllUint" )
public R<List<TCustomerInfo>> getAllUint() {
return tEmpChangeInfoService.getAllUint();
public R<List<TCustomerInfo>> getAllUint(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllUint(customerName);
}
/**
......
/*
* 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.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractAreaResService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResVo;
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.ErrorMessage;
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.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/temployeecontractareares")
@Tag(name = "合同地市权限配置表管理")
public class TEmployeeContractAreaResController {
private final TEmployeeContractAreaResService tEmployeeContractAreaResService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tEmployeeContractAreaRes 合同地市权限配置表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TEmployeeContractAreaRes>> getTEmployeeContractAreaResPage(Page<TEmployeeContractAreaRes> page, TEmployeeContractAreaResSearchVo tEmployeeContractAreaRes) {
return new R<>(tEmployeeContractAreaResService.getTEmployeeContractAreaResPage(page, tEmployeeContractAreaRes));
}
/**
* 不分页查询
*
* @param searchVo 合同地市权限配置表
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage")
//@PreAuthorize("@pms.hasPermission('temployeecontractareares_get')" )
public R<List<TEmpContractAreaExportVo>> getTEmployeeContractAreaResNoPage(@RequestBody TEmployeeContractAreaResSearchVo searchVo) {
return R.ok(tEmployeeContractAreaResService.noPageDiy(searchVo,null, Common.getList(searchVo.getIds()),null));
}
/**
* 通过id查询合同地市权限配置表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('temployeecontractareares_get')")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('temployeecontractareares_get')")
public R<TEmployeeContractAreaRes> getById(@PathVariable("id") String id) {
return R.ok(tEmployeeContractAreaResService.getById(id));
}
/**
* 新增合同地市权限配置表
*
* @param areaRes 合同地市权限配置表
* @return R
*/
@Operation(summary = "新增合同地市权限配置表", description = "新增合同地市权限配置表:hasPermission('temployeecontractareares_add')")
@SysLog("新增合同地市权限配置表")
@PostMapping
@PreAuthorize("@pms.hasPermission('temployeecontractareares_add')")
public R<Boolean> save(@RequestBody TEmployeeContractAreaRes areaRes) {
TEmployeeContractAreaRes res = null;
if (Common.isEmpty(areaRes.getFileTown())){
res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda()
.eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince())
.eq(TEmployeeContractAreaRes::getFileCity,areaRes.getFileCity())
.isNull(TEmployeeContractAreaRes::getFileTown)
.eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isEmpty(areaRes.getFileCity())){
res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda()
.eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince())
.isNull(TEmployeeContractAreaRes::getFileCity)
.eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(res)){
return R.failed("已存在对应审核人及地市配置!");
}
// 清理缓存
tEmployeeContractAreaResService.removeAuthCache();
return R.ok(tEmployeeContractAreaResService.save(areaRes));
}
/**
* 修改合同地市权限配置表
*
* @param tEmployeeContractAreaRes 合同地市权限配置表
* @return R
*/
@Operation(summary = "修改合同地市权限配置表", description = "修改合同地市权限配置表:hasPermission('temployeecontractareares_edit')")
@SysLog("修改合同地市权限配置表")
@PutMapping
@PreAuthorize("@pms.hasPermission('temployeecontractareares_edit')")
public R<Boolean> updateById(@RequestBody TEmployeeContractAreaRes tEmployeeContractAreaRes) {
return R.ok(tEmployeeContractAreaResService.updateById(tEmployeeContractAreaRes));
}
/**
* 通过id启用或禁用合同地市权限配置表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id启用或禁用合同地市权限配置表", description = "通过id启用或禁用(0 启用,1禁用)合同地市权限配置表:hasPermission('temployeecontractareares_edit')")
@SysLog("通过id启用或禁用合同地市权限配置表")
@PutMapping("/updateStatus")
@PreAuthorize("@pms.hasPermission('temployeecontractareares_edit')")
public R<Boolean> removeById(@RequestParam(name = "id",required = true) String id,
@RequestParam(name = "status",required = true) String status) {
TEmployeeContractAreaRes areaRes = tEmployeeContractAreaResService.getById(id);
if (Common.isEmpty(areaRes)
|| !(CommonConstants.ONE_STRING).equals(status)
&& !CommonConstants.ZERO_STRING.equals(status)){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
areaRes.setStatus(status);
// 清理缓存
tEmployeeContractAreaResService.removeAuthCache();
return R.ok(tEmployeeContractAreaResService.updateById(areaRes));
}
/**
* 通过id删除合同地市权限配置表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除合同地市权限配置表", description = "通过id删除合同地市权限配置表:hasPermission('temployeecontractareares_del')")
@SysLog("通过id删除合同地市权限配置表")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('temployeecontractareares_del')")
public R<Boolean> removeById(@PathVariable String id) {
// 清理缓存
tEmployeeContractAreaResService.removeAuthCache();
return R.ok(tEmployeeContractAreaResService.removeById(id));
}
/**
* 合同地市权限配置表 批量导入
*
* @author fxj
* @date 2022-11-01 10:30:12
**/
@SneakyThrows
@Operation(description = "批量新增合同地市权限配置表 hasPermission('temployeecontractareares-batch-import')")
@SysLog("批量新增合同地市权限配置表")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('temployeecontractareares-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tEmployeeContractAreaResService.importDiy(file.getInputStream());
}
/**
* 合同地市权限配置表 批量导出
*
* @author fxj
* @date 2022-11-01 10:30:12
**/
@Operation(description = "导出合同地市权限配置表 hasPermission('temployeecontractareares-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('temployeecontractareares-export')")
public void export(HttpServletResponse response, @RequestBody TEmployeeContractAreaResSearchVo searchVo) {
tEmployeeContractAreaResService.listExport(response, searchVo);
}
}
......@@ -22,6 +22,7 @@ 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.service.TEmployeeContractInfoService;
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.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
......@@ -276,7 +277,7 @@ public class TEmployeeContractInfoController {
}
/**
* 批量导出人员档案信息
* 批量导出合同
*
* @Author hgw
* @Date 2022-6-24 09:36:06
......@@ -329,4 +330,25 @@ public class TEmployeeContractInfoController {
public TEmployeeContractInfo getContractById(@RequestBody String id) {
return tEmployeeContractInfoService.getById(id);
}
/**
* @Author fxj
* @Description 批量导出合同审核
* @Date 15:22 2022/11/4
* @Param
* @return
**/
@Operation(summary = "批量导出合同审核(记得传参mId)employee_export_contract", description = "批量导出合同审核 hasPermission('employee_export_contract_audit')")
@SysLog("批量导出合同审核")
@PostMapping("/exportAuditContractInfo")
@PreAuthorize("@pms.hasPermission('employee_export_contract_audit')")
public void exportAuditContractInfo(@RequestBody(required = false) TEmployeeContractSearchVo contractInfo, HttpServletResponse response) {
if (Common.isEmpty(contractInfo)){
contractInfo = new TEmployeeContractSearchVo();
}
contractInfo.setAuditStatus(CommonConstants.ONE_INT);
this.setAuth(contractInfo);
tEmployeeContractInfoService.exportAuditContractInfo(contractInfo, response);
}
}
......@@ -305,15 +305,15 @@ public class TEmployeeInfoController {
@SysLog("批量导出人员档案信息")
// @ResponseExcel
@PostMapping("/exportEmployee")
public void exportEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
public void exportEmployee(@RequestBody(required = false) EmployeeInfoSearchVo searchVo, HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, employeeInfo);
if (Common.isNotNull(employeeInfo.getAuthSql()) && employeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
}
}
tEmployeeInfoService.exportEmployee(employeeInfo, response);
tEmployeeInfoService.exportEmployee(searchVo, response);
}
/**
......
......@@ -22,7 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -262,7 +262,7 @@ public class TEmployeeProjectController {
**/
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestParam(name = "idstr", required = false)String idstr,
@RequestBody List<String> exportFields, EmployeeProjectExportVO projectDTO) {
@RequestBody List<String> exportFields, EmployeeProjectExportParamVO projectDTO) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, projectDTO);
......
......@@ -21,10 +21,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
......@@ -272,4 +274,15 @@ public class TSettleDomainController {
return tSettleDomainService.updateProjectInfo(list);
}
/**
* 分页查询 客户信息
* @return
*/
@Operation(summary = "分页查询客户信息", description = "分页查询客户信息")
@GetMapping("/getUnitPage")
public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) {
return R.ok(tSettleDomainService.getUnitPage(page, idNameNo));
}
}
......@@ -20,6 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 客户信息
......@@ -30,4 +33,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TCustomerInfoMapper extends BaseMapper<TCustomerInfo> {
List<TCustomerInfo> getAllUnit(@Param("customerName") String customerName);
}
package com.yifu.cloud.plus.v1.yifu.archives.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.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -16,24 +17,16 @@ import java.util.List;
*/
@Mapper
public interface TCutsomerDataPermissonMapper extends BaseMapper<TCutsomerDataPermisson> {
/**
* 分页count
* @Author pwang
* @Date 2020-06-28 15:25
* @param tCutsomerDataPermisson
* @return
**/
long getTCutsomerDataPermissonPageCount( @Param("tCutsomerDataPermisson")TCutsomerDataPermisson tCutsomerDataPermisson);
/**
* 客户数据权限表简单分页查询
* @param tCutsomerDataPermisson 客户数据权限表
* @return
*/
List<TCutsomerDataPermissonVo> getTCutsomerDataPermissonPage(@Param("tCutsomerDataPermisson") TCutsomerDataPermissonVo tCutsomerDataPermisson, @Param("page")Long page, @Param("size")Long size);
IPage<TCutsomerDataPermisson> getTCutsomerDataPermissonPage(
Page<TCutsomerDataPermisson> page, @Param("tCutsomerDataPermisson") TCutsomerDataPermisson tCutsomerDataPermisson);
String getOwnerIdByIdAndType(@Param("domainId")String domainId, @Param("type")int type);
List<TCutsomerDataPermisson> getTCutsomerDataPermissonPage(@Param("tCutsomerDataPermisson") TCutsomerDataPermisson tCutsomerDataPermisson);
/**
* 获取当前登录人拥有的所有项目权限
......@@ -43,8 +36,4 @@ public interface TCutsomerDataPermissonMapper extends BaseMapper<TCutsomerDataPe
* @return
**/
List<TCutsomerDataPermisson> selectAllSettleDomainPermissionByUserId(@Param("userId")String userId);
String getCustomerServiceByid(@Param("id")String id);
String getUserByid(@Param("settleId")String settleId);
}
/*
* 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.yifu.archives.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.yifu.archives.entity.TEmployeeContractAreaRes;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Mapper
public interface TEmployeeContractAreaResMapper extends BaseMapper<TEmployeeContractAreaRes> {
/**
* 合同地市权限配置表简单分页查询
* @param tEmployeeContractAreaRes 合同地市权限配置表
* @return
*/
IPage<TEmployeeContractAreaRes> getTEmployeeContractAreaResPage(Page<TEmployeeContractAreaRes> page, @Param("tEmployeeContractAreaRes") TEmployeeContractAreaRes tEmployeeContractAreaRes);
List<TEmpContractAreaExportVo> noPageDiy(@Param("tEmployeeContractAreaRes") TEmployeeContractAreaResSearchVo searchVo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql);
int noPageCountDiy(@Param("tEmployeeContractAreaRes") TEmployeeContractAreaResSearchVo searchVo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql);
}
......@@ -21,7 +21,10 @@ 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.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO;
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.Param;
......@@ -81,4 +84,7 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
**/
String getContractByApplyNo(@Param("applyNo") String applyNo);
List<EmployeeContractExportAuditVO> noPageDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo);
int noPageCountDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo);
}
......@@ -21,10 +21,7 @@ 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.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DispatchCheckVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DispatchEmpVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -80,4 +77,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
String getMaxEmpCode();
List<DispatchEmpVo> getDispatchEmpVo(@Param("checkVo")DispatchCheckVo checkVo);
// 同 getTEmployeeExportList 方法
int noPageCountDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchVo);
// 同 getTEmployeeExportList 方法
List<EmployeeExportVO> noPageDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchVo);
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
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.TEmployeeProject;
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.Param;
......@@ -57,5 +58,9 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
* @param tEmployeeProject
* @return
*/
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject")EmployeeProjectExportVO tEmployeeProject);
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject);
// getTEmployeeProjectExportPage 改造
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
}
......@@ -21,6 +21,7 @@ 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.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import org.apache.ibatis.annotations.Mapper;
......@@ -38,6 +39,8 @@ import java.util.List;
public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, @Param("tSettleDomain") TSettleDomain tSettleDomain);
IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, @Param("idNameNoVo") IdNameNoVo idNameNoVo);
/**
* @param departNo
* @Author: wangan
......
......@@ -20,6 +20,8 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import java.util.List;
/**
* 客户信息
*
......@@ -28,4 +30,5 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
*/
public interface TCustomerInfoService extends IService<TCustomerInfo> {
List<TCustomerInfo> getAllUnit(String customerName);
}
......@@ -4,10 +4,11 @@ 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.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import java.util.List;
/**
* 客户数据权限表
*
......@@ -21,44 +22,17 @@ public interface TCutsomerDataPermissonService extends IService<TCutsomerDataPer
* @param tCutsomerDataPermisson 客户数据权限表
* @return
*/
IPage<TCutsomerDataPermissonVo> getTCutsomerDataPermissonPage(Page<TCutsomerDataPermissonVo> page, TCutsomerDataPermissonVo tCutsomerDataPermisson);
/**
* 查询数据所有者id
* @Author pwang
* @Date 2019-07-24 15:31
* @param domainId 实体id
* @param type 实体类型0:单位1:部门2:项目
* @return 返回数据所有者的id串
**/
String findOwnerIdByIdAndType(String domainId,int type);
/**
* 查询数据所有者
* @Author pwang
* @Date 2019-07-24 15:31
* @param domainId 实体id
* @param type 实体类型0:单位1:部门2:项目
* @return 返回数据所有者
**/
YifuUser findOwnerByIdAndType(String domainId, int type);
// /**
// * 获取当前登录人拥有的所有项目权限
// * @Author fxj
// * @Date 2019-08-26
// * @param userId
// * @return
// **/
// List<TCutsomerDataPermisson> selectAllSettleDomainPermissionByUserId(int userId);
IPage<TCutsomerDataPermisson> getTCutsomerDataPermissonPage(Page<TCutsomerDataPermisson> page, TCutsomerDataPermisson tCutsomerDataPermisson);
String getCustomerServiceByid(String id);
/**
* 获取所有有权限的用户
* @Author pwang
* @Date 2019-11-28 14:54
* @param settleId
* @return
* @param tCutsomerDataPermisson
* @Description: 导出获取list
* @Author: hgw
* @Date: 2022/10/26 17:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson>
**/
String getUserByid(String settleId);
List<TCutsomerDataPermisson> getTCutsomerDataPermissonList(TCutsomerDataPermisson tCutsomerDataPermisson);
/**
* 权限复制 将srcUserList里面的所有用户权限(表)赋给 beUser 所有人
* @Author pwang
......@@ -68,15 +42,5 @@ public interface TCutsomerDataPermissonService extends IService<TCutsomerDataPer
* @param user user授权人
* @return
**/
R insertForCopyCutsomerDataPermisson(String[] srcUserList, String[] beUser, YifuUser user);
/**
* 专用方法 不建议调用 存在sql注入风险
* @Author pwang
* @Date 2020-07-02 19:00
* @param sql
* @param beUser
* @param user
* @return
**/
R insertCutsomerDataPermissonBySql(String sql, String beUser, YifuUser user);
R<String> insertForCopyCutsomerDataPermisson(String[] srcUserList, String[] beUser, YifuUser user);
}
......@@ -57,16 +57,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
R<List<TSettleDomain>> getAllDept();
R<List<TSettleDomain>> getAllDept(String customerName);
/**
* 获取所有单位名称
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
R<List<TCustomerInfo>> getAllUint();
R<List<TCustomerInfo>> getAllUint(String customerName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId);
}
/*
* 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.yifu.archives.service;
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.yifu.archives.entity.TEmployeeContractAreaRes;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo;
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 javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
public interface TEmployeeContractAreaResService extends IService<TEmployeeContractAreaRes> {
/**
* 合同地市权限配置表简单分页查询
*
* @param tEmployeeContractAreaRes 合同地市权限配置表
* @return
*/
IPage<TEmployeeContractAreaRes> getTEmployeeContractAreaResPage(Page<TEmployeeContractAreaRes> page, TEmployeeContractAreaResSearchVo tEmployeeContractAreaRes);
List<TEmpContractAreaExportVo> noPageDiy(TEmployeeContractAreaResSearchVo searchVo,
List<String> settleDomainIds,
List<String> ids,
String sql);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TEmployeeContractAreaResSearchVo searchVo);
void removeAuthCache();
}
......@@ -23,6 +23,7 @@ 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.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.R;
......@@ -166,5 +167,12 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
* @return: void
**/
void exportContractInfoHistory(TEmployeeContractInfo contractInfo, HttpServletResponse response);
/**
* @Author fxj
* @Description 批量合同审核导出
* @Date 15:38 2022/11/2
* @Param
* @return
**/
void exportAuditContractInfo(TEmployeeContractSearchVo contractInfo, HttpServletResponse response);
}
......@@ -169,7 +169,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
* @Author: hgw
* @Date: 2022/6/23 10:30
**/
void exportEmployee(TEmployeeInfo employeeVo, HttpServletResponse response);
void exportEmployee(EmployeeInfoSearchVo employeeVo, HttpServletResponse response);
/**
* @param employeeVo
......
......@@ -23,7 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
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.R;
......@@ -96,7 +96,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R deleteEmpPro(TEmployeeProject tEmployeeProject);
/**
* @param list
* @param inputStream
* @Description: 批量减项
* @Author: huyc
* @Date: 2022/6/21 10:30
......@@ -163,7 +163,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
* @Date: 2022/6/23 10:30
* @return: R
**/
void listExportProject(HttpServletResponse response, EmployeeProjectExportVO projectDTO,
void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO projectDTO,
String idstr, List<String> exportFields);
/**
* @param employeeInfo
......
......@@ -21,6 +21,7 @@ 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.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -38,6 +39,16 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain);
/**
* @param page
* @param idNameNoVo
* @Description: 获取客户单位单位
* @Author: hgw
* @Date: 2022/10/21 10:01
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo>
**/
IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNoVo);
/**
* 清除userId的项目权限缓存
*
......
......@@ -69,22 +69,25 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
if (!Common.isNotNull(employeeInfo)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
// 取值最早的合同
TEmployeeContractInfo last = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
// 取值最新审核的合同 2022-10-13 倩倩确认 最早取值审核通过的 最早合同开始时间
TEmployeeContractInfo first = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING)
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.ne(TEmployeeContractInfo::getSituation,"终止")
.ne(TEmployeeContractInfo::getSituation,"作废")
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.orderByDesc(TEmployeeContractInfo::getAuditTimeLast)
.orderByAsc(TEmployeeContractInfo::getContractStart)
.last(CommonConstants.LAST_ONE_SQL));
// 取值最早的合同
TEmployeeContractInfo first = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
// 取值最早审核的合同
TEmployeeContractInfo last = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING)
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.ne(TEmployeeContractInfo::getSituation,"终止")
.ne(TEmployeeContractInfo::getSituation,"作废")
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.orderByAsc(TEmployeeContractInfo::getAuditTimeLast)
.isNotNull(TEmployeeContractInfo::getContractEnd)
.orderByDesc(TEmployeeContractInfo::getContractEnd)
.last(CommonConstants.LAST_ONE_SQL));
TCertRecordVo vo = new TCertRecordVo();
vo.setEmpIdcard(project.getEmpIdcard());
......@@ -139,6 +142,9 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
wrapper.in(TCertRecord::getId,idList);
}
if (Common.isNotNull(searchVo.getAuthSql())) {
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains("a.")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("a.", " "));
}
wrapper.last(searchVo.getAuthSql());
}
return baseMapper.selectList(wrapper);
......
......@@ -22,6 +22,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCustomerInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 客户信息
*
......@@ -31,4 +33,8 @@ import org.springframework.stereotype.Service;
@Service
public class TCustomerInfoServiceImpl extends ServiceImpl<TCustomerInfoMapper, TCustomerInfo> implements TCustomerInfoService {
@Override
public List<TCustomerInfo> getAllUnit(String customerName) {
return baseMapper.getAllUnit(customerName);
}
}
......@@ -219,19 +219,21 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
ExcelWriter excelWriter = EasyExcel.write(out, TEmpBadRecord.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TEmpBadRecord> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TEmpBadRecord> util = new ExcelUtil<>(TEmpBadRecord.class);
util = new ExcelUtil<>(TEmpBadRecord.class);
for (TEmpBadRecord vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("不良记录"+index).build();
writeSheet = EasyExcel.writerSheet("不良记录"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -165,7 +165,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
errorMsg = new HashSet<>();
TEmpChangeInfoVO excel = excelVOList.get(i);
excel.setUnsettleDeal(CommonConstants.IS_NO_CHANGE);
if (Common.isNotNull(excel.getChangeStartMonth()) && excel.getChangeStartMonth().length() > CommonConstants.dingleDigitIntArray[6]) {
errorMsg.add("划转起始月长度不能超过6位");
}
......@@ -220,14 +220,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeePro.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
updateTEmployeePro.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
updateTEmployeePro.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
TCustomerInfo tCustomerInfo = tCustomerInfoService.getById(tSettleDomain.getCustomerId());
if (Common.isNotNull(tCustomerInfo)) {
updateTEmployeePro.setUnitId(tCustomerInfo.getId());
updateTEmployeePro.setUnitNo(tCustomerInfo.getCustomerCode());
updateTEmployeePro.setUnitName(tCustomerInfo.getCustomerName());
}
updateTEmployeePro.setUnitId(tSettleDomain.getCustomerId());
updateTEmployeePro.setUnitNo(tSettleDomain.getCustomerNo());
updateTEmployeePro.setUnitName(tSettleDomain.getCustomerName());
updateTEmployeePro.setChangeStartMonth(excel.getChangeStartMonth());
updateTEmployeePro.setUnsettleDeal(excel.getUnsettleDeal());
updateTEmployeePro.setUnsettleDeal(CommonConstants.IS_NO_CHANGE);
updateList.add(updateTEmployeePro);
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro);
......@@ -276,11 +273,18 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
@Override
public R<List<TSettleDomain>> getAllDept() {
List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
public R<List<TSettleDomain>> getAllDept(String customerName) {
List<TSettleDomain> list = null;
if (Common.isNotNull(customerName)){
list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL).eq(TSettleDomain::getCustomerName,customerName));
}else {
list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
}
return R.ok(list);
}
......@@ -289,10 +293,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
@Override
public R<List<TCustomerInfo>> getAllUint() {
List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
public R<List<TCustomerInfo>> getAllUint(String customerName) {
//List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
List<TCustomerInfo> list = tCustomerInfoService.getAllUnit(customerName);
return R.ok(list);
}
......@@ -303,16 +309,19 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @Date 2022-07-26
*/
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName);
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, customerId);
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(String deptName) {
private LambdaQueryWrapper buildQueryWrapper(String deptName, String customerId) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(deptName)) {
wrapper.like(TSettleDomain::getDepartName, deptName);
}
if (Common.isNotNull(customerId)) {
wrapper.eq(TSettleDomain::getCustomerId, customerId);
}
wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING);
wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING);
return wrapper;
......
......@@ -82,6 +82,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}
wrapper.ne(TEmpContractAlert::getId,CommonConstants.ZERO_STRING);
if (Common.isNotNull(searchVo.getAuthSql())) {
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains("a.")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("a.", " "));
}
wrapper.last(searchVo.getAuthSql());
}
return baseMapper.selectList(wrapper);
......@@ -94,6 +97,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
wrapper.in(TEmpContractAlert::getId,idList);
}
if (Common.isNotNull(searchVo.getAuthSql())) {
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains("a.")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("a.", " "));
}
wrapper.last(searchVo.getAuthSql());
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() >= 0){
......@@ -117,19 +123,21 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
ExcelWriter excelWriter = EasyExcel.write(out, TEmpBadRecord.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TEmpContractAlert> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = listDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TEmpContractAlert> util = new ExcelUtil<>(TEmpContractAlert.class);
util = new ExcelUtil<>(TEmpContractAlert.class);
for (TEmpContractAlert vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet(ArchivesConstants.EMP_BAD_RECORD+index).build();
writeSheet = EasyExcel.writerSheet(ArchivesConstants.EMP_BAD_RECORD+index).build();
excelWriter.write(list,writeSheet);
index++;
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
......@@ -293,7 +301,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
&& project.getProjectStatus().intValue()== CommonConstants.ONE_INT)
|| (
!CommonConstants.ZERO_STRING.equals(project.getEmpNatrue())
&& !CommonConstants.ONE_STRING.equals(project.getEmpNatrue()))
&& !CommonConstants.ONE_STRING.equals(project.getEmpNatrue())
&& !CommonConstants.THREE_STRING.equals(project.getEmpNatrue()))
)){
return;
}
......
/*
* 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.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractAreaResMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractAreaResService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResVo;
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.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* 合同地市权限配置表
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Log4j2
@Service
public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeContractAreaResMapper, TEmployeeContractAreaRes> implements TEmployeeContractAreaResService {
@Autowired
private RedisUtil redisUtil;
/**
* 合同地市权限配置表简单分页查询
*
* @param tEmployeeContractAreaRes 合同地市权限配置表
* @return
*/
@Override
public IPage<TEmployeeContractAreaRes> getTEmployeeContractAreaResPage(Page<TEmployeeContractAreaRes> page, TEmployeeContractAreaResSearchVo tEmployeeContractAreaRes) {
return baseMapper.getTEmployeeContractAreaResPage(page, tEmployeeContractAreaRes);
}
/**
* 合同地市权限配置表批量导出
*
* @param searchVo 合同地市权限配置表
* @return
*/
@Override
public void listExport(HttpServletResponse response, TEmployeeContractAreaResSearchVo searchVo) {
String fileName = "合同审核权限批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TEmpContractAreaExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo,null, Common.getList(searchVo.getIds()),null);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TEmpContractAreaExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TEmpContractAreaExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo,null, Common.getList(searchVo.getIds()),null);
if (Common.isNotNull(list)) {
util = new ExcelUtil<>(TEmpContractAreaExportVo.class);
for (TEmpContractAreaExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("合同审核权限配置表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("合同审核权限配置表" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public List<TEmpContractAreaExportVo> noPageDiy(TEmployeeContractAreaResSearchVo searchVo,
List<String> settleDomainIds,
List<String> ids,
String sql) {
return baseMapper.noPageDiy(searchVo,settleDomainIds,ids,sql);
}
private int noPageCountDiy(TEmployeeContractAreaResSearchVo searchVo,
List<String> settleDomainIds,
List<String> ids,
String sql) {
return baseMapper.noPageCountDiy(searchVo,settleDomainIds,ids,sql);
}
@Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TEmployeeContractAreaResVo> util1 = new ExcelUtil<>(TEmployeeContractAreaResVo.class);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, TEmployeeContractAreaResVo.class, new ReadListener<TEmployeeContractAreaResVo>() {
/**
* 单次缓存的数据量
*/
public static final int BATCH_COUNT = CommonConstants.BATCH_COUNT;
/**
*临时存储
*/
private List<TEmployeeContractAreaResVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(TEmployeeContractAreaResVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage);
} else {
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
saveData();
// 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
/**
* 加上存储数据库
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTEmployeeContractAreaRes(cachedDataList, errorMessageList);
log.info("存储数据库成功!");
}
}).sheet().doRead();
} catch (Exception e) {
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
}
private void importTEmployeeContractAreaRes(List<TEmployeeContractAreaResVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
ErrorMessage errorMsg;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
TEmployeeContractAreaResVo excel = excelVOList.get(i);
// 数据合法情况 TODO
// 插入
insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
}
}
/**
* 插入excel bad record
*/
private void insertExcel(TEmployeeContractAreaResVo excel) {
TEmployeeContractAreaRes insert = new TEmployeeContractAreaRes();
BeanUtil.copyProperties(excel, insert);
this.save(insert);
}
/**
* @Author fxj
* @Description 清除项目缓存
* @Date 17:08 2022/7/11
* @Param
* @return
**/
@Override
public void removeAuthCache() {
try{
redisUtil.remove(CacheConstants.DATA_AUTH_DETAILS + CommonConstants.ONE_STRING);
redisUtil.remove(CacheConstants.DATA_AUTH_DETAILS + CommonConstants.ZERO_STRING);
} catch (Exception e) {
log.error("清除权限配置缓存错误:",e);
}
}
}
......@@ -17,25 +17,26 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
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.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
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.ResultConstants;
......@@ -55,6 +56,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.time.LocalDateTime;
......@@ -310,6 +312,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
//初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
initType(tEmployeeContractInfo);
if (Common.isEmpty(tEmployeeContractInfo.getId())) {
// 针对编码再做一次重复性校验
String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
......@@ -332,6 +337,34 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return R.ok(null, CommonConstants.SAVE_SUCCESS);
}
/**
* @Author fxj
* @Description 初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
* @Date 15:28 2022/11/7
**/
private void initType(TEmployeeContractInfo tEmployeeContractInfo) {
// 初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
if (ArchivesConstants.contractSituation[0].equals(tEmployeeContractInfo.getSituation())){
// 作废
tEmployeeContractInfo.setType(CommonConstants.THREE_STRING);
}
if (ArchivesConstants.contractSituation[6].equals(tEmployeeContractInfo.getSituation())){
// 终止
tEmployeeContractInfo.setType(CommonConstants.FOUR_STRING);
}
if (ArchivesConstants.contractSituation[1].equals(tEmployeeContractInfo.getSituation())
|| ArchivesConstants.contractSituation[2].equals(tEmployeeContractInfo.getSituation())
|| ArchivesConstants.contractSituation[4].equals(tEmployeeContractInfo.getSituation())
|| ArchivesConstants.contractSituation[5].equals(tEmployeeContractInfo.getSituation())){
// 离职再入职 合同未到期重新签订 商务合同更改 正常续签
tEmployeeContractInfo.setType(CommonConstants.TWO_STRING);
}
if (ArchivesConstants.contractSituation[3].equals(tEmployeeContractInfo.getSituation())){
//正常签订
tEmployeeContractInfo.setType(CommonConstants.ONE_STRING);
}
}
/**
* @param tEmployeeContractInfo
* @Description: 更新附件的合同id
......@@ -426,7 +459,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
|| (!EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation())
&& !EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation()))) {
// 其他变为不在用
baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain(), contractInfo.getId(), CommonConstants.ONE_STRING);
baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getDeptNo(), contractInfo.getId(), CommonConstants.ONE_STRING);
tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now());
tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING);
// 更新档案、项目合同状态为(1可用)
......@@ -983,4 +1016,78 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
@Override
public void exportAuditContractInfo(TEmployeeContractSearchVo searchVo, HttpServletResponse response) {
String fileName = "合同审核批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<EmployeeContractExportAuditVO> list = new ArrayList<>();
//获取要导出的列表
searchVo.setAuditStatus(CommonConstants.ONE_INT);
searchVo.setIdList(Common.getList(searchVo.getIds()));
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeContractExportAuditVO.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeContractExportAuditVO.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<EmployeeContractExportAuditVO> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeContractExportAuditVO.class);
for (EmployeeContractExportAuditVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("合同审核批量导出"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("合同审核批量导出"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
private List<EmployeeContractExportAuditVO> noPageDiy(TEmployeeContractSearchVo searchVo) {
return baseMapper.noPageDiy(searchVo);
}
private int noPageCountDiy(TEmployeeContractSearchVo searchVo) {
return baseMapper.noPageCountDiy(searchVo);
}
}
......@@ -21,13 +21,16 @@ 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.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
......@@ -38,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -70,6 +74,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return baseMapper.getPage(page, tSettleDomain);
}
@Override
public IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNoVo) {
return baseMapper.getUnitPage(page, idNameNoVo);
}
/**
* @Author fxj
* @Description 清除项目缓存
......@@ -154,21 +163,22 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
}
tSettleDomainInfo = baseMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDepartNo,tSettleDomain.getDepartNo())
.orderByDesc(BaseEntity::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tSettleDomainInfo)) {
tSettleDomain.setId(tSettleDomainInfo.getId());
}
// 处理服务团队数据权限 2022-09-19 fxj
if (Common.isNotNull(tSettleDomain.getServiceTeam())){
R<AllUserNaVo> res = upmsDaprUtils.getUserIdsByUserNames(tSettleDomain.getServiceTeam());
if (Common.isNotNull(res) && Common.isNotNull(res.getData()) && Common.isNotNull(res.getData().getUserIds())){
R<SysUserListVo> res = upmsDaprUtils.getUserIdsByUserNames(tSettleDomain.getServiceTeam());
if (Common.isNotNull(res) && Common.isNotNull(res.getData()) && Common.isNotNull(res.getData().getUserList())){
// 先清理缓存
this.removeSettleCache(null,res.getData().getUserIds());
saveForEkp(res.getData().getUserIds(),tSettleDomain.getId());
saveForEkp(res.getData().getUserList(), tSettleDomain);
}
}
tSettleDomain.setDeleteFlag(CommonConstants.ZERO_STRING);
if (Common.isNotNull(tSettleDomainInfo)) {
baseMapper.updateById(tSettleDomain);
} else {
......@@ -198,25 +208,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
* @Param
* @return
**/
public boolean saveForEkp(List<String> userIds, String domainId){
// 1. 先清除现有的这些的项目权限
public boolean saveForEkp(List<SysUser> userIds, TSettleDomain domain){
// 1. 先清除现有的这些的项目权限
permissonMapper.delete(Wrappers.<TCutsomerDataPermisson>query().lambda()
.in(TCutsomerDataPermisson::getBePermissonUser,userIds)
.eq(TCutsomerDataPermisson::getSettleDomainId,domainId));
.in(TCutsomerDataPermisson::getUserId,userIds)
.eq(TCutsomerDataPermisson::getSettleDomainId,domain.getId()));
// 2.新增新的项目人员权限
TCutsomerDataPermisson pm;
if (Common.isNotNull(userIds)){
for (String uId:userIds){
if (Common.isNotNull(userIds)) {
for (SysUser user : userIds){
pm = new TCutsomerDataPermisson();
pm.setIsCustomerService(CommonConstants.ZERO_STRING);
pm.setIsOwner(CommonConstants.ONE_STRING);
pm.setPermissonSrc("EKP服务团队");
pm.setPermissonLevel(CommonConstants.ONE_INT);
pm.setBePermissonUser(uId);
pm.setBePermissionTime(LocalDateTime.now());
pm.setSettleDomainId(domainId);
pm.setPermissionUser(CommonConstants.ONE_STRING);
pm.setType(CommonConstants.TWO_STRING);
pm.setStatus(CommonConstants.ZERO_STRING);
pm.setUserId(user.getUserId());
pm.setUserLoginName(user.getUsername());
pm.setUserNickName(user.getNickname());
pm.setUserDeptName(user.getDeptName());
pm.setCreateTime(LocalDateTime.now());
pm.setSettleDomainId(domain.getId());
pm.setSettleDomainName(domain.getDepartName());
pm.setSettleDomainNo(domain.getDepartNo());
pm.setCreateBy(CommonConstants.ONE_STRING);
pm.setCreateName("EKP同步");
pm.setType(CommonConstants.ZERO_STRING);
permissonMapper.insert(pm);
}
}
......
......@@ -57,7 +57,9 @@ public class DoJointTask {
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.THREE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.THREE_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
......
......@@ -14,8 +14,8 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
#url: jdbc:mysql://119.96.147.6:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
#url: jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://119.96.147.6:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
......
......@@ -60,4 +60,15 @@
<result property="dataSource" column="data_source"/>
<result property="balance" column="BALANCE"/>
</resultMap>
<select id="getAllUnit" resultMap="tCustomerInfoMap">
select a.CUSTOMER_ID AS "ID",a.CUSTOMER_NAME AS "CUSTOMER_NAME",a.CUSTOMER_NO AS "CUSTOMER_CODE" from t_settle_domain a
<where>
1=1
<if test="customerName != null and customerName != null">
and a.CUSTOMER_NAME like concat(#{customerName},'%')
</if>
</where>
GROUP BY A.CUSTOMER_NO
</select>
</mapper>
......@@ -6,145 +6,78 @@
<resultMap id="tCutsomerDataPermissonMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson">
<id property="id" column="ID"/>
<result property="isOwner" column="IS_OWNER"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="permissonSrc" column="PERMISSON_SRC"/>
<result property="permissonLevel" column="PERMISSON_LEVEL"/>
<result property="permissionUser" column="PERMISSION_USER"/>
<result property="bePermissonUser" column="BE_PERMISSON_USER"/>
<result property="bePermissionTime" column="BE_PERMISSION_TIME"/>
<result property="status" column="STATUS"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="userId" column="USER_ID"/>
<result property="userLoginName" column="USER_LOGIN_NAME"/>
<result property="userNickName" column="USER_NICK_NAME"/>
<result property="userDeptName" column="USER_DEPT_NAME"/>
<result property="remark" column="REMARK"/>
<result property="type" column="type"/>
<result property="settleDomainId" column="SETTLE_DOMAIN_ID"/>
</resultMap>
<resultMap id="tCutsomerDataPermissonMapVo" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo">
<id property="id" column="ID"/>
<result property="isOwner" column="IS_OWNER"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="permissonSrc" column="PERMISSON_SRC"/>
<result property="permissonLevel" column="PERMISSON_LEVEL"/>
<result property="permissionUser" column="PERMISSION_USER"/>
<result property="bePermissonUser" column="BE_PERMISSON_USER"/>
<result property="bePermissionTime" column="BE_PERMISSION_TIME"/>
<result property="remark" column="REMARK"/>
<result property="settleDomainId" column="SETTLE_DOMAIN_ID"/>
<result property="type" column="type"/>
<result property="name" column="name"/>
<result property="permissionUserName" column="nickname"/>
<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
<result property="settleDomainNo" column="SETTLE_DOMAIN_NO"/>
</resultMap>
<sql id="base_column_list">
a.ID,
a.IS_OWNER,
a.CONTRACT_ID,
a.CUSTOMER_ID,
a.PERMISSON_SRC,
a.PERMISSON_LEVEL,
a.PERMISSION_USER,
a.BE_PERMISSON_USER,
a.BE_PERMISSION_TIME,
a.REMARK,
a.SETTLE_DOMAIN_ID,
a.type
</sql>
a.ID
,a.STATUS
,a.REMARK
,a.SETTLE_DOMAIN_ID
,a.CREATE_BY
,a.CREATE_NAME
,a.CREATE_TIME
,a.USER_ID
,a.USER_LOGIN_NAME
,a.USER_NICK_NAME
,a.USER_DEPT_NAME
,a.TYPE
,a.SETTLE_DOMAIN_NAME
,a.SETTLE_DOMAIN_NO
</sql>
<sql id="where_getTCutsomerDataPermissonPage">
<if test="tCutsomerDataPermisson.bePermissonUser != null and tCutsomerDataPermisson.bePermissonUser.trim() != ''">
AND a.BE_PERMISSON_USER = #{tCutsomerDataPermisson.bePermissonUser}
</if>
<if test="tCutsomerDataPermisson.type != null and tCutsomerDataPermisson.type.trim() != ''">
AND a.type = #{tCutsomerDataPermisson.type}
</if>
<if test="tCutsomerDataPermisson.name != null and tCutsomerDataPermisson.name.trim() != ''">
AND a.name like '%${tCutsomerDataPermisson.name}%'
</if>
<if test="tCutsomerDataPermisson.id != null and tCutsomerDataPermisson.id.trim() != ''">
AND a.ID = #{tCutsomerDataPermisson.id}
</if>
<if test="tCutsomerDataPermisson.isOwner != null and tCutsomerDataPermisson.isOwner.trim() != ''">
AND a.IS_OWNER = #{tCutsomerDataPermisson.isOwner}
</if>
<if test="tCutsomerDataPermisson.permissonSrc != null and tCutsomerDataPermisson.permissonSrc.trim() != ''">
AND a.PERMISSON_SRC = #{tCutsomerDataPermisson.permissonSrc}
</if>
<if test="tCutsomerDataPermisson.permissonLevel != null and tCutsomerDataPermisson.permissonLevel.trim() != ''">
AND a.PERMISSON_LEVEL = #{tCutsomerDataPermisson.permissonLevel}
</if>
<if test="tCutsomerDataPermisson.permissionUser != null and tCutsomerDataPermisson.permissionUser.trim() != ''">
AND a.PERMISSION_USER = #{tCutsomerDataPermisson.permissionUser}
</if>
<if test="tCutsomerDataPermisson.bePermissionTime != null and tCutsomerDataPermisson.bePermissionTime.trim() != ''">
AND a.BE_PERMISSION_TIME = #{tCutsomerDataPermisson.bePermissionTime}
</if>
<if test="tCutsomerDataPermisson.remark != null and tCutsomerDataPermisson.remark.trim() != ''">
AND a.REMARK = #{tCutsomerDataPermisson.remark}
</if>
<if test="tCutsomerDataPermisson != null">
<if test="tCutsomerDataPermisson.idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="tCutsomerDataPermisson.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tCutsomerDataPermisson.userNickName != null and tCutsomerDataPermisson.userNickName.trim() != ''">
AND a.USER_NICK_NAME like concat('%',#{tCutsomerDataPermisson.userNickName},'%')
</if>
<if test="tCutsomerDataPermisson.userLoginName != null and tCutsomerDataPermisson.userLoginName.trim() != ''">
AND a.USER_LOGIN_NAME like concat('%',#{tCutsomerDataPermisson.userLoginName},'%')
</if>
<if test="tCutsomerDataPermisson.userDeptName != null and tCutsomerDataPermisson.userDeptName.trim() != ''">
AND a.USER_DEPT_NAME like concat('%',#{tCutsomerDataPermisson.userDeptName},'%')
</if>
<if test="tCutsomerDataPermisson.status != null and tCutsomerDataPermisson.status.trim() != ''">
AND a.STATUS = #{tCutsomerDataPermisson.status}
</if>
<if test="tCutsomerDataPermisson.settleDomainName != null and tCutsomerDataPermisson.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME like '%${tCutsomerDataPermisson.settleDomainName}%'
</if>
<if test="tCutsomerDataPermisson.settleDomainNo != null and tCutsomerDataPermisson.settleDomainNo.trim() != ''">
AND a.SETTLE_DOMAIN_NO like '%${tCutsomerDataPermisson.settleDomainNo}%'
</if>
</if>
</sql>
<select id="getTCutsomerDataPermissonPageCount" resultType="java.lang.Long">
SELECT
count(1)
FROM view_cutsomer_permisson a
where 1=1
<include refid="where_getTCutsomerDataPermissonPage"/>
</select>
<!--查询-->
<select id="getTCutsomerDataPermissonPage" resultMap="tCutsomerDataPermissonMapVo">
<!--分页查询-->
<select id="getTCutsomerDataPermissonPage" resultMap="tCutsomerDataPermissonMap">
SELECT
<include refid="base_column_list"/>
,a.name
,u.nickname
from view_cutsomer_permisson a
left join yifu_cloud.sys_user u on a.PERMISSION_USER = u.user_id
<include refid="base_column_list"/>
from t_cutsomer_data_permisson a
where 1=1
<include refid="where_getTCutsomerDataPermissonPage"/>
ORDER BY a.BE_PERMISSION_TIME DESC
<if test="null != page and null != size">
limit #{page},#{size}
</if>
</select>
<select id="getOwnerIdByIdAndType" resultType="java.lang.String">
SELECT BE_PERMISSON_USER FROM t_cutsomer_data_permisson
WHERE IS_OWNER = '0'
<if test="0==type">
AND CUSTOMER_ID = '${domainId}'
</if>
<if test="1==type">
AND CONTRACT_ID = '${domainId}'
</if>
<if test="2==type">
AND SETTLE_DOMAIN_ID = '${domainId}'
</if>
ORDER BY BE_PERMISSION_TIME ASC
limit 1
<include refid="where_getTCutsomerDataPermissonPage"/>
ORDER BY a.CREATE_TIME DESC
</select>
<!-- 获取当前登录人拥有的所有项目权限 -->
<select id="selectAllSettleDomainPermissionByUserId" resultMap="tCutsomerDataPermissonMap">
SELECT
<include refid="base_column_list"/>
FROM t_cutsomer_data_permisson a
WHERE 1=1
AND SETTLE_DOMAIN_ID IS NOT NULL
AND BE_PERMISSON_USER = '${userId}'
</select>
<select id="getCustomerServiceByid" resultType="java.lang.String">
SELECT
GROUP_CONCAT(distinct BE_PERMISSON_USER )
FROM
t_cutsomer_data_permisson
WHERE
IS_CUSTOMER_SERVICE = '0'
AND SETTLE_DOMAIN_ID = '${id}'
WHERE a.STATUS = '0' and a.USER_ID = #{userId}
</select>
<select id="getUserByid" resultType="java.lang.String">
SELECT
GROUP_CONCAT(distinct BE_PERMISSON_USER )
FROM
t_cutsomer_data_permisson
WHERE
SETTLE_DOMAIN_ID = '${settleId}'
</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.yifu.archives.mapper.TEmployeeContractAreaResMapper">
<resultMap id="tEmployeeContractAreaResMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes">
<id property="id" column="ID"/>
<result property="userId" column="USER_ID"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="userName" column="USER_NAME"/>
<result property="status" column="STATUS"/>
<result property="organName" column="ORGAN_NAME"/>
</resultMap>
<resultMap id="empContractAreaResExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo">
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="userName" column="USER_NAME"/>
<result property="status" column="STATUS"/>
<result property="organName" column="ORGAN_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.USER_ID,
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_TOWN,a.USER_NAME,a.STATUS,a.ORGAN_NAME
</sql>
<sql id="tEmployeeContractAreaRes_where">
<if test="tEmployeeContractAreaRes != null">
<if test="tEmployeeContractAreaRes.id != null and tEmployeeContractAreaRes.id.trim() != ''">
AND a.ID = #{tEmployeeContractAreaRes.id}
</if>
<if test="tEmployeeContractAreaRes.userId != null and tEmployeeContractAreaRes.userId.trim() != ''">
AND a.USER_ID = #{tEmployeeContractAreaRes.userId}
</if>
<if test="tEmployeeContractAreaRes.fileProvince != null">
AND a.FILE_PROVINCE = #{tEmployeeContractAreaRes.fileProvince}
</if>
<if test="tEmployeeContractAreaRes.fileCity != null">
AND a.FILE_CITY = #{tEmployeeContractAreaRes.fileCity}
</if>
<if test="tEmployeeContractAreaRes.fileTown != null">
AND a.FILE_TOWN = #{tEmployeeContractAreaRes.fileTown}
</if>
<if test="tEmployeeContractAreaRes.status!= null">
AND a.status like CONCAT(#{tEmployeeContractAreaRes.status},'%')
</if>
<if test="tEmployeeContractAreaRes.userName != null">
AND a.USER_NAME like CONCAT('%',#{tEmployeeContractAreaRes.userName},'%')
</if>
<if test="tEmployeeContractAreaRes.organName != null">
AND a.ORGAN_NAME like CONCAT('%',#{tEmployeeContractAreaRes.organName},'%')
</if>
</if>
</sql>
<!--tEmployeeContractAreaRes简单分页查询-->
<select id="getTEmployeeContractAreaResPage" resultMap="tEmployeeContractAreaResMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_contract_area_res a
<where>
1=1
<include refid="tEmployeeContractAreaRes_where"/>
order by a.CREATE_TIME desc
</where>
</select>
<select id="noPageDiy" resultMap="empContractAreaResExportMap">
SELECT
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_TOWN,a.USER_NAME,a.STATUS,a.ORGAN_NAME
FROM t_employee_contract_area_res a
<where>
1=1
<include refid="export_where"/>
<if test="tEmployeeContractAreaRes != null">
<if test="tEmployeeContractAreaRes.authSql != null and tEmployeeContractAreaRes.authSql.trim() != ''">
${tEmployeeContractAreaRes.authSql}
</if>
<if test="tEmployeeContractAreaRes.limitStart != null">
limit #{tEmployeeContractAreaRes.limitStart},#{tEmployeeContractAreaRes.limitEnd}
</if>
</if>
</where>
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_contract_area_res a
<where>
1=1
<include refid="export_where"/>
<if test="tEmployeeContractAreaRes.authSql != null and tEmployeeContractAreaRes.authSql.trim() != ''">
${tEmployeeContractAreaRes.authSql}
</if>
</where>
</select>
<sql id="export_where">
<include refid="tEmployeeContractAreaRes_where"/>
<if test="idsStr != null and idsStr.size > 0">
AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
#{items}
</foreach>
</if>
<!--数据权限判断-->
<if test="settleDomainIds != null">
<if test="settleDomainIds.size() > 0">
and a.SETTLE_DOMAIN_ID in
<foreach collection="settleDomainIds" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
<if test="settleDomainIds.size() == 0">
and 1=2
</if>
</if>
<if test="settleDomainIds == null">
and 1=1
</if>
<if test='sql != null and sql != ""'>
and <![CDATA[sql]]>
</if>
</sql>
</mapper>
......@@ -80,8 +80,31 @@
<result property="reason" column="REASON"/>
<result property="auditTimeLast" column="AUDIT_TIME_LAST"/>
<result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
</resultMap>
<!-- 合同审核导出 -->
<resultMap id="empContractExportAuditMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO">
<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="contractEnd" column="CONTRACT_END"/>
<result property="subjectDepart" column="SUBJECT_DEPART"/>
<result property="subjectUnit" column="SUBJECT_UNIT"/>
<result property="situation" column="SITUATION"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="reason" column="REASON"/>
<result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
</resultMap>
<!-- 合同导出 -->
<resultMap id="tEmployeeContrctInfoExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO">
<result property="applyNo" column="APPLY_NO"/>
......@@ -112,6 +135,7 @@
<result property="startDate" column="START_DATE"/>
<result property="endDate" column="END_DATE"/>
<result property="history" column="HISTORY"/>
<result property="type" column="TYPE"/>
</resultMap>
......@@ -171,7 +195,10 @@
a.CONTRACT_PARTY,
a.CONTRACT_SUB_NAME,
a.REASON,
a.AUDIT_TIME_LAST
a.AUDIT_TIME_LAST,
a.TYPE,
a.LEAVE_DATE,
a.REDUCE_REASON,a.type
</sql>
......@@ -214,6 +241,9 @@
<if test="tEmployeeContractInfo.id != null and tEmployeeContractInfo.id.trim() != ''">
AND a.ID = #{tEmployeeContractInfo.id}
</if>
<if test="tEmployeeContractInfo.type != null and tEmployeeContractInfo.type.trim() != ''">
AND a.type = #{tEmployeeContractInfo.type}
</if>
<if test="tEmployeeContractInfo.empNo != null and tEmployeeContractInfo.empNo.trim() != ''">
AND a.EMP_NO = #{tEmployeeContractInfo.empNo}
</if>
......@@ -221,10 +251,10 @@
AND a.EMP_ID = #{tEmployeeContractInfo.empId}
</if>
<if test="tEmployeeContractInfo.empName != null and tEmployeeContractInfo.empName.trim() != ''">
AND a.EMP_NAME = #{tEmployeeContractInfo.empName}
AND a.EMP_NAME like concat('%',#{tEmployeeContractInfo.empName},'%')
</if>
<if test="tEmployeeContractInfo.empIdcard != null and tEmployeeContractInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmployeeContractInfo.empIdcard}
AND a.EMP_IDCARD like concat('%',#{tEmployeeContractInfo.empIdcard},'%')
</if>
<if test="tEmployeeContractInfo.contractName != null and tEmployeeContractInfo.contractName.trim() != ''">
AND a.CONTRACT_NAME = #{tEmployeeContractInfo.contractName}
......@@ -239,10 +269,10 @@
AND a.CONTRACT_END = #{tEmployeeContractInfo.contractEnd}
</if>
<if test="tEmployeeContractInfo.subjectDepart != null and tEmployeeContractInfo.subjectDepart.trim() != ''">
AND a.SUBJECT_DEPART = #{tEmployeeContractInfo.subjectDepart}
AND a.SUBJECT_DEPART like concat('%',#{tEmployeeContractInfo.subjectDepart},'%')
</if>
<if test="tEmployeeContractInfo.subjectUnit != null and tEmployeeContractInfo.subjectUnit.trim() != ''">
AND a.SUBJECT_UNIT = #{tEmployeeContractInfo.subjectUnit}
AND a.SUBJECT_UNIT like concat('%',#{tEmployeeContractInfo.subjectUnit},'%')
</if>
<if test="tEmployeeContractInfo.situation != null and tEmployeeContractInfo.situation.trim() != ''">
AND a.SITUATION = #{tEmployeeContractInfo.situation}
......@@ -374,7 +404,7 @@
AND a.EMP_NATRUE = #{tEmployeeContractInfo.empNatrue}
</if>
<if test="tEmployeeContractInfo.contractParty != null and tEmployeeContractInfo.contractParty.trim() != ''">
AND a.CONTRACT_PARTY = #{tEmployeeContractInfo.contractParty}
AND a.CONTRACT_PARTY like concat('%',#{tEmployeeContractInfo.contractParty},'%')
</if>
<if test="tEmployeeContractInfo.contractSubName != null and tEmployeeContractInfo.contractSubName.trim() != ''">
AND a.CONTRACT_SUB_NAME = #{tEmployeeContractInfo.contractSubName}
......@@ -419,7 +449,7 @@
<!--导出-->
<select id="getTEmployeeContractExport" resultMap="tEmployeeContrctInfoExportMap">
SELECT
<include refid="Base_Export_Column_List"/>
<include refid="Base_Export_Column_List"/>,a.type
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
......@@ -478,4 +508,53 @@
SELECT e.id FROM t_employee_contract_info e where e.APPLY_NO = #{applyNo}
</select>
<!--tEmployeeContractInfo简单分页查询审核导出fxj-2022-11-04-->
<select id="noPageDiy" resultMap="empContractExportAuditMap">
SELECT
a.EMP_NAME,
a.EMP_IDCARD,
a.CONTRACT_NAME,
a.CONTRACT_TYPE,
a.CONTRACT_START,
a.CONTRACT_END,
a.SUBJECT_DEPART,
a.SUBJECT_UNIT,
a.SITUATION,
a.WORKING_HOURS,
a.CREATE_NAME,
a.CREATE_TIME,
a.CONTRACT_SUB_NAME,
a.REASON,
a.TYPE,
a.LEAVE_DATE,
a.REDUCE_REASON
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
</if>
</where>
order by a.CREATE_TIME desc
<if test="tEmployeeContractInfo != null">
<if test="tEmployeeContractInfo.limitStart != null">
limit #{tEmployeeContractInfo.limitStart},#{tEmployeeContractInfo.limitEnd}
</if>
</if>
</select>
<!--tEmployeeContractInfo简单分页查询审核导出fxj-2022-11-04-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
</if>
</where>
</select>
</mapper>
......@@ -295,7 +295,14 @@
AND a.EMP_NAME like concat('%',#{tEmployeeInfo.empName},'%')
</if>
<if test="tEmployeeInfo.empIdcard != null and tEmployeeInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmployeeInfo.empIdcard}
AND a.EMP_IDCARD like concat('%',#{tEmployeeInfo.empIdcard},'%')
</if>
<if test="tEmployeeInfo.nameOrIdcard != null and tEmployeeInfo.nameOrIdcard.trim() != ''">
AND (
a.EMP_NAME like concat(#{tEmployeeInfo.nameOrIdcard},'%')
or
a.EMP_IDCARD like concat(#{tEmployeeInfo.nameOrIdcard},'%')
)
</if>
<if test="tEmployeeInfo.validityStart != null">
AND a.VALIDITY_START = #{tEmployeeInfo.validityStart}
......@@ -496,7 +503,7 @@
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.emp_id in (
a.id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
......@@ -748,8 +755,13 @@
<!--tEmployeeInfo人员档案导出查询-->
<select id="getTEmployeeExportList" resultMap="tEmployeeExportMap">
select
<include refid="Base_Export_List"/>
<include refid="Base_Export_List"/>,
p.IS_PROJECTS ,
p.DEPT_NAME,
p.DEPT_NO,
P.PROJECT_NUM
from t_employee_info a
LEFT JOIN view_project p on a.EMP_IDCARD=p.EMP_IDCARD
<!--left join (
select
b.EMP_ID,
......@@ -759,15 +771,15 @@
1=1 and b.DELETE_FLAG = '0'
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
${tEmployeeInfo.authSql}
</if>-->
) b on a.id = b.EMP_ID
</if>
) b on a.id = b.EMP_ID-->
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.emp_id in (
a.id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
......@@ -806,7 +818,7 @@
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.emp_id in (
a.id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
......@@ -864,7 +876,7 @@
left join (
select p.UNIT_NAME,p.UNIT_NO,p.DEPT_ID,p.DEPT_NAME,p.DEPT_NO,p.POST,p.EMP_ID,p.EMP_NO,P.PROJECT_STATUS,p.EMP_NATRUE
from t_employee_project p
where 1=1
where 1=1 and p.DELETE_FLAG = '0'
<if test="checkVo != null">
<if test="checkVo.codes != null">
AND p.DEPT_NO in
......@@ -915,4 +927,51 @@
</select>
<!--tEmployeeInfo人员档案导出查询改造 fxj 2022-11-02-->
<select id="noPageDiy" resultMap="tEmployeeExportMap">
select
<include refid="Base_Export_List"/>,
p.IS_PROJECTS ,
p.DEPT_NAME,
p.DEPT_NO,
P.PROJECT_NUM
from t_employee_info a
LEFT JOIN view_project p on a.EMP_IDCARD=p.EMP_IDCARD
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where_export"/>
</where>
order by a.CREATE_TIME desc
<if test="tEmployeeInfo != null">
<if test="tEmployeeInfo.limitStart != null">
limit #{tEmployeeInfo.limitStart},#{tEmployeeInfo.limitEnd}
</if>
</if>
</select>
<!--tEmployeeInfo人员档案导出查询count fxj 2022-11-02-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
select
count(1)
from t_employee_info a
LEFT JOIN view_project p on a.EMP_IDCARD=p.EMP_IDCARD
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where_export"/>
</where>
</select>
<sql id="employeeInfo_where_export">
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
</sql>
</mapper>
......@@ -246,10 +246,10 @@
AND a.EMP_NATRUE in (${tEmployeeProject.empNatrue})
</if>
<if test="tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''">
AND a.EMP_NAME = #{tEmployeeProject.empName}
AND a.EMP_NAME like concat('%',#{tEmployeeProject.empName},'%')
</if>
<if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmployeeProject.empIdcard}
AND a.EMP_IDCARD like concat('%',#{tEmployeeProject.empIdcard},'%')
</if>
<if test="tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''">
AND a.BANK_NAME = #{tEmployeeProject.bankName}
......@@ -430,10 +430,10 @@
AND a.EMP_NATRUE in (${tEmployeeProject.empNatrue})
</if>
<if test="tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''">
AND a.EMP_NAME = #{tEmployeeProject.empName}
AND a.EMP_NAME like concat('%',#{tEmployeeProject.empName},'%')
</if>
<if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmployeeProject.empIdcard}
AND a.EMP_IDCARD like concat('%',#{tEmployeeProject.empIdcard},'%')
</if>
<if test="tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''">
AND a.BANK_NAME = #{tEmployeeProject.bankName}
......@@ -802,4 +802,39 @@
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
SELECT
<include refid="Base_Export_List"/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
<if test="tEmployeeProject != null">
<if test="tEmployeeProject.limitStart != null">
limit #{tEmployeeProject.limitStart},#{tEmployeeProject.limitEnd}
</if>
</if>
</select>
<!--tEmployeeInfo导出查询count改造 fxj 2022-11-03-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql}
</if>
</where>
</select>
</mapper>
......@@ -217,6 +217,24 @@
</if>
</select>
<select id="getUnitPage" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo">
SELECT
a.CUSTOMER_ID as id,
a.CUSTOMER_NAME as name,
a.CUSTOMER_NO as no
FROM t_settle_domain a
WHERE 1=1
<if test="idNameNoVo != null">
<if test="idNameNoVo.name != null and idNameNoVo.name.trim() != ''">
and a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%')
</if>
<if test="idNameNoVo.no != null and idNameNoVo.no.trim() != ''">
and a.CUSTOMER_NO = #{idNameNoVo.no}
</if>
</if>
group by a.CUSTOMER_ID
</select>
<select id="selectSettleDomainSelectVosById"
resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
SELECT
......@@ -270,6 +288,7 @@
a.BPO_FLAG
FROM t_settle_domain a
where 1=1
and a.DELETE_FLAG = '0'
<if test="codes != null and codes.size() > 0">
and a.DEPART_NO in
<foreach collection="codes" item="param" index="index" open="(" close=")" separator=",">
......
......@@ -91,6 +91,13 @@ public interface CacheConstants {
**/
String EVERYDAY_EMP_CONTRACT_CODE = "everyday_emp_contract_code";
/**
* @Description: 每日薪资表的 申请编码 缓存
* @Author: hgw
* @Date: 2022-11-2 09:56:32
**/
String EVERYDAY_SALARY_FORM_CODE = "everyday_salary_form_code";
/**
* @Description: 派单申请编码
* @Author: fxj
......
......@@ -392,6 +392,8 @@ public interface CommonConstants {
// 是否
String IS_CHANGE = "划转";
String IS_NO_CHANGE = "不划转";
// 年
String YEAR = "年";
// 月
......@@ -447,6 +449,8 @@ public interface CommonConstants {
public static final String PAYMENT_SOCIAL_WAIT_EXPORT = "payment_social_wait_export";
public static final String PAYMENT_SOCIAL_PUSH = "payment_social_push";
//百分之一 1/100
public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01");
......
......@@ -361,6 +361,10 @@ public interface ErrorCodes {
* 新增异常:未找到对应社保户名称的可用基数配置信息
*/
String EMP_DISPATCH_SOCIAL_HOLD_NOT_EXIST = "emp.dispatch.social.hold.not.exist";
/**
* 新增异常:备案基数不可为空
*/
String EMP_DISPATCH_SOCIAL_RECORD_BASE_NOT_EXIST = "emp.dispatch.social.record.base.not.exist";
/**
* 新增异常:未找到对应公积金户名称的可用基数配置信息
......@@ -424,6 +428,11 @@ public interface ErrorCodes {
* 派增异常: 自定义缴纳养老基数不可为空
*/
String EMP_DISPATCH_SOCIAL_DIY_NOT_EMPTY = "emp.dispatch.social.diy.not.empty";
/**
* 派增异常: 自定义缴纳养老基数或养老起缴日期不可为空
*/
String EMP_DISPATCH_SOCIAL_DIY_MEDICAL_NOT_EMPTY = "emp.dispatch.social.diy.medical_not.empty";
/**
* 派增异常: 对应项目编码的项目档案已减项,请去项目档案处复项
*/
......
This diff is collapsed.
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