自定义设置后端
parent
5ac8ce813a
commit
7256a94abd
@ -0,0 +1,13 @@
|
||||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/6/13
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Path("/bs/hrmorganization/fieldDefined")
|
||||
public class FieldDefinedController extends com.engine.organization.web.FieldDefinedController {
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.engine.organization.entity.fieldset;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/6/13
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TypeTreeDTO {
|
||||
|
||||
private boolean addChild;
|
||||
|
||||
private boolean canCanceled;
|
||||
|
||||
private boolean canClick;
|
||||
|
||||
private String domid;
|
||||
|
||||
private boolean hasGroup;
|
||||
|
||||
private boolean haschild;
|
||||
|
||||
private boolean isLeaf;
|
||||
|
||||
private boolean isParent;
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.fieldset.TypeTreeDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/6/13
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface FieldDefinedService {
|
||||
|
||||
List<TypeTreeDTO> getTree(String moduleName);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.fieldset.TypeTreeDTO;
|
||||
import com.engine.organization.service.FieldDefinedService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/6/13
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class FieldDefinedServiceImpl extends Service implements FieldDefinedService {
|
||||
|
||||
@Override
|
||||
public List<TypeTreeDTO> getTree(String moduleName) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.engine.organization.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.FieldDefinedWrapper;
|
||||
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.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/6/13
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class FieldDefinedController {
|
||||
|
||||
private FieldDefinedWrapper getFieldDefinedWrapper(User user) {
|
||||
return ServiceUtil.getService(FieldDefinedWrapper.class,user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/{moduleName}/getTree")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@PathParam("moduleName") String moduleName) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getFieldDefinedWrapper(user).getTree(moduleName));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.fieldset.TypeTreeDTO;
|
||||
import com.engine.organization.service.FieldDefinedService;
|
||||
import com.engine.organization.service.impl.FieldDefinedServiceImpl;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/6/13
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class FieldDefinedWrapper extends Service {
|
||||
|
||||
private FieldDefinedService getFieldDefinedService(User user) {
|
||||
return ServiceUtil.getService(FieldDefinedServiceImpl.class,user);
|
||||
}
|
||||
|
||||
|
||||
public ReturnResult getTree(String moduleName) {
|
||||
List<TypeTreeDTO> treeDTOS = getFieldDefinedService(user).getTree(moduleName);
|
||||
return ReturnResult.successed();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue