删除webService
parent
15a819a272
commit
7ecd58d27b
@ -1,18 +0,0 @@
|
|||||||
package com.engine.organization.webservice;
|
|
||||||
|
|
||||||
|
|
||||||
import javax.jws.WebMethod;
|
|
||||||
import javax.jws.WebService;
|
|
||||||
|
|
||||||
|
|
||||||
@WebService
|
|
||||||
public interface CustomBrowserService {
|
|
||||||
|
|
||||||
|
|
||||||
@WebMethod(
|
|
||||||
operationName = "getCompTreeList",
|
|
||||||
action = "com.engine.organization.webservice.CustomBrowserService.getCompTreeList"
|
|
||||||
)
|
|
||||||
//List<CompPO> getCompTreeList();
|
|
||||||
String getCompTreeList(String a,String b);
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
package com.engine.organization.webservice;
|
|
||||||
|
|
||||||
import com.engine.organization.entity.company.po.CompPO;
|
|
||||||
import com.engine.organization.mapper.comp.CompMapper;
|
|
||||||
import com.engine.organization.util.db.MapperProxyFactory;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
public class CustomBrowserServiceImpl implements CustomBrowserService {
|
|
||||||
private CompMapper getCompMapper() {
|
|
||||||
return MapperProxyFactory.getProxy(CompMapper.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
//public List<CompPO> getCompTreeList() {
|
|
||||||
// // 获取所有启用数据
|
|
||||||
// List<CompPO> allList = getCompMapper().list("").stream().filter(item -> 0 == item.getForbiddenTag()).collect(Collectors.toList());
|
|
||||||
//
|
|
||||||
// List<CompPO> parentList = allList.stream().filter(item -> (null == item.getParentCompany() || 0 == item.getParentCompany())).collect(Collectors.toList());
|
|
||||||
// Map<Long, List<CompPO>> compMap = allList.stream().filter(item -> (null != item.getParentCompany() && 0 != item.getParentCompany())).collect(Collectors.groupingBy(CompPO::getParentCompany));
|
|
||||||
// List<CompPO> returnList = new ArrayList<>();
|
|
||||||
// dealChildren(parentList, returnList, compMap);
|
|
||||||
//
|
|
||||||
// return returnList;
|
|
||||||
//}
|
|
||||||
@Override
|
|
||||||
public String getCompTreeList(String a, String b) {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
|
||||||
"<datas>\n" +
|
|
||||||
"<data>\n" +
|
|
||||||
"<A>A【" + a + "】</A>\n" +
|
|
||||||
"<B>\n" +
|
|
||||||
"测试ADAD</B>\n" +
|
|
||||||
"</data>\n" +
|
|
||||||
"<data>\n" +
|
|
||||||
"<A>B【" + b + "】</A>\n" +
|
|
||||||
"<B>测试噜啦啦啦</B>\n" +
|
|
||||||
"</data>\n" +
|
|
||||||
"<data>\n" +
|
|
||||||
"<A>C</A>\n" +
|
|
||||||
"<B>过年回家喽</B>\n" +
|
|
||||||
"</data>\n" +
|
|
||||||
"</datas>");
|
|
||||||
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void dealChildren(List<CompPO> parentList, List<CompPO> returnList, Map<Long, List<CompPO>> compMap) {
|
|
||||||
if (CollectionUtils.isEmpty(parentList)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (CompPO compPO : parentList) {
|
|
||||||
returnList.add(compPO);
|
|
||||||
dealChildren(compMap.get(compPO.getId()), returnList, compMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue