From 692a57ae633f44b7c8a6aa02b0bea041e0518d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 11 Mar 2022 15:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=AF=E8=AE=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/annotation/SalaryTable.java | 4 +- .../salary/component/SalaryWeaTable.java | 12 +- .../datacollection/dto/AddUpDeductionDTO.java | 4 +- .../dto/AddUpDeductionRecordDTO.java | 4 +- .../datacollection/dto/AddUpSituationDTO.java | 4 +- .../dto/AddUpSituationRecordDTO.java | 4 +- .../dto/OtherDeductionListDTO.java | 4 +- .../dto/OtherDeductionRecordDTO.java | 4 +- .../salary/web/AttendQuoteController.java | 266 ++++++++++++++++++ 9 files changed, 286 insertions(+), 20 deletions(-) diff --git a/src/com/engine/salary/annotation/SalaryTable.java b/src/com/engine/salary/annotation/SalaryTable.java index 705f0b16a..ef0b19884 100644 --- a/src/com/engine/salary/annotation/SalaryTable.java +++ b/src/com/engine/salary/annotation/SalaryTable.java @@ -1,7 +1,7 @@ package com.engine.salary.annotation; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; +import com.cloudstore.eccom.pc.table.WeaTableType; import java.lang.annotation.*; @@ -64,6 +64,6 @@ public @interface SalaryTable { /** * 列表选择框 */ - WeaTableTypeEnum tableType() default WeaTableTypeEnum.NONE; + WeaTableType tableType() default WeaTableType.NONE; } diff --git a/src/com/engine/salary/component/SalaryWeaTable.java b/src/com/engine/salary/component/SalaryWeaTable.java index 489888040..9e7cddddc 100644 --- a/src/com/engine/salary/component/SalaryWeaTable.java +++ b/src/com/engine/salary/component/SalaryWeaTable.java @@ -5,7 +5,6 @@ import com.cloudstore.eccom.pc.table.*; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.SalaryTableOperate; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; import org.apache.commons.lang3.StringUtils; import weaver.general.PageIdConst; import weaver.hrm.User; @@ -69,12 +68,13 @@ public class SalaryWeaTable extends WeaTable { super.setOperates(weaTableOperates); } - WeaTableTypeEnum weaTableTypeEnum = table.tableType(); + WeaTableType weaTableTypeEnum = table.tableType(); //设置check是否可用 - if (weaTableTypeEnum == WeaTableTypeEnum.CHECKBOX) { - WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); - checkboxpopedom.setShowmethod("true"); - super.setCheckboxpopedom(checkboxpopedom); + if (weaTableTypeEnum == WeaTableType.CHECKBOX) { + super.setTableType(weaTableTypeEnum); +// WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); +// checkboxpopedom.setShowmethod("true"); +// super.setCheckboxpopedom(checkboxpopedom); } } diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java index 91e1f6399..147bad456 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java @@ -1,11 +1,11 @@ package com.engine.salary.entity.datacollection.dto; +import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.SalaryTableOperate; import com.engine.salary.util.excel.ExcelProperty; import com.fasterxml.jackson.annotation.JsonFormat; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,7 +26,7 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor -@SalaryTable(pageId = "a4f85287-e3f9-4275-adn9-7d06e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX, operates = { +@SalaryTable(pageId = "a4f85287-e3f9-4275-adn9-7d06e54y6rj8", tableType = WeaTableType.CHECKBOX, operates = { @SalaryTableOperate(text = "查看明细") }) public class AddUpDeductionDTO { diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java index 5cc7bf081..6a0aa2ae9 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java @@ -1,10 +1,10 @@ package com.engine.salary.entity.datacollection.dto; +import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.util.excel.ExcelProperty; import com.fasterxml.jackson.annotation.JsonFormat; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -19,7 +19,7 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //数据采集-累计专项附加扣除记录 -@SalaryTable(pageId = "a4f85287-3354-4275-adn9-7d06e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX) +@SalaryTable(pageId = "a4f85287-3354-4275-adn9-7d06e54y6rj8", tableType = WeaTableType.CHECKBOX) public class AddUpDeductionRecordDTO { //主键id diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java index 6a91c9464..188bd2a15 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java @@ -1,12 +1,12 @@ package com.engine.salary.entity.datacollection.dto; +import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.SalaryTableOperate; import com.engine.salary.util.excel.ExcelProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -21,7 +21,7 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor -@SalaryTable(pageId = "a4f85287-e3f9-7841-adn9-7d06e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX, operates = { +@SalaryTable(pageId = "a4f85287-e3f9-7841-adn9-7d06e54y6rj8", tableType = WeaTableType.CHECKBOX, operates = { @SalaryTableOperate(text = "查看明细") }) public class AddUpSituationDTO { diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpSituationRecordDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpSituationRecordDTO.java index 7e26ad7f0..428fed26e 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpSituationRecordDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpSituationRecordDTO.java @@ -1,10 +1,10 @@ package com.engine.salary.entity.datacollection.dto; +import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.util.excel.ExcelProperty; import com.fasterxml.jackson.annotation.JsonFormat; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -25,7 +25,7 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor -@SalaryTable(pageId = "a5f85287-3354-4275-adn9-7d06e54y6rj8",tableType = WeaTableTypeEnum.CHECKBOX) +@SalaryTable(pageId = "a5f85287-3354-4275-adn9-7d06e54y6rj8",tableType = WeaTableType.CHECKBOX) public class AddUpSituationRecordDTO { @SalaryTableColumn(column = "id", display = false) diff --git a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java index 4d59291b5..df29ce8f4 100644 --- a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java @@ -1,10 +1,10 @@ package com.engine.salary.entity.datacollection.dto; +import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.SalaryTableOperate; import com.engine.salary.util.excel.ExcelProperty; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -24,7 +24,7 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor -@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d06e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX, operates = { +@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d06e54y6rj8", tableType = WeaTableType.CHECKBOX, operates = { @SalaryTableOperate(text = "查看明细") }) public class OtherDeductionListDTO { diff --git a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java index bf3c1bc24..b2a0a1399 100644 --- a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionRecordDTO.java @@ -1,8 +1,8 @@ package com.engine.salary.entity.datacollection.dto; +import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; -import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -22,7 +22,7 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor -@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d98e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX) +@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d98e54y6rj8", tableType = WeaTableType.CHECKBOX) public class OtherDeductionRecordDTO { //主键id diff --git a/src/com/engine/salary/web/AttendQuoteController.java b/src/com/engine/salary/web/AttendQuoteController.java index e7aad407f..41111e411 100644 --- a/src/com/engine/salary/web/AttendQuoteController.java +++ b/src/com/engine/salary/web/AttendQuoteController.java @@ -38,4 +38,270 @@ public class AttendQuoteController { return ResponseResult.run(getService(user)::list, map); } + + +// /** +// * 获取引用考勤表单 +// * @return +// */ +// @GetMapping("/getSyncForm") +// @ApiOperation("获取引用考勤表单") +// @WeaPermission +// public WeaResult getSyncForm() { +// return WeaResult.success(service.getSyncForm(UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); +// } +// +// /** +// * 获取薪资周期和考勤周期 +// * @param salaryYearMonth 薪资所属月 +// * @param salarySobId 薪资账套id +// * @return +// */ +// @PostMapping("/getSalaryCycleAndAttendCycle") +// @ApiOperation("获取薪资周期和考勤周期") +// @WeaPermission +// public WeaResult> getSalaryCycleAndAttendCycle(@RequestParam(value = "salaryYearMonth") YearMonth salaryYearMonth, @RequestParam(value = "salarySobId") Long salarySobId) { +// return WeaResult.success(service.getSalaryCycleAndAttendCycle(salaryYearMonth, salarySobId, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); +// } +// +// /** +// * 同步引用考勤数据 +// * @return +// */ +// @PostMapping("/syncAttendQuoteData") +// @ApiOperation("同步引用考勤数据") +// @WeaPermission +// public WeaResult syncAttendQuoteData(@RequestBody AttendQuoteDataSyncParam syncParam) { +// return attendQuoteDataService.syncAttendQuoteData(syncParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); +// } +// +// /** +// * 获取薪资账套下拉列表 +// * @return +// */ +// @GetMapping("/selectSalarySobList") +// @ApiOperation("获取薪资账套下拉列表") +// @WeaPermission +// public WeaResult>> selectSalarySobList() { +// return WeaResult.success(service.selectSalarySobList(UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); +// } +// +// /** +// * 下载导入模板 +// * @return +// */ +// @PostMapping("/downloadTemplate") +// @ApiOperation("下载导入模板") +// @WeaPermission +// public WeaResult> downloadTemplate(@RequestBody AttendQuoteDataExportTemplateParam exportParam) { +// String currentTenantKey = TenantContext.getCurrentTenantKey(); +// Long currentEmployeeId = UserContext.getCurrentEmployeeId(); +// if (exportParam.getSalaryYearMonth()==null || exportParam.getSalarySobId()==null) { +// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100250, "薪资所属月和薪资账套id不能为空")); +// } +// return WeaResult.success(attendQuoteDataService.downloadTemplate(exportParam, currentEmployeeId, currentTenantKey)); +// } +// +// /** +// * 获取导入参数 +// * @return +// */ +// @GetMapping("/getImportParams") +// @ApiOperation("获取导入参数") +// @WeaPermission +// public WeaResult getImportParams() { +// return WeaResult.success(salaryBatchService.buildImportParam("importAttendQuoteData", +// "importAttendQuoteData", +// SalaryI18nUtil.getI18nLabel(TenantContext.getCurrentTenantKey(), UserContext.getCurrentEmployeeId(), 85367, "考勤引用"), +// null, +// null)); +// } +// +// /** +// * 查看考勤数据 +// * @param queryParam +// * @return +// */ +// @PostMapping("/view") +// @ApiOperation("查看") +// @WeaPermission +// public WeaResult> view(@RequestBody AttendQuoteDataQueryParam queryParam) { +// String currentTenantKey = TenantContext.getCurrentTenantKey(); +// Long currentEmployeeId = UserContext.getCurrentEmployeeId(); +// if (queryParam.getAttendQuoteId() == null) { +// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(TenantContext.getCurrentTenantKey(), UserContext.getCurrentEmployeeId(), 100253, "考勤引用id不能为空")); +// } +// return WeaResult.success(attendQuoteDataService.view(queryParam, currentEmployeeId, currentTenantKey)); +// } +// +// /** +// * 删除考勤数据 +// * @param ids +// * @return +// */ +// @PostMapping("/delete") +// @ApiOperation("删除") +// @WeaPermission +// public WeaResult delete(@RequestBody Collection ids) { +// String currentTenantKey = TenantContext.getCurrentTenantKey(); +// Long currentEmployeeId = UserContext.getCurrentEmployeeId(); +// if (CollectionUtils.isEmpty(ids)) { +// return WeaResult.fail(SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 84026, "参数错误")); +// } +// return service.delete(ids, currentEmployeeId, currentTenantKey); +// } +// +// /** +// * 导出考勤数据 +// * @param queryParam +// * @return +// */ +// @PostMapping("/export") +// @ApiOperation("导出考勤数据") +// @WeaPermission +// public WeaResult> export(@RequestBody AttendQuoteDataQueryParam queryParam) { +// String currentTenantKey = TenantContext.getCurrentTenantKey(); +// Long currentEmployeeId = UserContext.getCurrentEmployeeId(); +// if (queryParam.getAttendQuoteId() == null) { +// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(TenantContext.getCurrentTenantKey(), UserContext.getCurrentEmployeeId(), 100253, "考勤引用id不能为空")); +// } +// return WeaResult.success(attendQuoteDataService.export(queryParam, currentEmployeeId, currentTenantKey)); +// } +// +// /** +// * 考勤字段管理列表 +// * @param queryParam +// * @return +// */ +// @PostMapping("/fieldList") +// @ApiOperation("考勤字段管理列表") +// @WeaPermission +// public WeaResult>> fieldList(@RequestBody AttendQuoteFieldQueryParam queryParam) { +// return WeaResult.success(attendQuoteFieldService.list(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); +// } +// +// /** +// * 同步考勤模块字段 +// * @return +// */ +// @PostMapping("/syncAttendFields") +// @ApiOperation("同步考勤模块字段") +// @WeaPermission +// public WeaResult syncAttendFields() { +// return attendQuoteFieldService.syncAttendFields(UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); +// } +// +// /** +// * 获取考勤字段表单 +// * @param id +// * @return +// */ +// @GetMapping("/getFieldForm") +// @ApiOperation("获取考勤字段表单") +// @WeaPermission +// public WeaResult getFieldForm(@RequestParam(value = "id", required = false) Long id) { +// return WeaResult.success(attendQuoteFieldService.getFrom(id, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); +// } +// +// /** +// * 新建考勤字段 +// * @param saveParam +// * @return +// */ +// @PostMapping("/saveField") +// @ApiOperation("新建考勤字段") +// @WeaPermission +// public WeaResult saveField(@RequestBody AttendQuoteFieldSaveParam saveParam) { +// return attendQuoteFieldService.save(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); +// } +// +// /** +// * 启用/停用自定义字段 +// * @param id +// * @param enableStatus +// * @return +// */ +// @PostMapping("/updateEnableStatus") +// @ApiOperation("启用/停用自定义字段") +// @WeaPermission +// public WeaResult updateEnableStatus(@RequestParam(value = "id") Long id, @RequestParam(value = "enableStatus") Boolean enableStatus) { +// return attendQuoteFieldService.updateEnableStatus(id, enableStatus, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); +// } +// +// /** +// * 修改考勤字段 +// * @param saveParam +// * @return +// */ +// @PostMapping("/updateField") +// @ApiOperation("修改考勤字段") +// @WeaPermission +// public WeaResult updateField(@RequestBody AttendQuoteFieldSaveParam saveParam) { +// return attendQuoteFieldService.update(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); +// } +// +// /** +// * 删除考勤字段 +// * @param ids +// * @return +// */ +// @PostMapping("/deleteField") +// @ApiOperation("删除考勤字段") +// @WeaPermission +// public WeaResult deleteField(@RequestBody Collection ids) { +// String currentTenantKey = TenantContext.getCurrentTenantKey(); +// Long currentEmployeeId = UserContext.getCurrentEmployeeId(); +// if (CollectionUtils.isEmpty(ids)) { +// return WeaResult.fail(SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 84026, "参数错误")); +// } +// return attendQuoteFieldService.delete(ids, currentEmployeeId, currentTenantKey); +// } +// +// /** +// * 数据采集-考勤引用字段设置列表 +// * @param queryParam +// * @return +// */ +// @PostMapping("/fieldSetting/list") +// @ApiOperation("数据采集-考勤引用字段设置-列表") +// @WeaPermission +// public WeaResult> fieldSettingList(@RequestBody AttendQuoteFieldSettingQueryParam queryParam) { +// return WeaResult.success(attendQuoteFieldSettingService.list(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); +// } +// +// /** +// * 数据采集-考勤引用字段设置保存 +// * @param saveParam +// * @return +// */ +// @PostMapping("/fieldSetting/save") +// @ApiOperation("数据采集-考勤引用字段设置-保存") +// @WeaPermission +// public WeaResult fieldSettingSave(@RequestBody AttendQuoteFieldSettingSaveParam saveParam) { +// return attendQuoteFieldSettingService.save(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); +// } +// +// /** +// * 数据采集-考勤引用字段设置-恢复默认设置 +// * @return +// */ +// @PostMapping("/fieldSetting/recoverAsDefault") +// @ApiOperation("数据采集-考勤引用字段设置-恢复默认设置") +// @WeaPermission +// public WeaResult> fieldSettingRecoverAsDefault(@RequestBody AttendQuoteFieldSettingRecoverParam recoverParam) { +// return WeaResult.success(attendQuoteFieldSettingService.recoverAsDefault(recoverParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); +// } +// +// /** +// * 数据采集-考勤引用字段设置-设为默认设置 +// * @param saveParam +// * @return +// */ +// @PostMapping("/fieldSetting/saveAsDefault") +// @ApiOperation("数据采集-考勤引用字段设置-设为默认设置") +// @WeaPermission +// public WeaResult fieldSettingSaveAsDefault(@RequestBody AttendQuoteFieldSettingSaveParam saveParam) { +// return attendQuoteFieldSettingService.saveAsDefault(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); +// } + }