parent
671e2dd2da
commit
894b9cd1fc
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.api.salary.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Path("/bs/hrmsalary/deductionAmount")
|
||||||
|
public class DeductionAmountController extends com.engine.salary.web.DeductionAmountController {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.engine.salary.entity.deductionamount.param;
|
||||||
|
|
||||||
|
import com.engine.salary.util.valid.DataCheck;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除名单查询参数
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DeductionAmountAddParam {
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税扣缴义务人id
|
||||||
|
*/
|
||||||
|
@DataCheck(require = true, message = "参数错误,个税扣缴义务人id不能为空")
|
||||||
|
private Long taxAgentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税款所属年度
|
||||||
|
*/
|
||||||
|
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送人员ids
|
||||||
|
*/
|
||||||
|
private List<Long> employeeDeclareIds;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.engine.salary.entity.deductionamount.param;
|
||||||
|
|
||||||
|
import com.engine.salary.util.valid.DataCheck;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除名单查询参数
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DeductionAmountConfirmParam {
|
||||||
|
|
||||||
|
// 个税扣缴义务人id
|
||||||
|
@DataCheck(require = true, message = "参数错误,个税扣缴义务人id不能为空")
|
||||||
|
private Long taxAgentId;
|
||||||
|
|
||||||
|
// 税款所属年度
|
||||||
|
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.engine.salary.entity.deductionamount.param;
|
||||||
|
|
||||||
|
import com.engine.salary.util.valid.DataCheck;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除名单查询参数
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DeductionAmountOnlineQueryParam {
|
||||||
|
|
||||||
|
// 个税扣缴义务人id
|
||||||
|
@DataCheck(require = true, message = "参数错误,个税扣缴义务人id不能为空")
|
||||||
|
private Long taxAgentId;
|
||||||
|
|
||||||
|
// 税款所属年度
|
||||||
|
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.engine.salary.entity.deductionamount.param;
|
||||||
|
|
||||||
|
import com.engine.salary.util.valid.DataCheck;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除名单查询参数
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DeductionAmountQueryParam {
|
||||||
|
|
||||||
|
// 个税扣缴义务人id
|
||||||
|
@DataCheck(require = true, message = "参数错误,个税扣缴义务人id不能为空")
|
||||||
|
private Long taxAgentId;
|
||||||
|
|
||||||
|
// 税款所属年度
|
||||||
|
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,128 @@
|
||||||
|
package com.engine.salary.entity.deductionamount.po;
|
||||||
|
|
||||||
|
import com.engine.hrmelog.annotation.ElogTransform;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员报送记录
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
//hrsa_deduction_amount
|
||||||
|
public class DeductionAmountPO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税扣缴义务人ID
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "个税扣缴义务人ID")
|
||||||
|
private Long taxAgentId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税款所属年度
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "税款所属年度")
|
||||||
|
private String year;
|
||||||
|
/**
|
||||||
|
* 人员id
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "人员id")
|
||||||
|
private Long employeeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "姓名")
|
||||||
|
private String employeeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员类型
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "人员类型")
|
||||||
|
private Byte employeeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工号
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "工号")
|
||||||
|
private String jobNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证件号码
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "证件号码")
|
||||||
|
private String cardNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证件类型
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "证件类型")
|
||||||
|
private Byte cardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送状态
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "报送状态")
|
||||||
|
private Byte declareStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否扣除
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "是否扣除")
|
||||||
|
private Byte deductFlag;
|
||||||
|
/**
|
||||||
|
* 是否成功报送过
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "是否成功报送过")
|
||||||
|
private Byte successfullyDeclared;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "创建人id")
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "是否删除")
|
||||||
|
private Integer deleteType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户KEY
|
||||||
|
*/
|
||||||
|
@ElogTransform(name = "租户KEY")
|
||||||
|
private String tenantKey;
|
||||||
|
|
||||||
|
//主键id集合
|
||||||
|
private Collection<Long> ids;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.engine.salary.mapper.deductionamount;
|
||||||
|
|
||||||
|
import com.engine.salary.entity.deductionamount.po.DeductionAmountPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DeductionAmountMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有记录
|
||||||
|
*
|
||||||
|
* @return 返回集合,没有返回空List
|
||||||
|
*/
|
||||||
|
List<DeductionAmountPO> listAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询
|
||||||
|
*
|
||||||
|
* @return 返回集合,没有返回空List
|
||||||
|
*/
|
||||||
|
List<DeductionAmountPO> listSome(DeductionAmountPO deductionAmount);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键查询
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 返回记录,没有返回null
|
||||||
|
*/
|
||||||
|
DeductionAmountPO getById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增,忽略null字段
|
||||||
|
*
|
||||||
|
* @param deductionAmount 新增的记录
|
||||||
|
* @return 返回影响行数
|
||||||
|
*/
|
||||||
|
int insertIgnoreNull(DeductionAmountPO deductionAmount);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改,修改所有字段
|
||||||
|
*
|
||||||
|
* @param deductionAmount 修改的记录
|
||||||
|
* @return 返回影响行数
|
||||||
|
*/
|
||||||
|
int update(DeductionAmountPO deductionAmount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改,忽略null字段
|
||||||
|
*
|
||||||
|
* @param deductionAmount 修改的记录
|
||||||
|
* @return 返回影响行数
|
||||||
|
*/
|
||||||
|
int updateIgnoreNull(DeductionAmountPO deductionAmount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除记录
|
||||||
|
*
|
||||||
|
* @param deductionAmount 待删除的记录
|
||||||
|
* @return 返回影响行数
|
||||||
|
*/
|
||||||
|
int delete(DeductionAmountPO deductionAmount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除记录
|
||||||
|
*
|
||||||
|
* @param ids 主键id集合
|
||||||
|
*/
|
||||||
|
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,345 @@
|
||||||
|
<?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.deductionamount.DeductionAmountMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
|
||||||
|
<result column="card_num" property="cardNum"/>
|
||||||
|
<result column="card_type" property="cardType"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
<result column="declare_status" property="declareStatus"/>
|
||||||
|
<result column="deduct_flag" property="deductFlag"/>
|
||||||
|
<result column="delete_type" property="deleteType"/>
|
||||||
|
<result column="employee_id" property="employeeId"/>
|
||||||
|
<result column="employee_name" property="employeeName"/>
|
||||||
|
<result column="employee_type" property="employeeType"/>
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="job_num" property="jobNum"/>
|
||||||
|
<result column="successfully_declared" property="successfullyDeclared"/>
|
||||||
|
<result column="tax_agent_id" property="taxAgentId"/>
|
||||||
|
<result column="tenant_key" property="tenantKey"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
<result column="year" property="year"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 表字段 -->
|
||||||
|
<sql id="baseColumns">
|
||||||
|
t
|
||||||
|
.
|
||||||
|
card_num
|
||||||
|
, t.card_type
|
||||||
|
, t.create_time
|
||||||
|
, t.creator
|
||||||
|
, t.declare_status
|
||||||
|
, t.deduct_flag
|
||||||
|
, t.delete_type
|
||||||
|
, t.employee_id
|
||||||
|
, t.employee_name
|
||||||
|
, t.employee_type
|
||||||
|
, t.id
|
||||||
|
, t.job_num
|
||||||
|
, t.successfully_declared
|
||||||
|
, t.tax_agent_id
|
||||||
|
, t.tenant_key
|
||||||
|
, t.update_time
|
||||||
|
, t.year
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="listAll" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
FROM hrsa_deduction_amount t
|
||||||
|
WHERE delete_type = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据主键获取单条记录 -->
|
||||||
|
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||||
|
SELECT
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
FROM hrsa_deduction_amount t
|
||||||
|
WHERE id = #{id} AND delete_type = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 条件查询 -->
|
||||||
|
<select id="listSome" resultMap="BaseResultMap"
|
||||||
|
parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
|
||||||
|
SELECT
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
FROM hrsa_deduction_amount t
|
||||||
|
WHERE delete_type = 0
|
||||||
|
<if test="cardNum != null">
|
||||||
|
AND card_num = #{cardNum}
|
||||||
|
</if>
|
||||||
|
<if test="cardType != null">
|
||||||
|
AND card_type = #{cardType}
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
AND create_time = #{createTime}
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
AND creator = #{creator}
|
||||||
|
</if>
|
||||||
|
<if test="declareStatus != null">
|
||||||
|
AND declare_status = #{declareStatus}
|
||||||
|
</if>
|
||||||
|
<if test="deductFlag != null">
|
||||||
|
AND deduct_flag = #{deductFlag}
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
AND delete_type = #{deleteType}
|
||||||
|
</if>
|
||||||
|
<if test="employeeId != null">
|
||||||
|
AND employee_id = #{employeeId}
|
||||||
|
</if>
|
||||||
|
<if test="employeeName != null">
|
||||||
|
AND employee_name = #{employeeName}
|
||||||
|
</if>
|
||||||
|
<if test="employeeType != null">
|
||||||
|
AND employee_type = #{employeeType}
|
||||||
|
</if>
|
||||||
|
<if test="id != null">
|
||||||
|
AND id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="jobNum != null">
|
||||||
|
AND job_num = #{jobNum}
|
||||||
|
</if>
|
||||||
|
<if test="successfullyDeclared != null">
|
||||||
|
AND successfully_declared = #{successfullyDeclared}
|
||||||
|
</if>
|
||||||
|
<if test="taxAgentId != null">
|
||||||
|
AND tax_agent_id = #{taxAgentId}
|
||||||
|
</if>
|
||||||
|
<if test="tenantKey != null">
|
||||||
|
AND tenant_key = #{tenantKey}
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
AND update_time = #{updateTime}
|
||||||
|
</if>
|
||||||
|
<if test="year != null">
|
||||||
|
AND year = #{year}
|
||||||
|
</if>
|
||||||
|
<if test="ids != null and ids.size()>0">
|
||||||
|
AND id IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
ORDER BY id DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 插入不为NULL的字段 -->
|
||||||
|
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
|
||||||
|
INSERT INTO hrsa_deduction_amount
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|
||||||
|
<if test="cardNum != null">
|
||||||
|
card_num,
|
||||||
|
</if>
|
||||||
|
<if test="cardType != null">
|
||||||
|
card_type,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
creator,
|
||||||
|
</if>
|
||||||
|
<if test="declareStatus != null">
|
||||||
|
declare_status,
|
||||||
|
</if>
|
||||||
|
<if test="deductFlag != null">
|
||||||
|
deduct_flag,
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
delete_type,
|
||||||
|
</if>
|
||||||
|
<if test="employeeId != null">
|
||||||
|
employee_id,
|
||||||
|
</if>
|
||||||
|
<if test="employeeName != null">
|
||||||
|
employee_name,
|
||||||
|
</if>
|
||||||
|
<if test="employeeType != null">
|
||||||
|
employee_type,
|
||||||
|
</if>
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="jobNum != null">
|
||||||
|
job_num,
|
||||||
|
</if>
|
||||||
|
<if test="successfullyDeclared != null">
|
||||||
|
successfully_declared,
|
||||||
|
</if>
|
||||||
|
<if test="taxAgentId != null">
|
||||||
|
tax_agent_id,
|
||||||
|
</if>
|
||||||
|
<if test="tenantKey != null">
|
||||||
|
tenant_key,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="year != null">
|
||||||
|
year,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cardNum != null">
|
||||||
|
#{cardNum},
|
||||||
|
</if>
|
||||||
|
<if test="cardType != null">
|
||||||
|
#{cardType},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
#{creator},
|
||||||
|
</if>
|
||||||
|
<if test="declareStatus != null">
|
||||||
|
#{declareStatus},
|
||||||
|
</if>
|
||||||
|
<if test="deductFlag != null">
|
||||||
|
#{deductFlag},
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
#{deleteType},
|
||||||
|
</if>
|
||||||
|
<if test="employeeId != null">
|
||||||
|
#{employeeId},
|
||||||
|
</if>
|
||||||
|
<if test="employeeName != null">
|
||||||
|
#{employeeName},
|
||||||
|
</if>
|
||||||
|
<if test="employeeType != null">
|
||||||
|
#{employeeType},
|
||||||
|
</if>
|
||||||
|
<if test="id != null">
|
||||||
|
#{id},
|
||||||
|
</if>
|
||||||
|
<if test="jobNum != null">
|
||||||
|
#{jobNum},
|
||||||
|
</if>
|
||||||
|
<if test="successfullyDeclared != null">
|
||||||
|
#{successfullyDeclared},
|
||||||
|
</if>
|
||||||
|
<if test="taxAgentId != null">
|
||||||
|
#{taxAgentId},
|
||||||
|
</if>
|
||||||
|
<if test="tenantKey != null">
|
||||||
|
#{tenantKey},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="year != null">
|
||||||
|
#{year},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 更新,更新全部字段 -->
|
||||||
|
<update id="update" parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
|
||||||
|
UPDATE hrsa_deduction_amount
|
||||||
|
<set>
|
||||||
|
card_num=#{cardNum},
|
||||||
|
card_type=#{cardType},
|
||||||
|
create_time=#{createTime},
|
||||||
|
creator=#{creator},
|
||||||
|
declare_status=#{declareStatus},
|
||||||
|
deduct_flag=#{deductFlag},
|
||||||
|
delete_type=#{deleteType},
|
||||||
|
employee_id=#{employeeId},
|
||||||
|
employee_name=#{employeeName},
|
||||||
|
employee_type=#{employeeType},
|
||||||
|
job_num=#{jobNum},
|
||||||
|
successfully_declared=#{successfullyDeclared},
|
||||||
|
tax_agent_id=#{taxAgentId},
|
||||||
|
tenant_key=#{tenantKey},
|
||||||
|
update_time=#{updateTime},
|
||||||
|
year=#{year},
|
||||||
|
</set>
|
||||||
|
WHERE id = #{id} AND delete_type = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 更新不为NULL的字段 -->
|
||||||
|
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
|
||||||
|
UPDATE hrsa_deduction_amount
|
||||||
|
<set>
|
||||||
|
<if test="cardNum != null">
|
||||||
|
card_num=#{cardNum},
|
||||||
|
</if>
|
||||||
|
<if test="cardType != null">
|
||||||
|
card_type=#{cardType},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time=#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
creator=#{creator},
|
||||||
|
</if>
|
||||||
|
<if test="declareStatus != null">
|
||||||
|
declare_status=#{declareStatus},
|
||||||
|
</if>
|
||||||
|
<if test="deductFlag != null">
|
||||||
|
deduct_flag=#{deductFlag},
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
delete_type=#{deleteType},
|
||||||
|
</if>
|
||||||
|
<if test="employeeId != null">
|
||||||
|
employee_id=#{employeeId},
|
||||||
|
</if>
|
||||||
|
<if test="employeeName != null">
|
||||||
|
employee_name=#{employeeName},
|
||||||
|
</if>
|
||||||
|
<if test="employeeType != null">
|
||||||
|
employee_type=#{employeeType},
|
||||||
|
</if>
|
||||||
|
<if test="jobNum != null">
|
||||||
|
job_num=#{jobNum},
|
||||||
|
</if>
|
||||||
|
<if test="successfullyDeclared != null">
|
||||||
|
successfully_declared=#{successfullyDeclared},
|
||||||
|
</if>
|
||||||
|
<if test="taxAgentId != null">
|
||||||
|
tax_agent_id=#{taxAgentId},
|
||||||
|
</if>
|
||||||
|
<if test="tenantKey != null">
|
||||||
|
tenant_key=#{tenantKey},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time=#{updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="year != null">
|
||||||
|
year=#{year},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
WHERE id = #{id} AND delete_type = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 根据主键删除记录 -->
|
||||||
|
<delete id="delete">
|
||||||
|
UPDATE hrsa_deduction_amount
|
||||||
|
SET delete_type=1
|
||||||
|
WHERE id = #{id}
|
||||||
|
AND delete_type = 0
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByIds">
|
||||||
|
UPDATE hrsa_deduction_amount
|
||||||
|
SET delete_type = 1
|
||||||
|
WHERE delete_type = 0
|
||||||
|
AND id IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
package com.engine.salary.remote.tax.client;
|
||||||
|
|
||||||
|
import com.engine.salary.enums.taxagent.TaxAgentTaxReturnPasswordTypeEnum;
|
||||||
|
import com.engine.salary.remote.tax.request.deductionAmount.ConfirmPreDeductRequest;
|
||||||
|
import com.engine.salary.remote.tax.request.deductionAmount.QueryDeductionAmountRequest;
|
||||||
|
import com.engine.salary.util.HttpUtil;
|
||||||
|
import com.engine.salary.util.JsonUtil;
|
||||||
|
import com.engine.salary.util.SingnatureData;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申报扣减客户端
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
public class DeductionAmountClient extends TaxBaseClient {
|
||||||
|
|
||||||
|
public DeductionAmountClient(Long taxAgentId) {
|
||||||
|
super(taxAgentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String query(String taxYear) {
|
||||||
|
|
||||||
|
String url = super.apiConfig.getHost() + "gateway/iit/deductionAmount/queryPreDeduct";
|
||||||
|
QueryDeductionAmountRequest queryDeductionAmountRequest = new QueryDeductionAmountRequest();
|
||||||
|
queryDeductionAmountRequest.setNsrsbh(returnPO.getTaxCode());
|
||||||
|
queryDeductionAmountRequest.setBizNo(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
queryDeductionAmountRequest.setQymc(returnPO.getTaxAgentName());
|
||||||
|
queryDeductionAmountRequest.setDjxhid(StringUtils.isNotEmpty(returnPO.getTaxRegistrationNumber()) ? returnPO.getTaxRegistrationNumber() : null);
|
||||||
|
queryDeductionAmountRequest.setAreaid(returnPO.getAreaCode());
|
||||||
|
queryDeductionAmountRequest.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
|
||||||
|
boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
|
||||||
|
queryDeductionAmountRequest.setSbmm(realNamePwd ? null : returnPO.getPwd());
|
||||||
|
queryDeductionAmountRequest.setJmsbmm("1");
|
||||||
|
queryDeductionAmountRequest.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
|
||||||
|
queryDeductionAmountRequest.setSmmm(realNamePwd ? returnPO.getPwd() : null);
|
||||||
|
queryDeductionAmountRequest.setJmsmmm("1");
|
||||||
|
queryDeductionAmountRequest.setMmlx("" + returnPO.getPasswordType());
|
||||||
|
queryDeductionAmountRequest.setSkssnd(taxYear);
|
||||||
|
|
||||||
|
String reqJson = JsonUtil.toJsonString(queryDeductionAmountRequest);
|
||||||
|
log.info("queryDeductionAmountRequest params --- \n{}\n", reqJson);
|
||||||
|
Map<String, String> params = new HashMap<>(1);
|
||||||
|
Map<String, String> header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret());
|
||||||
|
|
||||||
|
// 开始请求
|
||||||
|
String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE);
|
||||||
|
log.info("queryDeductionAmountRequest res --- {}", res);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String confirmPreDeduct(String year) {
|
||||||
|
|
||||||
|
String url = super.apiConfig.getHost() + "gateway/iit/deductionAmount/queryPreDeduct";
|
||||||
|
ConfirmPreDeductRequest request = new ConfirmPreDeductRequest();
|
||||||
|
request.setNsrsbh(returnPO.getTaxCode());
|
||||||
|
request.setBizNo(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
request.setQymc(returnPO.getTaxAgentName());
|
||||||
|
request.setDjxhid(StringUtils.isNotEmpty(returnPO.getTaxRegistrationNumber()) ? returnPO.getTaxRegistrationNumber() : null);
|
||||||
|
request.setAreaid(returnPO.getAreaCode());
|
||||||
|
request.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
|
||||||
|
boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
|
||||||
|
request.setSbmm(realNamePwd ? null : returnPO.getPwd());
|
||||||
|
request.setJmsbmm("1");
|
||||||
|
request.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
|
||||||
|
request.setSmmm(realNamePwd ? returnPO.getPwd() : null);
|
||||||
|
request.setJmsmmm("1");
|
||||||
|
request.setMmlx("" + returnPO.getPasswordType());
|
||||||
|
request.setSkssnd(year);
|
||||||
|
request.setKczglb(null);
|
||||||
|
|
||||||
|
String reqJson = JsonUtil.toJsonString(request);
|
||||||
|
log.info("queryDeductionAmountRequest params --- \n{}\n", reqJson);
|
||||||
|
Map<String, String> params = new HashMap<>(1);
|
||||||
|
Map<String, String> header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret());
|
||||||
|
|
||||||
|
// 开始请求
|
||||||
|
String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE);
|
||||||
|
log.info("queryDeductionAmountRequest res --- {}", res);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -39,10 +39,10 @@ public class EmployeeClient extends TaxBaseClient {
|
||||||
mergedEmployeeArchivesRequest.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
|
mergedEmployeeArchivesRequest.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
|
||||||
boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
|
boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
|
||||||
mergedEmployeeArchivesRequest.setSbmm(realNamePwd ? null : returnPO.getPwd());
|
mergedEmployeeArchivesRequest.setSbmm(realNamePwd ? null : returnPO.getPwd());
|
||||||
mergedEmployeeArchivesRequest.setJmsbmm("0");
|
mergedEmployeeArchivesRequest.setJmsbmm("1");
|
||||||
mergedEmployeeArchivesRequest.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
|
mergedEmployeeArchivesRequest.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
|
||||||
mergedEmployeeArchivesRequest.setSmmm(realNamePwd ? returnPO.getPwd() : null);
|
mergedEmployeeArchivesRequest.setSmmm(realNamePwd ? returnPO.getPwd() : null);
|
||||||
mergedEmployeeArchivesRequest.setJmsmmm("0");
|
mergedEmployeeArchivesRequest.setJmsmmm("1");
|
||||||
mergedEmployeeArchivesRequest.setMmlx("" + returnPO.getPasswordType());
|
mergedEmployeeArchivesRequest.setMmlx("" + returnPO.getPasswordType());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
package com.engine.salary.remote.tax.request.deductionAmount;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ConfirmPreDeductRequest {
|
||||||
|
/**
|
||||||
|
* 外部业务编号 必填:是 外部业务编号,唯一,幂等需要,最长64位,建议使用UUID
|
||||||
|
*/
|
||||||
|
private String bizNo;
|
||||||
|
/**
|
||||||
|
* 企业名称 必填:是 代报企业全称
|
||||||
|
*/
|
||||||
|
private String qymc;
|
||||||
|
/**
|
||||||
|
* 密码类型 必填:否 默认不传则设置为0, 0表示申报密码;2表示实名账号实名密码
|
||||||
|
*/
|
||||||
|
private String mmlx;
|
||||||
|
/**
|
||||||
|
* 实名账号 必填:选择必填 当mmlx=2时,必填
|
||||||
|
*/
|
||||||
|
private String smzh;
|
||||||
|
/**
|
||||||
|
* 实名密码 必填:选择必填 当mmlx=2时,必填
|
||||||
|
*/
|
||||||
|
private String smmm;
|
||||||
|
/**
|
||||||
|
* 加密实名密码 必填:否 默认不传则设置为0,0表示不加密;1表示加密 参考3.4代报、实名密码加密说明
|
||||||
|
*/
|
||||||
|
private String jmsmmm;
|
||||||
|
/**
|
||||||
|
* 登记序号 必填:否 存在多个登记序号时,需要指定传入一个.例:10117440105249764755
|
||||||
|
*/
|
||||||
|
private String djxhid;
|
||||||
|
/**
|
||||||
|
* 税号 必填:是 扣缴单位纳税人识别号
|
||||||
|
*/
|
||||||
|
private String nsrsbh;
|
||||||
|
/**
|
||||||
|
* 地区编号 必填:是 6位行政区划代码,精确到市级,例如:440100,参考省市区编码
|
||||||
|
*/
|
||||||
|
private String areaid;
|
||||||
|
/**
|
||||||
|
* 部门编号 必填:否 分部门代报时必传
|
||||||
|
*/
|
||||||
|
private String bmbh;
|
||||||
|
/**
|
||||||
|
* 部门名称 必填:否
|
||||||
|
*/
|
||||||
|
private String bmmc;
|
||||||
|
/**
|
||||||
|
* 申报密码 必填:条件必填 当mmlx=0时,必填
|
||||||
|
*/
|
||||||
|
private String sbmm;
|
||||||
|
/**
|
||||||
|
* 加密申报密码 必填:否 默认不传则设置为0,0表示不加密;1表示加密
|
||||||
|
*/
|
||||||
|
private String jmsbmm;
|
||||||
|
/**
|
||||||
|
* 税款所属年度 必填:必填 yyyy
|
||||||
|
*/
|
||||||
|
private String skssnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除资格列表
|
||||||
|
*/
|
||||||
|
private List<kczg> kczglb;
|
||||||
|
|
||||||
|
|
||||||
|
public static class kczg {
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String xm;
|
||||||
|
/**
|
||||||
|
* 证件类型 见证件类型字典
|
||||||
|
*/
|
||||||
|
private String zzlx;
|
||||||
|
/**
|
||||||
|
* 证件号码 证件号码
|
||||||
|
*/
|
||||||
|
private String zzhm;
|
||||||
|
/**
|
||||||
|
* 国籍
|
||||||
|
*/
|
||||||
|
private String gj;
|
||||||
|
/**
|
||||||
|
* 扣除标识 是/否
|
||||||
|
*/
|
||||||
|
private String kcbs;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.engine.salary.remote.tax.request.deductionAmount;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QueryDeductionAmountRequest {
|
||||||
|
/**
|
||||||
|
* 外部业务编号 必填:是 外部业务编号,唯一,幂等需要,最长64位,建议使用UUID
|
||||||
|
*/
|
||||||
|
private String bizNo;
|
||||||
|
/**
|
||||||
|
* 企业名称 必填:是 代报企业全称
|
||||||
|
*/
|
||||||
|
private String qymc;
|
||||||
|
/**
|
||||||
|
* 密码类型 必填:否 默认不传则设置为0, 0表示申报密码;2表示实名账号实名密码
|
||||||
|
*/
|
||||||
|
private String mmlx;
|
||||||
|
/**
|
||||||
|
* 实名账号 必填:选择必填 当mmlx=2时,必填
|
||||||
|
*/
|
||||||
|
private String smzh;
|
||||||
|
/**
|
||||||
|
* 实名密码 必填:选择必填 当mmlx=2时,必填
|
||||||
|
*/
|
||||||
|
private String smmm;
|
||||||
|
/**
|
||||||
|
* 加密实名密码 必填:否 默认不传则设置为0,0表示不加密;1表示加密 参考3.4代报、实名密码加密说明
|
||||||
|
*/
|
||||||
|
private String jmsmmm;
|
||||||
|
/**
|
||||||
|
* 登记序号 必填:否 存在多个登记序号时,需要指定传入一个.例:10117440105249764755
|
||||||
|
*/
|
||||||
|
private String djxhid;
|
||||||
|
/**
|
||||||
|
* 税号 必填:是 扣缴单位纳税人识别号
|
||||||
|
*/
|
||||||
|
private String nsrsbh;
|
||||||
|
/**
|
||||||
|
* 地区编号 必填:是 6位行政区划代码,精确到市级,例如:440100,参考省市区编码
|
||||||
|
*/
|
||||||
|
private String areaid;
|
||||||
|
/**
|
||||||
|
* 部门编号 必填:否 分部门代报时必传
|
||||||
|
*/
|
||||||
|
private String bmbh;
|
||||||
|
/**
|
||||||
|
* 部门名称 必填:否
|
||||||
|
*/
|
||||||
|
private String bmmc;
|
||||||
|
/**
|
||||||
|
* 申报密码 必填:条件必填 当mmlx=0时,必填
|
||||||
|
*/
|
||||||
|
private String sbmm;
|
||||||
|
/**
|
||||||
|
* 加密申报密码 必填:否 默认不传则设置为0,0表示不加密;1表示加密
|
||||||
|
*/
|
||||||
|
private String jmsbmm;
|
||||||
|
/**
|
||||||
|
* 税款所属年度 必填:必填 yyyy
|
||||||
|
*/
|
||||||
|
private String skssnd;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.engine.salary.service;
|
||||||
|
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountAddParam;
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountOnlineQueryParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
public interface DeductionAmountService {
|
||||||
|
|
||||||
|
Object query(DeductionAmountOnlineQueryParam queryParam);
|
||||||
|
|
||||||
|
void add(DeductionAmountAddParam param);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
package com.engine.salary.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountAddParam;
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountOnlineQueryParam;
|
||||||
|
import com.engine.salary.entity.deductionamount.po.DeductionAmountPO;
|
||||||
|
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
||||||
|
import com.engine.salary.mapper.deductionamount.DeductionAmountMapper;
|
||||||
|
import com.engine.salary.mapper.employeedeclare.EmployeeDeclareMapper;
|
||||||
|
import com.engine.salary.remote.tax.client.DeductionAmountClient;
|
||||||
|
import com.engine.salary.service.*;
|
||||||
|
import com.engine.salary.util.SalaryEntityUtil;
|
||||||
|
import com.engine.salary.util.db.MapperProxyFactory;
|
||||||
|
import com.engine.salary.util.valid.ValidUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
public class DeductionAmountServiceImpl extends Service implements DeductionAmountService {
|
||||||
|
|
||||||
|
private DeductionAmountMapper getDeductionAmountMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(DeductionAmountMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private EmployeeDeclareMapper getEmployeeDeclareMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(EmployeeDeclareMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TaxAgentService getTaxAgentService(User user) {
|
||||||
|
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||||
|
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SalaryArchiveService getSalaryArchiveService(User user) {
|
||||||
|
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TaxDeclarationApiConfigService getTaxDeclarationApiConfigService(User user) {
|
||||||
|
return ServiceUtil.getService(TaxDeclarationApiConfigServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TaxAgentTaxReturnService getTaxAgentTaxReturnService(User user) {
|
||||||
|
return ServiceUtil.getService(TaxAgentTaxReturnServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private EmployeeDeclareRecordService getEmployeeDeclareRecordService(User user) {
|
||||||
|
return ServiceUtil.getService(EmployeeDeclareRecordServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TaxDeclarationApiBillingService getTaxDeclarationApiBillingService(User user) {
|
||||||
|
return ServiceUtil.getService(TaxDeclarationApiBillingServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object query(DeductionAmountOnlineQueryParam queryParam) {
|
||||||
|
Long taxAgentId = queryParam.getTaxAgentId();
|
||||||
|
DeductionAmountClient deductionAmountClient = new DeductionAmountClient(taxAgentId);
|
||||||
|
return deductionAmountClient.query(queryParam.getYear());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void add(DeductionAmountAddParam param) {
|
||||||
|
ValidUtil.doValidator(param);
|
||||||
|
|
||||||
|
//已存在
|
||||||
|
List<DeductionAmountPO> deductionAmountPOS = getDeductionAmountMapper().listSome(DeductionAmountPO.builder().taxAgentId(param.getTaxAgentId()).year(param.getYear()).build());
|
||||||
|
List<Long> oldIds = SalaryEntityUtil.properties(deductionAmountPOS, DeductionAmountPO::getEmployeeId, Collectors.toList());
|
||||||
|
|
||||||
|
//本次新增
|
||||||
|
List<Long> employeeDeclareIds = param.getEmployeeDeclareIds();
|
||||||
|
List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder().ids(employeeDeclareIds).build());
|
||||||
|
|
||||||
|
// employeeDeclarePOS.stream()
|
||||||
|
// .filter(employeeDeclarePO -> !oldIds.contains(employeeDeclarePO.getEmployeeId()))
|
||||||
|
// .map(employeeDeclarePO -> {
|
||||||
|
// DeductionAmountPO.builder()
|
||||||
|
// .id(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .taxAgentId(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .year(param.getYear())
|
||||||
|
// .employeeId(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .employeeName(employeeDeclarePO.getEmployeeName())
|
||||||
|
// .employeeType(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .jobNum(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .cardNum(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .cardType(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .declareStatus(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .deductFlag(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .successfullyDeclared(employeeDeclarePO.getEmployeeId())
|
||||||
|
// .creator(employeeId)
|
||||||
|
// .createTime(now)
|
||||||
|
// .updateTime(now)
|
||||||
|
// .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||||
|
// .deleteType(NumberUtils.INTEGER_ZERO)
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,442 @@
|
||||||
|
package com.engine.salary.web;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountAddParam;
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountOnlineQueryParam;
|
||||||
|
import com.engine.salary.util.ResponseResult;
|
||||||
|
import com.engine.salary.wrapper.DeductionAmountWrapper;
|
||||||
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
public class DeductionAmountController {
|
||||||
|
|
||||||
|
private DeductionAmountWrapper getDeductionAmountWrapper(User user) {
|
||||||
|
return ServiceUtil.getService(DeductionAmountWrapper.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/add")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String add(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountAddParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<DeductionAmountAddParam, Object>(user).run(getDeductionAmountWrapper(user)::add, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/query")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String queryPreDeduct(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountOnlineQueryParam queryParam) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<DeductionAmountOnlineQueryParam, Object>(user).run(getDeductionAmountWrapper(user)::query, queryParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @POST
|
||||||
|
// @Path("/confirmPreDeduct")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String queryPreDeduct(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountConfirmParam param) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<DeductionAmountConfirmParam, Object>(user).run(getDeductionAmountWrapper(user)::confirm, param);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 人员报送-个税扣缴义务人列表
|
||||||
|
// *
|
||||||
|
// * @param param 查询条件
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/taxAgentDeclareList")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String taxAgentDeclareList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxAgentDeclareListQueryParam param) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<TaxAgentDeclareListQueryParam, PageInfo<TaxAgentDeclareListDTO>>(user).run(getEmployeeDeclareWrapper(user)::taxAgentDeclareList, param);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-全部人员列表
|
||||||
|
// *
|
||||||
|
// * @param queryParam 查询条件
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/list")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareListQueryParam queryParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareListQueryParam, Map<String, Object>>(user).run(getEmployeeDeclareWrapper(user)::list, queryParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-本月新增人员列表
|
||||||
|
// *
|
||||||
|
// * @param queryParam 查询条件
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/list4Add")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String list4Add(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareAddListQueryParam queryParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareAddListQueryParam, Map<String, Object>>(user).run(getEmployeeDeclareWrapper(user)::list4Add, queryParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-本月信息变动列表
|
||||||
|
// *
|
||||||
|
// * @param queryParam 查询条件
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/list4Update")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String list4Update(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareListQueryParam queryParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareListQueryParam, Map<String, Object>>(user).run(getEmployeeDeclareWrapper(user)::list4Update, queryParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-本月报送失败人员列表
|
||||||
|
// *
|
||||||
|
// * @param queryParam 查询条件
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/list4Fail")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String list4Fail(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareFailListQueryParam queryParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareFailListQueryParam, PageInfo<EmployeeDeclareFailListDTO>>(user).run(getEmployeeDeclareWrapper(user)::list4Fail, queryParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-获取新建或编辑的表单
|
||||||
|
// *
|
||||||
|
// * @param id 报送人员列表的主键id
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @GET
|
||||||
|
// @Path("/getForm")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String getForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "id") Long id) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<Long, Map<String, Object>>(user).run(getEmployeeDeclareWrapper(user)::getForm, id);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//// @GetMapping("/getBatchUpdateForm")
|
||||||
|
//// @ApiOperation("人员报送-获取批量编辑的表单")
|
||||||
|
//// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
//// public WeaResult<WeaForm> getBatchUpdateForm() {
|
||||||
|
//// WeaForm weaForm = employeeDeclareWrapper.getBatchUpdateForm();
|
||||||
|
//// return WeaResult.success(weaForm);
|
||||||
|
//// }
|
||||||
|
////
|
||||||
|
//// @GetMapping("/getSearchCondition")
|
||||||
|
//// @ApiOperation("人员报送-获取高级搜索条件")
|
||||||
|
//// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
//// public WeaResult<WeaSearchCondition> getSearchCondition() {
|
||||||
|
//// WeaSearchCondition searchCondition = employeeDeclareWrapper.getSearchCondition();
|
||||||
|
//// return WeaResult.success(searchCondition);
|
||||||
|
//// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-新增人员/编辑人员保存
|
||||||
|
// *
|
||||||
|
// * @param saveParam 保存参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/save")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String save(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareSaveParam saveParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareSaveParam, PageInfo<EmployeeDeclareFailListDTO>>(user).run(getEmployeeDeclareWrapper(user)::save, saveParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//// /**
|
||||||
|
//// * 人员报送-批量编辑
|
||||||
|
//// *
|
||||||
|
//// * @param batchUpdateParam 批量编辑参数
|
||||||
|
//// * @return
|
||||||
|
//// */
|
||||||
|
//// @Path("/batchUpdate")
|
||||||
|
//// @ApiOperation("人员报送-批量编辑")
|
||||||
|
//// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
//// public WeaResult<Object> batchUpdate(@RequestBody @Validated EmployeeDeclareBatchUpdateParam batchUpdateParam) {
|
||||||
|
//// employeeDeclareWrapper.batchUpdate(batchUpdateParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey());
|
||||||
|
//// return WeaResult.success(null);
|
||||||
|
//// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-删除
|
||||||
|
// *
|
||||||
|
// * @param ids 待删除的主键id
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/delete")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection<Long> ids) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<Collection<Long>, String>(user).run(getEmployeeDeclareWrapper(user)::deleteByIds, ids);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-刷新数据
|
||||||
|
// *
|
||||||
|
// * @param refreshParam 刷新数据的参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/refresh")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String refresh(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareRefreshParam refreshParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareRefreshParam, String>(user).run(getEmployeeDeclareWrapper(user)::refresh, refreshParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-获取整体的报送情况
|
||||||
|
// *
|
||||||
|
// * @param employeeDeclareParam 获取整体的报送情况的参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/getDeclareInfo")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String getDeclareInfo(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareParam employeeDeclareParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareParam, EmployeeDeclareInfoDTO>(user).run(getEmployeeDeclareWrapper(user)::getDeclareInfo, employeeDeclareParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-全部报送
|
||||||
|
// *
|
||||||
|
// * @param employeeDeclareParam 在线报送
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/declare")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String declare(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareParam employeeDeclareParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareParam, String>(user).run(getEmployeeDeclareWrapper(user)::declare, employeeDeclareParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-获取报送结果反馈
|
||||||
|
// *
|
||||||
|
// * @param employeeDeclareParam 获取反馈
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/getDeclareFeedback")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String getDeclareFeedback(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareParam employeeDeclareParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareParam, String>(user).run(getEmployeeDeclareWrapper(user)::getDeclareFeedback, employeeDeclareParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-后端业务逻辑是否已经完成
|
||||||
|
// *
|
||||||
|
// * @param index 进度索引
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @GET
|
||||||
|
// @Path("/getRate")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String getRate(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "index") String index) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<String, EmployeeDeclareRateDTO>(user).run(getEmployeeDeclareWrapper(user)::getRate, index);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-下载导入模板
|
||||||
|
// *
|
||||||
|
// * @param queryParam 导出参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/exportTemplate")
|
||||||
|
// @Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
|
// public Response exportTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareImportParam queryParam) {
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// XSSFWorkbook workbook = getEmployeeDeclareWrapper(user).exportTemplate(queryParam);
|
||||||
|
// String fileName = "人员信息采集导入模板-" + LocalDate.now();
|
||||||
|
// try {
|
||||||
|
// fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||||
|
// } catch (UnsupportedEncodingException e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// StreamingOutput output = outputStream -> {
|
||||||
|
// workbook.write(outputStream);
|
||||||
|
// outputStream.flush();
|
||||||
|
// };
|
||||||
|
// response.setContentType("application/octet-stream");
|
||||||
|
// return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.error("人员报送-人员信息采集导入模板异常", e);
|
||||||
|
// throw e;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-导入预览
|
||||||
|
// *
|
||||||
|
// * @param queryParam 导出参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/preview")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String preview(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareImportParam queryParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareImportParam, Map<String, Object>>(user).run(getEmployeeDeclareWrapper(user)::preview, queryParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-导入
|
||||||
|
// *
|
||||||
|
// * @param queryParam 导出参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/importData")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public String importData(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareImportParam queryParam) {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// return new ResponseResult<EmployeeDeclareImportParam, Map<String, Object>>(user).run(getEmployeeDeclareWrapper(user)::importData, queryParam);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-导出全部人员
|
||||||
|
// *
|
||||||
|
// * @param param 导出参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @POST
|
||||||
|
// @Path("/export")
|
||||||
|
// @Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
|
// public Response export(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareListQueryParam param) {
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
|
// XSSFWorkbook workbook = getEmployeeDeclareWrapper(user).export(param);
|
||||||
|
// String fileName = "人员信息采集-" + LocalDate.now();
|
||||||
|
// try {
|
||||||
|
// fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||||
|
// } catch (UnsupportedEncodingException e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// StreamingOutput output = outputStream -> {
|
||||||
|
// workbook.write(outputStream);
|
||||||
|
// outputStream.flush();
|
||||||
|
// };
|
||||||
|
// response.setContentType("application/octet-stream");
|
||||||
|
// return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.error("人员报送-导出全部人员异常", e);
|
||||||
|
// throw e;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 人员报送-导出本月新增人员
|
||||||
|
// *
|
||||||
|
// * @param queryParam 导出参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @Path("/export4Add")
|
||||||
|
// @ApiOperation("人员报送-导出本月新增人员")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public WeaResult<Object> export4Add(@RequestBody @Validated EmployeeDeclareAddListQueryParam queryParam) {
|
||||||
|
// Map<String, Object> exportMap = employeeDeclareWrapper.export4Add(queryParam, UserContext.getCurrentUser());
|
||||||
|
// return WeaResult.success(exportMap);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-导出本月信息变动人员
|
||||||
|
// *
|
||||||
|
// * @param queryParam 导出参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @Path("/export4Update")
|
||||||
|
// @ApiOperation("人员报送-导出本月信息变动人员")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public WeaResult<Object> export4Update(@RequestBody @Validated EmployeeDeclareListQueryParam queryParam) {
|
||||||
|
// Map<String, Object> exportMap = employeeDeclareWrapper.export4Update(queryParam, UserContext.getCurrentUser());
|
||||||
|
// return WeaResult.success(exportMap);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-导出本月报送失败的人员
|
||||||
|
// *
|
||||||
|
// * @param queryParam 导出参数
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @Path("/export4Fail")
|
||||||
|
// @ApiOperation("人员报送-导出本月报送失败的人员")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public WeaResult<Object> export4Fail(@RequestBody @Validated EmployeeDeclareFailListQueryParam queryParam) {
|
||||||
|
// Map<String, Object> exportMap = employeeDeclareWrapper.export4Fail(queryParam, UserContext.getCurrentUser());
|
||||||
|
// return WeaResult.success(exportMap);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Path("/getImportParam")
|
||||||
|
// @ApiOperation("人员报送-获取导入参数")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public WeaResult<ExcelImportParam> getAcctResultImportParams() {
|
||||||
|
// String tenantKey = TenantContext.getCurrentTenantKey();
|
||||||
|
// Long currentEmployeeId = UserContext.getCurrentEmployeeId();
|
||||||
|
// return WeaResult.success(salaryBatchService.buildImportParam("importEmployeeDeclare",
|
||||||
|
// "importEmployeeDeclare",
|
||||||
|
// SalaryI18nUtil.getI18nLabel(tenantKey, currentEmployeeId, 158769, "人员信息报送"),
|
||||||
|
// null,
|
||||||
|
// null));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 人员报送-导出导入模板
|
||||||
|
// *
|
||||||
|
// * @param importParam 获取导入模板
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @Path("/exportTemplate")
|
||||||
|
// @ApiOperation("人员报送-导出导入模板")
|
||||||
|
// @Produces(MediaType.APPLICATION_JSON)
|
||||||
|
// public WeaResult<Object> exportTemplate(@RequestBody @Validated EmployeeDeclareImportParam importParam) {
|
||||||
|
// Map<String, Object> exportMap = employeeDeclareWrapper.exportTemplate(importParam, UserContext.getCurrentUser());
|
||||||
|
// return WeaResult.success(exportMap);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
//4.2.5年收入不足6万元的纳税人暂不预扣预缴税款
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.engine.salary.wrapper;
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountAddParam;
|
||||||
|
import com.engine.salary.entity.deductionamount.param.DeductionAmountOnlineQueryParam;
|
||||||
|
import com.engine.salary.service.*;
|
||||||
|
import com.engine.salary.service.impl.*;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
|
||||||
|
* <p>Copyright: Copyright (c) 2023</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
public class DeductionAmountWrapper extends Service {
|
||||||
|
private DeductionAmountService getDeductionAmountService(User user) {
|
||||||
|
return ServiceUtil.getService(DeductionAmountServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Object query(DeductionAmountOnlineQueryParam queryParam) {
|
||||||
|
return getDeductionAmountService(user).query(queryParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(DeductionAmountAddParam param) {
|
||||||
|
getDeductionAmountService(user).add(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,9 +7,9 @@ import java.util.List;
|
||||||
|
|
||||||
public class ParseTaxApi {
|
public class ParseTaxApi {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// readExcel("H:\\code\\salary\\test\\ApiDes.xlsx");
|
readExcel("H:\\code\\salary\\test\\ApiDes.xlsx");
|
||||||
|
|
||||||
readExcel2("H:\\code\\salary\\test\\ApiDes.xlsx");
|
// readExcel2("H:\\code\\salary\\test\\ApiDes.xlsx");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue