strSql.Append("Select FeeCode,Name,FEECODE + '-' + NAME AS CodeAndName,DEFAULTCURR,DEFAULTDEBIT,DEFAULTCREDIT,feetype,Description,DefaultUnit,FeeFRT,ISADVANCEDPAY,TAXRATE ");
strSql.Append("Select FeeCode,Name,FEECODE + '-' + NAME AS CodeAndName,DEFAULTCURR,DEFAULTDEBIT,DEFAULTCREDIT,feetype,Description,DefaultUnit,FeeFRT,ISADVANCEDPAY,ISOPEN,ISINVOICE,TAXRATE ");
strSql.Append(",isnull(CASE DEFAULTDEBIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTDEBITREF ");
strSql.Append(",isnull(CASE DEFAULTCREDIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTCREDITREF ");
strSql.Append(",(SELECT TOP 1 SHARE_LINK FROM op_seae_billtrace_share_link where BSNO IN (SELECT BSNO FROM op_letter where LE_ID=op_letter_yard.LE_ID)) TRACKSHARELINK");