虚拟组织暂存
This commit is contained in:
parent
0e1e6d5bb6
commit
53a295a468
|
|
@ -0,0 +1,14 @@
|
|||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/6/27 3:38 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Path("/bs/hrmorganization/virtual")
|
||||
public class OrgVirtualController extends com.engine.organization.web.OrgVirtualController {
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ public class CompanyTreePO {
|
|||
public boolean getIsLeaf() {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from hrmsubcompany where (canceled is null or canceled != '1') and supsubcomid = ?",id);
|
||||
return rs.next();
|
||||
return !rs.next();
|
||||
}
|
||||
|
||||
public String getpId() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/6/27 3:45 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface OrgVirtualService {
|
||||
|
||||
/**
|
||||
* @Description: 虚拟组织列表
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/6/27 3:56 PM
|
||||
* @param: [params]
|
||||
* @return: java.util.Map<java.lang.String,java.lang.Object>
|
||||
*/
|
||||
Map<String, Object> listPage(Map<String, Object> params);
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|||
if (detachUtil.isDETACH()) {
|
||||
String jclRoleLevels = detachUtil.getJclRoleLevels();
|
||||
if (StringUtils.isNotBlank(jclRoleLevels)) {
|
||||
sql = "select id, fnumber, fname, ftype from jcl_org_map where (ftype = 0 or (ftype = 1 and fobjid in(" + jclRoleLevels + "))) ";
|
||||
sql = "select id, fnumber, fname, ftype from jcl_org_map wheregetSubCompanyTree (ftype = 0 or (ftype = 1 and fobjid in(" + jclRoleLevels + "))) ";
|
||||
} else {
|
||||
sql = "select id, fnumber, fname, ftype from jcl_org_map where ftype = 0 ";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.service.OrgVirtualService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/6/27 3:45 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class OrgVirtualServiceImpl extends Service implements OrgVirtualService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -56,6 +56,7 @@ public class OrgChartController {
|
|||
User user = HrmUserVarify.getUser(request, response);
|
||||
//实例化Service 并调用业务类处理
|
||||
apidatas = getOrgChartWrapper(user).getSubCompanyTree(ParamUtil.request2Map(request), user);
|
||||
apidatas.put("api_status", true);
|
||||
} catch (Exception e) {
|
||||
//异常处理
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
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.OrgVirtualWrapper;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/6/27 3:41 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class OrgVirtualController {
|
||||
|
||||
public OrgVirtualWrapper getVirtualWrapper(User user) {
|
||||
return ServiceUtil.getService(OrgVirtualWrapper.class, user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getTable")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult listOrgVirtual(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getVirtualWrapper(user).listPage(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.service.OrgVirtualService;
|
||||
import com.engine.organization.service.impl.OrgVirtualServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/6/27 3:42 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class OrgVirtualWrapper extends Service {
|
||||
|
||||
private OrgVirtualService getOrgVirtualService(User user) {
|
||||
return ServiceUtil.getService(OrgVirtualServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||
return getOrgVirtualService(user).listPage(params);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue