From e677207eac98944c12f3db66dae294ef0e26393a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 8 Nov 2023 15:59:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=9F=E8=AE=A1=E7=BB=B4?= =?UTF-8?q?=E5=BA=A6=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202311080603.sql | 3 ++ resource/sqlupgrade/GS/sql202311080603.sql | 3 ++ resource/sqlupgrade/JC/sql202311080603.sql | 3 ++ resource/sqlupgrade/Mysql/sql202311080603.sql | 2 + .../sqlupgrade/Oracle/sql202311080603.sql | 2 + resource/sqlupgrade/PG/sql202311080603.sql | 2 + .../sqlupgrade/SQLServer/sql202311080603.sql | 2 + resource/sqlupgrade/ST/sql202311080603.sql | 3 ++ ...aryStatisticsSearchConditionSaveParam.java | 15 +++++++ .../entity/po/SalaryStatisticsReportPO.java | 45 ++++++++++--------- .../SalaryStatisticsReportServiceImpl.java | 2 + .../SalaryStatisticsReportWrapper.java | 3 +- 12 files changed, 63 insertions(+), 22 deletions(-) create mode 100644 resource/sqlupgrade/DM/sql202311080603.sql create mode 100644 resource/sqlupgrade/GS/sql202311080603.sql create mode 100644 resource/sqlupgrade/JC/sql202311080603.sql create mode 100644 resource/sqlupgrade/Mysql/sql202311080603.sql create mode 100644 resource/sqlupgrade/Oracle/sql202311080603.sql create mode 100644 resource/sqlupgrade/PG/sql202311080603.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202311080603.sql create mode 100644 resource/sqlupgrade/ST/sql202311080603.sql diff --git a/resource/sqlupgrade/DM/sql202311080603.sql b/resource/sqlupgrade/DM/sql202311080603.sql new file mode 100644 index 000000000..f65fcd62b --- /dev/null +++ b/resource/sqlupgrade/DM/sql202311080603.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_stats_report add time_type int; +/ + diff --git a/resource/sqlupgrade/GS/sql202311080603.sql b/resource/sqlupgrade/GS/sql202311080603.sql new file mode 100644 index 000000000..f65fcd62b --- /dev/null +++ b/resource/sqlupgrade/GS/sql202311080603.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_stats_report add time_type int; +/ + diff --git a/resource/sqlupgrade/JC/sql202311080603.sql b/resource/sqlupgrade/JC/sql202311080603.sql new file mode 100644 index 000000000..f65fcd62b --- /dev/null +++ b/resource/sqlupgrade/JC/sql202311080603.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_stats_report add time_type int; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202311080603.sql b/resource/sqlupgrade/Mysql/sql202311080603.sql new file mode 100644 index 000000000..024e94be3 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202311080603.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_stats_report add time_type int +; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202311080603.sql b/resource/sqlupgrade/Oracle/sql202311080603.sql new file mode 100644 index 000000000..a53c1e2da --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202311080603.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_stats_report add time_type int +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202311080603.sql b/resource/sqlupgrade/PG/sql202311080603.sql new file mode 100644 index 000000000..afa28833d --- /dev/null +++ b/resource/sqlupgrade/PG/sql202311080603.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_stats_report add time_type int; +/ \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202311080603.sql b/resource/sqlupgrade/SQLServer/sql202311080603.sql new file mode 100644 index 000000000..005efd521 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202311080603.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_stats_report add time_type int +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202311080603.sql b/resource/sqlupgrade/ST/sql202311080603.sql new file mode 100644 index 000000000..f65fcd62b --- /dev/null +++ b/resource/sqlupgrade/ST/sql202311080603.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_stats_report add time_type int; +/ + diff --git a/src/com/engine/salary/report/entity/param/SalaryStatisticsSearchConditionSaveParam.java b/src/com/engine/salary/report/entity/param/SalaryStatisticsSearchConditionSaveParam.java index 2ea00c161..ff0bc3964 100644 --- a/src/com/engine/salary/report/entity/param/SalaryStatisticsSearchConditionSaveParam.java +++ b/src/com/engine/salary/report/entity/param/SalaryStatisticsSearchConditionSaveParam.java @@ -28,6 +28,21 @@ public class SalaryStatisticsSearchConditionSaveParam { //统计维度 private Long dimension; + /** + * 1、上月 + * 2、本月 + * 3、一季度 + * 4、二季度 + * 5、三季度 + * 6、四季度 + * 7、上半年 + * 8、下半年 + * 9、本年 + * 10、自定义 + */ + //事件类型 + private Integer timeType; + //薪资所属月-开始月 private Date salaryStartMonth; diff --git a/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java b/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java index a465e7add..cdf364f62 100644 --- a/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java +++ b/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java @@ -21,15 +21,15 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor -//hrsa_salary_stats_report") +//hrsa_salary_stats_report public class SalaryStatisticsReportPO implements Serializable { private static final long serialVersionUID = 6526480959578343197L; - //主键id") + //主键id private Long id; - //报表名称") + //报表名称 private String reportName; private String remark; @@ -38,58 +38,61 @@ public class SalaryStatisticsReportPO implements Serializable { private String sortIndex; private String sortType; - //统计维度") + //时间类型 + private Integer timeType; + + //统计维度 private String dimension; - //薪资所属月-起始") + //薪资所属月-起始 private Date salaryStartMonth; - //薪资所属月-截止") + //薪资所属月-截止 private Date salaryEndMonth; - //个税扣缴义务人配置") + //个税扣缴义务人配置 private String taxAgentSetting; - //收入所得项目配置") + //收入所得项目配置 private String incomeCategorySetting; - //分部配置") + //分部配置 private String subCompanySetting; - //部门配置") + //部门配置 private String departSetting; - //职级配置") + //职级配置 private String gradeSetting; - //岗位配置") + //岗位配置 private String positionSetting; - //人员状态配置") + //人员状态配置 private String statusSetting; - //人员配置") + //人员配置 private String employeeSetting; - //入职日期配置") + //入职日期配置 private String hiredateSetting; - //离职日期配置") + //离职日期配置 private String leavedateSetting; - //租户key", ignore = true) + //租户key private String tenantKey; - //创建人id", ignore = true) + //创建人id private Long creator; - //是否删除", ignore = true) + //是否删除 private Integer deleteType; - //创建时间", ignore = true) + //创建时间 private Date createTime; - //更新时间", ignore = true) + //更新时间 private Date updateTime; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 14e342ca3..aad4c66c8 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -272,6 +272,8 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary po.setLeavedateSetting(JSON.toJSONString(param.getLeavedate())); } + po.setTimeType(param.getTimeType()); + getSalaryStatisticsReportMapper().updateIgnoreNull(po); // 获取自定义统计项目 diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java index 330a1550a..1b9910eda 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java @@ -130,7 +130,7 @@ public class SalaryStatisticsReportWrapper extends Service { Map temp = new HashMap<>(); temp.put("id", po.getId().toString()); temp.put("reportName", po.getReportName()); - + temp.put("timeType", po.getTimeType() == null ? "10" : po.getTimeType().toString()); List dimNames = Arrays.stream(po.getDimension().split(",")).map(dim -> Optional.ofNullable(salaryStatisticsDimensionMap.get(dim)).orElse("")).collect(Collectors.toList()); temp.put("dimension", StringUtils.join(dimNames, ",")); temp.put("dimensionId", po.getDimension()); @@ -238,6 +238,7 @@ public class SalaryStatisticsReportWrapper extends Service { SalaryAssert.notNull(po, SalaryI18nUtil.getI18nLabel(152563, "报表不存在")); Map data = new HashMap<>(); + data.put("timeType", po.getTimeType() == null ? 10 : po.getTimeType().toString()); data.put("salaryStartMonth", SalaryDateUtil.getFormatYearMonth(po.getSalaryStartMonth())); data.put("salaryEndMonth", SalaryDateUtil.getFormatYearMonth(po.getSalaryEndMonth())); data.put("taxAgent", JSONArray.parseArray(po.getTaxAgentSetting()));