delete from HtmlLabelIndex where id = 539971 and ( indexdesc is null or indexdesc = '' ) 
;
insert into HtmlLabelIndex(id,indexdesc) select  539971,'规则设置' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 539971 and ( indexdesc is not null and indexdesc <> '' ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539971 and languageid=7 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539971 as indexid ,'规则设置' as content,7  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539971 and languageid=7 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539971 and languageid=8 and ( labelname is null or labelname = ''   or length(labelname)!=char_length(labelname)  ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539971 as indexid ,'Rule Settings' as content,8  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539971 and languageid=8 and ( labelname is not null and labelname <> ''   and length(labelname)=char_length(labelname)  ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539971 and languageid=9 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539971 as indexid ,'規則設置' as content,9  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539971 and languageid=9 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlModuleLabel where indexId = 539971 and moduleCode = 'HRM' and type = 'label' 
;
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',539971) 
;


delete from HtmlLabelIndex where id = 539970 and ( indexdesc is null or indexdesc = '' ) 
;
insert into HtmlLabelIndex(id,indexdesc) select  539970,'应用设置' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 539970 and ( indexdesc is not null and indexdesc <> '' ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539970 and languageid=7 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539970 as indexid ,'应用设置' as content,7  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539970 and languageid=7 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539970 and languageid=8 and ( labelname is null or labelname = ''   or length(labelname)!=char_length(labelname)  ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539970 as indexid ,'Apply Settings' as content,8  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539970 and languageid=8 and ( labelname is not null and labelname <> ''   and length(labelname)=char_length(labelname)  ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539970 and languageid=9 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539970 as indexid ,'應用設置' as content,9  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539970 and languageid=9 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlModuleLabel where indexId = 539970 and moduleCode = 'HRM' and type = 'label' 
;
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',539970) 
;


delete from HtmlLabelIndex where id = 539968 and ( indexdesc is null or indexdesc = '' ) 
;
insert into HtmlLabelIndex(id,indexdesc) select  539968,'设置' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 539968 and ( indexdesc is not null and indexdesc <> '' ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539968 and languageid=7 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539968 as indexid ,'设置' as content,7  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539968 and languageid=7 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539968 and languageid=8 and ( labelname is null or labelname = ''   or length(labelname)!=char_length(labelname)  ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539968 as indexid ,'set up' as content,8  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539968 and languageid=8 and ( labelname is not null and labelname <> ''   and length(labelname)=char_length(labelname)  ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539968 and languageid=9 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539968 as indexid ,'設置' as content,9  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539968 and languageid=9 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlModuleLabel where indexId = 539968 and moduleCode = 'HRM' and type = 'label' 
;
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',539968) 
;


delete from HtmlLabelIndex where id = 539967 and ( indexdesc is null or indexdesc = '' ) 
;
insert into HtmlLabelIndex(id,indexdesc) select  539967,'专项附加扣除' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 539967 and ( indexdesc is not null and indexdesc <> '' ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539967 and languageid=7 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539967 as indexid ,'专项附加扣除' as content,7  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539967 and languageid=7 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539967 and languageid=8 and ( labelname is null or labelname = ''   or length(labelname)!=char_length(labelname)  ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539967 as indexid ,'Special additional deduction' as content,8  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539967 and languageid=8 and ( labelname is not null and labelname <> ''   and length(labelname)=char_length(labelname)  ))  limit 1 
;
delete from HtmlLabelInfo where indexid = 539967 and languageid=9 and ( labelname is null or labelname = ''    ) 
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select  539967 as indexid ,'專項附加扣除' as content,9  as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 539967 and languageid=9 and ( labelname is not null and labelname <> ''   ))  limit 1 
;
delete from HtmlModuleLabel where indexId = 539967 and moduleCode = 'HRM' and type = 'label' 
;
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',539967) 
;