| | |
| | | list = list.Where(s => s.FileCode == FileCode).ToList(); |
| | | var filename = list[0].FileName + ".xls"; |
| | | string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"]; |
| | | var msg = fileip + "/apis/Excel/" + filename; |
| | | var msg = fileip + "/Excel/" + filename; |
| | | mes.code = "200"; |
| | | mes.data = msg; |
| | | return TJson.toJson(mes); |
| | |
| | | /// <param name="FileCode">文件编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "ExcelModelCheck")] |
| | | [HttpGet] |
| | | public HttpResponseMessage ExcelModelCheck(HttpPostedFileBase files, string FileCode = null) |
| | | [HttpPost] |
| | | public HttpResponseMessage ExcelModelCheck() |
| | | { |
| | | |
| | | string FileCode = HttpContext.Current.Request["FileCode"].ToString(); |
| | | HttpPostedFile files = HttpContext.Current.Request.Files[0]; |
| | | ExcelModelCheck list = new ExcelModelCheck(); |
| | | Dictionary<object, object> dList = new Dictionary<object, object>(); |
| | | list.json1 = ExcelCheckUpload(files, FileCode); //文件上传 |
| | |
| | | [Route(template: "ExcelCheckUpload")] |
| | | [HttpGet] |
| | | [HiddenApi] |
| | | public ToMessage ExcelCheckUpload(HttpPostedFileBase files, string FileCode = null) |
| | | public ToMessage ExcelCheckUpload(HttpPostedFile files, string FileCode = null) |
| | | { |
| | | try |
| | | { |
| | |
| | | [Route(template: "ExcelCheckUpload")] |
| | | [HttpGet] |
| | | [HiddenApi] |
| | | public ToMessage ExcelCheck(HttpPostedFileBase files, string FileCode = null) |
| | | public ToMessage ExcelCheck(HttpPostedFile files, string FileCode = null) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// <param name="FileCode">文件编码</param> |
| | | /// <returns></returns> |
| | | [HiddenApi] |
| | | public ToMessage ExcelCheckCount(HttpPostedFileBase files, string FileCode = null) |
| | | public ToMessage ExcelCheckCount(HttpPostedFile files, string FileCode = null) |
| | | { |
| | | string savePath; |
| | | |