督查检查
This commit is contained in:
@@ -303,6 +303,8 @@
|
||||
<Compile Include="CQMS\WBS\WorkPackageInitService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyItemService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyService.cs" />
|
||||
<Compile Include="DigData\HSEDataCollectService.cs" />
|
||||
<Compile Include="DocManage\DocManageApproveService.cs" />
|
||||
<Compile Include="DocManage\DocManageService.cs" />
|
||||
@@ -806,6 +808,7 @@
|
||||
<Compile Include="Transfer\ProjectSetupService.cs" />
|
||||
<Compile Include="Transfer\RotatingEquipmentService.cs" />
|
||||
<Compile Include="Transfer\StaticEquipmentService.cs" />
|
||||
<Compile Include="WebService\CNCECHSSEGetWebService.cs" />
|
||||
<Compile Include="WebService\MCSWebService.cs" />
|
||||
<Compile Include="WebService\CNCECHSSEWebService.cs" />
|
||||
<Compile Include="WebService\CNCECHSSEMonitorService.cs" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1473,6 +1473,21 @@ namespace BLL
|
||||
public const string CheckInfoReportMenuId = "091D7D24-E706-465A-95FD-8EF359CB8667";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 集团督查检查
|
||||
|
||||
/// <summary>
|
||||
/// 企业上报督查检查报告
|
||||
/// </summary>
|
||||
public const string UpDCGLCheckReportMenuId = "2E4A3E58-44B7-41B0-BFE3-634DF29AAE27";// "B9950CB5-C47A-4C0A-A6CC-C7DDBBDE7D1E";
|
||||
/// <summary>
|
||||
/// 集团下发督查检查整改
|
||||
/// </summary>
|
||||
public const string DCGLCheckRectifyMenuId = "2E4A3E58-44B7-41B0-BFE3-634DF29AAE27";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 绩效评价
|
||||
/// <summary>
|
||||
/// 绩效评价
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
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 DCGLCheckRectifyItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取督查检查整改明细信息
|
||||
/// </summary>
|
||||
/// <param name="noticeItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DCGL_Check_CheckRectifyItem GetCheckRectifyItemByTable5ItemId(string noticeItemId)
|
||||
{
|
||||
return Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.NoticeItemId == noticeItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据督查检查整改id获取所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="CheckRectifyId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.DCGL_Check_CheckRectifyItem> GetCheckRectifyItemByCheckRectifyId(string checkRectifyId)
|
||||
{
|
||||
return (from x in Funs.DB.DCGL_Check_CheckRectifyItem where x.CheckRectifyId == checkRectifyId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取督查检查整改明细信息
|
||||
/// </summary>
|
||||
/// <param name="checkRectifyItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DCGL_Check_CheckRectifyItem GetCheckRectifyItemByCheckRectifyItemId(string checkRectifyItemId)
|
||||
{
|
||||
return Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == checkRectifyItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加督查检查整改明细信息
|
||||
/// </summary>
|
||||
/// <param name="CheckRectifyItem"></param>
|
||||
public static void UpdateCheckRectifyItem(Model.DCGL_Check_CheckRectifyItem CheckRectifyItem)
|
||||
{
|
||||
var newCheckRectifyItem = Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyItemId == CheckRectifyItem.CheckRectifyItemId);
|
||||
if (newCheckRectifyItem != null)
|
||||
{
|
||||
newCheckRectifyItem.OrderEndPerson = CheckRectifyItem.OrderEndPerson;
|
||||
newCheckRectifyItem.RealEndDate = CheckRectifyItem.RealEndDate;
|
||||
newCheckRectifyItem.Verification = CheckRectifyItem.Verification;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class DCGLCheckRectifyService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据整改ID获取督查检查信息
|
||||
/// </summary>
|
||||
/// <param name="CheckRectifyName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DCGL_Check_CheckRectify GetCheckRectifyByCheckRectifyId(string checkRectifyId)
|
||||
{
|
||||
return Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectifyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加督查检查整改
|
||||
/// </summary>
|
||||
/// <param name="checkRectify"></param>
|
||||
public static void AddCheckRectify(Model.DCGL_Check_CheckRectify checkRectify)
|
||||
{
|
||||
Model.DCGL_Check_CheckRectify newCheckRectify = new Model.DCGL_Check_CheckRectify
|
||||
{
|
||||
CheckRectifyId = checkRectify.CheckRectifyId,
|
||||
CheckRectifyCode = checkRectify.CheckRectifyCode,
|
||||
ProjectId = checkRectify.ProjectId,
|
||||
UnitId = checkRectify.UnitId,
|
||||
CheckDate = checkRectify.CheckDate,
|
||||
IssueMan = checkRectify.IssueMan,
|
||||
IssueDate = checkRectify.IssueDate,
|
||||
HandleState = checkRectify.HandleState
|
||||
};
|
||||
Funs.DB.DCGL_Check_CheckRectify.InsertOnSubmit(newCheckRectify);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改督查检查整改
|
||||
/// </summary>
|
||||
/// <param name="checkRectify"></param>
|
||||
public static void UpdateCheckRectify(Model.DCGL_Check_CheckRectify checkRectify)
|
||||
{
|
||||
Model.DCGL_Check_CheckRectify newCheckRectify = Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectify.CheckRectifyId);
|
||||
if (newCheckRectify != null)
|
||||
{
|
||||
newCheckRectify.CheckRectifyCode = checkRectify.CheckRectifyCode;
|
||||
newCheckRectify.ProjectId = checkRectify.ProjectId;
|
||||
newCheckRectify.UnitId = checkRectify.UnitId;
|
||||
newCheckRectify.CheckDate = checkRectify.CheckDate;
|
||||
newCheckRectify.IssueMan = checkRectify.IssueMan;
|
||||
newCheckRectify.IssueDate = checkRectify.IssueDate;
|
||||
|
||||
newCheckRectify.HandleState = checkRectify.HandleState;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
using System.Linq;
|
||||
using System.Timers;
|
||||
using System.Configuration;
|
||||
using System;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CNCECHSSEGetWebService
|
||||
{
|
||||
|
||||
|
||||
#region 督查检查整改上报
|
||||
/// <summary>
|
||||
/// 督查检查整改上报
|
||||
/// </summary>
|
||||
public static string UpDCGlCheck_CheckRectify(string checkRectifyId, Model.Sys_User 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
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user