This commit is contained in:
夏菊 2025-09-26 10:21:07 +08:00
parent 1218297193
commit 99183556c1
2 changed files with 14 additions and 11 deletions

View File

@ -11,10 +11,8 @@ namespace BLL
public class CNCECHSSEGetWebService public class CNCECHSSEGetWebService
{ {
#region #region
/// <summary> /// <summary>
/// 督查检查整改上报 /// 督查检查整改上报
/// </summary> /// </summary>
@ -23,6 +21,7 @@ namespace BLL
string code = "0"; string code = "0";
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
string filePath = Funs.SGGLUrl;
try try
{ {
var upCheckReport = from x in db.View_DCGL_CheckRectifyListFromSUB var upCheckReport = from x in db.View_DCGL_CheckRectifyListFromSUB
@ -50,7 +49,7 @@ namespace BLL
ToKeyId = x.ToKeyId2, ToKeyId = x.ToKeyId2,
AttachSource = x.AttachSource2, AttachSource = x.AttachSource2,
AttachUrl = x.AttachUrl2, AttachUrl = x.AttachUrl2,
FilePath = Funs.SGGLUrl FilePath = filePath
//////附件转为字节传送 //////附件转为字节传送
//FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2), //FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
}; };
@ -62,9 +61,12 @@ namespace BLL
{ "token", ServerService.GetToken().Token } { "token", ServerService.GetToken().Token }
}; };
var pushContent = JsonConvert.SerializeObject(upCheckReport.ToList()); var pushContent = JsonConvert.SerializeObject(upCheckReport.ToList());
//ErrLogInfo.WriteLog($"【集团检查整改上报数据】:{pushContent}");
var strJosn = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent); var strJosn = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(strJosn)) if (!string.IsNullOrEmpty(strJosn))
{ {
//ErrLogInfo.WriteLog($"【集团检查整改上报数据结果】:{strJosn}");
JObject obj = JObject.Parse(strJosn); JObject obj = JObject.Parse(strJosn);
code = obj["code"].ToString(); code = obj["code"].ToString();
@ -78,8 +80,12 @@ namespace BLL
var newCheckRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == item); var newCheckRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == item);
if (newCheckRectify != null) if (newCheckRectify != null)
{ {
newCheckRectify.HandleState = BLL.Const.State_3; //已完成 var getNoUpdateItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyId == checkRectifyId && !x.RealEndDate.HasValue);
db.SubmitChanges(); if (getNoUpdateItem == null)
{//问题全部整改完成
newCheckRectify.HandleState = BLL.Const.State_3; //已完成
db.SubmitChanges();
}
} }
} }
} }
@ -95,10 +101,7 @@ namespace BLL
return code; return code;
} }
} }
#endregion #endregion
} }
} }

View File

@ -165,7 +165,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null) if (projectId != null)
{ {
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString()); var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString());
if (datetime1.HasValue) if (datetime1.HasValue)
{ {
@ -187,7 +187,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null) if (projectId != null)
{ {
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString() && x.IsOnceQualified == true); var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString() && x.IsOnceQualified == true);
if (datetime1.HasValue) if (datetime1.HasValue)
{ {
@ -209,7 +209,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null) if (projectId != null)
{ {
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
var getALL = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString()); var getALL = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString());
if (datetime1.HasValue) if (datetime1.HasValue)