Browse Source

保存

master
张松男 6 months ago
parent
commit
7ffc2702c0
  1. 30
      APP/QMAPP.Web/App_Data/Menu.xml
  2. 10
      APP/QMAPP.Web/App_Data/PCPower.xml
  3. 200
      APPQ5/QMAPP.FJC.BLL/Dianjian/InOutPutBeginShiftBLL.cs
  4. 200
      APPQ5/QMAPP.FJC.BLL/Dianjian/InOutPutInventoryBLL.cs
  5. 200
      APPQ5/QMAPP.FJC.BLL/Dianjian/InOutPutInventoryLogBLL.cs
  6. 201
      APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineValueZhusuBLL.cs
  7. 4
      APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj
  8. 301
      APPQ5/QMAPP.FJC.DAL/Dianjian/InOutPut_BeginShiftDAL.cs
  9. 329
      APPQ5/QMAPP.FJC.DAL/Dianjian/InOutPut_InventoryDAL.cs
  10. 329
      APPQ5/QMAPP.FJC.DAL/Dianjian/InOutPut_InventoryLogDAL.cs
  11. 290
      APPQ5/QMAPP.FJC.DAL/Dianjian/PutMachineValueZhusuDAL.cs
  12. 4
      APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj
  13. 52
      APPQ5/QMAPP.FJC.Entity/Dianjian/InOutPut_BeginShift.cs
  14. 95
      APPQ5/QMAPP.FJC.Entity/Dianjian/InOutPut_Inventory.cs
  15. 58
      APPQ5/QMAPP.FJC.Entity/Dianjian/InOutPut_InventoryLog.cs
  16. 91
      APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachineValueZhusu.cs
  17. 4
      APPQ5/QMAPP.FJC.Entity/QMAPP.FJC.Entity.csproj
  18. 27
      APPQ5/QMAPP.FJC.Web/Controllers/DictController.cs
  19. 219
      APPQ5/QMAPP.FJC.Web/Controllers/InOutPutBeginShiftController.cs
  20. 219
      APPQ5/QMAPP.FJC.Web/Controllers/InOutPutInventoryController.cs
  21. 219
      APPQ5/QMAPP.FJC.Web/Controllers/InOutPutInventoryLogController.cs
  22. 211
      APPQ5/QMAPP.FJC.Web/Controllers/PutMachineValueZhusuController.cs
  23. 71
      APPQ5/QMAPP.FJC.Web/Models/Dianjian/InOutPut_BeginShiftModel.cs
  24. 91
      APPQ5/QMAPP.FJC.Web/Models/Dianjian/InOutPut_InventoryLogModel.cs
  25. 136
      APPQ5/QMAPP.FJC.Web/Models/Dianjian/InOutPut_InventoryModel.cs
  26. 101
      APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineValueZhusuModel.cs
  27. 12
      APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
  28. 100
      APPQ5/QMAPP.FJC.Web/Views/InOutPutBeginShift/InOutPutBeginShiftList.aspx
  29. 122
      APPQ5/QMAPP.FJC.Web/Views/InOutPutInventory/InOutPutInventoryList.aspx
  30. 110
      APPQ5/QMAPP.FJC.Web/Views/InOutPutInventoryLog/InOutPutInventoryLogList.aspx
  31. 85
      APPQ5/QMAPP.FJC.Web/Views/PutMachineValueZhusu/PutMachineValueZhusuList.aspx
  32. 62
      AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
  33. 25
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml
  34. 52
      WebAPI/Controllers/BeginShiftController.cs
  35. 110
      WebAPI/Controllers/InventoryController.cs
  36. 27
      WebAPI/Models/BeginShift.cs
  37. 23
      WebAPI/Models/DefectDict.cs
  38. 4
      WebAPI/Models/Inventory.cs
  39. 3
      WebAPI/WebAPI.csproj

30
APP/QMAPP.Web/App_Data/Menu.xml

