定制列恢复默认设置
This commit is contained in:
parent
12df33960a
commit
79ed6a3226
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.salary.entity.setting.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 恢复默认值
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageListSettingResetParam {
|
||||
/**
|
||||
* 页面,0:薪资明细
|
||||
*/
|
||||
@DataCheck(require = true,message = "请选择页面")
|
||||
private String page;
|
||||
}
|
||||
|
|
@ -12,6 +12,8 @@ public interface SettingService {
|
|||
|
||||
PageListTemplateDTO getPageListSetting(PageListSettingQueryParam param);
|
||||
|
||||
void resetPageListSetting(PageListSettingResetParam param);
|
||||
|
||||
PageListTemplateDTO getPageListTemplate(PageListTemplateQueryParam param);
|
||||
|
||||
List<PageListTemplatePO> getPageListTemplates(PageListTemplateQueryParam queryParam);
|
||||
|
|
@ -21,4 +23,5 @@ public interface SettingService {
|
|||
void changePageListTemplate(PageListTemplateChangeParam param);
|
||||
|
||||
List<WeaTableColumn> getPageListColumns(String page);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import static com.engine.salary.constant.SalaryDefaultTenantConstant.DEFAULT_TEN
|
|||
import static com.engine.salary.enums.setting.PageListSettingPageEnum.SALARY_DETAILS_REPORT;
|
||||
|
||||
/**
|
||||
* 薪资核算
|
||||
* 页面显示
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
|
|
@ -160,6 +160,20 @@ public class SettingServiceImpl extends Service implements SettingService {
|
|||
return PageListTemplateDTO.builder().setting(new ArrayList<>()).checked(new ArrayList<>()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetPageListSetting(PageListSettingResetParam param) {
|
||||
ValidUtil.doValidator(param);
|
||||
|
||||
String page = param.getPage();
|
||||
|
||||
//个人设置
|
||||
PageListSettingPO selfSetting = getPageListSettingMapper().getByPage(page, 0, (long) user.getUID());
|
||||
|
||||
if (selfSetting != null) {
|
||||
getPageListSettingMapper().delete(selfSetting);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageListTemplateDTO getPageListTemplate(PageListTemplateQueryParam param) {
|
||||
String page = param.getPage();
|
||||
|
|
|
|||
|
|
@ -68,6 +68,14 @@ public class SalaryCommonController {
|
|||
return new ResponseResult<PageListSettingSaveParam, String>(user).run(getSalaryCommonWrapper(user)::savePageListSetting, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/pageList/reset/setting")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String resetPageListSetting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PageListSettingResetParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<PageListSettingResetParam, String>(user).run(getSalaryCommonWrapper(user)::resetPageListSetting, param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面默认值
|
||||
* @param request
|
||||
|
|
|
|||
|
|
@ -32,8 +32,12 @@ public class SalaryCommonWrapper extends Service {
|
|||
getSalaryCacheService(user).remove(key);
|
||||
}
|
||||
|
||||
public void savePageListSetting(PageListSettingSaveParam pageListSettingSaveParam) {
|
||||
getSettingService(user).savePageListSetting(pageListSettingSaveParam);
|
||||
public void savePageListSetting(PageListSettingSaveParam param) {
|
||||
getSettingService(user).savePageListSetting(param);
|
||||
}
|
||||
|
||||
public void resetPageListSetting(PageListSettingResetParam param) {
|
||||
getSettingService(user).resetPageListSetting(param);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -58,4 +62,5 @@ public class SalaryCommonWrapper extends Service {
|
|||
getSettingService(user).changePageListTemplate(param);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue