工资单发放-工资单发放信息列表
This commit is contained in:
parent
87ef976b7c
commit
775b39074d
|
|
@ -29,4 +29,6 @@ public @interface SalaryTableColumn {
|
|||
|
||||
String transmethod() default "";
|
||||
|
||||
// 额外参数
|
||||
String otherPara() default "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,9 +96,14 @@ public class SalaryWeaTable<T> extends WeaTable {
|
|||
boolean display = columnAnn.display();
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn(width, text, column, orderkey);
|
||||
String transmethod = columnAnn.transmethod();
|
||||
|
||||
if (StringUtils.isNotBlank(transmethod)) {
|
||||
weaTableColumn.setTransmethod(transmethod);
|
||||
}
|
||||
String otherPara = columnAnn.otherPara();
|
||||
if(StringUtils.isNotBlank(otherPara)) {
|
||||
weaTableColumn.setOtherpara(otherPara);
|
||||
}
|
||||
if (!display) {
|
||||
weaTableColumn.setDisplay(WeaBoolAttr.FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,18 +76,21 @@ public class SalarySendListDTO {
|
|||
|
||||
// @ApiModelProperty("工资单模板Id")
|
||||
// 工资单模板Id
|
||||
@SalaryTableColumn(text = "工资单模板id", width = "0%", column = "templateId", display = false)
|
||||
private Long templateId;
|
||||
|
||||
/**
|
||||
* 已发送数量
|
||||
*/
|
||||
// @JsonIgnore
|
||||
@SalaryTableColumn(text = "已发送数量", width = "0%", column = "sendNum", display = false)
|
||||
private Integer sendNum;
|
||||
|
||||
/**
|
||||
* 发送总数
|
||||
*/
|
||||
// @JsonIgnore
|
||||
@SalaryTableColumn(text = "发送总数", width = "0%", column = "sendTotal", display = false)
|
||||
private Integer sendTotal;
|
||||
|
||||
// @ApiModelProperty("已发放")
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ import java.util.List;
|
|||
@AllArgsConstructor
|
||||
public class SalarySendQueryParam extends BaseQueryParam {
|
||||
|
||||
private List<YearMonth> salaryYearMonth;
|
||||
private List<String> salaryYearMonth;
|
||||
|
||||
@JsonIgnore
|
||||
private List<LocalDate> salaryMonth;
|
||||
private List<String> salaryMonth;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class SalarySendInfoPO {
|
|||
* 薪资所属月
|
||||
*/
|
||||
// @ElogTransform(name = "薪资所属月")
|
||||
private LocalDate salaryMonth;
|
||||
private Date salaryMonth;
|
||||
|
||||
/**
|
||||
* 薪资核算表的主键id
|
||||
|
|
|
|||
|
|
@ -0,0 +1,835 @@
|
|||
<?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.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.lastname,
|
||||
t2.name AS tax_agent,
|
||||
d.departmentname AS department,
|
||||
e.mobile,
|
||||
e.workcode,
|
||||
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.lastname like CONCAT('%',#{param.keyword},'%')
|
||||
</if>
|
||||
<!-- 姓名 -->
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.lastname 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.lastname like '%'||#{param.keyword}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.lastname 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.lastname like '%'+#{param.keyword}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.lastname 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.engine.salary.entity.salaryBill.dto.SalarySendInfoListDTO">
|
||||
SELECT
|
||||
<include refid="salarySendInfoColumn"/>
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN hrmresource e ON e.id = t1.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.DEPARTMENTID
|
||||
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.engine.salary.entity.salaryBill.dto.SalarySendInfoListDTO" databaseId="oracle">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.lastname,
|
||||
t2.name AS tax_agent,
|
||||
d.departmentname AS department,
|
||||
e.mobile,
|
||||
e.workcode,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN hrmresource e ON e.id = t1.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.DEPARTMENTID
|
||||
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.lastname like '%'||#{param.keyword}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.lastname 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.engine.salary.entity.salaryBill.dto.SalarySendInfoListDTO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.lastname,
|
||||
t2.name AS tax_agent,
|
||||
d.departmentname AS department,
|
||||
e.mobile,
|
||||
e.workcode,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN hrmresource e ON e.id = t1.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.DEPARTMENTID
|
||||
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.lastname like '%'+#{param.keyword}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.lastname 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.engine.salary.entity.salaryBill.dto.SalarySendDetailListDTO">
|
||||
SELECT
|
||||
<include refid="salarySendInfoColumn"/>
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN hrmresource e ON e.id = t1.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.DEPARTMENTID
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
<!-- 合并计税 todo -->
|
||||
<if test="param.mergeCountTax != null">
|
||||
|
||||
</if>
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.id DESC
|
||||
</select>
|
||||
<select id="detailList" resultType="com.engine.salary.entity.salaryBill.dto.SalarySendDetailListDTO" databaseId="oracle">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.lastname,
|
||||
t2.name AS tax_agent,
|
||||
d.departmentname AS department,
|
||||
e.mobile,
|
||||
e.workcode,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN hrmresource e ON e.id = t1.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.DEPARTMENTID
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
|
||||
|
||||
<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.lastname like '%'||#{param.keyword}||'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.lastname 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.engine.salary.entity.salaryBill.dto.SalarySendDetailListDTO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
||||
t1.id,
|
||||
e.lastname,
|
||||
t2.name AS tax_agent,
|
||||
d.departmentname AS department,
|
||||
e.mobile,
|
||||
e.workcode,
|
||||
t1.send_status,
|
||||
t1.employee_id,
|
||||
t1.salary_month,
|
||||
e.email
|
||||
|
||||
FROM
|
||||
hrsa_salary_send_info t1
|
||||
LEFT JOIN hrmresource e ON e.id = t1.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.DEPARTMENTID
|
||||
LEFT JOIN hrsa_tax_agent t2 ON t2.id = t1.tax_agent_id
|
||||
WHERE
|
||||
t1.delete_type = 0
|
||||
|
||||
<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.lastname like '%'+#{param.keyword}+'%'
|
||||
</if>
|
||||
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND e.lastname 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.engine.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>
|
||||
|
|
@ -65,5 +65,5 @@ public interface SalaryTemplateMapper {
|
|||
/**
|
||||
* 查询默认模板
|
||||
*/
|
||||
List<SalaryTemplatePO> listDefaultTemplates(List<Long> ids);
|
||||
List<SalaryTemplatePO> listDefaultTemplates(@Param("ids")List<Long> ids);
|
||||
}
|
||||
|
|
@ -287,17 +287,19 @@
|
|||
|
||||
<select id="listDefaultTemplates" resultMap="BaseResultMap" >
|
||||
SELECT
|
||||
<include refid="salaryTemplateColumn"/>
|
||||
<include refid="baseColumns"/>
|
||||
FROM
|
||||
hrsa_salary_template t1
|
||||
hrsa_salary_template t
|
||||
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
|
||||
t.delete_type = 0 AND
|
||||
t.use_type = 1 AND
|
||||
t.salary_sob_id IN
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY t.salary_sob_id,t.id DESC
|
||||
</select>
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
|
|
|
|||
|
|
@ -230,13 +230,13 @@ public class SalaryBillController {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
// @GET
|
||||
// @Path("/send/getInfoSearchCondition")
|
||||
// @Produces(MediaType.APPLICATION_JSON)
|
||||
// public String getInfoSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
// User user = HrmUserVarify.getUser(request, response);
|
||||
// return new ResponseResult<>().run(getSalarySendWrapper(user)::getInfoSearchCondition);
|
||||
// }
|
||||
@GET
|
||||
@Path("/send/getInfoSearchCondition")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getInfoSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<>().run(getSalarySendWrapper(user)::getInfoSearchCondition);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工资单发放信息列表
|
||||
|
|
@ -257,13 +257,13 @@ public class SalaryBillController {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
// @POST
|
||||
// @Path("/send/exportInfoList")
|
||||
// @Produces(MediaType.APPLICATION_JSON)
|
||||
// public String exportInfoList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendInfoQueryParam queryParam) {
|
||||
// User user = HrmUserVarify.getUser(request, response);
|
||||
// return new ResponseResult<SalarySendInfoQueryParam, Map<String, Object>>().run(getSalarySendWrapper(user)::exportInfoList, queryParam);
|
||||
// }
|
||||
@POST
|
||||
@Path("/send/exportInfoList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String exportInfoList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendInfoQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalarySendInfoQueryParam, Map<String, Object>>().run(getSalarySendWrapper(user)::exportInfoList, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工资单批量发放信息列表
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ public class SalaryArchiveWrapper extends Service {
|
|||
}
|
||||
|
||||
public Map<String,Object> searchCondition() {
|
||||
List<Map<String, String>> userStatus = UserStatusEnum.getList();
|
||||
List<Map<String, String>> userStatus = UserStatusEnum.getList();
|
||||
List<Map<String, String>> itemAdjustReasons = SalaryArchiveItemAdjustReasonEnum.getList();
|
||||
List<Map<String, String>> TaxAgentAdjustReason = SalaryArchiveTaxAgentAdjustReasonEnum.getList();
|
||||
Collection<TaxAgent> taxAgentList = getTaxAgentService(user).findAll();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.api.browser.util.ConditionFactory;
|
||||
import com.api.browser.util.ConditionType;
|
||||
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
||||
|
|
@ -7,6 +12,7 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
|||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.entity.salaryBill.dto.*;
|
||||
import com.engine.salary.entity.salaryBill.param.*;
|
||||
|
|
@ -14,6 +20,8 @@ import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
|||
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
||||
import com.engine.salary.entity.salaryarchive.bo.SalaryArchiveBO;
|
||||
import com.engine.salary.entity.salaryarchive.dto.TaxAgentListDTO;
|
||||
import com.engine.salary.entity.taxrate.TaxAgent;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.salarybill.SalarySendStatusEnum;
|
||||
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -25,14 +33,17 @@ import com.engine.salary.service.impl.SalarySendServiceImpl;
|
|||
import com.engine.salary.service.impl.SalaryTemplateServiceImpl;
|
||||
import com.engine.salary.service.impl.TaxAgentServiceImpl;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.DBType;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.PageUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.springframework.stereotype.Component;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.hrm.User;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
|
@ -57,6 +68,9 @@ public class SalarySendWrapper extends Service {
|
|||
return ServiceUtil.getService(SalaryTemplateServiceImpl.class, user);
|
||||
}
|
||||
|
||||
// private SalaryBatchService getSalaryBatchService(User user) {
|
||||
// }
|
||||
|
||||
|
||||
// @Resource
|
||||
// private SalaryBatchService salaryBatchService;
|
||||
|
|
@ -74,7 +88,7 @@ public class SalarySendWrapper extends Service {
|
|||
Map<String, Object> datas = new HashMap<>(16);
|
||||
try {
|
||||
queryParam.setSalaryMonth(
|
||||
queryParam.getSalaryYearMonth().stream().map(m -> m.atDay(1)).collect(Collectors.toList()));
|
||||
queryParam.getSalaryYearMonth().stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
|
||||
SalarySendMapper salarySendMapper = sqlSession.getMapper(SalarySendMapper.class);
|
||||
PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
|
|
@ -83,18 +97,19 @@ public class SalarySendWrapper extends Service {
|
|||
List<SalarySendListDTO> pageList = pageInfo.getList();
|
||||
List<Long> salarySobIds = pageList.stream().map(SalarySendListDTO::getSalarySobId).distinct().collect(Collectors.toList());
|
||||
// 获取默认模板
|
||||
List<SalaryTemplatePO> salaryTemplates = getSalaryTemplateService(user).getDefaultTemplates(salarySobIds);
|
||||
pageList.forEach(e -> {
|
||||
// 已发放
|
||||
e.setSendSituation(e.getSendNum() + "/" + e.getSendTotal());
|
||||
// 工资单模板
|
||||
Optional<SalaryTemplatePO> optional = salaryTemplates.stream().filter(s -> s.getSalarySobId().equals(e.getSalarySobId())).findFirst();
|
||||
if (optional.isPresent()) {
|
||||
e.setTemplate(optional.get().getName());
|
||||
e.setTemplateId(optional.get().getId());
|
||||
}
|
||||
});
|
||||
|
||||
if(salarySobIds.size() > 0) {
|
||||
List<SalaryTemplatePO> salaryTemplates = getSalaryTemplateService(user).getDefaultTemplates(salarySobIds);
|
||||
pageList.forEach(e -> {
|
||||
// 已发放
|
||||
e.setSendSituation(e.getSendNum() + "/" + e.getSendTotal());
|
||||
// 工资单模板
|
||||
Optional<SalaryTemplatePO> optional = salaryTemplates.stream().filter(s -> s.getSalarySobId().equals(e.getSalarySobId())).findFirst();
|
||||
if (optional.isPresent()) {
|
||||
e.setTemplate(optional.get().getName());
|
||||
e.setTemplateId(optional.get().getId());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<WeaTableColumn> columns = buildWeaTableColumns();
|
||||
WeaTable table = new WeaTable();
|
||||
|
|
@ -112,18 +127,18 @@ public class SalarySendWrapper extends Service {
|
|||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
||||
|
||||
datas.put("pageInfo", pageInfo);
|
||||
datas.put("datas", pageList);
|
||||
datas.put("columns", columns);
|
||||
datas.put("dataKey",result.getResultMap());
|
||||
return datas;
|
||||
}finally {
|
||||
}catch(Exception e) {
|
||||
throw new SalaryRunTimeException(e.getMessage());
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建表展示字段
|
||||
* @return
|
||||
|
|
@ -140,8 +155,6 @@ public class SalarySendWrapper extends Service {
|
|||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 工资单发放基本信息
|
||||
*
|
||||
|
|
@ -157,23 +170,91 @@ public class SalarySendWrapper extends Service {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
// public Map<String, Object> getInfoSearchCondition() {
|
||||
// List<WeaSearchConditionOption> taxAgentList = new ArrayList<>();
|
||||
// // 获取所有个税扣缴义务人
|
||||
// Collection<TaxAgentListDTO> taxAgentLists = taxAgentService.findAll(tenantKey);
|
||||
// taxAgentLists.forEach(e -> taxAgentList.add(new WeaSearchConditionOption(e.getId().toString(), e.getName())));
|
||||
//
|
||||
// WeaSearchCondition weaSearchCondition = SalaryFormatUtil.<SalarySendInfoSearchConditionDTO>getInstance()
|
||||
// .buildCondition(SalarySendInfoSearchConditionDTO.class,
|
||||
// SalarySendInfoSearchConditionDTO.builder().taxAgentOptions(taxAgentList).build(),
|
||||
// "salarySendInfo");
|
||||
// // 入职日期-添加范围
|
||||
// SalaryArchiveBO.addDatePickerRangeOtherParams(weaSearchCondition, "hiredate", employeeId, tenantKey);
|
||||
// // 只保留常用条件
|
||||
// weaSearchCondition.setGroups(weaSearchCondition.getGroups().stream().filter(e -> "commonGroup".equals(e.getId())).collect(Collectors.toList()));
|
||||
//
|
||||
// return weaSearchCondition;
|
||||
// }
|
||||
public Map<String, Object> getInfoSearchCondition() {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
ConditionFactory conditionFactory = new ConditionFactory(user);
|
||||
|
||||
//条件组
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<SearchConditionGroup>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<SearchConditionItem>();
|
||||
|
||||
//文本输入框
|
||||
SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT,25034, "username");
|
||||
username.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
username.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
username.setLabelcol(8);
|
||||
username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
username.setLabel("姓名"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(username);
|
||||
|
||||
// 个税扣缴义务人
|
||||
SearchConditionItem taxAgent = conditionFactory.createCondition(ConditionType.SELECT,25034, "taxAgent");
|
||||
taxAgent.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
taxAgent.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
taxAgent.setLabelcol(8);
|
||||
List<SearchConditionOption> searchConditionOptions = new ArrayList<>();
|
||||
Collection<TaxAgent> taxAgentLists = getTaxAgentService(user).findAll();
|
||||
taxAgentLists.forEach(e -> searchConditionOptions.add(new SearchConditionOption(e.getId().toString(), e.getName())));
|
||||
taxAgent.setOptions(searchConditionOptions);
|
||||
taxAgent.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
taxAgent.setLabel("个税扣缴义务人"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(taxAgent);
|
||||
|
||||
// 部门
|
||||
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER,502227,"department","4");
|
||||
departmentName.setColSpan(2);
|
||||
departmentName.setFieldcol(12);
|
||||
departmentName.setLabelcol(8);
|
||||
departmentName.setViewAttr(2);
|
||||
departmentName.setIsQuickSearch(false);
|
||||
departmentName.setLabel("部门");
|
||||
conditionItems.add(departmentName);
|
||||
|
||||
// 岗位
|
||||
SearchConditionItem position = conditionFactory.createCondition(ConditionType.BROWSER,502227,"position","24");
|
||||
position.setColSpan(2);
|
||||
position.setFieldcol(12);
|
||||
position.setLabelcol(8);
|
||||
position.setViewAttr(2);
|
||||
position.setIsQuickSearch(false);
|
||||
position.setLabel("岗位");
|
||||
conditionItems.add(position);
|
||||
|
||||
//状态
|
||||
SearchConditionItem status = conditionFactory.createCondition(ConditionType.SELECT,25034, "taxAgent");
|
||||
status.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
status.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
status.setLabelcol(8);
|
||||
List<SearchConditionOption> userStatusOptions = new ArrayList<>();
|
||||
UserStatusEnum.getList().forEach(e -> userStatusOptions.add(new SearchConditionOption(e.get("id"), e.get("content"))));
|
||||
status.setOptions(userStatusOptions);
|
||||
status.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
status.setLabel("状态"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(status);
|
||||
|
||||
//入职日期
|
||||
SearchConditionItem hiredate = conditionFactory.createCondition(ConditionType.DATEPICKER, 25034, "hiredate");
|
||||
hiredate.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
hiredate.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
hiredate.setLabelcol(8);
|
||||
hiredate.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
hiredate.setLabel("入职日期"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(hiredate);
|
||||
|
||||
//合并计税
|
||||
SearchConditionItem mergeCountTax = conditionFactory.createCondition(ConditionType.DATEPICKER, 25034, "mergeCountTax");
|
||||
mergeCountTax.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
mergeCountTax.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
mergeCountTax.setLabelcol(8);
|
||||
mergeCountTax.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
mergeCountTax.setLabel("合并计税"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(mergeCountTax);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("常用条件",true,conditionItems));
|
||||
|
||||
apidatas.put("condition",addGroups);
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工资单发放信息列表
|
||||
|
|
@ -248,24 +329,23 @@ public class SalarySendWrapper extends Service {
|
|||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
// public Map<String, Object> exportInfoList(SalarySendInfoQueryParam queryParam) {
|
||||
// // 构建异步导出参数
|
||||
// Map<String, Object> map = salaryBatchService.buildeExportParam("exportSalarySendInfo");
|
||||
public Map<String, Object> exportInfoList(SalarySendInfoQueryParam queryParam) {
|
||||
// 构建异步导出参数
|
||||
// Map<String, Object> map = getSalaryBatchService(user).buildeExportParam("exportSalarySendInfo");
|
||||
//
|
||||
// String username = UserContext.getCurrentUser().getUsername();
|
||||
// String eteamsId = TenantRpcContext.getEteamsId();
|
||||
// taskExecutor.execute(() -> {
|
||||
// try {
|
||||
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||||
// DSTenantKeyThreadVar.tenantKey.set();
|
||||
// salarySendService.exportInfoList(map, username, eteamsId, queryParam, employeeId, tenantKey);
|
||||
// } finally {
|
||||
// DSTenantKeyThreadVar.tenantKey.remove();
|
||||
// }
|
||||
// });
|
||||
// return map;
|
||||
// // TODO
|
||||
// return null;
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工资单发放
|
||||
|
|
|
|||
Loading…
Reference in New Issue