From 3b342d4ec739199b1471b3d91788e8db52c4d38d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Fri, 22 Apr 2022 19:22:40 +0800
Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=96=AA=E8=B5=84=E7=A6=8F?=
=?UTF-8?q?=E5=88=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
resource/sql/sqlserver.sql | 29 +++--
.../api/salary/web/SIReportController.java | 16 +++
.../param/QueryAccountDetailParam.java | 25 ++++
.../siaccount/SIAccountDetailMapper.java | 17 +++
.../siaccount/SIAccountDetailMapper.xml | 116 ++++++++++++++++++
.../salary/service/SIReportService.java | 11 ++
.../service/impl/SIReportServiceImpl.java | 28 +++++
.../engine/salary/web/SIReportController.java | 51 ++++++++
.../salary/wrapper/SIReportWrapper.java | 69 +++++++++++
9 files changed, 355 insertions(+), 7 deletions(-)
create mode 100644 src/com/api/salary/web/SIReportController.java
create mode 100644 src/com/engine/salary/entity/siaccount/param/QueryAccountDetailParam.java
create mode 100644 src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.java
create mode 100644 src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.xml
create mode 100644 src/com/engine/salary/service/SIReportService.java
create mode 100644 src/com/engine/salary/service/impl/SIReportServiceImpl.java
create mode 100644 src/com/engine/salary/web/SIReportController.java
create mode 100644 src/com/engine/salary/wrapper/SIReportWrapper.java
diff --git a/resource/sql/sqlserver.sql b/resource/sql/sqlserver.sql
index 2960ff684..66acb63db 100644
--- a/resource/sql/sqlserver.sql
+++ b/resource/sql/sqlserver.sql
@@ -46,16 +46,31 @@ ALTER TABLE hrsa_salary_item
CREATE TABLE hrsa_salary_sob_item
(
- id bigint(20) identity (1,1) PRIMARY KEY,
- salary_sob_id bigint(20) NOT NULL,
- salary_item_id bigint(20) NOT NULL,
- salary_sob_item_group_id bigint(20) NOT NULL,
- formula_id bigint(20) NOT NULL,
+ id bigint identity (1,1) PRIMARY KEY,
+ salary_sob_id bigint NOT NULL,
+ salary_item_id bigint NOT NULL,
+ salary_sob_item_group_id bigint NOT NULL,
+ formula_id bigint NOT NULL,
sorted_index int(11) NOT NULL,
description varchar(1000) NOT NULL DEFAULT '',
create_time datetime NOT NULL,
update_time datetime NOT NULL,
- creator bigint(20) NOT NULL,
+ creator bigint NOT NULL,
delete_type int(11) NOT NULL,
tenant_key varchar(10) NOT NULL
-);
\ No newline at end of file
+);
+
+
+CREATE TABLE hrsa_sob_default_item_group
+(
+ id bigint identity (1,1) PRIMARY KEY,
+ income_category tinyint NOT NULL DEFAULT '1' ,
+ name varchar(100) NOT NULL DEFAULT '' ,
+ sorted_index int NOT NULL DEFAULT '0',
+ description varchar(1000) NOT NULL DEFAULT '' ,
+ create_time datetime NOT NULL ,
+ update_time datetime NOT NULL ,
+ creator bigint NOT NULL DEFAULT '0',
+ delete_type int NOT NULL DEFAULT '0' ,
+ tenant_key varchar(10) NOT NULL DEFAULT ''
+) ;
\ No newline at end of file
diff --git a/src/com/api/salary/web/SIReportController.java b/src/com/api/salary/web/SIReportController.java
new file mode 100644
index 000000000..f61cc4af1
--- /dev/null
+++ b/src/com/api/salary/web/SIReportController.java
@@ -0,0 +1,16 @@
+package com.api.salary.web;
+
+import javax.ws.rs.Path;
+
+/**
+ * 福利报表
+ *
Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Path("/bs/hrmsalary/report")
+public class SIReportController extends com.engine.salary.web.SIReportController {
+
+}
diff --git a/src/com/engine/salary/entity/siaccount/param/QueryAccountDetailParam.java b/src/com/engine/salary/entity/siaccount/param/QueryAccountDetailParam.java
new file mode 100644
index 000000000..49f5a7614
--- /dev/null
+++ b/src/com/engine/salary/entity/siaccount/param/QueryAccountDetailParam.java
@@ -0,0 +1,25 @@
+package com.engine.salary.entity.siaccount.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 QueryAccountDetailParam extends BaseQueryParam {
+ String startMonth;
+ String endMonth;
+ Long employeeId;
+}
diff --git a/src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.java b/src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.java
new file mode 100644
index 000000000..bcd4769f4
--- /dev/null
+++ b/src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.java
@@ -0,0 +1,17 @@
+package com.engine.salary.mapper.siaccount;
+
+import com.engine.salary.entity.siaccount.param.QueryAccountDetailParam;
+import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
+
+import java.util.List;
+
+
+public interface SIAccountDetailMapper {
+
+ /**
+ * 条件查询
+ *
+ * @return 返回集合,没有返回空List
+ */
+ List listSome(QueryAccountDetailParam param);
+}
diff --git a/src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.xml
new file mode 100644
index 000000000..0e5355298
--- /dev/null
+++ b/src/com/engine/salary/mapper/siaccount/SIAccountDetailMapper.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ t.id
+ , t.employee_id
+ , t.bill_month
+ , t.bill_status
+ , t.payment_status
+ , t.supplementary_month
+ , t.supplementary_projects
+ , t.resource_from
+ , t.social_pay_org
+ , t.social_account
+ , t.social_scheme_id
+ , t.social_payment_base_string
+ , t.fund_pay_org
+ , t.fund_account
+ , t.supplement_fund_account
+ , t.fund_scheme_id
+ , t.fund_payment_base_string
+ , t.other_pay_org
+ , t.other_scheme_id
+ , t.other_payment_base_string
+ , t.social_per_json
+ , t.social_per_sum
+ , t.fund_per_json
+ , t.fund_per_sum
+ , t.other_per_json
+ , t.other_per_sum
+ , t.per_sum
+ , t.social_com_json
+ , t.social_com_sum
+ , t.fund_com_json
+ , t.fund_com_sum
+ , t.other_com_json
+ , t.other_com_sum
+ , t.com_sum
+ , t.social_sum
+ , t.fund_sum
+ , t.other_sum
+ , t.total
+ , t.creator
+ , t.create_time
+ , t.update_time
+ , t.delete_type
+ , t.tenant_key
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/com/engine/salary/service/SIReportService.java b/src/com/engine/salary/service/SIReportService.java
new file mode 100644
index 000000000..21853c64e
--- /dev/null
+++ b/src/com/engine/salary/service/SIReportService.java
@@ -0,0 +1,11 @@
+package com.engine.salary.service;
+
+import com.engine.salary.entity.siaccount.param.QueryAccountDetailParam;
+import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
+import com.engine.salary.util.page.PageInfo;
+
+
+public interface SIReportService {
+
+ PageInfo welfareList(QueryAccountDetailParam param);
+}
diff --git a/src/com/engine/salary/service/impl/SIReportServiceImpl.java b/src/com/engine/salary/service/impl/SIReportServiceImpl.java
new file mode 100644
index 000000000..de3fe5b39
--- /dev/null
+++ b/src/com/engine/salary/service/impl/SIReportServiceImpl.java
@@ -0,0 +1,28 @@
+package com.engine.salary.service.impl;
+
+import com.engine.core.impl.Service;
+import com.engine.salary.entity.siaccount.param.QueryAccountDetailParam;
+import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
+import com.engine.salary.mapper.siaccount.SIAccountDetailMapper;
+import com.engine.salary.service.SIReportService;
+import com.engine.salary.util.db.MapperProxyFactory;
+import com.engine.salary.util.page.PageInfo;
+import com.engine.salary.util.page.PageUtil;
+
+import java.util.List;
+
+
+public class SIReportServiceImpl extends Service implements SIReportService {
+
+ private SIAccountDetailMapper getSIAccountDetailMapper(){
+ return MapperProxyFactory.getProxy(SIAccountDetailMapper.class);
+ }
+
+ @Override
+ public PageInfo welfareList(QueryAccountDetailParam param) {
+ PageUtil.start(param.getCurrent(),param.getPageSize());
+ List insuranceAccountDetailPOS = getSIAccountDetailMapper().listSome(param);
+ PageInfo page = new PageInfo<>(insuranceAccountDetailPOS ,InsuranceAccountDetailPO.class);
+ return page;
+ }
+}
diff --git a/src/com/engine/salary/web/SIReportController.java b/src/com/engine/salary/web/SIReportController.java
new file mode 100644
index 000000000..8a03593fa
--- /dev/null
+++ b/src/com/engine/salary/web/SIReportController.java
@@ -0,0 +1,51 @@
+package com.engine.salary.web;
+
+import com.engine.common.util.ServiceUtil;
+import com.engine.salary.entity.siaccount.param.QueryAccountDetailParam;
+import com.engine.salary.util.ResponseResult;
+import com.engine.salary.wrapper.SIReportWrapper;
+import com.engine.salary.wrapper.SalaryArchiveItemWrapper;
+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.Map;
+
+/**
+ * 福利报表
+ * Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+public class SIReportController {
+
+ private SalaryArchiveItemWrapper salaryArchiveItemWrapper;
+
+ private SalaryArchiveItemWrapper getSalaryArchiveItemWrapper(User user) {
+ return (SalaryArchiveItemWrapper) ServiceUtil.getService(SalaryArchiveItemWrapper.class, user);
+ }
+
+ private SIReportWrapper getSIReportWrapper(User user) {
+ return (SIReportWrapper) ServiceUtil.getService(SIReportWrapper.class, user);
+ }
+
+ @POST
+ @Path("welfare/list")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryAccountDetailParam queryParam) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult>().run(getSIReportWrapper(user)::welfareList, queryParam);
+ }
+
+
+
+}
diff --git a/src/com/engine/salary/wrapper/SIReportWrapper.java b/src/com/engine/salary/wrapper/SIReportWrapper.java
new file mode 100644
index 000000000..9987e9995
--- /dev/null
+++ b/src/com/engine/salary/wrapper/SIReportWrapper.java
@@ -0,0 +1,69 @@
+package com.engine.salary.wrapper;
+
+import com.cloudstore.eccom.pc.table.WeaTable;
+import com.cloudstore.eccom.pc.table.WeaTableColumn;
+import com.cloudstore.eccom.result.WeaResultMsg;
+import com.engine.common.util.ServiceUtil;
+import com.engine.core.impl.Service;
+import com.engine.salary.entity.siaccount.param.QueryAccountDetailParam;
+import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
+import com.engine.salary.service.ColumnBuildService;
+import com.engine.salary.service.RecordsBuildService;
+import com.engine.salary.service.SIReportService;
+import com.engine.salary.service.impl.ColumnBuildServiceImpl;
+import com.engine.salary.service.impl.RecordsBuildServiceImpl;
+import com.engine.salary.service.impl.SIReportServiceImpl;
+import com.engine.salary.util.page.PageInfo;
+import weaver.hrm.User;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class SIReportWrapper extends Service {
+
+ private SIReportService getSIReportService(User user) {
+ return (SIReportService) ServiceUtil.getService(SIReportServiceImpl.class, user);
+ }
+
+ private RecordsBuildService getRecordsBuildService(User user) {
+ return (RecordsBuildService) ServiceUtil.getService(RecordsBuildServiceImpl.class, user);
+ }
+
+
+ private ColumnBuildService getColumnBuildService(User user) {
+ return (ColumnBuildService) ServiceUtil.getService(ColumnBuildServiceImpl.class, user);
+ }
+
+
+ public Map welfareList(QueryAccountDetailParam param) {
+ PageInfo page = getSIReportService(user).welfareList(param);
+ List list = page.getList();
+ List