质量更新:
1、企业及分支机构检查 2、机具设备 批量退场 3、质量会议互通到总包 4、机具设备互通到总包
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量会议同步控制器
|
||||
/// </summary>
|
||||
public class CqmsMeetingSyncController : ApiController
|
||||
{
|
||||
|
||||
#region 分包单位推送数据到总包单位
|
||||
|
||||
/// <summary>
|
||||
/// 推送质量会议数据
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="dataId">数据ID(可选)</param>
|
||||
/// <returns>响应数据</returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData pushCqmsMeetingLists(string projectId, string dataId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var returndata = APICqmsMeetingSyncService.PushCqmsMeetingLists(projectId, dataId);
|
||||
responeData.code = returndata.code;
|
||||
responeData.message = returndata.message;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 总包单位接收分包单位推送数据
|
||||
|
||||
/// <summary>
|
||||
/// 接收保存质量会议数据
|
||||
/// </summary>
|
||||
/// <param name="newItem">质量会议同步数据</param>
|
||||
/// <returns>响应数据</returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData SaveCqmsMeetingSyncData([FromBody] Model.CqmsMeetingSyncData newItem)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.code = 1;
|
||||
responeData.message = APICqmsMeetingSyncService.SaveCqmsMeetingSyncData(newItem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量计量器具同步控制器
|
||||
/// </summary>
|
||||
public class InspectionMachineSyncController : ApiController
|
||||
{
|
||||
#region 分包单位推送数据到总包单位
|
||||
|
||||
/// <summary>
|
||||
/// 分包单位推送数据到总包单位
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="dataId">数据ID(可选)</param>
|
||||
/// <returns>响应数据</returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData pushInspectionMachineLists(string projectId, string dataId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var returndata = APIInspectionMachineSyncService.PushInspectionMachineLists(projectId, dataId);
|
||||
responeData.code = returndata.code;
|
||||
responeData.message = returndata.message;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 总包单位接收分包单位推送数据
|
||||
|
||||
/// <summary>
|
||||
/// 总包单位接收分包单位推送数据
|
||||
/// </summary>
|
||||
/// <param name="newItem">质量计量器具同步数据</param>
|
||||
/// <returns>响应数据</returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData SaveInspectionMachineSyncData([FromBody] Model.InspectionMachineSyncData newItem)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.code = 1;
|
||||
responeData.message = APIInspectionMachineSyncService.SaveInspectionMachineSyncData(newItem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user