feat: 薪资发放范围
This commit is contained in:
parent
15749ecc10
commit
daa3d4ca9f
|
|
@ -0,0 +1,68 @@
|
|||
package com.engine.salary.entity.salaryBill.po;
|
||||
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 工资单发放范围项目表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class SalarySendRangeObj {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 发放id
|
||||
*/
|
||||
private Long salarySendId;
|
||||
|
||||
private Long salarySendRangeId;
|
||||
|
||||
/**
|
||||
* 范围类型;对象=1;对象中排除=2
|
||||
*/
|
||||
private Integer rangeType;
|
||||
|
||||
/**
|
||||
* 目标类型,人员=1,部门=2,分部=3,岗位=4,个税扣缴义务人=5,所有人=0
|
||||
*/
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 目标id
|
||||
*/
|
||||
private Long targetId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.engine.salary.entity.salaryBill.po;
|
||||
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 工资单发放范围表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class SalarySendRangePO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 发放id
|
||||
*/
|
||||
private Long salarySendId;
|
||||
|
||||
/**
|
||||
* 发放=grant;撤回=withdraw
|
||||
*/
|
||||
private String grantType;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.enums.salarysend;
|
||||
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @Description: 范围类型
|
||||
* @Author: lfc
|
||||
* @Date: 2022/11/14 09:33
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum SalarySendOperateTypeEnum implements BaseEnum<String> {
|
||||
GRANT("grant", "发放", 98590),
|
||||
WITHDRAW("withdraw", "撤回", 93351);
|
||||
|
||||
private final String value;
|
||||
|
||||
private final String defaultLabel;
|
||||
|
||||
private final int labelId;
|
||||
|
||||
public static String getDefaultLabelByValue(String value, Long employeeId, String tenantKey) {
|
||||
Optional<SalarySendOperateTypeEnum> optional = Arrays.stream(SalarySendOperateTypeEnum.values()).filter(r->r.getValue().equals(value)).findFirst();
|
||||
return optional.isPresent()? SalaryI18nUtil.getI18nLabel(optional.get().getLabelId(), optional.get().getDefaultLabel()):"";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.engine.salary.enums.salarysend;
|
||||
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum SalarySendRangeTargetTypeEnum implements BaseEnum<Integer> {
|
||||
USER(1, "人员", 100133),
|
||||
DEPT(2, "部门", 86185),
|
||||
SUB_COMPANY(3, "分部", 107369),
|
||||
POSITION(4, "岗位", 90633),
|
||||
TAX_AGENT(5, "个税扣缴义务人", 86184),
|
||||
ALL(0, "所有人", 107729);
|
||||
|
||||
private final int value;
|
||||
|
||||
private final String defaultLabel;
|
||||
|
||||
private final int labelId;
|
||||
|
||||
public static SalarySendRangeTargetTypeEnum parseByValue(Integer value) {
|
||||
for (SalarySendRangeTargetTypeEnum targetTypeEnum : SalarySendRangeTargetTypeEnum.values()) {
|
||||
if (Objects.equals(targetTypeEnum.getValue(), value)) {
|
||||
return targetTypeEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.engine.salary.enums.salarysend;
|
||||
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum SalarySendRangeTypeEnum implements BaseEnum<Integer> {
|
||||
|
||||
INCLUDE_OBJ(1, "对象", 90396),
|
||||
EXCLUDE_OBJ(2, "对象中排除", 142728);
|
||||
|
||||
private final int value;
|
||||
|
||||
private final String defaultLabel;
|
||||
|
||||
private final int labelId;
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value, Long employeeId, String tenantKey) {
|
||||
Optional<SalarySendRangeTypeEnum> optional = Arrays.stream(SalarySendRangeTypeEnum.values()).filter(r->Integer.valueOf(r.getValue()).equals(value)).findFirst();
|
||||
return optional.isPresent()? SalaryI18nUtil.getI18nLabel(optional.get().getLabelId(), optional.get().getDefaultLabel()):"";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.salary.mapper.salarybill;
|
||||
|
||||
import com.engine.salary.entity.salaryBill.po.SalarySendRangePO;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface SalarySendRangeMapper {
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insertSelective(SalarySendRangePO record);
|
||||
|
||||
SalarySendRangePO selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(SalarySendRangePO record);
|
||||
|
||||
List<SalarySendRangePO> selectByAll(SalarySendRangePO salarySendRangePO);
|
||||
|
||||
List<SalarySendRangePO> selectAllBySalarySendIdAndGrantType(@Param("salarySendId") Long salarySendId, @Param("grantType") String grantType);
|
||||
|
||||
int updateBatchSelective(List<SalarySendRangePO> list);
|
||||
|
||||
int batchInsert(@Param("list") List<SalarySendRangePO> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,220 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.engine.salary.mapper.salarybill.SalarySendRangeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryBill.po.SalarySendRangePO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table hrsa_salary_send_range-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="salary_send_id" jdbcType="BIGINT" property="salarySendId" />
|
||||
<result column="grant_type" jdbcType="VARCHAR" property="grantType" />
|
||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="delete_type" jdbcType="INTEGER" property="deleteType" />
|
||||
<result column="tenant_key" jdbcType="VARCHAR" property="tenantKey" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, salary_send_id, grant_type, creator, create_time, update_time, delete_type, tenant_key
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hrsa_salary_send_range
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
<!--@mbg.generated-->
|
||||
delete from hrsa_salary_send_range
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.engine.salary.entity.salaryBill.po.SalarySendRangePO" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into hrsa_salary_send_range
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="salarySendId != null">
|
||||
salary_send_id,
|
||||
</if>
|
||||
<if test="grantType != null">
|
||||
grant_type,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="salarySendId != null">
|
||||
#{salarySendId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="grantType != null">
|
||||
#{grantType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.engine.salary.entity.salaryBill.po.SalarySendRangePO">
|
||||
<!--@mbg.generated-->
|
||||
update hrsa_salary_send_range
|
||||
<set>
|
||||
<if test="salarySendId != null">
|
||||
salary_send_id = #{salarySendId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="grantType != null">
|
||||
grant_type = #{grantType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator = #{creator,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type = #{deleteType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key = #{tenantKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="selectByAll" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from hrsa_salary_send_range
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id=#{id,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="salarySendId != null">
|
||||
and salary_send_id=#{salarySendId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="grantType != null">
|
||||
and grant_type=#{grantType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
and creator=#{creator,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time=#{updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
and delete_type=#{deleteType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
and tenant_key=#{tenantKey,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectAllBySalarySendIdAndGrantType" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from hrsa_salary_send_range
|
||||
where salary_send_id=#{salarySendId,jdbcType=BIGINT} and grant_type=#{grantType,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<update id="updateBatchSelective" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update hrsa_salary_send_range
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="salary_send_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.salarySendId != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.salarySendId,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="grant_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.grantType != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.grantType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="creator = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.creator != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.creator,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.createTime != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.updateTime != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.deleteType != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.deleteType,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="tenant_key = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.tenantKey != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.tenantKey,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into hrsa_salary_send_range
|
||||
(salary_send_id, grant_type, creator, create_time, update_time, delete_type, tenant_key
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.salarySendId,jdbcType=BIGINT}, #{item.grantType,jdbcType=VARCHAR}, #{item.creator,jdbcType=BIGINT},
|
||||
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteType,jdbcType=INTEGER},
|
||||
#{item.tenantKey,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.salary.mapper.salarybill;
|
||||
|
||||
import com.engine.salary.entity.salaryBill.po.SalarySendRangeObj;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface SalarySendRangeObjMapper {
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insertSelective(SalarySendRangeObj record);
|
||||
|
||||
SalarySendRangeObj selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(SalarySendRangeObj record);
|
||||
|
||||
List<SalarySendRangeObj> selectByAll(SalarySendRangeObj salarySendRangeObj);
|
||||
|
||||
List<SalarySendRangeObj> selectBySalarySendIdAndSalarySendRangeId(@Param("salarySendId") Long salarySendId, @Param("salarySendRangeId") Long salarySendRangeId);
|
||||
|
||||
int updateBatchSelective(List<SalarySendRangeObj> list);
|
||||
|
||||
int batchInsert(@Param("list") List<SalarySendRangeObj> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,317 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.engine.salary.mapper.salarybill.SalarySendRangeObjMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryBill.po.SalarySendRangeObj">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table hrsa_salary_send_range_obj-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="salary_send_id" jdbcType="BIGINT" property="salarySendId" />
|
||||
<result column="salary_send_range_id" jdbcType="BIGINT" property="salarySendRangeId" />
|
||||
<result column="range_type" jdbcType="INTEGER" property="rangeType" />
|
||||
<result column="target_type" jdbcType="INTEGER" property="targetType" />
|
||||
<result column="target_id" jdbcType="BIGINT" property="targetId" />
|
||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="delete_type" jdbcType="INTEGER" property="deleteType" />
|
||||
<result column="tenant_key" jdbcType="VARCHAR" property="tenantKey" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, salary_send_id, salary_send_range_id, range_type, target_type, target_id, creator,
|
||||
create_time, update_time, delete_type, tenant_key
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hrsa_salary_send_range_obj
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
<!--@mbg.generated-->
|
||||
delete from hrsa_salary_send_range_obj
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.engine.salary.entity.salaryBill.po.SalarySendRangeObj" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into hrsa_salary_send_range_obj
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="salarySendId != null">
|
||||
salary_send_id,
|
||||
</if>
|
||||
<if test="salarySendRangeId != null">
|
||||
salary_send_range_id,
|
||||
</if>
|
||||
<if test="rangeType != null">
|
||||
range_type,
|
||||
</if>
|
||||
<if test="targetType != null">
|
||||
target_type,
|
||||
</if>
|
||||
<if test="targetId != null">
|
||||
target_id,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="salarySendId != null">
|
||||
#{salarySendId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="salarySendRangeId != null">
|
||||
#{salarySendRangeId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="rangeType != null">
|
||||
#{rangeType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="targetType != null">
|
||||
#{targetType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="targetId != null">
|
||||
#{targetId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.engine.salary.entity.salaryBill.po.SalarySendRangeObj">
|
||||
<!--@mbg.generated-->
|
||||
update hrsa_salary_send_range_obj
|
||||
<set>
|
||||
<if test="salarySendId != null">
|
||||
salary_send_id = #{salarySendId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="salarySendRangeId != null">
|
||||
salary_send_range_id = #{salarySendRangeId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="rangeType != null">
|
||||
range_type = #{rangeType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="targetType != null">
|
||||
target_type = #{targetType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="targetId != null">
|
||||
target_id = #{targetId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator = #{creator,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type = #{deleteType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key = #{tenantKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<select id="selectByAll" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from hrsa_salary_send_range_obj
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id=#{id,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="salarySendId != null">
|
||||
and salary_send_id=#{salarySendId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="salarySendRangeId != null">
|
||||
and salary_send_range_id=#{salarySendRangeId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="rangeType != null">
|
||||
and range_type=#{rangeType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="targetType != null">
|
||||
and target_type=#{targetType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="targetId != null">
|
||||
and target_id=#{targetId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
and creator=#{creator,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time=#{updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
and delete_type=#{deleteType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
and tenant_key=#{tenantKey,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBySalarySendIdAndSalarySendRangeId" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from hrsa_salary_send_range_obj
|
||||
where salary_send_id=#{salarySendId,jdbcType=BIGINT} and
|
||||
salary_send_range_id=#{salarySendRangeId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<update id="updateBatchSelective" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update hrsa_salary_send_range_obj
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="salary_send_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.salarySendId != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.salarySendId,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="salary_send_range_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.salarySendRangeId != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.salarySendRangeId,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="range_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.rangeType != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.rangeType,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="target_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.targetType != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.targetType,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="target_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.targetId != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.targetId,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="creator = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.creator != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.creator,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.createTime != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.updateTime != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="delete_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.deleteType != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.deleteType,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="tenant_key = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.tenantKey != null">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.tenantKey,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
insert into hrsa_salary_send_range_obj
|
||||
(salary_send_id, salary_send_range_id, range_type, target_type, target_id, creator,
|
||||
create_time, update_time, delete_type, tenant_key)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.salarySendId,jdbcType=BIGINT}, #{item.salarySendRangeId,jdbcType=BIGINT},
|
||||
#{item.rangeType,jdbcType=INTEGER}, #{item.targetType,jdbcType=INTEGER}, #{item.targetId,jdbcType=BIGINT},
|
||||
#{item.creator,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},
|
||||
#{item.deleteType,jdbcType=INTEGER}, #{item.tenantKey,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
insert into hrsa_salary_send_range_obj
|
||||
(salary_send_id, salary_send_range_id, range_type, target_type, target_id, creator,
|
||||
create_time, update_time, delete_type, tenant_key)
|
||||
values (#{item.salarySendId,jdbcType=BIGINT}, #{item.salarySendRangeId,jdbcType=BIGINT},
|
||||
#{item.rangeType,jdbcType=INTEGER}, #{item.targetType,jdbcType=INTEGER},
|
||||
#{item.targetId,jdbcType=BIGINT},
|
||||
#{item.creator,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP},
|
||||
#{item.updateTime,jdbcType=TIMESTAMP},
|
||||
#{item.deleteType,jdbcType=INTEGER}, #{item.tenantKey,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="oracle">
|
||||
insert into hrsa_salary_send_range_obj
|
||||
(salary_send_id, salary_send_range_id, range_type, target_type, target_id, creator,
|
||||
create_time, update_time, delete_type, tenant_key)
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
select
|
||||
#{item.salarySendId,jdbcType=BIGINT}, #{item.salarySendRangeId,jdbcType=BIGINT},
|
||||
#{item.rangeType,jdbcType=INTEGER}, #{item.targetType,jdbcType=INTEGER}, #{item.targetId,jdbcType=BIGINT},
|
||||
#{item.creator,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},
|
||||
#{item.deleteType,jdbcType=INTEGER}, #{item.tenantKey,jdbcType=VARCHAR}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.salaryBill.dto.*;
|
||||
import com.engine.salary.entity.salaryBill.param.*;
|
||||
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 工资单发放范围
|
||||
*/
|
||||
public interface SalarySendRangeService {
|
||||
void save();
|
||||
|
||||
void listPage();
|
||||
|
||||
void listDTO();
|
||||
|
||||
void listByIds();
|
||||
|
||||
void getById(Long id);
|
||||
|
||||
void deleteBySalarySendIds(Collection<Long> sendIds);
|
||||
|
||||
void getSendInfoIdsBySendId(Collection<Long> sendIds);
|
||||
}
|
||||
Loading…
Reference in New Issue