UPDATE t_haos_adminstruct SET fisroot = '1' WHERE fadminorgid = 100000 AND fstructprojectid = 1010 AND fparentid = 0;
UPDATE t_haos_orgteamstruct SET fisroot = '1' WHERE forgteamid = 100000 AND fstructprojectid = 1010 AND fparentid = 0;

update t_haos_adminstruct ast set fisroot = (
    select 1 from t_haos_structproject spp where spp.frootorgid = ast.fadminorgid
    and spp.fid = ast.fstructprojectid
        and spp.fissyspreset = '0'
    )
where exists(
    select 1 from t_haos_structproject sp where sp.frootorgid = ast.fadminorgid
    and sp.fid = ast.fstructprojectid
    and sp.fissyspreset = '0'
    );
	
update t_haos_orgteamstruct ost set fisroot = (
    select 1 from t_haos_structproject spp where spp.frootorgid = ost.forgteamid
    and spp.fid = ost.fstructprojectid
        and spp.fissyspreset = '0'
    )
where exists(
    select 1 from t_haos_structproject sp where sp.frootorgid = ost.forgteamid
    and sp.fid = ost.fstructprojectid
    and sp.fissyspreset = '0'
    );