diff --git a/resource/sqlupgrade/DM/sql202410250303.sql b/resource/sqlupgrade/DM/sql202410250303.sql new file mode 100644 index 000000000..be178d1f8 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202410250303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_acct_emp add account_type NUMBER; +/ + diff --git a/resource/sqlupgrade/GS/sql202410250303.sql b/resource/sqlupgrade/GS/sql202410250303.sql new file mode 100644 index 000000000..be178d1f8 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202410250303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_acct_emp add account_type NUMBER; +/ + diff --git a/resource/sqlupgrade/JC/sql202410250303.sql b/resource/sqlupgrade/JC/sql202410250303.sql new file mode 100644 index 000000000..be178d1f8 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202410250303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_acct_emp add account_type NUMBER; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202410250303.sql b/resource/sqlupgrade/Mysql/sql202410250303.sql new file mode 100644 index 000000000..c1c7cb26c --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202410250303.sql @@ -0,0 +1 @@ +ALTER TABLE hrsa_salary_acct_emp ADD COLUMN account_type int(0); \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202410250303.sql b/resource/sqlupgrade/Oracle/sql202410250303.sql new file mode 100644 index 000000000..d70f10dc0 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202410250303.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_acct_emp add account_type NUMBER +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202410250303.sql b/resource/sqlupgrade/PG/sql202410250303.sql new file mode 100644 index 000000000..7d8b52851 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202410250303.sql @@ -0,0 +1 @@ +alter table hrsa_salary_acct_emp add account_type int; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202410250303.sql b/resource/sqlupgrade/SQLServer/sql202410250303.sql new file mode 100644 index 000000000..9235eb7dd --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202410250303.sql @@ -0,0 +1,2 @@ +ALTER TABLE hrsa_salary_acct_emp ADD account_type int +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202410250303.sql b/resource/sqlupgrade/ST/sql202410250303.sql new file mode 100644 index 000000000..be178d1f8 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202410250303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_acct_emp add account_type NUMBER; +/ + diff --git a/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java b/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java index a4ce08bb3..9203785c0 100644 --- a/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java +++ b/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java @@ -114,6 +114,17 @@ public class DataCollectionEmployee { @SalaryFormulaVar(defaultLabel = "证件号码", labelId = 98624, dataType = "string") private String idNo; + + @SalaryFormulaVar(defaultLabel = "账号类型", labelId = 98622, dataType = "string") + private String accountTypeName; + + /** + * 账号类型 + * 0/null:主账号 1:次账号 + */ + @SalaryFormulaVar(defaultLabel = "账号类型编码", labelId = 98622, dataType = "string") + private Integer accountType; + //是否是系统管理员 private Boolean isAdmin; diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index 499b3fa15..4e219c477 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -146,6 +146,8 @@ public class SalaryBillBO { .workcode(simpleEmployee.getWorkcode()) .idNo(simpleEmployee.getIdNo()) .statusName(simpleEmployee.getStatusName()) + .accountType(simpleEmployee.getAccountType()) + .accountTypeName(simpleEmployee.getAccountTypeName()) .build(); List items = employeeInformation.getItems(); // 1.SalaryAcctResultBO.buildEmployeeFieldName()的取法 diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java index c0c2dfa53..a8dbc514e 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java @@ -8,6 +8,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveTaxAgentDataDTO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.AccountTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; @@ -66,6 +67,7 @@ public class SalaryAcctEmployeeBO { .departmentId(e.getDepartmentId()) .departmentName(e.getDepartmentName()) .status(UserStatusEnum.getDefaultLabelByValue(NumberUtils.toInt(e.getStatus()))) + .accountType(AccountTypeEnum.getDefaultLabelByValue(e.getAccountType())) .mobile(simpleEmployee.getMobile()) .jobNum(simpleEmployee.getWorkcode()) .hireDate(simpleEmployee.getCompanystartdate()) @@ -110,6 +112,7 @@ public class SalaryAcctEmployeeBO { .subcompanyId(emp.getSubcompanyid()) .subcompanyName(emp.getSubcompanyName()) .status(emp.getStatus()) + .accountType(emp.getAccountType()) .creator(employeeId) .createTime(now) .updateTime(now) @@ -138,6 +141,8 @@ public class SalaryAcctEmployeeBO { simpleEmployee.setJobtitleName(acctEmployeePO.getJobtitleName()); simpleEmployee.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(acctEmployeePO.getStatus(), "1")))); simpleEmployee.setStatus(acctEmployeePO.getStatus()); + simpleEmployee.setAccountType(acctEmployeePO.getAccountType()); + simpleEmployee.setAccountTypeName(AccountTypeEnum.getDefaultLabelByValue(acctEmployeePO.getAccountType())); } diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctFormulaBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctFormulaBO.java index 32028e25a..cc19925b2 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctFormulaBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctFormulaBO.java @@ -92,6 +92,8 @@ public class SalaryAcctFormulaBO { .sex(sexName) .status(simpleEmployee.getStatus()) .statusName(simpleEmployee.getStatusName()) + .accountType(simpleEmployee.getAccountType()) + .accountTypeName(simpleEmployee.getAccountTypeName()) .departmentName(simpleEmployee.getDepartmentName()) .departmentId(simpleEmployee.getDepartmentId()) .subcompanyName(simpleEmployee.getSubcompanyName()) @@ -115,6 +117,8 @@ public class SalaryAcctFormulaBO { .sex(sexName) .status(simpleEmployee.getStatus()) .statusName(simpleEmployee.getStatusName()) + .accountType(simpleEmployee.getAccountType()) + .accountTypeName(simpleEmployee.getAccountTypeName()) .departmentName(salaryAcctEmployeePO.getDepartmentName()) .departmentId(salaryAcctEmployeePO.getDepartmentId()) .subcompanyName(salaryAcctEmployeePO.getSubcompanyName()) diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java index 1ad40c4f5..c80d67dfe 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java @@ -20,6 +20,7 @@ import com.engine.salary.entity.salarysob.dto.SalarySobItemDTO; import com.engine.salary.entity.salarysob.dto.SalarySobItemGroupDTO; import com.engine.salary.entity.salarysob.po.*; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.AccountTypeEnum; import com.engine.salary.enums.SalaryValueTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salaryaccounting.LockStatusEnum; @@ -310,6 +311,10 @@ public class SalaryAcctResultBO { map.put("status", e.getStatus()); } else if ("statusName".equals(salarySobEmpField.getFieldCode())) { map.put("statusName", UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(e.getStatus(), "1")))); + } else if ("accountType".equals(salarySobEmpField.getFieldCode())) { + map.put("accountType", e.getAccountType()); + } else if ("accountTypeName".equals(salarySobEmpField.getFieldCode())) { + map.put("accountTypeName", AccountTypeEnum.getDefaultLabelByValue(e.getAccountType())); } else { map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); } @@ -397,6 +402,10 @@ public class SalaryAcctResultBO { map.put("status", salaryAcctEmployee.getStatus()); } else if ("statusName".equals(salarySobEmpField.getFieldCode())) { map.put("statusName", UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(salaryAcctEmployee.getStatus(), "1")))); + } else if ("accountType".equals(salarySobEmpField.getFieldCode())) { + map.put("accountType", salaryAcctEmployee.getAccountType()); + } else if ("accountTypeName".equals(salarySobEmpField.getFieldCode())) { + map.put("accountTypeName", AccountTypeEnum.getDefaultLabelByValue(salaryAcctEmployee.getAccountType())); } else { map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); } diff --git a/src/com/engine/salary/entity/salaryacct/dto/SalaryAccEmployeeListDTO.java b/src/com/engine/salary/entity/salaryacct/dto/SalaryAccEmployeeListDTO.java index 5f9d256f8..40da19f1d 100644 --- a/src/com/engine/salary/entity/salaryacct/dto/SalaryAccEmployeeListDTO.java +++ b/src/com/engine/salary/entity/salaryacct/dto/SalaryAccEmployeeListDTO.java @@ -30,7 +30,7 @@ public class SalaryAccEmployeeListDTO { @TableTitle(title = "姓名", dataIndex = "employeeName", key = "employeeName") private String employeeName; - //个税扣缴义务人id") + //个税扣缴义务人id private Long taxAgentId; @@ -38,30 +38,28 @@ public class SalaryAccEmployeeListDTO { @TableTitle(title = "个税扣缴义务人", dataIndex = "taxAgentName", key = "taxAgentName") private String taxAgentName; - //部门id") + //部门id private Long departmentId; - //部门") @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName") private String departmentName; - //手机号 @TableTitle(title = "手机号", dataIndex = "mobile", key = "mobile") private String mobile; - //工号") @TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum") private String jobNum; - //员工状态") @TableTitle(title = "员工状态", dataIndex = "status", key = "status") private String status; + @TableTitle(title = "账号类型", dataIndex = "accountType", key = "accountType") + private String accountType; + - //入职日期") @TableTitle(title = "入职日期", dataIndex = "hireDate", key = "hireDate") private String hireDate; diff --git a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java index 87a2fb029..e9d0a10bc 100644 --- a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java +++ b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java @@ -157,6 +157,13 @@ public class SalaryAcctEmployeePO { private List lockItems; + /** + * 主次账号 0/null:主账号 1:次账号 + */ + private Integer accountType; + + + //--------条件---------- //主键id集合 private Collection ids; diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java index 2855c40d6..aa5ae2961 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java @@ -72,6 +72,7 @@ public class SalaryArchiveBO { employeeIdColumn.setDisplay(WeaBoolAttr.FALSE); columns.add(employeeIdColumn); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "username")); + columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(85429, "账号类型"), "accountType")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "taxAgentName")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "分部"), "subcompanyName")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "部门"), "departmentName")); diff --git a/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java b/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java index 1083ca4dd..7719f7c15 100644 --- a/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java +++ b/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java @@ -121,4 +121,7 @@ public class SalaryArchiveListDTO { */ private String archiveStatus; + //主次账号 0/null:主账号 1:次账号 + private Integer accountType; + } diff --git a/src/com/engine/salary/entity/salaryformula/dto/SalaryFormulaEmployeeDTO.java b/src/com/engine/salary/entity/salaryformula/dto/SalaryFormulaEmployeeDTO.java index e0c306341..4d92e4d67 100644 --- a/src/com/engine/salary/entity/salaryformula/dto/SalaryFormulaEmployeeDTO.java +++ b/src/com/engine/salary/entity/salaryformula/dto/SalaryFormulaEmployeeDTO.java @@ -69,6 +69,11 @@ public class SalaryFormulaEmployeeDTO { @SalaryFormulaVar(defaultLabel = "状态", labelId = 98622, dataType = "string") private String statusName; + @SalaryFormulaVar(defaultLabel = "账号类型", labelId = 98622, dataType = "string") + private String accountTypeName; + + @SalaryFormulaVar(defaultLabel = "账号类型编码", labelId = 98622, dataType = "string") + private Integer accountType; //工号 @SalaryFormulaVar(defaultLabel = "工号", labelId = 98622, dataType = "string") private String workcode; diff --git a/src/com/engine/salary/enums/AccountTypeEnum.java b/src/com/engine/salary/enums/AccountTypeEnum.java new file mode 100644 index 000000000..34368239c --- /dev/null +++ b/src/com/engine/salary/enums/AccountTypeEnum.java @@ -0,0 +1,68 @@ +package com.engine.salary.enums; + +import java.util.Arrays; +import java.util.Objects; +import java.util.Optional; + +/** + * 账号类型 + *

Copyright: Copyright (c) 2022

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ +public enum AccountTypeEnum implements BaseEnum { + + MAIN(0, "主账号", 1), + SECOND(1, "次账号", 1); + + private Integer value; + private String defaultLabel; + private int labelId; + + + AccountTypeEnum(Integer value, String defaultLabel, int labelId) { + this.value = value; + this.defaultLabel = defaultLabel; + this.labelId = labelId; + } + + @Override + public Integer getValue() { + return value; + } + + @Override + public String getDefaultLabel() { + return defaultLabel; + } + + @Override + public Integer getLabelId() { + return labelId; + } + + public static String getDefaultLabelByValue(Integer value) { + if (value == null) { + return MAIN.defaultLabel; + } + Optional optional = Arrays.stream(AccountTypeEnum.values()).filter(r -> r.getValue().equals(value)).findFirst(); + return optional.isPresent() ? optional.get().defaultLabel : ""; + } + + + public static AccountTypeEnum parseByValue(Integer value) { + if (value == null) { + return MAIN; + } + + for (AccountTypeEnum statusEnum : AccountTypeEnum.values()) { + if (Objects.equals(statusEnum.getValue(), value)) { + return statusEnum; + } + } + return MAIN; + } + +} diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.xml b/src/com/engine/salary/mapper/InsuranceExportMapper.xml index cc4934057..3a5397af8 100644 --- a/src/com/engine/salary/mapper/InsuranceExportMapper.xml +++ b/src/com/engine/salary/mapper/InsuranceExportMapper.xml @@ -23,7 +23,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -51,7 +51,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -79,7 +79,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -96,7 +96,7 @@ LEFT JOIN hrmresource e ON e.ID = a.employee_id LEFT JOIN hrmdepartment d ON d.id = e.departmentid where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -147,7 +147,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -176,7 +176,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -205,7 +205,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml index 259cb45d1..e9d06ab89 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml @@ -101,6 +101,7 @@ , e.enddate as dismissdate , e.status AS employeeStatus ,e.certificatenum as idNo + ,e.accounttype as accountType , d.departmentname AS departmentName , c.subcompanyname AS subcompanyName @@ -118,7 +119,7 @@ WHERE t.delete_type = 0 and t.employee_type is null and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.id IN @@ -222,7 +223,7 @@ WHERE t.delete_type = 0 and t.employee_type is null and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.id IN @@ -323,7 +324,7 @@ WHERE t.delete_type = 0 and t.employee_type is null and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.id IN diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml index 900888f9c..3639039e2 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml @@ -556,7 +556,7 @@ WHERE t1.delete_type = 0 AND e.status != '7' - and (e.accounttype is null or e.accounttype = 0) + AND ( @@ -580,7 +580,7 @@ WHERE t1.delete_type = 0 AND e.status != '7' - and (e.accounttype is null or e.accounttype = 0) + AND ( e.lastname like '%'||#{param.keyword}||'%' @@ -602,7 +602,7 @@ WHERE t1.delete_type = 0 AND e.status != '7' - and (e.accounttype is null or e.accounttype = 0) + AND ( e.lastname like '%'+#{param.keyword}+'%' diff --git a/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml index ebd2b723f..5393e4363 100644 --- a/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml @@ -96,7 +96,7 @@ from hrmresource e left join hrmdepartment d on e.departmentid = d.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -326,7 +326,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -347,7 +347,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -367,7 +367,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -649,7 +649,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.declare_month DESC @@ -664,7 +664,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + and tax_agent_id in diff --git a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml index 1a4e58158..2b5c45519 100644 --- a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml @@ -336,7 +336,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -360,7 +360,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -384,7 +384,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -405,7 +405,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.tax_year_month DESC diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml index 234d990b3..ca51de22a 100644 --- a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml @@ -261,7 +261,7 @@ WHERE t1.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -279,7 +279,7 @@ WHERE t1.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -297,7 +297,7 @@ WHERE t1.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index ae903a6a7..3a2ed14af 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -10,11 +10,12 @@ e.mobile, e.workcode, e.certificatenum as idNo, + e.accounttype as accountType, 'false' as extEmp from hrmresource e left join hrmdepartment d on e.departmentid = d.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -278,6 +285,7 @@ e.certificatenum as idNo, e.companystartdate as companystartdate, e.mobile as mobile, + e.accounttype as accountType, e.subcompanyid1 as subcompanyid, d.departmentname as departmentName, d.id as departmentId, @@ -287,7 +295,6 @@ left join hrmdepartment d on e.departmentid = d.id left join hrmjobtitles c on e.jobtitle = c.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) @@ -319,6 +327,7 @@ e.mobile as mobile, e.departmentid as departmentId, e.subcompanyid1 as subcompanyid, + e.accounttype as accountType, e.costcenterid as costcenterId, e.locationid as locationId, e.jobtitle as jobtitleId, @@ -327,7 +336,7 @@ from hrmresource e left join hrmdepartment d on e.departmentid = d.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -480,6 +489,7 @@ e.workcode as workcode, e.companystartdate as companystartdate, e.mobile as mobile, + e.accounttype as accountType, e.enddate as dismissdate from hrmresource e where e.status in (4,5,6) @@ -557,11 +567,12 @@ c.jobtitlename as jobtitleName, c.id as jobtitleId, e.companystartdate as companystartdate, + e.accounttype as accountType, e.mobile as mobile from hrmresource e left join hrmdepartment d on e.departmentid = d.id left join hrmjobtitles c on e.jobtitle = c.id - WHERE e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + WHERE e.status not in (7) AND e.subcompanyid1 IN @@ -580,6 +591,7 @@ resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee"> select e.RESOURCEID as employeeId, e.SUBCOMPANYID as subcompanyid, + h.accounttype as accountType, e.DEPARTMENTID as departmentId from hrmresourcevirtual e left join hrmresource h on e.RESOURCEID=h.id @@ -597,6 +609,7 @@ select e.RESOURCEID as employeeId, e.SUBCOMPANYID as subcompanyid, + h.accounttype as accountType, e.DEPARTMENTID as departmentId from hrmresourcevirtual e left join hrmresource h on e.RESOURCEID=h.id diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index 0afae02a2..f21fed4a1 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -280,7 +280,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -299,7 +299,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.declare_month DESC diff --git a/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml index ce701f1d9..442fe485e 100644 --- a/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml @@ -619,7 +619,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.create_time desc @@ -633,7 +633,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t1.tax_agent_id IN @@ -653,7 +653,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + order by ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} diff --git a/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml b/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml index 0070d0bdf..b9e9b94b4 100644 --- a/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml @@ -116,7 +116,7 @@ LEFT JOIN hrsa_tax_agent a ON t.tax_agent_id = a.id WHERE t.delete_type = 0 and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.tax_agent_id IN @@ -173,7 +173,7 @@ LEFT JOIN hrsa_tax_agent a ON t.tax_agent_id = a.id WHERE t.delete_type = 0 and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.tax_agent_id IN @@ -230,7 +230,7 @@ LEFT JOIN hrsa_tax_agent a ON t.tax_agent_id = a.id WHERE t.delete_type = 0 and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.tax_agent_id IN diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml index 352eb7416..9aeca4df9 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml @@ -26,6 +26,7 @@ + @@ -83,7 +85,8 @@ jobtitle_id, jobcall, jobcall_id, - status) + status, + account_type) VALUES ( @@ -107,7 +110,8 @@ #{emp.jobtitleId}, #{emp.jobcall}, #{emp.jobcallId}, - #{emp.status} + #{emp.status}, + #{emp.accountType} ) @@ -123,7 +127,9 @@ jobtitle_id, jobcall, jobcall_id, - status) + status, + account_type + ) select #{emp.salaryAcctRecordId,jdbcType=DOUBLE}, @@ -146,7 +152,8 @@ #{emp.jobtitleId,jdbcType=DOUBLE}, #{emp.jobcall,jdbcType=VARCHAR}, #{emp.jobcallId,jdbcType=DOUBLE}, - #{emp.status,jdbcType=VARCHAR} + #{emp.status,jdbcType=VARCHAR}, + #{emp.accountType,jdbcType=INTEGER} from dual @@ -163,7 +170,9 @@ jobtitle_id, jobcall, jobcall_id, - status) + status, + account_type + ) VALUES ( #{emp.salaryAcctRecordId}, @@ -186,7 +195,8 @@ #{emp.jobtitleId}, #{emp.jobcall}, #{emp.jobcallId}, - #{emp.status} + #{emp.status}, + #{emp.accountType} ) @@ -264,7 +274,6 @@ AND employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) AND em.lastname LIKE '%'||#{param.employeeName}||'%' @@ -345,7 +354,7 @@ AND employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE '%'+#{param.employeeName}+'%' @@ -618,7 +627,7 @@ AND t.employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE CONCAT('%',#{param.employeeName},'%') @@ -712,7 +721,7 @@ AND t.employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE '%'||#{param.employeeName}||'%' @@ -804,7 +813,7 @@ AND t.employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE '%'+#{param.employeeName}+'%' @@ -1023,6 +1032,7 @@ + @@ -1052,6 +1062,7 @@ , t.jobcall_id , t.status , t.lock_items + , t.account_type @@ -1220,6 +1231,9 @@ status=#{salaryAcctEmployeePO.status}, + + account_type=#{salaryAcctEmployeePO.accountType}, + WHERE id = #{salaryAcctEmployeePO.id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml index d46406ff5..e05bdf60f 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml +++ b/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml @@ -434,7 +434,7 @@