其他分享
首页 > 其他分享> > net防伪码导出

net防伪码导出

作者:互联网

S_CodeListFilterModel model = new S_CodeListFilterModel();
model.batchCode = Request.Form["batchparam"];

var cookieValueArray = CookieManager.GetKey(Request, "whmp_web").Split('_');
var gid = int.Parse(cookieValueArray[0]);

string str = string.Format(@" select a.ExpressCode as '物流码',SecurityCode as '防伪码','{2}'+SecurityCode as '小溯源码','{3}'+BoxCodes as '箱物流码',
'{4}'+BoxCodes AS '箱溯源码' from whmp_web_securityCode_PackingDetails a join (select * from whmp_web_securitycode where gid={0} and batchcode='{1}') as b on a.ExpressCode=b.ExpressCode where b.gid={0} and b.batchcode='{1}' order by a.ExpressCode", gid, model.batchCode, "http://" + Request.Url.Host + "/Platform/ScanCode?f=", "xx=", "http://" + "" + Request.Url.Host + "/Platform/Scancode?XX=");

DataTable dt = SystemDBInfo.WHDBSqlInstance.GetDataTableBySQL(str);
DateTime time = DateTime.Now;
ExportToExcelHelper.ResponseExcel("防伪码按批次(" + time.Year + "-" + time.Month + "-" + time.Day + ").xlsx", dt);

标签:web,导出,Request,ExpressCode,gid,time,net,model,防伪
来源: https://www.cnblogs.com/-lsf/p/13118181.html