登记方案 职等职级接口
parent
4f51589a84
commit
2775d2486e
@ -0,0 +1,26 @@
|
|||||||
|
package com.engine.organization.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/09
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TopMenuBtn {
|
||||||
|
private String isBatch;
|
||||||
|
private String isTop;
|
||||||
|
private String menuFun;
|
||||||
|
private String menuIcon;
|
||||||
|
private String menuName;
|
||||||
|
private String type;
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.engine.organization.entity.scheme.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/09
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class LevelPO {
|
||||||
|
/**
|
||||||
|
*自增主键
|
||||||
|
*/
|
||||||
|
private long id;
|
||||||
|
/**
|
||||||
|
*编号
|
||||||
|
*/
|
||||||
|
private String levelNo;
|
||||||
|
/**
|
||||||
|
*方案名称
|
||||||
|
*/
|
||||||
|
private String levelName;
|
||||||
|
/**
|
||||||
|
*方案说明
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级方案标识
|
||||||
|
*/
|
||||||
|
private Long levelScheme;
|
||||||
|
/**
|
||||||
|
*禁用标记
|
||||||
|
*/
|
||||||
|
private int forbiddenTag;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long creator;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private int deleteType;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.engine.organization.entity.scheme.vo;
|
||||||
|
|
||||||
|
import com.engine.organization.annotation.OrganizationTable;
|
||||||
|
import com.engine.organization.annotation.OrganizationTableColumn;
|
||||||
|
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@OrganizationTable(pageId = "98e9c62f-cd12-11ec-a15f-00ffcbed7508",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.level_no," +
|
||||||
|
"t.level_name," +
|
||||||
|
"t.description," +
|
||||||
|
"t.level_scheme," +
|
||||||
|
"t.forbidden_tag," +
|
||||||
|
"t.creator," +
|
||||||
|
"t.delete_type," +
|
||||||
|
"t.create_time," +
|
||||||
|
"t.update_time",
|
||||||
|
fromSql = "FROM jcl_org_level t ",
|
||||||
|
orderby = "id desc",
|
||||||
|
primarykey = "id",
|
||||||
|
operates = {
|
||||||
|
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||||
|
@OrganizationTableOperate(index = "1", text = "删除")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public class LevelTableVO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(column = "id", display = false)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "编号", width = "20%", column = "scheme_no")
|
||||||
|
private String levelNo;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "名称", width = "20%", column = "scheme_name")
|
||||||
|
private String levelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述说明
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "描述说明", width = "20%", column = "scheme_description")
|
||||||
|
private String description;
|
||||||
|
/**
|
||||||
|
* 等级方案
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_description")
|
||||||
|
private String levelScheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用标记
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "禁用标记", width = "20%", column = "forbidden_tag")
|
||||||
|
private Integer forbiddenTag;
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/10
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface LevelService {
|
||||||
|
/**
|
||||||
|
* 等级方案列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> listPage(Map<String, Object> params);
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.engine.organization.service.impl;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.component.OrganizationWeaTable;
|
||||||
|
import com.engine.organization.entity.scheme.vo.LevelTableVO;
|
||||||
|
import com.engine.organization.entity.scheme.vo.SchemeTableVO;
|
||||||
|
import com.engine.organization.service.LevelService;
|
||||||
|
import com.engine.organization.util.db.DBType;
|
||||||
|
import com.weaverboot.frame.ioc.anno.classAnno.WeaIocService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/10
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@WeaIocService
|
||||||
|
public class LevelServiceImpl extends Service implements LevelService {
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||||
|
OrganizationWeaTable<SchemeTableVO> table = new OrganizationWeaTable<>(user, LevelTableVO.class);
|
||||||
|
String sqlWhere = buildSqlWhere(params);
|
||||||
|
table.setSqlwhere(sqlWhere);
|
||||||
|
WeaResultMsg result = new WeaResultMsg(false);
|
||||||
|
result.putAll(table.makeDataResult());
|
||||||
|
result.success();
|
||||||
|
return result.getResultMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String buildSqlWhere(Map<String, Object> params) {
|
||||||
|
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||||
|
String sqlWhere = " where delete_type ='0' ";
|
||||||
|
String name = (String) params.get("name");
|
||||||
|
if (StringUtils.isNotBlank(name)) {
|
||||||
|
sqlWhere += " AND scheme_name " + dbType.like(name);
|
||||||
|
}
|
||||||
|
String no = (String) params.get("no");
|
||||||
|
if (StringUtils.isNotBlank(no)) {
|
||||||
|
sqlWhere += " AND scheme_no " + dbType.like(no);
|
||||||
|
}
|
||||||
|
return sqlWhere;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.engine.organization.web;
|
||||||
|
|
||||||
|
import com.engine.common.util.ParamUtil;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.organization.util.response.ReturnResult;
|
||||||
|
import com.engine.organization.wrapper.LevelWrapper;
|
||||||
|
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;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/10
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class LevelController {
|
||||||
|
public LevelWrapper getLevelWrapper(User user) {
|
||||||
|
return ServiceUtil.getService(LevelWrapper.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取list列表
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/getLevelTable")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public ReturnResult listScheme(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||||
|
return ReturnResult.successed(getLevelWrapper(user).listPage(map));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ReturnResult.exceptionHandle(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.engine.organization.wrapper;
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.service.LevelService;
|
||||||
|
import com.engine.organization.service.impl.LevelServiceImpl;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/10
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class LevelWrapper extends Service {
|
||||||
|
private LevelService getLevelService(User user) {
|
||||||
|
return ServiceUtil.getService(LevelServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级方案列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||||
|
return getLevelService(user).listPage(params);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue