diff --git a/resource/sqlupgrade/DM/sql202308160103.sql b/resource/sqlupgrade/DM/sql202308160103.sql deleted file mode 100644 index 99fd849d7..000000000 --- a/resource/sqlupgrade/DM/sql202308160103.sql +++ /dev/null @@ -1,23 +0,0 @@ -create table hrsa_acct_tax_agent -( - id number primary key , - create_time date, - update_time date, - creator number, - delete_type int default 0, - tenant_key varchar2(10), - salary_acct_record_id number, - tax_agent_id number, - salary_month date, - tax_cycle date, -income_category varchar2(100) -); -/ - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, income_category, tax_agent_id, tax_cycle); -/ - diff --git a/resource/sqlupgrade/DM/sql202308230303.sql b/resource/sqlupgrade/DM/sql202308230303.sql new file mode 100644 index 000000000..311a2bf86 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202308230303.sql @@ -0,0 +1,3 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416; +/ + diff --git a/resource/sqlupgrade/GS/sql202308160103.sql b/resource/sqlupgrade/GS/sql202308160103.sql deleted file mode 100644 index 99fd849d7..000000000 --- a/resource/sqlupgrade/GS/sql202308160103.sql +++ /dev/null @@ -1,23 +0,0 @@ -create table hrsa_acct_tax_agent -( - id number primary key , - create_time date, - update_time date, - creator number, - delete_type int default 0, - tenant_key varchar2(10), - salary_acct_record_id number, - tax_agent_id number, - salary_month date, - tax_cycle date, -income_category varchar2(100) -); -/ - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, income_category, tax_agent_id, tax_cycle); -/ - diff --git a/resource/sqlupgrade/GS/sql202308230303.sql b/resource/sqlupgrade/GS/sql202308230303.sql new file mode 100644 index 000000000..311a2bf86 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202308230303.sql @@ -0,0 +1,3 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416; +/ + diff --git a/resource/sqlupgrade/JC/sql202308160103.sql b/resource/sqlupgrade/JC/sql202308160103.sql deleted file mode 100644 index 99fd849d7..000000000 --- a/resource/sqlupgrade/JC/sql202308160103.sql +++ /dev/null @@ -1,23 +0,0 @@ -create table hrsa_acct_tax_agent -( - id number primary key , - create_time date, - update_time date, - creator number, - delete_type int default 0, - tenant_key varchar2(10), - salary_acct_record_id number, - tax_agent_id number, - salary_month date, - tax_cycle date, -income_category varchar2(100) -); -/ - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, income_category, tax_agent_id, tax_cycle); -/ - diff --git a/resource/sqlupgrade/JC/sql202308230303.sql b/resource/sqlupgrade/JC/sql202308230303.sql new file mode 100644 index 000000000..311a2bf86 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202308230303.sql @@ -0,0 +1,3 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202308160103.sql b/resource/sqlupgrade/Mysql/sql202308160103.sql deleted file mode 100644 index 877dd233d..000000000 --- a/resource/sqlupgrade/Mysql/sql202308160103.sql +++ /dev/null @@ -1,22 +0,0 @@ -create table hrsa_acct_tax_agent -( - id bigint primary key comment 'ID' , - create_time datetime comment '创建时间' , - update_time datetime comment '修改时间' , - creator bigint comment '创建人id' , - delete_type int default 0 comment '是否删除' , - tenant_key varchar(10) comment '租户KEY' , - salary_acct_record_id bigint comment '薪资核算记录的id' , - tax_agent_id bigint comment '个税扣缴义务人的id' , - salary_month datetime comment '薪资所属月' , - tax_cycle datetime comment '税款所属期' , - income_category varchar(100) -) -; - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, tax_agent_id, tax_cycle) -; \ No newline at end of file diff --git a/resource/sqlupgrade/Mysql/sql202308230303.sql b/resource/sqlupgrade/Mysql/sql202308230303.sql new file mode 100644 index 000000000..ba8b047ae --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202308230303.sql @@ -0,0 +1 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202308160103.sql b/resource/sqlupgrade/Oracle/sql202308160103.sql deleted file mode 100644 index efcd65cef..000000000 --- a/resource/sqlupgrade/Oracle/sql202308160103.sql +++ /dev/null @@ -1,23 +0,0 @@ -create table hrsa_acct_tax_agent -( - id number primary key , - create_time date, - update_time date, - creator number, - delete_type int default 0, - tenant_key varchar2(10), - salary_acct_record_id number, - tax_agent_id number, - salary_month date, - tax_cycle date, -income_category varchar2(100) -) -/ - - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, income_category, tax_agent_id, tax_cycle) -/ \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202308230303.sql b/resource/sqlupgrade/Oracle/sql202308230303.sql new file mode 100644 index 000000000..1f5c3dd15 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202308230303.sql @@ -0,0 +1,2 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416 +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202308160103.sql b/resource/sqlupgrade/PG/sql202308160103.sql deleted file mode 100644 index 32f325165..000000000 --- a/resource/sqlupgrade/PG/sql202308160103.sql +++ /dev/null @@ -1,22 +0,0 @@ -create table hrsa_acct_tax_agent -( - id bigint primary key , - create_time timestamp, - update_time timestamp, - creator bigint, - delete_type int default 0, - tenant_key varchar(10), - salary_acct_record_id bigint, - tax_agent_id bigint, - salary_month timestamp, - tax_cycle timestamp, -income_category varchar(100) -); -/ - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, income_category, tax_agent_id, tax_cycle); -/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202308230303.sql b/resource/sqlupgrade/PG/sql202308230303.sql new file mode 100644 index 000000000..ba8b047ae --- /dev/null +++ b/resource/sqlupgrade/PG/sql202308230303.sql @@ -0,0 +1 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202308160103.sql b/resource/sqlupgrade/SQLServer/sql202308160103.sql deleted file mode 100644 index b9219cc81..000000000 --- a/resource/sqlupgrade/SQLServer/sql202308160103.sql +++ /dev/null @@ -1,22 +0,0 @@ -create table hrsa_acct_tax_agent -( - id bigint primary key , - create_time datetime, - update_time datetime, - creator bigint, - delete_type int default 0, - tenant_key nvarchar(10), - salary_acct_record_id bigint, - tax_agent_id bigint, - salary_month datetime, - tax_cycle datetime, -income_category nvarchar(100) -) -GO - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, income_category, tax_agent_id, tax_cycle) -GO \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202308230303.sql b/resource/sqlupgrade/SQLServer/sql202308230303.sql new file mode 100644 index 000000000..61cc33829 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202308230303.sql @@ -0,0 +1,2 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416 +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202308160103.sql b/resource/sqlupgrade/ST/sql202308160103.sql deleted file mode 100644 index 99fd849d7..000000000 --- a/resource/sqlupgrade/ST/sql202308160103.sql +++ /dev/null @@ -1,23 +0,0 @@ -create table hrsa_acct_tax_agent -( - id number primary key , - create_time date, - update_time date, - creator number, - delete_type int default 0, - tenant_key varchar2(10), - salary_acct_record_id number, - tax_agent_id number, - salary_month date, - tax_cycle date, -income_category varchar2(100) -); -/ - -insert into hrsa_acct_tax_agent(id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle) -select id, create_time, update_time, creator, tenant_key, salary_acct_record_id, income_category, tax_agent_id, salary_month, tax_cycle -from hrsa_salary_acct_emp -where delete_type = 0 - and id in (select max(id) from hrsa_salary_acct_emp group by salary_acct_record_id, income_category, tax_agent_id, tax_cycle); -/ - diff --git a/resource/sqlupgrade/ST/sql202308230303.sql b/resource/sqlupgrade/ST/sql202308230303.sql new file mode 100644 index 000000000..311a2bf86 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202308230303.sql @@ -0,0 +1,3 @@ +update hrsa_salary_sob_default_item set delete_type=1 where sys_salary_item_id = 700769462612156416; +/ + diff --git a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java index 169b54bb8..1dda1ac54 100644 --- a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java @@ -398,6 +398,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe SalarySobItemPO salarySobItemPO = SalarySobItemPO.builder() .salarySobId(salarySobId) .salaryItemId(itemParam.getSalaryItemId()) + .salaryItemCode(salaryItemPO.getCode()) .salarySobItemGroupId(salarySobItemGroupId) .formulaId(Optional.ofNullable(itemParam.getFormulaId()).orElse(NumberUtils.LONG_ZERO)) .sortedIndex(itemParam.getSortedIndex()) @@ -477,6 +478,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe SalarySobItemPO salarySobItemPO = SalarySobItemPO.builder() .salarySobId(salarySobId) .salaryItemId(itemParam.getSalaryItemId()) + .salaryItemCode(salaryItemPO.getCode()) .salarySobItemGroupId(groupId) .formulaId(Optional.ofNullable(itemParam.getFormulaId()).orElse(NumberUtils.LONG_ZERO)) .canDelete(itemParam.getCanDelete() == null ? NumberUtils.INTEGER_ONE : (itemParam.getCanDelete() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO)) @@ -515,6 +517,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe SalarySobItemPO salarySobItemPO = SalarySobItemPO.builder() .id(itemParam.getId()) .salaryItemId(itemParam.getSalaryItemId()) + .salaryItemCode(salaryItemPO.getCode()) .salarySobItemGroupId(groupId) .formulaId(Optional.ofNullable(itemParam.getFormulaId()).orElse(NumberUtils.LONG_ZERO)) .sortedIndex(itemParam.getSortedIndex()) @@ -567,6 +570,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe SalarySobItemPO salarySobItemPO = SalarySobItemPO.builder() .salarySobId(salarySobId) .salaryItemId(itemParam.getSalaryItemId()) + .salaryItemCode(salaryItemPO.getCode()) .salarySobItemGroupId(NumberUtils.LONG_ZERO) .formulaId(Optional.ofNullable(itemParam.getFormulaId()).orElse(NumberUtils.LONG_ZERO)) .sortedIndex(itemParam.getSortedIndex())