张松男
6 months ago
39 changed files with 4422 additions and 9 deletions
@ -0,0 +1,200 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using QMAPP.BLL; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.Data; |
|||
using QMFrameWork.Log; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
using QMAPP.FJC.DAL.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.BLL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPutBeginShiftBLL : BaseBLL |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<InOutPut_BeginShift> Get(InOutPut_BeginShift model) |
|||
{ |
|||
DataResult<InOutPut_BeginShift> result = new DataResult<InOutPut_BeginShift>(); |
|||
try |
|||
{ |
|||
result.Result = new InOutPut_BeginShiftDAL().Get(model); |
|||
result.IsSuccess = true; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取异常"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataResult<DataPage> GetList(InOutPut_BeginShift condition, DataPage page) |
|||
{ |
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
DataPage dataPage = new InOutPut_BeginShiftDAL().GetList(condition, page); |
|||
|
|||
result.IsSuccess = true; |
|||
result.Result = dataPage; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取列表异常!"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <returns>全部集合</returns>
|
|||
public List<InOutPut_BeginShift> GetAllList() |
|||
{ |
|||
try |
|||
{ |
|||
//获取信息列表
|
|||
return new InOutPut_BeginShiftDAL().GetALL(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public DataResult<int> Insert(InOutPut_BeginShift info) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
//基本信息
|
|||
info.PID = Guid.NewGuid().ToString(); |
|||
InOutPut_BeginShiftDAL cmdDAL = new InOutPut_BeginShiftDAL(); |
|||
result.Result = cmdDAL.Insert(info); |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public DataResult Update(InOutPut_BeginShift model) |
|||
{ |
|||
DataResult result = new DataResult(); |
|||
result.IsSuccess = true; |
|||
try |
|||
{ |
|||
InOutPut_BeginShift info = new InOutPut_BeginShiftDAL().Get(model); |
|||
|
|||
//基本信息
|
|||
//info.Type = model.Type;
|
|||
int temp = new InOutPut_BeginShiftDAL().Update(info); |
|||
|
|||
if (temp == 0) |
|||
{ |
|||
result.IsSuccess = false; |
|||
result.Msg = "更新失败!"; |
|||
return result; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "更新异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "更新异常"; |
|||
} |
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
|
|||
/// <summary>
|
|||
/// 删除信息
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string model) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
count = new InOutPut_BeginShiftDAL().Delete(model); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,200 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using QMAPP.BLL; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.Data; |
|||
using QMFrameWork.Log; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
using QMAPP.FJC.DAL.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.BLL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPutInventoryBLL : BaseBLL |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<InOutPut_Inventory> Get(InOutPut_Inventory model) |
|||
{ |
|||
DataResult<InOutPut_Inventory> result = new DataResult<InOutPut_Inventory>(); |
|||
try |
|||
{ |
|||
result.Result = new InOutPut_InventoryDAL().Get(model); |
|||
result.IsSuccess = true; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取异常"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataResult<DataPage> GetList(InOutPut_Inventory condition, DataPage page) |
|||
{ |
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
DataPage dataPage = new InOutPut_InventoryDAL().GetList(condition, page); |
|||
|
|||
result.IsSuccess = true; |
|||
result.Result = dataPage; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取列表异常!"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <returns>全部集合</returns>
|
|||
public List<InOutPut_Inventory> GetAllList() |
|||
{ |
|||
try |
|||
{ |
|||
//获取信息列表
|
|||
return new InOutPut_InventoryDAL().GetALL(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public DataResult<int> Insert(InOutPut_Inventory info) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
//基本信息
|
|||
info.PID = Guid.NewGuid().ToString(); |
|||
InOutPut_InventoryDAL cmdDAL = new InOutPut_InventoryDAL(); |
|||
result.Result = cmdDAL.Insert(info); |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public DataResult Update(InOutPut_Inventory model) |
|||
{ |
|||
DataResult result = new DataResult(); |
|||
result.IsSuccess = true; |
|||
try |
|||
{ |
|||
InOutPut_Inventory info = new InOutPut_InventoryDAL().Get(model); |
|||
|
|||
//基本信息
|
|||
info.Type = model.Type; |
|||
int temp = new InOutPut_InventoryDAL().Update(info); |
|||
|
|||
if (temp == 0) |
|||
{ |
|||
result.IsSuccess = false; |
|||
result.Msg = "更新失败!"; |
|||
return result; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "更新异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "更新异常"; |
|||
} |
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
|
|||
/// <summary>
|
|||
/// 删除信息
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string model) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
count = new InOutPut_InventoryDAL().Delete(model); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,200 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using QMAPP.BLL; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.Data; |
|||
using QMFrameWork.Log; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
using QMAPP.FJC.DAL.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.BLL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPutInventoryLogBLL : BaseBLL |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<InOutPut_InventoryLog> Get(InOutPut_InventoryLog model) |
|||
{ |
|||
DataResult<InOutPut_InventoryLog> result = new DataResult<InOutPut_InventoryLog>(); |
|||
try |
|||
{ |
|||
result.Result = new InOutPut_InventoryLogDAL().Get(model); |
|||
result.IsSuccess = true; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取异常"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataResult<DataPage> GetList(InOutPut_InventoryLog condition, DataPage page) |
|||
{ |
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
DataPage dataPage = new InOutPut_InventoryLogDAL().GetList(condition, page); |
|||
|
|||
result.IsSuccess = true; |
|||
result.Result = dataPage; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取列表异常!"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <returns>全部集合</returns>
|
|||
public List<InOutPut_InventoryLog> GetAllList() |
|||
{ |
|||
try |
|||
{ |
|||
//获取信息列表
|
|||
return new InOutPut_InventoryLogDAL().GetALL(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public DataResult<int> Insert(InOutPut_InventoryLog info) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
//基本信息
|
|||
info.PID = Guid.NewGuid().ToString(); |
|||
InOutPut_InventoryLogDAL cmdDAL = new InOutPut_InventoryLogDAL(); |
|||
result.Result = cmdDAL.Insert(info); |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public DataResult Update(InOutPut_InventoryLog model) |
|||
{ |
|||
DataResult result = new DataResult(); |
|||
result.IsSuccess = true; |
|||
try |
|||
{ |
|||
InOutPut_InventoryLog info = new InOutPut_InventoryLogDAL().Get(model); |
|||
|
|||
//基本信息
|
|||
info.Type = model.Type; |
|||
int temp = new InOutPut_InventoryLogDAL().Update(info); |
|||
|
|||
if (temp == 0) |
|||
{ |
|||
result.IsSuccess = false; |
|||
result.Msg = "更新失败!"; |
|||
return result; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "更新异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "更新异常"; |
|||
} |
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
|
|||
/// <summary>
|
|||
/// 删除信息
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string model) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
count = new InOutPut_InventoryLogDAL().Delete(model); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,201 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using QMAPP.BLL; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.Data; |
|||
using QMFrameWork.Log; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
using QMAPP.FJC.DAL.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.BLL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class PutMachineValueZhusuBLL : BaseBLL |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<PutMachineValueZhusu> Get(PutMachineValueZhusu model) |
|||
{ |
|||
DataResult<PutMachineValueZhusu> result = new DataResult<PutMachineValueZhusu>(); |
|||
try |
|||
{ |
|||
result.Result = new PutMachineValueZhusuDAL().Get(model); |
|||
result.IsSuccess = true; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取异常"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataResult<DataPage> GetList(PutMachineValueZhusu condition, DataPage page) |
|||
{ |
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
DataPage dataPage = new PutMachineValueZhusuDAL().GetList(condition, page); |
|||
|
|||
result.IsSuccess = true; |
|||
result.Result = dataPage; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取列表异常!"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <returns>全部集合</returns>
|
|||
public List<PutMachineValueZhusu> GetAllList() |
|||
{ |
|||
try |
|||
{ |
|||
//获取信息列表
|
|||
return new PutMachineValueZhusuDAL().GetALL(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public DataResult<int> Insert(PutMachineValueZhusu info) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
//基本信息
|
|||
info.PID = Guid.NewGuid().ToString(); |
|||
PutMachineValueZhusuDAL cmdDAL = new PutMachineValueZhusuDAL(); |
|||
result.Result = cmdDAL.Insert(info); |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public DataResult Update(PutMachineValueZhusu model) |
|||
{ |
|||
DataResult result = new DataResult(); |
|||
result.IsSuccess = true; |
|||
try |
|||
{ |
|||
PutMachineValueZhusu info = new PutMachineValueZhusuDAL().Get(model); |
|||
|
|||
//基本信息
|
|||
info.MachineCode = model.MachineCode; |
|||
info.Name = model.Name; |
|||
int temp = new PutMachineValueZhusuDAL().Update(info); |
|||
|
|||
if (temp == 0) |
|||
{ |
|||
result.IsSuccess = false; |
|||
result.Msg = "更新失败!"; |
|||
return result; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "更新异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "更新异常"; |
|||
} |
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
|
|||
/// <summary>
|
|||
/// 删除信息
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string model) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
count = new PutMachineValueZhusuDAL().Delete(model); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,301 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.FJC.Entity.MD; |
|||
using QMFrameWork.Data; |
|||
using System.Data; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.DAL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPut_BeginShiftDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public InOutPut_BeginShift Get(InOutPut_BeginShift info) |
|||
{ |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
info = session.Get<InOutPut_BeginShift>(info); |
|||
} |
|||
return info; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public InOutPut_BeginShift Get(string materialcode) |
|||
{ |
|||
try |
|||
{ |
|||
string sql = "SELECT * FROM [T_PA_InOutPut_BeginShift] WHERE [MATERIAL_CODE]=@materialcode"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
parameters.Add(new DataParameter("materialcode", materialcode)); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
var info = session.Get<InOutPut_BeginShift>(sql, parameters.ToArray()); |
|||
return info; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataPage GetList(InOutPut_BeginShift condition, DataPage page) |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = this.GetQuerySql(condition, ref parameters); |
|||
//分页关键字段及排序
|
|||
page.KeyName = "PID"; |
|||
if (string.IsNullOrEmpty(page.SortExpression)) |
|||
page.SortExpression = "CreateDate desc"; |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
page = session.GetDataPage<InOutPut_BeginShift>(sql, parameters.ToArray(), page); |
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public List<InOutPut_BeginShift> GetALL() |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = "SELECT * FROM T_PA_InOutPut_BeginShift WHERE IsCheck<> '1'"; |
|||
//分页关键字段及排序
|
|||
var LIST = new List<InOutPut_BeginShift>(); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
LIST = session.GetList<InOutPut_BeginShift>(sql, parameters.ToArray()).ToList(); |
|||
} |
|||
return LIST; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取查询语句
|
|||
/// <summary>
|
|||
/// 获取查询语句
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <param name="parameters">参数</param>
|
|||
/// <returns>查询语句</returns>
|
|||
private string GetQuerySql(InOutPut_BeginShift condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
|
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT PID,ProductCode,CreateUser,CreateDate,Remark1,Remark2,Remark3 "); |
|||
sqlBuilder.Append("FROM T_PA_InOutPut_BeginShift "); |
|||
|
|||
if (string.IsNullOrEmpty(condition.ProductCode) == false) |
|||
{ |
|||
whereBuilder.Append(" AND ProductCode = @ProductCode"); |
|||
parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = condition.ProductCode }); |
|||
} |
|||
|
|||
if (condition.CreateState != DateTime.MinValue.ToString()&& !string.IsNullOrEmpty(condition.CreateState)) |
|||
{ |
|||
whereBuilder.Append(" AND CreateDate >= @CreateState"); |
|||
parameters.Add(new DataParameter { ParameterName = "CreateState", DataType = DbType.String, Value = condition.CreateState }); |
|||
} |
|||
if (condition.CreateEnd != DateTime.MinValue.ToString() && !string.IsNullOrEmpty(condition.CreateEnd)) |
|||
{ |
|||
whereBuilder.Append(" AND CreateDate <= @CreateEnd"); |
|||
parameters.Add(new DataParameter { ParameterName = "CreateEnd", DataType = DbType.String, Value = condition.CreateEnd }); |
|||
} |
|||
|
|||
//查询条件
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
return sqlBuilder.ToString(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(InOutPut_BeginShift info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
sqlBuilder.Append("SELECT COUNT(0) FROM T_PA_InOutPut_BeginShift"); |
|||
if (info.PID == null) |
|||
{ |
|||
info.PID = ""; |
|||
} |
|||
whereBuilder.Append(" AND PID <> @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); |
|||
|
|||
//添加进行无重复字段判断代码
|
|||
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); |
|||
} |
|||
return count > 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public int Insert(InOutPut_BeginShift info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//插入基本信息
|
|||
count = session.Insert<InOutPut_BeginShift>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(InOutPut_BeginShift info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.Update<InOutPut_BeginShift>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("delete T_PA_InOutPut_BeginShift "); |
|||
sqlBuilder.Append("WHERE PID = @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); |
|||
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,329 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.FJC.Entity.MD; |
|||
using QMFrameWork.Data; |
|||
using System.Data; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.DAL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPut_InventoryDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public InOutPut_Inventory Get(InOutPut_Inventory info) |
|||
{ |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
info = session.Get<InOutPut_Inventory>(info); |
|||
} |
|||
return info; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public InOutPut_Inventory Get(string materialcode) |
|||
{ |
|||
try |
|||
{ |
|||
string sql = "SELECT * FROM [T_PA_InOutPut_Inventory] WHERE [MATERIAL_CODE]=@materialcode"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
parameters.Add(new DataParameter("materialcode", materialcode)); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
var info = session.Get<InOutPut_Inventory>(sql, parameters.ToArray()); |
|||
return info; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataPage GetList(InOutPut_Inventory condition, DataPage page) |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = this.GetQuerySql(condition, ref parameters); |
|||
//分页关键字段及排序
|
|||
page.KeyName = "PID"; |
|||
if (string.IsNullOrEmpty(page.SortExpression)) |
|||
page.SortExpression = "UpdateDate desc"; |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
page = session.GetDataPage<InOutPut_Inventory>(sql, parameters.ToArray(), page); |
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public List<InOutPut_Inventory> GetALL() |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = "SELECT * FROM T_PA_InOutPut_Inventory WHERE IsCheck<> '1'"; |
|||
//分页关键字段及排序
|
|||
var LIST = new List<InOutPut_Inventory>(); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
LIST = session.GetList<InOutPut_Inventory>(sql, parameters.ToArray()).ToList(); |
|||
} |
|||
return LIST; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取查询语句
|
|||
/// <summary>
|
|||
/// 获取查询语句
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <param name="parameters">参数</param>
|
|||
/// <returns>查询语句</returns>
|
|||
private string GetQuerySql(InOutPut_Inventory condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
|
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT PID, ProductCode,Type,CASE State WHEN '1' THEN '库存' WHEN '2' THEN '出库' WHEN '3' THEN '隔离' WHEN '4' THEN '报废' ELSE State END as 'State',CreateUser,CreateDate,UpdateUser,UpdateDate,Remark1,Remark2,Remark3,PlanID "); |
|||
sqlBuilder.Append("FROM T_PA_InOutPut_Inventory "); |
|||
|
|||
if (string.IsNullOrEmpty(condition.ProductCode) == false) |
|||
{ |
|||
whereBuilder.Append(" AND ProductCode = @ProductCode"); |
|||
parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = condition.ProductCode }); |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(condition.Type) == false) |
|||
{ |
|||
whereBuilder.Append(" AND Type = @Type"); |
|||
parameters.Add(new DataParameter { ParameterName = "Type", DataType = DbType.String, Value = condition.Type }); |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(condition.State) == false) |
|||
{ |
|||
whereBuilder.Append(" AND State = @State"); |
|||
parameters.Add(new DataParameter { ParameterName = "State", DataType = DbType.String, Value = condition.State }); |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(condition.PlanID) == false) |
|||
{ |
|||
whereBuilder.Append(" AND PlanID = @PlanID"); |
|||
parameters.Add(new DataParameter { ParameterName = "PlanID", DataType = DbType.String, Value = condition.PlanID }); |
|||
} |
|||
|
|||
if (condition.CreateState != DateTime.MinValue.ToString()&& condition.CreateState != null) |
|||
{ |
|||
whereBuilder.Append(" AND CreateDate >= @CreateState"); |
|||
parameters.Add(new DataParameter { ParameterName = "CreateState", DataType = DbType.String, Value = condition.CreateState }); |
|||
} |
|||
if (condition.CreateEnd != DateTime.MinValue.ToString() && condition.CreateEnd != null) |
|||
{ |
|||
whereBuilder.Append(" AND CreateDate <= @CreateEnd"); |
|||
parameters.Add(new DataParameter { ParameterName = "CreateEnd", DataType = DbType.String, Value = condition.CreateEnd }); |
|||
} |
|||
if (condition.UpdateState != DateTime.MinValue.ToString() && condition.UpdateState != null) |
|||
{ |
|||
whereBuilder.Append(" AND UpdateDate >= @UpdateState"); |
|||
parameters.Add(new DataParameter { ParameterName = "UpdateState", DataType = DbType.String, Value = condition.UpdateState }); |
|||
} |
|||
if (condition.UpdateEnd != DateTime.MinValue.ToString() && condition.UpdateEnd != null) |
|||
{ |
|||
whereBuilder.Append(" AND UpdateDate <= @UpdateEnd"); |
|||
parameters.Add(new DataParameter { ParameterName = "UpdateEnd", DataType = DbType.String, Value = condition.UpdateEnd }); |
|||
} |
|||
|
|||
//查询条件
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
return sqlBuilder.ToString(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(InOutPut_Inventory info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
sqlBuilder.Append("SELECT COUNT(0) FROM T_PA_InOutPut_Inventory"); |
|||
if (info.PID == null) |
|||
{ |
|||
info.PID = ""; |
|||
} |
|||
whereBuilder.Append(" AND PID <> @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); |
|||
|
|||
//添加进行无重复字段判断代码
|
|||
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); |
|||
} |
|||
return count > 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public int Insert(InOutPut_Inventory info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//插入基本信息
|
|||
count = session.Insert<InOutPut_Inventory>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(InOutPut_Inventory info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.Update<InOutPut_Inventory>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("delete T_PA_InOutPut_Inventory "); |
|||
sqlBuilder.Append("WHERE PID = @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); |
|||
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,329 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.FJC.Entity.MD; |
|||
using QMFrameWork.Data; |
|||
using System.Data; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.DAL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPut_InventoryLogDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public InOutPut_InventoryLog Get(InOutPut_InventoryLog info) |
|||
{ |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
info = session.Get<InOutPut_InventoryLog>(info); |
|||
} |
|||
return info; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public InOutPut_InventoryLog Get(string materialcode) |
|||
{ |
|||
try |
|||
{ |
|||
string sql = "SELECT * FROM [T_PA_InOutPut_InventoryLog] WHERE [MATERIAL_CODE]=@materialcode"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
parameters.Add(new DataParameter("materialcode", materialcode)); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
var info = session.Get<InOutPut_InventoryLog>(sql, parameters.ToArray()); |
|||
return info; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataPage GetList(InOutPut_InventoryLog condition, DataPage page) |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = this.GetQuerySql(condition, ref parameters); |
|||
//分页关键字段及排序
|
|||
page.KeyName = "PID"; |
|||
if (string.IsNullOrEmpty(page.SortExpression)) |
|||
page.SortExpression = "CreateDate desc"; |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
page = session.GetDataPage<InOutPut_InventoryLog>(sql, parameters.ToArray(), page); |
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public List<InOutPut_InventoryLog> GetALL() |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = "SELECT * FROM T_PA_InOutPut_InventoryLog WHERE IsCheck<> '1'"; |
|||
//分页关键字段及排序
|
|||
var LIST = new List<InOutPut_InventoryLog>(); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
LIST = session.GetList<InOutPut_InventoryLog>(sql, parameters.ToArray()).ToList(); |
|||
} |
|||
return LIST; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取查询语句
|
|||
/// <summary>
|
|||
/// 获取查询语句
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <param name="parameters">参数</param>
|
|||
/// <returns>查询语句</returns>
|
|||
private string GetQuerySql(InOutPut_InventoryLog condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
|
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT PID, ProductCode,Type,CASE State WHEN '1' THEN '库存' WHEN '2' THEN '出库' WHEN '3' THEN '隔离' WHEN '4' THEN '报废' ELSE State END as 'State',CreateUser,CreateDate "); |
|||
sqlBuilder.Append("FROM T_PA_InOutPut_InventoryLog "); |
|||
|
|||
if (string.IsNullOrEmpty(condition.ProductCode) == false) |
|||
{ |
|||
whereBuilder.Append(" AND ProductCode = @ProductCode"); |
|||
parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = condition.ProductCode }); |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(condition.Type) == false) |
|||
{ |
|||
whereBuilder.Append(" AND Type = @Type"); |
|||
parameters.Add(new DataParameter { ParameterName = "Type", DataType = DbType.String, Value = condition.Type }); |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(condition.State) == false) |
|||
{ |
|||
whereBuilder.Append(" AND State = @State"); |
|||
parameters.Add(new DataParameter { ParameterName = "State", DataType = DbType.String, Value = condition.State }); |
|||
} |
|||
|
|||
//if (string.IsNullOrEmpty(condition.PlanID) == false)
|
|||
//{
|
|||
// whereBuilder.Append(" AND PlanID = @PlanID");
|
|||
// parameters.Add(new DataParameter { ParameterName = "PlanID", DataType = DbType.String, Value = condition.PlanID });
|
|||
//}
|
|||
|
|||
if (condition.CreateState != DateTime.MinValue.ToString()&& !string.IsNullOrEmpty(condition.CreateState)) |
|||
{ |
|||
whereBuilder.Append(" AND CreateDate >= @CreateState"); |
|||
parameters.Add(new DataParameter { ParameterName = "CreateState", DataType = DbType.String, Value = condition.CreateState }); |
|||
} |
|||
if (condition.CreateEnd != DateTime.MinValue.ToString() && !string.IsNullOrEmpty(condition.CreateEnd)) |
|||
{ |
|||
whereBuilder.Append(" AND CreateDate <= @CreateEnd"); |
|||
parameters.Add(new DataParameter { ParameterName = "CreateEnd", DataType = DbType.String, Value = condition.CreateEnd }); |
|||
} |
|||
//if (condition.UpdateState != DateTime.MinValue.ToString() && condition.UpdateState != null)
|
|||
//{
|
|||
// whereBuilder.Append(" AND UpdateDate >= @UpdateState");
|
|||
// parameters.Add(new DataParameter { ParameterName = "UpdateState", DataType = DbType.String, Value = condition.UpdateState });
|
|||
//}
|
|||
//if (condition.UpdateEnd != DateTime.MinValue.ToString() && condition.UpdateEnd != null)
|
|||
//{
|
|||
// whereBuilder.Append(" AND UpdateDate <= @UpdateEnd");
|
|||
// parameters.Add(new DataParameter { ParameterName = "UpdateEnd", DataType = DbType.String, Value = condition.UpdateEnd });
|
|||
//}
|
|||
|
|||
//查询条件
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
return sqlBuilder.ToString(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(InOutPut_InventoryLog info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
sqlBuilder.Append("SELECT COUNT(0) FROM T_PA_InOutPut_InventoryLog"); |
|||
if (info.PID == null) |
|||
{ |
|||
info.PID = ""; |
|||
} |
|||
whereBuilder.Append(" AND PID <> @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); |
|||
|
|||
//添加进行无重复字段判断代码
|
|||
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); |
|||
} |
|||
return count > 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public int Insert(InOutPut_InventoryLog info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//插入基本信息
|
|||
count = session.Insert<InOutPut_InventoryLog>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(InOutPut_InventoryLog info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.Update<InOutPut_InventoryLog>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("delete T_PA_InOutPut_InventoryLog "); |
|||
sqlBuilder.Append("WHERE PID = @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); |
|||
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,290 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.FJC.Entity.MD; |
|||
using QMFrameWork.Data; |
|||
using System.Data; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.DAL.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:注塑料筒信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class PutMachineValueZhusuDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public PutMachineValueZhusu Get(PutMachineValueZhusu info) |
|||
{ |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
info = session.Get<PutMachineValueZhusu>(info); |
|||
} |
|||
return info; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public PutMachineValueZhusu Get(string materialcode) |
|||
{ |
|||
try |
|||
{ |
|||
string sql = "SELECT * FROM [T_MD_PutMachineValueZhusu] WHERE [MATERIAL_CODE]=@materialcode"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
parameters.Add(new DataParameter("materialcode", materialcode)); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
var info = session.Get<PutMachineValueZhusu>(sql, parameters.ToArray()); |
|||
return info; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataPage GetList(PutMachineValueZhusu condition, DataPage page) |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = this.GetQuerySql(condition, ref parameters); |
|||
//分页关键字段及排序
|
|||
page.KeyName = "PID"; |
|||
if (string.IsNullOrEmpty(page.SortExpression)) |
|||
page.SortExpression = "CreateData desc"; |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
page = session.GetDataPage<PutMachineValueZhusu>(sql, parameters.ToArray(), page); |
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public List<PutMachineValueZhusu> GetALL() |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = "SELECT * FROM T_MD_PutMachineValueZhusu WHERE IsCheck<> '1'"; |
|||
//分页关键字段及排序
|
|||
var LIST = new List<PutMachineValueZhusu>(); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
LIST = session.GetList<PutMachineValueZhusu>(sql, parameters.ToArray()).ToList(); |
|||
} |
|||
return LIST; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取查询语句
|
|||
/// <summary>
|
|||
/// 获取查询语句
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <param name="parameters">参数</param>
|
|||
/// <returns>查询语句</returns>
|
|||
private string GetQuerySql(PutMachineValueZhusu condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
|
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT PID,MachineCode,Name,CASE Type WHEN '1' THEN '单选' WHEN '2' THEN '填写单边值' WHEN '3' THEN '填写双边值' ELSE Type END AS 'Type',MValue,[Group],UserName,CreateData,Remark1,Remark2,Remark3,PValue "); |
|||
sqlBuilder.Append("FROM T_MD_PutMachineValueZhusu "); |
|||
|
|||
|
|||
|
|||
if (string.IsNullOrEmpty(condition.MachineCode) == false) |
|||
{ |
|||
whereBuilder.Append(" AND MachineCode = @MachineCode"); |
|||
parameters.Add(new DataParameter { ParameterName = "MachineCode", DataType = DbType.String, Value = condition.MachineCode }); |
|||
} |
|||
|
|||
//查询条件
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
return sqlBuilder.ToString(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(PutMachineValueZhusu info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_PutMachineValueZhusu"); |
|||
if (info.PID == null) |
|||
{ |
|||
info.PID = ""; |
|||
} |
|||
whereBuilder.Append(" AND PID <> @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); |
|||
|
|||
//添加进行无重复字段判断代码
|
|||
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); |
|||
} |
|||
return count > 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public int Insert(PutMachineValueZhusu info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//插入基本信息
|
|||
count = session.Insert<PutMachineValueZhusu>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(PutMachineValueZhusu info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.Update<PutMachineValueZhusu>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("delete T_MD_PutMachineValueZhusu "); |
|||
sqlBuilder.Append("WHERE PID = @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); |
|||
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,52 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMFrameWork.Data.Attributes; |
|||
using QMAPP.Entity; |
|||
using System.Data; |
|||
|
|||
namespace QMAPP.FJC.Entity.Dianjian |
|||
{ |
|||
/// </summary>
|
|||
/// 模块名称:
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2024年05月20日
|
|||
/// </summary>
|
|||
[DBTable(TableName = "T_MD_InOutPut_BeginShift")] |
|||
public class InOutPut_BeginShift : BaseEntity |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条码
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] |
|||
public string ProductCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "CreateUser", DataType = DbType.String)] |
|||
public string CreateUser { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "CreateDate", DataType = DbType.String)] |
|||
public string CreateDate { get; set; } |
|||
public string CreateState { get; set; } |
|||
public string CreateEnd { get; set; } |
|||
|
|||
|
|||
public string Remark1 { get; set; } |
|||
|
|||
public string Remark2 { get; set; } |
|||
|
|||
public string Remark3 { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMFrameWork.Data.Attributes; |
|||
using QMAPP.Entity; |
|||
using System.Data; |
|||
|
|||
namespace QMAPP.FJC.Entity.Dianjian |
|||
{ |
|||
/// </summary>
|
|||
/// 模块名称:
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2024年05月20日
|
|||
/// </summary>
|
|||
[DBTable(TableName = "T_MD_InOutPut_Inventory")] |
|||
public class InOutPut_Inventory : BaseEntity |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条码
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] |
|||
public string ProductCode { get; set; } |
|||
/// <summary>
|
|||
/// 类型 1:泡沫 2:注塑
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Type", DataType = DbType.String)] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 状态 1:库存 2:出库 3:隔离 4:报废
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "State", DataType = DbType.String)] |
|||
public string State { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "CreateUser", DataType = DbType.String)] |
|||
public string CreateUser { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "CreateDate", DataType = DbType.String)] |
|||
public string CreateDate { get; set; } |
|||
public string CreateState { get; set; } |
|||
public string CreateEnd { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 更新人
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "UpdateUser", DataType = DbType.String)] |
|||
public string UpdateUser { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 更新时间
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "UpdateDate", DataType = DbType.String)] |
|||
public string UpdateDate { get; set; } |
|||
public string UpdateState { get; set; } |
|||
public string UpdateEnd { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 计划号
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PlanID", DataType = DbType.String)] |
|||
public string PlanID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备用
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Remark1", DataType = DbType.String)] |
|||
public string Remark1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备用
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PlanID", DataType = DbType.String)] |
|||
public string Remark2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备用
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PlanID", DataType = DbType.String)] |
|||
public string Remark3 { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMFrameWork.Data.Attributes; |
|||
using QMAPP.Entity; |
|||
using System.Data; |
|||
|
|||
namespace QMAPP.FJC.Entity.Dianjian |
|||
{ |
|||
/// </summary>
|
|||
/// 模块名称:
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2024年05月20日
|
|||
/// </summary>
|
|||
[DBTable(TableName = "T_MD_InOutPut_InventoryLog")] |
|||
public class InOutPut_InventoryLog : BaseEntity |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条码
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] |
|||
public string ProductCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 类型 1:泡沫 2:注塑
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Type", DataType = DbType.String)] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 状态 1:库存 2:出库 3:隔离 4:报废
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "State", DataType = DbType.String)] |
|||
public string State { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建人
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "CreateUser", DataType = DbType.String)] |
|||
public string CreateUser { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "CreateDate", DataType = DbType.String)] |
|||
public string CreateDate { get; set; } |
|||
public string CreateState { get; set; } |
|||
public string CreateEnd { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,91 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMFrameWork.Data.Attributes; |
|||
using QMAPP.Entity; |
|||
using System.Data; |
|||
|
|||
namespace QMAPP.FJC.Entity.Dianjian |
|||
{ |
|||
/// </summary>
|
|||
/// 模块名称:泡沫点检记录
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2024年05月20日
|
|||
/// </summary>
|
|||
[DBTable(TableName = "T_MD_PutMachineValueZhusu")] |
|||
public class PutMachineValueZhusu : BaseEntity |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 设备code
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "MachineCode", DataType = DbType.String)] |
|||
public string MachineCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 设备名称
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Name", DataType = DbType.String)] |
|||
public string Name { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检类型
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Type", DataType = DbType.String)] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检值1
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "MValue", DataType = DbType.String)] |
|||
public string MValue { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检值2
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "PValue", DataType = DbType.String)] |
|||
public string PValue { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 班组
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Group", DataType = DbType.String)] |
|||
public string Group { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检人
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "UserName", DataType = DbType.String)] |
|||
public string UserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检时间
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "CreateData", DataType = DbType.String)] |
|||
public string CreateData { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备用字段
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Remark1", DataType = DbType.String)] |
|||
public string Remark1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备用字段
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Remark2", DataType = DbType.String)] |
|||
public string Remark2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备用字段
|
|||
/// </summary>
|
|||
[DBColumn(ColumnName = "Remark3", DataType = DbType.String)] |
|||
public string Remark3 { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,219 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.FJC.Web.Models.Basic; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.FJC.Entity.Basic; |
|||
using QMAPP.ServicesAgent; |
|||
using QMAPP.Entity; |
|||
using QMAPP.MD.Entity; |
|||
using QMAPP.MD.Web.Models; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using QMAPP.FJC.Web.Models.Bucket; |
|||
using QMAPP.MD.Entity.Bucket; |
|||
using QMAPP.FJC.Web.Models.Dianjian; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
public class InOutPutBeginShiftController : QController |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callback) |
|||
{ |
|||
string type = Request["Type"]; |
|||
InOutPut_BeginShiftModel seachModel = new InOutPut_BeginShiftModel(); |
|||
|
|||
if (callback == true) |
|||
TryGetSelectBuffer<InOutPut_BeginShiftModel>(out seachModel); |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/InOutPutBeginShift/GetList?Type="+ type; |
|||
return View("InOutPutBeginShiftList", seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
InOutPut_BeginShiftModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
InOutPut_BeginShift condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<InOutPut_BeginShiftModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<InOutPut_BeginShiftModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<InOutPut_BeginShiftModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
|
|||
//using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
|
|||
//{
|
|||
// file.WriteLine("Type:" + seachModel.Type);
|
|||
//}
|
|||
|
|||
condition = CopyToModel<InOutPut_BeginShift, InOutPut_BeginShiftModel>(seachModel); |
|||
#region wcf服务统一接口
|
|||
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("InOutPutBeginShiftBLL_GetList", condition, page); |
|||
|
|||
|
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
|
|||
DateGridResult<InOutPut_BeginShift> result = new DateGridResult<InOutPut_BeginShift>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<InOutPut_BeginShift>>(pageResult.Result.Result.ToString()); |
|||
#endregion
|
|||
return Content(result.GetJsonSource()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 编辑
|
|||
/// <summary>
|
|||
/// 编辑载入
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult Edit() |
|||
{ |
|||
InOutPut_BeginShiftModel model = new InOutPut_BeginShiftModel(); |
|||
string ID = Request.Params["PID"]; |
|||
InOutPut_BeginShift Entity = new InOutPut_BeginShift(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<InOutPut_BeginShift> result = new DataResult<InOutPut_BeginShift>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.PID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<InOutPut_BeginShift>>("InOutPutBeginShiftBLL_Get", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("InOutPut_InventoryEdit", model); |
|||
} |
|||
model = CopyToModel<InOutPut_BeginShiftModel, InOutPut_BeginShift>(result.Result); |
|||
} |
|||
return View("InOutPut_InventoryEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(InOutPut_BeginShiftModel saveModel) |
|||
{ |
|||
InOutPut_BeginShift Entity = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<InOutPut_BeginShift, InOutPut_BeginShiftModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.PID) == true) |
|||
{ |
|||
//新增
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.InOutPutBeginShiftBLL_Insert.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("InOutPut_InventoryEdit", saveModel); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.InOutPutBeginShiftBLL_Update.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("InOutPut_InventoryEdit", saveModel); |
|||
} |
|||
} |
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
/// <summary>
|
|||
/// 删除
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
public ActionResult Delete(InOutPut_BeginShift model) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
|
|||
try |
|||
{ |
|||
var result = wcfAgent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.DictService.InOutPutBeginShiftBLL_Delete.ToString(), selectKey); |
|||
if (result == 0) |
|||
{ |
|||
SetMessage("信息有关联,删除失败!"); |
|||
return List(true); |
|||
} |
|||
SetMessage(AppResource.DeleteMessage); |
|||
return List(true); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,219 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.FJC.Web.Models.Basic; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.FJC.Entity.Basic; |
|||
using QMAPP.ServicesAgent; |
|||
using QMAPP.Entity; |
|||
using QMAPP.MD.Entity; |
|||
using QMAPP.MD.Web.Models; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using QMAPP.FJC.Web.Models.Bucket; |
|||
using QMAPP.MD.Entity.Bucket; |
|||
using QMAPP.FJC.Web.Models.Dianjian; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
public class InOutPutInventoryController : QController |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callback) |
|||
{ |
|||
string type = Request["Type"]; |
|||
InOutPut_InventoryModel seachModel = new InOutPut_InventoryModel(); |
|||
seachModel.Type = type; |
|||
if (callback == true) |
|||
TryGetSelectBuffer<InOutPut_InventoryModel>(out seachModel); |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/InOutPutInventory/GetList?Type="+ type; |
|||
return View("InOutPutInventoryList", seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
InOutPut_InventoryModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
InOutPut_Inventory condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<InOutPut_InventoryModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<InOutPut_InventoryModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<InOutPut_InventoryModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
|
|||
using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true)) |
|||
{ |
|||
file.WriteLine("Type:" + seachModel.Type); |
|||
} |
|||
|
|||
condition = CopyToModel<InOutPut_Inventory, InOutPut_InventoryModel>(seachModel); |
|||
#region wcf服务统一接口
|
|||
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("InOutPutInventoryBLL_GetList", condition, page); |
|||
|
|||
|
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
|
|||
DateGridResult<InOutPut_Inventory> result = new DateGridResult<InOutPut_Inventory>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<InOutPut_Inventory>>(pageResult.Result.Result.ToString()); |
|||
#endregion
|
|||
return Content(result.GetJsonSource()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 编辑
|
|||
/// <summary>
|
|||
/// 编辑载入
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult Edit() |
|||
{ |
|||
InOutPut_InventoryModel model = new InOutPut_InventoryModel(); |
|||
string ID = Request.Params["PID"]; |
|||
InOutPut_Inventory Entity = new InOutPut_Inventory(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<InOutPut_Inventory> result = new DataResult<InOutPut_Inventory>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.PID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<InOutPut_Inventory>>("InOutPutInventoryBLL_Get", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("InOutPut_InventoryEdit", model); |
|||
} |
|||
model = CopyToModel<InOutPut_InventoryModel, InOutPut_Inventory>(result.Result); |
|||
} |
|||
return View("InOutPut_InventoryEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(InOutPut_InventoryModel saveModel) |
|||
{ |
|||
InOutPut_Inventory Entity = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<InOutPut_Inventory, InOutPut_InventoryModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.PID) == true) |
|||
{ |
|||
//新增
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.InOutPutInventoryBLL_Insert.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("InOutPut_InventoryEdit", saveModel); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.InOutPutInventoryBLL_Update.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("InOutPut_InventoryEdit", saveModel); |
|||
} |
|||
} |
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
/// <summary>
|
|||
/// 删除
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
public ActionResult Delete(InOutPut_Inventory model) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
|
|||
try |
|||
{ |
|||
var result = wcfAgent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.DictService.InOutPutInventoryBLL_Delete.ToString(), selectKey); |
|||
if (result == 0) |
|||
{ |
|||
SetMessage("信息有关联,删除失败!"); |
|||
return List(true); |
|||
} |
|||
SetMessage(AppResource.DeleteMessage); |
|||
return List(true); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,219 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.FJC.Web.Models.Basic; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.FJC.Entity.Basic; |
|||
using QMAPP.ServicesAgent; |
|||
using QMAPP.Entity; |
|||
using QMAPP.MD.Entity; |
|||
using QMAPP.MD.Web.Models; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using QMAPP.FJC.Web.Models.Bucket; |
|||
using QMAPP.MD.Entity.Bucket; |
|||
using QMAPP.FJC.Web.Models.Dianjian; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
public class InOutPutInventoryLogController : QController |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callback) |
|||
{ |
|||
string type = Request["Type"]; |
|||
InOutPut_InventoryLogModel seachModel = new InOutPut_InventoryLogModel(); |
|||
seachModel.Type = type; |
|||
if (callback == true) |
|||
TryGetSelectBuffer<InOutPut_InventoryLogModel>(out seachModel); |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/InOutPutInventoryLog/GetList?Type="+ type; |
|||
return View("InOutPutInventoryLogList", seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
InOutPut_InventoryLogModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
InOutPut_InventoryLog condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<InOutPut_InventoryLogModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<InOutPut_InventoryLogModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<InOutPut_InventoryLogModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
|
|||
//using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
|
|||
//{
|
|||
// file.WriteLine("Type:" + seachModel.Type);
|
|||
//}
|
|||
|
|||
condition = CopyToModel<InOutPut_InventoryLog, InOutPut_InventoryLogModel>(seachModel); |
|||
#region wcf服务统一接口
|
|||
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("InOutPutInventoryLogBLL_GetList", condition, page); |
|||
|
|||
|
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
|
|||
DateGridResult<InOutPut_InventoryLog> result = new DateGridResult<InOutPut_InventoryLog>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<InOutPut_InventoryLog>>(pageResult.Result.Result.ToString()); |
|||
#endregion
|
|||
return Content(result.GetJsonSource()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 编辑
|
|||
/// <summary>
|
|||
/// 编辑载入
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult Edit() |
|||
{ |
|||
InOutPut_InventoryLogModel model = new InOutPut_InventoryLogModel(); |
|||
string ID = Request.Params["PID"]; |
|||
InOutPut_InventoryLog Entity = new InOutPut_InventoryLog(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<InOutPut_InventoryLog> result = new DataResult<InOutPut_InventoryLog>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.PID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<InOutPut_InventoryLog>>("InOutPutInventoryLogBLL_Get", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("InOutPut_InventoryEdit", model); |
|||
} |
|||
model = CopyToModel<InOutPut_InventoryLogModel, InOutPut_InventoryLog>(result.Result); |
|||
} |
|||
return View("InOutPut_InventoryEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(InOutPut_InventoryLogModel saveModel) |
|||
{ |
|||
InOutPut_InventoryLog Entity = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<InOutPut_InventoryLog, InOutPut_InventoryLogModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.PID) == true) |
|||
{ |
|||
//新增
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.InOutPutInventoryLogBLL_Insert.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("InOutPut_InventoryEdit", saveModel); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.InOutPutInventoryLogBLL_Update.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("InOutPut_InventoryEdit", saveModel); |
|||
} |
|||
} |
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
/// <summary>
|
|||
/// 删除
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
public ActionResult Delete(InOutPut_InventoryLog model) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
|
|||
try |
|||
{ |
|||
var result = wcfAgent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.DictService.InOutPutInventoryLogBLL_Delete.ToString(), selectKey); |
|||
if (result == 0) |
|||
{ |
|||
SetMessage("信息有关联,删除失败!"); |
|||
return List(true); |
|||
} |
|||
SetMessage(AppResource.DeleteMessage); |
|||
return List(true); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,211 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.FJC.Web.Models.Basic; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.FJC.Entity.Basic; |
|||
using QMAPP.ServicesAgent; |
|||
using QMAPP.Entity; |
|||
using QMAPP.MD.Entity; |
|||
using QMAPP.MD.Web.Models; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using QMAPP.FJC.Web.Models.Bucket; |
|||
using QMAPP.MD.Entity.Bucket; |
|||
using QMAPP.FJC.Web.Models.Dianjian; |
|||
using QMAPP.FJC.Entity.Dianjian; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
public class PutMachineValueZhusuController : QController |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callback) |
|||
{ |
|||
PutMachineValueZhusuModel seachModel = new PutMachineValueZhusuModel(); |
|||
if (callback == true) |
|||
TryGetSelectBuffer<PutMachineValueZhusuModel>(out seachModel); |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/PutMachineValueZhusu/GetList"; |
|||
return View("PutMachineValueZhusuList", seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
PutMachineValueZhusuModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
PutMachineValueZhusu condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<PutMachineValueZhusuModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<PutMachineValueZhusuModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<PutMachineValueZhusuModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
condition = CopyToModel<PutMachineValueZhusu, PutMachineValueZhusuModel>(seachModel); |
|||
#region wcf服务统一接口
|
|||
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("PutMachineValueZhusuBLL_GetList", condition, page); |
|||
|
|||
|
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
|
|||
DateGridResult<PutMachineValueZhusu> result = new DateGridResult<PutMachineValueZhusu>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<PutMachineValueZhusu>>(pageResult.Result.Result.ToString()); |
|||
#endregion
|
|||
return Content(result.GetJsonSource()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 编辑
|
|||
/// <summary>
|
|||
/// 编辑载入
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult Edit() |
|||
{ |
|||
PutMachineValueZhusuModel model = new PutMachineValueZhusuModel(); |
|||
string ID = Request.Params["PID"]; |
|||
PutMachineValueZhusu Entity = new PutMachineValueZhusu(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<PutMachineValueZhusu> result = new DataResult<PutMachineValueZhusu>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.PID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<PutMachineValueZhusu>>("PutMachineValueZhusuBLL_Get", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("PutMachineValueZhusuEdit", model); |
|||
} |
|||
model = CopyToModel<PutMachineValueZhusuModel, PutMachineValueZhusu>(result.Result); |
|||
} |
|||
return View("PutMachineValueZhusuEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(PutMachineValueZhusuModel saveModel) |
|||
{ |
|||
PutMachineValueZhusu Entity = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<PutMachineValueZhusu, PutMachineValueZhusuModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.PID) == true) |
|||
{ |
|||
//新增
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineValueZhusuBLL_Insert.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("PutMachineValueZhusuEdit", saveModel); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineValueZhusuBLL_Update.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("工厂编码已存在!"); |
|||
return View("PutMachineValueZhusuEdit", saveModel); |
|||
} |
|||
} |
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
/// <summary>
|
|||
/// 删除
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
public ActionResult Delete(PutMachineValueZhusu model) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
|
|||
try |
|||
{ |
|||
var result = wcfAgent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.DictService.PutMachineValueZhusuBLL_Delete.ToString(), selectKey); |
|||
if (result == 0) |
|||
{ |
|||
SetMessage("信息有关联,删除失败!"); |
|||
return List(true); |
|||
} |
|||
SetMessage(AppResource.DeleteMessage); |
|||
return List(true); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,71 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc.Html; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMFrameWork.WebUI; |
|||
|
|||
namespace QMAPP.FJC.Web.Models.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:库存信息信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPut_BeginShiftModel : QDGModel |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] |
|||
[DGColumn(Hidden = true, PrimaryKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条码
|
|||
/// </summary>
|
|||
[Description("条码")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string ProductCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 操作用户
|
|||
/// </summary>
|
|||
[Description("操作用户")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string CreateUser { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 操作时间
|
|||
/// </summary>
|
|||
[Description("操作时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string CreateDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 开始时间
|
|||
/// </summary>
|
|||
[Description("开始时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center, Hidden = true)] |
|||
public string CreateState { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结束时间
|
|||
/// </summary>
|
|||
[Description("结束时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] |
|||
public string CreateEnd { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,91 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc.Html; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMFrameWork.WebUI; |
|||
|
|||
namespace QMAPP.FJC.Web.Models.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:库存信息信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPut_InventoryLogModel : QDGModel |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] |
|||
[DGColumn(Hidden = true, PrimaryKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条码
|
|||
/// </summary>
|
|||
[Description("条码")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string ProductCode { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Description("类型")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Description("状态")] |
|||
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
|
|||
[HTMLInput(UpdateRead = false, required = true, JsonUtl = "/Dict/GetInventoryTypeComboxSource", MaxLength = 15, Width = 100)] |
|||
[InputType(inputType.combobox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string State { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 操作用户
|
|||
/// </summary>
|
|||
[Description("操作用户")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string CreateUser { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 操作时间
|
|||
/// </summary>
|
|||
[Description("操作时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string CreateDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 开始时间
|
|||
/// </summary>
|
|||
[Description("开始时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center, Hidden = true)] |
|||
public string CreateState { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结束时间
|
|||
/// </summary>
|
|||
[Description("结束时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] |
|||
public string CreateEnd { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,136 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc.Html; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMFrameWork.WebUI; |
|||
|
|||
namespace QMAPP.FJC.Web.Models.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:库存信息信息
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2021年07月13日
|
|||
/// </summary>
|
|||
public class InOutPut_InventoryModel : QDGModel |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] |
|||
[DGColumn(Hidden = true, PrimaryKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 计划编号
|
|||
/// </summary>
|
|||
[Description("计划编号")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string PlanID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条码
|
|||
/// </summary>
|
|||
[Description("条码")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string ProductCode { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Description("类型")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center,Hidden = true)] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 状态
|
|||
/// </summary>
|
|||
[Description("状态")] |
|||
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
|
|||
[HTMLInput(UpdateRead = false, required = true, JsonUtl = "/Dict/GetInventoryTypeComboxSource", MaxLength = 15, Width = 100)] |
|||
[InputType(inputType.combobox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string State { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库用户
|
|||
/// </summary>
|
|||
[Description("入库用户")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string CreateUser { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库时间
|
|||
/// </summary>
|
|||
[Description("入库时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string CreateDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库开始时间
|
|||
/// </summary>
|
|||
[Description("入库时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string CreateState { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库结束时间
|
|||
/// </summary>
|
|||
[Description("入库时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string CreateEnd { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 更新用户
|
|||
/// </summary>
|
|||
[Description("更新用户")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string UpdateUser { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 更新时间
|
|||
/// </summary>
|
|||
[Description("更新时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string UpdateDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 更新开始时间
|
|||
/// </summary>
|
|||
[Description("入库时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string UpdateState { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 更新结束时间
|
|||
/// </summary>
|
|||
[Description("入库时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string UpdateEnd { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,101 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc.Html; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMFrameWork.WebUI; |
|||
|
|||
namespace QMAPP.FJC.Web.Models.Dianjian |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:泡沫点检记录
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2024年05月22日
|
|||
/// </summary>
|
|||
public class PutMachineValueZhusuModel : QDGModel |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] |
|||
[DGColumn(Hidden = true, PrimaryKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 设备编号
|
|||
/// </summary>
|
|||
[Description("设备编号")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string MachineCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
[Description("名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 250, DataAlign = DataAlign.center)] |
|||
public string Name { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 类型
|
|||
/// </summary>
|
|||
[Description("类型")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检值1
|
|||
/// </summary>
|
|||
[Description("点检值1")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] |
|||
public string MValue { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 点检值2
|
|||
/// </summary>
|
|||
[Description("点检值2")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string PValue { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 班次
|
|||
/// </summary>
|
|||
[Description("班次")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string Group { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检人
|
|||
/// </summary>
|
|||
[Description("点检人")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string UserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 点检时间
|
|||
/// </summary>
|
|||
[Description("点检时间")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string CreateData { get; set; } |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,100 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.InOutPut_BeginShiftModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
工厂信息列表 |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPSeach(80,true) %> |
|||
<table id="condiTable"> |
|||
<tr> |
|||
|
|||
<th align="right"> |
|||
<%=Html.QV(p => p.ProductCode)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.ProductCode)%> |
|||
</td> |
|||
|
|||
<th align="right"> |
|||
<%=Html.QV(p => p.CreateState)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CreateState)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.CreateEnd)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CreateEnd)%> |
|||
</td> |
|||
|
|||
|
|||
</table> |
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.Dianjian.InOutPut_BeginShiftModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<%=Html.Hidden("PID")%> |
|||
<%=Html.Hidden("Type")%> |
|||
<script language="javascript" type="text/javascript"> |
|||
//添加 |
|||
function Add() { |
|||
openAppWindow1('信息添加', 'Edit', '350', '380'); |
|||
} |
|||
//修改 |
|||
function Update() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
document.getElementById("selectKey").value = ids; |
|||
openAppWindow1('修改', 'Edit?PID=' + ids, '350', '380'); |
|||
} |
|||
//整车添加 |
|||
function AddPutMachine() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
|
|||
var MachinePID = document.getElementById("PID").value; |
|||
openAppWindow1('查询上下限', 'AddPutMachine?MachinePID=' + MachinePID, '650', '380'); |
|||
} |
|||
//删除 |
|||
function Delete() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("错误", "至少选择一条记录"); |
|||
} |
|||
else { |
|||
document.getElementById("selectKey").value = ids; |
|||
MSQ("提示", "确定要删除选中的记录吗?", function () { |
|||
submitByButton("Delete"); |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td align="center"> |
|||
<%=Html.QTButtonSearch("InOutPutBeginShift", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
@ -0,0 +1,122 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.InOutPut_InventoryModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
工厂信息列表 |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPSeach(100,true) %> |
|||
<table id="condiTable"> |
|||
<tr> |
|||
|
|||
<th align="right"> |
|||
<%=Html.QV(p => p.ProductCode)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.ProductCode)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.State)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.State)%> |
|||
</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.CreateState)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CreateState)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.CreateEnd)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CreateEnd)%> |
|||
</td> |
|||
|
|||
<th align="right"> |
|||
<%=Html.QV(p => p.UpdateState)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.UpdateState)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.UpdateEnd)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.UpdateEnd)%> |
|||
</td> |
|||
</tr> |
|||
|
|||
|
|||
</table> |
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.Dianjian.InOutPut_InventoryModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<%=Html.Hidden("PID")%> |
|||
<%=Html.Hidden("Type")%> |
|||
<script language="javascript" type="text/javascript"> |
|||
//添加 |
|||
function Add() { |
|||
openAppWindow1('信息添加', 'Edit', '350', '380'); |
|||
} |
|||
//修改 |
|||
function Update() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
document.getElementById("selectKey").value = ids; |
|||
openAppWindow1('修改', 'Edit?PID=' + ids, '350', '380'); |
|||
} |
|||
//整车添加 |
|||
function AddPutMachine() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
|
|||
var MachinePID = document.getElementById("PID").value; |
|||
openAppWindow1('查询上下限', 'AddPutMachine?MachinePID=' + MachinePID, '650', '380'); |
|||
} |
|||
//删除 |
|||
function Delete() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("错误", "至少选择一条记录"); |
|||
} |
|||
else { |
|||
document.getElementById("selectKey").value = ids; |
|||
MSQ("提示", "确定要删除选中的记录吗?", function () { |
|||
submitByButton("Delete"); |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td align="center"> |
|||
<%=Html.QTButtonSearch("InOutPutInventory", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
@ -0,0 +1,110 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.InOutPut_InventoryLogModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
工厂信息列表 |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPSeach(100,true) %> |
|||
<table id="condiTable"> |
|||
<tr> |
|||
|
|||
<th align="right"> |
|||
<%=Html.QV(p => p.ProductCode)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.ProductCode)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.State)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.State)%> |
|||
</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.CreateState)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CreateState)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.CreateEnd)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CreateEnd)%> |
|||
</td> |
|||
|
|||
|
|||
|
|||
|
|||
</table> |
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.Dianjian.InOutPut_InventoryLogModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<%=Html.Hidden("PID")%> |
|||
<%=Html.Hidden("Type")%> |
|||
<script language="javascript" type="text/javascript"> |
|||
//添加 |
|||
function Add() { |
|||
openAppWindow1('信息添加', 'Edit', '350', '380'); |
|||
} |
|||
//修改 |
|||
function Update() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
document.getElementById("selectKey").value = ids; |
|||
openAppWindow1('修改', 'Edit?PID=' + ids, '350', '380'); |
|||
} |
|||
//整车添加 |
|||
function AddPutMachine() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
|
|||
var MachinePID = document.getElementById("PID").value; |
|||
openAppWindow1('查询上下限', 'AddPutMachine?MachinePID=' + MachinePID, '650', '380'); |
|||
} |
|||
//删除 |
|||
function Delete() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("错误", "至少选择一条记录"); |
|||
} |
|||
else { |
|||
document.getElementById("selectKey").value = ids; |
|||
MSQ("提示", "确定要删除选中的记录吗?", function () { |
|||
submitByButton("Delete"); |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td align="center"> |
|||
<%=Html.QTButtonSearch("InOutPutInventoryLog", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
@ -0,0 +1,85 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.PutMachineValueZhusuModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
工厂信息列表 |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPSeach(80,true) %> |
|||
<table id="condiTable"> |
|||
<tr> |
|||
|
|||
<th align="right"> |
|||
<%=Html.QV(p => p.MachineCode)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.MachineCode)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.Dianjian.PutMachineValueZhusuModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<%=Html.Hidden("PID")%> |
|||
<script language="javascript" type="text/javascript"> |
|||
//添加 |
|||
function Add() { |
|||
openAppWindow1('信息添加', 'Edit', '350', '380'); |
|||
} |
|||
//修改 |
|||
function Update() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
document.getElementById("selectKey").value = ids; |
|||
openAppWindow1('修改', 'Edit?PID=' + ids, '350', '380'); |
|||
} |
|||
//整车添加 |
|||
function AddPutMachine() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
|
|||
var MachinePID = document.getElementById("PID").value; |
|||
openAppWindow1('查询上下限', 'AddPutMachine?MachinePID=' + MachinePID, '650', '380'); |
|||
} |
|||
//删除 |
|||
function Delete() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("错误", "至少选择一条记录"); |
|||
} |
|||
else { |
|||
document.getElementById("selectKey").value = ids; |
|||
MSQ("提示", "确定要删除选中的记录吗?", function () { |
|||
submitByButton("Delete"); |
|||
}) |
|||
} |
|||
} |
|||
</script> |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td align="center"> |
|||
<%=Html.QTButtonSearch("PutMachineValueZhusu", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
@ -0,0 +1,52 @@ |
|||
using QMAPP.BLL.Sys; |
|||
using QMAPP.DAL.Sys; |
|||
using QMAPP.Entity.Sys; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.Linq; |
|||
using System.Net; |
|||
using System.Net.Http; |
|||
using System.Threading.Tasks; |
|||
using System.Web.Http; |
|||
using WebAPI.App_Start; |
|||
using WebAPI.Models; |
|||
|
|||
namespace WebAPI.Controllers |
|||
{ |
|||
|
|||
public class BeginShiftController : ApiController |
|||
{ |
|||
|
|||
public async Task<IHttpActionResult> Insert() |
|||
{ |
|||
var request = await this.Request.Content.ReadAsStringAsync(); |
|||
|
|||
var requeststr = request.Replace("\r", "").Replace("\n", ""); |
|||
|
|||
var resObj = JsonHelper.Instance.JsonToObj<BeginShift>(requeststr); |
|||
|
|||
var sql = $"select * from T_PA_InOutPut_BeginShift where ProductCode = '{resObj.ProductCode}' "; |
|||
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sql); |
|||
if (dataSet.Tables[0].Rows.Count <= 0) |
|||
{ |
|||
var sql2 = $"INSERT INTO [dbo].[T_PA_InOutPut_BeginShift] ([PID], [ProductCode], [CreateUser], [CreateDate], [Remark1], [Remark2], [Remark3]) VALUES " + |
|||
$"(NEWID(), '{resObj.ProductCode}', '{resObj.CreateUser}', '{DateTime.Now}', NULL, NULL, NULL);"; |
|||
SqlData.InsertWare(sql2); |
|||
} |
|||
else |
|||
{ |
|||
var ResponseNOK = new Response(); |
|||
ResponseNOK.Code = 400; |
|||
ResponseNOK.Message = "禁止重复操作!"; |
|||
return Ok(ResponseNOK); |
|||
} |
|||
|
|||
var Response = new Response(); |
|||
|
|||
return Ok(Response); |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
|
|||
namespace WebAPI.Models |
|||
{ |
|||
public class BeginShift |
|||
{ |
|||
public string PID { get; set; } |
|||
|
|||
public string ProductCode { get; set; } |
|||
|
|||
public string CreateUser { get; set; } |
|||
|
|||
public string CreateDate { get; set; } |
|||
|
|||
public string Remark1 { get; set; } |
|||
|
|||
public string Remark2 { get; set; } |
|||
|
|||
public string Remark3 { get; set; } |
|||
|
|||
public string MFGNAME { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
|
|||
namespace WebAPI.Models |
|||
{ |
|||
public class DefectDict |
|||
{ |
|||
public string PID { get; set; } |
|||
|
|||
public string MFGCODETYPE { get; set; } |
|||
|
|||
public string MFGCODETYPENAME { get; set; } |
|||
|
|||
public string TYPE_CODE { get; set; } |
|||
|
|||
public string MFGCODE { get; set; } |
|||
|
|||
public string MFGNAME { get; set; } |
|||
|
|||
} |
|||
} |
Loading…
Reference in new issue