commit
8c0c8ace55
|
|
@ -488,5 +488,8 @@ CREATE TABLE HR_LOG (
|
|||
method_name varchar(100) NULL,
|
||||
delete_type int NULL,
|
||||
class_name varchar(100) NULL,
|
||||
operate_module_name varchar(100) NULL,
|
||||
operate_module int NULL,
|
||||
message varchar(2000) NULL,
|
||||
CONSTRAINT HR_LOG_PK PRIMARY KEY (id)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -457,5 +457,8 @@ CREATE TABLE HR_LOG (
|
|||
METHOD_NAME NVARCHAR2(100) NULL,
|
||||
DELETE_TYPE NUMBER NULL,
|
||||
CLASS_NAME NVARCHAR2(100) NULL,
|
||||
OPERATE_MODULE_NAME NVARCHAR2(100) NULL,
|
||||
OPERATE_MODULE NUMBER NULL,
|
||||
MESSAGE NVARCHAR2(2000) NULL,
|
||||
CONSTRAINT HR_LOG_PK PRIMARY KEY (ID)
|
||||
);
|
||||
|
|
@ -456,5 +456,8 @@ CREATE TABLE HR_LOG (
|
|||
method_name varchar(100) NULL,
|
||||
delete_type int NULL,
|
||||
class_name varchar(100) NULL,
|
||||
operate_module_name varchar(100) NULL,
|
||||
operate_module int NULL,
|
||||
message varchar(2000) NULL,
|
||||
CONSTRAINT HR_LOG_PK PRIMARY KEY (id)
|
||||
);
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/bs/hrmorganization/log")
|
||||
public class LogViewController extends com.engine.organization.web.LogViewController{
|
||||
}
|
||||
|
|
@ -61,6 +61,9 @@ public class LoggerContext implements Serializable {
|
|||
// 操作模块名称
|
||||
private String operateModuleName;
|
||||
|
||||
// 操作模块ID
|
||||
private Integer operateModule;
|
||||
|
||||
// 日志信息
|
||||
private String message;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
package com.engine.organization.entity.logview.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LogViewSearchParam {
|
||||
private Long operatorId;
|
||||
private Long companyId;
|
||||
private Long departmentId;
|
||||
private String operateDate;
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
private String moduleType;
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.engine.organization.entity.logview.vo;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||
import com.engine.organization.annotation.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@OrganizationTable(pageId = "caef4d3e-fc3d-11ec-a203-00e04c680716",
|
||||
fields = "t.id, t.operator_name, t.create_time, t.operate_type, t.client_ip, t.operate_module_name",
|
||||
fromSql = "FROM hr_log t ",
|
||||
primarykey = "id",
|
||||
tableType = WeaTableType.NONE
|
||||
)
|
||||
public class LogViewVO {
|
||||
|
||||
@OrganizationTableColumn(text = "操作时间", width = "16%", column = "create_time", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
|
||||
private Date createTime;
|
||||
|
||||
@OrganizationTableColumn(text = "操作者", width = "16%", column = "operator_name")
|
||||
private String operator;
|
||||
|
||||
@OrganizationTableColumn(text = "操作类型", width = "16%", column = "operate_type", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateType")
|
||||
private String operateType;
|
||||
|
||||
@OrganizationTableColumn(text = "所属模块", width = "16%", column = "operate_module_name")
|
||||
private String operateModuleName;
|
||||
|
||||
@OrganizationTableColumn(text = "操作IP", width = "16%", column = "client_ip")
|
||||
private String clientIp;
|
||||
|
||||
}
|
||||
|
|
@ -6,28 +6,35 @@ package com.engine.organization.enums;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public enum LogModuleNameEnum {
|
||||
SCHEME("等级方案"),
|
||||
LEVEL("职等"),
|
||||
GRADE("职级"),
|
||||
SEQUENCE("岗位序列"),
|
||||
POST("职务分类"),
|
||||
POSTINFO("职务管理"),
|
||||
GROUP("集团管理"),
|
||||
COMPANY("公司/分部"),
|
||||
DEPARTMENT("部门管理"),
|
||||
JOB("岗位管理"),
|
||||
RESOURCE("人员管理"),
|
||||
STAFFPLAN("编制方案"),
|
||||
STAFF("编制上报"),
|
||||
OTHER("其他模块");
|
||||
SCHEME("等级方案", 1),
|
||||
LEVEL("职等", 2),
|
||||
GRADE("职级", 3),
|
||||
SEQUENCE("岗位序列", 4),
|
||||
POST("职务分类", 5),
|
||||
POSTINFO("职务管理", 6),
|
||||
GROUP("集团管理", 7),
|
||||
COMPANY("分部管理", 8),
|
||||
DEPARTMENT("部门管理", 9),
|
||||
JOB("岗位管理", 10),
|
||||
RESOURCE("人员管理", 11),
|
||||
STAFFPLAN("编制方案", 12),
|
||||
STAFF("编制上报", 13),
|
||||
OTHER("其他模块", 99);
|
||||
|
||||
private String value;
|
||||
private String name;
|
||||
|
||||
LogModuleNameEnum(String value) {
|
||||
private Integer value;
|
||||
|
||||
LogModuleNameEnum(String name, Integer value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
class_name,
|
||||
delete_type,
|
||||
operate_module_name,
|
||||
operate_module,
|
||||
message
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -63,6 +64,7 @@
|
|||
#{className},
|
||||
#{deleteType},
|
||||
#{operateModuleName},
|
||||
#{operateModule},
|
||||
#{message}
|
||||
</trim>
|
||||
</insert>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.logview.param.LogViewSearchParam;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface LogViewService {
|
||||
/**
|
||||
* 日志列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> listPage(LogViewSearchParam param);
|
||||
|
||||
Map<String, Object> getSearchCondition();
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ public interface SchemeService {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> save(SchemeSearchParam param);
|
||||
int save(SchemeSearchParam param);
|
||||
|
||||
/**
|
||||
* 更新等级方案信息
|
||||
|
|
@ -37,21 +37,23 @@ public interface SchemeService {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> updateScheme(SchemeSearchParam param);
|
||||
int updateScheme(SchemeSearchParam param);
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
void updateForbiddenTagById(SchemeSearchParam params);
|
||||
int updateForbiddenTagById(SchemeSearchParam params);
|
||||
|
||||
/**
|
||||
* 根据ID批量删除等级方案信息
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(Collection<Long> ids);
|
||||
int deleteByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取搜索条件
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import com.engine.organization.entity.company.po.CompPO;
|
|||
import com.engine.organization.entity.department.bo.DepartmentBO;
|
||||
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||
import com.engine.organization.entity.employee.vo.EmployeeTableVO;
|
||||
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
||||
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
||||
import com.engine.organization.entity.extend.po.ExtendTitlePO;
|
||||
import com.engine.organization.entity.job.bo.JobBO;
|
||||
import com.engine.organization.entity.job.dto.JobListDTO;
|
||||
|
|
@ -215,12 +213,6 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "是否关键岗", "forbiddenTag");
|
||||
// 工作地点
|
||||
SearchConditionItem workplaceItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作地点", "workplace");
|
||||
// 工作概述
|
||||
// SearchConditionItem descriptionItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作概述", "description");
|
||||
// 任职职责
|
||||
//SearchConditionItem workDutyItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "任职职责", "workDuty");
|
||||
// 工作权限
|
||||
// SearchConditionItem workAuthorityItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作权限", "workAuthority");
|
||||
// 禁用标记
|
||||
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||
SearchConditionOption enableOption = new SearchConditionOption("true", "启用");
|
||||
|
|
@ -238,9 +230,6 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
conditionItems.add(parentJobBrowserItem);
|
||||
conditionItems.add(isKeyItem);
|
||||
conditionItems.add(workplaceItem);
|
||||
//conditionItems.add(descriptionItem);
|
||||
//conditionItems.add(workDutyItem);
|
||||
//conditionItems.add(workAuthorityItem);
|
||||
conditionItems.add(forbiddenTagItem);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
|
|
@ -301,23 +290,6 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
// 处理明细表
|
||||
List<Map<String, Object>> extendTables = getExtService(user).getExtendTables(user, EXTEND_TYPE, Long.parseLong(groupId), JCL_ORG_JOBEXT_DT1, id, viewAttr, false);
|
||||
|
||||
Map<String, Object> tableMap = new HashMap<>();
|
||||
tableMap.put("hide", false);
|
||||
tableMap.put("tabname", "职等职级");
|
||||
Map<String, Object> tabinfoMap = new HashMap<>();
|
||||
List<ExtendInfoPO> infoPOList = new ArrayList<>();
|
||||
infoPOList.add(ExtendInfoPO.builder().fieldName("gradeId").fieldNameDesc("职级").controlType(3).isrequired(1).browserType("161").customValue("[\"browser\",{\"value\":\"161\",\"valueSpan\":\"自定义单选\",\"replaceDatas\":[{\"id\":\"161\",\"name\":\"自定义单选\"}]},{\"value\":\"gradeBrowser\",\"valueSpan\":\"职级浏览按钮\",\"replaceDatas\":[{\"showname\":\"gradeBrowser\",\"shownamespan\":\"gradeBrowser\",\"namespan\":\"职级浏览按钮\",\"name\":\"职级浏览按钮\",\"showtypespan\":\"列表式\",\"randomFieldIdspan\":\"\",\"showtype\":\"1\",\"randomFieldId\":\"gradeBrowser\",\"id\":\"gradeBrowser\"}]}]").build());
|
||||
infoPOList.add(ExtendInfoPO.builder().fieldName("levelId").fieldNameDesc("职等").controlType(3).isrequired(1).browserType("162").customValue("[\"browser\",{\"value\":\"162\",\"valueSpan\":\"自定义多选\",\"replaceDatas\":[{\"id\":\"162\",\"name\":\"自定义多选\"}]},{\"value\":\"LevelBrowser\",\"valueSpan\":\"职等浏览按钮\",\"replaceDatas\":[{\"showname\":\"LevelBrowser\",\"shownamespan\":\"LevelBrowser\",\"namespan\":\"职等浏览按钮\",\"name\":\"职等浏览按钮\",\"showtypespan\":\"列表式\",\"randomFieldIdspan\":\"\",\"showtype\":\"1\",\"randomFieldId\":\"LevelBrowser\",\"id\":\"LevelBrowser\"}]}]").build());
|
||||
tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, infoPOList, viewAttr, false));
|
||||
tabinfoMap.put("rownum", "rownum");
|
||||
// 去除null 元素
|
||||
List<JobDTPO> maps = getJobDTMapper().listJobDTByMainID(id);
|
||||
maps.removeIf(Objects::isNull);
|
||||
tabinfoMap.put("datas", maps);
|
||||
tableMap.put("tabinfo", tabinfoMap);
|
||||
// 添加明细表
|
||||
extendTables.add(0, tableMap);
|
||||
|
||||
resultMap.put("tables", extendTables);
|
||||
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,111 @@
|
|||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.logview.param.LogViewSearchParam;
|
||||
import com.engine.organization.entity.logview.vo.LogViewVO;
|
||||
import com.engine.organization.service.LogViewService;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import weaver.general.TimeUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class LogViewServiceImpl extends Service implements LogViewService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listPage(LogViewSearchParam param) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
OrganizationWeaTable<LogViewVO> table = new OrganizationWeaTable<>(user, LogViewVO.class);
|
||||
String sqlWhere = buildSqlWhere(param);
|
||||
table.setSqlwhere(sqlWhere);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
resultMap.putAll(result.getResultMap());
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSearchCondition() {
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
|
||||
// 操作者
|
||||
SearchConditionItem operatorId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者", "1", "operatorId", "");
|
||||
// 操作时间
|
||||
List<SearchConditionOption> selectOperateDate = new ArrayList<>();
|
||||
|
||||
selectOperateDate.add(new SearchConditionOption("-1", "全部"));
|
||||
selectOperateDate.add(new SearchConditionOption("1", "今天"));
|
||||
selectOperateDate.add(new SearchConditionOption("2", "本周"));
|
||||
selectOperateDate.add(new SearchConditionOption("3", "本月"));
|
||||
selectOperateDate.add(new SearchConditionOption("4", "本季"));
|
||||
selectOperateDate.add(new SearchConditionOption("5", "本年"));
|
||||
selectOperateDate.add(new SearchConditionOption("7", "上个月"));
|
||||
selectOperateDate.add(new SearchConditionOption("9", "上一季"));
|
||||
selectOperateDate.add(new SearchConditionOption("8", "上一年"));
|
||||
selectOperateDate.add(new SearchConditionOption("6", "指定日期范围"));
|
||||
|
||||
SearchConditionItem operateDate = OrganizationFormItemUtil.selectItem(user, selectOperateDate, 2, 16, 6, false, "操作时间", "operateDate");
|
||||
|
||||
// 操作者部门
|
||||
SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者部门", "161", "departmentId", "deptBrowser");
|
||||
// 操作者分部
|
||||
SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者分部", "161", "companyId", "compBrowser");
|
||||
conditionItems.add(operatorId);
|
||||
conditionItems.add(operateDate);
|
||||
conditionItems.add(departmentId);
|
||||
conditionItems.add(companyId);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
apiDatas.put("conditions", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
private String buildSqlWhere(LogViewSearchParam param) {
|
||||
if (null == param) {
|
||||
return "";
|
||||
}
|
||||
String sqlWhere = " where delete_type = 0 ";
|
||||
if(StringUtils.isNotBlank(param.getModuleType())){
|
||||
sqlWhere += " and operate_module = '" + param.getModuleType() + "'";
|
||||
}
|
||||
if (null != param.getOperatorId()) {
|
||||
sqlWhere += " and operator_id = '" + param.getOperatorId() + "'";
|
||||
}
|
||||
if (null != param.getCompanyId()) {
|
||||
sqlWhere += " and operator_id in (select id from hrmresource where subcompanyid1 = '" + param.getCompanyId() + "')";
|
||||
}
|
||||
if (null != param.getDepartmentId()) {
|
||||
sqlWhere += " and operator_id in (select id from hrmresource where departmentid = '" + param.getDepartmentId() + "')";
|
||||
}
|
||||
if (StringUtils.isNotBlank(param.getOperateDate()) && !"-1".equals(param.getOperateDate())) {
|
||||
if (!"6".equals(param.getOperateDate())) {
|
||||
sqlWhere += " and create_time >= '" + TimeUtil.getDateByOption(param.getOperateDate() + "", "0") + "'";
|
||||
sqlWhere += " and create_time <= '" + TimeUtil.getDateByOption(param.getOperateDate() + "", "") + "'";
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(param.getStartDate())) {
|
||||
sqlWhere += " and create_time >= '" + param.getStartDate() + "'";
|
||||
}
|
||||
if (StringUtils.isNotBlank(param.getEndDate())) {
|
||||
sqlWhere += " and create_time <= '" + param.getEndDate() + "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
||||
|
|
@ -60,20 +60,17 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> save(SchemeSearchParam param) {
|
||||
public int save(SchemeSearchParam param) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
Map<String, Object> apidatas = new HashMap<>(16);
|
||||
List<SchemePO> list = getSchemeMapper().listByNo(Util.null2String(param.getSchemeNo()));
|
||||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID());
|
||||
getSchemeMapper().insertIgnoreNull(schemePO);
|
||||
return apidatas;
|
||||
return getSchemeMapper().insertIgnoreNull(schemePO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateScheme(SchemeSearchParam param) {
|
||||
public int updateScheme(SchemeSearchParam param) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID());
|
||||
// 更新前先查询下旧编号,
|
||||
String oldSchemeNo = getSchemeMapper().getSchemeByID(schemePO.getId()).getSchemeNo();
|
||||
|
|
@ -81,23 +78,22 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
List<SchemePO> list = getSchemeMapper().listByNo(Util.null2String(schemePO.getSchemeNo()));
|
||||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
}
|
||||
getSchemeMapper().updateScheme(schemePO);
|
||||
return apidatas;
|
||||
return getSchemeMapper().updateScheme(schemePO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateForbiddenTagById(SchemeSearchParam params) {
|
||||
public int updateForbiddenTagById(SchemeSearchParam params) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
SchemePO schemePO = SchemePO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
|
||||
getSchemeMapper().updateForbiddenTagById(schemePO);
|
||||
return getSchemeMapper().updateForbiddenTagById(schemePO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteByIds(Collection<Long> ids) {
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
getSchemeMapper().deleteByIds(ids);
|
||||
return getSchemeMapper().deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package com.engine.organization.transmethod;
|
||||
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class LogViewTransMethod {
|
||||
|
||||
public String getOperateType(String operateType) {
|
||||
if (StringUtils.isNotBlank(operateType)) {
|
||||
switch (operateType) {
|
||||
case "1":
|
||||
operateType = OperateTypeEnum.ADD.getLabel();
|
||||
break;
|
||||
case "2":
|
||||
operateType = OperateTypeEnum.UPDATE.getLabel();
|
||||
break;
|
||||
case "3":
|
||||
operateType = OperateTypeEnum.DELETE.getLabel();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ import java.util.concurrent.Executors;
|
|||
* @Date 2022/4/27
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class LogAspect<T> {
|
||||
public class LogAspect<T> {
|
||||
|
||||
Class<T> clazz;
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ public class LogAspect<T> {
|
|||
private static final Logger logger = LoggerFactory.getLogger(LogAspect.class);
|
||||
|
||||
|
||||
public LogAspect(Class<T> clazz,Method method,LoggerContext loggerContext) {
|
||||
public LogAspect(Class<T> clazz, Method method, LoggerContext loggerContext) {
|
||||
this.clazz = clazz;
|
||||
this.method = method;
|
||||
this.loggerContext = loggerContext;
|
||||
|
|
@ -49,7 +49,8 @@ public class LogAspect<T> {
|
|||
Parameter[] parameters = method.getParameters();
|
||||
String value = annotation.operateType().getValue();
|
||||
String operateDesc = annotation.operateDesc();
|
||||
String operateModuleName = annotation.operateModule().getValue();
|
||||
String operateModuleName = annotation.operateModule().getName();
|
||||
Integer operateModule = annotation.operateModule().getValue();
|
||||
loggerContext.setOperateDesc(operateDesc);
|
||||
loggerContext.setCreateTime(new Date());
|
||||
loggerContext.setOperateType(value);
|
||||
|
|
@ -58,6 +59,7 @@ public class LogAspect<T> {
|
|||
loggerContext.setClassName(clazz.getName());
|
||||
loggerContext.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
loggerContext.setOperateModuleName(operateModuleName);
|
||||
loggerContext.setOperateModule(operateModule);
|
||||
MapperProxyFactory.getProxy(SISLogMapper.class).insert(loggerContext);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
package com.engine.organization.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.logview.param.LogViewSearchParam;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.LogViewWrapper;
|
||||
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.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class LogViewController {
|
||||
public LogViewWrapper getLogViewWrapper(User user) {
|
||||
return ServiceUtil.getService(LogViewWrapper.class, user);
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/listPage")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult listPage(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LogViewSearchParam params) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getLogViewWrapper(user).listPage(params));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/getSearchCondition")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getLogViewWrapper(user).getSearchCondition());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,8 +66,7 @@ public class SchemeController {
|
|||
public ReturnResult saveScheme(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> save = getSchemeWrapper(user).save(param);
|
||||
return ReturnResult.successed(save);
|
||||
return ReturnResult.successed(getSchemeWrapper(user).save(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
@ -87,8 +86,7 @@ public class SchemeController {
|
|||
public ReturnResult updateScheme(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> update = getSchemeWrapper(user).updateScheme(param);
|
||||
return ReturnResult.successed(update);
|
||||
return ReturnResult.successed(getSchemeWrapper(user).updateScheme(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
@ -109,8 +107,7 @@ public class SchemeController {
|
|||
public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
getSchemeWrapper(user).updateForbiddenTagById(param);
|
||||
return ReturnResult.successed();
|
||||
return ReturnResult.successed(getSchemeWrapper(user).updateForbiddenTagById(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
@ -131,8 +128,7 @@ public class SchemeController {
|
|||
public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeleteParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
getSchemeWrapper(user).deleteByIds(param.getIds());
|
||||
return ReturnResult.successed();
|
||||
return ReturnResult.successed(getSchemeWrapper(user).deleteByIds(param.getIds()));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.company.param.CompSearchParam;
|
||||
import com.engine.organization.entity.department.param.DepartmentMoveParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.CompService;
|
||||
import com.engine.organization.service.impl.CompServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -19,7 +23,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/16
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class CompWrapper extends Service {
|
||||
public class CompWrapper extends OrganizationWrapper {
|
||||
private CompService getCompService(User user) {
|
||||
return ServiceUtil.getService(CompServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -41,8 +45,12 @@ public class CompWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateDesc = "新增分部", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public Long saveBaseComp(Map<String, Object> params) {
|
||||
return getCompService(user).saveBaseComp(params);
|
||||
Long companyId = getCompService(user).saveBaseComp(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增分部【" + JSON.toJSONString(params) + "】");
|
||||
return companyId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -50,8 +58,12 @@ public class CompWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新分部禁用标识", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public int updateForbiddenTagById(CompSearchParam params) {
|
||||
return getCompService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getCompService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新分部禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -60,8 +72,12 @@ public class CompWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新分部信息", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public Long updateComp(Map<String, Object> params) {
|
||||
return getCompService(user).updateComp(params);
|
||||
Long companyId = getCompService(user).updateComp(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新分部信息【" + JSON.toJSONString(params) + "】");
|
||||
return companyId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,8 +85,26 @@ public class CompWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateDesc = "删除分部信息", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getCompService(user).deleteByIds(ids);
|
||||
int deleteByIds = getCompService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除分部信息,删除数据ID【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转移分部
|
||||
*
|
||||
* @param moveParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "转移分部", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public int moveCompany(DepartmentMoveParam moveParam) {
|
||||
int moveCompany = getCompService(user).moveCompany(moveParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "转移分部,分部ID【" + moveParam.getId() + "】,目标分部ID【" + moveParam.getCompany() + "】");
|
||||
return moveCompany;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -112,15 +146,10 @@ public class CompWrapper extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* 转移分部
|
||||
* 获取转移表单
|
||||
*
|
||||
* @param moveParam
|
||||
* @return
|
||||
*/
|
||||
public int moveCompany(DepartmentMoveParam moveParam) {
|
||||
return getCompService(user).moveCompany(moveParam);
|
||||
}
|
||||
|
||||
public List<SearchConditionGroup> getMoveForm() {
|
||||
return getCompService(user).getMoveForm();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.department.param.*;
|
||||
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
|
||||
import com.engine.organization.entity.job.vo.SingleJobTreeVO;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.DepartmentService;
|
||||
import com.engine.organization.service.impl.DepartmentServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import com.engine.organization.util.page.PageInfo;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -23,7 +27,7 @@ import java.util.Map;
|
|||
* @Date 2022/5/20
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class DepartmentWrapper extends Service {
|
||||
public class DepartmentWrapper extends OrganizationWrapper {
|
||||
|
||||
public DepartmentService getDepartmentService(User user) {
|
||||
return ServiceUtil.getService(DepartmentServiceImpl.class, user);
|
||||
|
|
@ -79,8 +83,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateDesc = "新增部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
return getDepartmentService(user).saveBaseForm(params);
|
||||
Long departmentId = getDepartmentService(user).saveBaseForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增部门【" + JSON.toJSONString(params) + "】");
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -89,8 +97,12 @@ public class DepartmentWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新部门禁用标记", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int updateForbiddenTagById(DeptSearchParam params) {
|
||||
return getDepartmentService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getDepartmentService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新部门禁用标记【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -99,8 +111,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新部门信息", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public Long updateForm(Map<String, Object> params) {
|
||||
return getDepartmentService(user).updateForm(params);
|
||||
Long departmentId = getDepartmentService(user).updateForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新部门信息【" + JSON.toJSONString(params) + "】");
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -108,8 +124,12 @@ public class DepartmentWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateDesc = "删除部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getDepartmentService(user).deleteByIds(ids);
|
||||
int deleteByIds = getDepartmentService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除部门【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -156,8 +176,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param copyParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateDesc = "复制部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int copyDepartment(DeptCopyParam copyParam) {
|
||||
return getDepartmentService(user).copyDepartment(copyParam);
|
||||
int copyDepartment = getDepartmentService(user).copyDepartment(copyParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "复制部门【" + JSON.toJSONString(copyParam) + "】");
|
||||
return copyDepartment;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -176,8 +200,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param mergeParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "合并部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int mergeDepartment(DepartmentMergeParam mergeParam) {
|
||||
return getDepartmentService(user).mergeDepartment(mergeParam);
|
||||
int mergeDepartment = getDepartmentService(user).mergeDepartment(mergeParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "合并部门【" + JSON.toJSONString(mergeParam) + "】");
|
||||
return mergeDepartment;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -195,7 +223,11 @@ public class DepartmentWrapper extends Service {
|
|||
* @param moveParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "转移部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int moveDepartment(DepartmentMoveParam moveParam) {
|
||||
return getDepartmentService(user).moveDepartment(moveParam);
|
||||
int moveDepartment = getDepartmentService(user).moveDepartment(moveParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "转移部门【" + JSON.toJSONString(moveParam) + "】");
|
||||
return moveDepartment;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.scheme.param.GradeSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.GradeService;
|
||||
import com.engine.organization.service.impl.GradeServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -18,8 +22,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class GradeWrapper extends Service {
|
||||
|
||||
public class GradeWrapper extends OrganizationWrapper {
|
||||
|
||||
|
||||
private GradeService getGradeService(User user) {
|
||||
|
|
@ -43,8 +46,12 @@ public class GradeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.GRADE, operateDesc = "新增职等")
|
||||
public int saveGrade(GradeSearchParam param) {
|
||||
return getGradeService(user).saveGrade(param);
|
||||
int saveGrade = getGradeService(user).saveGrade(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职等【" + JSON.toJSONString(param) + "】");
|
||||
return saveGrade;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -53,8 +60,12 @@ public class GradeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "更新职级")
|
||||
public int updateGrade(GradeSearchParam param) {
|
||||
return getGradeService(user).updateGrade(param);
|
||||
int updateGrade = getGradeService(user).updateGrade(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职级【" + JSON.toJSONString(param) + "】");
|
||||
return updateGrade;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -62,8 +73,12 @@ public class GradeWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "更新职级禁用标识")
|
||||
public int updateForbiddenTagById(GradeSearchParam params) {
|
||||
return getGradeService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getGradeService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职级禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -71,8 +86,12 @@ public class GradeWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "删除职等")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getGradeService(user).deleteByIds(ids);
|
||||
int deleteByIds = getGradeService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职等【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.GroupService;
|
||||
import com.engine.organization.service.impl.GroupServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -14,7 +18,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/16
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class GroupWrapper extends Service {
|
||||
public class GroupWrapper extends OrganizationWrapper {
|
||||
private GroupService getGroupService(User user) {
|
||||
return ServiceUtil.getService(GroupServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -36,8 +40,12 @@ public class GroupWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GROUP, operateDesc = "更新集团")
|
||||
public boolean updateGroup(Map<String, Object> params) {
|
||||
return getGroupService(user).updateGroup(params);
|
||||
boolean updateGroup = getGroupService(user).updateGroup(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新集团【" + JSON.toJSONString(params) + "】");
|
||||
return updateGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.HrmResourceService;
|
||||
import com.engine.organization.service.impl.HrmResourceServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -15,7 +19,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/06/21
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class HrmResourceWrapper extends Service {
|
||||
public class HrmResourceWrapper extends OrganizationWrapper {
|
||||
private HrmResourceService getHrmResourceService(User user) {
|
||||
return ServiceUtil.getService(HrmResourceServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -33,16 +37,24 @@ public class HrmResourceWrapper extends Service {
|
|||
return getHrmResourceService(user).getSaveForm();
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.RESOURCE, operateDesc = "新增人员")
|
||||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).saveBaseForm(params);
|
||||
Long resourceId = getHrmResourceService(user).saveBaseForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增人员【" + JSON.toJSONString(params) + "】");
|
||||
return resourceId;
|
||||
}
|
||||
|
||||
public Map<String, Object> getBaseForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).getBaseForm(params);
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.RESOURCE, operateDesc = "更新人员信息")
|
||||
public int updateForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).updateForm(params);
|
||||
int updateForm = getHrmResourceService(user).updateForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新人员信息【" + JSON.toJSONString(params) + "】");
|
||||
return updateForm;
|
||||
}
|
||||
|
||||
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,26 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.job.param.JobMergeParam;
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.JobService;
|
||||
import com.engine.organization.service.impl.JobServiceImpl;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
|
|
@ -21,7 +28,7 @@ import java.util.*;
|
|||
* @createTime: 2022/05/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class JobWrapper extends Service {
|
||||
public class JobWrapper extends OrganizationWrapper {
|
||||
private JobService getJobService(User user) {
|
||||
return ServiceUtil.getService(JobServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -90,8 +97,12 @@ public class JobWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.JOB, operateDesc = "新增岗位")
|
||||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
return getJobService(user).saveBaseForm(params);
|
||||
Long jobId = getJobService(user).saveBaseForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增岗位【" + JSON.toJSONString(params) + "】");
|
||||
return jobId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -100,8 +111,12 @@ public class JobWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.JOB, operateDesc = "更新岗位信息")
|
||||
public Long updateForm(Map<String, Object> params) {
|
||||
return getJobService(user).updateForm(params);
|
||||
Long jobId = getJobService(user).updateForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位信息【" + JSON.toJSONString(params) + "】");
|
||||
return jobId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,16 +126,26 @@ public class JobWrapper extends Service {
|
|||
* @param department
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.JOB, operateDesc = "复制岗位到部门")
|
||||
public int copyJobItem(String ids, String department) {
|
||||
return getJobService(user).copyJobItem(ids, department);
|
||||
int copyJobItem = getJobService(user).copyJobItem(ids, department);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "复制岗位到部门,岗位ID【" + ids + "】,部门ID【" + department + "】");
|
||||
return copyJobItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新禁用标识
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.JOB, operateDesc = "更新岗位禁用标识")
|
||||
public int updateForbiddenTagById(JobSearchParam params) {
|
||||
return getJobService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getJobService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -129,8 +154,12 @@ public class JobWrapper extends Service {
|
|||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.JOB, operateDesc = "删除岗位信息")
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getJobService(user).deleteByIds(ids);
|
||||
int deleteByIds = getJobService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除岗位信息【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -164,7 +193,11 @@ public class JobWrapper extends Service {
|
|||
return getJobService(user).getMergeForm();
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.JOB, operateDesc = "合并岗位")
|
||||
public int mergeJob(JobMergeParam mergeParam) {
|
||||
return getJobService(user).mergeJob(mergeParam);
|
||||
int mergeJob = getJobService(user).mergeJob(mergeParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "合并岗位【" + JSON.toJSONString(mergeParam) + "】");
|
||||
return mergeJob;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.scheme.param.LevelSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.LevelService;
|
||||
import com.engine.organization.service.impl.LevelServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -18,7 +22,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class LevelWrapper extends Service {
|
||||
public class LevelWrapper extends OrganizationWrapper {
|
||||
private LevelService getLevelService(User user) {
|
||||
return ServiceUtil.getService(LevelServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -39,8 +43,12 @@ public class LevelWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "新增职等")
|
||||
public int saveLevel(LevelSearchParam param) {
|
||||
return getLevelService(user).saveLevel(param);
|
||||
int saveLevel = getLevelService(user).saveLevel(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职等【" + JSON.toJSONString(param) + "】");
|
||||
return saveLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -49,8 +57,12 @@ public class LevelWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "更新职等")
|
||||
public int updateLevel(LevelSearchParam param) {
|
||||
return getLevelService(user).updateLevel(param);
|
||||
int updateLevel = getLevelService(user).updateLevel(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职等【" + JSON.toJSONString(param) + "】");
|
||||
return updateLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -58,8 +70,12 @@ public class LevelWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "更新职等禁用标识")
|
||||
public int updateForbiddenTagById(LevelSearchParam params) {
|
||||
return getLevelService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getLevelService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职等禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -67,8 +83,12 @@ public class LevelWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "删除职等")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getLevelService(user).deleteByIds(ids);
|
||||
int deleteByIds = getLevelService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职等【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.logview.param.LogViewSearchParam;
|
||||
import com.engine.organization.service.LogViewService;
|
||||
import com.engine.organization.service.impl.LogViewServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class LogViewWrapper extends OrganizationWrapper {
|
||||
private LogViewService getLogViewService(User user) {
|
||||
return ServiceUtil.getService(LogViewServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> listPage(LogViewSearchParam params) {
|
||||
return getLogViewService(user).listPage(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> getSearchCondition() {
|
||||
return getLogViewService(user).getSearchCondition();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.postion.param.PostInfoSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.PostInfoService;
|
||||
import com.engine.organization.service.impl.PostInfoServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -17,7 +21,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PostInfoWrapper extends Service {
|
||||
public class PostInfoWrapper extends OrganizationWrapper {
|
||||
private PostInfoService getPostInfoService(User user) {
|
||||
return ServiceUtil.getService(PostInfoServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -38,8 +42,12 @@ public class PostInfoWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "新增职务信息")
|
||||
public int savePostInfo(PostInfoSearchParam param) {
|
||||
return getPostInfoService(user).savePostInfo(param);
|
||||
int savePostInfo = getPostInfoService(user).savePostInfo(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职务信息【" + JSON.toJSONString(param) + "】");
|
||||
return savePostInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +56,12 @@ public class PostInfoWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "更新职务信息")
|
||||
public int updatePostInfo(PostInfoSearchParam param) {
|
||||
return getPostInfoService(user).updatePostInfo(param);
|
||||
int updatePostInfo = getPostInfoService(user).updatePostInfo(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职务信息【" + JSON.toJSONString(param) + "】");
|
||||
return updatePostInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -57,8 +69,12 @@ public class PostInfoWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "更新职务信息禁用标识")
|
||||
public int updateForbiddenTagById(PostInfoSearchParam params) {
|
||||
return getPostInfoService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getPostInfoService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职务信息禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -66,8 +82,12 @@ public class PostInfoWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "删除职务信息")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getPostInfoService(user).deleteByIds(ids);
|
||||
int deleteByIds = getPostInfoService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职务信息【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.PostService;
|
||||
import com.engine.organization.service.impl.PostServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -18,7 +22,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PostWrapper extends Service {
|
||||
public class PostWrapper extends OrganizationWrapper {
|
||||
private PostService getPostService(User user) {
|
||||
return ServiceUtil.getService(PostServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -29,8 +33,12 @@ public class PostWrapper extends Service {
|
|||
* @param postPO
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.POST, operateDesc = "新增职务分类")
|
||||
public int savePost(PostPO postPO) {
|
||||
return getPostService(user).savePost(postPO);
|
||||
int savePost = getPostService(user).savePost(postPO);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职等【" + JSON.toJSONString(postPO) + "】");
|
||||
return savePost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -39,8 +47,12 @@ public class PostWrapper extends Service {
|
|||
* @param postPO
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.POST, operateDesc = "更新职务分类")
|
||||
public int updatePost(PostPO postPO) {
|
||||
return getPostService(user).updatePost(postPO);
|
||||
int updatePost = getPostService(user).updatePost(postPO);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职务分类【" + JSON.toJSONString(postPO) + "】");
|
||||
return updatePost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +60,12 @@ public class PostWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.POST, operateDesc = "删除职务分类")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getPostService(user).deleteByIds(ids);
|
||||
int deleteByIds = getPostService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职务分类【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
|
||||
import com.engine.organization.entity.scheme.param.SchemeSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.SchemeService;
|
||||
import com.engine.organization.service.impl.SchemeServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -19,7 +23,7 @@ import java.util.Map;
|
|||
* @Date 2022/5/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class SchemeWrapper extends Service {
|
||||
public class SchemeWrapper extends OrganizationWrapper {
|
||||
|
||||
private SchemeService getSchemeService(User user) {
|
||||
return ServiceUtil.getService(SchemeServiceImpl.class, user);
|
||||
|
|
@ -41,8 +45,12 @@ public class SchemeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> save(SchemeSearchParam param) {
|
||||
return getSchemeService(user).save(param);
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "新增等级方案")
|
||||
public int save(SchemeSearchParam param) {
|
||||
int save = getSchemeService(user).save(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增等级方案【" + JSON.toJSONString(param) + "】");
|
||||
return save;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -51,8 +59,12 @@ public class SchemeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> updateScheme(SchemeSearchParam param) {
|
||||
return getSchemeService(user).updateScheme(param);
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "更新等级方案")
|
||||
public int updateScheme(SchemeSearchParam param) {
|
||||
int updateScheme = getSchemeService(user).updateScheme(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新等级方案【" + JSON.toJSONString(param) + "】");
|
||||
return updateScheme;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -60,8 +72,12 @@ public class SchemeWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
public void updateForbiddenTagById(SchemeSearchParam params) {
|
||||
getSchemeService(user).updateForbiddenTagById(params);
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "更新等级方案禁用标识")
|
||||
public int updateForbiddenTagById(SchemeSearchParam params) {
|
||||
int updateForbiddenTagById = getSchemeService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新等级方案禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,8 +85,12 @@ public class SchemeWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
public void deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
getSchemeService(user).deleteByIds(ids);
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "删除等级方案")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
int deleteByIds = getSchemeService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新等级方案禁用标识【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.sequence.param.SequenceSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.SequenceService;
|
||||
import com.engine.organization.service.impl.SequenceServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -17,7 +21,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/12
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class SequenceWrapper extends Service {
|
||||
public class SequenceWrapper extends OrganizationWrapper {
|
||||
private SequenceService getSequenceService(User user) {
|
||||
return ServiceUtil.getService(SequenceServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -38,8 +42,12 @@ public class SequenceWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "新增岗位序列")
|
||||
public int saveSequence(SequenceSearchParam param) {
|
||||
return getSequenceService(user).saveSequence(param);
|
||||
int saveSequence = getSequenceService(user).saveSequence(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增岗位序列【" + JSON.toJSONString(param) + "】");
|
||||
return saveSequence;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +56,12 @@ public class SequenceWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "更新岗位序列")
|
||||
public int updateSequence(SequenceSearchParam param) {
|
||||
return getSequenceService(user).updateSequence(param);
|
||||
int updateSequence = getSequenceService(user).updateSequence(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位序列【" + JSON.toJSONString(param) + "】");
|
||||
return updateSequence;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -57,8 +69,12 @@ public class SequenceWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "更新岗位序列禁用标识")
|
||||
public int updateForbiddenTagById(SequenceSearchParam params) {
|
||||
return getSequenceService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getSequenceService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位序列禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -66,8 +82,12 @@ public class SequenceWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "删除岗位序列")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getSequenceService(user).deleteByIds(ids);
|
||||
int deleteByIds = getSequenceService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除岗位序列【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.staff.param.StaffPlanSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.StaffPlanService;
|
||||
import com.engine.organization.service.impl.StaffPlanServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -17,7 +21,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/25
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class StaffPlanWrapper extends Service {
|
||||
public class StaffPlanWrapper extends OrganizationWrapper {
|
||||
private StaffPlanService getStaffPlanService(User user) {
|
||||
return ServiceUtil.getService(StaffPlanServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -38,8 +42,12 @@ public class StaffPlanWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "新增编制方案")
|
||||
public int saveStaffPlan(StaffPlanSearchParam param) {
|
||||
return getStaffPlanService(user).saveStaffPlan(param);
|
||||
int saveStaffPlan = getStaffPlanService(user).saveStaffPlan(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增编制方案【" + JSON.toJSONString(param) + "】");
|
||||
return saveStaffPlan;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +56,12 @@ public class StaffPlanWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "更新编制方案")
|
||||
public int updateStaffPlan(StaffPlanSearchParam param) {
|
||||
return getStaffPlanService(user).updateStaffPlan(param);
|
||||
int updateStaffPlan = getStaffPlanService(user).updateStaffPlan(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新编制方案【" + JSON.toJSONString(param) + "】");
|
||||
return updateStaffPlan;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -57,8 +69,12 @@ public class StaffPlanWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "更新编制方案禁用标识")
|
||||
public int updateForbiddenTagById(StaffPlanSearchParam params) {
|
||||
return getStaffPlanService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getStaffPlanService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新编制方案禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -66,8 +82,12 @@ public class StaffPlanWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "删除编制方案")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getStaffPlanService(user).deleteByIds(ids);
|
||||
int deleteByIds = getStaffPlanService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除编制方案【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.staff.param.StaffSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.StaffService;
|
||||
import com.engine.organization.service.impl.StaffServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -16,7 +20,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/25
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class StaffWrapper extends Service {
|
||||
public class StaffWrapper extends OrganizationWrapper {
|
||||
private StaffService getStaffService(User user) {
|
||||
return ServiceUtil.getService(StaffServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -37,8 +41,12 @@ public class StaffWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.STAFF, operateDesc = "新增编制上报")
|
||||
public int saveStaff(StaffSearchParam param) {
|
||||
return getStaffService(user).saveStaff(param);
|
||||
int saveStaff = getStaffService(user).saveStaff(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增编制上报【" + JSON.toJSONString(param) + "】");
|
||||
return saveStaff;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -47,8 +55,12 @@ public class StaffWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.STAFF, operateDesc = "更新编制上报")
|
||||
public int updateStaff(StaffSearchParam param) {
|
||||
return getStaffService(user).updateStaff(param);
|
||||
int updateStaff = getStaffService(user).updateStaff(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新编制上报【" + JSON.toJSONString(param) + "】");
|
||||
return updateStaff;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -57,8 +69,12 @@ public class StaffWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.STAFF, operateDesc = "删除编制上报")
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getStaffService(user).deleteByIds(ids);
|
||||
int deleteByIds = getStaffService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除编制上报【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue