declare @datashowset_id int
declare @current_date varchar(100)
declare @current_time varchar(100)

set  @current_date = (select CONVERT(varchar(100), GETDATE(), 23))
set  @current_time = (select CONVERT(varchar(100), GETDATE(), 24))

INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('salaryExtEmp', '1', '1', '', 'SELECT * FROM hrsa_external_employee where delete_type=0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '非系统人员', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date, @current_time, NULL, NULL, '', '', '0',newid(), '', '', '', '', '1', 0, 1)
set @datashowset_id = (select max(id) from datashowset)
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('salaryExtEmp', '0', 0, @current_date, @current_time, NULL, NULL)

INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (@datashowset_id, '姓名', 'username', '', 1, 1, newid(), NULL)
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (@datashowset_id, '手机号', 'mobile', '', 0, 2, newid(), NULL)
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (@datashowset_id, '姓名', 'username', '2', '', 1, newid(), '')
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (@datashowset_id, '手机号', 'mobile', '2', '', 2, newid(), '')

GO