diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index f8cfc939..996d4b16 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -369,6 +369,7 @@
+
diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs
index 99275b8c..a92041d7 100644
--- a/SGGL/BLL/Common/Funs.cs
+++ b/SGGL/BLL/Common/Funs.cs
@@ -73,6 +73,11 @@ namespace BLL
}
}
+ ///
+ /// 服务器路径
+ ///
+ public static string AttachRootPath { get; set; }
+
///
/// 系统名称
///
diff --git a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckNoticeItemService.cs b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckNoticeItemService.cs
new file mode 100644
index 00000000..31313172
--- /dev/null
+++ b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckNoticeItemService.cs
@@ -0,0 +1,39 @@
+锘縰sing Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 鐫f煡妫鏌ユ暣鏀规槑缁嗚〃
+ ///
+ public static class DCGLCheckNoticeItemService
+ {
+ ///
+ /// 鏍规嵁涓婚敭鑾峰彇鐫f煡妫鏌ユ暣鏀规槑缁嗕俊鎭
+ ///
+ ///
+ ///
+ public static Model.DCGL_Check_CheckInfo_TableNoticeItem GetCheckNoticeItemByCheckNoticeItemId(string checkNoticeItemId)
+ {
+ return Funs.DB.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(e => e.ID == checkNoticeItemId);
+ }
+
+ ///
+ /// 娣诲姞鐫f煡妫鏌ユ暣鏀规槑缁嗕俊鎭
+ ///
+ ///
+ 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();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
index ab72d20e..7e5d5131 100644
--- a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
+++ b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
@@ -55,6 +55,8 @@ namespace BLL
newPlan.CompletedCount = plan.CompletedCount;
newPlan.CompletedRate = plan.CompletedRate;
newPlan.TotalCompletedRate = plan.TotalCompletedRate;
+ newPlan.OnDayCompleteDyne = plan.OnDayCompleteDyne;
+ newPlan.NextDayCompleteDyne = plan.NextDayCompleteDyne;
db.HJGL_ProductionSchedulingPlan.InsertOnSubmit(newPlan);
db.SubmitChanges();
}
diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs
index c42d9653..e9c4010f 100644
--- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs
@@ -640,9 +640,9 @@ namespace BLL
/// 娴佹按娈
/// 鏉愯川
/// 鍙e緞
- /// 1-鎬昏揪鍥狅紝2-瀹屾垚鎬昏揪鍥
+ /// 1-杈惧洜锛2-瀹屾垚杈惧洜
///
- public static decimal? GetSizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber,string type)
+ public static decimal? GetSizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber, string type)
{
Model.SGGLDB db = Funs.DB;
decimal? sizeSum = 0;
@@ -654,39 +654,41 @@ namespace BLL
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection && z.SteelType == steelType
- && y.PipeArea == "1" && x.JointAttribute == "棰勫埗鍙"
- //&& Convert.ToInt32(x.DNDia.Substring(2, x.DNDia.Length - 2)) < c
+ && y.PipeArea == "1" && x.JointAttribute == "棰勫埗鍙"
select x);
foreach (var item in weldjoints)
{
- int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2));
- if (caliber.Substring(0, 1) == "<" && s < c)
+ if (!string.IsNullOrEmpty(item.DNDia) && item.DNDia != null)
{
- if (type == "1")
+ int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2));
+ if (caliber.Substring(0, 1) == "<" && s < c)
{
- sizeSum += item.Size;
- }
- else
- {
- if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ if (type == "1")
{
sizeSum += item.Size;
}
+ else
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ sizeSum += item.Size;
+ }
+ }
}
- }
- else if (caliber.Substring(0, 1) == "鈮" && s >= c)
- {
- if (type == "1")
+ else if (caliber.Substring(0, 1) == "鈮" && s >= c)
{
- sizeSum += item.Size;
- }
- else
- {
- if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ if (type == "1")
{
sizeSum += item.Size;
}
+ else
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ sizeSum += item.Size;
+ }
+ }
}
}
}
@@ -695,14 +697,14 @@ namespace BLL
}
///
- /// 鏍规嵁鍗曚綅宸ョ▼銆佹祦姘存鑾峰彇鎬昏揪鍥
+ /// 鏍规嵁鍗曚綅宸ョ▼銆佹祦姘存鑾峰彇浼樺厛绾ф昏揪鍥犮佸畬鎴愭昏揪鍥
///
/// 椤圭洰id
/// 鍗曚綅宸ョ▼
/// 娴佹按娈
/// 1-鎬昏揪鍥狅紝2-瀹屾垚鎬昏揪鍥
///
- public static decimal? GetSizeSumByUnitWorkIdAndFlowingSection(string projectId, string unitWorkId, string flowingSection,string type)
+ public static decimal? GetSizeSumByUnitWorkIdAndFlowingSection(string projectId, string unitWorkId, string flowingSection, string type)
{
Model.SGGLDB db = Funs.DB;
decimal? sizeSum = 0;
@@ -710,7 +712,7 @@ namespace BLL
{
sizeSum = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
- join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ //join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
&& y.PipeArea == "1" && x.JointAttribute == "棰勫埗鍙"
select x.Size).Sum();
@@ -719,7 +721,7 @@ namespace BLL
{
sizeSum = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
- join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ //join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
&& y.PipeArea == "1" && x.JointAttribute == "棰勫埗鍙"
&& x.WeldingDailyId != "" && x.WeldingDailyId != null
@@ -727,5 +729,85 @@ namespace BLL
}
return sizeSum;
}
+
+ ///
+ /// 鏍规嵁鍗曚綅宸ョ▼銆佹祦姘存銆佹潗璐ㄨ幏鍙栨昏揪鍥狅紙鎸夋潗璐級
+ ///
+ /// 椤圭洰id
+ /// 鍗曚綅宸ョ▼id
+ /// 娴佹按鍙
+ /// 鏉愯川
+ ///
+ public static decimal? GetSizeSumByUnitWorkIdAndFlowingSectionAndMaterial(string projectId, string unitWorkId, string flowingSection, string steelType)
+ {
+ Model.SGGLDB db = Funs.DB;
+ decimal? sizeSum = 0;
+ sizeSum = (from x in db.HJGL_WeldJoint
+ join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
+ join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
+ && y.PipeArea == "1" && x.JointAttribute == "棰勫埗鍙"
+ && z.SteelType == steelType
+ select x.Size).Sum();
+ return sizeSum;
+ }
+
+
+ ///
+ /// 鑾峰彇褰撴棩宸插畬鎴愰噺
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static decimal? GetCurrentDaySizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber)
+ {
+ Model.SGGLDB db = Funs.DB;
+ decimal? sizeSum = 0;
+ int c = 0;
+ if (!string.IsNullOrEmpty(caliber))
+ {
+ c = Convert.ToInt32(caliber.Substring(1, caliber.Length - 1));
+ var weldjoints = (from x in db.HJGL_WeldJoint
+ join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
+ join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection && z.SteelType == steelType
+ && y.PipeArea == "1" && x.JointAttribute == "棰勫埗鍙"
+ select x);
+
+ foreach (var item in weldjoints)
+ {
+ if (!string.IsNullOrEmpty(item.DNDia) && item.DNDia != null)
+ {
+ int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2));
+ if (caliber.Substring(0, 1) == "<" && s < c)
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ var weldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(item.WeldingDailyId);
+ if (weldingDaily != null && weldingDaily.WeldingDate.HasValue && weldingDaily.WeldingDate.Value.ToShortDateString() == DateTime.Now.ToShortDateString())
+ {
+ sizeSum += item.Size;
+ }
+ }
+ }
+ else if (caliber.Substring(0, 1) == "鈮" && s >= c)
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ var weldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(item.WeldingDailyId);
+ if (weldingDaily != null && weldingDaily.WeldingDate.HasValue && weldingDaily.WeldingDate.Value.ToShortDateString() == DateTime.Now.ToShortDateString())
+ {
+ sizeSum += item.Size;
+ }
+ }
+ }
+ }
+ }
+ }
+ return sizeSum;
+ }
}
}
diff --git a/SGGL/BLL/OpenService/FileInsertService.cs b/SGGL/BLL/OpenService/FileInsertService.cs
index 3f19aac2..273de9e7 100644
--- a/SGGL/BLL/OpenService/FileInsertService.cs
+++ b/SGGL/BLL/OpenService/FileInsertService.cs
@@ -5,11 +5,52 @@ using System.Text;
using System.Collections;
using System.IO;
using System.Web;
+using System.Text.RegularExpressions;
+using System.Net;
namespace BLL
{
public static class FileInsertService
{
+ ///
+ /// 鑾峰彇鏈嶅姟鍣ㄥ浘鐗囪浆byte
+ ///
+ ///
+ ///
+ ///
+ public static List FilePathTransStream(string fileHost, string attachUrl)
+ {
+ List bytes = new List();
+ 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)))
+ {
+ // 灏哅emoryStream杞崲涓篵yte鏁扮粍
+ byte[] imageBytes = ms.ToArray();
+ bytes.Add(imageBytes);
+ //// 浣跨敤byte鏁扮粍锛堜緥濡傦紝淇濆瓨鍒版枃浠舵垨杩涜鍏朵粬澶勭悊锛
+ //File.WriteAllBytes("localImage.jpg", imageBytes);
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("Error: " + ex.Message);
+ }
+ return bytes;
+ }
+
+
///
/// 鑾峰彇闄勪欢鏁版嵁娴佺被
///
@@ -19,7 +60,7 @@ namespace BLL
{
if (fileContextList != null && fileContextList.Count > 0)
{
- string physicalpath = Funs.RootPath;
+ string physicalpath = Funs.AttachRootPath;
//HttpContext.Current.Request.PhysicalApplicationPath;
string fullPath = physicalpath + attachUrl;
if (!File.Exists(fullPath))
@@ -61,18 +102,29 @@ namespace BLL
{
if (strs.Count() > i)
{
- string physicalpath = Funs.RootPath;
- //HttpContext.Current.Request.PhysicalApplicationPath;
- string fullPath = physicalpath + strs[i];
+ string physicalpath = Funs.AttachRootPath;
+ string fpath = strs[i];
+ string fullPath = physicalpath + fpath;
if (!File.Exists(fullPath))
{
byte[] fileContext = item;
- int index = fullPath.LastIndexOf("\\");
- string filePath = fullPath.Substring(0, index);
+ string fileName = Regex.Match(fullPath, @"[^/\\?]+(\?.*)?$").Value;
+ 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;
@@ -125,7 +177,7 @@ namespace BLL
if (attachFile.AttachUrl != attachUrl)
{
///鍒犻櫎闄勪欢鏂囦欢
- BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, attachFile.AttachUrl);
+ BLL.UploadAttachmentService.DeleteFile(Funs.AttachRootPath, attachFile.AttachUrl);
////鎻掑叆闄勪欢鏂囦欢
BLL.FileInsertService.FileMoreInsert(fileContext, attachUrl);
attachFile.AttachSource = attachSource;
@@ -134,5 +186,45 @@ namespace BLL
}
}
}
+
+
+ ///
+ /// 鏁版嵁鍜岄檮浠舵彃鍏ュ埌澶氶檮浠惰〃銆愪笉瀛樺疄闄呮枃浠讹紝鍙瓨鍦板潃銆
+ ///
+ 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.AttachRootPath, attachFile.AttachUrl);
+ attachFile.AttachSource = attachSource;
+ attachFile.AttachUrl = attachUrl;
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+
}
}
diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs
index f3c5aa59..aa25e49b 100644
--- a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs
+++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs
@@ -13,10 +13,12 @@ namespace FineUIPro.Web.DCGL.ServerCheck
{
public partial class CheckRectify : PageBase
{
+ private static string proType;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
+ proType = Request.Params["proType"] ?? string.Empty;
this.GetButtonPower();
//btnNew.OnClientClick = Window1.GetShowReference("CheckRectifyEdit.aspx") + "return false;";
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
@@ -30,15 +32,19 @@ namespace FineUIPro.Web.DCGL.ServerCheck
///
private void BindGrid()
{
- string strSql = string.Empty;
+ StringBuilder sb = new StringBuilder();
+ sb.Append($@"SELECT S.CheckRectifyId,S.CheckRectifyCode,S.ProjectId,S.ProjectName,S.UnitId,U.UnitName,S.CheckDate,CASE S.HandleState WHEN '{BLL.Const.State_1}' THEN '鏈鍙' WHEN '{BLL.Const.State_2}' THEN '鏈笂鎶' ELSE '宸蹭笂鎶' END AS HandleState,
+ S.IssueMan,S.IssueDate,ISNULL(TotalCount.TotalCount,0) AS TotalCount ,ISNULL(CompleteCount.CompleteCount,0) AS CompleteCount,(ISNULL(TotalCount.TotalCount,0) -ISNULL(CompleteCount.CompleteCount,0)) AS UnCompleteCount ");
+ sb.Append("FROM dbo.DCGL_Check_CheckRectify AS S LEFT JOIN dbo.Base_Unit AS U ON U.UnitId = S.UnitId ");
+ sb.Append(" LEFT JOIN (SELECT COUNT(*) AS TotalCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem GROUP BY CheckRectifyId) AS TotalCount ON S.CheckRectifyId=TotalCount.CheckRectifyId ");
+ sb.Append(" LEFT JOIN (SELECT COUNT(*) AS CompleteCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem WHERE RealEndDate IS NOT NULL GROUP BY CheckRectifyId) AS CompleteCount ON S.CheckRectifyId=CompleteCount.CheckRectifyId ");
+ if (!string.IsNullOrWhiteSpace(proType) && proType == "1")
+ {//鍙煡璇㈡湰椤圭洰妫鏌ユ暟鎹
+ sb.Append($"WHERE S.ProjectId='{this.CurrUser.LoginProjectId}' ");
+ }
+ sb.Append("ORDER BY HandleState");
SqlParameter[] parameter = new SqlParameter[] { };
- strSql = "SELECT S.CheckRectifyId,S.CheckRectifyCode,S.ProjectId,S.ProjectName,S.UnitId,U.UnitName,S.CheckDate,CASE S.HandleState WHEN '" + BLL.Const.State_1 + "' THEN '鏈鍙' WHEN '" + BLL.Const.State_2 + "' THEN '鏈笂鎶' ELSE '宸蹭笂鎶' END AS HandleState,"
- + @" S.IssueMan,S.IssueDate,ISNULL(TotalCount.TotalCount,0) AS TotalCount ,ISNULL(CompleteCount.CompleteCount,0) AS CompleteCount,(ISNULL(TotalCount.TotalCount,0) -ISNULL(CompleteCount.CompleteCount,0)) AS UnCompleteCount"
- + @" FROM dbo.DCGL_Check_CheckRectify AS S LEFT JOIN dbo.Base_Unit AS U ON U.UnitId = S.UnitId"
- + @" LEFT JOIN (SELECT COUNT(*) AS TotalCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem GROUP BY CheckRectifyId) AS TotalCount ON S.CheckRectifyId=TotalCount.CheckRectifyId"
- + @" LEFT JOIN (SELECT COUNT(*) AS CompleteCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem WHERE RealEndDate IS NOT NULL GROUP BY CheckRectifyId) AS CompleteCount ON S.CheckRectifyId=CompleteCount.CheckRectifyId"
- + @" ORDER BY HandleState";
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
// 2.鑾峰彇褰撳墠鍒嗛〉鏁版嵁
//var table = this.GetPagedDataTable(Grid1, tb1);
@@ -365,7 +371,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
#endregion
#endregion
-
+
///
/// 浠庨泦鍥㈣幏鍙
///
@@ -387,8 +393,9 @@ namespace FineUIPro.Web.DCGL.ServerCheck
#region 鑾峰彇
+
///
- /// 鑾峰彇
+ /// 鑾峰彇鐫f煡妫鏌ユ暣鏀
///
///
///
@@ -397,7 +404,239 @@ namespace FineUIPro.Web.DCGL.ServerCheck
var responeData = new Model.ResponeData();
try
{
- string unitId =BLL.Const.UnitId_SEDIN;
+ string unitId = BLL.Const.UnitId_SEDIN;
+ string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckInfoRectify?unitId=" + unitId;
+ string contenttype = "application/json;charset=unicode";
+ Hashtable newToken = new Hashtable
+ {
+ { "token", ServerService.GetToken().Token }
+ };
+
+ var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null);
+ if (!string.IsNullOrEmpty(strJosn))
+ {
+ JObject obj = JObject.Parse(strJosn);
+ responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString());
+ responeData.message = obj["message"].ToString();
+ if (responeData.code == 1)
+ {
+ JArray getData = JArray.Parse(obj["data"].ToString());
+ if (getData.Count() > 0)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ List ids = new List();
+ foreach (var item in getData)
+ {
+ string getCheckRectifyId = item["CheckRectifyId"].ToString();
+ if (!ids.Contains(getCheckRectifyId))
+ {
+ var newRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == getCheckRectifyId);
+ if (newRectify == null)
+ {
+ ids.Add(getCheckRectifyId);
+ Model.DCGL_Check_CheckRectify newCheckRectify = new Model.DCGL_Check_CheckRectify
+ {
+ CheckRectifyId = getCheckRectifyId,
+ CheckRectifyCode = item["CheckRectifyCode"].ToString(),
+ ProjectId = item["ProjectId"].ToString(),
+ ProjectName = item["ProjectName"].ToString(),
+ UnitId = unitId,
+ CheckDate = Funs.GetNewDateTime(item["CheckDate"].ToString()),
+ IssueMan = item["IssueMan"].ToString(),
+ IssueDate = Funs.GetNewDateTime(item["IssueDate"].ToString()),
+ HandleState = item["HandleState"].ToString()
+ };
+ db.DCGL_Check_CheckRectify.InsertOnSubmit(newCheckRectify);
+ db.SubmitChanges();
+ }
+ else
+ {
+ newRectify.CheckRectifyCode = item["CheckRectifyCode"].ToString();
+ db.SubmitChanges();
+ }
+
+ //鑾峰彇瀵瑰簲涓昏〃涓婚敭鐨勬槑缁嗛泦鍚
+ string getNoticeItemId = item["NoticeItemId"].ToString();
+ var notice = db.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == getNoticeItemId);
+ if (notice == null)
+ {
+ Model.DCGL_Check_CheckInfo_TableNoticeItem newCheckRectifyItem = new Model.DCGL_Check_CheckInfo_TableNoticeItem
+ {
+ ID = getNoticeItemId,
+ CheckInfoId = item["CheckInfoId"].ToString(),
+ SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()),
+ Describe = item["Describe"].ToString(),
+ Standards = item["Standards"].ToString(),
+ Advice = item["Advice"].ToString(),
+ LimitTime = Funs.GetNewDateTime(item["LimitTime"].ToString()),
+
+ Situation = item["Situation"].ToString(),
+ Remark = item["Remark"].ToString(),
+ Url = item["Url"].ToString(),
+ AffUrl = item["AffUrl"].ToString(),
+ RiskLevel = item["RiskLevel"].ToString(),
+ ProblemTypes = item["ProblemTypes"].ToString(),
+ ProblemSubTypeId = item["ProblemSubTypeId"].ToString(),
+ ProblemSubType = item["ProblemSubType"].ToString(),
+ States = item["States"].ToString(),
+
+ //WorkType = item["WorkType"].ToString(),
+ //DangerPoint = item["DangerPoint"].ToString(),
+ //RiskExists = item["RiskExists"].ToString(),
+ //IsProject = Convert.ToBoolean(item["IsProject"].ToString()),
+ //CheckMan = item["CheckMan"].ToString(),
+ //SubjectUnitMan = item["SubjectUnitMan"].ToString(),
+ };
+ db.DCGL_Check_CheckInfo_TableNoticeItem.InsertOnSubmit(newCheckRectifyItem);
+ db.SubmitChanges();
+ }
+
+ BLL.CommonService.DeleteAttachFileById(getNoticeItemId);//鍒犻櫎闄勪欢
+ ////涓婁紶闄勪欢
+ string getAttachFileId = item["AttachFileId"].ToString();
+ if (!string.IsNullOrEmpty(getAttachFileId))
+ {
+ List resultList = new List();
+ string filePath = item["FilePath"].ToString();
+ string attachSource = item["AttachSource"].ToString();
+ string attachUrl = item["AttachUrl"].ToString();
+
+ BLL.FileInsertService.InsertAttachFileRecord(getAttachFileId, getNoticeItemId, attachSource, attachUrl);
+ //if (!string.IsNullOrWhiteSpace(filePath) && !string.IsNullOrWhiteSpace(attachSource) && !string.IsNullOrWhiteSpace(attachUrl))
+ //{
+ // resultList = FileInsertService.FilePathTransStream(filePath, attachUrl);
+ //}
+ //BLL.FileInsertService.InsertAttachFile(getAttachFileId, getNoticeItemId, attachSource, attachUrl, resultList);
+ }
+
+ string getCheckRectifyItemId = item["CheckRectifyItemId"].ToString();
+ var oldItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == getCheckRectifyItemId);
+ if (oldItem == null)
+ {
+ Model.DCGL_Check_CheckRectifyItem newCheckRectifyItem = new Model.DCGL_Check_CheckRectifyItem
+ {
+ CheckRectifyItemId = getCheckRectifyItemId,
+ CheckRectifyId = getCheckRectifyId,
+ NoticeItemId = getNoticeItemId,
+ ConfirmMan = item["ConfirmMan"].ToString(),
+ ConfirmManName = item["ConfirmManName"].ToString(),
+ ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
+ OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
+ OrderEndPerson = item["OrderEndPerson"].ToString(),
+ RealEndDate = Funs.GetNewDateTime(item["RealEndDate"].ToString()),
+ };
+
+ db.DCGL_Check_CheckRectifyItem.InsertOnSubmit(newCheckRectifyItem);
+ db.SubmitChanges();
+ }
+ }
+ else
+ {
+ //鑾峰彇瀵瑰簲涓昏〃涓婚敭鐨勬槑缁嗛泦鍚
+ string getNoticeItemId = item["NoticeItemId"].ToString();
+ var notice = db.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == getNoticeItemId);
+ if (notice == null)
+ {
+
+ Model.DCGL_Check_CheckInfo_TableNoticeItem newCheckRectifyItem = new Model.DCGL_Check_CheckInfo_TableNoticeItem
+ {
+ ID = getNoticeItemId,
+ CheckInfoId = item["CheckInfoId"].ToString(),
+ SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()),
+ Describe = item["Describe"].ToString(),
+ Standards = item["Standards"].ToString(),
+ Advice = item["Advice"].ToString(),
+ LimitTime = Funs.GetNewDateTime(item["LimitTime"].ToString()),
+
+ Situation = item["Situation"].ToString(),
+ Remark = item["Remark"].ToString(),
+ Url = item["Url"].ToString(),
+ AffUrl = item["AffUrl"].ToString(),
+ RiskLevel = item["RiskLevel"].ToString(),
+ ProblemTypes = item["ProblemTypes"].ToString(),
+ ProblemSubTypeId = item["ProblemSubTypeId"].ToString(),
+ ProblemSubType = item["ProblemSubType"].ToString(),
+ States = item["States"].ToString(),
+
+ //WorkType = item["WorkType"].ToString(),
+ //DangerPoint = item["DangerPoint"].ToString(),
+ //RiskExists = item["RiskExists"].ToString(),
+ //IsProject = Convert.ToBoolean(item["IsProject"].ToString()),
+ //CheckMan = item["CheckMan"].ToString(),
+ //SubjectUnitMan = item["SubjectUnitMan"].ToString(),
+ };
+ db.DCGL_Check_CheckInfo_TableNoticeItem.InsertOnSubmit(newCheckRectifyItem);
+ db.SubmitChanges();
+ }
+
+ BLL.CommonService.DeleteAttachFileById(getNoticeItemId);//鍒犻櫎闄勪欢
+ ////涓婁紶闄勪欢
+ string getAttachFileId = item["AttachFileId"].ToString();
+ if (!string.IsNullOrEmpty(getAttachFileId))
+ {
+ List resultList = new List();
+ string attachSource = item["AttachSource"].ToString();
+ string attachUrl = item["AttachUrl"].ToString();
+ BLL.FileInsertService.InsertAttachFileRecord(getAttachFileId, getNoticeItemId, attachSource, attachUrl);
+ //if (!string.IsNullOrWhiteSpace(filePath) && !string.IsNullOrWhiteSpace(attachSource) && !string.IsNullOrWhiteSpace(attachUrl))
+ //{
+ // resultList = FileInsertService.FilePathTransStream(filePath, attachUrl);
+ //}
+ //BLL.FileInsertService.InsertAttachFile(getAttachFileId, getNoticeItemId, attachSource, attachUrl, resultList);
+ }
+
+ string getCheckRectifyItemId = item["CheckRectifyItemId"].ToString();
+ var oldItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == getCheckRectifyItemId);
+ if (oldItem == null)
+ {
+ Model.DCGL_Check_CheckRectifyItem newCheckRectifyItem = new Model.DCGL_Check_CheckRectifyItem
+ {
+ CheckRectifyItemId = getCheckRectifyItemId,
+ CheckRectifyId = getCheckRectifyId,
+ NoticeItemId = getNoticeItemId,
+ ConfirmMan = item["ConfirmMan"].ToString(),
+ ConfirmManName = item["ConfirmManName"].ToString(),
+ ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
+ OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
+ OrderEndPerson = item["OrderEndPerson"].ToString(),
+ RealEndDate = Funs.GetNewDateTime(item["RealEndDate"].ToString()),
+ };
+
+ db.DCGL_Check_CheckRectifyItem.InsertOnSubmit(newCheckRectifyItem);
+ db.SubmitChanges();
+ }
+ }
+ }
+ }
+ }
+ responeData.message = "鑾峰彇鎴愬姛锛氭暣鏀规槑缁嗚褰" + getData.Count().ToString() + "鏉";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = "鑾峰彇澶辫触锛" + ex.Message;
+ ErrLogInfo.WriteLog("鐫f煡妫鏌ラ氱煡鍗曡幏鍙栵紒", ex);
+ }
+
+ return responeData;
+ }
+ #endregion
+
+ #region 鑾峰彇
+ ///
+ /// 鑾峰彇
+ ///
+ ///
+ ///
+ public static Model.ResponeData getCheck_CheckRectifyListToSUBOld()
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ string unitId = BLL.Const.UnitId_SEDIN;
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckRectify?unitId=" + unitId;
string contenttype = "application/json;charset=unicode";
Hashtable newToken = new Hashtable
@@ -591,6 +830,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
CheckRectifyId = getCheckRectifyId,
NoticeItemId = getNoticeItemId,
ConfirmMan = item["ConfirmMan"].ToString(),
+ ConfirmManName = item["ConfirmManName"].ToString(),
ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()),
OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()),
OrderEndPerson = item["OrderEndPerson"].ToString(),
diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx
index cbec1d1f..c545431f 100644
--- a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx
+++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx
@@ -6,11 +6,36 @@
闅愭偅鏁存敼鍗
+
+
+
@@ -57,7 +82,7 @@
@@ -74,10 +99,16 @@
-
+
+
+
+
+ <%--
-
+ --%>
@@ -108,12 +139,19 @@
-
+ --%>
+
+
+
+
+
@@ -143,5 +181,43 @@
IsModal="true" Width="800px" Height="500px">
+
+

+
+
+