提交代码
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
using RestSharp;
|
||||
using System.Net;
|
||||
using Model;
|
||||
using System.Collections;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
public static class CNCECHSSEWebService
|
||||
{
|
||||
@@ -1957,6 +1959,87 @@
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 督查检查整改上报
|
||||
/// <summary>
|
||||
/// 督查检查整改上报
|
||||
/// </summary>
|
||||
public static string UpDCGlCheck_CheckRectify(string checkRectifyId, Model.Person_Persons CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
// CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
var upCheckReport = from x in db.View_DCGL_CheckRectifyListFromSUB
|
||||
where x.RealEndDate.HasValue && x.CheckRectifyId == checkRectifyId
|
||||
select new Model.DCGLCheckRectifyItem
|
||||
{
|
||||
CheckRectifyId = x.CheckRectifyId,
|
||||
CheckRectifyCode = x.CheckRectifyCode,
|
||||
ProjectId = x.ProjectId,
|
||||
UnitId = x.UnitId,
|
||||
CheckDate = x.CheckDate,
|
||||
IssueMan = x.IssueMan,
|
||||
IssueDate = x.IssueDate,
|
||||
HandleState = x.HandleState,
|
||||
CheckRectifyItemId = x.CheckRectifyItemId,
|
||||
ConfirmMan = x.ConfirmMan,
|
||||
ConfirmDate = x.ConfirmDate,
|
||||
OrderEndDate = x.OrderEndDate,
|
||||
OrderEndPerson = x.OrderEndPerson,
|
||||
RealEndDate = x.RealEndDate,
|
||||
Verification = x.Verification,
|
||||
AttachFileId = x.AttachFileId2,
|
||||
ToKeyId = x.ToKeyId2,
|
||||
AttachSource = x.AttachSource2,
|
||||
AttachUrl = x.AttachUrl2,
|
||||
////附件转为字节传送
|
||||
FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
|
||||
};
|
||||
|
||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/UpDCGLCheckRectifyTable";
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
Hashtable newToken = new Hashtable
|
||||
{
|
||||
{ "token", ServerService.GetToken().Token }
|
||||
};
|
||||
var pushContent = JsonConvert.SerializeObject(upCheckReport.ToList());
|
||||
var strJosn = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent);
|
||||
if (!string.IsNullOrEmpty(strJosn))
|
||||
{
|
||||
JObject obj = JObject.Parse(strJosn);
|
||||
code = obj["code"].ToString();
|
||||
|
||||
if (code == "1")
|
||||
{
|
||||
var getIds = Funs.GetStrListByStr(obj["data"].ToString(), ',');
|
||||
if (getIds.Count() > 0)
|
||||
{
|
||||
foreach (var item in getIds)
|
||||
{
|
||||
var newCheckRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == item);
|
||||
if (newCheckRectify != null)
|
||||
{
|
||||
newCheckRectify.HandleState = BLL.Const.State_3; //已完成
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【集团检查整改】上传到服务器" + getIds.Count.ToString() + "条数据;", null, BLL.Const.UpDCGLCheckReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【集团检查整改】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【集团检查整改】上传到服务器失败;", null, BLL.Const.UpDCGLCheckReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
@@ -7121,6 +7204,7 @@
|
||||
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user