select *  FROM dbo.pub_sql


SET IDENTITY_INSERT dbo.pub_sql ON

INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', '', '', '', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'abolish_order', '', 'mps_abolish_order {cmpid},{useruid},{bizid},{ordid},''{reason}'', '', '', '', 'int|int|int|bigint|nvarchar(1000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'add_bizsources', '', 'update mps_biztype  with(rowlock)  set biz_sourcebizids=''{crmids}' where biz_id={bizid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'add_command', '', 'if (not exists (select 1 from mps_command  with(nolock) where mps_command where cmp_cmpid={cmpid} and cmd_code=''{cmdcode}')  insert into mps_command(cmp_cmpid,cmd_code) values({cmpid},'{cmdcode}')', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'alter_job_executor', '', 'mps_alter_job_executor {cmpid},{useruid},{jbids},{newcuid},{reason}', '', '', '', 'int|int|varchar(8000)|int|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'backto_job', '', 'mps_backto_job {cmpid},{useruid},{gotojbid},{reason}', '', '', '', 'int|int|bigint|nvarchar(500)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'backto_job_auto', '', 'mps_backto_job_auto {cmpid},{useruid},{gotojbid},{reason}', '', '', '', 'int|int|bigint|nvarchar(500)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'biz_base_proc', '', 'mps_gen_biz_base_proc {cmpid},{bizid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'CALLCENTER_ACCOUNT', '', 'Qsy_cc_desk_vipmoney  ''{pagesize}','{pagecount}','{pageobjids}','{CARDNO}'', '', '', '', 'int|int|varchar(max)|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'CALLCENTER_GETVIP', '', 'Qsy_cc_desk_vipinfo ''{pagesize}','{pagecount}','{mobile}'', '', '', '', 'varchar(32)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'CALLCENTER_HISTORY', '', '[proj_qsy_get_consult_history]  ''{pagesize}','{pagecount}','{pageobjids}','{mobileNo}'', '', '', '', 'int|int|varchar(max)|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'CALLCENTER_ORDER', '', 'Qsy_cc_desk_vipRETAIL  ''{pagesize}','{pagecount}','{pageobjids}','{VIPID}'', '', '', '', 'int|int|varchar(max)|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'CALLCENTER_SCORE', '', 'Qsy_cc_desk_vipINTEGRAL ''{pagesize}','{pagecount}','{pageobjids}','{VIPID}'', '', '', '', 'int|int|varchar(max)|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'cart2order', '', 'mps_cart2order {cmpid},{branchid},{userdpid},{useruid},{bizid},{malltype}', '', '', '', 'int|int|int|int|int|nvarchar(30)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'chart2order', '', 'mps_chart2order {cmpid},{branchid},{userdpid},{useruid},{bizid},{malltype}', '', '', '', 'int|int|int|int|int|nvarchar(30)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'check_field_exists', '', 'mps_check_field_exists {cmpid},{tbtype},{objid},{objid2},{fldname}', '', '', '', 'int|varchar(20)|int|int|varchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'check_source_name', '', 'select top 1 * from mps_biztype_source with(nolock)  where (bizs_type=''{objtype}' or bizs_type='{objtype}'+'{objid2}') and bizs_bizid={objid} and bizs_source='{caption}' ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'cst_base_proc', '', 'mps_gen_cst_base_proc {cmpid},{ctid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'del_1biztype', '', 'mps_del_1biztype {cmpid},{bizid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'del_1privatelabel', '', 'delete mps_label_private  with(rowlock) where lp_useruid={useruid} and lp_lbcid={lbcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'del_decision', '', 'delete from mps_biztype_decision  with(rowlock) where bd_id={bdid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'del_label', '', 'delete mps_label_config  with(rowlock) where lbc_id={lbcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'del_privategroup', '', 'delete mps_privategroup  with(rowlock) where pg_id={mypgid} ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_1depart', '', 'delete mps_depart  with(rowlock) where dp_cmpid={cmpid} and dp_id={mydpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_1field', '', 'mps_delete_1field {cmpid},''{tbtype}',{objid},{objid2},'{fldname}'', '', '', '', 'int|varchar(10)|int|int|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_1field_byid', '', 'mps_delete_1field_byid {fldid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_account_depart', '', 'delete from mps_account_depart  with(rowlock) where aid_id = {aidid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_account_item', '', 'delete from mps_account_item  with(rowlock) where ai_id={aiid};delete from mps_account_branch with(rowlock)  where aib_aiid ={aiid};delete from mps_account_depart  with(rowlock) where aid_aiid ={aiid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_alarm', '', 'delete mps_alarm with(rowlock)  where alm_id={almid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_branch', '', 'mps_delete_branch {cmpid},{mybcid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_code_text', '', 'delete mps_code  with(rowlock) where bm_id={bmid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_cstctg1', '', 'delete mps_csttype with(rowlock)  where ct_cmpid={cmpid} and ct_id={myctid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_customer', '', 'mps_delete_customer {cmpid},{cctag},{ccid}', '', '', '', 'int|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_dbconnection', '', 'delete from ebs_kernel..pub_dbconnection with(rowlock)  where dc_id = {dcid} and dc_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_depart', '', 'mps_delete_depart {cmpid},{mydpid},{branchid},{userdpid},{useruid},{userotid}', '', '', '', 'int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_depart_shp', '', 'mps_delete_depart_shp {cmpid},{mydpid},{branchid},{userdpid},{useruid},{userotid}', '', '', '', 'int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_depart_std', '', 'mps_delete_depart_base {cmpid},{dp_id}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_depart_title', '', 'mps_delete_depart_title ''{dtids}','{dtsids}'', '', '', '', 'varchar(500)|varchar(2000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_ding_myapp', '', 'delete from mps_ding_myapp with(rowlock)  where dm_id = {id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_docctg1', '', 'delete mps_docctg  with(rowlock) where dc_cmpid={cmpid} and dc_id={mydcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_document', '', 'delete mps_document with(rowlock)  where doc_id={docid} and doc_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_employee', '', 'mps_delete_employee {cmpid},{cuid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_equctg1', '', 'delete mps_equctg  with(rowlock) where ec_cmpid={cmpid} and ec_id={myecid}', 'equctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_exportapi', '', 'delete from mps_exportapi with(rowlock)  where exp_id = {expid} and exp_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_extres1', '', 'delete mps_ext_resource where etc_cmpid={cmpid} and etc_id={myetcid}', 'ext_resource', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_flow', '', 'delete mps_bizflow with(rowlock)  where flw_id={flwid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_loginrole', '', 'mps_delete_loginrole {lgu_id},{lgu_cuid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_manage_grade', '', 'delete from mps_manage_grade  with(rowlock) where mg_id={mg_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_messagetemplate', '', 'delete from ebs_kernel.dbo.pub_messagetemplate  with(rowlock) where mp_id={mpid} and mp_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_order', '', 'mps_delete_order {cmpid},{useruid},{bizid},{ordid},''{reason}'', '', '', '', 'int|int|int|bigint|nvarchar(1000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_pc_menu', '', 'delete mps_menu  with(rowlock) where mn_id={mnid} and mn_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_permission', '', 'mps_delete_permission {cmpid},''{mpids}'', '', '', '', 'int|varchar(1000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_prd', '', 'mps_delete_prd {cmpid},{pctag},{prdid}', '', '', '', 'int|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_prdctg1', '', 'mps_delete_prdctg1 {cmpid},{mypcid}', 'prdctg', '', '', 'int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_privatesql', '', 'delete mps_privatesql  with(rowlock) where ps_id={psid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_product', '', 'delete from mps_prd_base  with(rowlock) where prd_id={prd_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_profession_grade', '', 'delete from mps_profession_grade  with(rowlock) where bg_id={bg_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_program', '', 'mps_delete_program {cmpid},{ptid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_report', '', 'delete from mps_report with(rowlock)  where rpt_id = {rpt_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_role', '', 'delete from mps_role with(rowlock)  where rl_value={rl_value} and rl_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_saleprds_one_details', '', 'delete from mps_saleprds where sp_id = {spid} and sp_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_spdepart', '', 'delete from mps_depart  with(rowlock) where dp_id={dpid} and (dp_code = ''' or dp_depart='')', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_subcuids', '', 'mps_delete_subcuids {crtcuid},''{crtsubuserids}'', '', '', '', 'int|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_sys_task', '', 'delete mps_auto_import  with(rowlock) where auto_id={autoid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_template', '', 'delete mps_template  with(rowlock) where tmp_id={tmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_title', '', ' set nocount on
          declare @rows int  
          delete mps_title with(rowlock)  where ot_id={myotid} and not exists(select 1 from mps_employee with(nolock)  where cu_otid = ot_id)          
          set @rows=@@rowcount
          select case when @rows>0 then ''ok' else 'error' end result  ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_title_grade', '', 'delete mps_title_grade  with(rowlock) where tg_id={mytgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_uploadfile', '', 'delete from mps_attach  with(rowlock) where da_cmpid={cmpid} and da_id={AttachFileId}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_warehouse', '', 'mps_delete_warehouse {mywhid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_webservice', '', 'delete from ebs_kernel..pub_webservice  with(rowlock) where svc_id = {svcid} and svc_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_weixin_count', '', 'delete from [ebs_kernel].[dbo].[pub_weixin]  with(rowlock) where wx_id={wx_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_weixin_menuheader', '', 'delete from mps_menu  with(rowlock) where mn_id={mn_id} or mn_flag like ''%_sub'+'{mn_id}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_weixin_state', '', 'mps_delete_weixin_state {wxs_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_weixin_subapp', '', 'delete from mps_menu with(rowlock)  where mn_id={mn_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'delete_weixin_subgroup', '', 'mps_delete_weixin_subgroup {mn_id}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'depart_title_insert', '', 'mps_depart_title_insert {mydpid},''{otids}'', '', '', '', 'int|varchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'depart_title_sub_insert', '', 'mps_depart_title_sub_insert {mydpid},{myotid},''{dpids}','{otids}'', '', '', '', 'int|int|varchar(300)|varchar(300)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'do_execute_job', '', 'mps_do_execute_job {cmpid},{branchid},{userdpid},{useruid},{userotid},{bizid},{ordbcid},{ordid},''{ordtype}','{ordno}','{ordtitle}','{orddate}','{ordcreator}','{ftype}',{fbizid},{fordid},{ford2tag},{ford2id},'{rtype}',{rbizid},{rordid},{rord2tag},{rord2id},{wrkid},{jbid},'{wsids}','{wsstatus}','{jbtext}',{gotojbid},{freecuids},{freeident}', '', '', '', 'int|int|int|int|int|int|int|bigint|nvarchar(50)|varchar(50)|nvarchar(100)|datetime|nvarchar(50)|varchar(10)|int|bigint|int|bigint|varchar(10)|int|bigint|int|bigint|int|bigint|varchar(200)|nvarchar(50)|nvarchar(500)|bigint|varchar(2000)|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'do_execute_job_batch', '', 'mps_do_execute_job_batch {cmpid},{branchid},{userdpid},{useruid},{userotid},{bizid,{wrkid},{ordids}', '', '', '', 'int|int|int|int|int|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'do_unconfirm_job', '', 'mps_do_unconfirm_job {cmpid},{useruid},{ordbcid},{bizid},{ordid},''{execs}','{coops}'', '', '', '', 'int|int|int|int|bigint|varchar(8000)|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'execute_job', '', 'mps_execute_job {cmpid},{useruid},{bizid},{ordbcid},{ordid},''{ordtype}','{ordno}','{ordtitle}','{orddate}','{ordcreator}','{ftype}',{fbizid},{fordid},{ford2tag},{ford2id},'{rtype}',{rbizid},{rordid},{rord2tag},{rord2id},{wrkid},{jbid},'{wsids}','{wsstatus}','{jbtext}',{gotojbid}', '', '', '', 'int|int|int|int|bigint|nvarchar(50)|varchar(50)|nvarchar(100)|datetime|nvarchar(50)|varchar(10)|int|bigint|int|bigint|varchar(10)|int|bigint|int|bigint|int|bigint|varchar(200)|nvarchar(50)|nvarchar(500)|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'fix_permission_order', '', 'mps_fix_permission_order {mpids},{order1}', '', '', '', 'varchar(8000)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1_sys_event', '', 'select evt_id,evt_cmpid,case when evt_code>''' then evt_code+'_'+convert(varchar(10),evt_cmpid)  else 'user'+convert(varchar(10),evt_id) end evt_code,evt_caption,evt_params,evt_note,evt_sql from mps_bizevent with(nolock) where evt_id={evtid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1_sys_task', '', 'select * from mps_auto_import with(nolock) where auto_id={autoid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1branch_depart', '', 'mps_g_1branch_depart {cmpid},{mybcid},''{key}'', '', '', '', 'int|int|nvarchar(255)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1branch_depart_sql', '', 'mps_g_1branch_depart_sql {cmpid},{mybcid},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1branch_departtitle', '', 'mps_g_1branch_departtitle {cmpid},{mybcid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1branch_shop', '', 'mps_g_1branch_shop {cmpid},{mybcid} ,''{key}','{dkey1}','{dkey2}','{dkey3}'', '', '', '', 'int|int|nvarchar(100)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1branch_shop_sql', '', 'mps_g_1branch_shop_sql {cmpid},{mybcid} ,''{key}','{dkey1}','{dkey2}','{dkey3}',{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|nvarchar(100)|nvarchar(50)|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1branch_title', '', 'mps_g_1branch_title {cmpid},{mybcid},''{key}'', '', '', '', 'int|int|nvarchar(255)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1customer', '', 'mps_g_1customer {cmpid},{cctag},{ccid}', '', '', '', 'int|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1depart_title', '', 'mps_g_1depart_title {cmpid},{mydpid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1doc_full', '', 'mps_g_1doc_full {cmpid},{useruid},{usersecurity},{docid},{dcid}', '', '', '', 'int|int|int|bigint|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1doc_similar', '', 'mps_g_1doc_similar {cmpid},{useruid},{usersecurity},{docid},{dcid},''{key1}','{key2}','{key3}','{key4}','{key5}'', '', '', '', 'int|int|int|bigint|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1emptitle', '', 'select * from mps_title  with(nolock) where ot_id={myotid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1permission', '', 'select * from mps_permission  with(nolock) where mp_id={mpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1prd', '', 'mps_g_1prd {cmpid},{pctag},{prdid}', '', '', '', 'int|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1privategroup', '', 'select * from mps_privategroup where pg_cmpid={cmpid} and pg_id={mypgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_1source', '', 'select * from mps_biztype_source with(nolock)  where bizs_type=''{biztype}' and  bizs_ord2tag={ord2tag} and bizs_bizid={bizid} and bizs_source='{sourcename}'', '获取当前数据源的所有信息，包括字段信息，PICKWIN参数', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_account_date', '', 'select cmp_accountdate,cmp_accountday from ebs_kernel.dbo.pub_company with(nolock)  where cmp_id={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_account_depart', '', 'select a.*,dp_depart from mps_account_depart a with(nolock) ,mps_depart b with(nolock)  where aid_aiid = {aiid} and aid_bcid = {bcid} and aid_dpid = b.dp_id', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_account_details', '', 'mps_g_account_details {cmpid},{aiid},{pagesize},{pagecount},''{pageobjids}'', '', '', '', 'int|bigint|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_account_item', '', 'select * from mps_account_item  with(nolock) where ai_cmpid = {cmpid} order by ai_order,ai_level,ai_id', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_account_item_details', '', 'select * from mps_account_item  with(nolock) where ai_cmpid = {cmpid} and ai_id = {aiid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_account_type', '', 'select at_note, at_type from mps_account_type with(nolock)  where at_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_adjustdepart', '', 'select * from mps_depart_base with(nolock)  where dp_cmpid={cmpid} and dp_isgroup=1 order by dp_order,dp_level', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_adv_source', '', 'mps_g_adv_lists {cmpid} ,''{adnames}'', '', '', '', 'int|varchar(1000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_advertisement', '', 'select ad_id,ad_title,ad_interval,ad_width,ad_height,ad_source from mps_advertisement  with(nolock) where ad_cmpid={cmpid} order by ad_title', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_alarm_details', '', 'select * from mps_alarm with(nolock)  where alm_id={almid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_alarm_group', '', 'select alm_id,alm_cmpid,alm_title,alm_objtype,alm_objid,alm_objid2,alm_category,alm_tmpid,alm_tmpcaption,alm_tobizid,alm_biztitle,alm_createmode from mps_alarm  with(nolock) where alm_cmpid={cmpid} and alm_objtype=''{objtype}' and alm_objid={objid} and alm_objid2={objid2} order by alm_title', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_all_depart', '', 'mps_g_all_depart {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_all_departtitle', '', 'mps_g_all_departtitle {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_all_report', '', 'mps_g_all_report {cmpid},{useruid},{mobile}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_all_resources', '', 'mps_g_all_resources {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_all_title', '', 'mps_g_all_title {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_allbranch_depart', '', 'mps_g_allbranch_depart {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_allbranch_departtitle', '', 'mps_g_allbranch_departtitle {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_allbranch_title', '', 'mps_g_allbranch_title {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_alldepart_mnlevel', '', 'mps_g_alldepart_mnlevel {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_alldepart_otlevel', '', 'mps_g_alldepart_otlevel {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_alldepart_pflevel', '', 'mps_g_alldepart_pflevel {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_allow_time', '', 'mps_g_allow_time {cmpid},''{objtype}',{objid}', '', '', '', 'int|varchar(10)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_attach_log', '', 'mps_g_attach_log {daid},''{key}',{operation},{pagesize},{pagecount},'{pageobjids}'', '', '', '', 'bigint|nvarchar(100)|int|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_auto_import', '', 'select * from mps_auto_import with(nolock) where auto_cmpid={cmpid} and auto_type=''{autotype}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_autotime', '', 'select * from mps_autotime with(nolock)  where at_objid={objid} and at_flag=''{atflag}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_category', '', 'select distinct biz_category  with(nolock) from mps_biztype where biz_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_comefrom', '', 'mps_g_biz_comefrom {cmpid},{bizid},''{stype}',{sbizid},{sord2tag},'{sord2group}'', '', '', '', 'int|int|varchar(10)|int|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_comefrom_for_pick', '', 'select * from mps_biztype_comefrom with(nolock)  where bs_bizid={tbizid} and bs_ord2tag={tord2tag} and bs_stype=''{stype}' and bs_sbizid={sbizid} and bs_sord2tag={sord2tag}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_neworder', '', 'mps_g_biz_neworder {cmpid},{bizid},{useruid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_ord2tags', '', 'mps_g_biz_ord2tags {bizid},''{stype}',{sbizid}', '', '', '', 'int|varchar(10)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_power_sources', '', 'mps_g_biz_power_sources {cmpid},{mybcid},{bizid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_relation', '', 'select * from mps_biztype_relation  with(nolock) where br_bizid={bizid} order by br_order', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biz_subcategory', '', 'select distinct biz_subcategory from mps_biztype  with(nolock) where biz_cmpid={cmpid} and biz_category=''{bizcategory}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_bizevent', '', 'select evt_id,evt_cmpid,case when evt_code>''' then evt_code+'_'+convert(varchar(10),evt_cmpid) else 'user'+convert(varchar(10),evt_id) end evt_code,evt_caption from mps_bizevent with(nolock) where evt_cmpid={cmpid} order by evt_caption ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_bizevent_index', '', 'select * from mps_bizevent_indexvalue with(nolock) where iv_cmpid={cmpid} order by iv_type,iv_caption', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_bizlist_goto_biz', '', 'select distinct biz_id,biz_category,biz_subcategory,biz_title from mps_biztype with(nolock)  , mps_biztype_comefrom  with(nolock) where bs_stype=''biz' and bs_sbizid={bizid} and biz_status>=0 order by biz_title ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_bizsources', '', 'mps_g_bizsources {bizid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biztype', '', 'select * from mps_biztype  with(nolock) where biz_cmpid={cmpid} and biz_id={bizid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biztype_auto', '', 'mps_g_biztype_auto {cmpid},{style},{bizid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biztype_crmnames', '', 'mps_g_biztype_crmnames {cmpid},{bizid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biztype_query', '', 'select * from mps_biztype  with(nolock) where biz_cmpid={cmpid} and biz_id={bizid};select * from mps_biztype_query with(nolock) where bql_bizid={bizid} order by bql_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biztype2_info', '', 'select biz2_caption,biz2_tag,biz2_bizid,biz2_page from mps_biztype2  with(nolock) where biz2_bizid={bizid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_biztypes_all', '', 'select * from mps_biztype with(nolock)  where biz_cmpid={cmpid} and biz_status>=0 order by biz_category,biz_subcategory,biz_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_bq_permission', '', 'select * from mps_permission where mp_type={bizid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch', '', ' select * from mps_branch  with(nolock) where bc_cmpid={cmpid} order by bc_order,bc_level', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_bybcid', '', 'mps_g_branch_bybcid {bcid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_bybcid_sql', '', 'mps_g_branch_bybcid_sql {bcid},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_fee_item', '', 'mps_g_branch_fee_item {cmpid},{mybcid},{budget},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_with_all', '', 'select cmp_fullname bc_display ,0 bc_id , ''' bc_code , cmp_code bc_incode , cmp_fullname bc_company ,  cmp_fullname bc_fullname , -1 bc_order from ebs_kernel.dbo.pub_company  with(nolock) where cmp_id={cmpid} and cmp_branch>0  union select cmp_grouptitle bc_display ,0 bc_id , cmp_groupcode bc_code , cmp_groupcode bc_incode , cmp_grouptitle bc_company ,  cmp_grouptitle bc_fullname , 0 bc_order from ebs_kernel.dbo.pub_company  with(nolock) where cmp_id={cmpid} and cmp_branch>0  union   select  bc_display,bc_id , bc_code ,bc_incode , bc_company , bc_fullname , bc_order from mps_branch  with(nolock) where bc_cmpid={cmpid} order by bc_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_with_group', '', 'select * from mps_groupbranch with(nolock)  where bc_cmpid={cmpid} order by bc_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_with_group_sql', '', 'mps_g_branch_with_group_sql {cmpid},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_with_nogroup', '', 'select * from mps_groupbranch  with(nolock) where bc_cmpid={cmpid} and bc_id>0 order by bc_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branch_with_nogroup_sql', '', 'mps_g_branch_with_nogroup_sql {cmpid},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branchdepart_mnlevel', '', 'mps_g_branchdepart_mnlevel {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branchdepart_otlevel', '', 'mps_g_branchdepart_otlevel {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_branchdepart_pflevel', '', 'mps_g_branchdepart_pflevel {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_category_bizall', '', 'mps_g_category_bizall {cmpid},{useruid},{useradmin},{mobile}', '', '', '', 'int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_category_rptinfo', '', 'mps_g_category_rptinfo {cmpid},{useruid},{useradmin},{category},{mobile}', '', '', '', 'int|int|int|varchar(200)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_code_category', '', 'select distinct bm_category , ''pub' as codedb from ebs_kernel.dbo.pub_code  with(nolock) union select distinct bm_category , 'mps' as codedb from mps_code  with(nolock) where bm_cmpid={cmpid} order by codedb desc , bm_category ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_code_management', '', 'select distinct bm_ctgcaption,bm_ctg from mps_code with(nolock)  where bm_category=''{ctg}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_code_management_details', '', 'select * from mps_code with(nolock)  where bm_category=''{ctg}' and bm_ctgcaption='{csmall}' order by bm_order', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_codeall', '', 'select distinct bm_category,bm_category as b from mps_code with(nolock)  where bm_cmpid={cmpid} and bm_category>''' order by bm_category', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_comefrom_canuse', '', 'select a.*,b.biz_title from mps_biztype_comefrom a  with(nolock) , mps_biztype b with(nolock)   where bs_stype=''biz' and bs_sord2tag=0 and bs_sbizid={bizid} and biz_id=bs_bizid ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_comp_logininfo', '', 'select cmp_login_bg,cmp_login_title,cmp_login_model,cmp_login_picture from ebs_kernel..pub_company with(nolock)  where cmp_id={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_comp_title', '', 'select * from mps_title  with(nolock) where ot_cmpid={cmpid} order by ot_order, ot_level', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_companyinfo', '', 'select * from ebs_kernel.dbo.pub_company  with(nolock) where cmp_id={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_crmflows', '', 'mps_g_crmflows {mycrmid},''{flwtitle}'', '', '', '', 'int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_cst_browse_md', '', 'mps_g_cstbrowse_md {cmpid},{useradmin},{terminal},{useruid},{ctid}', '', '', '', 'int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_cst_relation', '', 'select distinct biz_id , biz_title from  mps_biztype with(nolock)  , mps_biztype_source  with(nolock)  where biz_cmpid={cmpid} and bizs_bizid=biz_id and bizs_sourcetype=''cst' and (bizs_ctgid=500000000+{ctid} or bizs_ctgid=600000000+{ctid} or bizs_ctgid=700000000+{ctid} or bizs_ctgid=800000000+{ctid} or bizs_ctgid=100000000+{cctag} or bizs_ctgid=200000000+{cctag} or bizs_ctgid=300000000+{cctag} or bizs_ctgid=400000000+{cctag}) and bizs_ctg2id=0', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_cst_tag_info', '', 'select distinct  ct_caption,ct_tag from mps_csttype with(nolock)  where ct_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_cstctg', '', 'select ct_id,ct_tag as datagroup,ct_caption,ct_type,ct_order,0 ct_level from mps_csttype  with(nolock)  where ct_cmpid={cmpid} order by ct_tag,ct_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_cstctg_base', '', 'select * from mps_csttype  with(nolock) where ct_id={ctid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_csthome_md', '', 'mps_g_csthome_md {cmpid},{ctid},{ccid},{terminal}', '', '', '', 'int|int|bigint|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_csttypes_all', '', 'select * from mps_csttype with(nolock)  where ct_cmpid={cmpid} and ct_status>=0 order by  ct_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_current_ware', '', 'mps_g_current_ware {cmpid},{branchid},{userdpid},{userotid},{useruid},{whid},{showbatch},{key},{pagesize},{pagecount},{pageobjids}', '', '', '', 'int|int|int|int|int|varchar(8000)|int|nvarchar(100)|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_current_ware_bywh', '', 'mps_g_current_ware_bywh {cmpid},{branchid},{userdpid},{userotid},{useruid},{whid},{showbatch},{key},{pagesize},{pagecount},{pageobjids}', '', '', '', 'int|int|int|int|int|varchar(8000)|int|nvarchar(100)|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_datasources', '', 'select * from mps_biztype_source  with(nolock) where bizs_type=''{objmc}' and bizs_bizid={objid} and bizs_ord2tag={objid2} order by bizs_source ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_dbconnection', '', 'pub_g_dbconnection {cmpid},{pagesize},{pagecount},{pageobjids},{key}', '', '', '', 'int|int|int|varchar(8000)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_decision', '', 'select * from mps_biztype_decision  with(nolock) where bd_bizid={bizid} order by bd_order;select * from mps_permission  with(nolock) where mp_cmpid={cmpid} and mp_type=''decision' and mp_ctgid={bizid} order by mp_group ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_branch', '', 'mps_g_depart_branch {cmpid},{mybcid},''{keys}'', '', '', '', 'int|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_bydpid', '', 'mps_g_depart_bydpid {dpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_bydpid_sql', '', 'mps_g_depart_bydpid_sql {dpid},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_details', '', 'mps_depart_details {cmpid},{bcid},''{key}'', '', '', '', 'int|int|varchar(20)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_fee_item', '', 'mps_g_depart_fee_item {cmpid},{mydpid},{budget},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_fee_item_owner', '', 'mps_g_depart_fee_item_owner {cmpid},{mydpid},{budget},{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_manager', '', 'mps_g_depart_manager {cmpid},''{name}'', '', '', '', 'int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_mnlevel', '', 'mps_g_depart_mnlevel {cmpid},{mybcid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_otlevel', '', 'mps_g_depart_otlevel {cmpid},{mybcid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_pflevel', '', 'mps_g_depart_pflevel {cmpid},{mybcid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_std', '', 'select * from mps_depart_base  with(nolock) where dp_cmpid={cmpid} and dp_isgroup=1 order by dp_order , dp_level ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_title', '', 'select  dt_id,dt_dpid , dt_otid , ot_id , ot_title , ot_display , ot_level  from mps_depart_title with(nolock)  , mps_title  with(nolock) where dt_dpid={mydpid} and dt_otid=ot_id order by ot_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_title_direct_src', '', 'select  ot_title, ot_id  from mps_depart_title with(nolock)  , mps_title  with(nolock) where dt_dpid={mydpid} and dt_otid=ot_id order by ot_order ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_depart_title_sub', '', 'select dts_id,dts_dpid,dts_otid,dts_dpids,dts_otids,dp_depart,ot_title from mps_depart_title_sub with(nolock)  , mps_depart with(nolock)  , mps_title with(nolock)  where dts_dpids=dp_id and dts_otids=ot_id and dts_dpid={mydpid} and dts_otid={myotid} order by dts_dpid,dts_otid ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_departsusers', '', 'mps_g_departsusers {cmpid},''{dpids}','{key}' ', '', '', '', 'int|varchar(2000)|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_departsusers_sql', '', 'mps_g_departsusers_sql {cmpid},''{dpids}','{key}',{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|varchar(2000)|nvarchar(200)|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_departtitlesusers', '', 'mps_g_departtitlesusers {cmpid},{mydpid},{myotid},''{key}' ', '', '', '', 'int|int|int|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_departtitlesusers_sql', '', 'mps_g_departtitlesusers_sql {cmpid},{mydpid},{myotid},''{key}' ,{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|int|nvarchar(200)|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ding_maininfo', '', 'mps_ding_maininfo {cmpid},{useruid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_docctg', '', 'select dc_id,dc_tag as datagroup,dc_caption,dc_type,dc_order,dc_level from mps_docctg with(nolock)  where dc_cmpid={cmpid} order by dc_tag,dc_order,dc_level', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_docctg_base', '', 'select * from mps_docctg with(nolock)  where dc_id={id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_docctg_keys', '', 'mps_doc_keys {cmpid},{dctag},{dcid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_docctg_tag', '', 'select dc_id,dc_tag as datagroup,dc_caption,dc_type,dc_order,dc_level , dc_full from mps_docctg  with(nolock) where dc_cmpid={cmpid} and dc_tag={tag} order by dc_tag,dc_order,dc_level', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_document', '', 'select *  from mps_document  with(nolock) where doc_id={docid};select * from mps_attach  with(nolock) where da_cmpid={cmpid} and da_type=''doc' and da_objid={docid}; select * from mps_document_text  with(nolock) where docd_docid={docid};select * from mps_document_exam with(nolock)  where de_docid={docid} order by de_id ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_document_find', '', 'mps_g_document_search  ''{key1}','{key2}','{key3}','{key4}','{key5}','{key6}','{key7}','{key8}','{key9}','{key10}', {dcid}, {useruid},{usersecurity},{branchid},{userdpid},{userotid},'{order}',{objid},{cmpid},'{begindate}','{enddate}'', '', '', '', 'nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|int|int|int|int|int|int|nvarchar(40)|int|int|varchar(100)|varchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_document_index', '', 'mps_g_document_hot {dcid},{useruid},{usersecurity},{branchid},{userdpid},{userotid},{cmpid}', '', '', '', 'int|int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_document_management', '', 'mps_document_management {cmpid},{dcid},''{key1}','{key2}','{key3}','{key4}','{key5}',{pagesize},{pagecount},'{pageobjids}'', '', '', '', 'int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_employee', '', 'mps_employee_all {cmpid},{bcid},{dpid},''{key}',{type},{pagesize},{pagecount},'{pageobjids}'', '', '', '', 'int|int|int|varchar(20)|int|int|int|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_employee_dpid', '', 'select * from mps_employee where cu_cmpid={cmpid} and cu_dpid={mdpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_employee_one', '', 'select * from mps_employee with(nolock)  where cu_cmpid={cmpid} and cu_id={cuid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_equctg', '', 'select *,ec_tag as datagroup from mps_equctg where ec_cmpid={cmpid} order by ec_tag,ec_order,ec_level', 'equctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_equctg_base', '', 'select * from mps_equctg where ec_id={id}', 'equctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_exportapi', '', 'mps_g_exportapi {cmpid},{pagesize},{pagecount},{pageobjids},{key}', '', '', '', 'int|int|int|varchar(8000)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_exportapisql', '', 'select * from mps_exportapi with(nolock)  where exp_id = {expid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_extres', '', 'select*,etc_tag as datagroup from mps_ext_resource where etc_cmpid={cmpid} order by etc_tag,etc_order,etc_level', 'ext_resource', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_extres_base', '', 'select * from mps_ext_resource where etc_id={id}', 'ext_resource', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_extsqljs', '', 'mps_g_extsqljs {objid},{objid2},''{cdnames}'', '', '', '', 'int|int|varchar(500)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_field_info_normal', '', 'select * from mps_fieldinfo with(nolock)  where fldi_cmpid={cmpid} and fldi_tbtype=''{objtype}' and fldi_tbid={objid} and fldi_ord2tag={objid2} and (fldi_system={system} or {system}=-1) order by fldi_fieldname', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_field_info_normal_bydatatype', '', 'select * from mps_fieldinfo with(nolock)  where fldi_cmpid={cmpid} and fldi_tbtype=''{objtype}' and fldi_tbid={objid} and fldi_ord2tag={objid2} and (fldi_system={system} or {system}=-1) and charindex(fldi_datatype,'{datatypes}')>0 order by fldi_fieldname', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_field_infos_nosys', '', 'mps_g_field_infos_nosys {cmpid},''{objtype}',{objid},{objid2}', '', '', '', 'int|varchar(10)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flow_category_flowxml', '', 'select tmp_flowxml from mps_template with(nolock)  where tmp_cmpid={cmpid} and tmp_type=''{objtype}' and tmp_objid={objid} and tmp_objid2=0 and tmp_caption='{tpname}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flow_content', '', 'select  distinct  case when biz_subcategory=''' then biz_category else biz_category+'/'+biz_subcategory end as biz_content , biz_category,biz_subcategory,biz_order from mps_biztype  with(nolock) where biz_cmpid={cmpid} and biz_status>=0 order by biz_order asc', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flow_content_byme_bynew', '', 'select   case when biz_subcategory=''' then biz_category else biz_category+'/'+biz_subcategory end+'/'+biz_title as biz_content , biz_category,biz_subcategory,biz_id from mps_biztype with(nolock) ,mps_biztype_users with(nolock)  where biz_cmpid={cmpid} and biz_status>=0 and bp_type='new' and bp_bizid=biz_id and bp_cuid={useruid} order by biz_category,biz_subcategory,biz_title', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flow_list', '', 'select * from mps_biztype  with(nolock) where biz_cmpid={cmpid} and biz_status>=0 and biz_category=''{category}' and biz_subcategory='{subcategory}' order by biz_order,biz_title ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flow_scope', '', 'select flw_id , flw_scope  from mps_bizflow  with(nolock) where flw_id={flwid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flowwork', '', 'mps_g_flowwork {crmid},{flwid},{wrkid},''{shape}','{nodetext}'', '', '', '', 'int|int|int|varchar(10)|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flowwork_auto', '', 'mps_g_flowwork_auto {cmpid},{wrkid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flowwork_table', '', 'select * from mps_flowwork  with(nolock) where wrk_bizid={bizid} and wrk_flwid={flwid} and (charindex(''auto',wrk_keyparams)<=0 and  charindex('nomanual',wrk_keyparams)<=0) order by wrk_order ;select a.* from mps_permission a  with(nolock) , mps_flowwork b with(nolock)  where mp_cmpid={cmpid} and mp_type like 'wrk%' and mp_ctgid=wrk_id and wrk_bizid={bizid} and wrk_flwid={flwid} and (charindex('auto',wrk_keyparams)<=0 and  charindex('nomanual',wrk_keyparams)<=0) order by mp_type,mp_group ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_flowworkstatus_history', '', 'select * from mps_flowworkstatus_history with(nolock)  where ws_bizid={bizid} order by ws_date desc ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_form_scope', '', 'mps_g_form_scope {cmpid},{tmpid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_forums', '', 'mps_g_forums {cmpid},{ebstag},''{type}',{ctgid},{objid},{orderby},{branchid},{userdpid},{usertype},{useruid},'{pageobjids}'', '', '', '', 'int|int|varchar(255)|int|int|int|int|int|int|int|varchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_forums_attention', '', 'mps_g_forums_attention {fmid},{branchid},{userdpid},{usertype},{useruid},{cmpid}', '', '', '', 'bigint|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_forums_mobile', '', 'mps_g_forums_mobile {cmpid},{ebstag},''{type}',{ctgid},{objid},{fmid},{branchid},{userdpid},{usertype},{useruid},'{pageobjids}'', '', '', '', 'int|int|varchar(255)|int|int|int|int|int|int|int|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_holidays', '', 'mps_g_holidays {cmpid},{year},{month}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_jobinfo', '', 'mps_g_jobinfo {cmpid},{jbid}', '', '', '', 'int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_label_for_browse', '', 'select lbc_category,lbc_id , lbc_flag ,lbc_browse,case when lbc_flag=0 then lbc_group else ''' end as lbc_group , lbc_name,lbc_pickvalues from mps_label_config with(nolock)  where lbc_cmpid={cmpid} and lbc_type='{tbtype}' and lbc_ctgid={objid} and lbc_browse=0   union select lbc_category,lbc_id , lbc_flag ,lbc_browse,case when lbc_flag=0 then lbc_group else '' end as lbc_group , lbc_name,lbc_pickvalues from mps_label_config  with(nolock) , mps_label_private with(nolock)  where lbc_cmpid={cmpid} and lbc_type='{tbtype}' and lbc_ctgid={objid}  and lbc_id=lp_lbcid order by lbc_category , lbc_group , lbc_name', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_label_logic', '', 'select lbc_category,lbc_id , lbc_flag , case when lbc_group=''' then lbc_name else lbc_group+'-'+lbc_name end lbc_name from mps_label_config with(nolock)  where lbc_cmpid={cmpid} and lbc_type='{tbtype}' and lbc_ctgid={objid} and lbc_flag=0 order by lbc_category , lbc_group , lbc_name', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_label_sql', '', 'select lbc_sql from mps_label_config  with(nolock) where lbc_id={lbcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_labels', '', 'select * from mps_label_config with(nolock)  where lbc_cmpid={cmpid} and lbc_type=''{lbtype}' and lbc_ctgid={lbctgid} order by lbc_group , lbc_name ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_language', '', 'select cmp_language from ebs_kernel.dbo.pub_company with(nolock)  where cmp_id={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_load_link_info', '', 'select * from mps_fieldinfo  with(nolock) where fldi_cmpid=1 and fldi_tbtype=''{objtype}' and fldi_tbid={bizid} and fldi_ord2tag>=0 order by fldi_ord2tag , fldi_fieldname ; select * from mps_flowworkstatus_data with(nolock)  where wsd_wsid={wsid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_loginrole_cuid', '', 'select * from mps_login_role  with(nolock) where lgu_cuid={mcuid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_loginrole_source', '', 'mps_generate_loginrole_source {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_main_md', '', 'mps_g_main_md {cmpid},{useradmin},{terminal},{useruid}', '', '', '', 'int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_mall_type', '', 'select * from mps_malltype  with(nolock) where sc_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_manage_grade', '', 'select * from mps_manage_grade with(nolock)  where mg_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_manage_grade_caption', '', 'select mg_caption from mps_manage_grade where mg_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_manager_title', '', 'select distinct fldi_fieldname,fldi_fieldcaption from mps_fieldinfo with(nolock)  where fldi_cmpid = {cmpid} and (fldi_fieldname = ''dp_manager1' or fldi_fieldname = 'dp_manager2' or fldi_fieldname = 'dp_manager3' or fldi_fieldname = 'dp_manager4' or fldi_fieldname = 'dp_manager5' or fldi_fieldname = 'dp_manager6')', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_master_detail_fldinfo', '', 'select * from mps_fieldinfo with(nolock)  where fldi_cmpid={cmpid} and fldi_tbtype=''{objtype}' and fldi_tbid={objid} and fldi_ord2tag=0 and (fldi_system={system} or {system}=-1) order by fldi_fieldname;select * from mps_fieldinfo with(nolock)  where fldi_cmpid={cmpid} and fldi_tbtype='{objtype}' and fldi_tbid={objid} and fldi_ord2tag={objid2} and (fldi_system={system} or {system}=-1) order by fldi_fieldname', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_master_detail_fldinfo_bydatatype', '', 'select * from mps_fieldinfo  with(nolock) where fldi_cmpid={cmpid} and fldi_tbtype=''{objtype}' and fldi_tbid={objid} and fldi_ord2tag=0 and (fldi_system={system} or {system}=-1) and charindex(fldi_datatype,'{datatypes}')>0 order by fldi_fieldname;select * from mps_fieldinfo  with(nolock) where fldi_cmpid={cmpid} and fldi_tbtype='{objtype}' and fldi_tbid={objid} and fldi_ord2tag={objid2} and (fldi_system={system} or {system}=-1) and charindex(fldi_datatype,'{datatypes}')>0 order by fldi_fieldname', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_message_template', '', 'mps_g_messagetemplate {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_mn_level', '', 'select * from mps_manage_grade  with(nolock) where mg_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_mps_code', '', 'select bm_text,bm_text as bm_value from mps_code with(nolock)  where bm_cmpid={cmpid} and bm_ctg=''{ctgname}' order by bm_order , bm_text', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_mps_code_list', '', 'select bm_ctg,bm_ctgcaption,COUNT(bm_id) as bm_count from mps_code  with(nolock) where bm_cmpid={cmpid} and bm_category=''{category}' group by bm_ctg,bm_ctgcaption', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_msgtemplates', '', 'select ''' mp_display,'' mp_caption,0 mp_id,'' mp_name union select mp_caption mp_display,mp_caption,mp_id,mp_name from ebs_kernel.dbo.pub_messagetemplate with(nolock)  where mp_cmpid={cmpid} and (mp_scope='{scope}' or '{scope}'='')  and mp_caption>''', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myroles', '', 'select a.*,b.rl_title from mps_login_role a with(nolock)  , mps_role b  with(nolock) where lgu_cuid={useruid} and lgu_function=rl_value and rl_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo', '', 'mps_g_myworkinfo {cmpid},{branchid},{userdpid},{useruid},{userotid},{usersecurity},{crmids},{category}', '', '', '', 'int|int|int|int|int|int|varchar(2000)|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_', '', 'mps_g_myworkinfo_ {cmpid},{branchid},{userdpid},{useruid},{userotid},{usersecurity},{crmids},{category},{showgw},{showdoc}', '', '', '', 'int|int|int|int|int|int|varchar(2000)|nvarchar(200)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_alarm', '', 'mps_g_myworkinfo_alarm {cmpid},{useruid},{objid},''{key}'', '', '', '', 'int|int|bigint|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_job', '', 'mps_g_myworkinfo_job {cmpid},{branchid},{userdpid},{useruid},{userotid},{usersecurity},{crmids},{category},{key},{mobile},{allcount}', '', '', '', 'int|int|int|int|int|int|varchar(2000)|nvarchar(200)|nvarchar(100)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_job_details', '', 'mps_g_myworkinfo_job_details {cmpid},{useruid},{objid},''{key}',{minjbid}', '', '', '', 'int|int|bigint|nvarchar(50)|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_message', '', 'mps_g_myworkinfo_message {cmpid},{useruid},{objid},''{key}'', '', '', '', 'int|int|bigint|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_project', '', 'mps_g_myworkinfo_project {cmpid},{useruid},{objid},''{key}',{crmids},{category}', '', '', '', 'int|int|bigint|nvarchar(50)|varchar(2000)|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_risk', '', 'mps_g_myworkinfo_risk {cmpid},{useruid},{objid},''{key}'', '', '', '', 'int|int|bigint|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_task', '', 'mps_g_myworkinfo_task {cmpid},{useruid},{objid},''{key}',{allcount}', '', '', '', 'int|int|bigint|nvarchar(50)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_myworkinfo_task_details', '', 'mps_g_myworkinfo_task_details {cmpid},{useruid},{objid},''{type}','{key}',{minjbid}', '', '', '', 'int|int|bigint|nvarchar(50)|nvarchar(50)|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_newsource_biz', '', 'select biz_id,0 biz2_tag, biz_title biz_source,case when biz_subcategory>''' then biz_category+'/'+biz_subcategory+'/'+biz_title+'(主数据)' else biz_category+'/'+biz_title+'(主数据)' end biz_title2 from mps_biztype  with(nolock)  where biz_cmpid={cmpid} and biz_status>=0  union select distinct biz_id,biz2_tag, biz_title+'.'+biz2_caption biz_source , case when biz_subcategory>'' then biz_category+'/'+biz_subcategory+'/'+biz_title+'/'+biz2_caption else biz_category+'/'+biz_title+'/'+biz2_caption end biz_title2 from mps_biztype with(nolock) ,mps_biztype2  with(nolock)  where biz_cmpid={cmpid} and biz_status>=0 and biz2_bizid=biz_id   order by biz_title2', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_newsource_cst', '', 'select ct_tag,ct_id,ct_caption ,ct_type from mps_csttype with(nolock)  where ct_cmpid={cmpid} order by ct_tag , ct_type ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_newsource_equ', '', 'select ec_tag,ec_id,ec_caption ,ec_type from mps_equctg  with(nolock) where ec_cmpid={cmpid} and ec_father=0 order by ec_tag ,ec_type ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_newsource_prd', '', 'select pc_tag,pc_id,pc_caption ,pc_type from mps_prdctg with(nolock)  where pc_cmpid={cmpid} and pc_father=0 order by pc_tag ,pc_type ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_one_depart_info', '', 'select top 1 * from mps_template with(nolock)  where tmp_type = ''{type}' and tmp_caption = 'edit';select *,(select b.dp_depart from mps_depart  b  with(nolock)  where b.dp_id=a.dp_fdpid)  as dp_fdepart from mps_depart a  with(nolock) where dp_id={dpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ord_attach', '', 'select * from mps_attach with(nolock)  where da_cmpid={cmpid} and da_type=''biz'+{bizid} and da_objid={ordid} order by da_category , da_filename ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ord_browse_md', '', 'mps_g_ordbrowse_md {cmpid},{useradmin},{terminal},{useruid},{bizid}', '', '', '', 'int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ord_jobs_available', '', 'mps_g_ord_jobs_available {cmpid},{bizid},{ordid}', '', '', '', 'int|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ord_jobs_table', '', 'mps_g_ord_jobs_table {cmpid},{bizid},{ordid}', '', '', '', 'int|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ord_relations', '', 'mps_g_ord_relations {cmpid},{scrmid},{ordid},{rcrmid},{useruid},{pagesize},{pagecount},{pageobjids}', '', '', '', 'int|int|bigint|int|int|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_order_byno', '', 'mps_g_order_byno {cmpid},{bizid},{ordno}', '', '', '', 'int|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_order_pick_source', '', 'select * from mps_biztype_comefrom  with(nolock) where bs_bizid={bizid} and bs_ord2tag=0 and bs_sord2tag=0 and bs_popwin=0 order by  bs_scaption ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_order_pick_source_bizinfo', '', 'select a.* from mps_biztype_comefrom a with(nolock) ,mps_biztype with(nolock)  where bs_bizid={bizid} and bs_ord2tag=0 and bs_sord2tag=0 and bs_popwin=0 and biz_sourcebizids like ''%'+bs_stype+'.'+convert(varchar(10),bs_sbizid)+'=%' and biz_id={bizid} order by  bs_scaption ; select * from mps_biztype with(nolock)  where biz_id={bizid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_order_print_item', '', 'mps_g_order_print_item {cmpid},{bizid},{ordid},{jbid}', '', '', '', 'int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ot_level', '', 'select * from mps_title_grade  with(nolock) where tg_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pc_submenu', '', 'mps_g_pcsubmenu {cmpid},{roleid},{menutype},{terminal}', '', '', '', 'int|int|varchar(30)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pcsubmenu_config', '', 'select * from mps_menu  with(nolock) where mn_cmpid={cmpid} and mn_roleid={roleid} and mn_terminal = {terminal} and mn_flag=''{menutype}' order by mn_order', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_permission', '', 'mps_g_permission {cmpid},''{mptype}',{mpctgid},{mpgroup}', '', '', '', 'int|varchar(200)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pf_level', '', 'select * from mps_profession_grade  with(nolock) where bg_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pick_menutype', '', 'mps_g_pick_menutype {cmpid},''{mtype}'', '', '', '', 'int|varchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_picksource', '', 'mps_g_picksource {cmpid},{mybcid},{dpid},{useruid},{bizsid},{myctgid},{objid},''{key}',{onlyemp},'{extparam1}','{extparam2}','{extparam3}','{extparam4}','{extparam5}','{extparam6}','{extparam7}','{extparam8}','{extparam9}'', '', '', '', 'int|int|int|int|int|int|bigint|nvarchar(50)|int|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_picksource_bykey', '', 'mps_g_picksource_bykey {cmpid},{branchid},{userdpid},{useruid},''{objtype}',{objid},{objid2},'{sourcename}',{ordid},{ord2id},'{key}','{extparam1}','{extparam2}','{extparam3}','{extparam4}','{extparam5}','{extparam6}','{extparam7}','{extparam8}','{extparam9}',{objidname}', '', '', '', 'int|int|int|int|varchar(20)|int|int|nvarchar(50)|bigint|bigint|nvarchar(50)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_picksource_md', '', 'mps_g_picksource_md {cmpid},{objmc},{objid},{objid2},{datasource}', '', '', '', 'int|varchar{30)|int|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_picksource_value', '', 'mps_g_picksource_value {cmpid},{branchid},{userdpid},{useruid},{userotid},{objid},{ordid},{ord2tag},''{ord2group}',{bizsid},'{objids}'', '', '', '', 'int|int|int|int|int|bigint|bigint|int|nvarchar(50)|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pms_user_order', '', 'mps_g_pms_user_order {cmpid},''{objtype}',{ctgid},{objid},'{ptype}'', '', '', '', 'int|varchar(20)|int|bigint|varchar(20)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prd_browse_md', '', 'mps_g_prdbrowse_md {cmpid},{useradmin},{terminal},{useruid},{pctag},{pcid}', '', '', '', 'int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prd_content', '', 'mps_g_prd_content {cmpid},{useruid},{pctag},{pcid}', '', '', '', 'int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prd_relation', '', 'select distinct biz_id , biz_title from  mps_biztype  with(nolock) , mps_biztype_source with(nolock)   where biz_cmpid={cmpid} and bizs_bizid=biz_id and bizs_sourcetype=''prd' and (bizs_ctgid=500000000+{pcid} or bizs_ctgid=600000000+{pcid} or bizs_ctgid=700000000+{pcid} or bizs_ctgid=800000000+{pcid} or bizs_ctgid=100000000+{pctag} or bizs_ctgid=200000000+{pctag} or bizs_ctgid=300000000+{pctag} or bizs_ctgid=400000000+{pctag}) and bizs_ctg2id=0', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prd_tag', '', 'select distinct pc_tag , pc_caption from mps_prdctg with(nolock)  where pc_cmpid={cmpid} ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prdctg', '', 'select *,pc_tag as datagroup from mps_prdctg with(nolock)  where pc_cmpid={cmpid} order by pc_tag,pc_order,pc_level', 'prdctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prdctg_base', '', 'select * from mps_prdctg  with(nolock) where pc_id={id}', 'prdctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prdctg_detalis', '', 'mps_g_prdctg_details {cmpid},{pctag}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prdctg_one', '', 'select *,(select pc_type from mps_prdctg b with(nolock)  where b.pc_id = a.pc_father) as pc_ftype from mps_prdctg a with(nolock)  where a.pc_id = {nowpcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prdctg_tagbase', '', 'select top 1 * from mps_prdctg with(nolock)  where pc_cmpid={cmpid} and pc_tag={id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_prdtag', '', 'select distinct pc_tag,pc_caption from mps_prdctg  with(nolock) where pc_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_private_sql', '', 'select * from mps_privatesql with(nolock)  where ps_id={psid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_privategroup', '', 'select * from mps_privategroup  with(nolock) where pg_cmpid={cmpid} and ((pg_bcid={mybranchid}) or ({mybranchid}=0)) order by  pg_name ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_privategroup2', '', 'select * from mps_privategroup2  with(nolock) where pgd_pgid={mypgid} order by pgd_caption;select * from mps_privategroup with(nolock)  where pg_cmpid={cmpid} and pg_id={mypgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_privatesql_list', '', 'select * from mps_privatesql  with(nolock) where ps_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_product_by_tag', '', '[mps_g_product_by_pcid] {pcid},{pagesize},{pagecount},{pageobjids}', 'prdmanage', '', '', 'bigint|int|int|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_product_text', '', 'select * from mps_prd_text with(nolock)  where pt_prdid={prd_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_profession_grade', '', 'select * from mps_profession_grade  with(nolock) where bg_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_program_info', '', 'select * from mps_programtype with(nolock)  where pt_id={ptid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_program_ip', '', 'select * from mps_page_domain  with(nolock) where pd_cmpid={cmpid} and pd_prid={pageid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_program_list', '', 'select * from mps_programtype with(nolock)  where pt_cmpid={cmpid} and pt_program=0 and pt_fid={fptid} order by pt_caption ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_program_md', '', 'mps_g_systemprogram_md {cmpid},{useradmin},{terminal},{useruid},{programname}', '', '', '', 'int|int|int|int|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_program_tree', '', 'mps_g_program_tree {cmpid},{system}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pub_code', '', 'select bm_text,bm_text as bm_value from ebs_keynel.dbo.pub_code  with(nolock) where bm_ctg=''{ctgname}' order by bm_order , bm_text', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pub_code_list', '', 'select bm_ctg,bm_ctgcaption,COUNT(bm_id) as bm_count from ebs_kernel.dbo.pub_code  with(nolock) where bm_category=''{category}' group by bm_ctg,bm_ctgcaption', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pub_prg_form', '', 'exec mps_g_pub_prg_form {cmpid},{branchid},{userdpid},{useruid},{userotid},{useradmin},''{program}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_pubcode', '', 'select bm_text from ebs_kernel.dbo.pub_code  with(nolock) where bm_ctg=''{ctg}' order by bm_order , bm_text', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_report_category', '', 'select  distinct  case when rpt_categorysub=''' then rpt_category else rpt_category+'/'+rpt_categorysub end as rpt_title ,rpt_category,rpt_categorysub,rpt_order from mps_report with(nolock)  where rpt_cmpid={cmpid}  order by rpt_order asc', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_report_data', '', 'mps_g_report_data {cmpid},{branchid},{useruid},{userdpid},{userotid},{rpt_id},{rpt_data}', '', '', '', 'int|int|int|int|int|int|varchar(8192)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_report_detail', '', 'select * from mps_report  with(nolock) where rpt_id={rpt_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_report_display', '', 'mps_g_report_display {rpt_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_reports_bycategory', '', 'select rpt_id,rpt_title from mps_report with(nolock)  where rpt_category={rpt_category} and rpt_categorysub={rpt_categorysub} and rpt_title != '''', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_roles', '', 'select * from mps_role  with(nolock) where rl_cmpid={cmpid} order by rl_value ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_salecart', '', 'mps_g_salecart {cmpid},{useruid},{pagesize},{pagecount},{pageobjids},{maxid},{malltype}', '', '', '', 'int|int|int|int|nvarvhar(8000)|int|nvarchar(30)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_saleprd_details', '', 'select * from mps_saleprds with(nolock) where sp_id={spid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_saleprds_bigcategory', '', 'mps_g_saleprds_bigcategory {cmpid},{mycuid},{sptype}', '', '', '', 'int|int|nvarchar(30)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_saleprds_details', '', 'mps_g_saleprds_details {cmpid},{mycuid},{useruid},{sptype},{category1},{category2},{category3},{searchkey},{maxid}', '', '', '', 'int|int|int|nvarchar(30)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_saleprds_one_details', '', 'select * from mps_saleprds  with(nolock) where sp_id = {spid} and sp_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_security', '', 'select sc_caption , sc_security from mps_security with(nolock)  where sc_cmpid={cmpid} order by sc_security', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_select_login', '', 'mps_login_main {cmpid},''{username}','{pass}','{branch}',{type},'{ip}','{device}','{site}'', '', '', '', 'int|varchar(100)|varchar(100|varchar(30)|int|varchar(30)|varchar(30)|varchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_shop_area', '', 'select distinct  dp_province+case when dp_municipal=''' then '' else '/'+dp_municipal end +case when dp_county='' then '' else '/'+dp_county end dp_area,dp_province from mps_depart with(nolock)  where dp_cmpid={cmpid} and (dp_bcid={mybcid} or {mybcid}=0) and dp_isdepart>0 and dp_province>''', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_shop_power', '', 'select * from mps_fieldinfo with(nolock)  where fldi_cmpid={cmpid} and (fldi_tbname=''mps_shop' or fldi_tbname='mps_depart') and fldi_fieldname like 'dp_manager%' order by fldi_tbname,len(fldi_fieldname),fldi_fieldname ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_shopinfo', '', 'mps_g_shopinfo {cmpid},{model},''{province}','{municipal}','{county}','{type}',{bcid},{pagesize},{pagecount},'{pageobjids}'', '', '', '', 'bigint|bigint|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|bigint|int|int|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_shopmenu', '', 'mps_g_shopmenu {cmpid},{model},{bcid}', '', '', '', 'bigint|bigint|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_source_both_fields', '', 'mps_g_source_both_fields {cmpid},''{objtype}',{objid},{objid2},'{sourcename}','{fldss}'', '', '', '', 'int|varchar(20)|int|int|nvarchar(100)|varchar(2000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_source_info', '', 'mps_g_source_info {cmpid},{biztype},{bizid},{sourcename}', '获取当前数据源的所有信息，包括字段信息，PICKWIN参数', '', '', 'int|varchar(30)|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_sourcenames', '', 'select  * from mps_biztype_source  with(nolock) where bizs_type=''{biztype}' and bizs_bizid={bizid} order by bizs_sourcetype ', '获取某业务的所有数据源', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_sourcenames_nof_comefrm', '', 'mps_g_source_nof_comefrom {cmpid},{biztype},{bizid}', '获取某业务的所有数据源,不包括父、根级', '', '', 'int|varchar(10)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_sourcenamesbysrc', '', 'select  bizs_source bizs_display , bizs_source bizs_result,* from mps_biztype_source with(nolock)  where bizs_type=''{biztype}' and bizs_bizid={bizid} and bizs_sourcetype  like  '{sourcetype}'+'%' order by bizs_sourcetype ', '获取某业务的所有数据源,指定源类型', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_svcextsql', '', 'select * from ebs_kernel..pub_webservice  with(nolock) where svc_id = {svcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_sys_task', '', 'select auto_id,auto_cmpid,auto_type,auto_interval,auto_unit,auto_starttime,auto_webservice,auto_caption from mps_auto_import with(nolock)  where auto_cmpid={cmpid} and auto_type=''sys' order by auto_caption ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_tb_field_info', '', 'mps_g_tb_field_info {cmpid},''{biztype}',{bizid},{ord2tag},{forsystem}', '获取表的字段信息', '', '', 'int|varchar(50)|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_tb_field_info_2', '', 'select * from mps_fieldinfo  with(nolock) where fldi_cmpid={cmpid} and fldi_tbtype=''{biztype}' and fldi_tbid={bizid} and fldi_ord2tag={ord2tag} order by fldi_fieldname ;select distinct fldi_tbtype , fldi_tbid,fldi_ord2tag,fldi_tbname from mps_fieldinfo  with(nolock) where fldi_cmpid={cmpid} and fldi_tbtype='{biztype}'+'2'  and fldi_tbid={bizid} and {ord2tag}=0 and fldi_ord2tag>0 ', '获取表的字段信息', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_tb_field_info_maintain', '', 'mps_g_fieldinfo_maintain {cmpid},{tbtype},{tbid},{ord2tag}', '', '', '', 'int|varchar(20)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_template_info', '', 'select * from mps_template  with(nolock) where tmp_cmpid={cmpid} and tmp_type=''{type}' and tmp_objid={objid} and tmp_objid2={objid2} and tmp_caption='{tmpname}' and tmp_language='{tmplanguage}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_template_info_byrole', '', 'mps_g_category_bizinfo {cmpid},{useruid},{useradmin},''{category}',{mobile}', '', '', '', 'int|int|int|nvarchar(200)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_template_info_byrole_cst', '', 'mps_g_category_cstinfo {cmpid},{useruid},{useradmin},{cctag} ', '', '', '', 'int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_template_info_byrole_new', '', 'mps_g_category_bizinfo_new {cmpid},{useruid},{useradmin},''{category}',{mobile}', '', '', '', 'int|int|int|nvarchar(200)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_templates', '', 'mps_new_template {cmpid},''{tptype}',{objid},{objid2},'{tpcaption}'', '', '', '', 'int|varchar(10)|int|int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_title', '', 'select * from mps_title  with(nolock) where ot_cmpid={cmpid} order by ot_order ,ot_level', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_title_grade', '', 'select * from mps_title_grade with(nolock)  where tg_cmpid={cmpid} and (convert(varchar(3),tg_grade)=''{key}' or tg_caption like '%'+'{key}'+'%')  order by tg_grade ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_title_grade_nokey', '', 'select tg_grade,tg_caption,tg_id from mps_title_grade  with(nolock) where tg_cmpid={cmpid}  order by tg_grade desc', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_titlesusers', '', 'mps_g_titlesusers {cmpid},{myotid},''{key}' ', '', '', '', 'int|int|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_titlesusers_sql', '', 'mps_g_titlesusers_sql {cmpid},{myotid},''{key}' ,{bizsid},{extparam1},{extparam2},{extparam3},{extparam4},{extparam5},{extparam6},{extparam7},{extparam8},{extparam9}', '', '', '', 'int|int|nvarchar(200)|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_unconfirm_job', '', 'mps_g_unconfirm_job {cmpid},{useruid},{ordbcid},{bizid},{ordid}', '', '', '', 'int|int|int|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_ware_operation', '', 'mps_g_ware_operation {whid},{prdtag},{prdid},{pagesize},{pagecount},{pageobjids}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_warehouse', '', 'mps_g_warehouse {cmpid},{branchid},{pagesize},{pagecount},{pageobjids},{key}', '', '', '', 'int|int|int|int|varchar(8000)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_warehouse_all', '', 'select * from mps_warehouse with(nolock)  where wh_cmpid={cmpid} order by wh_bcid , wh_code', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_warehouse_my', '', 'select * from mps_warehouse with(nolock)  where wh_cmpid={cmpid} order by wh_bcid , wh_code', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_warehouse_mybc', '', 'select * from mps_warehouse  with(nolock) where wh_cmpid={cmpid} and wh_bcid={mybcid} order by wh_bcid , wh_code', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_warehouse_name', '', 'select wh_caption,wh_id   from mps_warehouse  with(nolock) where wh_cmpid={cmpid} order by wh_code ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_webservice', '', 'pub_g_webservice {cmpid},{pagesize},{pagecount},{pageobjids},{key}', '', '', '', 'int|int|int|varchar(8000)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_webservice_all', '', 'select svc_id,svc_cmpid,svc_name,svc_url,svc_method,svc_paramtype,svc_resulttype,svc_note,svc_language,''' svc_extsql ,svc_displayflds,svc_resultfld,svc_nextexecute,svc_cycle,svc_bizid,svc_biztype,svc_bizparams,svc_requesttype  from ebs_kernel.dbo.pub_webservice with(nolock)  where (svc_cmpid={cmpid} or svc_cmpid=0) and svc_displayflds>'' order by svc_name', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_appid', '', 'select wx_title,wx_appid from [ebs_kernel].[dbo].[pub_weixin] with(nolock)  where wx_code=''{wx_code}' and wx_type='QYH'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_comboboxsrc', '', 'mps_g_weixin_comboboxsrc {cmpid}', '生成下拉菜单', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_count', '', 'select * from [ebs_kernel].[dbo].[pub_weixin]  with(nolock) where wx_cmpid={cmpid} and wx_type=''{wx_type}'', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_countdetail', '', 'SELECT [wx_id],[wx_code],[wx_type],[wx_title],[wx_appid],[wx_token],[wx_aeskey],[wx_appsecret] FROM [ebs_kernel].[dbo].[pub_weixin] with(nolock)  where wx_id={wx_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_menu', '', 'select 1 menu_id,''img/wx.png'menu_img,'企业小助手'menu_text', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_navigationmenu', '', 'select * from mps_menu  with(nolock) where mn_cmpid={cmpid} and mn_flag=''head_state'+'{stateid}' and mn_terminal=1 and mn_roleid={roleid} order by mn_id', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_navigationmenus', '', 'g_weixin_navigationmenus {cmpid},{roleid},{stateid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_navigationsubmenu', '', 'select * from mps_menu  with(nolock) where mn_cmpid={cmpid} and mn_flag=''head_sub'+'{headerid}' and mn_terminal=1 and mn_roleid={roleid} order by mn_id', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_state', '', 'select *, (select count(*) from mps_weixinstate B  with(nolock) where A.wxs_id=B.wxs_sub) as wxs_subcount from mps_weixinstate A  with(nolock)  where wxs_cmpid={cmpid} and wxs_sub=0 and wxs_auto={wxs_auto} and wxs_wxid={wxs_wxid}', '获取微信state', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_state_detail', '', 'select * from mps_weixinstate with(nolock)  where wxs_id={wxs_id}', '获取单个state的相信信息', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_submenu', '', 'select * from mps_menu with(nolock)  where mn_flag like ''%_sub'+'{headid}' order by mn_group,mn_order', '获取微信子菜单', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_substate', '', 'select * from mps_weixinstate with(nolock)  where wxs_cmpid={cmpid} and wxs_auto=1 and wxs_sub={wxs_id}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixin_wxcode', '', 'select wx_title,wx_id,wx_code,wx_appid  from [ebs_kernel].[dbo].[pub_weixin]  with(nolock) where wx_cmpid={cmpid} and (wx_type=''QYH' or wx_type='GZH')', '获取当前公司微信公众号和微信企业号账号', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_weixinstate_bywxid', '', 'mps_g_weixinstate_bywxid {cmpid},{wx_id} ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_work_status', '', 'mps_g_work_status {wsid},{swrkid},{twrkid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_worktime', '', 'mps_g_worktime {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_wrk_free', '', 'mps_g_wrk_free {cmpid},{useruid},{wrkid},{ordid},{jbid}', '', '', '', 'int|int|int|bigint|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'g_wxtitle', '', '  select wx_code , min(case when wx_type=''DING' then '钉钉' when wx_type='QYH' then '微信企业号' else wx_title end ) wx_title   from [ebs_kernel].[dbo].[pub_weixin] with(nolock)  where wx_cmpid={cmpid} and (wx_type='DING' or wx_type='QYH' or wx_type='GZH') and wx_title>''   group by wx_code ', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'gen_biz_base_proc', '', 'mps_gen_biz_base_proc {cmpid},{bizid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'gen_employeeupdatearchsource', '', 'mps_gen_employeeupdatearchsource {cmpid},{bcid},{crtdpid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'gen_flowchart', '', 'mps_gen_flowchart {crmid},{flwid},''{newnodes}','{newlines}','{nodes}','{lines}'', '', '', '', 'int|int|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'gen_weixin_selectableapp', '', '[mps_gen_weixin_selectableapp] {cmpid},{type}', '', '', '', 'int|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'gensql_dpt_develop', '', 'mps_gen_dpt_base_proc {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'gensql_shp_develop', '', 'mps_gen_shp_base_proc {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'get_nextjob_info', '', 'mps_get_nextjob_info {cmpid},{useruid},{bizid},{ordid},{wrkid},{jbid},{wsid},{freewrkadvise}', '', '', '', 'int|int|int|bigint|int|bigint|int|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'get_subusers', '', 'select * from mps_employee with(nolock)  ,mps_employee_subusers with(nolock)  where cu_id = cs_subcuid  and {crtcuid} = cs_cuid', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'getaccount_local', '', 'mps_getaccount_local {cmpid},{accountdate},{acctype},{acccategory},{fid},{objid}', '', '', '', 'int|varchar(100)|varchar(100)|varchar(100)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'import_biz_details', '', 'mps_import_biz_details {cmpid},{branchid},{userdpid},{userotid},{useruid},{bizid},{ordid},{ord2tag},''{ord2group}','{keyflds}','{dataflds}','{datas}'', '', '', '', 'int|int|int|int|int|int|bigint|int|nvarchar(50)|varchar(500)|varchar(1000)|nvarchar(MAX)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'import_customer', '', 'mps_import_customer {cmpid},{branchid},{userdpid},{userotid},{useruid},{ctid},{allowupdate},{keyflds},{dataflds},{datas}', '', '', '', 'int|int|int|int|int|int|int|varchar(500)|varchar(1000)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'import_prd', '', 'mps_import_prd {cmpid},{branchid},{userdpid},{userotid},{useruid},{ctid},{allowupdate},{keyflds},{dataflds},{datas}', '', '', '', 'int|int|int|int|int|int|int|varchar(500)|varchar(1000)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'ins_biztype_query', '', 'mps_ins_biztype_query {cmpid},{bizid},{caption}', '', '', '', 'int|int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'ins_private_label', '', 'mps_ins_private_label {useruid},''{tbtype}',{objid},'{lbcids}'', '', '', '', 'int|varchar(10)|int|varchar(1000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'ins_source', '', 'mps_ins_source {cmpid},''{objtype}',{objid},{objid2},'{sourcename}','{sourcecaption}','{sourcefield}','{sobjtype}',{sobjid},{sobjid2},'{functionname}'', '', '', '', 'int|varchar(20)|int|int|nvarchar(200)|nvarchar(200)|varchar(50)|varchar(20)|int|int|varchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'insert_comment_like', '', 'mps_insert_forum_like {cmpid},{branchid},''{branchname}',{userdpid},'{userdepart}',{usertype},{useruid},'{username}',{like},{fmid}', '', '', '', 'int|int|nvarchar(200)|int|nvarchar(200)|int|int|nvarchar(200)|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'insert_decision', '', 'mps_insert_decision {bizid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'insert_forums', '', 'mps_insert_forum {cmpid},{branchid},''{branchname}',{userdpid},'{userdepart}',{usertype},{useruid},'{username}','{type}',{ctgid},{objid},{ffmid},'{content}','{attach}',{fffmid},{ebstag},'{userids}',{message}', '', '', '', 'int|int|nvarchar(200)|int|nvarchar(200)|int|int|nvarchar(200)|varchar(100)|int|int|int|nvarchar(2000)|nvarchar(2000)|bigint|int|varchar(max)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'insert_label', '', 'mps_insert_label {cmpid},''{lbtype}',{lbctgid}', '', '', '', 'int|varchar(10)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'load_line_code', '', 'mps_load_line_code {twsid},{swsid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mod_alarmtitle', '', 'update mps_alarm  with(rowlock) set alm_title=''{almtitle}' where alm_id={almid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mod_program_content', '', 'mps_mod_program_content {ptid},{pt_caption},{pt_category},{pt_subcategory},{pt_createtable},{pt_note},{pt_icon},{pt_querytime},{pt_share},{pt_hidemenu},{pt_hidemenu_mobile},{pt_merge},{pt_widget}', '', '', '', 'int|nvarchar(200)|nvarchar(100)|nvarchar(100)|int|nvarchar(500)|varchar(200)|int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mod_source', '', 'mps_update_source ''{objtype}',{objid},{objid2},'{sourcename}','{resultfields}','{displayfield}','{orderfields}','{wintitle}','{condition}',{multi},'{insertsql}','{pickjs}','{winwidth}'', '', '', '', 'varchar(20)|int|int|nvarchar(200)|varchar(1000)|nvarchar(4000)|varchar(200)|nvarchar(100)|nvarchar(4000)|int|nvarchar(4000)|nvarchar(4000)|varchar(20)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mod_source_name', '', 'update mps_biztype_source  with(rowlock) set bizs_source=''{sourcename}' where bizs_id={bizsid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mod_sys_event_caption', '', 'update mps_bizevent  with(rowlock) set evt_caption=''{tasktitle}' where evt_id={evtid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mod_sys_task_caption', '', 'update mps_auto_import with(rowlock)  set auto_caption=''{tasktitle}' where auto_id={autoid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'modify_flow', '', 'update mps_bizflow with(rowlock)  set flw_title=''{flwtitle}' where flw_id={flwid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'modify_template', '', 'update mps_template  with(rowlock) set tmp_caption=''{tpcaption}' where tmp_id={tmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_add_query', '', 'mps_add_query {cmpid},{bizid},{useruid},{bqid}', '', '', '', 'int|int|int|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_delete_label', '', 'delete from mps_biztype_query where bql_bizid={bizid} and bql_id={bqid} ', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_ding_addapps', '', 'mps_ding_addapps {useruid},''{conditions}'', '', '', '', 'int|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_ding_addappslist', '', 'mps_ding_addappslist {useruid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_import_depart_employee', '', 'mps_import_depart_employee {cmpid},{branchid},{userdpid},{userotid},{useruid},''{keyflds}','{dataflds}','{datas}'', '', '', '', 'int|int|int|int|int|varchar(500)|varchar(1000)|nvarchar(MAX)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_import_shop_employee', '', 'mps_import_shop_employee {cmpid},{branchid},{userdpid},{userotid},{useruid},''{keyflds}','{dataflds}','{datas}'', '', '', '', 'int|int|int|int|int|varchar(500)|varchar(1000)|nvarchar(MAX)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_myinfo_alter', '', 'mps_myinfo_alter  {gender},''{birth}','{qq}','{email}','{mobile}','{pass}','{addr}',{icon},{signs},{cmpid},{cuid},{bcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_query_conditions', '', 'exec mps_query_conditions {cmpid},{branchid},{bizid},{useradmin},{userdpstid},{userdpid},{userotid}', '', '', '', 'int|int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_query_mobile_orderselect', '', 'mps_query_mobile_orderselect {cmpid},{branchid},{bizid},{useruid},{useradmin},{userdpstid},{userdpid},{userotid},{mobile}', '', '', '', 'int|int|int|int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_query_orderselet', '', 'mps_query_orderselet {cmpid},{bizid},{useruid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_query_senior', '', 'select * from mps_biztype_query_senior where bqls_bqlid={bqlid} and bqls_bizid={bizid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_save_alarm', '', 'mps_save_alarm {almid},{alm_title},{alm_objtype},{alm_objid},{alm_objid2},{alm_category},{alm_tmpid},{alm_tmpcaption},{alm_tobizid},{alm_biztitle},{alm_createmode},{alm_sql}', '', '', '', 'int|nvarchar(100)|varchar(30)|int|int|nvarchar(100)|int|nvarchar(100)|int|nvarchar(100)|int|nvarchar(MAX)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_save_auto_import', '', 'mps_save_auto_import {cmpid},{autotype},{auto_interval},{auto_unit},{auto_starttime},{auto_webservice},{auto_sql},{auto_condsql}', '', '', '', 'int|varchar(20)|int|varchar(10)|datetime|varchar(50)|nvarchar(max)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_save_auto_import_byid', '', 'mps_save_auto_import_byid {autoid},{auto_interval},{auto_unit},{auto_starttime},{auto_webservice},{auto_sql},{auto_condsql}', '', '', '', 'int|int|varchar(10)|datetime|varchar(50)|nvarchar(max)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_save_biztype', '', 'mps_save_biztype {cmpid},{bizid},''{biz_category}','{biz_subcategory}','{biz_title}','{biz_order}','{biz_code}','{biz_icon}','{biz_database}',{biz_table},{biz_hidemenu},{biz_hidemenu_mobile},{biz_nomanualcreate},{biz_createinfather},{biz_onlysourcecreate},{biz_formstyle},'{biz_funcs}','{biz_flows}','{biz_params}' ,'{biz_sourcebizids}','{biz_groupfields}',{biz_querytime},'{biz_searchfields}',{biz_selectstyle},'{biz_selectfuncs}',{biz_viewscope},{biz_select},{biz_from},{biz_where},{biz_orderby},{biz_url}', '', '', '', 'int|int|nvarchar(100)|nvarchar(100)|nvarchar(100)|varchar(20)|nvarchar(100)|varchar(200)|varchar(50)|int|int|int|int|int|int|int|varchar(200)|nvarchar(1000)|varchar(500)|varchar(500)|varchar(200)|int|varchar(2000)|int|nvarchar(300)|int|nvarchar(4000)|nvarchar(2000)|nvarchar(4000)|nvarchar(2000)|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_save_biztype_1', '', 'mps_save_biztype_1 {bql_id},{bql_caption},{bql_sql},{bql_orderby},{bql_status},{bql_order},{bql_group}', '', '', '', 'int|nvarchar(100)|nvarchar(4000)|nvarchar(4000)|int|int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_save_event', '', 'mps_save_event {evtid},{evt_params},{evt_sql},{evt_note}', '', '', '', 'int|nvarchar(2000)|nvarchar(max)|nvarchar(2000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_save_senior', '', 'mps_save_senior {bqlid},{bizid},{blqs_select},{blqs_from},{blqs_where},{blqs_orderby}', '', '', '', 'int|int|varchar(4000)|varchar(4000)|varchar(4000)|varchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_sys_calc_employee_manager', '', 'mps_sys_calc_employee_manager {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'mps_updatecompany', '', 'mps_updatecompany {cmpid},''{cmp_fullname}','{cmp_type}','{cmp_tele}','{cmp_sddress}','{cmp_license}','{cmp_taxcode}','{cmp_master}','{cmp_mobile}','{cmp_www}','{cmp_sshy}','{cmp_qyxz}',{cmp_allowemptypass},'{cmp_viewurl}'', '修改公司信息', '', 'pub_company', 'int|nvarchar(100)|nvarchar(50)|varchar(30)|nvarchar(100)|varchar(50)|varchar(50)|nvarchar(50)|varchar(20)|varchar(100)|nvarchar(50)|nvarchar(50)|int|nvarchar(500)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'msg_read', '', 'update mps_alarm_message  with(rowlock) set almmsg_read=0 where almmsg_id={msgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'msg_remove', '', 'delete mps_alarm_message   with(rowlock) where almmsg_id={msgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_account_item', '', 'mps_new_account_item {cmpid},''{caption}','{code}'', '', '', '', 'int|nvarchar(100)|varchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_alarm', '', 'insert into mps_alarm(alm_cmpid,alm_title,alm_objtype,alm_objid,alm_objid2) values({cmpid},''{almtitle}','{objtype}',{objid},{objid2})', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_barn', '', 'mps_new_barn {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_biz', '', 'insert into mps_biztype(biz_cmpid,biz_category,biz_subcategory,biz_title,biz_code) values({cmpid},''{category}','{subcategory}','{biztitle}','B{YYYY}{YY}{MM}-{****:M}')', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_branch', '', 'mps_new_branch {cmpid},''{bc_code}','{bc_company}'', '', '', '', 'int|varchar(30)|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_codeall', '', 'mps_newcodeall   {cmpid},''{ctg}'', '', '', '', 'int|nvarchar(20)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_codemanagement', '', 'mps_newcodemanagement   {cmpid},''{ctg}','{smallctg}','{smallctgen}'', '', '', '', 'int|varchar(20)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_codemanagement_details', '', 'mps_newcodemanagementdetails   {cmpid},{ctg},{smallctg},{smallctgen}', '', '', '', 'int|varchar(20)|nvarchar(50)|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_cstctg', '', 'mps_new_cstctg {cmpid},''{ct_caption}'', '', '', '', 'int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_cstctg1', '', 'mps_new_cstctg1 {cmpid},{ct_tag},''{ct_type}'', '', '', '', 'int|int|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_dbconnection', '', 'pub_new_dbconnection {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_depart', '', 'mps_newdepart  {cmpid},{mybranchid},''{dp_code}','{dp_depart}'', '', '', '', 'int|int|varchar(20)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_depart_shop', '', 'mps_new_depart_shop {mybcid},{cmpid},{branchid},{userdpid},{useruid},{userotid}', '', '', '', 'int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_departstd', '', 'mps_newdepart_std {cmpid},''{dp_code}','{dp_depart}'', '', '', '', 'int|varchar(20)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_docctg', '', 'mps_new_docctg {cmpid},''{dc_caption}'', '', '', '', 'int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_docctg1', '', 'mps_new_docctg1 {cmpid},{dc_tag},''{dc_type}',{dc_level}', '', '', '', 'int|int|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_document', '', 'mps_new_document {cmpid},{useruid},{doctag},{dcid}', '', '', '', 'int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_employee', '', 'mps_new_employee  {cmpid},''{cu_code}','{cu_account}','{cu_pass}','{cu_name}',{cu_gender},'{cu_mobile}',{cu_dpid},'{cu_depart}',{cu_bcid},'{cu_birth}','{cu_email}','{cu_contact}','{cu_address}','{cu_major}','{cu_qq}',{cu_otid},{cu_function},'{cu_title}',{cu_managelevel},{cu_professionlevel},{cu_realationshipid},'{cu_ccphonenumber}'', '需更新', '', '', 'int|varchar(32)|varchar(32)|nvarchar(32)|nvarchar(50)|int|varchar(20)|int|nvarchar(50)|int|varchar(10)|varchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(30)|varchar(20)|int|int|varchar(30)|int|int|bigint|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_equctg', '', 'mps_new_equctg {cmpid},''{ec_caption}'', 'equctg', '', '', 'int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_equctg1', '', 'mps_new_equctg1 {cmpid},{ec_tag},''{ec_type}',{ec_level}', 'equctg', '', '', 'int|int|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_exportapi', '', 'mps_new_exportapi {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_extres', '', 'mps_new_extres {cmpid},''{etc_caption}'', 'ext_resource', '', '', 'int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_extres1', '', 'mps_new_extres1 {cmpid},{etc_tag},''{etc_type}',{etc_level}', 'ext_resource', '', '', 'int|int|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_fieldsinfo', '', 'mps_new_fieldsinfo {cmpid},''{tbtype}',{objid},{objid2},'{fldi_fieldname}','{fldi_fieldcaption}','{fldi_datatype}',{fldi_size},{fldi_decimal},'{fldi_default}'', 'int|varchar(10)|int|int|varchar(50)|nvarchar(100)|varchar(20)|int|int|nvarchar(100)', '', '', 'int|varchar(20)|int|int|varchar(50)|nvarchar(100)|varchar(20)|int|int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_loginrole', '', 'mps_new_loginrole {mcuid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_manage_grade', '', 'mps_new_manage_grade {cmpid},{mg_grade},{mg_caption}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_menu', '', 'mps_new_menu   {cmpid},{mn_roleid},{menutype},{terminal}', '', '', '', 'int|int|varchar(30)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_messagetemplate', '', 'mps_new_messagetemplate {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_mobileshare', '', 'mps_new_mobileshare {url}', '', '', '', 'varchar(500)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_prdctg', '', 'mps_new_prdctg {cmpid},''{pc_caption}'', 'prdctg', '', '', 'int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_prdctg_details', '', 'mps_new_prdctg_details {cmpid},{pc_tag},{pcfather},{ppcid},{pc_father},''{pc_type}','{pc_code}'', '', '', '', 'int|int|int|bigint|bigint|varchar(255)|varchar(255)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_prdctg1', '', 'mps_new_prdctg1 {cmpid},{pc_tag},''{pc_type}',{pc_level}', 'prdctg', '', '', 'int|int|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_privategroup', '', 'mps_new_privategroup {cmpid},{branchid},''{groupname}'', '', '', '', 'int|int|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_privatesql', '', 'mps_new_privatesql {cmpid},''{psname}'', '', '', '', 'int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_profession_grade', '', 'mps_new_profession_grade {cmpid},{bg_grade},{bg_caption}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_program_content', '', 'if (not exists(select pt_id from mps_programtype with(nolock)  where pt_cmpid={cmpid} and pt_caption=''{cttname}')) insert into mps_programtype(pt_cmpid,pt_caption,pt_fid,pt_program) values( {cmpid},'{cttname}',{fptid},{ptprogram})', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_report', '', 'mps_new_report {cmpid},{rpt_title},{rpt_category},{rpt_categorysub}', '', '', '', 'int|nvarchar(100)|nvarchar(100)|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_role', '', 'mps_new_role {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_saleprds_details', '', 'mps_new_saleprds_details {cmpid},{useruid},{branchid},{userdpid},''{sptype}',{pspid}', '', '', '', 'int|int|int|int|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_spdepart', '', 'mps_new_spdepart {pdpid},{cmpid},{branchid},{userdpid},{useruid},{userotid}', '', '', '', 'int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_sys_event', '', 'insert into mps_bizevent(evt_cmpid,evt_caption,evt_code) values({cmpid},''{eventtitle}','{eventcode}')', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_sys_task', '', 'insert into mps_auto_import(auto_cmpid,auto_caption,auto_type) values({cmpid},''{tasktitle}','sys')', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_title', '', 'mps_new_title {cmpid},''{ot_code}','{ot_title}','{ot_gradecaption}'', '', '', '', 'int|varchar(20)|nvarchar(50)|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_title_grade', '', 'mps_new_title_grade {cmpid},''{tg_grade}','{tg_caption}'', '', '', '', 'int|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_webservice', '', 'pub_new_webservice {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_weixin_app', '', '[mps_new_weixin_app] {wx_id},''{wx_title}',{wx_appid}', '', '', '', 'int|varchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_weixin_count', '', '[mps_newweixincount] {cmpid},''{wx_type}','{wx_title}'', '', '', '', 'int|varchar(100)|varchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_weixin_menuheader', '', 'mps_new_weixin_menuheader {cmpid},{roleid},{stateid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_weixin_state', '', 'mps_new_weixin_state {cmpid},{wxs_caption},{wxs_wxid},{parent},{wxs_auto}', '创建state', '', '', 'int|nvarchar(500)|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_weixin_subapp', '', 'mps_new_weixin_subapp {cmpid},{roleid},{headerid},{groupid}', '', '', '', 'int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_weixin_subgroup', '', 'mps_new_weixin_subgroup {cmpid},{roleid},{headerid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'new_weixin_submenuheader', '', 'mps_new_weixin_submenuheader {cmpid},{roleid},{headerid}', '', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'ord_1_g_1order', '', 'ord_1_g_1order {cmpid},{ordid},{useruid},{jbid}', '', '', '', 'int|bigint|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'ord_1_g_1order_top', '', 'ord_1_g_1order_top {cmpid},{ordid}', '', '', '', 'int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'ord_1_g_print', '', 'ord_1_g_print {ordid},{useruid},{jbid}', '', '', '', 'bigint|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'prd_base_proc', '', 'mps_gen_prd_base_proc {cmpid},{pcid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'proj_loaduserwithConditions', '', 'proj_loaduserwithConditions ''{conditions}',{ordid} ', '', '', '', 'nvarchar(1000)|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'q_ord_1details', '', 'mps_q_ord_1details  {cmpid},{bizid},{ordid},{ord2tag},''{ord2group}',{pagemysize} ', '', '', '', 'int|int|bigint|int|nvarchar(50)|int ', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_1title', '', 'mps_save_1title {myotid} , ''{ot_duty}' ,'{ot_flag}' , '{ot_note}'', '', '', '', 'int|nvarchar(200)|varchar(100)|text', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_account_date', '', 'update ebs_kernel.dbo.pub_company with(rowlock)  set cmp_accountdate=''{newdate}' ,cmp_accountday={newday}   where cmp_id={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_account_depart', '', 'mps_save_account_depart {mybcid},{mydpids},{myaiid}', '', '', '', '', 'int|varchar(1000)|int', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_adjustdepart', '', 'mps_save_adjustdepart {cmpid},{mybranchid},{dpids}', '', '', '', 'int|int|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_alldptinfo', '', 'mps_save_alldptinfo {dp_id},''{dp_code}','{dp_innercode}','{dp_depart}','{dp_fullname}',{dp_order},{dp_level},{dp_dpstdid},{dp_fdpid},{dp_ffdpid},{dp_foreign},'{dp_display}',{dp_hassub},{dp_salebudget},{dp_feebudget},'{dp_phone}','{dp_province}','{dp_municipal}','{dp_county}','{dp_location}','{dp_note}',{dp_etnum},{dp_plnum},'{dp_category1}','{dp_category2}','{dp_category3}',{dp_longitude},{dp_latitude},'{dp_opentime}','{dp_news}','{dp_status}','{dp_key}',{dp_isdepart},'{dp_managearea}','{dp_manager1}',{dp_mcuid1},'{dp_manager2}',{dp_mcuid2},'{dp_manager3}',{dp_mcuid3},'{dp_manager4}',{dp_mcuid4},'{dp_manager5}',{dp_mcuid5},'{dp_manager6}',{dp_mcuid6},'{dp_manager7}',{dp_mcuid7},'{dp_manager8}',{dp_mcuid8},'{dp_manager9}',{dp_mcuid9},'{dp_manager10}',{dp_mcuid10},{dp_use},{dp_mcuid},'{dp_manager}',{dp_dingid},{dp_dingbcid},{dp_fffdpid}', '', '', '', 'int|varchar(30)|varchar(20)|nvarchar(100)|nvarchar(200)|int|int|int|int|int|int|nvarchar(200)|int|int|int|varchar(30)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(100)|nvarchar(500)|int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|int|int|nvarchar(100)|nvarchar(200)|nvarchar(50)|varchar(100)|int|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|int|int|nvarchar(50)|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_allow_time', '', 'mps_save_allow_time {cmpid},''{objtype}', {objid},'{sqltext}','{worktime}','{week}','{days}','{times}'', '', '', '', 'int|varchar(10)|int|text|varchar(20)|varchar(50)|varchar(100)|varchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_authority_factor', '', 'mps_save_authority_factor {cmpid},{bizid},{condition}', '', '', '', 'int|int|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_bizcomefrom', '', 'mps_save_bizcomefrom {bsid},{bs_popwin},''{bs_sql}',{bs_ord2tag},{bs_newviaord2},{scrmmc},{tag2mc},{bs_displayfield},{bs_orderfields},{bs_wintitle},{bs_width},'{bs_js}',{bs_prevsql},{bs_tables},{bs_where}', '', '', '', 'int|int|nvarchar(4000)|int|int|nvarchar(100)|nvarchar(100)|nvarchar(4000)|varchar(200)|nvarchar(100)|varchar(20)|nvarchar(4000)|nvarchar(max)|nvarchar(1000)|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_bizcomefrom_1', '', 'mps_save_bizcomefrom_1 {bsid},''{bsf_tfldname}','{bsf_expression}',{bsf_method},'{bsf_datatype}'', '', '', '', 'int|nvarchar(50)|nvarchar(1000)|int|varchar(20)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_bizcomefrom_genproc', '', 'exec sys_gen_newbizbysrc {cmpid},{bizid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_biztype_auto', '', 'mps_save_biztype_auto {cmpid},{style},{bizid},{interval},{unit},{webservice},{starttime},{sql},{condsql}', '', '', '', 'int|int|int|int|varchar(10)|varchar(100)|datetime|nvarchar(max)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_branch', '', 'mps_save_branch {cmpid},{bc_id},{bc_order},''{bc_code}','{bc_company}'', '', '', '', 'int|int|int|varchar(30)|nvarchar(100)', 'bc_id', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_codemanage', '', 'mps_save_codemanage {bmid} , ''{bm_text}' ,{bm_order}', '', '', '', 'int|nvarchar(200)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_comefrom_newviaord2', '', 'mps_save_comefrom_newviaord2 {bsid},{newviaord2}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_comefrom_ord2tag', '', 'mps_save_comefrom_ord2tag {bsid},{ord2tag}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_crmtype_view', '', 'update mps_biztype  with(rowlock) set biz_views={myvalue} where biz_id={ctgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_cstctg_base', '', 'mps_save_cstctgbase {cmpid},{ct_id},{ct_bmcode},{ct_type},{ct_allowlogin},{ct_security},{ct_order},{ct_caption},{ct_icon},{ct_database},{ct_groupfields},{ct_status},{ct_querytime},{ct_searchfields},{ct_selectfuncs},{ct_selectstyle},{ct_funcs},{ct_flows},{ct_params},{ct_viewscope},{ct_views},{ct_select},{ct_from},{ct_where},{ct_orderby},{ct_loginscope}', '', '', '', 'int|int|varchar(50)|nvarchar(100)|int|int|int|nvarchar(50)|varchar(200)|varchar(50)|varchar(500)|int|int|varchar(2000)|nvarchar(500)|int|varchar(200)|nvarchar(2000)|varchar(500)|int|int|nvarchar(4000)|nvarchar(2000)|nvarchar(4000)|nvarchar(2000)|varchar(150)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_cstctg_caption', '', 'update mps_csttype with(rowlock)  set ct_caption=''{ct_caption}' where ct_cmpid={cmpid} and ct_tag={cctag}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_csttype_view', '', 'update mps_csttype with(rowlock)  set ct_views={myvalue} where ct_id={ctgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_dbconnection', '', 'pub_save_dbconnection {dc_id},{cmpid},''{dc_name}','{dc_connectionurl}','{dc_username}','{dc_password}','{dc_dbtype}'', '', '', '', 'int|int|varchar(255)|varchar(1024)|varchar(128)|varchar(128)|varchar(255)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_decision', '', 'mps_save_decision {bd_id},''{bd_caption}',{bd_order}', '', '', '', 'int|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_depart', '', 'mps_save_depart {cmpid},{dp_id},{mybcid},''{dp_code}','{dp_depart}',{dp_salebudget},{dp_feebudget},{dp_mcuid1},{dp_mcuid2},{dp_mcuid3},{dp_mcuid4},{dp_mcuid5},{dp_mcuid6},{dp_mcuid7},{dp_mcuid8},{dp_mcuid9},{dp_mcuid10},'{dp_manager1}','{dp_manager2}','{dp_manager3}','{dp_manager4}','{dp_manager5}','{dp_manager6}','{dp_manager7}','{dp_manager8}','{dp_manager9}','{dp_manager10}'', '', '', '', 'int|int|int|varchar(100)|nvarchar(100)|int|int|int|int|int|int|int|int|int|int|int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)', 'dp_id', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_depart_base', '', 'mps_save_depart_base {dp_id},{cmpid},{dp_code},{dp_depart},{dp_order}', '', '', '', 'int|int|varchar(30)|nvarchar(50)|int', 'dp_id', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_doc_exam', '', 'mps_save_doc_exam {content}', '', '', '', 'nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_doc_text', '', 'mps_save_doc_text {docid},''{content}','{abs}','{search}'', '', '', '', 'int|text|nvarchar(200)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_docctg_base', '', 'mps_save_docctgbase {cmpid},{dc_id},''{dc_code}','{dc_type}',{dc_share},{dc_security},{dc_powerlevel},{dc_querytime},{dc_viewscope},{dc_views},{dc_defaultquery},'{dc_keys}'', '', '', '', 'int|int|varchar(50)|nvarchar(100)|int|int|int|int|int|int|int|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_docctgcaption', '', 'update mps_docctg  with(rowlock) set dc_caption=''{dc_caption}' where dc_cmpid={cmpid} and dc_tag={dc_tag}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_document', '', 'mps_save_document {doc_id},''{doc_title}','{doc_abstract}','{doc_label}','{doc_similar}',{doc_security},'{doc_distroy}',{doc_deliver},{doc_attachi},'{doc_icon1}','{doc_icon2}','{doc_sourceurl}','{doc_source}','{doc_author}'', '', '', '', 'bigint|nvarchar(100)|nvarchar(200)|nvarchar(200)|nvarchar(200)|int|varchar(100)|int|int|varchar(200)|varchar(500)|varchar(500)|nvarchar(100)|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_document_answer', '', 'mps_save_document_answer {useruid},{docid},''{answer}'', '', '', '', 'int|int|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_equctg_base', '', 'mps_save_equctgbase {cmpid},{ec_id},{ec_bmcode},{ec_type},{ec_icon},{ec_share},{ec_keys},{ec_database},{ec_groupfields},{ec_security},{ec_order},{ec_querytime},{ec_full},{ec_searchfields},{ec_selectfuncs},{ec_selectstyle},{ec_funcs},{ec_flows},{ec_params},{ec_viewscope},{ec_views},{ec_select},{ec_from},{ec_where},{ec_orderby}', 'equctg', '', '', 'int|int|varchar(200)|nvarchar(100)|varchar(200)|int|nvarchar(4000)|varchar(50)|nvarchar(200)|int|int|int|nvarchar(500)|varchar(2000)|nvarchar(500)|int|varchar(200)|nvarchar(2000)|varchar(500)|int|int|nvarchar(4000)|nvarchar(2000)|nvarchar(4000)|nvarchar(2000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_equctg_browse', '', 'mps_save_equctgbrowse {cmpid},{ec_id},{ec_querytime},''{ec_groupfields}'', 'equctg', '', '', 'int|int|int|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_equctg_caption', '', 'update mps_equctg set ec_caption=''{ec_caption}' where ec_cmpid={cmpid} and ec_tag={ec_tag}', 'equctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_event_indexvalue', '', 'mps_save_event_indexvalue {ivid},{iv_type},{iv_caption},{iv_code},{iv_value},{iv_note},{iv_datatype},{iv_unit}', '', '', '', 'int|nvarchar(100)|nvarchar(100)|varchar(50)|nvarchar(1000)|nvarchar(2000)|varchar(20)|nvarchar(20)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_event_indexvalue_after', '', 'mps_save_event_indexvalue_after {cmpid}', '', '', '', 'int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_exportapi', '', 'mps_save_exportapi {exp_id},{cmpid},{exp_name},{exp_sql},{exp_language},{exp_result},{exp_allowip},{exp_allowtime}', '', '', '', 'int|int|varchar(255)|varchar(max)|varchar(255)|varchar(255)|varchar(2000)|varchar(1000)', 'exp_id', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_extres_base', '', 'mps_save_extresbase {cmpid},{etc_id},''{etc_code}','{etc_type}',{etc_share},'{etc_keys}'', 'ext_resource', '', '', 'int|int|varchar(50)|nvarchar(100)|int|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_extres_browse', '', 'mps_save_extresbrowse {cmpid},{etc_id},{etc_querytime},''{etc_groupfields}'', 'ext_resource', '', '', 'int|int|int|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_extres_caption', '', 'update mps_ext_resource set etc_caption=''{etc_caption}' where etc_cmpid={cmpid} and etc_tag={etc_tag}', 'ext_resource', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_extsqljs', '', 'mps_save_extsqljs {objid},{objid2},''{cdname}','{text}'', '', '', '', 'int|int|varchar(50)|text', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_fieldsinfo', '', 'mps_save_fieldsinfo {cmpid},''{tbtype}',{objid},{objid2},'{fldname}','{fldcaption}','{fldtype}',{fldsize},'{flddefault}'', '', '', '', 'int|varchar(10)|int|int|varchar(50)|nvarchar(100)|varchar(20)|int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_fieldsinfo_byid', '', 'mps_save_fieldsinfo_byid {fldid},''{fldi_fieldcaption}','{fldi_datatype}',{fldi_size},{fldi_decimal},'{fldi_default}'', '', '', '', 'int|nvarchar(100)|varchar(20)|int|int|nvarchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_flowchart_xml', '', 'mps_save_flowchart_xml {flwid},''{flwtitle}','{flwxml}'', '', '', '', 'int|nvarchar(100)|text', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_flowscope', '', 'mps_save_flowscope {cmpid},{flwid},''{scope}'', '', '', '', 'int|int|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_flowwork', '', 'mps_save_flowwork {wrkid},{wrk_code},{wrk_title},{wrk_shape},{wrk_limited},{wrk_limitedcaption},{wrk_icons},{wrk_type},{wrk_keyparams},{wrk_executor_num},{wrk_executor_group},{wrk_exec_start_msgid},{wrk_exec_start_msg},{wrk_exec_end_msgid},{wrk_exec_end_msg},{wrk_exec_back_msgid},{wrk_exec_back_msg},{wrk_audit_start_msgid},{wrk_audit_start_msg},{wrk_audit_end_msgid},{wrk_audit_end_msg},{wrk_audit_back_msgid},{wrk_audit_back_msg},{wrk_coop_start_msgid},{wrk_coop_start_msg},{wrk_coop_end_msgid},{wrk_coop_end_msg},{wrk_coop_back_msgid},{wrk_coop_back_msg},{wrk_view_start_msgid},{wrk_view_start_msg},{wrk_view_end_msgid},{wrk_view_end_msg},{wrk_view_back_msgid},{wrk_view_back_msg},{wrk_cst1_source},{wrk_cst1_start_msgid},{wrk_cst1_start_msg},{wrk_cst1_end_msgid},{wrk_cst1_end_msg},{wrk_cst1_back_msgid},{wrk_cst1_back_msg},{wrk_cst2_source},{wrk_cst2_start_msgid},{wrk_cst2_start_msg},{wrk_cst2_end_msgid},{wrk_cst2_end_msg},{wrk_cst2_back_msgid},{wrk_cst2_back_msg},{wrk_emp1_source},{wrk_emp1_start_msgid},{wrk_emp1_start_msg},{wrk_emp1_end_msgid},{wrk_emp1_end_msg},{wrk_emp1_back_msgid},{wrk_emp1_back_msg},{wrk_emp2_source},{wrk_emp2_start_msgid},{wrk_emp2_start_msg},{wrk_emp2_end_msgid},{wrk_emp2_end_msg},{wrk_emp2_back_msgid},{wrk_emp2_back_msg},{wrk_emp3_source},{wrk_emp3_start_msgid},{wrk_emp3_start_msg},{wrk_emp3_end_msgid},{wrk_emp3_end_msg},{wrk_emp3_back_msgid},{wrk_emp3_back_msg},{wrk_start},{wrk_start_caption},{wrk_prevwrkids},{wrk_status},{wrk_status_f},{wrk_status_ff},{wrk_status_r},{wrk_key},{wrk_key_f},{wrk_key_ff},{wrk_key_r},{wrk_log_start_msgid},{wrk_log_start_msg},{wrk_log_end_msgid},{wrk_log_end_msg},{wrk_log_back_msgid},{wrk_log_back_msg},{wrk_cst1_tag},{wrk_cst1_datasource},{wrk_cst2_tag},{wrk_cst2_datasource},{wrk_emp1_datasource},{wrk_emp2_datasource},{wrk_emp3_datasource},{wrk_other_datasource},{wrk_other_source},{wrk_other_start_msgid},{wrk_other_start_msg},{wrk_other_end_msgid},{wrk_other_end_msg},{wrk_other_back_msgid},{wrk_other_back_msg},{wrk_backstyle}', '', '', '', 'int|varchar(20)|nvarchar(100)|varchar(30)|decimal(18,4)|nvarchar(20)|varchar(200)|int|varchar(300)|int|int|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|decimal(18,4)|nvarchar(20)|varchar(1000)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|int|int|int|int|int|int|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_flowwork_auto', '', 'mps_save_flowwork_auto {cmpid},{wrkid},{interval},{unit},{webservice},{starttime},{sql},{condsql}', '', '', '', 'int|int|int|varchar(10)|varchar(100)|datetime|nvarchar(max)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_formscope', '', 'mps_save_formscope {cmpid},{tmpid},''{scope}',{mdindex},{mdwrks}', '', '', '', 'int|int|nvarchar(4000)|int|varchar(1000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_group_fields', '', 'update mps_biztype with(rowlock)  set biz_groupfields=''{groupkeys}' , biz_querytime={querytime} where biz_id={bizid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_label', '', 'mps_save_label {lbcid},''{lbc_category}','{lbc_group}','{lbc_name}',{lbc_flag},'{lbc_sql}','{lbc_pickvalues}',{lbc_browse}', '', '', '', 'int|nvarchar(50)|nvarchar(50)|nvarchar(50)|int|nvarchar(4000)|nvarchar(4000)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_link_data', '', 'mps_save_link_data {wsd_wsid},{wsd_tobjtype},{wsd_tobjid},{wsd_tobjid2},{wsd_sord2tag},{wsd_updatesql},{wsd_sql},{wsd_keyfield}', '', '', '', 'int|varchar(20)|int|int|int|nvarchar(max)|nvarchar(max)|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_link_date_clear', '', 'update  mps_flowworkstatus_data with(rowlock)  set wsd_use=1 where wsd_wsid={wsid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_manage_grade', '', 'mps_save_manage_grade {mg_id},{mg_grade},{mg_caption}', '', '', '', 'int|int|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_permission', '', 'mps_save_permission {cmpid},''{mdtype}',{ctgid},{group},'{value}','{caption}',{byorder}', '', '', '', 'int|varchar(20)|int|int|varchar(50)|nvarchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_permission_sql', '', 'mps_save_permission_sql {mpid},''{mpsql}'', '', '', '', 'int|nvarchar(2000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_pms_any_order', '', 'mps_save_pms_any_order {cmpid},''{objtype}',{ctgid},{objid},'{ptype}','{values}'', '', '', '', 'int|varchar(20)|int|bigint|varchar(20)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_pms_user_order', '', 'mps_save_pms_user_order {cmpid},''{objtype}',{ctgid},{objid},'{ptype}','{cuids}'', '', '', '', 'int|varchar(20)|int|bigint|varchar(20)|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_prdctg_base', '', 'mps_save_prdctgbase {pc_id},{cmpid},{pc_father},''{pc_bmcode}','{pc_type}','{pc_code}','{pc_icon}',{pc_share},'{pc_keys}','{pc_database}','{pc_groupfields}',{pc_security},{pc_order},{pc_querytime},'{pc_full}','{pc_searchfields}','{pc_selectfuncs}',{pc_selectstyle},'{pc_funcs}','{pc_flows}','{pc_params}',{pc_viewscope},{pc_views},'{pc_select}','{pc_from}','{pc_where}','{pc_orderby}','{pc_taggroupfields}',{pc_tagquerytime},'{pc_tagsearchfields}',{pc_tagselectstyle},'{pc_tagselect}','{pc_tagfrom}','{pc_tagwhere}','{pc_tagorderby}'', 'prdctg', '', '', 'int|int|int|varchar(200)|nvarchar(100)|nvarchar(250)|varchar(200)|int|nvarchar(4000)|varchar(50)|nvarchar(200)|int|int|int|nvarchar(500)|varchar(2000)|nvarchar(500)|int|varchar(200)|nvarchar(2000)|varchar(500)|int|int|nvarchar(4000)|nvarchar(2000)|nvarchar(4000)|nvarchar(2000)|nvarchar(200)|int|varchar(2000)|int|nvarchar(4000)|nvarchar(2000)|nvarchar(4000)|nvarchar(2000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_prdctg_browse', '', 'mps_save_prdctgbrowse {cmpid},{pc_id},{pc_querytime},''{pc_groupfields}'', 'prdctg', '', '', 'int|int|int|nvarchar(200)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_prdctg_caption', '', 'update mps_prdctg with(rowlock)  set pc_caption=''{pc_caption}' where pc_cmpid={cmpid} and pc_tag={pc_tag}', 'prdctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_prdctg_view', '', 'update mps_prdctg with(rowlock)  set pc_views={myvalue} where pc_id={ctgid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_privatesql', '', 'mps_save_privatesql {cmpid},{psid},''{pssql}','{pscond}'', '', '', '', 'int|int|nvarchar(4000)|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_profession_grade', '', 'mps_save_profession_grade {bg_id},{bg_grade},{bg_caption}', '', '', '', 'int|int|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_program_ip', '', 'mps_save_program_ip {cmpid},{pageid},''{allows}','{forbids}'', '', '', '', 'int|int|varchar(4000)|varchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_saleprds_details', '', 'mps_save_saleprds_details {sp_id},{cmpid},{useruid},{branchid},{userdpid},{sp_type},{sp_prdid},{sp_category1},{sp_category2},{sp_category3},{sp_code},{sp_caption},{sp_brand},{sp_model},{sp_spec},{sp_color},{sp_unit},{sp_pack},{sp_ext},{sp_amount},{sp_price},{sp_score},{sp_key},{sp_click},{sp_sale},{sp_limited},{sp_price0},{sp_additional},{sp_special},{sp_status},{sp_use},{sp_order},{sp_begin},{sp_end},{sp_tag},{sp_pcid},{sp_icon},{sp_text}', '', '', '', 'int|int|int|int|int,|nvarchar(100)|bigint|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(100)|nvarchar(50)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(20)|nvarchar(100)|nvarchar(100)|int|decimal(18,2)|int|varchar(30)|int|int|int|decimal(18,2)|nvarchar(500)|nvarchar(500)|nvarchar(20)|int|int|datetime|datetime|int|int|varchar(200)|nvarchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_selects_into_datalinker', '', 'mps_save_selects_into_datalinker {cmpid},{useruid},{objids}', '', '', '', 'int|int|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_shopconfig', '', 'mps_save_shopconfig {dp_id},''{dp_code}','{dp_innercode}','{dp_depart}','{dp_fullname}',{dp_order},{dp_level},{dp_dpstdid},{dp_fdpid},{dp_ffdpid},{dp_foreign},'{dp_display}',{dp_hassub},{dp_salebudget},{dp_feebudget},'{dp_phone}','{dp_province}','{dp_municipal}','{dp_county}','{dp_location}','{dp_note}',{dp_etnum},{dp_plnum},'{dp_category1}','{dp_category2}','{dp_category3}',{dp_longitude},{dp_latitude},'{dp_opentime}','{dp_news}','{dp_status}','{dp_key}',{dp_isdepart},'{dp_managearea}','{dp_manager1}',{dp_mcuid1},'{dp_manager2}',{dp_mcuid2},'{dp_manager3}',{dp_mcuid3},'{dp_manager4}',{dp_mcuid4},'{dp_manager5}',{dp_mcuid5},'{dp_manager6}',{dp_mcuid6},'{dp_manager7}',{dp_mcuid7},'{dp_manager8}',{dp_mcuid8},'{dp_manager9}',{dp_mcuid9},'{dp_manager10}',{dp_mcuid10},{dp_use},{dp_mcuid},'{dp_manager}'', '', '', '', 'int|varchar(30)|varchar(20)|nvarchar(100)|nvarchar(200)|int|int|int|int|int|int|nvarchar(200)|int|int|int|varchar(30)|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(100)|nvarchar(500)|int|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|int|int|nvarchar(100)|nvarchar(200)|nvarchar(50)|varchar(100)|int|nvarchar(50)|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|int|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_subselectedusers', '', 'mps_save_subselectedusers {crtcuid},''{crtsubuserids}'', '', '', '', 'int|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_svcextsql', '', 'pub_gen_webservice_proc {cmpid},{svcid},''{extsql}','{prevsql}'', '', '', '', 'int|int|varchar(max)|varchar(max)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_template', '', 'mps_save_template {cmpid},''{type}',{objid},{objid2},{terminal},'{tmpname}','{texttype}','{tmplanguage}','{text}','{jssql}','{parsesql}','{advtext}'', '', '', '', 'int|varchar(10)|int|int|int|nvarchar(100)|varchar(10)|varchar(20)|text|varchar(8000)|text|nvarchar(4000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_title', '', 'mps_save_title {cmpid},{ot_id},''{ot_code}','{ot_title}',{ot_grade},'{ot_gradecaption}',{order}', '', '', '', 'int|int|varchar(20)|nvarchar(50)|int|nvarchar(50)|int', 'ot_id', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_title_grade', '', 'mps_save_title_grade {tg_id},{tg_grade},''{tg_caption}'', '', '', '', 'int|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_to_ord_users', '', 'mps_save_to_ord_users {cmpid},{bizid},{rscid},{rsc2id},{objids}', '', '', '', 'int|int|bigint|bigint|varchar(8000)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_warehouse', '', 'mps_save_warehouse {whid},{cmpid},{wh_code},{wh_caption},{wh_bcid},{wh_dpid},{wh_location},{wh_longitude},{wh_latitude},{wh_outstyle},{wh_feestyle}', '', '', '', 'int|int|nvarchar(50)|nvarchar(50)|int|int|nvarchar(50)|decimal(18,9)|decimal(18,9)|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_webservice', '', 'pub_save_webservice {svcid},''{svc_name}','{svc_url}','{svc_method}','{svc_paramtype}','{svc_resulttype}','{svc_requesttype}','{svc_language}','{svc_cycle}','{svc_extsql}',{svc_bizid},'{svc_biztype}','{svc_displayflds}','{svc_resultfld}'', '', '', '', 'int|nvarchar(50)|nvarchar(1000)|nvarchar(2000)|nvarchar(1000)|nvarchar(1000)|varchar(255)|varchar(30)|varchar(50)|nvarchar(max)|int|nvarchar(50)|nvarchar(500)|varchar(100)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_webservice_biz', '', 'update ebs_kernel..pub_webservice with(rowlock)  set svc_bizid={bizid} , svc_biztype=''{biztype}' where svc_id={svcid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_webservice_schema', '', 'mps_save_webservice_schema {svcid},{cmpid},{cycle},{nextexecute}', '', '', '', 'int|int|varchar(50)|datetime', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_wrk_bizrelation', '', 'update mps_flowwork with(rowlock)  set wrk_bizrelation=''{bizrelation}' where wrk_id={wrkid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'save_wrklink_bizrelation', '', 'update mps_flowworkstatus with(rowlock)  set ws_bizrelation=''{bizrelation}' where ws_id={wsid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'sys_gen_joblink_updatedata_all', '', 'sys_gen_joblink_updatedata_all {cmpid},{bizid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_account_branch', '', 'mps_up_account_branch {bcid},{aiid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_account_branch_delete', '', 'update mps_account_branch  with(rowlock) set aib_use=1 where aib_bcid = {bcid} and aib_aiid = {aiid};UPDATE a  SET aib_use=1 FROM mps_account_branch a right JOIN (select * from mps_account_item where ai_faiid = {aiid} or ai_faiid={aiid}) as b ON a.aib_bcid = {bcid} and a.aib_aiid = b.ai_id', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_account_item_level', '', 'update mps_account_item with(rowlock)  set ai_level={level} where ai_id={aiid};exec mps_update_account_item_info {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_account_item_order', '', 'mps_update_account_item_order {ai_id},{ai_order}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_advertisement', '', 'update mps_advertisement  with(rowlock) set ad_interval={interval},ad_width=''{width}',ad_height='{height}',ad_source='{adsource}' where ad_id={adid} and ad_cmpid={cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_attach_viewdn', '', 'mps_up_attach_viewdn {cmpid},{useruid},{operation},{daid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_branch_level', '', 'update mps_branch  with(rowlock) set bc_level={level} where bc_id={mybcid};exec mps_update_branchinfo {cmpid}', '更新分公司表level及显示信息', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_decision_level', '', 'update mps_biztype_decision with(rowlock)   set bd_level={level} where bd_id={bdid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_doc_share', '', 'update mps_document set doc_share += 1 where doc_cmpid={cmpid} and doc_id = {docid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_docctg_level', '', 'update mps_docctg  with(rowlock) set dc_level={level} where dc_id={mydcid};exec mps_update_docctginfo {cmpid},{mytag}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_dp_level', '', 'update mps_depart with(rowlock)   set dp_level={level} where dp_id={mydpid};exec mps_update_departinfo {cmpid},{mybcid}', '更新部门表level及显示信息', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_dpstd_level', '', 'update mps_depart_base with(rowlock)  set dp_level={level} where dp_id={mydpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_employee', '', 'mps_update_employee {cu_id},{cu_cmpid},{cu_bcid},{cu_branch},{cu_dpid},{cu_depart},{cu_fastkey},{cu_code},{cu_account},{cu_star},{cu_gender},{cu_security},{cu_function},{cu_name},{cu_mobile},{cu_contact},{cu_nation},{cu_address},{cu_post},{cu_position},{cu_qq},{cu_identtype},{cu_identno},{cu_email},{cu_otid},{cu_title},{cu_duty},{cu_party},{cu_origin},{cu_academic},{cu_height},{cu_major},{cu_college},{cu_graduate},{cu_degrees},{cu_marriage},{cu_entrytime},{cu_dimission},{cu_salary},{cu_status},{cu_login},{cu_icon},{cu_sign},{cu_birth},{cu_use},{cu_relationshipobj1},{cu_managelevel},{cu_professionlevel},{cu_ccphonenumber}', '', '', '', 'int|int|int|nvarchar(50)|int|nvarchar(50)|varchar(50)|varchar(32)|varchar(32)|int|int|int|int|nvarchar(50)|varchar(20)|nvarchar(100)|nvarchar(30)|nvarchar(100)|varchar(6)|nvarchar(30)|varchar(20)|nvarchar(10)|varchar(18)|varchar(100)|int|nvarchar(50)|nvarchar(50)|nvarchar(50)|nvarchar(30)|nvarchar(30)|int|nvarchar(30)|nvarchar(50)|datetime|nvarchar(30)|nvarchar(10)|datetime|datetime|int|nvarchar(10)|int|int|int|varchar(10)|int|bigint|int|int|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_employee_cucuse', '', 'mps_up_employee_cucuse {cuuse},{cuid}', '', '', '', 'int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_employee_pass', '', 'update mps_login with(rowlock)  set cu_pass = ''{pass}' where cu_objid={cuid} and cu_cmpid={cmpid} and cu_type=0', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_equctg_level', '', 'update mps_equctg  with(rowlock) set ec_level={level} where ec_id={myecid};exec mps_update_equctginfo {cmpid},{mytag}', 'equctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_extres_level', '', 'update mps_ext_resource set etc_level={level} where etc_id={myetcid};exec mps_update_extresinfo {cmpid},{mytag}', 'ext_resource', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_login_set', '', 'mps_up_login_set {cmpid},''{cmp_login_bg}','{cmp_login_title}',{cmp_login_model},'{cmp_login_picture}'', '', '', '', 'int|varchar(255)|nvarchar(255)|int|varchar(255)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_messagetemplate', '', 'mps_up_messagetemplate {mp_id},{cmpid},{mp_name},{mp_caption},{mp_gzhincode},{mp_dayuincode},{mp_gzhtext},{mp_qyhtext},{mp_dingtext},{mp_dayutext},{mp_pctext},{mp_gzhid},{mp_qyhid},{mp_dingid},{mp_dayuid},{mp_gzhpreview},{mp_qyhpreview},{mp_dingpreview},{mp_dayupreview},{mp_pcpreview},{mp_scope},{mp_sign}', '', '', '', 'int|int|varchar(30)|nvarchar(50)|varchar(50)|varchar(50)|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)|int|int|int|int|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)|nvarchar(4000)|varchar(20)|varchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_mobilelogin_set', '', 'mps_up_mobilelogin_set {cmpid},''{mls_title}','{mls_bgimg}',{mls_style},{mls_wxsid}', '', '', '', 'int|varchar(255)|nvarchar(255)|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_pcmenu_set', '', 'mps_up_pcmenu_set {cmpid},''{mn_title}','{mn_link}',{mn_order},'{mn_icon}',{mn_sub},{mn_id}', '', '', '', 'int|varchar(255)|nvarchar(255)|int|varchar(255)|int|bigint', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_pcmenu_sub', '', 'update mps_menu  with(rowlock)  set mn_sub={mn_sub} where mn_id={mn_id} and mn_cmpid = {cmpid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_prd_use', '', 'update mps_prd with(rowlock)  set prd_use = {type} where prd_cmpid = {cmpid} and prd_id = {prdid}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_prdctg_level', '', 'update mps_prdctg with(rowlock)  set pc_level={level} where pc_id={mypcid};exec mps_update_prdctginfo {cmpid},{mytag}', 'prdctg', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_role_menu_order', '', 'mps_update_role_menu_order {cmpid},{mn_id},{mn_order}', '更新菜单顺序', '', '', 'int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_subtable', '', 'mps_up_subtable_info ''{objtype}',{objid},'{values}','{ffrsource}'', '', '', '', 'varchar(10)|int|nvarchar(4000)|nvarchar(500)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_title_level', '', 'update mps_title  with(rowlock)  set ot_level={level} where ot_id={myotid};exec mps_update_titleinfo {cmpid}', '更新级别表level及显示信息', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_weixin_bind', '', '[mps_update_weixin_bind] {cmpid},''{account}','{pass}','{type}','{code}','{userid}'', '', '', '', 'int|varchar(50)|varchar(50)|varchar(10)|varchar(64)|varchar(64)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_weixin_count', '', '[mps_update_weixin_count] {wx_id},{cmpid},''{wx_code}','{wx_type}','{wx_title}','{wx_appid}','{wx_token}','{wx_aeskey}','{wx_appsecret}'', '', '', '', 'int|int|varchar(32)|varchar(10)|nvarchar(100)|int|varchar(64)|varchar(64)|varchar(64)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_weixin_menu', '', 'mps_update_weixin_menu {mn_id},{mn_title},{mn_link},{mn_sub},{mn_icon},{mn_iconover},{mn_order}', '更新微信菜单', '', '', 'int|varchar(200)|varchar(500)|int|varchar(100)|varchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_weixin_qyh', '', '[mps_update_weixin_qyh] {cmpid},{wx_id},''{wx_code}','{wx_title}','{wx_appid}','{wx_token}','{wx_aeskey}','{wx_appsecret}'', '', '', '', 'int|int|varchar(32)|nvarchar(100)|int|varchar(64)|varchar(64)|varchar(64)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_weixin_state', '', 'mps_update_weixin_state {wxs_id},{wxs_code},{wxs_caption},{wxs_value},{wxs_qyh},{wxs_gzh},{wxs_ding}', '', '', '', 'int|varchar(100)|nvarchar(500)|nvarchar(500)|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_weixin_subapp', '', 'mps_update_weixin_subapp {mn_id},''{mn_title}','{mn_icon}','{mn_link}',{mn_order}', '', '', '', 'int|varchar(200)|varchar(100)|varchar(500)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_weixin_subgroup', '', 'mps_update_weixin_subgroup {mn_id},''{mn_title}','{mn_icon}','{mn_layout}'', '', '', '', 'int|varchar(200)|varchar(100)|varchar(10)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'up_workstatus', '', 'mps_up_workstatus {wsid},{swrkid},{twrkid},''{nodetitle}','{condition}','{ws_pickvalues}','{ws_status}','{ws_status_f}','{ws_status_ff}','{ws_status_r}','{ws_key}','{ws_key_f}','{ws_key_ff}','{ws_key_r}','{ws_prevwrkids}','{ws_fjbstatus}',{ws_accsource},{ws_acctype},{ws_accdate},{ws_accobjtype},{ws_accobj},{ws_accfid},{ws_accmethod},{ws_accvalue},{ws_accsuspend},{ws_accsql},{ws_tosubflow},{ws_whsource},{ws_whprdtag},{ws_whprd},{ws_whunit},{ws_whbatch},{ws_whbarn1},{ws_whbarn2},{ws_whmethod},{ws_whvalue},{ws_whprev},{ws_whprice},{ws_whlocation},{ws_whnote},{ws_whexpire},{ws_whsql},{ws_exec_end_msgid},{ws_exec_end_msg},{ws_audit_end_msgid},{ws_audit_end_msg},{ws_coop_end_msgid},{ws_coop_end_msg},{ws_view_end_msgid},{ws_view_end_msg},{ws_log_end_msgid},{ws_log_end_msg},{ws_cst1_tag},{ws_cst1_datasource},{ws_cst1_source},{ws_cst1_end_msgid},{ws_cst1_end_msg},{ws_cst2_tag},{ws_cst2_datasource},{ws_cst2_source},{ws_cst2_end_msgid},{ws_cst2_end_msg},{ws_emp1_datasource},{ws_emp1_source},{ws_emp1_end_msgid},{ws_emp1_end_msg},{ws_emp2_datasource},{ws_emp2_source},{ws_emp2_end_msgid},{ws_emp2_end_msg},{ws_emp3_datasource},{ws_emp3_source},{ws_emp3_end_msgid},{ws_emp3_end_msg},{ws_other_datasource},{ws_other_source},{ws_other_end_msgid},{ws_other_end_msg}', '', '', '', 'int|int|int|nvarchar(50)|nvarchar(4000)|nvarchar(1000)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|nvarchar(20)|varchar(1000)|nvarchar(20)|int|varchar(10)|varchar(50)|varchar(10)|varchar(50)|varchar(50)|int|varchar(50)|varchar(50)|nvarchar(1000)|int|int|int|varchar(50)|varchar(50)|varchar(50)|varchar(50)|varchar(50)|int|varchar(50)|varchar(50)|varchar(50)|varchar(50)|varchar(50)|varchar(50)|nvarchar(1000)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|int|nvarchar(50)|int|nvarchar(50)|int|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_account_branch', '', 'mps_update_account_branch {bcid},{aiid},{aib_id},{aib_ownerdpid},{aib_budget}', '', '', '', 'int|int|bigint|bigint|int', 'aib_id', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_account_item', '', 'mps_update_account_item {ai_id},''{ai_caption}','{ai_code}','{oldname}',{faiid}', '', '', '', 'bigint|nvarchar(200)|varchar(100)|nvarchar(200)|bigint', 'ai_id', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_doc_readcount', '', 'mps_up_doc_readinfo {docid},{branchid},''{branchname}',{userdpid},'{userdepart}',{useruid},'{username}',{docv_click},{docv_read},{docv_like},{cmpid}', '', '', '', 'bigint|int|nvarchar(50)|int|nvarchar(50)|int|nvarchar(50)|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_doc_showinfo', '', 'update_doc_showinfo {docid},{branchid},{userdpid},{useruid},{cmpid},{value}', '', '', '', 'bigint|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_employeepassword', '', 'mps_update_employeepassword {useruid},{oldpass},{newpass}', '', '', '', 'int|nvarchar(32)|nvarchar(32)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_holiday', '', 'update mps_holidays  with(rowlock) set hd_holiday={hd_holiday} where hd_cmpid={cmpid} and hd_date={hd_date}', '', '', '', '', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_loginrole', '', 'mps_update_loginrole {lgu_id},{lgu_cuid},{lgu_bcid},{lgu_dpid},{lgu_otid},{lgu_function},{lgu_managelevel},{lgu_professionlevel}', '', '', '', 'int|int|int|int|int|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_product_base', '', 'mps_update_product_base {cmpid},{prd_id},{useruid},{prd_pcid},''{prd_code}','{prd_barcode}','{prd_title}','{prd_icon1}','{prd_icon2}','{prd_factory}','{prd_supplier}','{prd_model}','{prd_spec}','{prd_bacth}','{prd_pack}','{prd_brand}','{prd_area}','{prd_unit}','{prd_abstract}','{prd_label}','{prd_productdate}',{prd_expireddays},'{prd_price}',{prd_attachi},'{prd_attaches}',{prd_security}', '', '', '', 'int|int|int|int|varchar(32)|varchar(32)|nvarchar(100)|varchar(200)|varchar(200)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(50)|nvarchar(200)|nvarchar(200)|varchar(50)|int|varchar(50)|int|varchar(100)|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_product_text', '', 'mps_update_product_text {prd_id},''{prd_text}'', '', '', '', 'bigint|text', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_report', '', ' mps_update_report {rpt_id},{cmpid},{rpt_title},{rpt_category},{rpt_categorysub},{rpt_icon},{rpt_interval},{rpt_order},{rpt_note},{rpt_template},{rpt_labels},{rpt_labeloperation},{rpt_sql},{rpt_url},{rpt_accesscount},{rpt_hidemenu},{rpt_hidemenu_mobile},{rtp_widget}', '', '', '', 'int|int|nvarchar(100)|nvarchar(100)|nvarchar(100)|nvarchar(200)|int|varchar(30)|nvarchar(2000)|nvarchar(200)|nvarchar(1000)|nvarchar(1000)|nvarchar(max)|nvarchar(200)|bigint|int|int|int', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_role', '', 'mps_update_role {rl_value},{cmpid},{rl_system},''{rl_title}','{rl_note}'', '', '', '', 'int|int|int|varchar(100)|varchar(500)', '', '')
INSERT INTO dbo.pub_sql (sql_server, sql_name, sql_type, sql_text, sql_note, sql_sourcetables, sql_targettables, sql_params, sql_keyparam, sqL_fields) VALUES ('MSSQL', 'update_worktime', '', 'mps_update_worktime {wt_id},{wt_time1},{wt_time2}', '', '', '', 'int|varchar(5)|varchar(5)', '', '')

SET IDENTITY_INSERT dbo.pub_sql OFF