

update sys_dept d set tax_code = (
select t.zj_number  from wm_da_agent t where d.dept_id = t.dept_id
)

update sys_dept d set tax_code = (
select t.entcode  from wm_da_drug_ent t where d.dept_id = t.dept_id
) where tax_code is null


update sys_user  set  rlj_cert_status = cert_status where cert_status < 10

insert into sys_dept_sub (dept_id,subject_type,app_id,app_secret,rsa_public_key,query_url,subject_name,enable_flag)
SELECT dept_id,subject_type,app_id,app_secret,rsa_public_key,query_url,subject_name,1 from sys_dept where dept_id<>1 and del_flag=0  and app_id is not null

update wm_score_package_settle_note t set id_card_number  = (
select s.id_card_number from sys_user s where t.user_id = s.user_id )