@ -861,6 +861,36 @@
<Action ContorllerName="PutMachineValue" ActionName="List" PowerID="CD20300001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20400000" SystemID="FJC" MenuDes="注塑点检记录" Action="/PutMachineValueZhusu/List" Target="url" PowerID="CD20400000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="PutMachineValueZhusu" ActionName="List" PowerID="CD20400001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20500000" SystemID="FJC" MenuDes="泡沫库存" Action="/InOutPutInventory/List?Type=1" Target="url" PowerID="CD20500000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="InOutPutInventory" ActionName="List" PowerID="CD20500001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20600000" SystemID="FJC" MenuDes="注塑库存" Action="/InOutPutInventory/List?Type=2" Target="url" PowerID="CD20600000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="InOutPutInventory" ActionName="List" PowerID="CD20600001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20700000" SystemID="FJC" MenuDes="泡沫库存日志" Action="/InOutPutInventoryLog/List?Type=1" Target="url" PowerID="CD20700000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="InOutPutInventoryLog" ActionName="List" PowerID="CD20700001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20800000" SystemID="FJC" MenuDes="注塑库存日志" Action="/InOutPutInventoryLog/List?Type=2" Target="url" PowerID="CD20800000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="InOutPutInventoryLog" ActionName="List" PowerID="CD20800001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20900000" SystemID="FJC" MenuDes="开班件查询" Action="/InOutPutBeginShift/List" Target="url" PowerID="CD20900000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="InOutPutBeginShift" ActionName="List" PowerID="CD20900001">查询</Action>
</Actions>
</MenuItem>
<!--<MenuItem MenuID="13150000" SystemID="MESReport" MenuDes="班次节拍统计" Action="/ProduceCycleTimeShift/Index" Target="url" PowerID="CD13101000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="13000000" Seq="1">
<Actions>

10
APP/QMAPP.Web/App_Data/PCPower.xml

@ -101,7 +101,11 @@
<PowerInfo PowerID="CD98000000" PowerDes="手持功能" PowerType="group" ActionList="" Visible="true" Seq="1" SuperID=""></PowerInfo>
<PowerInfo PowerID="PDA0000001" PowerDes="泡沫点检" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000002" PowerDes="泡沫投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000003" PowerDes="注塑点检" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000004" PowerDes="注塑投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000003" PowerDes="泡沫上悬连" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000004" PowerDes="泡沫下悬连" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000004" PowerDes="泡沫不良品" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="SPDA000001" PowerDes="注塑点检" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="SPDA000002" PowerDes="注塑投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="SPDA000003" PowerDes="开班件扫码" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="SPDA000004" PowerDes="注塑不良品" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
</PowerList>

200
APPQ5/QMAPP.FJC.BLL/Dianjian/InOutPutBeginShiftBLL.cs

@ -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
}
}

200
APPQ5/QMAPP.FJC.BLL/Dianjian/InOutPutInventoryBLL.cs

@ -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
}
}

200
APPQ5/QMAPP.FJC.BLL/Dianjian/InOutPutInventoryLogBLL.cs

@ -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
}
}

201
APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineValueZhusuBLL.cs

@ -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
}
}

4
APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj

@ -125,6 +125,10 @@
<Compile Include="Common\FileHelper.cs" />
<Compile Include="Common\IdentityScope.cs" />
<Compile Include="CompleteStatistics\CompleteStatisticsBLL.cs" />
<Compile Include="Dianjian\InOutPutBeginShiftBLL.cs" />
<Compile Include="Dianjian\InOutPutInventoryLogBLL.cs" />
<Compile Include="Dianjian\InOutPutInventoryBLL.cs" />
<Compile Include="Dianjian\PutMachineValueZhusuBLL.cs" />
<Compile Include="Dianjian\PutMachineValueBLL.cs" />
<Compile Include="Dianjian\PutMachineBLL.cs" />
<Compile Include="Dianjian\PutMachineClassBLL.cs" />

301
APPQ5/QMAPP.FJC.DAL/Dianjian/InOutPut_BeginShiftDAL.cs

@ -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
}
}

329
APPQ5/QMAPP.FJC.DAL/Dianjian/InOutPut_InventoryDAL.cs

@ -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
}
}

329
APPQ5/QMAPP.FJC.DAL/Dianjian/InOutPut_InventoryLogDAL.cs

@ -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
}
}

290
APPQ5/QMAPP.FJC.DAL/Dianjian/PutMachineValueZhusuDAL.cs

@ -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
}
}

4
APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj

@ -112,6 +112,10 @@
<Compile Include="CheckTime\ProductTimeDAL.cs" />
<Compile Include="CheckTime\CHECKTIMEDAL.cs" />
<Compile Include="CompleteStatistics\CompleteStatisticsDAL.cs" />
<Compile Include="Dianjian\InOutPut_BeginShiftDAL.cs" />
<Compile Include="Dianjian\InOutPut_InventoryLogDAL.cs" />
<Compile Include="Dianjian\InOutPut_InventoryDAL.cs" />
<Compile Include="Dianjian\PutMachineValueZhusuDAL.cs" />
<Compile Include="Dianjian\PutMachineValueDAL.cs" />
<Compile Include="Dianjian\PutMachineDAL.cs" />
<Compile Include="Dianjian\PutMachineClassDAL.cs" />

52
APPQ5/QMAPP.FJC.Entity/Dianjian/InOutPut_BeginShift.cs

@ -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; }
}
}

95
APPQ5/QMAPP.FJC.Entity/Dianjian/InOutPut_Inventory.cs

@ -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; }
}
}

58
APPQ5/QMAPP.FJC.Entity/Dianjian/InOutPut_InventoryLog.cs

@ -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; }
}
}

91
APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachineValueZhusu.cs

@ -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; }
}
}

4
APPQ5/QMAPP.FJC.Entity/QMAPP.FJC.Entity.csproj

@ -116,6 +116,10 @@
<Compile Include="CompleteStatistics\Table\T_BD_MATERIAL_BARCODE_INFO.cs" />
<Compile Include="CompleteStatistics\Table\T_SYSTEM_CONFIG.cs" />
<Compile Include="DataResult.cs" />
<Compile Include="Dianjian\InOutPut_BeginShift.cs" />
<Compile Include="Dianjian\InOutPut_InventoryLog.cs" />
<Compile Include="Dianjian\InOutPut_Inventory.cs" />
<Compile Include="Dianjian\PutMachineValueZhusu.cs" />
<Compile Include="Dianjian\PutMachineValue.cs" />
<Compile Include="Dianjian\PutMachine.cs" />
<Compile Include="Dianjian\PutMachineClass.cs" />

27
APPQ5/QMAPP.FJC.Web/Controllers/DictController.cs

@ -56,6 +56,33 @@ namespace QMAPP.FJC.Web.Controllers
}
#endregion
#region 投入产出点检项--类型
/// <summary>
/// 获取公司下拉列表
/// </summary>
/// <returns>数据源</returns>
[HandleException]
public ActionResult GetInventoryTypeComboxSource()
{
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
ComboboxResult model = new ComboboxResult();
model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle });
model.Add(new ComboboxItem { ID = "1", Text = "库存" });
model.Add(new ComboboxItem { ID = "2", Text = "出库" });
model.Add(new ComboboxItem { ID = "3", Text = "隔离" });
model.Add(new ComboboxItem { ID = "4", Text = "报废" });
return Content(model.ToString());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 注塑投料--物料绑定

219
APPQ5/QMAPP.FJC.Web/Controllers/InOutPutBeginShiftController.cs

@ -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
}
}

219
APPQ5/QMAPP.FJC.Web/Controllers/InOutPutInventoryController.cs

@ -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
}
}

219
APPQ5/QMAPP.FJC.Web/Controllers/InOutPutInventoryLogController.cs

@ -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
}
}

211
APPQ5/QMAPP.FJC.Web/Controllers/PutMachineValueZhusuController.cs

@ -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
}
}

71
APPQ5/QMAPP.FJC.Web/Models/Dianjian/InOutPut_BeginShiftModel.cs

@ -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; }
}
}

91
APPQ5/QMAPP.FJC.Web/Models/Dianjian/InOutPut_InventoryLogModel.cs

@ -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; }
}
}

136
APPQ5/QMAPP.FJC.Web/Models/Dianjian/InOutPut_InventoryModel.cs

@ -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; }
}
}

101
APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineValueZhusuModel.cs

@ -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; }
}
}

12
APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj

@ -161,6 +161,10 @@
<Compile Include="Common\ExcelOperationHelper.cs" />
<Compile Include="Controllers\AndonCallReasonController.cs" />
<Compile Include="Controllers\BarCodeReplaceController.cs" />
<Compile Include="Controllers\InOutPutBeginShiftController.cs" />
<Compile Include="Controllers\InOutPutInventoryLogController.cs" />
<Compile Include="Controllers\InOutPutInventoryController.cs" />
<Compile Include="Controllers\PutMachineValueZhusuController.cs" />
<Compile Include="Controllers\PutMachineValueController.cs" />
<Compile Include="Controllers\PutMachineController.cs" />
<Compile Include="Controllers\PutMachineClassController.cs" />
@ -321,6 +325,10 @@
<Compile Include="Models\BZD\BarCodeReplaceModel.cs" />
<Compile Include="Models\CheckTime\ProductTimeModel.cs" />
<Compile Include="Models\CheckTime\CHECKTIMEModel.cs" />
<Compile Include="Models\Dianjian\InOutPut_BeginShiftModel.cs" />
<Compile Include="Models\Dianjian\InOutPut_InventoryLogModel.cs" />
<Compile Include="Models\Dianjian\InOutPut_InventoryModel.cs" />
<Compile Include="Models\Dianjian\PutMachineValueZhusuModel.cs" />
<Compile Include="Models\Dianjian\PutMachineValueModel.cs" />
<Compile Include="Models\Dianjian\PutMachineModel.cs" />
<Compile Include="Models\Dianjian\PutMachineClassModel.cs" />
@ -941,6 +949,10 @@
<Content Include="Views\AppConfig\AppConfigList.aspx" />
<Content Include="Views\BarCodeReplace\BarCodeReplaceEdit.aspx" />
<Content Include="Views\BarCodeReplace\BarCodeReplaceList.aspx" />
<Content Include="Views\InOutPutBeginShift\InOutPutBeginShiftList.aspx" />
<Content Include="Views\InOutPutInventoryLog\InOutPutInventoryLogList.aspx" />
<Content Include="Views\InOutPutInventory\InOutPutInventoryList.aspx" />
<Content Include="Views\PutMachineValueZhusu\PutMachineValueZhusuList.aspx" />
<Content Include="Views\PutMachineValue\PutMachineValueList.aspx" />
<Content Include="Views\PutMachine\PutMachineEdit.aspx" />
<Content Include="Views\PutMachineClass\PutMachineClassEdit.aspx" />

100
APPQ5/QMAPP.FJC.Web/Views/InOutPutBeginShift/InOutPutBeginShiftList.aspx

@ -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>

122
APPQ5/QMAPP.FJC.Web/Views/InOutPutInventory/InOutPutInventoryList.aspx

@ -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>

110
APPQ5/QMAPP.FJC.Web/Views/InOutPutInventoryLog/InOutPutInventoryLogList.aspx

@ -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>

85
APPQ5/QMAPP.FJC.Web/Views/PutMachineValueZhusu/PutMachineValueZhusuList.aspx

@ -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>

62
AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

@ -274,6 +274,68 @@ namespace QMAPP.ServicesAgent
/// 泡沫点检记录删除
/// </summary>
PutMachineValueBLL_Delete,
/// <summary>
/// 注塑点检记录
/// </summary>
PutMachineValueZhusuBLL_Insert,
/// <summary>
/// 注塑点检记录更新
/// </summary>
PutMachineValueZhusuBLL_Update,
/// <summary>
/// 注塑点检记录删除
/// </summary>
PutMachineValueZhusuBLL_Delete,
/// <summary>
/// 库存查询记录
/// </summary>
InOutPutInventoryBLL_Insert,
/// <summary>
/// 库存查询更新
/// </summary>
InOutPutInventoryBLL_Update,
/// <summary>
/// 库存查询删除
/// </summary>
InOutPutInventoryBLL_Delete,
/// <summary>
/// 库存日志记录
/// </summary>
InOutPutInventoryLogBLL_Insert,
/// <summary>
/// 库存日志更新
/// </summary>
InOutPutInventoryLogBLL_Update,
/// <summary>
/// 库存日志删除
/// </summary>
InOutPutInventoryLogBLL_Delete,
/// <summary>
/// 库存日志记录
/// </summary>
InOutPutBeginShiftBLL_Insert,
/// <summary>
/// 库存日志更新
/// </summary>
InOutPutBeginShiftBLL_Update,
/// <summary>
/// 库存日志删除
/// </summary>
InOutPutBeginShiftBLL_Delete,
#endregion

25
ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml

@ -1023,7 +1023,32 @@
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>PutMachineValueZhusuBLL</ServiceName>
<ServiceDes>泡沫点检记录</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.PutMachineValueZhusuBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>InOutPutInventoryBLL</ServiceName>
<ServiceDes>库存记录</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.InOutPutInventoryBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>InOutPutInventoryLogBLL</ServiceName>
<ServiceDes>库存日志记录</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.InOutPutInventoryLogBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>InOutPutBeginShiftBLL</ServiceName>
<ServiceDes>开班件记录</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.InOutPutBeginShiftBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
</BusinessDllList>

52
WebAPI/Controllers/BeginShiftController.cs

@ -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);
}
}
}

110
WebAPI/Controllers/InventoryController.cs

@ -17,8 +17,10 @@ namespace WebAPI.Controllers
public class InventoryController : ApiController
{
public Response<List<OrderPlan_PaoMo>> GetPlanList()
public Response<List<OrderPlan_PaoMo>> GetPlanList(string state)
{
//state = ok
//state = nok
var result = new Response<List<OrderPlan_PaoMo>>();
List<OrderPlan_PaoMo> List_plan = new List<OrderPlan_PaoMo>();
@ -59,6 +61,46 @@ namespace WebAPI.Controllers
return result;
}
[HttpGet]
public Response<List<DefectDict>> GetDefectDictList()
{
//state = ok
//state = nok
var result = new Response<List<DefectDict>>();
List<DefectDict> List_plan = new List<DefectDict>();
var sqlScript = "";
sqlScript = $"select * from T_AW_MENDRECORDERERP where TYPE_CODE = 'BC316_ASSLINE' order by MFGCODE ";
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript);
if (dataSet.Tables[0].Rows.Count > 0)
{
foreach (DataRow row in dataSet.Tables[0].Rows)
{
DefectDict OrderPlan = new DefectDict();
OrderPlan.PID = row["PID"].ToString();
OrderPlan.MFGCODETYPE = row["MFGCODETYPE"].ToString();
OrderPlan.MFGCODETYPENAME = row["MFGCODETYPENAME"].ToString();
OrderPlan.TYPE_CODE = row["TYPE_CODE"].ToString();
OrderPlan.MFGCODE = row["MFGCODE"].ToString();
OrderPlan.MFGNAME = row["MFGNAME"].ToString();
List_plan.Add(OrderPlan);
}
result.Result = List_plan;
}
else
{
result.Code = 201;
result.Message = "用户信息不存在";
}
return result;
}
public async Task<IHttpActionResult> Insert()
{
@ -68,12 +110,72 @@ namespace WebAPI.Controllers
var resObj = JsonHelper.Instance.JsonToObj<Inventory>(requeststr);
if (resObj.State == "2")
{
var sql = $"select * from T_PA_InOutPut_InventoryLog where ProductCode = '{resObj.ProductCode}' and State = '1'";
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sql);
if (dataSet.Tables[0].Rows.Count > 0)
{
var sql2 = $"update T_PA_InOutPut_Inventory set State = '2' ,UpdateUser='{resObj.User}',UpdateDate='{DateTime.Now}'where PID = (SELECT TOP 1 PID FROM T_PA_InOutPut_Inventory WHERE ProductCode = '{resObj.ProductCode}' ORDER BY UpdateDate DESC) ";
SqlData.InsertWare(sql2);
//var sql = $"INSERT INTO[dbo].[T_MD_RawMaterial] ([PID], [BucketCode], [PartCode], [BatchCode], [SerialCode], [IsCheck], [CREATEUSER], [CREATEDATE], [planNumber], [supplierCode], [weight]) VALUES" +
// $" ('{Guid.NewGuid()}', '{resObj.bucketCode}', '{resObj.itemCode}', '{resObj.batchCode}', '{resObj.referenceCode}', '0', '{resObj.id}', '{DateTime.Now}', '{resObj.planNumber}', '{resObj.supplierCode}', '{resObj.weight}');";
var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '1', '2', '{resObj.User}', '{DateTime.Now}');";
SqlData.InsertWare(sql_log);
}
else
{
var ResponseNOK = new Response();
ResponseNOK.Code = 400;
ResponseNOK.Message = "当前条码未进行上悬链操作,禁止下悬链!";
return Ok(ResponseNOK);
}
}
else if (resObj.State == "1")
{
var sql = $"select * from T_PA_InOutPut_InventoryLog where ProductCode = '{resObj.ProductCode}' and State = '1'";
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sql);
if (dataSet.Tables[0].Rows.Count <= 0)
{
var sql2 = $"INSERT INTO [dbo].[T_PA_InOutPut_Inventory] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate], [UpdateUser], [UpdateDate], [Remark1], [Remark2], [Remark3], [PlanID], [MFGNAME]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '1', '1', '{resObj.User}', '{DateTime.Now}', '{resObj.User}', '{DateTime.Now}', NULL, NULL, NULL, '{resObj.PlanID}', NULL);";
SqlData.InsertWare(sql2);
var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '1', '1', '{resObj.User}', '{DateTime.Now}');";
SqlData.InsertWare(sql_log);
}
else
{
var ResponseNOK = new Response();
ResponseNOK.Code = 400;
ResponseNOK.Message = "零件已在悬链上,禁止重复操作!";
return Ok(ResponseNOK);
}
}
else if (resObj.State == "3" || resObj.State == "4")
{
var sql = $"select * from T_PA_InOutPut_InventoryLog where ProductCode = '{resObj.ProductCode}' and State in ('3','4')";
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sql);
if (dataSet.Tables[0].Rows.Count <= 0)
{
var sql2 = $"INSERT INTO [dbo].[T_PA_InOutPut_Inventory] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate], [UpdateUser], [UpdateDate], [Remark1], [Remark2], [Remark3], [PlanID], [MFGNAME]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '{resObj.Type}', '{resObj.State}', '{resObj.User}', '{DateTime.Now}', '{resObj.User}', '{DateTime.Now}', NULL, NULL, NULL, '{resObj.PlanID}', '{resObj.MFGNAME}');";
SqlData.InsertWare(sql2);
//SqlData.InsertWare(sql);
var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '{resObj.Type}', '{resObj.State}', '{resObj.User}', '{DateTime.Now}');";
SqlData.InsertWare(sql_log);
}
else
{
var ResponseNOK = new Response();
ResponseNOK.Code = 400;
ResponseNOK.Message = "禁止重复操作!";
return Ok(ResponseNOK);
}
}
var Response = new Response();

27
WebAPI/Models/BeginShift.cs

@ -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; }
}
}

23
WebAPI/Models/DefectDict.cs

@ -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; }
}
}

4
WebAPI/Models/Inventory.cs

@ -40,5 +40,9 @@ namespace WebAPI.Models
public string Remark2 { get; set; }
public string Remark3 { get; set; }
public string MFGNAME { get; set; }
public string User { get; set; }
}
}

3
WebAPI/WebAPI.csproj

@ -165,6 +165,7 @@
<Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\BeginShiftController.cs" />
<Compile Include="Controllers\InventoryController.cs" />
<Compile Include="Controllers\MachineController.cs" />
<Compile Include="Controllers\WareController.cs" />
@ -172,6 +173,8 @@
<Compile Include="Controllers\PlanController.cs" />
<Compile Include="Controllers\MachineClassController.cs" />
<Compile Include="Controllers\LoginController.cs" />
<Compile Include="Models\DefectDict.cs" />
<Compile Include="Models\BeginShift.cs" />
<Compile Include="Models\Inventory.cs" />
<Compile Include="Models\JsonHelper.cs" />
<Compile Include="Models\OrderPlan_ZhuSu.cs" />

Loading…
Cancel
Save