工资单发放-工资单模板接口
This commit is contained in:
parent
bd8305763e
commit
897c98114f
|
|
@ -48,7 +48,7 @@ public class SalaryTemplateBO {
|
|||
.textContentPosition(saveParam.getTextContentPosition())
|
||||
.salaryItemNullStatus(saveParam.getSalaryItemNullStatus()?1:0)
|
||||
.salaryItemZeroStatus(saveParam.getSalaryItemZeroStatus()?1:0)
|
||||
.salaryItemSetting(JSONUtil.toJsonStr(saveParam.getSalaryItemSetting()))
|
||||
.salaryItemSetting(saveParam.getSalaryItemSetting() != null ? JSONUtil.toJsonStr(saveParam.getSalaryItemSetting()) : "")
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.creator(employeeId)
|
||||
|
|
|
|||
|
|
@ -41,4 +41,6 @@ ALTER TABLE `ecology_hr`.`hrsa_salary_sob_default_item`
|
|||
ADD COLUMN `sorted_index` int(0) NOT NULL COMMENT '显示顺序' AFTER `sob_default_item_group_id`;
|
||||
|
||||
|
||||
-- 工资单发放
|
||||
alter table hrsa_salary_template modify id bigint auto_increment;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public interface SalarySendInfoMapper {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<SalarySendInfoPO> listSome(@Param("param") SalarySendInfoPO params);
|
||||
List<SalarySendInfoPO> listSome(SalarySendInfoPO params);
|
||||
|
||||
/**
|
||||
* 根据id更新
|
||||
|
|
|
|||
|
|
@ -1,835 +0,0 @@
|
|||
<?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.weaver.hrm.salary.dao.SalarySendInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryBill.po.SalarySendInfoPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="salary_send_id" property="salarySendId"/>
|
||||
<result column="salary_month" property="salaryMonth"/>
|
||||
<result column="salary_acct_record_id" property="salaryAcctRecordId"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<result column="send_status" property="sendStatus"/>
|
||||
<result column="send_time" property="sendTime"/>
|
||||
<result column="salary_template" property="salaryTemplate"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t.id
|
||||
, t.salary_send_id
|
||||
, t.salary_month
|
||||
, t.salary_acct_record_id
|
||||
, t.employee_id
|
||||
, t.tax_agent_id
|
||||
, t.send_status
|
||||
, t.send_time
|
||||
, t.salary_template
|
||||
, t.creator
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
, t.delete_type
|
||||
, t.tenant_key
|
||||
</sql>
|
||||
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO hrsa_salary_send_info (
|
||||
id,
|
||||
salary_send_id,
|
||||
salary_month,
|
||||
salary_acct_record_id,
|
||||
tax_agent_id,
|
||||
employee_id,
|
||||
send_status,
|
||||
creator,
|
||||
create_time,
|
||||
update_time,
|
||||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.salarySendId},
|
||||
#{item.salaryMonth},
|
||||
#{item.salaryAcctRecordId},
|
||||
#{item.taxAgentId},
|
||||
#{item.employeeId},
|
||||
#{item.sendStatus},
|
||||
#{item.creator},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.tenantKey}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="oracle">
|
||||
INSERT INTO hrsa_salary_send_info (
|
||||
id,
|
||||
salary_send_id,
|
||||
salary_month,
|
||||
salary_acct_record_id,
|
||||
tax_agent_id,
|
||||
employee_id,
|
||||
send_status,
|
||||
creator,
|
||||
create_time,
|
||||
update_time,
|
||||
tenant_key
|
||||
)
|
||||
|
||||
<foreach collection="collection" item="item" separator="union all">
|
||||
select
|
||||
#{item.id},
|
||||
#{item.salarySendId},
|
||||
#{item.salaryMonth},
|
||||
#{item.salaryAcctRecordId},
|
||||
#{item.taxAgentId},
|
||||
#{item.employeeId},
|
||||
#{item.sendStatus},
|
||||
#{item.creator},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.tenantKey}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
INSERT INTO hrsa_salary_send_info (
|
||||
id,
|
||||
salary_send_id,
|
||||
salary_month,
|
||||
salary_acct_record_id,
|
||||
tax_agent_id,
|
||||
employee_id,
|
||||
send_status,
|
||||
creator,
|
||||
create_time,
|
||||
update_time,
|
||||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.salarySendId},
|
||||
#{item.salaryMonth},
|
||||
#{item.salaryAcctRecordId},
|
||||
#{item.taxAgentId},
|
||||
#{item.employeeId},
|
||||
#{item.sendStatus},
|
||||
#{item.creator},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.tenantKey}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<sql id="salarySendInfoColumn">
|
||||
t1.id,
|
||||
e.username,
|
||||
t2.name AS tax_agent,
|
||||
d.name AS department,
|
||||
e.mobile,
|
||||
e.job_num,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
</sql>
|
||||
|
||||
<sql id="paramSql">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 个税扣缴义务人id -->
|
||||
<if test="param.salarySendId != null">
|
||||
AND t1.salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
<!-- 关键字 -->
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND e.username like CONCAT('%',#{param.keyword},'%')
|
||||
</if>
|
||||
<!-- 姓名 -->
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.username like CONCAT('%',#{param.username},'%')
|
||||
</if>
|
||||
<!-- 个税扣缴义务人id -->
|
||||
<if test="param.taxAgentId != null">
|
||||
AND t2.id = #{param.taxAgentId}
|
||||
</if>
|
||||
<!-- 部门 -->
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 岗位 -->
|
||||
<if test="param.positionIds != null and param.positionIds.size()>0">
|
||||
AND e.position IN
|
||||
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 状态 -->
|
||||
<if test="param.userstatus != null and param.userstatus != ''">
|
||||
AND e.status = #{param.userstatus}
|
||||
</if>
|
||||
<!-- 多个发送状态 -->
|
||||
<if test="param.sendStatuss != null and param.sendStatuss.size() > 0">
|
||||
AND t1.send_status IN
|
||||
<foreach collection="param.sendStatuss" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 入职日期 -->
|
||||
<if test="param.hiredate != null and param.hiredate.size() == 2">
|
||||
AND (e.hiredate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="oracle">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.salarySendId != null">
|
||||
AND t1.salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND e.username like '%'||#{param.keyword}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.username like '%'||#{param.username}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.taxAgentId != null">
|
||||
AND t2.id = #{param.taxAgentId}
|
||||
</if>
|
||||
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.positionIds != null and param.positionIds.size()>0">
|
||||
AND e.position IN
|
||||
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.userstatus != null and param.userstatus != ''">
|
||||
AND e.status = #{param.userstatus}
|
||||
</if>
|
||||
|
||||
<if test="param.sendStatuss != null and param.sendStatuss.size() > 0">
|
||||
AND t1.send_status IN
|
||||
<foreach collection="param.sendStatuss" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.hiredate != null and param.hiredate.size() == 2">
|
||||
AND (e.hiredate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="sqlserver">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.salarySendId != null">
|
||||
AND t1.salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND e.username like '%'+#{param.keyword}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.username like '%'+#{param.username}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.taxAgentId != null">
|
||||
AND t2.id = #{param.taxAgentId}
|
||||
</if>
|
||||
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.positionIds != null and param.positionIds.size()>0">
|
||||
AND e.position IN
|
||||
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.userstatus != null and param.userstatus != ''">
|
||||
AND e.status = #{param.userstatus}
|
||||
</if>
|
||||
|
||||
<if test="param.sendStatuss != null and param.sendStatuss.size() > 0">
|
||||
AND t1.send_status IN
|
||||
<foreach collection="param.sendStatuss" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.hiredate != null and param.hiredate.size() == 2">
|
||||
AND (e.hiredate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="list" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalarySendInfoListDTO">
|
||||
SELECT
|
||||
<include refid="salarySendInfoColumn"/>
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN {$publicdb}.employee e ON e.id = t1.employee_id
|
||||
LEFT JOIN {$publicdb}.department d ON d.id = e.DEPARTMENT
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
<!-- 发送状态 -->
|
||||
<if test="param.sendStatusVal != null">
|
||||
AND t1.send_status = #{param.sendStatusVal}
|
||||
</if>
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
<select id="list" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalarySendInfoListDTO" databaseId="oracle">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.username,
|
||||
t2.name AS tax_agent,
|
||||
d.name AS department,
|
||||
e.mobile,
|
||||
e.job_num,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN {$publicdb}.employee e ON e.id = t1.employee_id
|
||||
LEFT JOIN {$publicdb}.department d ON d.id = e.DEPARTMENT
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
|
||||
<if test="param.sendStatusVal != null">
|
||||
AND t1.send_status = #{param.sendStatusVal}
|
||||
</if>
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.salarySendId != null">
|
||||
AND t1.salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND e.username like '%'||#{param.keyword}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.username like '%'||#{param.username}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.taxAgentId != null">
|
||||
AND t2.id = #{param.taxAgentId}
|
||||
</if>
|
||||
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.positionIds != null and param.positionIds.size()>0">
|
||||
AND e.position IN
|
||||
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.userstatus != null and param.userstatus != ''">
|
||||
AND e.status = #{param.userstatus}
|
||||
</if>
|
||||
|
||||
<if test="param.sendStatuss != null and param.sendStatuss.size() > 0">
|
||||
AND t1.send_status IN
|
||||
<foreach collection="param.sendStatuss" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.hiredate != null and param.hiredate.size() == 2">
|
||||
AND (e.hiredate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
|
||||
</if>
|
||||
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
<select id="list" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalarySendInfoListDTO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.username,
|
||||
t2.name AS tax_agent,
|
||||
d.name AS department,
|
||||
e.mobile,
|
||||
e.job_num,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN {$publicdb}.employee e ON e.id = t1.employee_id
|
||||
LEFT JOIN {$publicdb}.department d ON d.id = e.DEPARTMENT
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
|
||||
<if test="param.sendStatusVal != null">
|
||||
AND t1.send_status = #{param.sendStatusVal}
|
||||
</if>
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.salarySendId != null">
|
||||
AND t1.salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND e.username like '%'+#{param.keyword}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.username like '%'+#{param.username}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.taxAgentId != null">
|
||||
AND t2.id = #{param.taxAgentId}
|
||||
</if>
|
||||
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.positionIds != null and param.positionIds.size()>0">
|
||||
AND e.position IN
|
||||
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.userstatus != null and param.userstatus != ''">
|
||||
AND e.status = #{param.userstatus}
|
||||
</if>
|
||||
|
||||
<if test="param.sendStatuss != null and param.sendStatuss.size() > 0">
|
||||
AND t1.send_status IN
|
||||
<foreach collection="param.sendStatuss" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.hiredate != null and param.hiredate.size() == 2">
|
||||
AND (e.hiredate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
|
||||
</if>
|
||||
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
|
||||
<select id="detailList" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalarySendDetailListDTO">
|
||||
SELECT
|
||||
<include refid="salarySendInfoColumn"/>
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN {$publicdb}.employee e ON e.id = t1.employee_id
|
||||
LEFT JOIN {$publicdb}.department d ON d.id = e.DEPARTMENT
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.tenant_key = #{tenantKey} AND t1.delete_type = 0
|
||||
AND e.tenant_key = #{tenantKey}
|
||||
<!-- 合并计税 todo -->
|
||||
<if test="param.mergeCountTax != null">
|
||||
|
||||
</if>
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
<select id="detailList" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalarySendDetailListDTO" databaseId="oracle">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.username,
|
||||
t2.name AS tax_agent,
|
||||
d.name AS department,
|
||||
e.mobile,
|
||||
e.job_num,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN {$publicdb}.employee e ON e.id = t1.employee_id
|
||||
LEFT JOIN {$publicdb}.department d ON d.id = e.DEPARTMENT
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.tenant_key = #{tenantKey} AND t1.delete_type = 0
|
||||
AND e.tenant_key = #{tenantKey}
|
||||
|
||||
<if test="param.mergeCountTax != null">
|
||||
|
||||
</if>
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.salarySendId != null">
|
||||
AND t1.salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND e.username like '%'||#{param.keyword}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.username like '%'||#{param.username}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.taxAgentId != null">
|
||||
AND t2.id = #{param.taxAgentId}
|
||||
</if>
|
||||
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.positionIds != null and param.positionIds.size()>0">
|
||||
AND e.position IN
|
||||
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.userstatus != null and param.userstatus != ''">
|
||||
AND e.status = #{param.userstatus}
|
||||
</if>
|
||||
|
||||
<if test="param.sendStatuss != null and param.sendStatuss.size() > 0">
|
||||
AND t1.send_status IN
|
||||
<foreach collection="param.sendStatuss" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.hiredate != null and param.hiredate.size() == 2">
|
||||
AND (e.hiredate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
|
||||
</if>
|
||||
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
<select id="detailList" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalarySendDetailListDTO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.username,
|
||||
t2.name AS tax_agent,
|
||||
d.name AS department,
|
||||
e.mobile,
|
||||
e.job_num,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN {$publicdb}.employee e ON e.id = t1.employee_id
|
||||
LEFT JOIN {$publicdb}.department d ON d.id = e.DEPARTMENT
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.tenant_key = #{tenantKey} AND t1.delete_type = 0
|
||||
AND e.tenant_key = #{tenantKey}
|
||||
|
||||
<if test="param.mergeCountTax != null">
|
||||
|
||||
</if>
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.salarySendId != null">
|
||||
AND t1.salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND e.username like '%'+#{param.keyword}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.username like '%'+#{param.username}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.taxAgentId != null">
|
||||
AND t2.id = #{param.taxAgentId}
|
||||
</if>
|
||||
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.positionIds != null and param.positionIds.size()>0">
|
||||
AND e.position IN
|
||||
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.userstatus != null and param.userstatus != ''">
|
||||
AND e.status = #{param.userstatus}
|
||||
</if>
|
||||
|
||||
<if test="param.sendStatuss != null and param.sendStatuss.size() > 0">
|
||||
AND t1.send_status IN
|
||||
<foreach collection="param.sendStatuss" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.hiredate != null and param.hiredate.size() == 2">
|
||||
AND (e.hiredate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
|
||||
</if>
|
||||
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
|
||||
<select id="mySalaryBillList" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalaryMySalaryBillListDTO">
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.salary_month AS salaryYearMonth,
|
||||
t2.name AS tax_agent,
|
||||
t3.acct_times,
|
||||
t1.send_time,
|
||||
t1.send_status
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
LEFT JOIN hrsa_salary_acct_record t3 ON t3.id = t1.salary_acct_record_id
|
||||
WHERE
|
||||
t1.delete_type = 0 AND t1.send_status = 1
|
||||
<!-- id -->
|
||||
<if test="param.id != null">
|
||||
AND t1.id = #{param.id}
|
||||
</if>
|
||||
<!-- 人员id -->
|
||||
<if test="param.employeeId != null">
|
||||
AND t1.employee_id = #{param.employeeId}
|
||||
</if>
|
||||
<!-- 薪资所属月 -->
|
||||
<if test="param.salaryMonth != null">
|
||||
<if test="param.salaryMonth.size() == 1">
|
||||
AND t1.salary_month = #{param.salaryMonth[0]}
|
||||
</if>
|
||||
<if test="param.salaryMonth.size() == 2">
|
||||
AND (t1.salary_month BETWEEN #{param.salaryMonth[0]} AND #{param.salaryMonth[1]})
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
|
||||
<update id="updateGrantWithdraw">
|
||||
UPDATE
|
||||
hrsa_salary_send_info
|
||||
|
||||
<set>
|
||||
<if test="po.sendStatus != null and po.sendStatus != ''">
|
||||
send_status = #{po.sendStatus},
|
||||
</if>
|
||||
<if test="po.sendTime != null and po.sendTime != ''">
|
||||
send_time = #{po.sendTime},
|
||||
</if>
|
||||
<if test="po.salaryTemplate != null and po.salaryTemplate != ''">
|
||||
salary_template = #{po.salaryTemplate}
|
||||
</if>
|
||||
</set>
|
||||
|
||||
WHERE
|
||||
|
||||
status IN
|
||||
<foreach collection="statusList" open="(" item="status" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
|
||||
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
AND salary_send_id = #{salarySendId}
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_salary_send_info t
|
||||
WHERE delete_type = 0
|
||||
<if test="param.id != null and param.id != ''">
|
||||
AND id = #{param.id}
|
||||
</if>
|
||||
<if test="param.salarySendId != null and param.salarySendId != ''">
|
||||
AND salary_send_id = #{param.salarySendId}
|
||||
</if>
|
||||
<if test="param.salaryMonth != null and param.salaryMonth != ''">
|
||||
AND salary_month = #{param.salaryMonth}
|
||||
</if>
|
||||
<if test="param.salaryAcctRecordId != null and param.salaryAcctRecordId != ''">
|
||||
AND salary_acct_record_id = #{param.salaryAcctRecordId}
|
||||
</if>
|
||||
<if test="param.employeeId != null and param.employeeId != ''">
|
||||
AND employee_id = #{param.employeeId}
|
||||
</if>
|
||||
<if test="param.taxAgentId != null and param.taxAgentId != ''">
|
||||
AND tax_agent_id = #{param.taxAgentId}
|
||||
</if>
|
||||
<if test="param.sendStatus != null and param.sendStatus != ''">
|
||||
AND send_status = #{param.sendStatus}
|
||||
</if>
|
||||
<if test="param.sendTime != null and param.sendTime != ''">
|
||||
AND send_time = #{param.sendTime}
|
||||
</if>
|
||||
<if test="param.salaryTemplate != null and param.salaryTemplate != ''">
|
||||
AND salary_template = #{param.salaryTemplate}
|
||||
</if>
|
||||
<if test="param.creator != null and param.creator != ''">
|
||||
AND creator = #{param.creator}
|
||||
</if>
|
||||
<if test="param.createTime != null and param.createTime != ''">
|
||||
AND create_time = #{param.createTime}
|
||||
</if>
|
||||
<if test="param.updateTime != null and param.updateTime != ''">
|
||||
AND update_time = #{param.updateTime}
|
||||
</if>
|
||||
<if test="param.deleteType != null and param.deleteType != ''">
|
||||
AND delete_type = #{param.deleteType}
|
||||
</if>
|
||||
<if test="param.tenantKey != null and param.tenantKey != ''">
|
||||
AND tenant_key = #{param.tenantKey}
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryitem.po.SalaryItemPO">
|
||||
UPDATE hrsa_salary_send_info
|
||||
<set>
|
||||
<if test="salarySendId != null">
|
||||
salary_send_id=#{salarySendId},
|
||||
</if>
|
||||
<if test="salaryMonth != null">
|
||||
salary_month=#{salaryMonth},
|
||||
</if>
|
||||
<if test="useType != null">
|
||||
use_type=#{useType},
|
||||
</if>
|
||||
<if test="salaryAcctRecordId != null">
|
||||
salary_acct_record_id=#{salaryAcctRecordId},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="sendStatus != null">
|
||||
send_status=#{sendStatus},
|
||||
</if>
|
||||
<if test="sendTime != null">
|
||||
send_time=#{sendTime},
|
||||
</if>
|
||||
<if test="salaryTemplate != null">
|
||||
salary_template=#{salaryTemplate},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -55,5 +55,5 @@ public interface SalarySendMapper {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<SalarySendPO> listSome(@Param("param") SalarySendPO params);
|
||||
List<SalarySendPO> listSome(SalarySendPO params);
|
||||
}
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
<?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.weaver.hrm.salary.dao.SalarySendMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryBill.po.SalarySendPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="salary_month" property="salaryMonth"/>
|
||||
<result column="salary_accounting_id" property="salaryAccountingId"/>
|
||||
<result column="salary_sob_id" property="salarySobId"/>
|
||||
<result column="send_num" property="sendNum"/>
|
||||
<result column="send_total" property="sendTotal"/>
|
||||
<result column="last_send_time" property="lastSendTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="salarySendColumn">
|
||||
t1.id,
|
||||
t2.salary_month AS salaryYearMonth,
|
||||
t3.name AS salarySob,
|
||||
t3.id AS salarySobId,
|
||||
t1.send_num,
|
||||
t1.send_total,
|
||||
t1.last_send_time,
|
||||
t2.acct_times
|
||||
</sql>
|
||||
|
||||
<sql id="paramSql">
|
||||
<!-- 薪资所属月 -->
|
||||
<if test="param.salaryMonth != null">
|
||||
<if test="param.salaryMonth.size() == 1">
|
||||
AND t2.salary_month = #{param.salaryMonth[0]}
|
||||
</if>
|
||||
<if test="param.salaryMonth.size() == 2">
|
||||
AND (t2.salary_month BETWEEN #{param.salaryMonth[0]} AND #{param.salaryMonth[1]})
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="list" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalarySendListDTO">
|
||||
SELECT
|
||||
<include refid="salarySendColumn"/>
|
||||
FROM
|
||||
hrsa_salary_send t1
|
||||
LEFT JOIN hrsa_salary_acct_record t2 ON t2.id = t1.salary_accounting_id
|
||||
LEFT JOIN hrsa_salary_sob t3 ON t3.id = t2.salary_sob_id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND t2.delete_type = 0
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
|
||||
<select id="getById" resultType="com.weaver.hrm.salary.entity.salarybill.po.SalarySendPO">
|
||||
SELECT
|
||||
id,
|
||||
salary_month,
|
||||
salary_accounting_id,
|
||||
salary_sob_id,
|
||||
send_num,
|
||||
send_total,
|
||||
last_send_time
|
||||
FROM hrsa_salary_send
|
||||
WHERE delete_type = 0
|
||||
AND id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryitem.po.SalaryItemPO">
|
||||
UPDATE hrsa_salary_send_info
|
||||
<set>
|
||||
<if test="salaryMonth != null">
|
||||
salary_month=#{salaryMonth},
|
||||
</if>
|
||||
<if test="salaryMonth != null">
|
||||
salary_month=#{salaryMonth},
|
||||
</if>
|
||||
<if test="salaryAccountingId != null">
|
||||
salary_accounting_id=#{salaryAccountingId},
|
||||
</if>
|
||||
<if test="salarySobId != null">
|
||||
salary_sob_id=#{salarySobId},
|
||||
</if>
|
||||
<if test="sendNum != null">
|
||||
send_num=#{sendNum},
|
||||
</if>
|
||||
<if test="sendTotal != null">
|
||||
send_total=#{sendTotal},
|
||||
</if>
|
||||
<if test="lastSendTime != null">
|
||||
last_send_time=#{lastSendTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<select id="listSomeWithCondition" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="salarySendColumn"/>
|
||||
FROM
|
||||
hrsa_salary_send t1
|
||||
<where>
|
||||
t1.delete_type = 0
|
||||
<if test="param.sendNum != null and param.sendNum != ''">
|
||||
AND t1.send_num = #{param.sendNum}
|
||||
</if>
|
||||
|
||||
<if test="param.param.sendNum != null and param.param.sendNum != ''">
|
||||
AND t1.send_num = #{param.sendNum}
|
||||
</if>
|
||||
|
||||
<if test="param.salaryAccountingIds != null and param.salaryAccountingIds != ''">
|
||||
t1.salary_sob_id IN
|
||||
<foreach collection="param.salaryAccountingIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.salaryBill.po.SalarySendPO">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_salary_send t
|
||||
WHERE delete_type = 0
|
||||
|
||||
<if test="param.id != null and param.id != ''">
|
||||
AND id = #{param.id}
|
||||
</if>
|
||||
<if test="param.salaryMonth != null and param.salaryMonth != ''">
|
||||
AND salary_month = #{param.salaryMonth}
|
||||
</if>
|
||||
<if test="param.salaryAccountingId != null and param.salaryAccountingId != ''">
|
||||
AND salary_accounting_id = #{param.salaryAccountingId}
|
||||
</if>
|
||||
<if test="param.salaryAcctRecordId != null and param.salaryAcctRecordId != ''">
|
||||
AND salary_acct_record_id = #{param.salaryAcctRecordId}
|
||||
</if>
|
||||
<if test="param.salarySobId != null and param.salarySobId != ''">
|
||||
AND salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
<if test="param.sendNum != null and param.sendNum != ''">
|
||||
AND send_num = #{param.sendNum}
|
||||
</if>
|
||||
<if test="param.sendTotal != null and param.sendTotal != ''">
|
||||
AND send_total = #{param.sendTotal}
|
||||
</if>
|
||||
<if test="param.lastSendTime != null and param.lastSendTime != ''">
|
||||
AND last_send_time = #{param.lastSendTime}
|
||||
</if>
|
||||
<if test="param.creator != null and param.creator != ''">
|
||||
AND creator = #{param.creator}
|
||||
</if>
|
||||
<if test="param.createTime != null and param.createTime != ''">
|
||||
AND createTime = #{param.createTime}
|
||||
</if>
|
||||
<if test="param.updateTime != null and param.updateTime != ''">
|
||||
AND update_time = #{param.updateTime}
|
||||
</if>
|
||||
<if test="param.deleteType != null and param.deleteType != ''">
|
||||
AND delete_type = #{param.deleteType}
|
||||
</if>
|
||||
<if test="param.tenantKey != null and param.tenantKey != ''">
|
||||
AND tenant_key = #{param.tenantKey}
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -54,7 +54,7 @@ public interface SalaryTemplateMapper {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<SalaryTemplatePO> listSome(@Param("param") SalaryTemplatePO params);
|
||||
List<SalaryTemplatePO> listSome(SalaryTemplatePO params);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?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" >
|
||||
<?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.SalaryTemplateMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="name"/>
|
||||
|
|
@ -43,22 +44,179 @@
|
|||
, t.creator
|
||||
, t.delete_type
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
<select id="getById" resultType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_salary_item t
|
||||
id,
|
||||
name,
|
||||
salary_sob_id,
|
||||
use_type,
|
||||
description,
|
||||
email_status,
|
||||
send_email_id,
|
||||
msg_status,
|
||||
theme,
|
||||
background,
|
||||
text_content,
|
||||
text_content_position,
|
||||
salary_item_null_status,
|
||||
salary_item_zero_status,
|
||||
salary_item_setting,
|
||||
create_time,
|
||||
update_time,
|
||||
creator,
|
||||
delete_type,
|
||||
tenant_key
|
||||
FROM hrsa_salary_template
|
||||
WHERE delete_type = 0
|
||||
AND id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
<sql id="salaryTemplateColumn">
|
||||
t1.id,
|
||||
t1.name,
|
||||
t2.name AS salary_sob,
|
||||
t1.use_type,
|
||||
t1.description
|
||||
</sql>
|
||||
|
||||
<sql id="paramSql">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 模板名称 -->
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND t1.name like CONCAT('%',#{param.name},'%')
|
||||
</if>
|
||||
<!-- 薪资账套 -->
|
||||
<if test="param.salarySobId != null">
|
||||
AND t1.salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="oracle">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND t1.name like '%'||#{param.name}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.salarySobId != null">
|
||||
AND t1.salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="sqlserver">
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND t1.name like '%'+#{param.name}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.salarySobId != null">
|
||||
AND t1.salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_salary_template t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
<include refid="salaryTemplateColumn"/>
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND t2.delete_type = 0
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO" databaseId="oracle">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
t1.name,
|
||||
t2.name AS salary_sob,
|
||||
t1.use_type,
|
||||
t1.description
|
||||
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND t2.delete_type = 0
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND t1.name like '%'||#{param.name}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.salarySobId != null">
|
||||
AND t1.salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
t1.name,
|
||||
t2.name AS salary_sob,
|
||||
t1.use_type,
|
||||
t1.description
|
||||
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND t2.delete_type = 0
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND t1.name like '%'+#{param.name}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.salarySobId != null">
|
||||
AND t1.salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
|
||||
<update id="deleteByIds">
|
||||
UPDATE hrsa_salary_template
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
|
||||
|
|
@ -90,9 +248,6 @@
|
|||
<if test="msgStatus != null and msgStatus != ''">
|
||||
AND msg_status = #{msgStatus}
|
||||
</if>
|
||||
<if test="pattern != null and pattern != ''">
|
||||
AND pattern = #{pattern}
|
||||
</if>
|
||||
<if test="theme != null and theme != ''">
|
||||
AND theme = #{theme}
|
||||
</if>
|
||||
|
|
@ -116,7 +271,7 @@
|
|||
AND salary_item_setting = #{salaryItemSetting}
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
AND createTime = #{createTime}
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null and updateTime != ''">
|
||||
AND update_time = #{updateTime}
|
||||
|
|
@ -130,11 +285,83 @@
|
|||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
<select id="listDefaultTemplates" resultMap="BaseResultMap" >
|
||||
SELECT
|
||||
<include refid="salaryTemplateColumn"/>
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
WHERE
|
||||
t1.delete_type = 0 AND
|
||||
t1.use_type = 1 AND
|
||||
t1.salary_sob_id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
|
||||
UPDATE hrsa_salary_template
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name=#{name},
|
||||
</if>
|
||||
<if test="salarySobId != null">
|
||||
salary_sob_id=#{salarySobId},
|
||||
</if>
|
||||
<if test="useType != null">
|
||||
use_type=#{useType},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description=#{description},
|
||||
</if>
|
||||
<if test="emailStatus != null">
|
||||
email_status=#{emailStatus},
|
||||
</if>
|
||||
<if test="sendEmailId != null">
|
||||
send_email_id=#{sendEmailId},
|
||||
</if>
|
||||
<if test="msgStatus != null">
|
||||
msg_status=#{msgStatus},
|
||||
</if>
|
||||
<if test="theme != null">
|
||||
theme=#{theme},
|
||||
</if>
|
||||
<if test="background != null">
|
||||
background=#{background},
|
||||
</if>
|
||||
<if test="textContent != null">
|
||||
text_content=#{textContent},
|
||||
</if>
|
||||
<if test="textContentPosition != null">
|
||||
text_content_position=#{textContentPosition},
|
||||
</if>
|
||||
<if test="salaryItemNullStatus != null">
|
||||
salary_item_null_status=#{salaryItemNullStatus},
|
||||
</if>
|
||||
<if test="salaryItemSetting != null">
|
||||
salary_item_setting=#{salaryItemSetting},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO"
|
||||
keyProperty="id" keyColumn="id" useGeneratedKeys="true"
|
||||
>
|
||||
INSERT INTO hrsa_salary_item
|
||||
INSERT INTO hrsa_salary_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="id != null">
|
||||
|
|
@ -205,38 +432,50 @@
|
|||
<if test="name != null">
|
||||
#{name},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code},
|
||||
<if test="salarySobId != null">
|
||||
#{salarySobId},
|
||||
</if>
|
||||
<if test="systemType != null">
|
||||
#{systemType},
|
||||
</if>
|
||||
<if test="sysSalaryItemId != null">
|
||||
#{sysSalaryItemId},
|
||||
</if>
|
||||
<if test="useDefault != null">
|
||||
#{useDefault},
|
||||
</if>
|
||||
<if test="useInEmployeeSalary != null">
|
||||
#{useInEmployeeSalary},
|
||||
</if>
|
||||
<if test="roundingMode != null">
|
||||
#{roundingMode},
|
||||
</if>
|
||||
<if test="pattern != null">
|
||||
#{pattern},
|
||||
</if>
|
||||
<if test="valueType != null">
|
||||
#{valueType},
|
||||
</if>
|
||||
<if test="formulaId != null">
|
||||
#{formulaId},
|
||||
<if test="useType != null">
|
||||
#{useType},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description},
|
||||
</if>
|
||||
<if test="canEdit != null">
|
||||
#{canEdit},
|
||||
<if test="emailStatus != null">
|
||||
#{emailStatus},
|
||||
</if>
|
||||
<if test="sendEmailId != null">
|
||||
#{sendEmailId},
|
||||
</if>
|
||||
<if test="msgStatus != null">
|
||||
#{msgStatus},
|
||||
</if>
|
||||
<if test="theme != null">
|
||||
#{theme},
|
||||
</if>
|
||||
<if test="background != null">
|
||||
#{background},
|
||||
</if>
|
||||
<if test="textContent != null">
|
||||
#{textContent},
|
||||
</if>
|
||||
<if test="textContentPosition != null">
|
||||
#{textContentPosition},
|
||||
</if>
|
||||
<if test="salaryItemNullStatus != null">
|
||||
#{salaryItemNullStatus},
|
||||
</if>
|
||||
<if test="salaryItemZeroStatus != null">
|
||||
#{salaryItemZeroStatus},
|
||||
</if>
|
||||
<if test="salaryItemSetting != null">
|
||||
#{salaryItemSetting},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
|
|
@ -247,323 +486,9 @@
|
|||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryitem.po.SalaryItemPO">
|
||||
UPDATE hrsa_salary_template
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name=#{name},
|
||||
</if>
|
||||
<if test="salarySobId != null">
|
||||
salary_sob_id=#{salarySobId},
|
||||
</if>
|
||||
<if test="useType != null">
|
||||
use_type=#{useType},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description=#{description},
|
||||
</if>
|
||||
<if test="emailStatus != null">
|
||||
email_status=#{emailStatus},
|
||||
</if>
|
||||
<if test="sendEmailId != null">
|
||||
send_email_id=#{sendEmailId},
|
||||
</if>
|
||||
<if test="msgStatus != null">
|
||||
msg_status=#{msgStatus},
|
||||
</if>
|
||||
<if test="theme != null">
|
||||
theme=#{theme},
|
||||
</if>
|
||||
<if test="background != null">
|
||||
background=#{background},
|
||||
</if>
|
||||
<if test="background != null">
|
||||
background=#{background},
|
||||
</if>
|
||||
<if test="textContent != null">
|
||||
text_content=#{textContent},
|
||||
</if>
|
||||
<if test="textContentPosition != null">
|
||||
text_content_position=#{textContentPosition},
|
||||
</if>
|
||||
<if test="salaryItemNullStatus != null">
|
||||
salary_item_null_status=#{salaryItemNullStatus},
|
||||
</if>
|
||||
<if test="salaryItemSetting != null">
|
||||
salary_item_setting=#{salaryItemSetting},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete" parameterType="com.engine.salary.entity.salaryitem.po.SalaryItemPO">
|
||||
UPDATE hrsa_salary_item
|
||||
SET delete_type=1
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO hrsa_salary_item
|
||||
( name, code, system_type, sys_salary_item_id, use_default, use_in_employee_salary,
|
||||
rounding_mode, pattern, value_type, formula_id, description, can_edit, create_time,
|
||||
update_time, creator, delete_type, tenant_key, data_type)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(#{item.name}, #{item.code}, #{item.systemType}, #{item.sysSalaryItemId},
|
||||
#{item.useDefault}, #{item.useInEmployeeSalary}, #{item.roundingMode},
|
||||
#{item.pattern},
|
||||
#{item.valueType}, #{item.formulaId}, #{item.description}, #{item.canEdit},
|
||||
#{item.createTime}, #{item.updateTime}, #{item.creator}, 0, #{item.tenantKey}, #{item.dataType})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="oracle">
|
||||
INSERT INTO hrsa_salary_item
|
||||
(name, code, system_type, sys_salary_item_id, use_default, use_in_employee_salary,
|
||||
rounding_mode, pattern, value_type, formula_id, description, can_edit, create_time,
|
||||
update_time, creator, delete_type, tenant_key, data_type)
|
||||
|
||||
<foreach collection="collection" item="item" separator="union all">
|
||||
select #{item.name}, #{item.code}, #{item.systemType}, #{item.sysSalaryItemId},
|
||||
#{item.useDefault}, #{item.useInEmployeeSalary}, #{item.roundingMode},
|
||||
#{item.pattern},
|
||||
#{item.valueType}, #{item.formulaId}, #{item.description}, #{item.canEdit},
|
||||
#{item.createTime}, #{item.updateTime}, #{item.creator}, 0, #{item.tenantKey, #{item.dataType}} from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
INSERT INTO hrsa_salary_item
|
||||
(name, code, system_type, sys_salary_item_id, use_default, use_in_employee_salary,
|
||||
rounding_mode, pattern, value_type, formula_id, description, can_edit, create_time,
|
||||
update_time, creator, delete_type, tenant_key, data_type)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(#{item.name}, #{item.code}, #{item.systemType}, #{item.sysSalaryItemId},
|
||||
#{item.useDefault}, #{item.useInEmployeeSalary}, #{item.roundingMode},
|
||||
#{item.pattern},
|
||||
#{item.valueType}, #{item.formulaId}, #{item.description}, #{item.canEdit},
|
||||
#{item.createTime}, #{item.updateTime}, #{item.creator}, 0, #{item.tenantKey}, #{item.dataType})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="deleteByIds">
|
||||
UPDATE hrsa_salary_item
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="listByParam" resultType="com.engine.salary.entity.salaryitem.po.SalaryItemPO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM
|
||||
hrsa_salary_item t
|
||||
WHERE
|
||||
delete_type = 0
|
||||
<include refid="paramSql"/>
|
||||
</select>
|
||||
|
||||
<sql id="paramSql">
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND name like CONCAT('%',#{param.name},'%')
|
||||
</if>
|
||||
<if test="param.description != null and param.description != ''">
|
||||
AND description like CONCAT('%',#{param.description},'%')
|
||||
</if>
|
||||
<if test="param.excludeIds != null and param.excludeIds.size()>0">
|
||||
AND id NOT IN
|
||||
<foreach collection="param.excludeIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.useInEmployeeSalary != null">
|
||||
AND use_in_employee_salary = #{param.useInEmployeeSalary}
|
||||
</if>
|
||||
<if test="param.useDefault != null">
|
||||
AND use_default = #{param.useDefault}
|
||||
</if>
|
||||
<if test="param.valueType != null">
|
||||
AND value_type = #{param.valueType}
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="oracle">
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND name like '%'||#{param.name}||'%'
|
||||
</if>
|
||||
<if test="param.description != null">
|
||||
AND description like '%'||#{param.description}||'%'
|
||||
</if>
|
||||
<if test="param.excludeIds != null and param.excludeIds.size()>0">
|
||||
AND id NOT IN
|
||||
<foreach collection="param.excludeIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.useInEmployeeSalary != null">
|
||||
AND use_in_employee_salary = #{param.useInEmployeeSalary}
|
||||
</if>
|
||||
<if test="param.useDefault != null">
|
||||
AND use_default = #{param.useDefault}
|
||||
</if>
|
||||
<if test="param.valueType != null">
|
||||
AND value_type = #{param.valueType}
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="sqlserver">
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND name like '%'+#{param.name}+'%'
|
||||
</if>
|
||||
<if test="param.description != null and param.description != ''">
|
||||
AND description like '%'+#{param.description}+'%'
|
||||
</if>
|
||||
<if test="param.excludeIds != null and param.excludeIds.size()>0">
|
||||
AND id NOT IN
|
||||
<foreach collection="param.excludeIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.useInEmployeeSalary != null">
|
||||
AND use_in_employee_salary = #{param.useInEmployeeSalary}
|
||||
</if>
|
||||
<if test="param.useDefault != null">
|
||||
AND use_default = #{param.useDefault}
|
||||
</if>
|
||||
<if test="param.valueType != null">
|
||||
AND value_type = #{param.valueType}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="list" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalaryTemplateListDTO">
|
||||
SELECT
|
||||
<include refid="salaryTemplateColumn"/>
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND t2.delete_type = 0
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
<select id="list" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalaryTemplateListDTO" databaseId="oracle">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
t1.name,
|
||||
t2.name AS salary_sob,
|
||||
t1.use_type,
|
||||
t1.description
|
||||
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND t2.delete_type = 0
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND t1.name like '%'||#{param.name}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.salarySobId != null">
|
||||
AND t1.salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
<select id="list" resultType="com.weaver.hrm.salary.entity.salarybill.dto.SalaryTemplateListDTO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
t1.name,
|
||||
t2.name AS salary_sob,
|
||||
t1.use_type,
|
||||
t1.description
|
||||
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND t2.delete_type = 0
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t1.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="param.name != null and param.name != ''">
|
||||
AND t1.name like '%'+#{param.name}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.salarySobId != null">
|
||||
AND t1.salary_sob_id = #{param.salarySobId}
|
||||
</if>
|
||||
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<update id="deleteByIds">
|
||||
UPDATE hrsa_salary_template
|
||||
SET delete_type = 1
|
||||
WHERE tenant_key = #{tenantKey} AND delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="listDefaultTemplates" resultMap="BaseResultMap" >
|
||||
SELECT
|
||||
<include refid="salaryTemplateColumn"/>
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
WHERE
|
||||
t1.delete_type = 0 AND
|
||||
t1.use_type = 1 AND
|
||||
t1.salary_sob_id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
ORDER BY t1.salary_sob_id,t1.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ import com.engine.salary.enums.salarybill.SalaryTemplateWhetherEnum;
|
|||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.SalarySobItemService;
|
||||
import com.engine.salary.service.SalaryTemplateService;
|
||||
import com.mzlion.core.utils.BeanUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -181,7 +182,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
salaryTemplateNew.setSalaryItemNullStatus(saveParam.getSalaryItemNullStatus()?1:0);
|
||||
salaryTemplateNew.setSalaryItemZeroStatus(saveParam.getSalaryItemZeroStatus()?1:0);
|
||||
// todo 薪资项目设置检查校验
|
||||
salaryTemplateNew.setSalaryItemSetting(JSONUtil.toJsonStr(saveParam.getSalaryItemSetting()));
|
||||
salaryTemplateNew.setSalaryItemSetting(saveParam.getSalaryItemSetting() != null ? JSONUtil.toJsonStr(saveParam.getSalaryItemSetting()) : "");
|
||||
mapper.updateById(salaryTemplateNew);
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordUpdateSingleLog(salaryTemplateLoggerTemplate,
|
||||
|
|
@ -213,6 +214,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
|
||||
SalaryTemplatePO salaryTemplateNew = new SalaryTemplatePO();
|
||||
BeanUtils.copyProperties(salaryTemplate, salaryTemplateNew);
|
||||
salaryTemplateNew.setId(null);
|
||||
salaryTemplateNew.setName(copyParam.getName());
|
||||
salaryTemplateNew.setUseType(SalaryTemplateWhetherEnum.FALSE.getValue());
|
||||
// salaryTemplateNew.setId(IdGenerator.generate());
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.web;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.constant.SalrayCheckSecondAuthConstant;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalarySendBaseInfoDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateBaseFormDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSalaryItemSetListDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateShowFormDTO;
|
||||
import com.engine.salary.entity.salaryBill.param.*;
|
||||
|
|
@ -66,7 +67,7 @@ public class SalaryBillController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getBaseForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("id") Long id) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, Map<String, Object>>().run(getSalaryTemplateWrapper(user)::getBaseForm, id);
|
||||
return new ResponseResult<Long, SalaryTemplateBaseFormDTO>().run(getSalaryTemplateWrapper(user)::getBaseForm, id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue