人员报送接口
This commit is contained in:
parent
0d8606c956
commit
d88c43c3c6
|
|
@ -119,7 +119,7 @@ public class EmployeeDeclareRefresh {
|
|||
.setCardNum(idNum)
|
||||
.setGender(StringUtils.equalsIgnoreCase(hrmEmployeeComInfo.getSex(), GenderEnum.MALE.name())
|
||||
? 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());
|
||||
if (StringUtils.isEmpty(idNum)) {
|
||||
employeeDeclare.setDeclareStatus(DeclareStatusEnum.DECLARE_FAIL.getValue());
|
||||
|
|
|
|||
|
|
@ -47,6 +47,15 @@ public interface EmployeeDeclareMapper {
|
|||
*/
|
||||
int insertIgnoreNull(EmployeeDeclarePO employeeDeclare);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*
|
||||
* @param employeeDeclare
|
||||
*/
|
||||
void batchInsert(@Param("collection") List<EmployeeDeclarePO> employeeDeclare);
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,43 +2,45 @@
|
|||
<!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">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
|
||||
<result column="id" property="id" />
|
||||
<result column="tax_agent_id" property="taxAgentId" />
|
||||
<result column="tax_cycle" property="taxCycle" />
|
||||
<result column="employee_id" property="employeeId" />
|
||||
<result column="employee_type" property="employeeType" />
|
||||
<result column="employee_name" property="employeeName" />
|
||||
<result column="job_num" property="jobNum" />
|
||||
<result column="card_type" property="cardType" />
|
||||
<result column="card_num" property="cardNum" />
|
||||
<result column="gender" property="gender" />
|
||||
<result column="birthday" property="birthday" />
|
||||
<result column="employment_status" property="employmentStatus" />
|
||||
<result column="mobile" property="mobile" />
|
||||
<result column="employment_type" property="employmentType" />
|
||||
<result column="employment_first_year" property="employmentFirstYear" />
|
||||
<result column="employment_date" property="employmentDate" />
|
||||
<result column="dismiss_date" property="dismissDate" />
|
||||
<result column="disability" property="disability" />
|
||||
<result column="disability_card_no" property="disabilityCardNo" />
|
||||
<result column="lonely_old" property="lonelyOld" />
|
||||
<result column="martyr_dependents" property="martyrDependents" />
|
||||
<result column="martyr_dependents_card_no" property="martyrDependentsCardNo" />
|
||||
<result column="deduct_expenses" property="deductExpenses" />
|
||||
<result column="successfully_declared" property="successfullyDeclared" />
|
||||
<result column="new_employee_info" property="newEmployeeInfo" />
|
||||
<result column="declare_status" property="declareStatus" />
|
||||
<result column="declare_error_msg" property="declareErrorMsg" />
|
||||
<result column="tenant_key" property="tenantKey" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="delete_type" property="deleteType" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="id" property="id"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<result column="tax_cycle" property="taxCycle"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="employee_type" property="employeeType"/>
|
||||
<result column="employee_name" property="employeeName"/>
|
||||
<result column="job_num" property="jobNum"/>
|
||||
<result column="card_type" property="cardType"/>
|
||||
<result column="card_num" property="cardNum"/>
|
||||
<result column="gender" property="gender"/>
|
||||
<result column="birthday" property="birthday"/>
|
||||
<result column="employment_status" property="employmentStatus"/>
|
||||
<result column="mobile" property="mobile"/>
|
||||
<result column="employment_type" property="employmentType"/>
|
||||
<result column="employment_first_year" property="employmentFirstYear"/>
|
||||
<result column="employment_date" property="employmentDate"/>
|
||||
<result column="dismiss_date" property="dismissDate"/>
|
||||
<result column="disability" property="disability"/>
|
||||
<result column="disability_card_no" property="disabilityCardNo"/>
|
||||
<result column="lonely_old" property="lonelyOld"/>
|
||||
<result column="martyr_dependents" property="martyrDependents"/>
|
||||
<result column="martyr_dependents_card_no" property="martyrDependentsCardNo"/>
|
||||
<result column="deduct_expenses" property="deductExpenses"/>
|
||||
<result column="successfully_declared" property="successfullyDeclared"/>
|
||||
<result column="new_employee_info" property="newEmployeeInfo"/>
|
||||
<result column="declare_status" property="declareStatus"/>
|
||||
<result column="declare_error_msg" property="declareErrorMsg"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t.id
|
||||
t
|
||||
.
|
||||
id
|
||||
, t.tax_agent_id
|
||||
, t.tax_cycle
|
||||
, t.employee_id
|
||||
|
|
@ -75,7 +77,7 @@
|
|||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_employee_declare t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
|
@ -83,15 +85,16 @@
|
|||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_employee_declare t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</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
|
||||
<include refid="baseColumns" />
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_employee_declare t
|
||||
WHERE delete_type = 0
|
||||
<if test="id != null">
|
||||
|
|
@ -306,105 +309,332 @@
|
|||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null" >
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="taxAgentId != null" >
|
||||
<if test="taxAgentId != null">
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxCycle != null" >
|
||||
<if test="taxCycle != null">
|
||||
#{taxCycle},
|
||||
</if>
|
||||
<if test="employeeId != null" >
|
||||
<if test="employeeId != null">
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null" >
|
||||
<if test="employeeType != null">
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="employeeName != null" >
|
||||
<if test="employeeName != null">
|
||||
#{employeeName},
|
||||
</if>
|
||||
<if test="jobNum != null" >
|
||||
<if test="jobNum != null">
|
||||
#{jobNum},
|
||||
</if>
|
||||
<if test="cardType != null" >
|
||||
<if test="cardType != null">
|
||||
#{cardType},
|
||||
</if>
|
||||
<if test="cardNum != null" >
|
||||
<if test="cardNum != null">
|
||||
#{cardNum},
|
||||
</if>
|
||||
<if test="gender != null" >
|
||||
<if test="gender != null">
|
||||
#{gender},
|
||||
</if>
|
||||
<if test="birthday != null" >
|
||||
<if test="birthday != null">
|
||||
#{birthday},
|
||||
</if>
|
||||
<if test="employmentStatus != null" >
|
||||
<if test="employmentStatus != null">
|
||||
#{employmentStatus},
|
||||
</if>
|
||||
<if test="mobile != null" >
|
||||
<if test="mobile != null">
|
||||
#{mobile},
|
||||
</if>
|
||||
<if test="employmentType != null" >
|
||||
<if test="employmentType != null">
|
||||
#{employmentType},
|
||||
</if>
|
||||
<if test="employmentFirstYear != null" >
|
||||
<if test="employmentFirstYear != null">
|
||||
#{employmentFirstYear},
|
||||
</if>
|
||||
<if test="employmentDate != null" >
|
||||
<if test="employmentDate != null">
|
||||
#{employmentDate},
|
||||
</if>
|
||||
<if test="dismissDate != null" >
|
||||
<if test="dismissDate != null">
|
||||
#{dismissDate},
|
||||
</if>
|
||||
<if test="disability != null" >
|
||||
<if test="disability != null">
|
||||
#{disability},
|
||||
</if>
|
||||
<if test="disabilityCardNo != null" >
|
||||
<if test="disabilityCardNo != null">
|
||||
#{disabilityCardNo},
|
||||
</if>
|
||||
<if test="lonelyOld != null" >
|
||||
<if test="lonelyOld != null">
|
||||
#{lonelyOld},
|
||||
</if>
|
||||
<if test="martyrDependents != null" >
|
||||
<if test="martyrDependents != null">
|
||||
#{martyrDependents},
|
||||
</if>
|
||||
<if test="martyrDependentsCardNo != null" >
|
||||
<if test="martyrDependentsCardNo != null">
|
||||
#{martyrDependentsCardNo},
|
||||
</if>
|
||||
<if test="deductExpenses != null" >
|
||||
<if test="deductExpenses != null">
|
||||
#{deductExpenses},
|
||||
</if>
|
||||
<if test="successfullyDeclared != null" >
|
||||
<if test="successfullyDeclared != null">
|
||||
#{successfullyDeclared},
|
||||
</if>
|
||||
<if test="newEmployeeInfo != null" >
|
||||
<if test="newEmployeeInfo != null">
|
||||
#{newEmployeeInfo},
|
||||
</if>
|
||||
<if test="declareStatus != null" >
|
||||
<if test="declareStatus != null">
|
||||
#{declareStatus},
|
||||
</if>
|
||||
<if test="declareErrorMsg != null" >
|
||||
<if test="declareErrorMsg != null">
|
||||
#{declareErrorMsg},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</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 hrsa_employee_declare
|
||||
|
|
@ -449,97 +679,97 @@
|
|||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
|
||||
UPDATE hrsa_employee_declare
|
||||
<set>
|
||||
<if test="taxAgentId != null" >
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxCycle != null" >
|
||||
<if test="taxCycle != null">
|
||||
tax_cycle=#{taxCycle},
|
||||
</if>
|
||||
<if test="employeeId != null" >
|
||||
<if test="employeeId != null">
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null" >
|
||||
<if test="employeeType != null">
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="employeeName != null" >
|
||||
<if test="employeeName != null">
|
||||
employee_name=#{employeeName},
|
||||
</if>
|
||||
<if test="jobNum != null" >
|
||||
<if test="jobNum != null">
|
||||
job_num=#{jobNum},
|
||||
</if>
|
||||
<if test="cardType != null" >
|
||||
<if test="cardType != null">
|
||||
card_type=#{cardType},
|
||||
</if>
|
||||
<if test="cardNum != null" >
|
||||
<if test="cardNum != null">
|
||||
card_num=#{cardNum},
|
||||
</if>
|
||||
<if test="gender != null" >
|
||||
<if test="gender != null">
|
||||
gender=#{gender},
|
||||
</if>
|
||||
<if test="birthday != null" >
|
||||
<if test="birthday != null">
|
||||
birthday=#{birthday},
|
||||
</if>
|
||||
<if test="employmentStatus != null" >
|
||||
<if test="employmentStatus != null">
|
||||
employment_status=#{employmentStatus},
|
||||
</if>
|
||||
<if test="mobile != null" >
|
||||
<if test="mobile != null">
|
||||
mobile=#{mobile},
|
||||
</if>
|
||||
<if test="employmentType != null" >
|
||||
<if test="employmentType != null">
|
||||
employment_type=#{employmentType},
|
||||
</if>
|
||||
<if test="employmentFirstYear != null" >
|
||||
<if test="employmentFirstYear != null">
|
||||
employment_first_year=#{employmentFirstYear},
|
||||
</if>
|
||||
<if test="employmentDate != null" >
|
||||
<if test="employmentDate != null">
|
||||
employment_date=#{employmentDate},
|
||||
</if>
|
||||
<if test="dismissDate != null" >
|
||||
<if test="dismissDate != null">
|
||||
dismiss_date=#{dismissDate},
|
||||
</if>
|
||||
<if test="disability != null" >
|
||||
<if test="disability != null">
|
||||
disability=#{disability},
|
||||
</if>
|
||||
<if test="disabilityCardNo != null" >
|
||||
<if test="disabilityCardNo != null">
|
||||
disability_card_no=#{disabilityCardNo},
|
||||
</if>
|
||||
<if test="lonelyOld != null" >
|
||||
<if test="lonelyOld != null">
|
||||
lonely_old=#{lonelyOld},
|
||||
</if>
|
||||
<if test="martyrDependents != null" >
|
||||
<if test="martyrDependents != null">
|
||||
martyr_dependents=#{martyrDependents},
|
||||
</if>
|
||||
<if test="martyrDependentsCardNo != null" >
|
||||
<if test="martyrDependentsCardNo != null">
|
||||
martyr_dependents_card_no=#{martyrDependentsCardNo},
|
||||
</if>
|
||||
<if test="deductExpenses != null" >
|
||||
<if test="deductExpenses != null">
|
||||
deduct_expenses=#{deductExpenses},
|
||||
</if>
|
||||
<if test="successfullyDeclared != null" >
|
||||
<if test="successfullyDeclared != null">
|
||||
successfully_declared=#{successfullyDeclared},
|
||||
</if>
|
||||
<if test="newEmployeeInfo != null" >
|
||||
<if test="newEmployeeInfo != null">
|
||||
new_employee_info=#{newEmployeeInfo},
|
||||
</if>
|
||||
<if test="declareStatus != null" >
|
||||
<if test="declareStatus != null">
|
||||
declare_status=#{declareStatus},
|
||||
</if>
|
||||
<if test="declareErrorMsg != null" >
|
||||
<if test="declareErrorMsg != null">
|
||||
declare_error_msg=#{declareErrorMsg},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
|
|
@ -551,12 +781,13 @@
|
|||
<delete id="delete" parameterType="com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO">
|
||||
UPDATE hrsa_employee_declare
|
||||
SET delete_type=1
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_employee_declare
|
||||
SET delete_type=1,
|
||||
update_time = #{date}
|
||||
update_time = #{date}
|
||||
WHERE delete_type = 0
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
|
|
@ -633,20 +864,20 @@
|
|||
<if test="param.deductExpenses != null">
|
||||
AND deduct_expenses = #{param.deductExpenses.value}
|
||||
</if>
|
||||
<!-- <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 (-->
|
||||
<!-- <foreach collection="param.departmentIds" item="departmentId" separator=",">-->
|
||||
<!-- #{departmentId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- ))-->
|
||||
<!-- </if>-->
|
||||
<!-- <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 (-->
|
||||
<!-- <foreach collection="param.positionIds" item="positionId" separator=",">-->
|
||||
<!-- #{positionId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- ))-->
|
||||
<!-- </if>-->
|
||||
<!-- <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 (-->
|
||||
<!-- <foreach collection="param.departmentIds" item="departmentId" separator=",">-->
|
||||
<!-- #{departmentId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- ))-->
|
||||
<!-- </if>-->
|
||||
<!-- <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 (-->
|
||||
<!-- <foreach collection="param.positionIds" item="positionId" separator=",">-->
|
||||
<!-- #{positionId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- ))-->
|
||||
<!-- </if>-->
|
||||
<include refid="KeywordSql"/>
|
||||
</sql>
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,12 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</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
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -498,14 +498,16 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla
|
|||
// .setSimpleUserInfos(newSimpleUserInfos)
|
||||
// .setExtEmployees(newExtEmployees)
|
||||
EmployeeDeclareRefresh.Result result = EmployeeDeclareRefresh.refresh(dto, employeeId);
|
||||
// // 保存新增的人员
|
||||
// if (CollectionUtils.isNotEmpty(result.getNewEmployeeDeclares())) {
|
||||
// saveBatch(result.getNewEmployeeDeclares());
|
||||
// }
|
||||
// // 更新已有人员
|
||||
// if (CollectionUtils.isNotEmpty(result.getEmployeeDeclares())) {
|
||||
// 保存新增的人员
|
||||
if (CollectionUtils.isNotEmpty(result.getNewEmployeeDeclares())) {
|
||||
result.getNewEmployeeDeclares().forEach(getEmployeeDeclareMapper()::insertIgnoreNull);
|
||||
// getEmployeeDeclareMapper().batchInsert((result.getNewEmployeeDeclares()));
|
||||
}
|
||||
// 更新已有人员
|
||||
if (CollectionUtils.isNotEmpty(result.getEmployeeDeclares())) {
|
||||
result.getEmployeeDeclares().forEach(getEmployeeDeclareMapper()::updateIgnoreNull);
|
||||
// updateBatchById(result.getEmployeeDeclares());
|
||||
// }
|
||||
}
|
||||
// // 记录日志
|
||||
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(refreshParam.getTaxAgentId() + "-" + refreshParam.getTaxCycle().toString());
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ public class SalaryDateUtil {
|
|||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(localDate);
|
||||
int year = c.get(Calendar.YEAR);
|
||||
return year ;
|
||||
return year;
|
||||
}
|
||||
|
||||
public static LocalDateRange localDate2Range(Date localDate) {
|
||||
|
|
@ -254,6 +254,7 @@ public class SalaryDateUtil {
|
|||
cal.set(Calendar.DAY_OF_MONTH, last);
|
||||
return cal.getTime();
|
||||
}
|
||||
|
||||
public static Date getFirstDayDateOfMonthWithMinutesAndSeconds(final Date date) {
|
||||
final Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
|
|
@ -291,8 +292,6 @@ public class SalaryDateUtil {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getMonthBegin(String specifiedDay) {
|
||||
int year;
|
||||
int month;
|
||||
|
|
@ -495,7 +494,7 @@ public class SalaryDateUtil {
|
|||
localDate = format.parse(date);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("日期解析异常,{}", date);
|
||||
log.error("日期解析异常,{}", date, e);
|
||||
localDate = null;
|
||||
}
|
||||
|
||||
|
|
@ -514,7 +513,7 @@ public class SalaryDateUtil {
|
|||
localDate = format.parse(date);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("日期解析异常,{}", date);
|
||||
log.error("日期解析异常,{}", date, e);
|
||||
localDate = null;
|
||||
}
|
||||
|
||||
|
|
@ -532,7 +531,7 @@ public class SalaryDateUtil {
|
|||
localDate = format.parse(date);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("日期解析异常,{}", date);
|
||||
log.error("日期解析异常,{}", date, e);
|
||||
localDate = null;
|
||||
}
|
||||
|
||||
|
|
@ -563,9 +562,10 @@ public class SalaryDateUtil {
|
|||
|
||||
/**
|
||||
* 转换时间对象
|
||||
* @see SalaryDateUtil#toDate(LocalDateTime, String)
|
||||
*
|
||||
* @param dateTime LocalDateTime
|
||||
* @return Date
|
||||
* @see SalaryDateUtil#toDate(LocalDateTime, String)
|
||||
*/
|
||||
public static Date toDate(LocalDateTime dateTime) {
|
||||
return toDate(dateTime, null);
|
||||
|
|
@ -574,8 +574,9 @@ public class SalaryDateUtil {
|
|||
|
||||
/**
|
||||
* 转换时间对象
|
||||
*
|
||||
* @param dateTime LocalDateTime
|
||||
* @param offset 时区,e.g. +8
|
||||
* @param offset 时区,e.g. +8
|
||||
* @return Date
|
||||
*/
|
||||
public static Date toDate(LocalDateTime dateTime, String offset) {
|
||||
|
|
|
|||
|
|
@ -108,12 +108,12 @@ public class EmployeeDeclareWrapper extends Service {
|
|||
*/
|
||||
public Map<String, Object> list(EmployeeDeclareListQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
PageInfo<EmployeeDeclareListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), EmployeeDeclareListDTO.class);
|
||||
List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareService(user).listByParam(queryParam);
|
||||
pageInfo.setTotal(employeeDeclarePOS.size());
|
||||
employeeDeclarePOS = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), employeeDeclarePOS);
|
||||
List<EmployeeDeclareListDTO> convert = getEmployeeDeclareService(user).convert(employeeDeclarePOS);
|
||||
PageInfo<EmployeeDeclareListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), EmployeeDeclareListDTO.class);
|
||||
pageInfo.setList(convert);
|
||||
pageInfo.setTotal(employeeDeclarePOS.size());
|
||||
|
||||
// // 判断是否开启分部
|
||||
// boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey);
|
||||
|
|
|
|||
Loading…
Reference in New Issue