Commit 676e41ed by 宋祥

1.修复BUG

parent 882f75d6
......@@ -4,9 +4,9 @@
<sql id="condition">
AND IS_DELETED = '0'
<isNotEqual prepend=" AND " property="accountCode" compareValue="ADMIN">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEqual>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgEname">
ORG_ENAME = #orgEname#
</isNotEmpty>
......@@ -83,9 +83,9 @@
(SELECT @CODES:=GROUP_CONCAT(ORG_ID)
FROM ${platSchema}.TXSOG01
WHERE FIND_IN_SET(PARENT_ORG_ID, @CODES)
<isNotEqual property="accountCode" compareValue="ADMIN">
AND ACCOUNT_CODE = #accountCode#
</isNotEqual>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
AND IS_DELETED = 0
) AS T1,
@LEVEL:=@LEVEL+1 AS LEVEL
......
......@@ -192,7 +192,13 @@ public class SqlMapDaoLogProxy extends SqlMapDao {
}
// 本来是BUG,避免业务代码改动依然保持原逻辑ADMIN时依然置空
String accountCode = UserSessionUtils.getAccountCode();
((Map) parameters).put("accountCode", CommonConstant.Field.ADMIN.equals(accountCode) ? "" : accountCode);
if (CommonConstant.Field.ADMIN.equals(accountCode)) {
((Map) parameters).put("accountCode", null);
} else if (StringUtils.isBlank(accountCode)) {
((Map) parameters).put("accountCode", " ");
} else {
((Map) parameters).put("accountCode", accountCode);
}
}
/**
......
......@@ -59,7 +59,7 @@ public class ServiceXSOG0800 extends TreeService {
queryMap.put("node", parentLabel);
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
queryMap.put("accountCode", LoginUserDetails.isUserAdmin(UserSessionUtils.getLoginName())
? CommonConstant.Field.ADMIN : UserSessionUtils.getAccountCode());
? null : UserSessionUtils.getAccountCode());
List<Map> ret = this.dao.query("XSOG01.queryOrganiation", queryMap, 0, -999999);
Map parentOrgMap = new HashMap();
......
......@@ -410,7 +410,7 @@ public class ServiceXSOG0801 extends ServiceBase {
}
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
inInfo.set("inqu_status-0-accountCode", LoginUserDetails.isUserAdmin(UserSessionUtils.getLoginName())
? CommonConstant.Field.ADMIN : UserSessionUtils.getAccountCode());
? null : UserSessionUtils.getAccountCode());
EiInfo outInfo = super.query(inInfo, "XSOG01.query", new XSOG01());
r2Block.setRows(outInfo.getBlock(EiConstant.resultBlock).getRows());
outInfo.addBlock(r2Block);
......
......@@ -92,7 +92,7 @@ public class ServiceXSOG0801A extends ServiceEPBase {
}
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
queryMap.put("accountCode", LoginUserDetails.isUserAdmin(UserSessionUtils.getLoginName())
? CommonConstant.Field.ADMIN : UserSessionUtils.getAccountCode());
? null : UserSessionUtils.getAccountCode());
inInfo = super.query(inInfo, "XSOG01.query", new XSOG01());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
......@@ -84,7 +84,7 @@ public class ServiceXSOG0801B extends ServiceEPBase {
}
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
queryMap.put("accountCode", LoginUserDetails.isUserAdmin(UserSessionUtils.getLoginName())
? CommonConstant.Field.ADMIN : UserSessionUtils.getAccountCode());
? null : UserSessionUtils.getAccountCode());
inInfo = super.query(inInfo, "XSOG01.query", new XSOG01());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
......@@ -158,9 +158,9 @@
<isNotEmpty prepend=" AND " property="orgType">
ORG_TYPE like ('%$orgType$%')
</isNotEmpty>
<isNotEqual prepend=" AND " property="accountCode" compareValue="ADMIN">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEqual>
</isNotEmpty>
ORDER BY SORT_INDEX ASC
</select>
......@@ -185,9 +185,9 @@
<isNotEmpty prepend=" AND " property="orgType">
ORG_TYPE like ('%$orgType$%')
</isNotEmpty>
<isNotEqual prepend=" AND " property="accountCode" compareValue="ADMIN">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEqual>
</isNotEmpty>
</select>
<!-- 根据id查询组织机构 -->
......@@ -279,9 +279,9 @@
<isNotEmpty prepend=" AND " property="node">
PARENT_ORG_ID = #node#
</isNotEmpty>
<isNotEqual prepend=" AND " property="accountCode" compareValue="ADMIN">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEqual>
</isNotEmpty>
order by SORT_INDEX asc
</select>
......
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