You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
4.8 KiB
174 lines
4.8 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using ICSSoft.Frame.Data.Entity;
|
|
using ICSSoft.Frame.Data.DAL;
|
|
using System.Data;
|
|
|
|
|
|
namespace ICSSoft.Frame.Data.BLL
|
|
{
|
|
public class ICSTSBLL
|
|
{
|
|
public static void Add(FormICSTSERRORCAUSEUIModel errorcause, FormICSTSERRORCODE2LOCUIModel erCode2loc, FormICSTSERRORCAUSE2LOCUIModel erCause2loc, FormICSTSERRORCAUSE2EPARTUIModel erCause2epart, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dsconn))
|
|
{
|
|
throw new Exception("请输入......");
|
|
}
|
|
List<FormICSTSERRORCAUSEUIModel> errorcauseList = new List<FormICSTSERRORCAUSEUIModel>() { errorcause };
|
|
List<FormICSTSERRORCODE2LOCUIModel> erCode2locList = new List<FormICSTSERRORCODE2LOCUIModel>() { erCode2loc };
|
|
List<FormICSTSERRORCAUSE2LOCUIModel> erCause2locList = new List<FormICSTSERRORCAUSE2LOCUIModel>() { erCause2loc };
|
|
List<FormICSTSERRORCAUSE2EPARTUIModel> erCause2epartList = new List<FormICSTSERRORCAUSE2EPARTUIModel>() { erCause2epart };
|
|
|
|
ICSTSDAL.AddAndEdit(errorcauseList, erCode2locList, erCause2locList, erCause2epartList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
|
|
#region select
|
|
public static ICSTS SearchTSInfoByRcard(string RCARD, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
ICSTS returnlist = ICSTSDAL.SearchTSInfoByRcard(RCARD, dsconn);
|
|
return returnlist;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region delete
|
|
public static void delete(List<String> guidList)
|
|
{
|
|
ICSShiftDAL.delete(guidList);
|
|
}
|
|
#endregion
|
|
|
|
public static void AddECode(ICSTSERRORCODE errorCodeInfo, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
ICSTSDAL.AddECode(errorCodeInfo, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
public static DataTable GetShiftCode()
|
|
{
|
|
try
|
|
{
|
|
return ICSShiftDAL.GetShiftCode();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
|
|
public static DataTable SelectShiftTypeCode()
|
|
{
|
|
return ICSShiftDAL.SelectShiftTypeCode();
|
|
}
|
|
|
|
public static DataTable SelectShiftTypeId(string str)
|
|
{
|
|
return ICSShiftDAL.SelectShiftTypeId(str);
|
|
}
|
|
|
|
#region 车间代码是否存在
|
|
public static bool IsIncludingShiftCode(string faccode, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
return ICSShiftDAL.IsIncludingShiftCode(faccode, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 产品序列号是否存在并且需要维修
|
|
public static bool IsIncludingInICSTS(string rcard)
|
|
{
|
|
try
|
|
{
|
|
return ICSTSDAL.IsIncludingInICSTS(rcard);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 判断是否在时段中
|
|
public static bool isIncludingInICSTP(List<string> idList, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
return ICSShiftDAL.isIncludingInICSTP(idList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 通过ID更新维修状态
|
|
public static void UpdateTSSTATUSByID(string id, string TSSTATUS, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dsconn))
|
|
{
|
|
throw new Exception("数据库连接字符串错误");
|
|
}
|
|
ICSTSDAL.UpdateTSSTATUSByID(id, TSSTATUS, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 通过产品序列号更新维修状态
|
|
public static void UpdateTSSTATUSByRcard(string rcard, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dsconn))
|
|
{
|
|
throw new Exception("数据库连接字符串错误");
|
|
}
|
|
ICSTSDAL.UpdateTSSTATUSByRcard(rcard, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|