人员报送接口

This commit is contained in:
钱涛 2023-08-18 09:27:16 +08:00
parent 0d8606c956
commit d88c43c3c6
7 changed files with 383 additions and 134 deletions

View File

@ -119,7 +119,7 @@ public class EmployeeDeclareRefresh {
.setCardNum(idNum) .setCardNum(idNum)
.setGender(StringUtils.equalsIgnoreCase(hrmEmployeeComInfo.getSex(), GenderEnum.MALE.name()) .setGender(StringUtils.equalsIgnoreCase(hrmEmployeeComInfo.getSex(), GenderEnum.MALE.name())
? GenderEnum.MALE.getValue() : GenderEnum.FEMALE.getValue()) ? GenderEnum.MALE.getValue() : GenderEnum.FEMALE.getValue())
.setBirthday(simpleUserInfo == null ? null : SalaryDateUtil.dateStrToLocalDate(simpleUserInfo.getBirthday())) .setBirthday(simpleUserInfo == null || simpleUserInfo.getBirthday() == null ? null : SalaryDateUtil.dateStrToLocalDate(simpleUserInfo.getBirthday()))
.setMobile(hrmEmployeeComInfo.getMobile()); .setMobile(hrmEmployeeComInfo.getMobile());
if (StringUtils.isEmpty(idNum)) { if (StringUtils.isEmpty(idNum)) {
employeeDeclare.setDeclareStatus(DeclareStatusEnum.DECLARE_FAIL.getValue()); employeeDeclare.setDeclareStatus(DeclareStatusEnum.DECLARE_FAIL.getValue());

View File

@ -47,6 +47,15 @@ public interface EmployeeDeclareMapper {
*/ */
int insertIgnoreNull(EmployeeDeclarePO employeeDeclare); int insertIgnoreNull(EmployeeDeclarePO employeeDeclare);
/**
* 批量插入
*
* @param employeeDeclare
*/
void batchInsert(@Param("collection") List<EmployeeDeclarePO> employeeDeclare);
/** /**
* 修改修改所有字段 * 修改修改所有字段
* *

View File

@ -2,43 +2,45 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.employeedeclare.EmployeeDeclareMapper"> <mapper namespace="com.engine.salary.mapper.employeedeclare.EmployeeDeclareMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO"> <resultMap id="BaseResultMap" type="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
<result column="id" property="id" /> <result column="id" property="id"/>
<result column="tax_agent_id" property="taxAgentId" /> <result column="tax_agent_id" property="taxAgentId"/>
<result column="tax_cycle" property="taxCycle" /> <result column="tax_cycle" property="taxCycle"/>
<result column="employee_id" property="employeeId" /> <result column="employee_id" property="employeeId"/>
<result column="employee_type" property="employeeType" /> <result column="employee_type" property="employeeType"/>
<result column="employee_name" property="employeeName" /> <result column="employee_name" property="employeeName"/>
<result column="job_num" property="jobNum" /> <result column="job_num" property="jobNum"/>
<result column="card_type" property="cardType" /> <result column="card_type" property="cardType"/>
<result column="card_num" property="cardNum" /> <result column="card_num" property="cardNum"/>
<result column="gender" property="gender" /> <result column="gender" property="gender"/>
<result column="birthday" property="birthday" /> <result column="birthday" property="birthday"/>
<result column="employment_status" property="employmentStatus" /> <result column="employment_status" property="employmentStatus"/>
<result column="mobile" property="mobile" /> <result column="mobile" property="mobile"/>
<result column="employment_type" property="employmentType" /> <result column="employment_type" property="employmentType"/>
<result column="employment_first_year" property="employmentFirstYear" /> <result column="employment_first_year" property="employmentFirstYear"/>
<result column="employment_date" property="employmentDate" /> <result column="employment_date" property="employmentDate"/>
<result column="dismiss_date" property="dismissDate" /> <result column="dismiss_date" property="dismissDate"/>
<result column="disability" property="disability" /> <result column="disability" property="disability"/>
<result column="disability_card_no" property="disabilityCardNo" /> <result column="disability_card_no" property="disabilityCardNo"/>
<result column="lonely_old" property="lonelyOld" /> <result column="lonely_old" property="lonelyOld"/>
<result column="martyr_dependents" property="martyrDependents" /> <result column="martyr_dependents" property="martyrDependents"/>
<result column="martyr_dependents_card_no" property="martyrDependentsCardNo" /> <result column="martyr_dependents_card_no" property="martyrDependentsCardNo"/>
<result column="deduct_expenses" property="deductExpenses" /> <result column="deduct_expenses" property="deductExpenses"/>
<result column="successfully_declared" property="successfullyDeclared" /> <result column="successfully_declared" property="successfullyDeclared"/>
<result column="new_employee_info" property="newEmployeeInfo" /> <result column="new_employee_info" property="newEmployeeInfo"/>
<result column="declare_status" property="declareStatus" /> <result column="declare_status" property="declareStatus"/>
<result column="declare_error_msg" property="declareErrorMsg" /> <result column="declare_error_msg" property="declareErrorMsg"/>
<result column="tenant_key" property="tenantKey" /> <result column="tenant_key" property="tenantKey"/>
<result column="creator" property="creator" /> <result column="creator" property="creator"/>
<result column="delete_type" property="deleteType" /> <result column="delete_type" property="deleteType"/>
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime"/>
</resultMap> </resultMap>
<!-- 表字段 --> <!-- 表字段 -->
<sql id="baseColumns"> <sql id="baseColumns">
t.id t
.
id
, t.tax_agent_id , t.tax_agent_id
, t.tax_cycle , t.tax_cycle
, t.employee_id , t.employee_id
@ -75,7 +77,7 @@
<!-- 查询全部 --> <!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap"> <select id="listAll" resultMap="BaseResultMap">
SELECT SELECT
<include refid="baseColumns" /> <include refid="baseColumns"/>
FROM hrsa_employee_declare t FROM hrsa_employee_declare t
WHERE delete_type = 0 WHERE delete_type = 0
</select> </select>
@ -83,15 +85,16 @@
<!-- 根据主键获取单条记录 --> <!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long"> <select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT SELECT
<include refid="baseColumns" /> <include refid="baseColumns"/>
FROM hrsa_employee_declare t FROM hrsa_employee_declare t
WHERE id = #{id} AND delete_type = 0 WHERE id = #{id} AND delete_type = 0
</select> </select>
<!-- 条件查询 --> <!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO"> <select id="listSome" resultMap="BaseResultMap"
parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
SELECT SELECT
<include refid="baseColumns" /> <include refid="baseColumns"/>
FROM hrsa_employee_declare t FROM hrsa_employee_declare t
WHERE delete_type = 0 WHERE delete_type = 0
<if test="id != null"> <if test="id != null">
@ -306,105 +309,332 @@
</if> </if>
</trim> </trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=","> <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null" > <if test="id != null">
#{id}, #{id},
</if> </if>
<if test="taxAgentId != null" > <if test="taxAgentId != null">
#{taxAgentId}, #{taxAgentId},
</if> </if>
<if test="taxCycle != null" > <if test="taxCycle != null">
#{taxCycle}, #{taxCycle},
</if> </if>
<if test="employeeId != null" > <if test="employeeId != null">
#{employeeId}, #{employeeId},
</if> </if>
<if test="employeeType != null" > <if test="employeeType != null">
#{employeeType}, #{employeeType},
</if> </if>
<if test="employeeName != null" > <if test="employeeName != null">
#{employeeName}, #{employeeName},
</if> </if>
<if test="jobNum != null" > <if test="jobNum != null">
#{jobNum}, #{jobNum},
</if> </if>
<if test="cardType != null" > <if test="cardType != null">
#{cardType}, #{cardType},
</if> </if>
<if test="cardNum != null" > <if test="cardNum != null">
#{cardNum}, #{cardNum},
</if> </if>
<if test="gender != null" > <if test="gender != null">
#{gender}, #{gender},
</if> </if>
<if test="birthday != null" > <if test="birthday != null">
#{birthday}, #{birthday},
</if> </if>
<if test="employmentStatus != null" > <if test="employmentStatus != null">
#{employmentStatus}, #{employmentStatus},
</if> </if>
<if test="mobile != null" > <if test="mobile != null">
#{mobile}, #{mobile},
</if> </if>
<if test="employmentType != null" > <if test="employmentType != null">
#{employmentType}, #{employmentType},
</if> </if>
<if test="employmentFirstYear != null" > <if test="employmentFirstYear != null">
#{employmentFirstYear}, #{employmentFirstYear},
</if> </if>
<if test="employmentDate != null" > <if test="employmentDate != null">
#{employmentDate}, #{employmentDate},
</if> </if>
<if test="dismissDate != null" > <if test="dismissDate != null">
#{dismissDate}, #{dismissDate},
</if> </if>
<if test="disability != null" > <if test="disability != null">
#{disability}, #{disability},
</if> </if>
<if test="disabilityCardNo != null" > <if test="disabilityCardNo != null">
#{disabilityCardNo}, #{disabilityCardNo},
</if> </if>
<if test="lonelyOld != null" > <if test="lonelyOld != null">
#{lonelyOld}, #{lonelyOld},
</if> </if>
<if test="martyrDependents != null" > <if test="martyrDependents != null">
#{martyrDependents}, #{martyrDependents},
</if> </if>
<if test="martyrDependentsCardNo != null" > <if test="martyrDependentsCardNo != null">
#{martyrDependentsCardNo}, #{martyrDependentsCardNo},
</if> </if>
<if test="deductExpenses != null" > <if test="deductExpenses != null">
#{deductExpenses}, #{deductExpenses},
</if> </if>
<if test="successfullyDeclared != null" > <if test="successfullyDeclared != null">
#{successfullyDeclared}, #{successfullyDeclared},
</if> </if>
<if test="newEmployeeInfo != null" > <if test="newEmployeeInfo != null">
#{newEmployeeInfo}, #{newEmployeeInfo},
</if> </if>
<if test="declareStatus != null" > <if test="declareStatus != null">
#{declareStatus}, #{declareStatus},
</if> </if>
<if test="declareErrorMsg != null" > <if test="declareErrorMsg != null">
#{declareErrorMsg}, #{declareErrorMsg},
</if> </if>
<if test="tenantKey != null" > <if test="tenantKey != null">
#{tenantKey}, #{tenantKey},
</if> </if>
<if test="creator != null" > <if test="creator != null">
#{creator}, #{creator},
</if> </if>
<if test="deleteType != null" > <if test="deleteType != null">
#{deleteType}, #{deleteType},
</if> </if>
<if test="createTime != null" > <if test="createTime != null">
#{createTime}, #{createTime},
</if> </if>
<if test="updateTime != null" > <if test="updateTime != null">
#{updateTime}, #{updateTime},
</if> </if>
</trim> </trim>
</insert> </insert>
<insert id="batchInsert">
INSERT INTO hrsa_employee_declare
(
birthday,
card_num,
card_type,
create_time,
creator,
declare_error_msg,
declare_status,
deduct_expenses,
delete_type,
disability,
disability_card_no,
dismiss_date,
employee_id,
employee_name,
employee_type,
employment_date,
employment_first_year,
employment_status,
employment_type,
gender,
id,
job_Num,
lonely_old,
martyr_dependents,
martyr_dependents_card_no,
mobile,
new_employee_info,
successfully_declared,
tax_agent_id,
tax_cycle,
tenant_key,
update_time
)
VALUES
(
<foreach collection="collection" item="item" separator=",">
#{item.birthday},
#{item.cardNum},
#{item.cardType},
#{item.createTime},
#{item.creator},
#{item.declareErrorMsg},
#{item.declareStatus},
#{item.deductExpenses},
#{item.deleteType},
#{item.disability},
#{item.disabilityCardNo},
#{item.dismissDate},
#{item.employeeId},
#{item.employeeName},
#{item.employeeType},
#{item.employmentDate},
#{item.employmentFirstYear},
#{item.employmentStatus},
#{item.employmentType},
#{item.gender},
#{item.id},
#{item.jobNum},
#{item.lonelyOld},
#{item.martyrDependents},
#{item.martyrDependentsCardNo},
#{item.mobile},
#{item.newEmployeeInfo},
#{item.successfullyDeclared},
#{item.taxAgentId},
#{item.taxCycle},
#{item.tenantKey},
#{item.updateTime}
</foreach>
)
</insert>
<insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_employee_declare (
birthday,
card_num,
card_type,
create_time,
creator,
declare_error_msg,
declare_status,
deduct_expenses,
delete_type,
disability,
disability_card_no,
dismiss_date,
employee_id,
employee_name,
employee_type,
employment_date,
employment_first_year,
employment_status,
employment_type,
gender,
id,
job_Num,
lonely_old,
martyr_dependents,
martyr_dependents_card_no,
mobile,
new_employee_info,
successfully_declared,
tax_agent_id,
tax_cycle,
tenant_key,
update_time
)
<foreach collection="collection" item="item" separator="union all">
select
#{item.birthday,jdbcType=DATE},
#{item.cardNum,jdbcType=VARCHAR},
#{item.cardType,jdbcType=},
#{item.createTime,jdbcType=DATE},
#{item.creator,jdbcType=DOUBLE},
#{item.declareErrorMsg,jdbcType=VARCHAR},
#{item.declareStatus,jdbcType=INTEGER},
#{item.deductExpenses,jdbcType=INTEGER},
#{item.deleteType,jdbcType=INTEGER},
#{item.disability,jdbcType=INTEGER},
#{item.disabilityCardNo,jdbcType=VARCHAR},
#{item.dismissDate,jdbcType=DATE},
#{item.employeeId,jdbcType=DOUBLE},
#{item.employeeName,jdbcType=VARCHAR},
#{item.employeeType,jdbcType=INTEGER},
#{item.employmentDate,jdbcType=DATE},
#{item.employmentFirstYear,jdbcType=VARCHAR},
#{item.employmentStatus,jdbcType=INTEGER},
#{item.employmentType,jdbcType=INTEGER},
#{item.gender,jdbcType=INTEGER},
#{item.id,jdbcType=DOUBLE},
#{item.jobNum,jdbcType=VARCHAR},
#{item.lonelyOld,jdbcType=INTEGER},
#{item.martyrDependents,jdbcType=INTEGER},
#{item.martyrDependentsCardNo,jdbcType=VARCHAR},
#{item.mobile,jdbcType=VARCHAR},
#{item.newEmployeeInfo,jdbcType=INTEGER},
#{item.successfullyDeclared,jdbcType=INTEGER},
#{item.taxAgentId,jdbcType=DOUBLE},
#{item.taxCycle,jdbcType=DATE},
#{item.tenantKey,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=DATE}
from dual
</foreach>
</insert>
<insert id="batchInsert" databaseId="sqlserver">
<foreach collection="collection" item="item" separator=";">
INSERT INTO hrsa_employee_declare (
birthday,
card_num,
card_type,
create_time,
creator,
declare_error_msg,
declare_status,
deduct_expenses,
delete_type,
disability,
disability_card_no,
dismiss_date,
employee_id,
employee_name,
employee_type,
employment_date,
employment_first_year,
employment_status,
employment_type,
gender,
id,
job_Num,
lonely_old,
martyr_dependents,
martyr_dependents_card_no,
mobile,
new_employee_info,
successfully_declared,
tax_agent_id,
tax_cycle,
tenant_key,
update_time
)
VALUES
(
#{item.birthday},
#{item.cardNum},
#{item.cardType},
#{item.createTime},
#{item.creator},
#{item.declareErrorMsg},
#{item.declareStatus},
#{item.deductExpenses},
#{item.deleteType},
#{item.disability},
#{item.disabilityCardNo},
#{item.dismissDate},
#{item.employeeId},
#{item.employeeName},
#{item.employeeType},
#{item.employmentDate},
#{item.employmentFirstYear},
#{item.employmentStatus},
#{item.employmentType},
#{item.gender},
#{item.id},
#{item.jobNum},
#{item.lonelyOld},
#{item.martyrDependents},
#{item.martyrDependentsCardNo},
#{item.mobile},
#{item.newEmployeeInfo},
#{item.successfullyDeclared},
#{item.taxAgentId},
#{item.taxCycle},
#{item.tenantKey},
#{item.updateTime}
)
</foreach>
</insert>
<!-- 更新,更新全部字段 --> <!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO"> <update id="update" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
UPDATE hrsa_employee_declare UPDATE hrsa_employee_declare
@ -449,97 +679,97 @@
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO"> <update id="updateIgnoreNull" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
UPDATE hrsa_employee_declare UPDATE hrsa_employee_declare
<set> <set>
<if test="taxAgentId != null" > <if test="taxAgentId != null">
tax_agent_id=#{taxAgentId}, tax_agent_id=#{taxAgentId},
</if> </if>
<if test="taxCycle != null" > <if test="taxCycle != null">
tax_cycle=#{taxCycle}, tax_cycle=#{taxCycle},
</if> </if>
<if test="employeeId != null" > <if test="employeeId != null">
employee_id=#{employeeId}, employee_id=#{employeeId},
</if> </if>
<if test="employeeType != null" > <if test="employeeType != null">
employee_type=#{employeeType}, employee_type=#{employeeType},
</if> </if>
<if test="employeeName != null" > <if test="employeeName != null">
employee_name=#{employeeName}, employee_name=#{employeeName},
</if> </if>
<if test="jobNum != null" > <if test="jobNum != null">
job_num=#{jobNum}, job_num=#{jobNum},
</if> </if>
<if test="cardType != null" > <if test="cardType != null">
card_type=#{cardType}, card_type=#{cardType},
</if> </if>
<if test="cardNum != null" > <if test="cardNum != null">
card_num=#{cardNum}, card_num=#{cardNum},
</if> </if>
<if test="gender != null" > <if test="gender != null">
gender=#{gender}, gender=#{gender},
</if> </if>
<if test="birthday != null" > <if test="birthday != null">
birthday=#{birthday}, birthday=#{birthday},
</if> </if>
<if test="employmentStatus != null" > <if test="employmentStatus != null">
employment_status=#{employmentStatus}, employment_status=#{employmentStatus},
</if> </if>
<if test="mobile != null" > <if test="mobile != null">
mobile=#{mobile}, mobile=#{mobile},
</if> </if>
<if test="employmentType != null" > <if test="employmentType != null">
employment_type=#{employmentType}, employment_type=#{employmentType},
</if> </if>
<if test="employmentFirstYear != null" > <if test="employmentFirstYear != null">
employment_first_year=#{employmentFirstYear}, employment_first_year=#{employmentFirstYear},
</if> </if>
<if test="employmentDate != null" > <if test="employmentDate != null">
employment_date=#{employmentDate}, employment_date=#{employmentDate},
</if> </if>
<if test="dismissDate != null" > <if test="dismissDate != null">
dismiss_date=#{dismissDate}, dismiss_date=#{dismissDate},
</if> </if>
<if test="disability != null" > <if test="disability != null">
disability=#{disability}, disability=#{disability},
</if> </if>
<if test="disabilityCardNo != null" > <if test="disabilityCardNo != null">
disability_card_no=#{disabilityCardNo}, disability_card_no=#{disabilityCardNo},
</if> </if>
<if test="lonelyOld != null" > <if test="lonelyOld != null">
lonely_old=#{lonelyOld}, lonely_old=#{lonelyOld},
</if> </if>
<if test="martyrDependents != null" > <if test="martyrDependents != null">
martyr_dependents=#{martyrDependents}, martyr_dependents=#{martyrDependents},
</if> </if>
<if test="martyrDependentsCardNo != null" > <if test="martyrDependentsCardNo != null">
martyr_dependents_card_no=#{martyrDependentsCardNo}, martyr_dependents_card_no=#{martyrDependentsCardNo},
</if> </if>
<if test="deductExpenses != null" > <if test="deductExpenses != null">
deduct_expenses=#{deductExpenses}, deduct_expenses=#{deductExpenses},
</if> </if>
<if test="successfullyDeclared != null" > <if test="successfullyDeclared != null">
successfully_declared=#{successfullyDeclared}, successfully_declared=#{successfullyDeclared},
</if> </if>
<if test="newEmployeeInfo != null" > <if test="newEmployeeInfo != null">
new_employee_info=#{newEmployeeInfo}, new_employee_info=#{newEmployeeInfo},
</if> </if>
<if test="declareStatus != null" > <if test="declareStatus != null">
declare_status=#{declareStatus}, declare_status=#{declareStatus},
</if> </if>
<if test="declareErrorMsg != null" > <if test="declareErrorMsg != null">
declare_error_msg=#{declareErrorMsg}, declare_error_msg=#{declareErrorMsg},
</if> </if>
<if test="tenantKey != null" > <if test="tenantKey != null">
tenant_key=#{tenantKey}, tenant_key=#{tenantKey},
</if> </if>
<if test="creator != null" > <if test="creator != null">
creator=#{creator}, creator=#{creator},
</if> </if>
<if test="deleteType != null" > <if test="deleteType != null">
delete_type=#{deleteType}, delete_type=#{deleteType},
</if> </if>
<if test="createTime != null" > <if test="createTime != null">
create_time=#{createTime}, create_time=#{createTime},
</if> </if>
<if test="updateTime != null" > <if test="updateTime != null">
update_time=#{updateTime}, update_time=#{updateTime},
</if> </if>
</set> </set>
@ -551,12 +781,13 @@
<delete id="delete" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO"> <delete id="delete" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
UPDATE hrsa_employee_declare UPDATE hrsa_employee_declare
SET delete_type=1 SET delete_type=1
WHERE id = #{id} AND delete_type = 0 WHERE id = #{id}
AND delete_type = 0
</delete> </delete>
<delete id="deleteByIds"> <delete id="deleteByIds">
UPDATE hrsa_employee_declare UPDATE hrsa_employee_declare
SET delete_type=1, SET delete_type=1,
update_time = #{date} update_time = #{date}
WHERE delete_type = 0 WHERE delete_type = 0
<if test="ids != null and ids.size()>0"> <if test="ids != null and ids.size()>0">
AND id IN AND id IN
@ -633,20 +864,20 @@
<if test="param.deductExpenses != null"> <if test="param.deductExpenses != null">
AND deduct_expenses = #{param.deductExpenses.value} AND deduct_expenses = #{param.deductExpenses.value}
</if> </if>
<!-- <if test="param.departmentIds != null and param.departmentIds.size()>0">--> <!-- <if test="param.departmentIds != null and param.departmentIds.size()>0">-->
<!-- AND employee_type = 0 and employee_id IN (select id from {$publicdb}.employee emp where emp.department in (--> <!-- AND employee_type = 0 and employee_id IN (select id from {$publicdb}.employee emp where emp.department in (-->
<!-- <foreach collection="param.departmentIds" item="departmentId" separator=",">--> <!-- <foreach collection="param.departmentIds" item="departmentId" separator=",">-->
<!-- #{departmentId}--> <!-- #{departmentId}-->
<!-- </foreach>--> <!-- </foreach>-->
<!-- ))--> <!-- ))-->
<!-- </if>--> <!-- </if>-->
<!-- <if test="param.positionIds != null and param.positionIds.size()>0">--> <!-- <if test="param.positionIds != null and param.positionIds.size()>0">-->
<!-- AND employee_type = 0 and employee_id IN (select id from {$publicdb}.employee emp where emp.position in (--> <!-- AND employee_type = 0 and employee_id IN (select id from {$publicdb}.employee emp where emp.position in (-->
<!-- <foreach collection="param.positionIds" item="positionId" separator=",">--> <!-- <foreach collection="param.positionIds" item="positionId" separator=",">-->
<!-- #{positionId}--> <!-- #{positionId}-->
<!-- </foreach>--> <!-- </foreach>-->
<!-- ))--> <!-- ))-->
<!-- </if>--> <!-- </if>-->
<include refid="KeywordSql"/> <include refid="KeywordSql"/>
</sql> </sql>

View File

@ -89,6 +89,12 @@
#{id} #{id}
</foreach> </foreach>
</if> </if>
<if test="salarySobIds != null and salarySobIds.size()>0">
AND salary_sob_id IN
<foreach collection="salarySobIds" open="(" item="salarySobId" separator="," close=")">
#{salarySobId}
</foreach>
</if>
ORDER BY id DESC ORDER BY id DESC
</select> </select>

View File

@ -498,14 +498,16 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla
// .setSimpleUserInfos(newSimpleUserInfos) // .setSimpleUserInfos(newSimpleUserInfos)
// .setExtEmployees(newExtEmployees) // .setExtEmployees(newExtEmployees)
EmployeeDeclareRefresh.Result result = EmployeeDeclareRefresh.refresh(dto, employeeId); EmployeeDeclareRefresh.Result result = EmployeeDeclareRefresh.refresh(dto, employeeId);
// // 保存新增的人员 // 保存新增的人员
// if (CollectionUtils.isNotEmpty(result.getNewEmployeeDeclares())) { if (CollectionUtils.isNotEmpty(result.getNewEmployeeDeclares())) {
// saveBatch(result.getNewEmployeeDeclares()); result.getNewEmployeeDeclares().forEach(getEmployeeDeclareMapper()::insertIgnoreNull);
// } // getEmployeeDeclareMapper().batchInsert((result.getNewEmployeeDeclares()));
// // 更新已有人员 }
// if (CollectionUtils.isNotEmpty(result.getEmployeeDeclares())) { // 更新已有人员
if (CollectionUtils.isNotEmpty(result.getEmployeeDeclares())) {
result.getEmployeeDeclares().forEach(getEmployeeDeclareMapper()::updateIgnoreNull);
// updateBatchById(result.getEmployeeDeclares()); // updateBatchById(result.getEmployeeDeclares());
// } }
// // 记录日志 // // 记录日志
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>(); // LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId(refreshParam.getTaxAgentId() + "-" + refreshParam.getTaxCycle().toString()); // loggerContext.setTargetId(refreshParam.getTaxAgentId() + "-" + refreshParam.getTaxCycle().toString());

View File

@ -224,7 +224,7 @@ public class SalaryDateUtil {
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.setTime(localDate); c.setTime(localDate);
int year = c.get(Calendar.YEAR); int year = c.get(Calendar.YEAR);
return year ; return year;
} }
public static LocalDateRange localDate2Range(Date localDate) { public static LocalDateRange localDate2Range(Date localDate) {
@ -254,6 +254,7 @@ public class SalaryDateUtil {
cal.set(Calendar.DAY_OF_MONTH, last); cal.set(Calendar.DAY_OF_MONTH, last);
return cal.getTime(); return cal.getTime();
} }
public static Date getFirstDayDateOfMonthWithMinutesAndSeconds(final Date date) { public static Date getFirstDayDateOfMonthWithMinutesAndSeconds(final Date date) {
final Calendar cal = Calendar.getInstance(); final Calendar cal = Calendar.getInstance();
cal.setTime(date); cal.setTime(date);
@ -291,8 +292,6 @@ public class SalaryDateUtil {
} }
public static String getMonthBegin(String specifiedDay) { public static String getMonthBegin(String specifiedDay) {
int year; int year;
int month; int month;
@ -495,7 +494,7 @@ public class SalaryDateUtil {
localDate = format.parse(date); localDate = format.parse(date);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("日期解析异常,{}", date); log.error("日期解析异常,{}", date, e);
localDate = null; localDate = null;
} }
@ -514,7 +513,7 @@ public class SalaryDateUtil {
localDate = format.parse(date); localDate = format.parse(date);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("日期解析异常,{}", date); log.error("日期解析异常,{}", date, e);
localDate = null; localDate = null;
} }
@ -532,7 +531,7 @@ public class SalaryDateUtil {
localDate = format.parse(date); localDate = format.parse(date);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("日期解析异常,{}", date); log.error("日期解析异常,{}", date, e);
localDate = null; localDate = null;
} }
@ -563,9 +562,10 @@ public class SalaryDateUtil {
/** /**
* 转换时间对象 * 转换时间对象
* @see SalaryDateUtil#toDate(LocalDateTime, String) *
* @param dateTime LocalDateTime * @param dateTime LocalDateTime
* @return Date * @return Date
* @see SalaryDateUtil#toDate(LocalDateTime, String)
*/ */
public static Date toDate(LocalDateTime dateTime) { public static Date toDate(LocalDateTime dateTime) {
return toDate(dateTime, null); return toDate(dateTime, null);
@ -574,8 +574,9 @@ public class SalaryDateUtil {
/** /**
* 转换时间对象 * 转换时间对象
*
* @param dateTime LocalDateTime * @param dateTime LocalDateTime
* @param offset 时区e.g. +8 * @param offset 时区e.g. +8
* @return Date * @return Date
*/ */
public static Date toDate(LocalDateTime dateTime, String offset) { public static Date toDate(LocalDateTime dateTime, String offset) {

View File

@ -108,12 +108,12 @@ public class EmployeeDeclareWrapper extends Service {
*/ */
public Map<String, Object> list(EmployeeDeclareListQueryParam queryParam) { public Map<String, Object> list(EmployeeDeclareListQueryParam queryParam) {
ValidUtil.doValidator(queryParam); ValidUtil.doValidator(queryParam);
PageInfo<EmployeeDeclareListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), EmployeeDeclareListDTO.class);
List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareService(user).listByParam(queryParam); List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareService(user).listByParam(queryParam);
pageInfo.setTotal(employeeDeclarePOS.size());
employeeDeclarePOS = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), employeeDeclarePOS); employeeDeclarePOS = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), employeeDeclarePOS);
List<EmployeeDeclareListDTO> convert = getEmployeeDeclareService(user).convert(employeeDeclarePOS); List<EmployeeDeclareListDTO> convert = getEmployeeDeclareService(user).convert(employeeDeclarePOS);
PageInfo<EmployeeDeclareListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), EmployeeDeclareListDTO.class);
pageInfo.setList(convert); pageInfo.setList(convert);
pageInfo.setTotal(employeeDeclarePOS.size());
// // 判断是否开启分部 // // 判断是否开启分部
// boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey); // boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey);