|
|
|
|
|
using MaterialTraceability.Common;
|
|
|
|
|
|
using MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService;
|
|
|
|
|
|
using MaterialTraceability.WebService.MiFirstOperationForsfcServiceService;
|
|
|
|
|
|
using MaterialTraceability.WebService.MiReleaseSfcWithActivityServiceService;
|
|
|
|
|
|
using MaterialTraceability.WebService.MiSFCQueryQtyServiceService;
|
|
|
|
|
|
using MaterialTraceability.WebService.MiSignOffSFCsServiceService;
|
|
|
|
|
|
using MaterialTraceability.WebService.Param;
|
|
|
|
|
|
using MaterialTraceability.WebService.ProcessLotServiceWSService;
|
|
|
|
|
|
using MaterialTraceability.WebService.ShopOrderServiceWSService;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MaterialTraceability.WebService
|
|
|
|
|
|
{
|
|
|
|
|
|
public class WebServiceLog
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 新自动完工接口日志记录
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestParam"></param>
|
|
|
|
|
|
/// <param name="responseParam"></param>
|
|
|
|
|
|
/// <param name="beginTime"></param>
|
|
|
|
|
|
public static void saveMiBatchCompleteSfcAndAdujustQtyServiceService(MiBatchCompleteSfcAndAdujustQtyServiceServiceParam requestParam, MiBatchCompleteSfcAndAdujustQtyResponse responseParam, DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"MiBatchCompleteSfcAndAdujustQtyServiceService\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, requestParam.resource, dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 首工序获取SFC接口、自动入账接口、卷绕自动上料接口日志
|
|
|
|
|
|
/// activity执行作业:Z_AUTO_EN530 上料功能(冷压、卷绕),默认为空,仅执行开始作业(模切)
|
|
|
|
|
|
/// modeProcessSfc过账模式:MODE_RELEASE_START_SFC 冷压下达并开始SFC,MODE_START_SFC 模切开始SFC,MODE_NONE 卷绕仅上料,不执行其他作业
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestParam"></param>
|
|
|
|
|
|
/// <param name="responseParam"></param>
|
|
|
|
|
|
/// <param name="beginTime"></param>
|
|
|
|
|
|
public static void saveMiFirstOperationForsfcServiceService(MiFirstOperationForsfcServiceServiceParam requestParam, miFirstOperationForsfcResponse responseParam,DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"MiFirstOperationForsfcServiceService\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, requestParam.resource, dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 涂布工单下达接口日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestParam"></param>
|
|
|
|
|
|
/// <param name="responseParam"></param>
|
|
|
|
|
|
/// <param name="beginTime"></param>
|
|
|
|
|
|
public static void saveMiReleaseSfcWithActivityServiceService(MiReleaseSfcWithActivityServiceServiceParam requestParam, miReleaseSfcWithActivityResponse responseParam,DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"MiReleaseSfcWithActivityServiceService\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, requestParam.Resource, dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取SFC数量
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="miSFCQueryQtyServiceServiceParam"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static void saveMiSFCQueryQtyServiceService(MiSFCQueryQtyServiceServiceParam requestParam,sfcQueryQtyResponse responseParam,DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"MiSFCQueryQtyServiceService\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, "", dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 注销接口日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestParam"></param>
|
|
|
|
|
|
/// <param name="responseParam"></param>
|
|
|
|
|
|
/// <param name="beginTime"></param>
|
|
|
|
|
|
public static void saveMiSignOffSFCsServiceService(MiSignOffSFCsServiceServiceParam requestParam, miSignOffSFCsResponse responseParam, DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"MiSignOffSFCsServiceService\";
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, requestParam.Resource, dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 托盘绑定
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="processLotServiceWSServiceParam"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static void saveAddMemberResponse(ProcessLotServiceWSServiceParam requestParam, addMemberResponse responseParam,DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"AddMember\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, "", dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 托盘解绑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="processLotServiceWSServiceParam"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static void saveRemoveMember(ProcessLotServiceWSServiceParam requestParam, removeMemberResponse responseParam, DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"SaveMember\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, "", dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据RFID获取膜卷号
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="processLotServiceWSServiceParam"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static void saveReadProcessLot(ProcessLotServiceWSServiceParam requestParam, readProcessLotResponse responseParam,DateTime beginTime,string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"ReadProcessLot\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, "", dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据工单编号获取工单信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestParam"></param>
|
|
|
|
|
|
/// <param name="responseParam"></param>
|
|
|
|
|
|
/// <param name="beginTime"></param>
|
|
|
|
|
|
/// <param name="errorInfo"></param>
|
|
|
|
|
|
public static void findShopOrder(FindShopRequestParam requestParam, findShopOrderResponse responseParam, DateTime beginTime, string errorInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime endTime = DateTime.Now;
|
|
|
|
|
|
string MesLogPath = @"D:\MESlog\" + @"ReadProcessLot\";
|
|
|
|
|
|
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
dt.Columns.Add("开始时间");
|
|
|
|
|
|
dt.Columns.Add("结束时间");
|
|
|
|
|
|
dt.Columns.Add("请求耗时");
|
|
|
|
|
|
dt.Columns.Add("请求参数");
|
|
|
|
|
|
dt.Columns.Add("返回参数");
|
|
|
|
|
|
dt.Rows.Add(beginTime.ToString("yyy-MM-dd HH:mm:ss"), endTime.ToString("yyy-MM-dd HH:mm:ss"), MsgUtil.ElapsedTime(beginTime, endTime), JsonChange.ModeToJson(requestParam), JsonChange.ModeToJson(responseParam));
|
|
|
|
|
|
|
|
|
|
|
|
MsgUtil.WriteMesLog(MesLogPath, "", dt);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|