sqlserver的批量插入bug
This commit is contained in:
parent
3e9d02e78b
commit
16a4f32ec1
|
|
@ -376,6 +376,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_archive_item (
|
||||
salary_archive_id,
|
||||
employee_id,
|
||||
|
|
@ -392,7 +393,6 @@
|
|||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.salaryArchiveId},
|
||||
#{item.employeeId},
|
||||
|
|
|
|||
|
|
@ -461,6 +461,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_archive (
|
||||
id,
|
||||
employee_id,
|
||||
|
|
@ -470,7 +471,6 @@
|
|||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.employeeId},
|
||||
|
|
|
|||
|
|
@ -427,11 +427,11 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_archive_tax_agent (
|
||||
<include refid="salaryArchiveTaxAgentColumn"/>
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.salaryArchiveId},
|
||||
#{item.employeeId},
|
||||
|
|
|
|||
|
|
@ -607,6 +607,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertData" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_add_up_deduction(
|
||||
employee_id,
|
||||
tax_agent_id,
|
||||
|
|
@ -622,7 +623,6 @@
|
|||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.employeeId},
|
||||
#{item.taxAgentId},
|
||||
|
|
|
|||
|
|
@ -793,6 +793,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertData" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_add_up_situation(
|
||||
employee_id,
|
||||
tax_agent_id,
|
||||
|
|
@ -818,7 +819,6 @@
|
|||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.employeeId},
|
||||
#{item.taxAgentId},
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertData" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_attend_quote_data(
|
||||
id,
|
||||
employee_id,
|
||||
|
|
@ -355,7 +356,6 @@
|
|||
creator,
|
||||
tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.employeeId},
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertData" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_attend_quote_data_value(
|
||||
employee_id,
|
||||
attend_quote_id,
|
||||
|
|
@ -267,7 +268,6 @@
|
|||
creator,
|
||||
tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.employeeId},
|
||||
#{item.attendQuoteId},
|
||||
|
|
|
|||
|
|
@ -308,10 +308,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="saveBatch" databaseId="sqlserver">
|
||||
<foreach collection="saves" item="item" separator=";">
|
||||
INSERT INTO hrsa_attend_quote_field
|
||||
(field_name,source_type,field_type,enable_status,code,description,create_time,update_time,creator,delete_type,tenant_key)
|
||||
VALUES
|
||||
<foreach collection="saves" item="item" separator=",">
|
||||
(
|
||||
#{item.fieldName},
|
||||
#{item.sourceType},
|
||||
|
|
|
|||
|
|
@ -518,6 +518,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertData" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_other_deduction(
|
||||
employee_id,
|
||||
tax_agent_id,
|
||||
|
|
@ -532,7 +533,6 @@
|
|||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.employeeId},
|
||||
#{item.taxAgentId},
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_excel_acct_result( salary_sob_id, salary_acct_emp_id, salary_acct_record_id, employee_id,
|
||||
salary_item_id, result_value, creator, create_time, update_time,
|
||||
delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
salary_item_id, result_value, creator, create_time, update_time,
|
||||
delete_type, tenant_key)
|
||||
VALUES
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.salaryAcctEmpId},
|
||||
|
|
|
|||
|
|
@ -77,11 +77,11 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="emp" separator=";">
|
||||
INSERT INTO hrsa_salary_acct_emp(
|
||||
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
|
||||
creator, create_time, update_time, delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="emp" separator=",">
|
||||
(
|
||||
#{emp.salaryAcctRecordId},
|
||||
#{emp.salarySobId},
|
||||
|
|
|
|||
|
|
@ -379,10 +379,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_acct_result(id, salary_sob_id, salary_acct_emp_id, salary_acct_record_id, employee_id,
|
||||
tax_agent_id, salary_item_id, result_value, creator, create_time, update_time, delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.salarySobId},
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_acct_result_temp( salary_sob_id, salary_acct_emp_id, salary_acct_record_id, employee_id,
|
||||
tax_agent_id, salary_item_id, result_value, calculate_key, creator, create_time, update_time, delete_type,
|
||||
tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
tax_agent_id, salary_item_id, result_value, calculate_key, creator, create_time, update_time, delete_type,
|
||||
tenant_key)
|
||||
VALUES
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.salaryAcctEmpId},
|
||||
|
|
|
|||
|
|
@ -99,22 +99,22 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
INSERT INTO hrsa_salary_send_info (
|
||||
id,
|
||||
salary_send_id,
|
||||
salary_month,
|
||||
salary_acct_record_id,
|
||||
tax_agent_id,
|
||||
employee_id,
|
||||
send_status,
|
||||
creator,
|
||||
create_time,
|
||||
update_time,
|
||||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_send_info (
|
||||
id,
|
||||
salary_send_id,
|
||||
salary_month,
|
||||
salary_acct_record_id,
|
||||
tax_agent_id,
|
||||
employee_id,
|
||||
send_status,
|
||||
creator,
|
||||
create_time,
|
||||
update_time,
|
||||
tenant_key
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{item.id},
|
||||
#{item.salarySendId},
|
||||
#{item.salaryMonth},
|
||||
|
|
|
|||
|
|
@ -359,12 +359,12 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_item
|
||||
(name, code, system_type, sys_salary_item_id, use_default, use_in_employee_salary,
|
||||
rounding_mode, pattern, value_type, formula_id, description, can_edit, create_time,
|
||||
update_time, creator, delete_type, tenant_key, data_type)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(#{item.name}, #{item.code}, #{item.systemType}, #{item.sysSalaryItemId},
|
||||
#{item.useDefault}, #{item.useInEmployeeSalary}, #{item.roundingMode},
|
||||
#{item.pattern},
|
||||
|
|
|
|||
|
|
@ -286,12 +286,12 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" separator=";" item="item">
|
||||
INSERT INTO hrsa_salary_sob_adjust_rule
|
||||
(salary_sob_id, salary_item_id, day_of_month,
|
||||
before_adjustment_type, after_adjustment_type, creator, create_time, update_time,
|
||||
delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" separator="," item="item">
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.salaryItemId},
|
||||
|
|
|
|||
|
|
@ -324,10 +324,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_sob_check_rule(salary_sob_id, name, formula_id, description, create_time,
|
||||
update_time, creator, delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.name},
|
||||
|
|
|
|||
|
|
@ -266,11 +266,11 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO
|
||||
hrsa_salary_sob_emp_field(salary_sob_id, field_code, sorted_index, creator, create_time, update_time,
|
||||
delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.fieldCode},
|
||||
|
|
|
|||
|
|
@ -283,10 +283,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_sob_item_group( salary_sob_id, name, sorted_index, description, create_time,
|
||||
update_time, creator, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.name},
|
||||
|
|
|
|||
|
|
@ -336,10 +336,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_sob_item( salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id,
|
||||
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.salaryItemId},
|
||||
|
|
|
|||
|
|
@ -282,10 +282,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_sob_range( salary_sob_id, target_type, target_id, employee_status, include_type,
|
||||
creator, create_time, update_time, delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.salarySobId},
|
||||
#{item.targetType.value},
|
||||
|
|
|
|||
|
|
@ -411,13 +411,13 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="hrsa_bill_detail" databaseId="sqlserver">
|
||||
<foreach collection="accounts" item="item" separator=";">
|
||||
INSERT INTO hrsa_bill_detail
|
||||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,fund_pay_org,
|
||||
fund_account,supplement_fund_account,other_pay_org,social_scheme_id,social_payment_base_string,fund_scheme_id,fund_payment_base_string,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,
|
||||
fund_com_sum,other_com_json,other_com_sum,com_sum,social_sum,fund_sum,other_sum,total,creator,delete_type,create_time,update_time.tenant_key)
|
||||
VALUES
|
||||
<foreach collection="accounts" item="item" separator=",">
|
||||
(
|
||||
#{item.employeeId},
|
||||
#{item.billMonth},
|
||||
|
|
|
|||
|
|
@ -138,11 +138,11 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchSaveInspectDetails" databaseId="sqlserver">
|
||||
<foreach collection="pos" item="item" separator=";">
|
||||
INSERT INTO hrsa_bill_inspect
|
||||
(employee_id,bill_month,payment_status,inspect_status,supplementary_month,
|
||||
supplementary_projects,creator,delete_type,create_time,update_time.tenant_key)
|
||||
VALUES
|
||||
<foreach collection="pos" item="item" separator=",">
|
||||
(
|
||||
#{item.employeeId},
|
||||
#{item.billMonth},
|
||||
|
|
|
|||
|
|
@ -219,13 +219,13 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchSaveAccountTempDetails" databaseId="sqlserver">
|
||||
<foreach collection="accounts" item="item" separator=";">
|
||||
INSERT INTO hrsa_bill_detail_temp
|
||||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,fund_pay_org,
|
||||
fund_account,supplement_fund_account,other_pay_org,social_scheme_id,social_payment_base_string,fund_scheme_id,fund_payment_base_string,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,
|
||||
fund_com_sum,other_com_json,other_com_sum,com_sum,social_sum,fund_sum,other_sum,total,creator,delete_type,create_time,update_time.tenant_key)
|
||||
VALUES
|
||||
<foreach collection="accounts" item="item" separator=",">
|
||||
(
|
||||
#{item.employeeId},
|
||||
#{item.billMonth},
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchSave" databaseId="sqlserver">
|
||||
<foreach collection="fundSchemePOS" item="item" separator=";">
|
||||
INSERT INTO hrsa_fund_archives(
|
||||
fund_scheme_id,
|
||||
fund_account,
|
||||
|
|
@ -171,7 +172,6 @@
|
|||
welfare_type,
|
||||
employee_id)
|
||||
VALUES
|
||||
<foreach collection="fundSchemePOS" item="item" separator=",">
|
||||
(
|
||||
#{item.fundSchemeId},
|
||||
#{item.fundAccount},
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchSave" databaseId="sqlserver">
|
||||
<foreach collection="otherSchemePOS" item="item" separator=";">
|
||||
INSERT INTO hrsa_other_archives(
|
||||
other_scheme_id,
|
||||
other_start_time,
|
||||
|
|
@ -158,7 +159,6 @@
|
|||
payment_organization,
|
||||
other_payment_base_string)
|
||||
VALUES
|
||||
<foreach collection="otherSchemePOS" item="item" separator=",">
|
||||
(
|
||||
#{item.otherSchemeId},
|
||||
#{item.otherStartTime},
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchSave" databaseId="sqlserver">
|
||||
<foreach collection="socialSchemePOS" item="item" separator=";">
|
||||
INSERT INTO hrsa_social_archives(
|
||||
welfare_type,
|
||||
delete_type,
|
||||
|
|
@ -162,7 +163,6 @@
|
|||
social_account,
|
||||
payment_organization)
|
||||
VALUES
|
||||
<foreach collection="socialSchemePOS" item="item" separator=",">
|
||||
(
|
||||
#{item.welfareType},
|
||||
#{item.deleteType},
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" separator=";" item="item">
|
||||
INSERT INTO hrsa_tax_declaration(id, salary_month, tax_cycle, tax_agent_id, description,
|
||||
creator, create_time, update_time, delete_type, tenant_key)
|
||||
VALUES
|
||||
<foreach collection="collection" separator="," item="item">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.salaryMonth},
|
||||
|
|
|
|||
Loading…
Reference in New Issue