一、参数值界面不显示:参数值创建人user表中不存在查询、删除
--1、参数值creator在user表不存在
--查询SQL语句:
SELECT * FROM t_bas_paramItem WHERE fid not in
(
SELECT p.fid FROM t_bas_paramItem p INNER JOIN T_PM_USER u ON p.FCREATORID = u.FID
)
--删除SQL语句:
DELETE FROM t_bas_paramItem WHERE fid not in
(
SELECT p.fid FROM t_bas_paramItem p INNER JOIN T_PM_USER u ON p.FCREATORID = u.FID
)
二、参数值界面不显示:集团控制参数组织单元id不为空查询、删除
--1、集团控制参数组织单元id不为空或是否控制下级值为1
--查询SQL语句:
SELECT * FROM t_bas_paramItem pi INNER JOIN t_bas_param pa ON pi.FKEYID = pa.FID where pa.fisgroupcontrol = 1 and
(
pi.FISCONTROLSUB = 1 or pi.FORGUNITID is not null
)
--删除SQL语句:
DELETE FROM t_bas_paramItem where fid in
(
SELECT pi.fid FROM t_bas_paramItem pi INNER JOIN t_bas_param pa ON pi.FKEYID = pa.FID where pa.fisgroupcontrol = 1 and(
pi.FISCONTROLSUB = 1 or pi.FORGUNITID is not null)
)
推荐阅读