Commit 4378622a by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents f2f8f5b0 9a462646
......@@ -141,9 +141,9 @@ public class ServiceHGKC006 extends ServiceBase {
*/
private void add(HGKC006 hgkc006) throws Exception {
hgkc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.OTHER_ENTER_NO));
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc006.setCompanyCode(userVO.getUsercode());
hgkc006.setCompanyName(userVO.getUsername());
// UserVO userVO = HGCWTools.HgCw002.getUserCompany();
// hgkc006.setCompanyCode(userVO.getUsercode());
// hgkc006.setCompanyName(userVO.getUsername());
hgkc006.setSource(InventorySource.MANUAL_ENTRY.getCode());
hgkc006.setSubmitStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC006.INSERT, hgkc006);
......
......@@ -12,13 +12,7 @@ import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import com.baosight.iplat4j.core.util.StringUtils;
import com.baosight.xservices.xs.util.LoginUserDetails;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import java.util.stream.Stream;
......@@ -574,12 +568,16 @@ public class AuthenticationInfo {
BigDecimal retLeaf = (BigDecimal)retResultMap.get("leaf");
BigDecimal menuDecimal = new BigDecimal("2");
BigDecimal leafDecimal = new BigDecimal("1");
String parent = (String)retResultMap.get("parent");
if (retLeaf != null && menuDecimal.equals(retLeaf)) {
Map paramMap = new HashMap();
paramMap.put("node", retResultMap.get("label").toString());
List childPageForMenu = getDao().query("XSMenu.queryForRecursiveChildPage", paramMap);
boolean flag = false;
List childList = new LinkedList();
if (childPageForMenu != null && childPageForMenu.size() > 0) {
//APP需要遍历所有子菜单
if(parent.equals("APP")){
label85:
for(int j = 0; j < pageAuthList.size(); ++j) {
Map pageAuthMap = (Map)pageAuthList.get(j);
......@@ -588,12 +586,27 @@ public class AuthenticationInfo {
Map childPageMap = (Map)childPageForMenu.get(k);
if (childPageMap.get("label").toString().equals(pageAuthMap.get("label").toString())) {
flag = true;
childList.add(pageAuthMap);
}
}
}
}else{
label85:
for(int j = 0; j < pageAuthList.size(); ++j) {
Map pageAuthMap = (Map)pageAuthList.get(j);
for(int k = 0; k < childPageForMenu.size(); ++k) {
Map childPageMap = (Map)childPageForMenu.get(k);
if (childPageMap.get("label").toString().equals(pageAuthMap.get("label").toString())) {
flag = true;
childList.add(pageAuthMap);
break label85;
}
}
}
}
retResultMap.put("childMenu",childList);
}
if (flag) {
menuAndPageListForTree.add(retResultMap);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment