Merge branch 'feature/次账号' into release/2.17.1.2411.01
# Conflicts: # src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java # src/com/engine/salary/sys/constant/SalarySysConstant.java
This commit is contained in:
commit
158e7dd20c
|
|
@ -0,0 +1,3 @@
|
|||
alter table hrsa_salary_acct_emp add account_type NUMBER;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
alter table hrsa_salary_acct_emp add account_type NUMBER;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
alter table hrsa_salary_acct_emp add account_type NUMBER;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD COLUMN account_type int(0);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
alter table hrsa_salary_acct_emp add account_type NUMBER
|
||||
/
|
||||
|
|
@ -0,0 +1 @@
|
|||
alter table hrsa_salary_acct_emp add account_type int;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD account_type int
|
||||
GO
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
alter table hrsa_salary_acct_emp add account_type NUMBER;
|
||||
/
|
||||
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -146,6 +146,8 @@ public class SalaryBillBO {
|
|||
.workcode(simpleEmployee.getWorkcode())
|
||||
.idNo(simpleEmployee.getIdNo())
|
||||
.statusName(simpleEmployee.getStatusName())
|
||||
.accountType(simpleEmployee.getAccountType())
|
||||
.accountTypeName(simpleEmployee.getAccountTypeName())
|
||||
.build();
|
||||
List<SalaryTemplateSalaryItemListDTO> items = employeeInformation.getItems();
|
||||
// 1.SalaryAcctResultBO.buildEmployeeFieldName()的取法
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -157,6 +157,13 @@ public class SalaryAcctEmployeePO {
|
|||
private List<Long> lockItems;
|
||||
|
||||
|
||||
/**
|
||||
* 主次账号 0/null:主账号 1:次账号
|
||||
*/
|
||||
private Integer accountType;
|
||||
|
||||
|
||||
|
||||
//--------条件----------
|
||||
//主键id集合
|
||||
private Collection<Long> ids;
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -121,4 +121,7 @@ public class SalaryArchiveListDTO {
|
|||
*/
|
||||
private String archiveStatus;
|
||||
|
||||
//主次账号 0/null:主账号 1:次账号
|
||||
private Integer accountType;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.engine.salary.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 账号类型
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @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<AccountTypeEnum> 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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)
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
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)
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
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)
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
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)
|
||||
|
||||
</select>
|
||||
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
||||
SELECT
|
||||
|
|
@ -108,7 +108,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)
|
||||
|
||||
</select>
|
||||
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
|
@ -120,7 +120,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)
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
|
@ -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)
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
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)
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
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)
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
</sql>
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@
|
|||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND e.status != '7'
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
<!-- 关键字(姓名、部门、个税扣缴义务人) -->
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND (
|
||||
|
|
@ -580,7 +580,7 @@
|
|||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND e.status != '7'
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
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)
|
||||
|
||||
<if test="param.keyword != null and param.keyword != ''">
|
||||
AND (
|
||||
e.lastname like '%'+#{param.keyword}+'%'
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.declare_month DESC
|
||||
</select>
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="taxAgentIds != null and taxAgentIds.size() != 0">
|
||||
and tax_agent_id in
|
||||
<foreach collection="taxAgentIds" item="taxAgentId" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.tax_year_month DESC
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@
|
|||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND e.status not in (7)
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND e.status not in (7)
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -297,7 +297,7 @@
|
|||
WHERE
|
||||
t1.delete_type = 0
|
||||
AND e.status not in (7)
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
|
|
@ -25,9 +26,10 @@
|
|||
e.workcode as workcode,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.accounttype as accountType,
|
||||
e.workyear as workYear
|
||||
from hrmresource e
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
where e.status not in (7)
|
||||
<if test="collection != null and collection.size()>0">
|
||||
AND e.id IN
|
||||
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
||||
|
|
@ -44,6 +46,7 @@
|
|||
e.workcode as workcode,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.accounttype as accountType,
|
||||
e.workyear as workYear
|
||||
from hrmresource e
|
||||
where e.status not in (7)
|
||||
|
|
@ -78,13 +81,14 @@
|
|||
e.certificatenum as idNo,
|
||||
e.enddate as dismissdate,
|
||||
e.workyear,
|
||||
e.accounttype as accountType,
|
||||
e.companyworkyear
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
where e.status not in (7)
|
||||
<if test="collection != null and collection.size()>0">
|
||||
AND e.id IN
|
||||
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
||||
|
|
@ -126,6 +130,7 @@
|
|||
c.id as jobtitleId,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.accounttype as accountType,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
job.id as jobcallId,
|
||||
|
|
@ -135,7 +140,7 @@
|
|||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
WHERE e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
WHERE e.status not in (7)
|
||||
<if test="params != null and params.size() > 0">
|
||||
AND ( 1=2
|
||||
<foreach collection="params" item="param">
|
||||
|
|
@ -184,10 +189,11 @@
|
|||
h.certificatenum as idNo,
|
||||
h.workcode as workcode,
|
||||
h.companystartdate as companystartdate,
|
||||
h.accounttype as accountType,
|
||||
h.mobile as mobile
|
||||
from hrmresourcevirtual v
|
||||
left join hrmresource h on v.resourceid=h.id
|
||||
WHERE h.status not in (7) and (h.accounttype is null or h.accounttype = 0)
|
||||
WHERE h.status not in (7)
|
||||
<if test="params != null and params.size() > 0">
|
||||
AND ( 1=2
|
||||
<foreach collection="params" item="param">
|
||||
|
|
@ -231,6 +237,7 @@
|
|||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.enddate as dismissdate,
|
||||
e.accounttype as accountType,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid
|
||||
from hrmresource e
|
||||
|
|
@ -238,7 +245,7 @@
|
|||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.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)
|
||||
|
||||
AND e.id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
@ -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)
|
||||
</select>
|
||||
|
||||
<select id="listAll" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
|
|
@ -298,6 +305,7 @@
|
|||
e.certificatenum as idNo,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.accounttype as accountType,
|
||||
e.subcompanyid1 as subcompanyid,
|
||||
e.departmentid as departmentId,
|
||||
d.DEPARTMENTNAME as departmentName,
|
||||
|
|
@ -305,7 +313,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)
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
|
@ -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)
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
|
@ -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)
|
||||
<if test="subCompanyIds != null and subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.declare_month DESC
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY t1.create_time desc
|
||||
</select>
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="taxAgentIds != null and taxAgentIds.size() != 0">
|
||||
AND t1.tax_agent_id IN
|
||||
<foreach collection="taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
|
||||
|
|
@ -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)
|
||||
|
||||
<include refid="paramSql"/>
|
||||
<if test="param.orderRule != null ">
|
||||
order by ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
<!-- 个税扣缴义务人 -->
|
||||
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>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)
|
||||
|
||||
<!-- 个税扣缴义务人 -->
|
||||
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>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)
|
||||
|
||||
<!-- 个税扣缴义务人 -->
|
||||
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
|
||||
AND t.tax_agent_id IN
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
<result column="jobcall_id" property="jobcallId"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="lock_items" property="lockItems" typeHandler="com.engine.salary.handle.SalaryListTypeHandler"/>
|
||||
<result column="account_type" property="accountType"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="SalaryAccEmployeeCountMap"
|
||||
|
|
@ -60,7 +61,8 @@
|
|||
t.jobcall,
|
||||
t.jobcall_id,
|
||||
t.status,
|
||||
t.lock_items
|
||||
t.lock_items,
|
||||
t.account_type
|
||||
</sql>
|
||||
|
||||
<sql id="emp1Column">
|
||||
|
|
@ -83,7 +85,8 @@
|
|||
jobtitle_id,
|
||||
jobcall,
|
||||
jobcall_id,
|
||||
status)
|
||||
status,
|
||||
account_type)
|
||||
VALUES
|
||||
<foreach collection="collection" item="emp" separator=",">
|
||||
(
|
||||
|
|
@ -107,7 +110,8 @@
|
|||
#{emp.jobtitleId},
|
||||
#{emp.jobcall},
|
||||
#{emp.jobcallId},
|
||||
#{emp.status}
|
||||
#{emp.status},
|
||||
#{emp.accountType}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -123,7 +127,9 @@
|
|||
jobtitle_id,
|
||||
jobcall,
|
||||
jobcall_id,
|
||||
status)
|
||||
status,
|
||||
account_type
|
||||
)
|
||||
<foreach collection="collection" item="emp" separator="union all">
|
||||
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
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -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}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -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)
|
||||
<if test="param.employeeName != null and param.employeeName != ''">
|
||||
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
|
||||
</if>
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="param.employeeName != null and param.employeeName != ''">
|
||||
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
|
||||
</if>
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="param.employeeName != null and param.employeeName != ''">
|
||||
AND em.lastname LIKE CONCAT('%',#{param.employeeName},'%')
|
||||
</if>
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="param.employeeName != null and param.employeeName != ''">
|
||||
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
|
||||
</if>
|
||||
|
|
@ -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)
|
||||
|
||||
<if test="param.employeeName != null and param.employeeName != ''">
|
||||
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
|
||||
</if>
|
||||
|
|
@ -1023,6 +1032,7 @@
|
|||
<result column="jobcall_id" property="jobcallId"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="lock_items" property="lockItems" typeHandler="com.engine.salary.handle.SalaryListTypeHandler"/>
|
||||
<result column="account_type" property="accountType"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
|
|
@ -1052,6 +1062,7 @@
|
|||
, t.jobcall_id
|
||||
, t.status
|
||||
, t.lock_items
|
||||
, t.account_type
|
||||
</sql>
|
||||
|
||||
|
||||
|
|
@ -1220,6 +1231,9 @@
|
|||
<if test="salaryAcctEmployeePO.status != null" >
|
||||
status=#{salaryAcctEmployeePO.status},
|
||||
</if>
|
||||
<if test="salaryAcctEmployeePO.accountType != null" >
|
||||
account_type=#{salaryAcctEmployeePO.accountType},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{salaryAcctEmployeePO.id} AND delete_type = 0
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@
|
|||
<select id="listEmployeeIds" resultType="long">
|
||||
SELECT id FROM hrmresource em
|
||||
WHERE em.status not in (7)
|
||||
and (em.accounttype is null or em.accounttype = 0)
|
||||
|
||||
<if test="params != null and params.size() > 0">
|
||||
AND ( 1=2
|
||||
<foreach collection="params" item="param">
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@
|
|||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
WHERE t.delete_type = 0
|
||||
and e.status not in (7)
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
<include refid="paramSqlCommon"/>
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
|
|
@ -681,7 +681,7 @@
|
|||
ON e.ID = l.resource_n
|
||||
WHERE(
|
||||
e.status != '5'
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
OR l.dismissdate IS NULL
|
||||
OR l.dismissdate = ''
|
||||
OR l.dismissdate
|
||||
|
|
@ -751,7 +751,7 @@
|
|||
<!-- ON e.ID = l.resource_n-->
|
||||
<!-- WHERE(-->
|
||||
<!-- e.status != '5'-->
|
||||
<!-- and (e.accounttype is null or e.accounttype = 0)-->
|
||||
<!-- -->
|
||||
<!-- OR l.dismissdate IS NULL-->
|
||||
<!-- OR l.dismissdate = ''-->
|
||||
<!-- OR l.dismissdate-->
|
||||
|
|
@ -1167,7 +1167,7 @@
|
|||
LEFT JOIN bill_hrmdismiss l ON e.ID = l.resource_n
|
||||
LEFT JOIN hrmdepartment d ON d.ID = e.departmentid
|
||||
WHERE
|
||||
e.STATUS = 5 and (e.accounttype is null or e.accounttype = 0) AND h.payment_status = 0
|
||||
e.STATUS = 5 AND h.payment_status = 0
|
||||
<include refid="likeCondition"/>
|
||||
AND(l.dismissdate IS NOT NULL)
|
||||
)AS t
|
||||
|
|
@ -1243,7 +1243,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.ID = e.departmentid
|
||||
WHERE
|
||||
e.STATUS not in (4,5,6,7)
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
|
||||
<include refid="likeCondition"/>
|
||||
AND(
|
||||
l.dismissdate IS NULL OR l.dismissdate = ''
|
||||
|
|
|
|||
|
|
@ -336,7 +336,6 @@
|
|||
LEFT JOIN bill_hrmdismiss f on a.id = f.resource_n
|
||||
WHERE
|
||||
a.status not in (7)
|
||||
and (a.accounttype is null or a.accounttype = 0)
|
||||
<include refid="paramSql"/>
|
||||
<include refid="paramSqlCommon"/>
|
||||
ORDER BY a.id asc
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.engine.salary.sys.constant.SalarySysConstant.OPEN_SECONDARY_ACCOUNT;
|
||||
import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX;
|
||||
|
||||
/**
|
||||
|
|
@ -132,6 +133,9 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
}
|
||||
|
||||
//主次账号是否开启
|
||||
boolean openSecondaryAccount = "1".equals(getSalarySysConfService(user).getValueByCode(OPEN_SECONDARY_ACCOUNT));
|
||||
|
||||
@Override
|
||||
public SalaryArchivePO getById(Long salaryArchiveId) {
|
||||
return salaryArchiveMapper.getById(salaryArchiveId);
|
||||
|
|
@ -195,6 +199,9 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
list = list.stream().filter(dto -> archiveIds.contains(dto.getId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
list = list.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(list);
|
||||
}
|
||||
|
||||
|
|
@ -499,6 +506,9 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
map.put("id", e.getId());
|
||||
map.put("username", e.getUsername());
|
||||
map.put("employeeId", e.getEmployeeId());
|
||||
if (openSecondaryAccount) {
|
||||
map.put("accountType", e.getAccountType() == null || e.getAccountType() == 0 ? "主账号" : "次账号");
|
||||
}
|
||||
|
||||
// Optional<Map<String, Object>> optionalTaxAgent = taxAgentData.stream().filter(f -> f.get("salaryArchiveId").toString().equals(e.getId().toString())).findFirst();
|
||||
TaxAgentPO taxAgentPO = longTaxAgentPOMap.get(e.getTaxAgentId());
|
||||
|
|
@ -800,7 +810,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(e.getId()));
|
||||
loggerContext.setTargetName( Optional.ofNullable(taxAgentMap.get(e.getTaxAgentId())).orElse(StringUtils.EMPTY) + bar + Optional.ofNullable(empMap.get(e.getEmployeeId())).orElse(StringUtils.EMPTY) );
|
||||
loggerContext.setTargetName(Optional.ofNullable(taxAgentMap.get(e.getTaxAgentId())).orElse(StringUtils.EMPTY) + bar + Optional.ofNullable(empMap.get(e.getEmployeeId())).orElse(StringUtils.EMPTY));
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(operatedesc);
|
||||
loggerContext.setOperatedesc(operatedesc);
|
||||
|
|
|
|||
|
|
@ -23,12 +23,13 @@ import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
|
|||
import com.engine.salary.enums.salarysob.TargetTypeEnum;
|
||||
import com.engine.salary.mapper.datacollection.EmployMapper;
|
||||
import com.engine.salary.mapper.hrm.ExpandFieldSettingsMapper;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.service.ExtEmpService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.SalarySobExtRangeService;
|
||||
import com.engine.salary.service.SalarySobRangeService;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
|
|
@ -44,6 +45,8 @@ import weaver.hrm.User;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.engine.salary.sys.constant.SalarySysConstant.OPEN_SECONDARY_ACCOUNT;
|
||||
|
||||
/**
|
||||
* 人员信息
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
|
|
@ -69,8 +72,8 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
private SalarySysConfService getSalarySysConfService(User user) {
|
||||
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -90,6 +93,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
boolean openExtEmp = true;
|
||||
|
||||
//主次账号是否开启
|
||||
boolean openSecondaryAccount = "1".equals(getSalarySysConfService(user).getValueByCode(OPEN_SECONDARY_ACCOUNT));
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listAll(UseEmployeeTypeEnum empType) {
|
||||
List<DataCollectionEmployee> result = new ArrayList<>();
|
||||
|
|
@ -103,6 +109,11 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
result.addAll(employBiz.listAll());
|
||||
result.addAll(getExtEmpService(user).listEmployee());
|
||||
}
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
result = result.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
SalaryI18nUtil.i18nList(result);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -113,6 +124,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
if (openExtEmp) {
|
||||
result.addAll(getExtEmpService(user).listAllForReport());
|
||||
}
|
||||
if (!openSecondaryAccount) {
|
||||
result = result.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
SalaryI18nUtil.i18nList(result);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -159,6 +173,10 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
includeSalaryEmployees.addAll(extEmps);
|
||||
}
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
includeSalaryEmployees = includeSalaryEmployees.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
SalaryI18nUtil.i18nList(includeSalaryEmployees);
|
||||
return includeSalaryEmployees;
|
||||
}
|
||||
|
|
@ -172,6 +190,11 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
if (openExtEmp) {
|
||||
employeeList.addAll(getExtEmpService(user).getEmployeeByIds(ids));
|
||||
}
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
employeeList = employeeList.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
SalaryI18nUtil.i18nList(employeeList);
|
||||
return employeeList;
|
||||
}
|
||||
|
|
@ -186,6 +209,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
result.addAll(getExtEmpService(user).getEmployeeByIds(ids));
|
||||
}
|
||||
result.addAll(employBiz.getEmployeeByIdsAll(ids));
|
||||
if (!openSecondaryAccount) {
|
||||
result = result.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
SalaryI18nUtil.i18nList(result);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -215,6 +241,10 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
employeeList.addAll(getExtEmpService(user).getEmployeeByIds(longs));
|
||||
}
|
||||
}
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
employeeList = employeeList.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employeeList);
|
||||
|
||||
}
|
||||
|
|
@ -232,6 +262,10 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
employeeList.addAll(getExtEmpService(user).getEmployeeByIds(longs));
|
||||
}
|
||||
}
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
employeeList = employeeList.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employeeList);
|
||||
|
||||
}
|
||||
|
|
@ -246,7 +280,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
employeeSameIds = employeeSameIds.stream()
|
||||
.filter(e -> UserStatusEnum.getNormalStatus().contains(e.getStatus()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
employeeSameIds = employeeSameIds.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employeeSameIds);
|
||||
}
|
||||
|
||||
|
|
@ -272,7 +308,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
employees = employeeList.stream().filter(e -> (StringUtils.isBlank(idNo) || Objects.equals(e.getIdNo(), idNo)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
employees = employees.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employees);
|
||||
|
||||
}
|
||||
|
|
@ -285,7 +323,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
*/
|
||||
@Override
|
||||
public String empValidType() {
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfService(user).getOneByCode("matchEmployeeMode");
|
||||
return (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
}
|
||||
|
||||
|
|
@ -346,6 +384,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
if (openExtEmp) {
|
||||
result.addAll(getExtEmpService(user).listEmployee());
|
||||
}
|
||||
if (!openSecondaryAccount) {
|
||||
result = result.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(result);
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +424,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
// 从hrmresource和hrmresourcevirtual可能获取到重复人员数据,需要根据人员id去重
|
||||
result = result.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(DataCollectionEmployee::getEmployeeId))), ArrayList::new));
|
||||
|
||||
if (!openSecondaryAccount) {
|
||||
result = result.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -428,6 +471,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
.forEach(e -> e.setExtendData(extendData));
|
||||
}
|
||||
}
|
||||
if (!openSecondaryAccount) {
|
||||
employees = employees.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employees);
|
||||
}
|
||||
|
||||
|
|
@ -531,7 +577,11 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
if (CollectionUtils.isEmpty(virtualDepartmentIds)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return getEmployMapper().listVirtualEmpByVirtualDepIds(virtualDepartmentIds);
|
||||
List<DataCollectionEmployee> employees = getEmployMapper().listVirtualEmpByVirtualDepIds(virtualDepartmentIds);
|
||||
if (!openSecondaryAccount) {
|
||||
employees = employees.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return employees;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -549,6 +599,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
if (openExtEmp) {
|
||||
employeeList.addAll(getExtEmpService(user).listBySubCompanyOrDepartment(subCompanyIds, departmentIds));
|
||||
}
|
||||
if (!openSecondaryAccount) {
|
||||
employeeList = employeeList.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employeeList);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO;
|
|||
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.AccountTypeEnum;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
|
|
@ -914,7 +915,29 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
}
|
||||
if (CollectionUtils.isNotEmpty(employeeInformation.getItems())) {
|
||||
//获取员工信息的字段名和中文描述的map关系
|
||||
SalaryFormulaEmployeeDTO salaryFormulaEmployeeDTO = SalaryFormulaEmployeeDTO.builder().employeeId(simpleEmployee.getEmployeeId()).birthday(simpleEmployee.getBirthday()).departmentId(simpleEmployee.getDepartmentId()).departmentName(simpleEmployee.getDepartmentName()).subcompanyName(simpleEmployee.getSubcompanyName()).subcompanyId(simpleEmployee.getSubcompanyid()).email(StringUtils.isEmpty(simpleEmployee.getEmail()) ? "" : simpleEmployee.getEmail()).jobcall(simpleEmployee.getJobcall()).jobcallId(simpleEmployee.getJobcallId()).companystartdate(simpleEmployee.getCompanystartdate()).sex("0".equals(simpleEmployee.getSex()) ? "男" : "女").mobile(StringUtils.isEmpty(simpleEmployee.getMobile()) ? "" : simpleEmployee.getMobile()).jobtitleName(simpleEmployee.getJobtitleName()).jobtitleId(simpleEmployee.getJobtitleId()).status(simpleEmployee.getStatus() == null ? "" : simpleEmployee.getStatus()).statusName(simpleEmployee.getStatus() == null ? "" : UserStatusEnum.parseByValue(new Integer(Util.null2s(simpleEmployee.getStatus(), "1"))).getDefaultLabel()).telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone()).username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername()).workcode(StringUtils.isEmpty(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode()).idNo(Util.null2String(simpleEmployee.getIdNo())).taxAgentName(taxAgentName).build();
|
||||
SalaryFormulaEmployeeDTO salaryFormulaEmployeeDTO = SalaryFormulaEmployeeDTO.builder().employeeId(simpleEmployee.getEmployeeId())
|
||||
.birthday(simpleEmployee.getBirthday())
|
||||
.departmentId(simpleEmployee.getDepartmentId())
|
||||
.departmentName(simpleEmployee.getDepartmentName())
|
||||
.subcompanyId(simpleEmployee.getSubcompanyid())
|
||||
.subcompanyName(simpleEmployee.getSubcompanyName())
|
||||
.email(StringUtils.isEmpty(simpleEmployee.getEmail()) ? "" : simpleEmployee.getEmail())
|
||||
.jobcall(simpleEmployee.getJobcall())
|
||||
.jobcallId(simpleEmployee.getJobcallId())
|
||||
.companystartdate(simpleEmployee.getCompanystartdate())
|
||||
.sex("0".equals(simpleEmployee.getSex()) ? "男" : "女")
|
||||
.mobile(StringUtils.isEmpty(simpleEmployee.getMobile()) ? "" : simpleEmployee.getMobile())
|
||||
.jobtitleName(simpleEmployee.getJobtitleName())
|
||||
.jobtitleId(simpleEmployee.getJobtitleId())
|
||||
.status(simpleEmployee.getStatus() == null ? "" : simpleEmployee.getStatus())
|
||||
.statusName(simpleEmployee.getStatus() == null ? "" : UserStatusEnum.parseByValue(new Integer(Util.null2s(simpleEmployee.getStatus(),"1"))).getDefaultLabel())
|
||||
.accountTypeName(simpleEmployee.getAccountType() == null ? "" : AccountTypeEnum.parseByValue(simpleEmployee.getAccountType()).getDefaultLabel())
|
||||
.telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone())
|
||||
.username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername())
|
||||
.workcode(StringUtils.isEmpty(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode())
|
||||
.idNo(Util.null2String(simpleEmployee.getIdNo()))
|
||||
.taxAgentName(taxAgentName)
|
||||
.build();
|
||||
List<SalaryTemplateSalaryItemListDTO> items = employeeInformation.getItems();
|
||||
Set<Map.Entry<String, String>> entries = employeeField.entrySet();
|
||||
for (SalaryTemplateSalaryItemListDTO e : items) {
|
||||
|
|
|
|||
|
|
@ -171,4 +171,9 @@ public class SalarySysConstant {
|
|||
* 薪资明细页面显示类型
|
||||
*/
|
||||
public static final String SALARY_DETAILS_REPORT_SHOW_TYPE = "SALARY_DETAILS_REPORT_SHOW_TYPE";
|
||||
|
||||
/**
|
||||
* 主次账号开启标识 1开启
|
||||
*/
|
||||
public static final String OPEN_SECONDARY_ACCOUNT = "openSecondaryAccount";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue