This commit is contained in:
parent
7b0648cc68
commit
76977331af
|
|
@ -0,0 +1,30 @@
|
|||
package com.engine.salary.constant;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName SalaryBillConstant
|
||||
* @date 2023/06/09 17:23
|
||||
* @description
|
||||
*/
|
||||
public class SalaryBillConstant {
|
||||
|
||||
// 当前操作者姓名
|
||||
public static final String HRM_Name = "HRM_Name";
|
||||
// 当前操作者编号
|
||||
public static final String HRM_Num = "HRM_Num";
|
||||
// 当前操作者移动电话
|
||||
public static final String HRM_Mobile = "HRM_Mobile";
|
||||
// 当前操作者电子邮件
|
||||
public static final String HRM_Email = "HRM_Email";
|
||||
// 当前操作者人员id
|
||||
public static final String HRM_CurrentOperatorId = "HRM_CurrentOperatorId";
|
||||
// 当前操作者分部
|
||||
public static final String HRM_Department = "HRM_Department";
|
||||
//
|
||||
public static final String HRM_SecondDepartment = "HRM_SecondDepartment";
|
||||
// 当前日期
|
||||
public static final String HRM_CurrentDate = "HRM_CurrentDate";
|
||||
// 当前时间
|
||||
public static final String HRM_CurrentTime = "HRM_CurrentTime";
|
||||
public static final String HRM_prefix = "$";
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.engine.salary.entity.salaryBill.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName SalaryBaseSetFormDTO
|
||||
* @date 2023/06/09 11:36
|
||||
* @description 工资单基础设置表单
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryBaseSetFormDTO {
|
||||
|
||||
// private Long id;
|
||||
|
||||
// 启用水印
|
||||
private Boolean watermarkStatus;
|
||||
|
||||
// 水印类型
|
||||
private String watermark;
|
||||
|
||||
// 水印设置
|
||||
private Object watermarkSetting;
|
||||
|
||||
// 签名确认
|
||||
private Boolean ackStatus;
|
||||
|
||||
// 员工反馈
|
||||
private Boolean feedbackStatus;
|
||||
|
||||
}
|
||||
|
|
@ -84,4 +84,13 @@ public class SalaryBillSendDTO {
|
|||
|
||||
//薪资项目收入所得类型
|
||||
private Map<String, String> salaryItemIncomeCategoryMap;
|
||||
|
||||
//工资单水印设置
|
||||
SalaryBillWatermarkDTO watermarkSetting;
|
||||
|
||||
//邮件水印模板
|
||||
private String emailWmContentTemplate;
|
||||
|
||||
//工资单水印文本动态变量
|
||||
private List<String> wmTextFieldIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.salary.entity.salaryBill.dto;
|
||||
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateWatermarkTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 工资单水印
|
||||
* @Author: Harryxzy
|
||||
* @Date: 2023/6/09 11:15
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryBillWatermarkDTO {
|
||||
|
||||
/**
|
||||
* 水印是否开启。0:否,1:是
|
||||
*/
|
||||
private Boolean watermarkStatus;
|
||||
|
||||
/**
|
||||
* 水印类型
|
||||
* @see SalaryTemplateWatermarkTypeEnum
|
||||
*/
|
||||
private String watermarkType;
|
||||
|
||||
/**
|
||||
* 自定义水印设置内容
|
||||
*/
|
||||
private Map<String, Object> wmSetting;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.engine.salary.entity.salaryBill.param;
|
||||
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateWatermarkTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName SalaryBaseSetSaveParam
|
||||
* @date 2023/06/09 13:41
|
||||
* @description 工资单基础设置保存参数
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryBaseSetSaveParam {
|
||||
|
||||
// 是否启用水印")
|
||||
private Boolean watermarkStatus;
|
||||
|
||||
// 水印类型")
|
||||
private SalaryTemplateWatermarkTypeEnum watermark;
|
||||
|
||||
// 自定义设置内容")
|
||||
private Map<String, Object> wmSetting;
|
||||
|
||||
// 是否启用确认")
|
||||
private Boolean ackStatus;
|
||||
|
||||
// 是否启用反馈")
|
||||
private Boolean feedbackStatus;
|
||||
|
||||
public static void checkParam(SalaryBaseSetSaveParam saveParam) {
|
||||
if (Objects.isNull(saveParam.getWatermarkStatus())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(220418, "是否启用水印必传"));
|
||||
}
|
||||
// 如果开启了
|
||||
if (saveParam.getWatermarkStatus()) {
|
||||
if (Objects.isNull(saveParam.getWatermark())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(220419, "水印类型必传"));
|
||||
}
|
||||
if (SalaryTemplateWatermarkTypeEnum.CUSTOM.equals(saveParam.getWatermark()) && (Objects.isNull(saveParam.getWmSetting()) || saveParam.getWmSetting().isEmpty())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(220419, "自定义水印的设置内容必传"));
|
||||
}
|
||||
}
|
||||
|
||||
// if (Objects.isNull(saveParam.getAckStatus())) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 222645, "是否启用确认必传"));
|
||||
// }
|
||||
//
|
||||
// if (Objects.isNull(saveParam.getFeedbackStatus())) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 222646, "是否启用反馈必传"));
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.engine.salary.entity.salaryBill.po;
|
||||
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateWatermarkTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName SalaryBillWatermarkPO
|
||||
* @date 2023/06/09 10:47
|
||||
* @description 工资单水印表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryBillWatermarkPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 水印是否开启。0:否,1:是
|
||||
*/
|
||||
private Integer watermarkStatus;
|
||||
|
||||
/**
|
||||
* 水印类型
|
||||
* @see SalaryTemplateWatermarkTypeEnum
|
||||
*/
|
||||
private String watermarkType;
|
||||
|
||||
/**
|
||||
* 自定义水印设置内容
|
||||
*/
|
||||
private String watermarkSetting;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
}
|
||||
|
|
@ -68,6 +68,11 @@ public class SalaryTemplatePO {
|
|||
*/
|
||||
private Integer smsStatus;
|
||||
|
||||
/**
|
||||
* 薪酬水印
|
||||
*/
|
||||
private String salaryWatermark;
|
||||
|
||||
/**
|
||||
* 主题
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.engine.salary.enums.salarybill;
|
||||
|
||||
/**
|
||||
* @Description: 水印类型
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2021/12/9 13:13
|
||||
*/
|
||||
public enum SalaryTemplateWatermarkTypeEnum {
|
||||
|
||||
DEFAULT("DEFAULT", "系统默认水印", 220057),
|
||||
CUSTOM("CUSTOM", "自定义水印", 220058);
|
||||
|
||||
private String value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
private int labelId;
|
||||
|
||||
SalaryTemplateWatermarkTypeEnum(String value, String defaultLabel, int labelId) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
|
||||
public int getLabelId() {
|
||||
return labelId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.salary.mapper.salarybill;
|
||||
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName SalaryBillWatermarkMapper
|
||||
* @date 2023/06/09 11:13
|
||||
* @description
|
||||
*/
|
||||
public interface SalaryBillWatermarkMapper {
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<SalaryBillWatermarkPO> listAll();
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<SalaryBillWatermarkPO> listSome(SalaryBillWatermarkPO salaryBillWatermark);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
SalaryBillWatermarkPO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param salaryBillWatermark 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(SalaryBillWatermarkPO salaryBillWatermark);
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param salaryBillWatermark 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(SalaryBillWatermarkPO salaryBillWatermark);
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param salaryBillWatermark 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(SalaryBillWatermarkPO salaryBillWatermark);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param salaryBillWatermark 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(SalaryBillWatermarkPO salaryBillWatermark);
|
||||
|
||||
/**
|
||||
* 删除所有生效水印记录
|
||||
*/
|
||||
void deleteAll();
|
||||
}
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
<?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.SalaryBillWatermarkMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO">
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="delete_type" property="deleteType" />
|
||||
<result column="id" property="id" />
|
||||
<result column="tenant_key" property="tenantKey" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="watermark_setting" property="watermarkSetting" />
|
||||
<result column="watermark_status" property="watermarkStatus" />
|
||||
<result column="watermark_type" property="watermarkType" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t.create_time
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.id
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
, t.watermark_setting
|
||||
, t.watermark_status
|
||||
, t.watermark_type
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_salary_bill_watermark t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_salary_bill_watermark t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_salary_bill_watermark t
|
||||
WHERE delete_type = 0
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="watermarkSetting != null">
|
||||
AND watermark_setting = #{watermarkSetting}
|
||||
</if>
|
||||
<if test="watermarkStatus != null">
|
||||
AND watermark_status = #{watermarkStatus}
|
||||
</if>
|
||||
<if test="watermarkType != null">
|
||||
AND watermark_type = #{watermarkType}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO">
|
||||
INSERT INTO hrsa_salary_bill_watermark
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="watermarkSetting != null">
|
||||
watermark_setting,
|
||||
</if>
|
||||
<if test="watermarkStatus != null">
|
||||
watermark_status,
|
||||
</if>
|
||||
<if test="watermarkType != null">
|
||||
watermark_type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null" >
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
#{id},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="watermarkSetting != null" >
|
||||
#{watermarkSetting},
|
||||
</if>
|
||||
<if test="watermarkStatus != null" >
|
||||
#{watermarkStatus},
|
||||
</if>
|
||||
<if test="watermarkType != null" >
|
||||
#{watermarkType},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO">
|
||||
UPDATE hrsa_salary_bill_watermark
|
||||
<set>
|
||||
create_time=#{createTime},
|
||||
creator=#{creator},
|
||||
delete_type=#{deleteType},
|
||||
tenant_key=#{tenantKey},
|
||||
update_time=#{updateTime},
|
||||
watermark_setting=#{watermarkSetting},
|
||||
watermark_status=#{watermarkStatus},
|
||||
watermark_type=#{watermarkType},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO">
|
||||
UPDATE hrsa_salary_bill_watermark
|
||||
<set>
|
||||
<if test="createTime != null" >
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="watermarkSetting != null" >
|
||||
watermark_setting=#{watermarkSetting},
|
||||
</if>
|
||||
<if test="watermarkStatus != null" >
|
||||
watermark_status=#{watermarkStatus},
|
||||
</if>
|
||||
<if test="watermarkType != null" >
|
||||
watermark_type=#{watermarkType},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<update id="delete" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO">
|
||||
UPDATE hrsa_salary_bill_watermark
|
||||
SET delete_type=1
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
<update id="deleteAll">
|
||||
UPDATE hrsa_salary_bill_watermark
|
||||
SET delete_type=1
|
||||
WHERE delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBillWatermarkDTO;
|
||||
import com.engine.salary.entity.salaryBill.param.SalaryBaseSetSaveParam;
|
||||
|
||||
/**
|
||||
* @Description: 工资单水印
|
||||
* @Author: Harryxzy
|
||||
* @Date: 2023/06/09 10:14
|
||||
*/
|
||||
public interface SalaryBillBaseSetService {
|
||||
|
||||
/**
|
||||
* 获取工资单水印设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
SalaryBillWatermarkDTO getWatermarkSetting();
|
||||
|
||||
/**
|
||||
* 获取工资单确认和反馈设置
|
||||
*
|
||||
* @param currentTenantKey
|
||||
* @return
|
||||
*/
|
||||
// SalaryBillAckFeedbackDTO getAckFeedbackSetting();
|
||||
|
||||
/**
|
||||
* 保存工资单水印设置
|
||||
*
|
||||
* @param saveParam
|
||||
* @return
|
||||
*/
|
||||
String saveBaseSet(SalaryBaseSetSaveParam saveParam);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName SalaryBillWatermarkService
|
||||
* @date 2023/06/09 11:09
|
||||
* @description
|
||||
*/
|
||||
public interface SalaryBillWatermarkService {
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<SalaryBillWatermarkPO> listAll();
|
||||
|
||||
List<SalaryBillWatermarkPO> listSome(SalaryBillWatermarkPO po);
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
SalaryBillWatermarkPO getById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param SalaryBillWatermarkPO 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(SalaryBillWatermarkPO SalaryBillWatermarkPO);
|
||||
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param SalaryBillWatermarkPO 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(SalaryBillWatermarkPO SalaryBillWatermarkPO);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param SalaryBillWatermarkPO 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(SalaryBillWatermarkPO SalaryBillWatermarkPO);
|
||||
|
||||
/**
|
||||
* 删除所有生效记录
|
||||
*
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
void deleteAll();
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBillWatermarkDTO;
|
||||
import com.engine.salary.entity.salaryBill.param.SalaryBaseSetSaveParam;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO;
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateWatermarkTypeEnum;
|
||||
import com.engine.salary.service.SalaryBillBaseSetService;
|
||||
import com.engine.salary.service.SalaryBillWatermarkService;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 工资单水印
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2023/5/16 11:10
|
||||
*/
|
||||
|
||||
public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillBaseSetService {
|
||||
|
||||
private SalaryBillWatermarkService getSalaryBillWatermarkService(User user) {
|
||||
return ServiceUtil.getService(SalaryBillWatermarkServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalaryBillWatermarkDTO getWatermarkSetting() {
|
||||
List<SalaryBillWatermarkPO> list = getSalaryBillWatermarkService(user).listAll();
|
||||
SalaryBillWatermarkPO watermarkPO = CollectionUtils.isNotEmpty(list) ? list.get(0) : null;
|
||||
|
||||
if (Objects.isNull(watermarkPO)) {
|
||||
return null;
|
||||
}
|
||||
return SalaryBillWatermarkDTO.builder()
|
||||
.watermarkStatus(NumberUtils.INTEGER_ONE.equals(watermarkPO.getWatermarkStatus()))
|
||||
.watermarkType(watermarkPO.getWatermarkType())
|
||||
.wmSetting(JsonUtil.parseMap(watermarkPO.getWatermarkSetting(), Object.class))
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveBaseSet(SalaryBaseSetSaveParam saveParam) {
|
||||
// 检查参数
|
||||
SalaryBaseSetSaveParam.checkParam(saveParam);
|
||||
|
||||
Date now = new Date();
|
||||
// 工资单水印===========================================================
|
||||
Integer watermarkStatus = NumberUtils.INTEGER_ONE;
|
||||
String watermark = null;
|
||||
String wmSetting = StringUtils.EMPTY;
|
||||
// 如果开启了
|
||||
if (saveParam.getWatermarkStatus()) {
|
||||
if (SalaryTemplateWatermarkTypeEnum.CUSTOM.equals(saveParam.getWatermark())) {
|
||||
wmSetting = JsonUtil.toJsonString(saveParam.getWmSetting());
|
||||
}
|
||||
watermark = saveParam.getWatermark().getValue();
|
||||
} else {
|
||||
watermarkStatus = NumberUtils.INTEGER_ZERO;
|
||||
}
|
||||
|
||||
// 将当前生效的水印信息都删除
|
||||
getSalaryBillWatermarkService(user).deleteAll();
|
||||
// 保存最新的水印信息
|
||||
getSalaryBillWatermarkService(user).insertIgnoreNull(SalaryBillWatermarkPO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.watermarkStatus(watermarkStatus)
|
||||
.watermarkType(watermark)
|
||||
.watermarkSetting(wmSetting)
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
.creator(Long.valueOf(user.getUID()))
|
||||
.deleteType(NumberUtils.INTEGER_ZERO)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build());
|
||||
|
||||
|
||||
// // 工资单确认和反馈 ===========================================================
|
||||
// new LambdaUpdateChainWrapper<>(salaryBillAckFeedbackMapper)
|
||||
// .eq(SalaryBillAckFeedbackPO::getDeleteType, 0)
|
||||
// .eq(SalaryBillAckFeedbackPO::getTenantKey, tenantKey)
|
||||
// .set(SalaryBillAckFeedbackPO::getDeleteType, 3)
|
||||
// .update();
|
||||
// salaryBillAckFeedbackMapper.insert(SalaryBillAckFeedbackPO.builder()
|
||||
// .id(IdGenerator.generate())
|
||||
// .ackStatus(saveParam.getAckStatus() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO)
|
||||
// .feedbackStatus(saveParam.getFeedbackStatus() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO)
|
||||
// .createTime(now)
|
||||
// .updateTime(now)
|
||||
// .creator(employeeId)
|
||||
// .deleteType(NumberUtils.INTEGER_ZERO)
|
||||
// .tenantKey(tenantKey)
|
||||
// .build());
|
||||
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryBillWatermarkPO;
|
||||
import com.engine.salary.mapper.salarybill.SalaryBillWatermarkMapper;
|
||||
import com.engine.salary.service.SalaryBillWatermarkService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName SalaryBillWatermarkServiceImpl
|
||||
* @date 2023/06/09 11:12
|
||||
* @description
|
||||
*/
|
||||
public class SalaryBillWatermarkServiceImpl extends Service implements SalaryBillWatermarkService {
|
||||
|
||||
private SalaryBillWatermarkMapper getSalaryBillWatermarkMapper() {
|
||||
return SqlProxyHandle.getProxy(SalaryBillWatermarkMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalaryBillWatermarkPO> listAll() {
|
||||
return getSalaryBillWatermarkMapper().listAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalaryBillWatermarkPO> listSome(SalaryBillWatermarkPO po) {
|
||||
return getSalaryBillWatermarkMapper().listSome(po);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalaryBillWatermarkPO getById(Long id) {
|
||||
return getSalaryBillWatermarkMapper().getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertIgnoreNull(SalaryBillWatermarkPO SalaryBillWatermarkPO) {
|
||||
return getSalaryBillWatermarkMapper().insertIgnoreNull(SalaryBillWatermarkPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateIgnoreNull(SalaryBillWatermarkPO SalaryBillWatermarkPO) {
|
||||
return getSalaryBillWatermarkMapper().updateIgnoreNull(SalaryBillWatermarkPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(SalaryBillWatermarkPO SalaryBillWatermarkPO) {
|
||||
return getSalaryBillWatermarkMapper().delete(SalaryBillWatermarkPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll() {
|
||||
getSalaryBillWatermarkMapper().deleteAll();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.dev.api.bean.MessageBean;
|
||||
|
|
@ -10,6 +11,7 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.biz.SalarySendBiz;
|
||||
import com.engine.salary.biz.SalarySendInfoBiz;
|
||||
import com.engine.salary.constant.SalaryArchiveConstant;
|
||||
import com.engine.salary.constant.SalaryBillConstant;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.constant.SalaryTemplateSalaryItemSetGroupConstant;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
|
|
@ -36,6 +38,7 @@ import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
|||
import com.engine.salary.enums.salaryarchive.SalaryArchiveFieldTypeEnum;
|
||||
import com.engine.salary.enums.salarybill.SalarySendStatusEnum;
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateReplenishRuleEnum;
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateWatermarkTypeEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.enums.salarysend.SalarySendGrantTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -74,6 +77,8 @@ import java.lang.reflect.InvocationTargetException;
|
|||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -571,12 +576,74 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
map.put("salaryGroups", itemSetListDTOS);
|
||||
|
||||
salaryTemplate.setTheme(getBillTitle(salaryTemplate.getTheme(), salaryMonth, currentEmployeeId));
|
||||
// 工资单水印文本型动态变量 == 处理
|
||||
handleSalaryWatermark(salaryTemplate, salarySendInfo);
|
||||
map.put("salaryTemplate", salaryTemplate);
|
||||
map.put("salaryAcctResult", salaryAcctResultS);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 工资单水印文本型动态变量 == 处理
|
||||
*
|
||||
* @param salaryTemplate
|
||||
* @param salarySendInfo
|
||||
*/
|
||||
private void handleSalaryWatermark(SalaryTemplatePO salaryTemplate, SalarySendInfoPO salarySendInfo) {
|
||||
SalaryBillWatermarkDTO salaryBillWatermark = JsonUtil.parseObject(salaryTemplate.getSalaryWatermark(), SalaryBillWatermarkDTO.class);
|
||||
if (Objects.isNull(salaryBillWatermark) || !salaryBillWatermark.getWatermarkStatus() || !salaryBillWatermark.getWatermarkType().equals(SalaryTemplateWatermarkTypeEnum.CUSTOM.getValue())) {
|
||||
return;
|
||||
}
|
||||
// 发送时已经处理好变量字段,可直接获取判断
|
||||
List<String> wmTextFieldIds = (List<String>) salaryBillWatermark.getWmSetting().getOrDefault("wmSelectedFieldIds", Lists.newArrayList());
|
||||
if (CollectionUtils.isEmpty(wmTextFieldIds)) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean needQueryEmp = (boolean) salaryBillWatermark.getWmSetting().getOrDefault("needQueryEmp", false);
|
||||
DataCollectionEmployee simpleEmployee = null;
|
||||
if (needQueryEmp) {
|
||||
simpleEmployee = getSalaryEmployeeService(user).getEmployeeById(salarySendInfo.getEmployeeId());
|
||||
}
|
||||
|
||||
String wmText = salaryBillWatermark.getWmSetting().getOrDefault("wmText", StringUtils.EMPTY).toString();
|
||||
for (String wmTextFieldId : wmTextFieldIds) {
|
||||
// 当前操作者姓名
|
||||
if (SalaryBillConstant.HRM_Name.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_Name, Objects.isNull(simpleEmployee) ? StringUtils.EMPTY : simpleEmployee.getUsername());
|
||||
// 当前操作者编号
|
||||
} else if (SalaryBillConstant.HRM_Num.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_Num, Objects.isNull(simpleEmployee) || StringUtils.isEmpty(simpleEmployee.getWorkcode()) ? StringUtils.EMPTY : simpleEmployee.getWorkcode());
|
||||
// 当前操作者移动电话
|
||||
} else if (SalaryBillConstant.HRM_Mobile.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_Mobile, Objects.isNull(simpleEmployee) || StringUtils.isEmpty(simpleEmployee.getMobile()) ? StringUtils.EMPTY : simpleEmployee.getMobile());
|
||||
// 当前操作者电子邮件
|
||||
} else if (SalaryBillConstant.HRM_Email.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_Email, Objects.isNull(simpleEmployee) || StringUtils.isEmpty(simpleEmployee.getEmail()) ? StringUtils.EMPTY : simpleEmployee.getEmail());
|
||||
// 当前操作者人员ID
|
||||
} else if (SalaryBillConstant.HRM_CurrentOperatorId.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_CurrentOperatorId, Objects.isNull(simpleEmployee) ? StringUtils.EMPTY : simpleEmployee.getEmployeeId().toString());
|
||||
// 当前操作者部门
|
||||
} else if (SalaryBillConstant.HRM_Department.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_Department, Objects.isNull(simpleEmployee) || Objects.isNull(simpleEmployee.getDepartmentName()) ? StringUtils.EMPTY : simpleEmployee.getDepartmentName());
|
||||
// 当前操作者分部
|
||||
} else if (SalaryBillConstant.HRM_SecondDepartment.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_SecondDepartment, Objects.isNull(simpleEmployee) || Objects.isNull(simpleEmployee.getSubcompanyName()) ? StringUtils.EMPTY : simpleEmployee.getSubcompanyName());
|
||||
// 当前日期
|
||||
} else if (SalaryBillConstant.HRM_CurrentDate.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_CurrentDate, SalaryDateUtil.getFormatLocalDate(LocalDate.now()));
|
||||
// 当前时间
|
||||
} else if (SalaryBillConstant.HRM_CurrentTime.equals(wmTextFieldId)) {
|
||||
wmText = wmText.replace(SalaryBillConstant.HRM_prefix + SalaryBillConstant.HRM_CurrentTime, SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now()));
|
||||
}
|
||||
}
|
||||
// 重新设回水印
|
||||
salaryBillWatermark.getWmSetting().put("wmText", wmText);
|
||||
salaryTemplate.setSalaryWatermark(JSON.toJSONString(salaryBillWatermark));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<SalarySendInfoListDTO> salarySendInfoListPage(SalarySendInfoQueryParam queryParam) {
|
||||
|
||||
|
|
@ -677,6 +744,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
.emailStatus(Integer.valueOf(map.getOrDefault("emailStatus", "0").toString()))
|
||||
.sendEmailId(Long.valueOf(map.getOrDefault("sendEmailId", "0").toString()))
|
||||
.msgStatus(Integer.valueOf(map.getOrDefault("msgStatus", "0").toString()))
|
||||
.salaryWatermark(map.getOrDefault("salaryWatermark", StringUtils.EMPTY).toString())
|
||||
.theme(map.getOrDefault("theme", "").toString())
|
||||
.background(map.getOrDefault("background", "").toString())
|
||||
.textContent(map.getOrDefault("textContent", "").toString())
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.exception.SalaryRunTimeException;
|
|||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.wrapper.SalaryBillBaseSetWrapper;
|
||||
import com.engine.salary.wrapper.SalarySendWrapper;
|
||||
import com.engine.salary.wrapper.SalaryTemplateWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
|
|
@ -48,6 +49,11 @@ public class SalaryBillController {
|
|||
return ServiceUtil.getService(SalarySendWrapper.class, user);
|
||||
}
|
||||
|
||||
private SalaryBillBaseSetWrapper getSalaryBillBaseSetWrapper(User user) {
|
||||
return ServiceUtil.getService(SalaryBillBaseSetWrapper.class, user);
|
||||
}
|
||||
|
||||
|
||||
/******** 工资单模板 start ***********************************************************************************************/
|
||||
/**
|
||||
* 工资单模板列表
|
||||
|
|
@ -544,5 +550,37 @@ public class SalaryBillController {
|
|||
}
|
||||
/******** 工资单发放 end ***********************************************************************************************/
|
||||
|
||||
/******** 工资单基础设置 start ***********************************************************************************************/
|
||||
|
||||
/**
|
||||
* 获取工资单基础设置表单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/baseSet/getForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
// @ApiOperation("获取工资单基础设置表单")
|
||||
public String getBaseSetForm( @Context HttpServletRequest request, @Context HttpServletResponse response ) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, SalaryBaseSetFormDTO>(user).run(getSalaryBillBaseSetWrapper(user)::getBaseSetForm);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存工资单基础设置
|
||||
*
|
||||
* @param saveParam 保存参数
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/baseSet/save")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
// @ApiOperation("保存工资单基础设置")
|
||||
public String saveBaseSet( @Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryBaseSetSaveParam saveParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryBaseSetSaveParam, String>(user).run(getSalaryBillBaseSetWrapper(user)::saveBaseSet, saveParam);
|
||||
}
|
||||
/******** 工资单基础设置 end ***********************************************************************************************/
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBaseSetFormDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBillWatermarkDTO;
|
||||
import com.engine.salary.entity.salaryBill.param.SalaryBaseSetSaveParam;
|
||||
import com.engine.salary.service.SalaryBillBaseSetService;
|
||||
import com.engine.salary.service.impl.SalaryBillBaseSetServiceImpl;
|
||||
import com.google.common.collect.Maps;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 工资单水印
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2023/5/16 10:17
|
||||
*/
|
||||
|
||||
public class SalaryBillBaseSetWrapper extends Service {
|
||||
|
||||
private SalaryBillBaseSetService getSalaryBillBaseSetService(User user) {
|
||||
return ServiceUtil.getService(SalaryBillBaseSetServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否具备工资单水印权限
|
||||
*
|
||||
* @param currentEmployeeId
|
||||
* @param currentTenantKey
|
||||
* @return
|
||||
*/
|
||||
// public Boolean isBaseSetHasRight(Long currentEmployeeId, String currentTenantKey) {
|
||||
// return taxAgentService.isHasPermission(SalaryBillWatermarkBO.PERMISSION_SET_CODE, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取工资单水印设置表单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SalaryBaseSetFormDTO getBaseSetForm() {
|
||||
SalaryBaseSetFormDTO dto = new SalaryBaseSetFormDTO();
|
||||
SalaryBillWatermarkDTO salaryBillWatermark = getSalaryBillBaseSetService(user).getWatermarkSetting();
|
||||
// SalaryBillAckFeedbackDTO salaryBillAckFeedback = salaryBillBaseSetService.getAckFeedbackSetting();
|
||||
|
||||
if (Objects.isNull(salaryBillWatermark)) {
|
||||
dto.setWatermarkStatus(false);
|
||||
Map<String, Object> wmSetting = Maps.newHashMap();
|
||||
wmSetting.put("wmClassify", "text");
|
||||
dto.setWatermarkSetting(wmSetting);
|
||||
} else {
|
||||
dto.setWatermarkStatus(salaryBillWatermark.getWatermarkStatus());
|
||||
dto.setWatermarkSetting(salaryBillWatermark.getWmSetting());
|
||||
dto.setWatermark(salaryBillWatermark.getWatermarkType());
|
||||
}
|
||||
// if (Objects.nonNull(salaryBillAckFeedback)) {
|
||||
// data.put("ackStatus", salaryBillAckFeedback.getAckStatus());
|
||||
// data.put("feedbackStatus", salaryBillAckFeedback.getFeedbackStatus());
|
||||
// }
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存工资单水印设置
|
||||
*
|
||||
* @param saveParam
|
||||
* @return
|
||||
*/
|
||||
public String saveBaseSet(SalaryBaseSetSaveParam saveParam) {
|
||||
return getSalaryBillBaseSetService(user).saveBaseSet(saveParam);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue