This commit is contained in:
parent
f3db5bfdab
commit
6b13557f72
|
@ -310,6 +310,7 @@
|
|||
<Compile Include="CQMS\WBS\WorkPackageInitService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckNoticeItemService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyItemService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyService.cs" />
|
||||
<Compile Include="DigData\HSEDataCollectService.cs" />
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 督查检查整改明细表
|
||||
/// </summary>
|
||||
public static class DCGLCheckNoticeItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取督查检查整改明细信息
|
||||
/// </summary>
|
||||
/// <param name="checkRectifyItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DCGL_Check_CheckInfo_TableNoticeItem GetCheckNoticeItemByCheckNoticeItemId(string checkNoticeItemId)
|
||||
{
|
||||
return Funs.DB.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(e => e.ID == checkNoticeItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加督查检查整改明细信息
|
||||
/// </summary>
|
||||
/// <param name="CheckNoticeItem"></param>
|
||||
public static void UpdateCheckNoticeItem(Model.DCGL_Check_CheckInfo_TableNoticeItem CheckNoticeItem)
|
||||
{
|
||||
var newCheckNoticeItem = Funs.DB.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == CheckNoticeItem.ID);
|
||||
if (newCheckNoticeItem != null)
|
||||
{
|
||||
newCheckNoticeItem.Situation = CheckNoticeItem.Situation;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,11 +6,51 @@ using System.Collections;
|
|||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Net;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class FileInsertService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取服务器图片转byte
|
||||
/// </summary>
|
||||
/// <param name="fileHost"></param>
|
||||
/// <param name="attachUrl"></param>
|
||||
/// <returns></returns>
|
||||
public static List<byte[]> FilePathTransStream(string fileHost, string attachUrl)
|
||||
{
|
||||
List<byte[]> bytes = new List<byte[]>();
|
||||
var strs = attachUrl.Trim().Split(',');
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var fileUrl in strs)
|
||||
{
|
||||
string filepath = $"{fileHost}{fileUrl}";
|
||||
// 创建WebClient实例
|
||||
using (WebClient webClient = new WebClient())
|
||||
{
|
||||
// 下载图片并保存到内存流
|
||||
using (MemoryStream ms = new MemoryStream(webClient.DownloadData(filepath)))
|
||||
{
|
||||
// 将MemoryStream转换为byte数组
|
||||
byte[] imageBytes = ms.ToArray();
|
||||
bytes.Add(imageBytes);
|
||||
//// 使用byte数组(例如,保存到文件或进行其他处理)
|
||||
//File.WriteAllBytes("localImage.jpg", imageBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Error: " + ex.Message);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取附件数据流类
|
||||
/// </summary>
|
||||
|
@ -45,7 +85,6 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取多附件数据流类
|
||||
/// </summary>
|
||||
|
@ -63,7 +102,6 @@ namespace BLL
|
|||
{
|
||||
if (strs.Count() > i)
|
||||
{
|
||||
//string physicalpath = Funs.AttachRootPath;
|
||||
string physicalpath = Funs.RootPath;
|
||||
string fpath = strs[i];
|
||||
string fullPath = physicalpath + fpath;
|
||||
|
@ -107,7 +145,6 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据和附件插入到多附件表
|
||||
/// </summary>
|
||||
|
@ -149,5 +186,45 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据和附件插入到多附件表【不存实际文件,只存地址】
|
||||
/// </summary>
|
||||
public static void InsertAttachFileRecord(string attachFileId, string dataId, string attachSource, string attachUrl)
|
||||
{
|
||||
var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.AttachFileId == attachFileId);
|
||||
if (getAtt != null)
|
||||
{
|
||||
Funs.DB.AttachFile.DeleteOnSubmit(getAtt);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
//多附件
|
||||
var attachFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId);
|
||||
if (attachFile == null && !string.IsNullOrEmpty(attachSource))
|
||||
{
|
||||
Model.AttachFile newAttachFile = new Model.AttachFile
|
||||
{
|
||||
AttachFileId = attachFileId,
|
||||
ToKeyId = dataId,
|
||||
AttachSource = attachSource,
|
||||
AttachUrl = attachUrl
|
||||
};
|
||||
Funs.DB.AttachFile.InsertOnSubmit(newAttachFile);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (attachFile.AttachUrl != attachUrl)
|
||||
{
|
||||
///删除附件文件
|
||||
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, attachFile.AttachUrl);
|
||||
attachFile.AttachSource = attachSource;
|
||||
attachFile.AttachUrl = attachUrl;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -396,7 +396,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
JArray arr = JArray.Parse(data);
|
||||
if (arr.Count() > 0)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
foreach (var item in arr)
|
||||
|
|
|
@ -423,7 +423,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
JArray getData = JArray.Parse(obj["data"].ToString());
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
foreach (var item in getData)
|
||||
|
@ -655,7 +655,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
|
|||
JArray getData = JArray.Parse(obj["data"].ToString());
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
foreach (var item in getData)
|
||||
|
|
|
@ -1858,6 +1858,7 @@
|
|||
<Content Include="res\css\company.css" />
|
||||
<Content Include="res\css\indextower.css" />
|
||||
<Content Include="res\css\swiper.min.css" />
|
||||
<Content Include="res\css\viewer.min.css" />
|
||||
<Content Include="res\DataInTable.js" />
|
||||
<Content Include="res\images\01.png" />
|
||||
<Content Include="res\images\02.png" />
|
||||
|
@ -1896,12 +1897,22 @@
|
|||
<Content Include="res\image\message.png" />
|
||||
<Content Include="res\index\images\logocenter.png" />
|
||||
<Content Include="res\js\crypto-js.min.js" />
|
||||
<Content Include="res\js\hook.js" />
|
||||
<Content Include="res\js\jquery-1.8.3.js" />
|
||||
<Content Include="res\js\jquery-3.3.1.min.js" />
|
||||
<Content Include="res\js\jquery-3.4.1.min.js" />
|
||||
<Content Include="res\js\jquery-ui-1.9.2.custom.js" />
|
||||
<Content Include="res\js\jquery-ui-1.9.2.custom.min.js" />
|
||||
<Content Include="res\js\jssip-3.7.0.min.js" />
|
||||
<Content Include="res\js\mix-webrtc-1.0.0.min.js" />
|
||||
<Content Include="res\js\mixrtc.min.js" />
|
||||
<Content Include="res\js\swiper-bundle.min.css" />
|
||||
<Content Include="res\js\swiper-bundle.min.js" />
|
||||
<Content Include="res\js\swiper.css" />
|
||||
<Content Include="res\js\swiper.js" />
|
||||
<Content Include="res\js\swiper.min.css" />
|
||||
<Content Include="res\js\swiper.min.js" />
|
||||
<Content Include="res\js\viewer.min.js" />
|
||||
<Content Include="res\largescreen\css\reset1.css" />
|
||||
<Content Include="res\largescreen\css\userPage.css" />
|
||||
<Content Include="res\largescreen\images\down.png" />
|
||||
|
|
Loading…
Reference in New Issue