Commit 4df7d620 by wuwenlong

组织机构&用户角色bugfix

parent ced9d72c
......@@ -319,4 +319,17 @@ public class CommonMethod {
eiBlock.setRows(rows);
inInfo.setBlock(eiBlock);
}
public static void joinTextField(EiInfo inInfo, String blockId,String prefixValueName){
List rows = inInfo.getBlock(blockId).getRows();
List newRows = new ArrayList(){{
rows.forEach(o -> {
Map<String,Object> map = (Map<String, Object>) o;
map.put(HGConstants.TEXT_FIELD,String.format("[%s]%s",map.get(prefixValueName),map.get(HGConstants.TEXT_FIELD)));
add(o);
});
}};
inInfo.getBlock(blockId).setRows(newRows);
}
}
......@@ -53,7 +53,10 @@ public class ServiceXSOG0801A extends ServiceEPBase {
} else {
// 查询组织
Org org = HGXSTools.XsOrg.get(parentOrgId);
if (OrgTypeEnum.COMPANY.getCode().equals(org.getOrgType())) {
if(CommonConstant.Field.ROOT.equals(org.getParentOrgId())) {
condition = String.format(" ITEM_CODE IN ('%s', '%s')", OrgTypeEnum.COMPANY.getCode(),
OrgTypeEnum.DEPT.getCode());
}else if (OrgTypeEnum.COMPANY.getCode().equals(org.getOrgType())) {
condition = String.format(" ITEM_CODE IN ('%s', '%s', '%s')", OrgTypeEnum.COMPANY.getCode(),
OrgTypeEnum.FACTORY.getCode(), OrgTypeEnum.DEPT.getCode());
} else if (OrgTypeEnum.FACTORY.getCode().equals(org.getOrgType())) {
......
package com.baosight.xservices.xs.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.HGConstants;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
......@@ -49,6 +50,7 @@ public class ServiceXS3002 extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.DEPT_CODE_BLOCK_ID));
CommonMethod.joinTextField(inInfo,DdynamicEnum.DEPT_CODE_BLOCK_ID.getBlockId(), HGConstants.PARAM4_FIELD);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
} catch (PlatException e) {
......
......@@ -252,7 +252,9 @@ let deptCodeChange = function (e) {
}
function refreshQuery() {
if(resultGrid.dataSource) {
resultGrid.dataSource.page(1);
}
}
const flashUser = (userGroup) => {
......
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