分公司获取和上报督查检查调整方法
This commit is contained in:
parent
c0d8d8e63b
commit
19ea2f2363
|
@ -4,6 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
|
@ -62,17 +63,28 @@ namespace BLL
|
||||||
if (strs.Count() > i)
|
if (strs.Count() > i)
|
||||||
{
|
{
|
||||||
string physicalpath = Funs.RootPath;
|
string physicalpath = Funs.RootPath;
|
||||||
//HttpContext.Current.Request.PhysicalApplicationPath;
|
string fpath = strs[i];
|
||||||
string fullPath = physicalpath + strs[i];
|
string fullPath = physicalpath + fpath;
|
||||||
if (!File.Exists(fullPath))
|
if (!File.Exists(fullPath))
|
||||||
{
|
{
|
||||||
byte[] fileContext = item;
|
byte[] fileContext = item;
|
||||||
int index = fullPath.LastIndexOf("\\");
|
string fileName = Regex.Match(fullPath, @"[^/\\?]+(\?.*)?$").Value;
|
||||||
string filePath = fullPath.Substring(0, index);
|
string filePath = fullPath.Replace(fileName, "");
|
||||||
|
//int index = fullPath.LastIndexOf("\\");
|
||||||
|
//string filePath = fullPath.Substring(0, index) ;
|
||||||
|
//string filePath = index > 0 ? fullPath.Substring(0, index) : fullPath;
|
||||||
|
|
||||||
if (!Directory.Exists(filePath))
|
try
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(filePath);
|
if (!Directory.Exists(filePath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ErrLogInfo.WriteLog($"附件【{filePath}】获取异常!");
|
||||||
|
//continue;
|
||||||
}
|
}
|
||||||
//string savePath = fullPath + fileName;
|
//string savePath = fullPath + fileName;
|
||||||
|
|
||||||
|
|
|
@ -1714,8 +1714,9 @@
|
||||||
ToKeyId = x.ToKeyId2,
|
ToKeyId = x.ToKeyId2,
|
||||||
AttachSource = x.AttachSource2,
|
AttachSource = x.AttachSource2,
|
||||||
AttachUrl = x.AttachUrl2,
|
AttachUrl = x.AttachUrl2,
|
||||||
////附件转为字节传送
|
FilePath = Funs.SGGLUrl
|
||||||
FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
|
//////附件转为字节传送
|
||||||
|
//FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
|
||||||
};
|
};
|
||||||
|
|
||||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/UpDCGLCheckRectifyTable";
|
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/UpDCGLCheckRectifyTable";
|
||||||
|
|
|
@ -264,6 +264,15 @@
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 附件路径域名地址
|
||||||
|
/// </summary>
|
||||||
|
public string FilePath
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 附件路径
|
/// 附件路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue