From 1568b1e03df23ff2287a8ad14ab4e7be90d55e4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Wed, 1 Mar 2023 09:05:03 +0800
Subject: [PATCH 01/86] =?UTF-8?q?=E5=A4=96=E9=83=A8=E4=BA=BA=E5=91=98?=
=?UTF-8?q?=E5=9F=BA=E7=A1=80=E7=B1=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/com/api/salary/web/ExtEmpController.java | 8 +
.../entity/extemp/param/ExtEmpQueryParam.java | 27 +
.../salary/entity/extemp/po/ExtEmpPO.java | 123 +++++
.../mapper/extemp/ExternalEmployeeMapper.java | 64 +++
.../mapper/extemp/ExternalEmployeeMapper.xml | 468 ++++++++++++++++++
.../engine/salary/service/ExtEmpService.java | 19 +
.../service/impl/ExtEmpServiceImpl.java | 51 ++
.../engine/salary/web/ExtEmpController.java | 15 +
.../engine/salary/wrapper/ExtEmpWrapper.java | 48 ++
9 files changed, 823 insertions(+)
create mode 100644 src/com/api/salary/web/ExtEmpController.java
create mode 100644 src/com/engine/salary/entity/extemp/param/ExtEmpQueryParam.java
create mode 100644 src/com/engine/salary/entity/extemp/po/ExtEmpPO.java
create mode 100644 src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java
create mode 100644 src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml
create mode 100644 src/com/engine/salary/service/ExtEmpService.java
create mode 100644 src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
create mode 100644 src/com/engine/salary/web/ExtEmpController.java
create mode 100644 src/com/engine/salary/wrapper/ExtEmpWrapper.java
diff --git a/src/com/api/salary/web/ExtEmpController.java b/src/com/api/salary/web/ExtEmpController.java
new file mode 100644
index 000000000..9b349b2ef
--- /dev/null
+++ b/src/com/api/salary/web/ExtEmpController.java
@@ -0,0 +1,8 @@
+package com.api.salary.web;
+
+import javax.ws.rs.Path;
+
+@Path("/bs/hrmsalary/extEmp")
+public class ExtEmpController extends com.engine.salary.web.ExtEmpController{
+
+}
diff --git a/src/com/engine/salary/entity/extemp/param/ExtEmpQueryParam.java b/src/com/engine/salary/entity/extemp/param/ExtEmpQueryParam.java
new file mode 100644
index 000000000..ac68f247f
--- /dev/null
+++ b/src/com/engine/salary/entity/extemp/param/ExtEmpQueryParam.java
@@ -0,0 +1,27 @@
+package com.engine.salary.entity.extemp.param;
+
+import com.engine.salary.common.BaseQueryParam;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 数据采集-累计专项附加扣除查询参数
+ *
Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class ExtEmpQueryParam extends BaseQueryParam {
+
+ //姓名
+ private String username;
+
+
+}
diff --git a/src/com/engine/salary/entity/extemp/po/ExtEmpPO.java b/src/com/engine/salary/entity/extemp/po/ExtEmpPO.java
new file mode 100644
index 000000000..82a24937a
--- /dev/null
+++ b/src/com/engine/salary/entity/extemp/po/ExtEmpPO.java
@@ -0,0 +1,123 @@
+package com.engine.salary.entity.extemp.po;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+/**
+ * 外部人员
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+//hrsa_external_employee
+public class ExtEmpPO {
+
+ private Long id;
+ /**
+ * 姓名
+ */
+ private String username;
+ /**
+ * 部门
+ */
+ private String departmentName;
+ /**
+ * 部门ID
+ */
+ private Long departmentId;
+ /**
+ * 分部
+ */
+ private String subcompanyName;
+ /**
+ * 分部ID
+ */
+ private Long subcompanyId;
+ /**
+ * 岗位
+ */
+ private String jobtitleName;
+ /**
+ * 岗位ID
+ */
+ private Long jobtitleId;
+ /**
+ * 入职日期
+ */
+ private String companystartdate;
+ /**
+ * 手机
+ */
+ private String mobile;
+ /**
+ * 状态编码
+ */
+ private String status;
+ /**
+ * 工号
+ */
+ private String workcode;
+ /**
+ * 性别
+ */
+ private String sex;
+ /**
+ * 邮件
+ */
+ private String email;
+ /**
+ * 电话
+ */
+ private String telephone;
+ /**
+ * 职称
+ */
+ private String jobcall;
+ /**
+ * 出生日期
+ */
+ private String birthday;
+ /**
+ * 身份证号码
+ */
+ private String idNo;
+ /**
+ * 本人开户的银行卡卡号
+ */
+ private String bankCardNum;
+ /**
+ * 本人开户的银行卡开户支行全称
+ */
+ private String bankName;
+ /**
+ * 是否已删除。0:未删除、1:已删除
+ */
+ private Integer deleteType;
+ /**
+ * 创建人
+ */
+ private Long creator;
+ /**
+ * 修改人
+ */
+ private Long modifier;
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+ /**
+ * 修改时间
+ */
+ private Date updateTime;
+ /**
+ * 租户ID
+ */
+ private String tenantKey;
+
+}
\ No newline at end of file
diff --git a/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java
new file mode 100644
index 000000000..5f052651c
--- /dev/null
+++ b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java
@@ -0,0 +1,64 @@
+package com.engine.salary.mapper.extemp;
+
+import com.engine.salary.entity.extemp.po.ExtEmpPO;
+
+import java.util.List;
+
+public interface ExternalEmployeeMapper {
+
+ /**
+ * 查询所有记录
+ *
+ * @return 返回集合,没有返回空List
+ */
+ List listAll();
+
+
+ /**
+ * 根据主键查询
+ *
+ * @param id 主键
+ * @return 返回记录,没有返回null
+ */
+ ExtEmpPO getById(Integer id);
+
+ /**
+ * 新增,插入所有字段
+ *
+ * @param externalEmployee 新增的记录
+ * @return 返回影响行数
+ */
+ int insert(ExtEmpPO externalEmployee);
+
+ /**
+ * 新增,忽略null字段
+ *
+ * @param externalEmployee 新增的记录
+ * @return 返回影响行数
+ */
+ int insertIgnoreNull(ExtEmpPO externalEmployee);
+
+ /**
+ * 修改,修改所有字段
+ *
+ * @param externalEmployee 修改的记录
+ * @return 返回影响行数
+ */
+ int update(ExtEmpPO externalEmployee);
+
+ /**
+ * 修改,忽略null字段
+ *
+ * @param externalEmployee 修改的记录
+ * @return 返回影响行数
+ */
+ int updateIgnoreNull(ExtEmpPO externalEmployee);
+
+ /**
+ * 删除记录
+ *
+ * @return 返回影响行数
+ */
+ int delete(Long id);
+
+}
\ No newline at end of file
diff --git a/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml
new file mode 100644
index 000000000..aff4029da
--- /dev/null
+++ b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml
@@ -0,0 +1,468 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ t
+ .
+ id
+ , t.username
+ , t.department_name
+ , t.department_id
+ , t.subcompany_name
+ , t.subcompany_id
+ , t.jobtitle_name
+ , t.jobtitle_id
+ , t.companystartdate
+ , t.mobile
+ , t.status
+ , t.workcode
+ , t.sex
+ , t.email
+ , t.telephone
+ , t.jobcall
+ , t.birthday
+ , t.id_no
+ , t.bank_card_num
+ , t.bank_name
+ , t.delete_type
+ , t.creator
+ , t.modifier
+ , t.create_time
+ , t.update_time
+ , t.tenant_key
+
+
+
+
+ SELECT
+
+ FROM hrsa_external_employee t
+ WHERE delete_type = 0
+
+
+
+
+ SELECT
+
+ FROM hrsa_external_employee t
+ WHERE id = #{id} AND delete_type = 0
+
+
+
+
+ SELECT
+
+ FROM hrsa_external_employee t
+ WHERE delete_type = 0
+
+ AND id = #{id}
+
+
+ AND username = #{username}
+
+
+ AND department_name = #{departmentName}
+
+
+ AND department_id = #{departmentId}
+
+
+ AND subcompany_name = #{subcompanyName}
+
+
+ AND subcompany_id = #{subcompanyId}
+
+
+ AND jobtitle_name = #{jobtitleName}
+
+
+ AND jobtitle_id = #{jobtitleId}
+
+
+ AND companystartdate = #{companystartdate}
+
+
+ AND mobile = #{mobile}
+
+
+ AND status = #{status}
+
+
+ AND workcode = #{workcode}
+
+
+ AND sex = #{sex}
+
+
+ AND email = #{email}
+
+
+ AND telephone = #{telephone}
+
+
+ AND jobcall = #{jobcall}
+
+
+ AND birthday = #{birthday}
+
+
+ AND id_no = #{idNo}
+
+
+ AND bank_card_num = #{bankCardNum}
+
+
+ AND bank_name = #{bankName}
+
+
+ AND delete_type = #{deleteType}
+
+
+ AND creator = #{creator}
+
+
+ AND modifier = #{modifier}
+
+
+ AND create_time = #{createTime}
+
+
+ AND update_time = #{updateTime}
+
+
+ AND tenant_key = #{tenantKey}
+
+
+ AND id IN
+
+ #{id}
+
+
+ ORDER BY id DESC
+
+
+
+
+
+ INSERT INTO hrsa_external_employee
+
+
+
+ id,
+
+
+ username,
+
+
+ department_name,
+
+
+ department_id,
+
+
+ subcompany_name,
+
+
+ subcompany_id,
+
+
+ jobtitle_name,
+
+
+ jobtitle_id,
+
+
+ companystartdate,
+
+
+ mobile,
+
+
+ status,
+
+
+ workcode,
+
+
+ sex,
+
+
+ email,
+
+
+ telephone,
+
+
+ jobcall,
+
+
+ birthday,
+
+
+ id_no,
+
+
+ bank_card_num,
+
+
+ bank_name,
+
+
+ delete_type,
+
+
+ creator,
+
+
+ modifier,
+
+
+ create_time,
+
+
+ update_time,
+
+
+ tenant_key,
+
+
+
+
+ #{id},
+
+
+ #{username},
+
+
+ #{departmentName},
+
+
+ #{departmentId},
+
+
+ #{subcompanyName},
+
+
+ #{subcompanyId},
+
+
+ #{jobtitleName},
+
+
+ #{jobtitleId},
+
+
+ #{companystartdate},
+
+
+ #{mobile},
+
+
+ #{status},
+
+
+ #{workcode},
+
+
+ #{sex},
+
+
+ #{email},
+
+
+ #{telephone},
+
+
+ #{jobcall},
+
+
+ #{birthday},
+
+
+ #{idNo},
+
+
+ #{bankCardNum},
+
+
+ #{bankName},
+
+
+ #{deleteType},
+
+
+ #{creator},
+
+
+ #{modifier},
+
+
+ #{createTime},
+
+
+ #{updateTime},
+
+
+ #{tenantKey},
+
+
+
+
+
+
+ UPDATE hrsa_external_employee
+
+ username=#{username},
+ department_name=#{departmentName},
+ department_id=#{departmentId},
+ subcompany_name=#{subcompanyName},
+ subcompany_id=#{subcompanyId},
+ jobtitle_name=#{jobtitleName},
+ jobtitle_id=#{jobtitleId},
+ companystartdate=#{companystartdate},
+ mobile=#{mobile},
+ status=#{status},
+ workcode=#{workcode},
+ sex=#{sex},
+ email=#{email},
+ telephone=#{telephone},
+ jobcall=#{jobcall},
+ birthday=#{birthday},
+ id_no=#{idNo},
+ bank_card_num=#{bankCardNum},
+ bank_name=#{bankName},
+ delete_type=#{deleteType},
+ creator=#{creator},
+ modifier=#{modifier},
+ create_time=#{createTime},
+ update_time=#{updateTime},
+ tenant_key=#{tenantKey},
+
+ WHERE id = #{id} AND delete_type = 0
+
+
+
+
+
+ UPDATE hrsa_external_employee
+
+
+ username=#{username},
+
+
+ department_name=#{departmentName},
+
+
+ department_id=#{departmentId},
+
+
+ subcompany_name=#{subcompanyName},
+
+
+ subcompany_id=#{subcompanyId},
+
+
+ jobtitle_name=#{jobtitleName},
+
+
+ jobtitle_id=#{jobtitleId},
+
+
+ companystartdate=#{companystartdate},
+
+
+ mobile=#{mobile},
+
+
+ status=#{status},
+
+
+ workcode=#{workcode},
+
+
+ sex=#{sex},
+
+
+ email=#{email},
+
+
+ telephone=#{telephone},
+
+
+ jobcall=#{jobcall},
+
+
+ birthday=#{birthday},
+
+
+ id_no=#{idNo},
+
+
+ bank_card_num=#{bankCardNum},
+
+
+ bank_name=#{bankName},
+
+
+ delete_type=#{deleteType},
+
+
+ creator=#{creator},
+
+
+ modifier=#{modifier},
+
+
+ create_time=#{createTime},
+
+
+ update_time=#{updateTime},
+
+
+ tenant_key=#{tenantKey},
+
+
+ WHERE id = #{id} AND delete_type = 0
+
+
+
+
+
+ UPDATE hrsa_external_employee
+ SET delete_type=1
+ WHERE id = #{id}
+ AND delete_type = 0
+
+
+
+
\ No newline at end of file
diff --git a/src/com/engine/salary/service/ExtEmpService.java b/src/com/engine/salary/service/ExtEmpService.java
new file mode 100644
index 000000000..04a388f67
--- /dev/null
+++ b/src/com/engine/salary/service/ExtEmpService.java
@@ -0,0 +1,19 @@
+package com.engine.salary.service;
+
+import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
+import com.engine.salary.entity.extemp.po.ExtEmpPO;
+
+import java.util.Collection;
+import java.util.List;
+
+public interface ExtEmpService {
+
+ List list(ExtEmpQueryParam param);
+
+ void save(ExtEmpPO po);
+
+ void update(ExtEmpPO po);
+
+ void delete(Collection ids);
+
+}
\ No newline at end of file
diff --git a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
new file mode 100644
index 000000000..b61665f6b
--- /dev/null
+++ b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
@@ -0,0 +1,51 @@
+package com.engine.salary.service.impl;
+
+import com.engine.core.impl.Service;
+import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
+import com.engine.salary.entity.extemp.po.ExtEmpPO;
+import com.engine.salary.mapper.extemp.ExternalEmployeeMapper;
+import com.engine.salary.service.ExtEmpService;
+import com.engine.salary.util.db.MapperProxyFactory;
+import org.apache.commons.collections4.CollectionUtils;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 累计专项
+ * Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+public class ExtEmpServiceImpl extends Service implements ExtEmpService {
+
+
+ private ExternalEmployeeMapper getExternalEmployeeMapper() {
+ return MapperProxyFactory.getProxy(ExternalEmployeeMapper.class);
+ }
+
+
+ @Override
+ public List list(ExtEmpQueryParam param) {
+ return null;
+ }
+
+ @Override
+ public void save(ExtEmpPO po) {
+ getExternalEmployeeMapper().insertIgnoreNull(po);
+ }
+
+ @Override
+ public void update(ExtEmpPO po) {
+ getExternalEmployeeMapper().updateIgnoreNull(po);
+ }
+
+ @Override
+ public void delete(Collection ids) {
+ if (CollectionUtils.isNotEmpty(ids)) {
+ ids.forEach(getExternalEmployeeMapper()::delete);
+ }
+ }
+}
diff --git a/src/com/engine/salary/web/ExtEmpController.java b/src/com/engine/salary/web/ExtEmpController.java
new file mode 100644
index 000000000..f918ec31d
--- /dev/null
+++ b/src/com/engine/salary/web/ExtEmpController.java
@@ -0,0 +1,15 @@
+package com.engine.salary.web;
+
+/**
+ * 流程相关
+ * Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+public class ExtEmpController {
+
+
+
+}
diff --git a/src/com/engine/salary/wrapper/ExtEmpWrapper.java b/src/com/engine/salary/wrapper/ExtEmpWrapper.java
new file mode 100644
index 000000000..70bb6a54b
--- /dev/null
+++ b/src/com/engine/salary/wrapper/ExtEmpWrapper.java
@@ -0,0 +1,48 @@
+package com.engine.salary.wrapper;
+
+import com.engine.common.util.ServiceUtil;
+import com.engine.core.impl.Service;
+import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
+import com.engine.salary.entity.extemp.po.ExtEmpPO;
+import com.engine.salary.service.ExtEmpService;
+import com.engine.salary.service.impl.ExtEmpServiceImpl;
+import weaver.hrm.User;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 累计专项
+ * Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+public class ExtEmpWrapper extends Service implements ExtEmpService {
+
+ private ExtEmpService getExtEmpService(User user) {
+ return ServiceUtil.getService(ExtEmpServiceImpl.class, user);
+ }
+
+
+ @Override
+ public List list(ExtEmpQueryParam param) {
+ return null;
+ }
+
+ @Override
+ public void save(ExtEmpPO po) {
+ getExtEmpService(user).save(po);
+ }
+
+ @Override
+ public void update(ExtEmpPO po) {
+ getExtEmpService(user).update(po);
+ }
+
+ @Override
+ public void delete(Collection ids) {
+ getExtEmpService(user).delete(ids);
+ }
+}
From 79a29df0dee587deb446c43d35b4a2c7dc0dc50f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Fri, 3 Mar 2023 14:40:17 +0800
Subject: [PATCH 02/86] =?UTF-8?q?=E6=9A=82=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
resource/sql/还原.sql | 138 ++++++++++++++++++
.../entity/extemp/param/ExtEmpSaveParam.java | 102 +++++++++++++
.../engine/salary/web/ExtEmpController.java | 57 +++++++-
.../engine/salary/wrapper/ExtEmpWrapper.java | 20 ++-
4 files changed, 308 insertions(+), 9 deletions(-)
create mode 100644 resource/sql/还原.sql
create mode 100644 src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java
diff --git a/resource/sql/还原.sql b/resource/sql/还原.sql
new file mode 100644
index 000000000..fc70ed7b0
--- /dev/null
+++ b/resource/sql/还原.sql
@@ -0,0 +1,138 @@
+delete from hrsa_acct_result_temp where 1=1
+;
+delete from hrsa_add_up_deduction where 1=1
+;
+delete from hrsa_add_up_situation where 1=1
+;
+delete from hrsa_attend_quote where 1=1
+;
+delete from hrsa_attend_quote_data where 1=1
+;
+delete from hrsa_attend_quote_data_value where 1=1
+;
+delete from hrsa_attend_quote_field where 1=1
+;
+delete from hrsa_attend_quote_sync_set where 1=1
+;
+
+
+delete from hrsa_scheme_detail where 1=1
+;
+delete from hrsa_social_archives where 1=1
+;
+delete from hrsa_fund_archives where 1=1
+;
+delete from hrsa_other_archives where 1=1
+;
+
+
+delete from hrsa_bill_batch where 1=1
+;
+
+delete from hrsa_bill_detail where 1=1
+;
+delete from hrsa_bill_detail_temp where 1=1
+;
+delete from hrsa_bill_inspect where 1=1
+;
+
+
+
+delete from hrsa_check_result where 1=1
+;
+delete from hrsa_check_result_record where 1=1
+;
+delete from hrsa_ck_result_detail_temp where 1=1
+;
+delete from hrsa_excel_acct_result where 1=1
+;
+
+delete from hrsa_other_deduction where 1=1
+;
+delete from hrsa_salary_acct_emp where 1=1
+;
+delete from hrsa_salary_acct_record where 1=1
+;
+delete from hrsa_salary_acct_result where 1=1
+;
+delete from hrsa_salary_archive where 1=1
+;
+delete from hrsa_salary_archive_dimission where 1=1
+;
+delete from hrsa_salary_archive_item where 1=1
+;
+delete from hrsa_salary_archive_tax_agent where 1=1
+;
+delete from hrsa_salary_item where 1=1
+;
+delete from hrsa_salary_send where 1=1
+;
+delete from hrsa_salary_send_info where 1=1
+;
+delete from hrsa_salary_sob where 1=1
+;
+delete from hrsa_salary_sob_adjust_rule where 1=1
+;
+delete from hrsa_salary_sob_emp_field where 1=1
+;
+delete from hrsa_salary_sob_item where 1=1
+;
+delete from hrsa_salary_sob_item_group where 1=1
+;
+delete from hrsa_salary_sob_range where 1=1
+;
+delete from hrsa_salary_template where 1=1
+;
+
+delete from hrsa_social_security_scheme where 1=1
+;
+delete from hrsa_sys_tax_rate_base where 1=1
+;
+delete from hrsa_sys_tax_rate_detail where 1=1
+;
+delete from hrsa_tax_agent where 1=1
+;
+delete from hrsa_tax_agent_emp where 1=1
+;
+delete from hrsa_tax_agent_emp_change where 1=1
+;
+delete from hrsa_tax_agent_admin where 1=1
+;
+delete from hrsa_tax_agent_manage_range where 1=1
+;
+
+delete from hrsa_tax_agent_sub_admin where 1=1
+;
+delete from hrsa_tax_agent_sub_admin_emp where 1=1
+;
+
+delete from hrsa_tax_declaration where 1=1
+;
+delete from hrsa_tax_declaration_detail where 1=1
+;
+delete from hrsa_tax_rate_base where 1=1
+;
+delete from hrsa_tax_rate_detail where 1=1
+;
+delete from hrsa_salary_acct_result_report where 1=1
+;
+
+delete from hrsa_insurance_base_info where 1=1
+;
+
+
+delete from hrsa_salary_sob_back_item where 1=1
+;
+delete from hrsa_salary_send_range where 1=1
+;
+delete from hrsa_salary_send_range_obj where 1=1
+;
+delete from hrsa_compensation_log where 1=1
+;
+delete from hrsa_compensation_config where 1=1
+;
+delete from hrsa_special_add_deduction where 1=1
+;
+
+
+
diff --git a/src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java b/src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java
new file mode 100644
index 000000000..afb5ccb4b
--- /dev/null
+++ b/src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java
@@ -0,0 +1,102 @@
+package com.engine.salary.entity.extemp.param;
+
+import com.engine.salary.common.BaseQueryParam;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 数据采集-累计专项附加扣除查询参数
+ * Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class ExtEmpSaveParam extends BaseQueryParam {
+
+ private Long id;
+
+ /**
+ * 姓名
+ */
+ private String username;
+ /**
+ * 部门
+ */
+ private String departmentName;
+ /**
+ * 部门ID
+ */
+ private Long departmentId;
+ /**
+ * 分部
+ */
+ private String subcompanyName;
+ /**
+ * 分部ID
+ */
+ private Long subcompanyId;
+ /**
+ * 岗位
+ */
+ private String jobtitleName;
+ /**
+ * 岗位ID
+ */
+ private Long jobtitleId;
+ /**
+ * 入职日期
+ */
+ private String companystartdate;
+ /**
+ * 手机
+ */
+ private String mobile;
+ /**
+ * 状态编码
+ */
+ private String status;
+ /**
+ * 工号
+ */
+ private String workcode;
+ /**
+ * 性别
+ */
+ private String sex;
+ /**
+ * 邮件
+ */
+ private String email;
+ /**
+ * 电话
+ */
+ private String telephone;
+ /**
+ * 职称
+ */
+ private String jobcall;
+ /**
+ * 出生日期
+ */
+ private String birthday;
+ /**
+ * 身份证号码
+ */
+ private String idNo;
+ /**
+ * 本人开户的银行卡卡号
+ */
+ private String bankCardNum;
+ /**
+ * 本人开户的银行卡开户支行全称
+ */
+ private String bankName;
+
+}
diff --git a/src/com/engine/salary/web/ExtEmpController.java b/src/com/engine/salary/web/ExtEmpController.java
index f918ec31d..bd5a02d04 100644
--- a/src/com/engine/salary/web/ExtEmpController.java
+++ b/src/com/engine/salary/web/ExtEmpController.java
@@ -1,7 +1,27 @@
package com.engine.salary.web;
+import com.engine.common.util.ServiceUtil;
+import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
+import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
+import com.engine.salary.entity.extemp.po.ExtEmpPO;
+import com.engine.salary.util.ResponseResult;
+import com.engine.salary.wrapper.ExtEmpWrapper;
+import io.swagger.v3.oas.annotations.parameters.RequestBody;
+import weaver.hrm.HrmUserVarify;
+import weaver.hrm.User;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import java.util.Collection;
+import java.util.List;
+
/**
- * 流程相关
+ * 外部人员
* Copyright: Copyright (c) 2022
* Company: 泛微软件
*
@@ -10,6 +30,41 @@ package com.engine.salary.web;
**/
public class ExtEmpController {
+ private ExtEmpWrapper getExtEmpWrapper(User user) {
+ return ServiceUtil.getService(ExtEmpWrapper.class, user);
+ }
+
+ @POST
+ @Path("/list")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExtEmpQueryParam param) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult>(user).run(getExtEmpWrapper(user)::list, param);
+ }
+
+ @POST
+ @Path("/save")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String save(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExtEmpSaveParam param) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult(user).run(getExtEmpWrapper(user)::save, param);
+ }
+
+ @POST
+ @Path("/update")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String update(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExtEmpSaveParam param) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult(user).run(getExtEmpWrapper(user)::update, param);
+ }
+
+ @POST
+ @Path("/delete")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String delete(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection ids) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult, String>(user).run(getExtEmpWrapper(user)::delete, ids);
+ }
}
diff --git a/src/com/engine/salary/wrapper/ExtEmpWrapper.java b/src/com/engine/salary/wrapper/ExtEmpWrapper.java
index 70bb6a54b..92ee40588 100644
--- a/src/com/engine/salary/wrapper/ExtEmpWrapper.java
+++ b/src/com/engine/salary/wrapper/ExtEmpWrapper.java
@@ -3,9 +3,11 @@ package com.engine.salary.wrapper;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
+import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
import com.engine.salary.service.ExtEmpService;
import com.engine.salary.service.impl.ExtEmpServiceImpl;
+import org.springframework.beans.BeanUtils;
import weaver.hrm.User;
import java.util.Collection;
@@ -19,29 +21,31 @@ import java.util.List;
* @author qiantao
* @version 1.0
**/
-public class ExtEmpWrapper extends Service implements ExtEmpService {
+public class ExtEmpWrapper extends Service {
private ExtEmpService getExtEmpService(User user) {
- return ServiceUtil.getService(ExtEmpServiceImpl.class, user);
+ return ServiceUtil.getService(ExtEmpServiceImpl.class, user);
}
- @Override
public List list(ExtEmpQueryParam param) {
return null;
}
- @Override
- public void save(ExtEmpPO po) {
+ public void save(ExtEmpSaveParam param) {
+
+ ExtEmpPO po = new ExtEmpPO();
+ BeanUtils.copyProperties(param, po);
+
getExtEmpService(user).save(po);
}
- @Override
- public void update(ExtEmpPO po) {
+ public void update(ExtEmpSaveParam param) {
+ ExtEmpPO po = new ExtEmpPO();
+ BeanUtils.copyProperties(param, po);
getExtEmpService(user).update(po);
}
- @Override
public void delete(Collection ids) {
getExtEmpService(user).delete(ids);
}
From a5596d503f657bf105a8b151759cbe5d7bf8a3cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Fri, 3 Mar 2023 16:57:52 +0800
Subject: [PATCH 03/86] =?UTF-8?q?=E5=A4=96=E9=83=A8=E4=BA=BA=E5=91=98?=
=?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../entity/extemp/param/ExtEmpSaveParam.java | 3 +-
.../salary/entity/extemp/po/ExtEmpPO.java | 11 ++++-
.../mapper/extemp/ExternalEmployeeMapper.java | 44 ++++++++-----------
.../mapper/extemp/ExternalEmployeeMapper.xml | 2 +-
.../engine/salary/service/ExtEmpService.java | 8 +++-
.../service/impl/ExtEmpServiceImpl.java | 37 ++++++++++++++--
.../engine/salary/web/ExtEmpController.java | 6 +--
.../engine/salary/wrapper/ExtEmpWrapper.java | 17 +++----
8 files changed, 79 insertions(+), 49 deletions(-)
diff --git a/src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java b/src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java
index afb5ccb4b..f38362d8a 100644
--- a/src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java
+++ b/src/com/engine/salary/entity/extemp/param/ExtEmpSaveParam.java
@@ -1,6 +1,5 @@
package com.engine.salary.entity.extemp.param;
-import com.engine.salary.common.BaseQueryParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -18,7 +17,7 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
-public class ExtEmpSaveParam extends BaseQueryParam {
+public class ExtEmpSaveParam {
private Long id;
diff --git a/src/com/engine/salary/entity/extemp/po/ExtEmpPO.java b/src/com/engine/salary/entity/extemp/po/ExtEmpPO.java
index 82a24937a..e266f5ba2 100644
--- a/src/com/engine/salary/entity/extemp/po/ExtEmpPO.java
+++ b/src/com/engine/salary/entity/extemp/po/ExtEmpPO.java
@@ -1,11 +1,13 @@
package com.engine.salary.entity.extemp.po;
+import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
+import java.util.Collection;
import java.util.Date;
/**
@@ -22,10 +24,12 @@ public class ExtEmpPO {
/**
* 姓名
*/
+ @TableTitle(title = "姓名", dataIndex = "username", key = "username")
private String username;
/**
* 部门
*/
+ @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName")
private String departmentName;
/**
* 部门ID
@@ -34,6 +38,7 @@ public class ExtEmpPO {
/**
* 分部
*/
+ @TableTitle(title = "分部", dataIndex = "subcompanyName", key = "subcompanyName")
private String subcompanyName;
/**
* 分部ID
@@ -42,6 +47,7 @@ public class ExtEmpPO {
/**
* 岗位
*/
+ @TableTitle(title = "岗位", dataIndex = "jobtitleName", key = "jobtitleName")
private String jobtitleName;
/**
* 岗位ID
@@ -50,6 +56,7 @@ public class ExtEmpPO {
/**
* 入职日期
*/
+ @TableTitle(title = "入职日期", dataIndex = "companystartdate", key = "companystartdate")
private String companystartdate;
/**
* 手机
@@ -62,6 +69,7 @@ public class ExtEmpPO {
/**
* 工号
*/
+ @TableTitle(title = "工号", dataIndex = "workcode", key = "workcode")
private String workcode;
/**
* 性别
@@ -120,4 +128,5 @@ public class ExtEmpPO {
*/
private String tenantKey;
-}
\ No newline at end of file
+ private Collection ids;
+}
diff --git a/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java
index 5f052651c..7fa9abc28 100644
--- a/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java
+++ b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.java
@@ -6,59 +6,53 @@ import java.util.List;
public interface ExternalEmployeeMapper {
- /**
+ /**
* 查询所有记录
*
* @return 返回集合,没有返回空List
*/
- List listAll();
+ List listAll();
- /**
+ /**
* 根据主键查询
*
* @param id 主键
* @return 返回记录,没有返回null
*/
- ExtEmpPO getById(Integer id);
-
- /**
- * 新增,插入所有字段
- *
- * @param externalEmployee 新增的记录
- * @return 返回影响行数
- */
- int insert(ExtEmpPO externalEmployee);
-
- /**
+ ExtEmpPO getById(Integer id);
+
+ List listSome(ExtEmpPO po);
+
+ /**
* 新增,忽略null字段
*
* @param externalEmployee 新增的记录
* @return 返回影响行数
*/
- int insertIgnoreNull(ExtEmpPO externalEmployee);
-
- /**
+ int insertIgnoreNull(ExtEmpPO externalEmployee);
+
+ /**
* 修改,修改所有字段
*
* @param externalEmployee 修改的记录
* @return 返回影响行数
*/
- int update(ExtEmpPO externalEmployee);
-
- /**
+ int update(ExtEmpPO externalEmployee);
+
+ /**
* 修改,忽略null字段
*
* @param externalEmployee 修改的记录
* @return 返回影响行数
*/
- int updateIgnoreNull(ExtEmpPO externalEmployee);
-
- /**
+ int updateIgnoreNull(ExtEmpPO externalEmployee);
+
+ /**
* 删除记录
*
* @return 返回影响行数
*/
- int delete(Long id);
-
+ int delete(Long id);
+
}
\ No newline at end of file
diff --git a/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml
index aff4029da..730eae408 100644
--- a/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml
+++ b/src/com/engine/salary/mapper/extemp/ExternalEmployeeMapper.xml
@@ -87,7 +87,7 @@
AND id = #{id}
-
+
AND username = #{username}
diff --git a/src/com/engine/salary/service/ExtEmpService.java b/src/com/engine/salary/service/ExtEmpService.java
index 04a388f67..4c2bbf01f 100644
--- a/src/com/engine/salary/service/ExtEmpService.java
+++ b/src/com/engine/salary/service/ExtEmpService.java
@@ -1,7 +1,9 @@
package com.engine.salary.service;
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
+import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
+import com.engine.salary.util.page.PageInfo;
import java.util.Collection;
import java.util.List;
@@ -10,9 +12,11 @@ public interface ExtEmpService {
List list(ExtEmpQueryParam param);
- void save(ExtEmpPO po);
+ PageInfo listPage (ExtEmpQueryParam param);
- void update(ExtEmpPO po);
+ void save(ExtEmpSaveParam po);
+
+ void update(ExtEmpSaveParam po);
void delete(Collection ids);
diff --git a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
index b61665f6b..64093fde4 100644
--- a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
+++ b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
@@ -2,13 +2,19 @@ package com.engine.salary.service.impl;
import com.engine.core.impl.Service;
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
+import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
import com.engine.salary.mapper.extemp.ExternalEmployeeMapper;
import com.engine.salary.service.ExtEmpService;
import com.engine.salary.util.db.MapperProxyFactory;
+import com.engine.salary.util.page.PageInfo;
+import com.engine.salary.util.page.SalaryPageUtil;
+import dm.jdbc.util.IdGenerator;
import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.BeanUtils;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
/**
@@ -29,16 +35,41 @@ public class ExtEmpServiceImpl extends Service implements ExtEmpService {
@Override
public List list(ExtEmpQueryParam param) {
- return null;
+ return getExternalEmployeeMapper().listSome(ExtEmpPO.builder().username(param.getUsername()).build());
}
@Override
- public void save(ExtEmpPO po) {
+ public PageInfo listPage(ExtEmpQueryParam param) {
+ List extEmpPOS = list(param);
+ return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), extEmpPOS, ExtEmpPO.class);
+
+ }
+
+ @Override
+ public void save(ExtEmpSaveParam param) {
+ ExtEmpPO po = new ExtEmpPO();
+ BeanUtils.copyProperties(param, po);
+
+ po.setId(IdGenerator.generate());
+ po.setCreator((long) user.getUID());
+ po.setModifier((long) user.getUID());
+ Date now = new Date();
+ po.setCreateTime(now);
+ po.setUpdateTime(now);
+ po.setDeleteType(0);
+
getExternalEmployeeMapper().insertIgnoreNull(po);
}
@Override
- public void update(ExtEmpPO po) {
+ public void update(ExtEmpSaveParam param) {
+ ExtEmpPO po = new ExtEmpPO();
+ BeanUtils.copyProperties(param, po);
+
+ po.setModifier((long) user.getUID());
+ Date now = new Date();
+ po.setUpdateTime(now);
+
getExternalEmployeeMapper().updateIgnoreNull(po);
}
diff --git a/src/com/engine/salary/web/ExtEmpController.java b/src/com/engine/salary/web/ExtEmpController.java
index bd5a02d04..24cd5fb17 100644
--- a/src/com/engine/salary/web/ExtEmpController.java
+++ b/src/com/engine/salary/web/ExtEmpController.java
@@ -5,6 +5,7 @@ import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
import com.engine.salary.util.ResponseResult;
+import com.engine.salary.util.page.PageInfo;
import com.engine.salary.wrapper.ExtEmpWrapper;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import weaver.hrm.HrmUserVarify;
@@ -18,7 +19,6 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Collection;
-import java.util.List;
/**
* 外部人员
@@ -35,11 +35,11 @@ public class ExtEmpController {
}
@POST
- @Path("/list")
+ @Path("/listPage")
@Produces(MediaType.APPLICATION_JSON)
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExtEmpQueryParam param) {
User user = HrmUserVarify.getUser(request, response);
- return new ResponseResult>(user).run(getExtEmpWrapper(user)::list, param);
+ return new ResponseResult>(user).run(getExtEmpWrapper(user)::listPage, param);
}
@POST
diff --git a/src/com/engine/salary/wrapper/ExtEmpWrapper.java b/src/com/engine/salary/wrapper/ExtEmpWrapper.java
index 92ee40588..70f63b78c 100644
--- a/src/com/engine/salary/wrapper/ExtEmpWrapper.java
+++ b/src/com/engine/salary/wrapper/ExtEmpWrapper.java
@@ -7,11 +7,10 @@ import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
import com.engine.salary.service.ExtEmpService;
import com.engine.salary.service.impl.ExtEmpServiceImpl;
-import org.springframework.beans.BeanUtils;
+import com.engine.salary.util.page.PageInfo;
import weaver.hrm.User;
import java.util.Collection;
-import java.util.List;
/**
* 累计专项
@@ -28,22 +27,16 @@ public class ExtEmpWrapper extends Service {
}
- public List list(ExtEmpQueryParam param) {
- return null;
+ public PageInfo listPage(ExtEmpQueryParam param) {
+ return getExtEmpService(user).listPage(param);
}
public void save(ExtEmpSaveParam param) {
-
- ExtEmpPO po = new ExtEmpPO();
- BeanUtils.copyProperties(param, po);
-
- getExtEmpService(user).save(po);
+ getExtEmpService(user).save(param);
}
public void update(ExtEmpSaveParam param) {
- ExtEmpPO po = new ExtEmpPO();
- BeanUtils.copyProperties(param, po);
- getExtEmpService(user).update(po);
+ getExtEmpService(user).update(param);
}
public void delete(Collection ids) {
From a423790a354c4aefd37a0a6f85a08a056bc2bb73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Mon, 6 Mar 2023 17:57:20 +0800
Subject: [PATCH 04/86] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BA=BA=E5=91=98?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/com/engine/salary/biz/EmployBiz.java | 38 +++++++--------
src/com/engine/salary/biz/SIAccountBiz.java | 8 ++--
.../mapper/datacollection/EmployMapper.java | 46 +++++++++++++++----
.../mapper/datacollection/EmployMapper.xml | 22 ---------
.../salary/service/SalaryEmployeeService.java | 14 +++++-
.../impl/AddUpDeductionServiceImpl.java | 12 ++---
.../impl/AddUpSituationServiceImpl.java | 13 +++---
.../impl/AttendQuoteDataServiceImpl.java | 3 +-
.../service/impl/ExtEmpServiceImpl.java | 10 ++++
.../impl/OtherDeductionServiceImpl.java | 13 +++---
.../service/impl/RecordsBuildServiceImpl.java | 12 +++--
.../impl/SalaryAcctCalculateServiceImpl.java | 39 ++++++++--------
.../impl/SalaryAcctExcelServiceImpl.java | 2 +-
.../impl/SalaryAcctResultServiceImpl.java | 2 +-
.../SalaryComparisonResultServiceImpl.java | 2 +-
.../impl/SalaryEmployeeServiceImpl.java | 35 ++++++++++----
.../impl/TaxAgentManageRangeServiceImpl.java | 27 +++++------
.../service/impl/TaxAgentServiceImpl.java | 4 --
.../impl/TaxDeclarationDetailServiceImpl.java | 6 +--
.../wrapper/SalaryAcctEmployeeWrapper.java | 2 +-
.../salary/wrapper/TaxAgentWrapper.java | 2 +-
21 files changed, 176 insertions(+), 136 deletions(-)
diff --git a/src/com/engine/salary/biz/EmployBiz.java b/src/com/engine/salary/biz/EmployBiz.java
index 5b2e288ba..4b04e4d01 100644
--- a/src/com/engine/salary/biz/EmployBiz.java
+++ b/src/com/engine/salary/biz/EmployBiz.java
@@ -17,6 +17,16 @@ import java.util.List;
public class EmployBiz extends BaseBean {
+ public List listAll(){
+ SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
+ try {
+ EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
+ return mapper.listAll();
+ } finally {
+ sqlSession.close();
+ }
+ }
+
/**
* 查询人员列表
*
@@ -70,24 +80,6 @@ public class EmployBiz extends BaseBean {
}
}
- public List getAdminEmployeeByIds(List list) {
- if (CollectionUtils.isEmpty(list)) {
- return new ArrayList<>();
- }
- SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
- try {
- EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
- List employeeList = Lists.newArrayList();
- List> partition = Lists.partition(list, 1000);
- for (List longs : partition) {
- employeeList.addAll(mapper.getAdminEmployeeByIds(longs));
- }
- return employeeList;
- } finally {
- sqlSession.close();
- }
- }
-
/**
* 岗位信息
@@ -158,4 +150,14 @@ public class EmployBiz extends BaseBean {
sqlSession.close();
}
}
+
+ public List listAllForReport() {
+ SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
+ try {
+ EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
+ return mapper.listAllForReport();
+ } finally {
+ sqlSession.close();
+ }
+ }
}
diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java
index a567d2f78..c9625c079 100644
--- a/src/com/engine/salary/biz/SIAccountBiz.java
+++ b/src/com/engine/salary/biz/SIAccountBiz.java
@@ -9,7 +9,6 @@ import com.engine.salary.cache.SalaryCacheKey;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.AESEncryptUtil;
import com.engine.salary.encrypt.EncryptUtil;
-import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
import com.engine.salary.entity.siaccount.dto.SIAccountUtilDTO;
@@ -22,7 +21,6 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.siaccount.*;
import com.engine.salary.enums.sicategory.*;
import com.engine.salary.exception.SalaryRunTimeException;
-import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.siaccount.*;
import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
import com.engine.salary.mapper.sicategory.ICategoryMapper;
@@ -117,6 +115,11 @@ public class SIAccountBiz extends Service {
return (SalaryAcctProgressService) ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
}
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
+
+
public PageInfo listPage(InsuranceAccountBatchParam queryParam) {
List list = getInsuranceAccountBatchMapper().list(queryParam);
PageInfo page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
@@ -1102,7 +1105,6 @@ public class SIAccountBiz extends Service {
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, param.getPaymentOrganization());
encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
- DataCollectionEmployee simpleEmployee = MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeById(employeeId);
insuranceAccountBatchPO.setAccountant(currentUserName);
insuranceAccountBatchPO.setUpdateTime(new Date());
insuranceAccountBatchPO.setSocialPay(socialSum.toPlainString());
diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.java b/src/com/engine/salary/mapper/datacollection/EmployMapper.java
index 496f00ed0..d73cef7ba 100644
--- a/src/com/engine/salary/mapper/datacollection/EmployMapper.java
+++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.java
@@ -14,20 +14,34 @@ import java.util.List;
public interface EmployMapper {
+
/**
- * 获取所有员工
+ * 只查人力资源表
+ * @return
+ */
+ List listAll();
+
+ /**
+ * 获取所有员工,关联部门
*
* @return
*/
List listEmployee();
+ /**
+ * 单表查询
+ * @param ids
+ * @return
+ */
List getEmployeeByIds(@Param("collection") List ids);
+ /**
+ * 多表联查
+ * @param ids
+ * @return
+ */
List getEmployeeByIdsAll(@Param("collection") List ids);
- List getAdminEmployeeByIds(@Param("collection") List list);
-
- List getEmployeeIdsByUserName(@Param("userName") String userName);
/**
* 根据薪资账套的人员范围转换而成的查询参数查询人员
@@ -37,24 +51,40 @@ public interface EmployMapper {
*/
List listByParams(@Param("params") Collection queryParams);
+ /**
+ * 多表,详细信息
+ * @param employeeId
+ * @return
+ */
DataCollectionEmployee getEmployeeById(Long employeeId);
- List listAllFields();
-
/**
* 报表专用
* @return
*/
List listAllForReport();
+ /**
+ * 所以岗位
+ * @param ids
+ * @return
+ */
List listPositionInfo(@Param("collection") List ids);
+ /**
+ * 所以部门
+ * @param departmentIds
+ * @return
+ */
List getDeptInfoList(@Param("departmentIds") List departmentIds);
+ /**
+ * 所以分部
+ * @param subDepartmentIds
+ * @return
+ */
List getSubCompanyInfoList(@Param("subDepartmentIds") List subDepartmentIds);
- List listAll();
-
List listHrmInfoByIdAndName(@Param("param") HrmQueryParam param);
}
\ No newline at end of file
diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml
index 806a1bf2d..7e5fce302 100644
--- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml
+++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml
@@ -81,19 +81,6 @@
-
- select e.id as employeeId,
- e.lastname as username
- from hrmresourcemanager e
- where e.status not in (7)
-
- AND e.id IN
-
- #{id}
-
-
-
-
select e.id as employeeId,
e.lastname as username,
@@ -208,15 +195,6 @@
-
- select
- a.LASTNAME as username
- from hrmresource a
- where
- e.status not in (7)
- and (e.accounttype is null or e.accounttype = 0)
-
-
select e.id as employeeId,
diff --git a/src/com/engine/salary/service/SalaryEmployeeService.java b/src/com/engine/salary/service/SalaryEmployeeService.java
index a31b12692..8fc5f9d4d 100644
--- a/src/com/engine/salary/service/SalaryEmployeeService.java
+++ b/src/com/engine/salary/service/SalaryEmployeeService.java
@@ -1,6 +1,9 @@
package com.engine.salary.service;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
+import com.engine.salary.entity.hrm.DeptInfo;
+import com.engine.salary.entity.hrm.PositionInfo;
+import com.engine.salary.entity.hrm.SubCompanyInfo;
import java.util.List;
@@ -40,7 +43,7 @@ public interface SalaryEmployeeService {
* @param ids
* @return 全量
*/
- List listByIds(List ids);
+ List getEmployeeByIdsAll(List ids);
/**
* 获取人员信息
@@ -73,4 +76,13 @@ public interface SalaryEmployeeService {
* @param uid 人员id
*/
List matchImportEmployee(List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
+
+ List getDeptInfoList(List departmentIds);
+
+ List getSubCompanyInfoList(List subDepartmentIds);
+
+ List listPositionInfo(List positionIds);
+
+ List listEmployee();
+
}
diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java
index edeb2ed77..2edf4c4ed 100644
--- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java
+++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java
@@ -9,7 +9,6 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.AddUpDeductionBiz;
-import com.engine.salary.biz.EmployBiz;
import com.engine.salary.common.LocalDateRange;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpDeduction;
@@ -195,7 +194,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
Map apidatas = new HashMap();
- EmployBiz employBiz = new EmployBiz();
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
//检验参数
@@ -211,7 +209,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
//个税扣缴义务人
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
// 获取租户下所有的人员
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
@@ -437,7 +435,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
public void createAddUpDeduction(AddUpDeductionRecordParam addUpDeductionRecordParam) {
long currentEmployeeId = user.getUID();
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
- EmployBiz employBiz = new EmployBiz();
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
//税款所属期
@@ -450,7 +447,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
//个税扣缴义务人
String taxAgentId = Util.null2String(addUpDeductionRecordParam.getTaxAgentId());
// 获取租户下所有的人员
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
@@ -729,7 +726,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
.forEach(l -> getAddUpDeductionMapper().updateDataAndDeclareMonth((List) l));
if (!errorMessages.isEmpty()) {
String userNames = getSalaryEmployeeService(user)
- .listByIds(errorMessages)
+ .getEmployeeByIdsAll(errorMessages)
.stream()
.map(DataCollectionEmployee::getUsername)
.collect(Collectors.joining(","));
@@ -886,7 +883,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
public XSSFWorkbook exportDetail(Long beLongEmployeeId, boolean isChief, AddUpDeductionQueryParam queryParam) {
queryParam.setEmployeeId(beLongEmployeeId);
- EmployBiz employBiz = new EmployBiz();
AddUpDeductionBiz biz = new AddUpDeductionBiz();
Long id = queryParam.getAccumulatedSpecialAdditionalDeductionId();
@@ -899,7 +895,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
throw new SalaryRunTimeException(String.format("累计专项附加扣除不存在" + "[id:%s]", id));
}
- List employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
+ List employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
if (CollectionUtils.isEmpty(employeeList)) {
throw new SalaryRunTimeException("员工信息不存在");
}
diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java
index a3d59cc00..bf98032c9 100644
--- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java
+++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java
@@ -8,7 +8,6 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.AddUpSituationBiz;
-import com.engine.salary.biz.EmployBiz;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpSituation;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
@@ -395,7 +394,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
@Override
public XSSFWorkbook exportDetail(AddUpSituationQueryParam queryParam) {
AddUpSituationBiz biz = new AddUpSituationBiz();
- EmployBiz employBiz = new EmployBiz();
+
Long id = queryParam.getAccumulatedSituationId();
if (id == null) {
@@ -407,7 +406,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
throw new SalaryRunTimeException(String.format("累计情况不存在" + "[id:%s]", id));
}
- List employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
+ List employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
if (CollectionUtils.isEmpty(employeeList)) {
throw new SalaryRunTimeException("员工信息不存在");
}
@@ -578,7 +577,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
Map apidatas = new HashMap();
- EmployBiz employBiz = new EmployBiz();
+
AddUpSituationBiz biz = new AddUpSituationBiz();
//查询对于人员信息导入筛选的全局配置
@@ -598,7 +597,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
// 获取所有个税扣缴义务人
Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
// 获取租户下所有的人员
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);
@@ -890,7 +889,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
@Override
public void createAddUpSituation(AddUpSituationParam addUpSituationParam) {
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
- EmployBiz employBiz = new EmployBiz();
+
AddUpSituationBiz biz = new AddUpSituationBiz();
//查询对于人员信息导入筛选的全局配置
@@ -902,7 +901,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
// 获取所有个税扣缴义务人
Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
// 获取租户下所有的人员
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);
diff --git a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java
index fd91d82b6..a3e279fec 100644
--- a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java
+++ b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java
@@ -91,7 +91,6 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
private AttendQuoteDataBiz dataBiz = new AttendQuoteDataBiz();
private AttendQuoteDataValueBiz dataValueBiz = new AttendQuoteDataValueBiz();
private AttendQuoteFieldBiz fieldBiz = new AttendQuoteFieldBiz();
- private EmployBiz employeeBiz = new EmployBiz();
private AttendQuoteFieldSettingService getFieldSettingService(User user) {
return ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user);
@@ -596,7 +595,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
// 获取租户下所有的人员
- List employees = employeeBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 获取已设置的可同步的考勤字段
List attendQuoteFields = getAttendQuoteSetFields(AttendQuoteSourceTypeEnum.IMPORT);
// 生成获取考勤引用
diff --git a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
index 64093fde4..e59099e03 100644
--- a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
+++ b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java
@@ -1,6 +1,7 @@
package com.engine.salary.service.impl;
import com.engine.core.impl.Service;
+import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
@@ -16,6 +17,7 @@ import org.springframework.beans.BeanUtils;
import java.util.Collection;
import java.util.Date;
import java.util.List;
+import java.util.stream.Collectors;
/**
* 累计专项
@@ -79,4 +81,12 @@ public class ExtEmpServiceImpl extends Service implements ExtEmpService {
ids.forEach(getExternalEmployeeMapper()::delete);
}
}
+
+ public List cover(List extEmps) {
+ return extEmps.stream().map(emp -> {
+ DataCollectionEmployee employee = new DataCollectionEmployee();
+ BeanUtils.copyProperties(emp, employee);
+ return employee;
+ }).collect(Collectors.toList());
+ }
}
diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java
index e080fb0c3..0a3381444 100644
--- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java
+++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
-import com.engine.salary.biz.EmployBiz;
import com.engine.salary.biz.OtherDeductionBiz;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.EncryptUtil;
@@ -177,7 +176,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
long currentEmployeeId = user.getUID();
Map apidatas = new HashMap();
- EmployBiz employBiz = new EmployBiz();
+
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
//查询对于人员信息导入筛选的全局配置
@@ -206,7 +205,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
int errorCount = 0;
//人员信息
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 获取所有个税扣缴义务人
Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
//税款所属期
@@ -480,7 +479,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
public XSSFWorkbook exportDetail(OtherDeductionQueryParam param) {
OtherDeductionBiz biz = new OtherDeductionBiz();
- EmployBiz employBiz = new EmployBiz();
+
Long id = param.getOtherTaxExemptDeductionId();
if (id == null) {
@@ -492,7 +491,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
throw new SalaryRunTimeException(String.format("其他免税扣除不存在" + "[id:%s]", id));
}
- List employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
+ List employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
if (CollectionUtils.isEmpty(employeeList)) {
throw new SalaryRunTimeException("员工信息不存在");
}
@@ -601,7 +600,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
long currentEmployeeId = user.getUID();
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
- EmployBiz employBiz = new EmployBiz();
+
//查询对于人员信息导入筛选的全局配置
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
@@ -609,7 +608,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
//税款所属期
String declareMonthStr = Util.null2String(otherDeductionParam.getDeclareMonth());
//人员信息
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 获取所有个税扣缴义务人
Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
//税款所属期
diff --git a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java
index b1d5958b0..6dd5c4c2d 100644
--- a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java
+++ b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java
@@ -2,6 +2,7 @@ package com.engine.salary.service.impl;
import com.alibaba.fastjson.JSON;
import com.engine.core.impl.Service;
+import com.engine.salary.biz.EmployBiz;
import com.engine.salary.biz.SIArchivesBiz;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
@@ -14,11 +15,13 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.siaccount.BillStatusEnum;
import com.engine.salary.enums.siaccount.ResourceFromEnum;
-import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
import com.engine.salary.service.RecordsBuildService;
-import com.engine.salary.util.*;
+import com.engine.salary.util.SalaryAssert;
+import com.engine.salary.util.SalaryDateUtil;
+import com.engine.salary.util.SalaryEnumUtil;
+import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
@@ -37,6 +40,7 @@ import java.util.stream.Collectors;
* @Version V1.0
**/
public class RecordsBuildServiceImpl extends Service implements RecordsBuildService {
+ EmployBiz employBiz = new EmployBiz();
@Override
public List> buildCommonRecords(List list, Long employeeId) {
@@ -48,7 +52,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
List employeeByIds = new ArrayList<>();
List> partition = Lists.partition(employeeIds, 1000);
for (List longs : partition) {
- employeeByIds.addAll(MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeByIdsAll(longs));
+ employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs));
}
if (CollectionUtils.isEmpty(employeeByIds)) {
return result;
@@ -195,7 +199,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
List employeeByIds = new ArrayList<>();
List> partition = Lists.partition(employeeIds, 1000);
for (List longs : partition) {
- employeeByIds.addAll(MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeByIdsAll(longs));
+ employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs));
}
if (CollectionUtils.isEmpty(employeeByIds)) {
return result;
diff --git a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java
index e2752a3d1..f07602bda 100644
--- a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java
@@ -51,56 +51,56 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
private SalaryAcctResultService getSalaryAcctResultService(User user) {
- return (SalaryAcctResultService) ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user);
+ return ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user);
}
private SalaryEmployeeService getSalaryEmployeeService(User user) {
- return (SalaryEmployeeService) ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
private SalaryArchiveService getSalaryArchiveService(User user) {
- return (SalaryArchiveService) ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
+ return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
}
private AddUpSituationService getAddUpSituationService(User user) {
- return (AddUpSituationService) ServiceUtil.getService(AddUpSituationServiceImpl.class, user);
+ return ServiceUtil.getService(AddUpSituationServiceImpl.class, user);
}
private AddUpDeductionService getAddUpDeductionService(User user) {
- return (AddUpDeductionService) ServiceUtil.getService(AddUpDeductionServiceImpl.class, user);
+ return ServiceUtil.getService(AddUpDeductionServiceImpl.class, user);
}
private OtherDeductionService getOtherDeductionService(User user) {
- return (OtherDeductionService) ServiceUtil.getService(OtherDeductionServiceImpl.class, user);
+ return ServiceUtil.getService(OtherDeductionServiceImpl.class, user);
}
private SIAccountService getSIAccountService(User user) {
- return (SIAccountService) ServiceUtil.getService(SIAccountServiceImpl.class, user);
+ return ServiceUtil.getService(SIAccountServiceImpl.class, user);
}
private AttendQuoteDataService getAttendQuoteDataService(User user) {
- return (AttendQuoteDataService) ServiceUtil.getService(AttendQuoteDataServiceImpl.class, user);
+ return ServiceUtil.getService(AttendQuoteDataServiceImpl.class, user);
}
private FormulaRunService getFormulaRunService(User user) {
- return (FormulaRunService) ServiceUtil.getService(FormulaRunServiceImpl.class, user);
+ return ServiceUtil.getService(FormulaRunServiceImpl.class, user);
}
private SalaryAcctResultTempService getSalaryAcctResultTempService(User user) {
- return (SalaryAcctResultTempService) ServiceUtil.getService(SalaryAcctResultTempServiceImpl.class, user);
+ return ServiceUtil.getService(SalaryAcctResultTempServiceImpl.class, user);
}
private SalaryAcctProgressService getSalaryAcctProgressService(User user) {
- return (SalaryAcctProgressService) ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
+ return ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
}
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
- return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
+ return ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
}
@Override
@@ -110,7 +110,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 数据库字段加密用
// 1、查询人员信息
List employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
- List simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
+ List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
SalarySobCycleDTO salarySobCycleDTO = salaryAcctCalculateBO.getSalarySobCycleDTO();
Long taxAgentId = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentId();
// 2、查询薪资档案的数据
@@ -138,8 +138,8 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 薪资回算时回算前的核算结果 (没有回算项)
Map> collect = salaryAcctResultPOS.stream().collect(Collectors.groupingBy(k -> k.getEmployeeId() + "-" + k.getTaxAgentId() + "-" + k.getSalaryItemId()));
Map salaryAcctResultPOMap = new HashMap<>();
- for(Map.Entry> et : collect.entrySet()){
- salaryAcctResultPOMap.put(et.getKey(),et.getValue().get(0).getOriginResultValue());
+ for (Map.Entry> et : collect.entrySet()) {
+ salaryAcctResultPOMap.put(et.getKey(), et.getValue().get(0).getOriginResultValue());
}
//核算锁定的值
Map salaryAcctLockResultPOS = MapUtils.emptyIfNull(salaryAcctCalculateBO.getSalaryAcctLockResultPOS());
@@ -181,12 +181,11 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
String resultValue;
SalaryItemPO salaryItemPO = salaryItemMap.get(salaryItemId);
ExpressFormula expressFormula;
- if (salarySobBackItemMap.containsKey(salaryItemId)){
+ if (salarySobBackItemMap.containsKey(salaryItemId)) {
// 如果薪资账套的回算项目中重新定义了回算项目公式,则使用薪资账套下的公式
SalarySobBackItemPO salarySobBackItemPO = salarySobBackItemMap.get(salaryItemId);
expressFormula = expressFormulaMap.get(salarySobBackItemPO.getFormulaId());
- }
- else if (salaryItemIdKeySalarySobItemPOMap.containsKey(salaryItemId)) {
+ } else if (salaryItemIdKeySalarySobItemPOMap.containsKey(salaryItemId)) {
// 如果薪资账套下重新定义了薪资项目的公式,则使用薪资账套下的公式,否则使用薪资项目本身的公式
SalarySobItemPO salarySobItemPO = salaryItemIdKeySalarySobItemPOMap.get(salaryItemId);
expressFormula = expressFormulaMap.get(salarySobItemPO.getFormulaId());
@@ -229,8 +228,8 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
.setSalarySobId(salaryAcctEmployeePO.getSalarySobId())
.setSalaryItemId(salaryItemPO.getId())
.setResultValue(resultValue)
- .setOriginResultValue(salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId()+"-"+salaryAcctEmployeePO.getTaxAgentId()+"-"+salaryItemId) == null
- ? StringUtils.EMPTY : salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId()+"-"+salaryAcctEmployeePO.getTaxAgentId()+"-"+salaryItemId))
+ .setOriginResultValue(salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId() + "-" + salaryAcctEmployeePO.getTaxAgentId() + "-" + salaryItemId) == null
+ ? StringUtils.EMPTY : salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId() + "-" + salaryAcctEmployeePO.getTaxAgentId() + "-" + salaryItemId))
.setCalculateKey(salaryAcctCalculateBO.getCalculateKey())
.setCreator((long) user.getUID())
.setCreateTime(now)
diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java
index 732adbeb9..7c36eadc2 100644
--- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java
@@ -239,7 +239,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
for (List tempList : partition) {
// 人员
List employeeIds = tempList.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList());
- List simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
+ List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 个税扣缴义务人
List taxAgentIds = tempList.stream().map(SalaryAcctEmployeePO::getTaxAgentId).distinct().collect(Collectors.toList());
List taxAgents = getTaxAgentService(user).listByIds(taxAgentIds);
diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java
index 1f1bd0c68..7bf2a532d 100644
--- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java
@@ -361,7 +361,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
List salaryAcctResultPOS = listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
// 查询人员信息
List employeeIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
- List simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
+ List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询个税扣缴义务人
Set taxAgentIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getTaxAgentId);
List taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
diff --git a/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java
index 8d99c24da..6b364347c 100644
--- a/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java
@@ -195,7 +195,7 @@ public class SalaryComparisonResultServiceImpl extends Service implements Salary
List taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
// 查询人员信息
List employeeIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
- List simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
+ List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 判断是否存在合并计税
Set salaryAcctEmployeeIds4ConsolidatedTax;
if (StringUtils.isEmpty(queryParam.getConsolidatedTaxation())) {
diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java
index ccc16521a..ff64556f1 100644
--- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java
@@ -5,17 +5,18 @@ import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.EmployBiz;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
+import com.engine.salary.entity.hrm.DeptInfo;
+import com.engine.salary.entity.hrm.PositionInfo;
+import com.engine.salary.entity.hrm.SubCompanyInfo;
import com.engine.salary.entity.salarysob.bo.SalarySobRangeBO;
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
import com.engine.salary.enums.UserStatusEnum;
-import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.SalarySobRangeService;
import com.engine.salary.sys.entity.po.SalarySysConfPO;
import com.engine.salary.util.SalaryEntityUtil;
-import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -41,10 +42,6 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
return ServiceUtil.getService(SalarySobRangeServiceImpl.class, user);
}
- private EmployMapper getEmployMapper() {
- return MapperProxyFactory.getProxy(EmployMapper.class);
- }
-
private SalarySysConfMapper getSalarySysConfMapper() {
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
}
@@ -56,7 +53,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
@Override
public List listAllForReport() {
- return getEmployMapper().listAllForReport();
+ return employBiz.listAllForReport();
}
@Override
@@ -93,7 +90,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
}
@Override
- public List listByIds(List ids) {
+ public List getEmployeeByIdsAll(List ids) {
return employBiz.getEmployeeByIdsAll(ids);
}
@@ -110,7 +107,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
List employeeList = new ArrayList<>();
List> partition = Lists.partition(simpleEmployeeIds, 1000);
for (List longs : partition) {
- employeeList.addAll(getEmployMapper().getEmployeeByIds(longs));
+ employeeList.addAll(employBiz.getEmployeeByIds(longs));
}
return employeeList;
@@ -156,4 +153,24 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
return employees;
}
+
+ @Override
+ public List getDeptInfoList(List departmentIds) {
+ return employBiz.getDeptInfoList(departmentIds);
+ }
+
+ @Override
+ public List getSubCompanyInfoList(List subDepartmentIds) {
+ return employBiz.getSubCompanyInfoList(subDepartmentIds);
+ }
+
+ @Override
+ public List listPositionInfo(List positionIds) {
+ return employBiz.listPositionInfo(positionIds);
+ }
+
+ @Override
+ public List listEmployee() {
+ return employBiz.listEmployee();
+ }
}
diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java
index 272400483..c834df650 100644
--- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java
@@ -4,7 +4,6 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.cloudstore.dev.api.util.Util_DataCache;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
-import com.engine.salary.biz.EmployBiz;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.hrm.DeptInfo;
import com.engine.salary.entity.hrm.HrmStatus;
@@ -21,7 +20,6 @@ import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
import com.engine.salary.enums.salarysob.TargetTypeEnum;
import com.engine.salary.enums.taxagent.TaxAgentRangeTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
-import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.mapper.taxagent.TaxAgentManageRangeMapper;
import com.engine.salary.service.*;
@@ -81,9 +79,9 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
private SalaryArchiveService getSalaryArchiveService(User user) {
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
}
-
- private EmployMapper getEmployMapper() {
- return MapperProxyFactory.getProxy(EmployMapper.class);
+
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
private SalarySysConfMapper getSalarySysConfMapper() {
@@ -98,7 +96,6 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
return ServiceUtil.getService(SIArchivesServiceImpl.class,user);
}
- private EmployBiz employBiz = new EmployBiz();
private List listByTaxAgentIds(List taxAgentIds) {
if (CollectionUtils.isEmpty(taxAgentIds)) {
@@ -233,17 +230,17 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// 查询人员信息
List employeeIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
// List employeeComInfos = comInfoCache.getCacheList(HrmEmployeeComInfo.class, employeeIds);
- List employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
+ List employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询部门信息
List departmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.DEPT.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
- List departmentComInfos = employBiz.getDeptInfoList(departmentIds);
+ List departmentComInfos = getSalaryEmployeeService(user).getDeptInfoList(departmentIds);
// 查询分部信息
List subDepartmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
- List subDepartmentComInfos = employBiz.getSubCompanyInfoList(subDepartmentIds);
+ List subDepartmentComInfos = getSalaryEmployeeService(user).getSubCompanyInfoList(subDepartmentIds);
// 查询岗位信息
List positionIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.POSITION.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
- List positionComInfos = employBiz.listPositionInfo(positionIds);
+ List positionComInfos = getSalaryEmployeeService(user).listPositionInfo(positionIds);
// 分页参数
PageInfo dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxAgentManageRangeListDTO.class);
// 查询人员状态
@@ -316,7 +313,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// 去重
allRanges = allRanges.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getTaxAgentId() + "." + f.getRangeType() + "." + f.getTargetType() + "." + f.getTargetId() + "." + f.getEmployeeStatus() + "." + f.getIncludeType()))), ArrayList::new));
- List salaryEmployees = getEmployMapper().listAll();
+ List salaryEmployees = getSalaryEmployeeService(user).listAll();
List allSalaryEmployees = this.getManageRangeSalaryEmployees(saveParam.getTaxAgentId(), allRanges, salaryEmployees);
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */
@@ -401,7 +398,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
List allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList());
Long taxAgentId = taxAgentIds.get(0);
- List salaryEmployees = getEmployMapper().listAll();
+ List salaryEmployees = getSalaryEmployeeService(user).listAll();
List allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees);
List allSubAdminSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allSubAdminRanges, salaryEmployees);
@@ -442,7 +439,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
}
taxAgentIds = allManageRanges.stream().map(TaxAgentManageRangePO::getTaxAgentId).distinct().collect(Collectors.toList());
// 获取所有人员
- List salaryEmployees = getEmployMapper().listAll();
+ List salaryEmployees = getSalaryEmployeeService(user).listAll();
List taxAgentEmpSaveParamList = Lists.newArrayList();
List subAdminEmpSaveParamList = Lists.newArrayList();
@@ -585,7 +582,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
int errorCount = 0;
//人员信息
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 错误excel内容
List errorData = new ArrayList<>();
@@ -722,7 +719,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// 去重
allRanges = allRanges.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getTaxAgentId() + "." + f.getRangeType() + "." + f.getTargetType() + "." + f.getTargetId() + "." + f.getEmployeeStatus() + "." + f.getIncludeType()))), ArrayList::new));
- List salaryEmployees = getEmployMapper().listAll();
+ List salaryEmployees = getSalaryEmployeeService(user).listAll();
List allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees);
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */
diff --git a/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java
index 7addd6ac8..2e9bc4c03 100644
--- a/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java
+++ b/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java
@@ -27,7 +27,6 @@ import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.archive.SalaryArchiveMapper;
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
import com.engine.salary.mapper.datacollection.AddUpSituationMapper;
-import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.datacollection.OtherDeductionMapper;
import com.engine.salary.mapper.salarysob.SalarySobMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
@@ -112,9 +111,6 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
return MapperProxyFactory.getProxy(TaxAgentMapper.class);
}
- private EmployMapper getEmployMapper() {
- return MapperProxyFactory.getProxy(EmployMapper.class);
- }
// private PaymentAgencyMapper paymentAgencyMapper;
diff --git a/src/com/engine/salary/service/impl/TaxDeclarationDetailServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationDetailServiceImpl.java
index 1bf1bc94c..a21906a39 100644
--- a/src/com/engine/salary/service/impl/TaxDeclarationDetailServiceImpl.java
+++ b/src/com/engine/salary/service/impl/TaxDeclarationDetailServiceImpl.java
@@ -110,7 +110,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
// 查询个税申报表明细
List taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(queryParam.getTaxDeclarationId(), employeeIdPage);
// 查询人员
- List simpleEmployees = getSalaryEmployeeService().listByIds(employeeIdPage);
+ List simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIdPage);
// List simpleEmployees = hrmCommonEmployeeService.getEmployeeByIds(employeeIdPage.getRecords(), tenantKey);
// 转换成列表dto
TaxDeclarationBO.buildDetailListDTO(queryParam.getTaxDeclarationId(), dtoPage, taxDeclarationDetailPOS, simpleEmployees);
@@ -181,7 +181,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
List employeeIds = taxDeclarationEmployees.stream().map(TaxDeclarationEmployeeDTO::getEmployeeId).collect(Collectors.toList());
List taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(taxDeclarationId, employeeIds);
// 查询人员信息
- List simpleEmployees = getSalaryEmployeeService().listByIds(employeeIds);
+ List simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIds);
// 转换成列表dto
return TaxDeclarationDetailBO.convert2ListDTO4Labor(taxDeclarationDetailPOS, taxDeclarationEmployees, simpleEmployees);
}
@@ -199,7 +199,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
List employeeIds = taxDeclarationEmployees.stream().map(TaxDeclarationEmployeeDTO::getEmployeeId).collect(Collectors.toList());
List taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(taxDeclarationId, employeeIds);
// 查询人员信息
- List simpleEmployees = getSalaryEmployeeService().listByIds(employeeIds);
+ List simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIds);
// 转换成列表dto
return TaxDeclarationDetailBO.convert2ListDTO4Annual(taxDeclarationDetailPOS, taxDeclarationEmployees, simpleEmployees);
}
diff --git a/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java
index 150ccfa06..526fbfcb5 100644
--- a/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java
+++ b/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java
@@ -107,7 +107,7 @@ public class SalaryAcctEmployeeWrapper extends Service {
}
// 查询人员信息
List employeeIds = list.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList());
- List simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
+ List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询个税扣缴义务人
List taxAgentIds = list.stream().map(SalaryAcctEmployeePO::getTaxAgentId).collect(Collectors.toList());
List taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
diff --git a/src/com/engine/salary/wrapper/TaxAgentWrapper.java b/src/com/engine/salary/wrapper/TaxAgentWrapper.java
index 9f9fa2f1f..86df32a70 100644
--- a/src/com/engine/salary/wrapper/TaxAgentWrapper.java
+++ b/src/com/engine/salary/wrapper/TaxAgentWrapper.java
@@ -146,7 +146,7 @@ public class TaxAgentWrapper extends Service {
List list = page.getList();
List taxAgentIds = list.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
List taxAgentAdmins = getTaxAgentAdminService(user).listByTaxAgentIds(taxAgentIds);
- List adminList = getSalaryEmployeeService(user).listByIds(taxAgentAdmins.stream().map(TaxAgentAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
+ List adminList = getSalaryEmployeeService(user).getEmployeeByIdsAll(taxAgentAdmins.stream().map(TaxAgentAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
listPage.setList(TaxAgentBO.convertToTableListDTO(page.getList(), null, taxAgentAdmins, adminList, setLabel));
} else {
listPage.setList(TaxAgentBO.convertToTableListDTO(page.getList(), null, setLabel));
From 068f7e653517387522d0e2a16bad1516e3cd782a Mon Sep 17 00:00:00 2001
From: Harryxzy
Date: Tue, 7 Mar 2023 17:14:25 +0800
Subject: [PATCH 05/86] =?UTF-8?q?EmployeeBiz=E4=BF=AE=E6=94=B9=E8=B0=83?=
=?UTF-8?q?=E7=94=A8=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/com/engine/salary/biz/SIArchivesBiz.java | 8 +++++++-
.../salary/service/SalaryEmployeeService.java | 3 +++
.../service/impl/RecordsBuildServiceImpl.java | 11 +++++++++--
.../service/impl/SIAccountServiceImpl.java | 10 +++++-----
.../salary/service/impl/SISchemeServiceImpl.java | 4 ++--
.../service/impl/SalaryEmployeeServiceImpl.java | 13 +++++++++++--
.../service/impl/SalarySendRangeServiceImpl.java | 6 +++---
.../service/impl/SalarySobRangeServiceImpl.java | 6 +++---
.../impl/SpecialAddDeductionServiceImpl.java | 6 +++---
.../salary/wrapper/SalaryAcctRecordWrapper.java | 16 +++++++---------
.../salary/wrapper/SalaryArchiveWrapper.java | 6 +++++-
.../salary/wrapper/TaxAgentSubAdminWrapper.java | 11 +++++++++--
.../salary/wrapper/TaxDeclarationWrapper.java | 7 ++++++-
13 files changed, 73 insertions(+), 34 deletions(-)
diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java
index 5e4051d13..5183139f0 100644
--- a/src/com/engine/salary/biz/SIArchivesBiz.java
+++ b/src/com/engine/salary/biz/SIArchivesBiz.java
@@ -40,6 +40,8 @@ import com.engine.salary.mapper.sicategory.ICategoryMapper;
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
+import com.engine.salary.service.SalaryEmployeeService;
+import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryFormItemUtil;
@@ -110,6 +112,10 @@ public class SIArchivesBiz {
return ServiceUtil.getService(TaxAgentWrapper.class, user);
}
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
+
/**
* @param welfareType
* @param employeeId
@@ -121,7 +127,7 @@ public class SIArchivesBiz {
Map data = new HashMap<>(16);
SalaryAssert.notNull(employeeId, "员工id不可为空");
EmployBiz employBiz = new EmployBiz();
- List employeeByIds = employBiz.getEmployeeByIdsAll(Collections.singletonList(employeeId));
+ List employeeByIds = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(employeeId));
SalaryAssert.notEmpty(employeeByIds, "员工信息不存在");
DataCollectionEmployee item = employeeByIds.get(0);
diff --git a/src/com/engine/salary/service/SalaryEmployeeService.java b/src/com/engine/salary/service/SalaryEmployeeService.java
index 8fc5f9d4d..7cb496957 100644
--- a/src/com/engine/salary/service/SalaryEmployeeService.java
+++ b/src/com/engine/salary/service/SalaryEmployeeService.java
@@ -4,6 +4,7 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.hrm.DeptInfo;
import com.engine.salary.entity.hrm.PositionInfo;
import com.engine.salary.entity.hrm.SubCompanyInfo;
+import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
import java.util.List;
@@ -85,4 +86,6 @@ public interface SalaryEmployeeService {
List listEmployee();
+ List listByParams(List includeQueryParams);
+
}
diff --git a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java
index 6dd5c4c2d..cf1a2abed 100644
--- a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java
+++ b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java
@@ -1,6 +1,7 @@
package com.engine.salary.service.impl;
import com.alibaba.fastjson.JSON;
+import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.EmployBiz;
import com.engine.salary.biz.SIArchivesBiz;
@@ -18,6 +19,7 @@ import com.engine.salary.enums.siaccount.ResourceFromEnum;
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
import com.engine.salary.service.RecordsBuildService;
+import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryEnumUtil;
@@ -26,6 +28,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
+import weaver.hrm.User;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -42,6 +45,10 @@ import java.util.stream.Collectors;
public class RecordsBuildServiceImpl extends Service implements RecordsBuildService {
EmployBiz employBiz = new EmployBiz();
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
+
@Override
public List> buildCommonRecords(List list, Long employeeId) {
List> result = new ArrayList<>();
@@ -52,7 +59,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
List employeeByIds = new ArrayList<>();
List> partition = Lists.partition(employeeIds, 1000);
for (List longs : partition) {
- employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs));
+ employeeByIds.addAll(getSalaryEmployeeService(user).getEmployeeByIdsAll(longs));
}
if (CollectionUtils.isEmpty(employeeByIds)) {
return result;
@@ -199,7 +206,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
List employeeByIds = new ArrayList<>();
List> partition = Lists.partition(employeeIds, 1000);
for (List longs : partition) {
- employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs));
+ employeeByIds.addAll(getSalaryEmployeeService(user).getEmployeeByIdsAll(longs));
}
if (CollectionUtils.isEmpty(employeeByIds)) {
return result;
diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java
index 86dbc3a69..64765b7cd 100644
--- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java
@@ -1252,7 +1252,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
// Map taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId);
// 获取租户下所有的人员
- List salaryEmployees = employBiz.listEmployee();
+ List salaryEmployees = getSalaryEmployeeService(user).listAll();
// 失败的数量
int failCount = 0;
@@ -1528,7 +1528,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
for(InsuranceAccountDetailPO po : supplyDataList) {
Map resultMap = new HashMap<>();
- employee = employeeBiz.getEmployeeById(po.getEmployeeId());
+ employee = getSalaryEmployeeService(user).getEmployeeById(po.getEmployeeId());
resultMap.put("username", employee.getUsername());
resultMap.put("departmentName", employee.getDepartmentName());
resultMap.put("mobile", employee.getMobile());
@@ -1568,7 +1568,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
for(InsuranceAccountDetailPO po : normalDataList) {
Map resultMap = new HashMap<>();
- employee = employeeBiz.getEmployeeById(po.getEmployeeId());
+ employee = getSalaryEmployeeService(user).getEmployeeById(po.getEmployeeId());
resultMap.put("username", employee.getUsername());
resultMap.put("departmentName", employee.getDepartmentName());
resultMap.put("mobile", employee.getMobile());
@@ -1917,7 +1917,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
}
// 获取租户下所有的人员
- List salaryEmployees = employBiz.listEmployee();
+ List salaryEmployees = getSalaryEmployeeService(user).listAll();
// 失败的数量
int failCount = 0;
@@ -2609,7 +2609,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
// Map taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId);
// 获取租户下所有的人员
- List salaryEmployees = employBiz.listEmployee();
+ List salaryEmployees = getSalaryEmployeeService(user).listEmployee();
List insuranceCategoryPOS = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll();
// 失败的数量
diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java
index fa7a46414..495d93dfb 100644
--- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java
@@ -635,7 +635,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
List taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree();
// 获取所有人员信息
- List employeeByIds = employeeBiz.listEmployee();
+ List employeeByIds = getSalaryEmployeeService(user).listEmployee();
int total = 0;
int index = 0;
@@ -1402,7 +1402,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
List taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree();
// 获取所有人员信息
- List employeeByIds = employeeBiz.listEmployee();
+ List employeeByIds = getSalaryEmployeeService(user).listEmployee();
int total = 0;
int index = 0;
diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java
index ff64556f1..704003b35 100644
--- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java
@@ -46,6 +46,10 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
}
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
+
@Override
public List listAll() {
return employBiz.listEmployee();
@@ -66,7 +70,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
// 将薪资账套的人员范围转换成人员查询参数
List includeQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(includeSalarySobRangePOS);
// 根据上一步的查询参数查询人员
- List includeSalaryEmployees = employBiz.listByParams(includeQueryParams);
+ List includeSalaryEmployees = getSalaryEmployeeService(user).listByParams(includeQueryParams);
if (CollectionUtils.isEmpty(includeSalaryEmployees)) {
return Collections.emptyList();
}
@@ -78,7 +82,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
// 将薪资账套的人员范围转换成人员查询参数
List excludeQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(excludeSalarySobRangePOS);
// 根据上一步的查询参数查询人员
- List excludeSalaryEmployees = employBiz.listByParams(excludeQueryParams);
+ List excludeSalaryEmployees = getSalaryEmployeeService(user).listByParams(excludeQueryParams);
// 需要排除的人员范围
Set excludeEmployeeIds = SalaryEntityUtil.properties(excludeSalaryEmployees, DataCollectionEmployee::getEmployeeId);
// 过滤人员
@@ -173,4 +177,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
public List listEmployee() {
return employBiz.listEmployee();
}
+
+ @Override
+ public List listByParams(List includeQueryParams) {
+ return employBiz.listByParams(includeQueryParams);
+ }
}
diff --git a/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java
index bf15ff818..01ea17ddc 100644
--- a/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java
@@ -116,17 +116,17 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
.orElse(null);
break;
case DEPT:
- targetName = employBiz.getDeptInfoList(Collections.singletonList(rangeObj.getTargetId()))
+ targetName = getSalaryEmployeeService().getDeptInfoList(Collections.singletonList(rangeObj.getTargetId()))
.stream().findFirst()
.map(DeptInfo::getName).orElse(null);
break;
case SUB_COMPANY:
- targetName = employBiz.getSubCompanyInfoList(Collections.singletonList(rangeObj.getTargetId()))
+ targetName = getSalaryEmployeeService().getSubCompanyInfoList(Collections.singletonList(rangeObj.getTargetId()))
.stream().findFirst()
.map(SubCompanyInfo::getName).orElse(null);
break;
case POSITION:
- targetName = employBiz.listPositionInfo(Collections.singletonList(rangeObj.getTargetId()))
+ targetName = getSalaryEmployeeService().listPositionInfo(Collections.singletonList(rangeObj.getTargetId()))
.stream().findFirst()
.map(PositionInfo::getName).orElse(null);
break;
diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java
index 9a6e12409..8d2a8b6cc 100644
--- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java
@@ -116,7 +116,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
.filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue()))
.map(SalarySobRangePO::getTargetId)
.collect(Collectors.toList());
- List empInfos = employBiz.getEmployeeByIds(employeeIds);
+ List empInfos = getSalaryEmployeeService(user).getEmployeeByIds(employeeIds);
// 查询部门信息
@@ -143,7 +143,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
.filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.POSITION.getValue()))
.map(SalarySobRangePO::getTargetId)
.collect(Collectors.toList());
- List positionInfos = employBiz.listPositionInfo(positionIds);
+ List positionInfos = getSalaryEmployeeService(user).listPositionInfo(positionIds);
// 薪资账套的人员范围po转换成列表dto
List salarySobRangeListDTOS = SalarySobRangeBO.convert2ListDTO(salarySobRangePOS, empInfos, deptInfos,subCompanyInfos, positionInfos);
@@ -294,7 +294,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
int errorCount = 0;
//人员信息
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 获取所有个税扣缴义务人
Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
// 错误excel内容
diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java
index 18ea0cf0c..d8425298d 100644
--- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java
@@ -202,7 +202,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
int errorCount = 0;
//人员信息
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 获取所有个税扣缴义务人
Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
// 查询已有数据
@@ -414,7 +414,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
throw new SalaryRunTimeException(String.format("专项附加扣除不存在" + "[id:%s]", id));
}
- List employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
+ List employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
if (CollectionUtils.isEmpty(employeeList)) {
throw new SalaryRunTimeException("员工信息不存在");
}
@@ -525,7 +525,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
//人员信息
- List employees = employBiz.listEmployee();
+ List employees = getSalaryEmployeeService(user).listEmployee();
// 获取所有个税扣缴义务人
Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
// 查询已有数据
diff --git a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java
index 66f83facf..de81db3e6 100644
--- a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java
+++ b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java
@@ -15,14 +15,8 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.exception.SalaryRunTimeException;
-import com.engine.salary.service.SalaryAcctEmployeeService;
-import com.engine.salary.service.SalaryAcctRecordService;
-import com.engine.salary.service.SalarySendService;
-import com.engine.salary.service.SalarySobService;
-import com.engine.salary.service.impl.SalaryAcctEmployeeServiceImpl;
-import com.engine.salary.service.impl.SalaryAcctRecordServiceImpl;
-import com.engine.salary.service.impl.SalarySendServiceImpl;
-import com.engine.salary.service.impl.SalarySobServiceImpl;
+import com.engine.salary.service.*;
+import com.engine.salary.service.impl.*;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
@@ -62,6 +56,10 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
return ServiceUtil.getService(SalarySendServiceImpl.class, user);
}
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
+
// private ComInfoCache comInfoCache;
public PageInfo listPage(SalaryAcctRecordQueryParam queryParam) {
@@ -84,7 +82,7 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
List salarySobPOS = getSalarySobService(user).listByIds(salarySobIds);
// 查询薪资核算记录的创建人员的人员信息
List employeeIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getCreator, Collectors.toList());
- List employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
+ List employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询薪资核算人数的数量
Set salaryAcctRecordIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getId);
List salaryAcctEmployeeCountDTOS = getSalaryAcctEmployeeService(user).countBySalaryAcctRecordId(salaryAcctRecordIds);
diff --git a/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java b/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java
index 300f0dda2..30c817900 100644
--- a/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java
+++ b/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java
@@ -67,6 +67,10 @@ public class SalaryArchiveWrapper extends Service {
return ServiceUtil.getService(SalaryArchiveExcelServiceImpl.class, user);
}
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
+
/**
* 薪资档案列表(分页)
@@ -320,7 +324,7 @@ public class SalaryArchiveWrapper extends Service {
throw new SalaryRunTimeException(String.format(SalaryI18nUtil.getI18nLabel(100463, "薪资档案不存在") + "[id:%s]", salaryArchiveId));
}
- List employeeList = employeeService.getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId()));
+ List employeeList = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId()));
if (CollectionUtils.isEmpty(employeeList)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100465, "薪资档案员工信息不存在"));
}
diff --git a/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java b/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java
index b9025ead9..d829f0d6c 100644
--- a/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java
+++ b/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java
@@ -1,5 +1,6 @@
package com.engine.salary.wrapper;
+import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.EmployBiz;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
@@ -9,8 +10,10 @@ import com.engine.salary.entity.taxagent.param.*;
import com.engine.salary.entity.taxagent.po.TaxAgentSubAdminPO;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.exception.SalaryRunTimeException;
+import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.TaxAgentManageRangeService;
import com.engine.salary.service.TaxAgentSubAdminService;
+import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
@@ -38,6 +41,10 @@ public class TaxAgentSubAdminWrapper extends Service {
private TaxAgentManageRangeService taxAgentManageRangeService;
// private HrmCommonEmployeeService hrmCommonEmployeeService;
+ private SalaryEmployeeService getSalaryEmployeeService() {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
+
private EmployBiz employBiz = new EmployBiz();
/**
@@ -51,7 +58,7 @@ public class TaxAgentSubAdminWrapper extends Service {
List list = taxAgentSubAdminService.listByTaxAgentIds(Collections.singletonList(queryParam.getTaxAgentId()));
String range = SalaryI18nUtil.getI18nLabel(106290, "详情");
- List subAdminList = employBiz.getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
+ List subAdminList = getSalaryEmployeeService().getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
List records = TaxAgentBO.convertToSubAdminListDTO(list, range, subAdminList);
PageInfo listPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxAgentSubAdminListDTO.class);
@@ -95,7 +102,7 @@ public class TaxAgentSubAdminWrapper extends Service {
taxAgentSubAdminBaseFormDTO.setDescription(taxAgentSubAdmin.getRemark());
TaxAgentEmployeeOptionDTO taxAgentEmployee = new TaxAgentEmployeeOptionDTO();
taxAgentEmployee.setId(taxAgentSubAdmin.getEmployeeId());
- DataCollectionEmployee employee = employBiz.getEmployeeById(taxAgentEmployee.getId());
+ DataCollectionEmployee employee = getSalaryEmployeeService().getEmployeeById(taxAgentEmployee.getId());
taxAgentEmployee.setContent(employee == null ? "" : employee.getUsername());
taxAgentSubAdminBaseFormDTO.setSubAdminUser(Collections.singletonList(taxAgentEmployee));
diff --git a/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java b/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java
index b3f4a23c5..6ef9c7d16 100644
--- a/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java
+++ b/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java
@@ -14,8 +14,10 @@ import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryPara
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
import com.engine.salary.exception.SalaryRunTimeException;
+import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.TaxAgentService;
import com.engine.salary.service.TaxDeclarationService;
+import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
import com.engine.salary.service.impl.TaxAgentServiceImpl;
import com.engine.salary.service.impl.TaxDeclarationServiceImpl;
import com.engine.salary.util.SalaryDateUtil;
@@ -48,6 +50,9 @@ public class TaxDeclarationWrapper extends Service {
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
}
+ private SalaryEmployeeService getSalaryEmployeeService(User user) {
+ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
+ }
/**
* 个税申报表列表
*
@@ -67,7 +72,7 @@ public class TaxDeclarationWrapper extends Service {
if (CollectionUtils.isNotEmpty(list)) {
// 查询人员
List employeeIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getCreator, Collectors.toList());
- List employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
+ List employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询个税扣缴义务人
Set taxAgentIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getTaxAgentId);
List taxAgentPOS = getTaxDeclarationService(user).countByTaxDeclarationId(taxAgentIds);
From 5067d5072247e9512786cfe0eb25873704877aab Mon Sep 17 00:00:00 2001
From: Harryxzy