Browse Source

临时保存

master
张松男 6 months ago
parent
commit
2f99bc1a18
  1. 30
      APP/QMAPP.Web/App_Data/Menu.xml
  2. 11
      APP/QMAPP.Web/Web.config
  3. 5
      APPMD/QMAPP.MD.DAL/ProcessRouteDAL.cs
  4. 6
      APPMD/QMAPP.MD.Web/Web.config
  5. 205
      APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineBLL.cs
  6. 206
      APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineClassBLL.cs
  7. 201
      APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineValueBLL.cs
  8. 442
      APPQ5/QMAPP.FJC.BLL/FIS/PaoMoDoorPlankPlanBLL.cs
  9. 3
      APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj
  10. 299
      APPQ5/QMAPP.FJC.DAL/Dianjian/PutMachineClassDAL.cs
  11. 289
      APPQ5/QMAPP.FJC.DAL/Dianjian/PutMachineDAL.cs
  12. 290
      APPQ5/QMAPP.FJC.DAL/Dianjian/PutMachineValueDAL.cs
  13. 1068
      APPQ5/QMAPP.FJC.DAL/FIS/PaoMoDoorPlankPlanDAL.cs
  14. 1202
      APPQ5/QMAPP.FJC.DAL/FIS/PaoMoOrderPlanDAL.cs
  15. 5
      APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj
  16. 61
      APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachine.cs
  17. 68
      APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachineClass.cs
  18. 91
      APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachineValue.cs
  19. 3
      APPQ5/QMAPP.FJC.Entity/QMAPP.FJC.Entity.csproj
  20. 2
      APPQ5/QMAPP.FJC.Web/Content/Xml/Dictionary.xml
  21. 27
      APPQ5/QMAPP.FJC.Web/Controllers/DictController.cs
  22. 207
      APPQ5/QMAPP.FJC.Web/Controllers/PutMachineClassController.cs
  23. 207
      APPQ5/QMAPP.FJC.Web/Controllers/PutMachineController.cs
  24. 211
      APPQ5/QMAPP.FJC.Web/Controllers/PutMachineValueController.cs
  25. 91
      APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineClassModel.cs
  26. 82
      APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineModel.cs
  27. 101
      APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineValueModel.cs
  28. 11
      APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
  29. 89
      APPQ5/QMAPP.FJC.Web/Views/PutMachine/PutMachineEdit.aspx
  30. 88
      APPQ5/QMAPP.FJC.Web/Views/PutMachine/PutMachineList.aspx
  31. 97
      APPQ5/QMAPP.FJC.Web/Views/PutMachineClass/PutMachineClassEdit.aspx
  32. 95
      APPQ5/QMAPP.FJC.Web/Views/PutMachineClass/PutMachineClassList.aspx
  33. 85
      APPQ5/QMAPP.FJC.Web/Views/PutMachineValue/PutMachineValueList.aspx
  34. 14
      APPQ5/QMAPP.FJC.Web/Web.config
  35. 4
      APPQ5/QMAPP.WinForm/App.config
  36. 4
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs
  37. 8
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  38. 4
      APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
  39. 49
      AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
  40. 24
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml
  41. 8
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
  42. 85
      WebAPI/Controllers/InventoryController.cs
  43. 44
      WebAPI/Models/Inventory.cs
  44. 2
      WebAPI/WebAPI.csproj

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

@ -304,7 +304,7 @@
</MenuItem>
<!--TJDoorPlankPlanPrint DoorPlankPlan-->
<MenuItem MenuID="02030000" SystemID="FJC" MenuDes="泡沫计划管理" Action="/PaomoPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<MenuItem MenuID="02030000" SystemID="FJC" MenuDes="泡沫计划管理" Action="/TJDoorPlankPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions>
<Action ContorllerName="PaomoPlanPrint" ActionName="List" PowerID="CD02030001">查询</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="Add" PowerID="CD02030002">添加</Action>
@ -834,6 +834,34 @@
</Actions>
</MenuItem>
<MenuItem MenuID="20000000" SystemID="Main" MenuDes="投入产出" Action="" PowerID="CD20000000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="" Seq="2">
<Actions>
</Actions>
</MenuItem>
<MenuItem MenuID="20100000" SystemID="FJC" MenuDes="点检项" Action="/PutMachineClass/List" Target="url" PowerID="CD20100000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="PutMachineClass" ActionName="List" PowerID="CD20100001">查询</Action>
<Action ContorllerName="PutMachineClass" ActionName="Add" PowerID="CD20100002">添加</Action>
<Action ContorllerName="PutMachineClass" ActionName="Edit" PowerID="CD20100003">修改</Action>
<Action ContorllerName="PutMachineClass" ActionName="Delete" PowerID="CD20100004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20200000" SystemID="FJC" MenuDes="点检项极限值" Action="/PutMachine/List" Target="url" PowerID="CD20200000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="PutMachine" ActionName="List" PowerID="CD20200001">查询</Action>
<Action ContorllerName="PutMachine" ActionName="Add" PowerID="CD20200002">添加</Action>
<Action ContorllerName="PutMachine" ActionName="Edit" PowerID="CD20200003">修改</Action>
<Action ContorllerName="PutMachine" ActionName="Delete" PowerID="CD20200004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20300000" SystemID="FJC" MenuDes="泡沫点检记录" Action="/PutMachineValue/List" Target="url" PowerID="CD20300000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="PutMachineValue" ActionName="List" PowerID="CD20300001">查询</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>
<Action ContorllerName="ProduceCycleTimeShift" ActionName="Index" PowerID="CD13150001">查询</Action>

11
APP/QMAPP.Web/Web.config

@ -42,9 +42,10 @@
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_VW276PA_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.122.213.104;Initial Catalog=ADIENT_VW276_MES;User Id=MES;Password=Password1;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_VW276PA_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=10.122.213.104;Initial Catalog=ADIENT_VW276_MES;User Id=MES;Password=Password1;" providerName="System.Data.SqlClient"/>
@ -64,10 +65,12 @@
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<!--
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>

5
APPMD/QMAPP.MD.DAL/ProcessRouteDAL.cs

@ -845,12 +845,15 @@ namespace QMAPP.MD.DAL
sql.AppendLine(" WHERE EXISTS(SELECT 1 ");
sql.AppendLine(" FROM [T_MD_PROCESS_ROUTE_WORKCELL] AS RW ");
sql.AppendLine(" WHERE RW.[ROUTE_CODE]=R.[ROUTE_CODE] ");
sql.AppendLine(" AND RW.[WORKCELL_CODE]=@workcellcode ) ");
sql.AppendLine(" AND ( RW.[WORKCELL_CODE]=@workcellcode OR RW.[WORKCELL_CODE]=@workcellcode2)) ");
sql.AppendLine(" AND P.PBOM_CODE=@bomcode ");
parameters.Add(new DataParameter("bomcode", bomcode));
parameters.Add(new DataParameter("workcellcode", workcellcode));
var workcellcode2 = workcellcode.Substring(0, 3) + "304_" + workcellcode.Substring(3, workcellcode.Length - 3);
parameters.Add(new DataParameter("workcellcode2", workcellcode2));
using (var session = AppDataFactory.CreateMainSession())
{
var route = session.Get<RouteLocation>(sql.ToString(), parameters.ToArray());

6
APPMD/QMAPP.MD.Web/Web.config

@ -50,10 +50,10 @@
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
-->
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
<!-- <add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />

205
APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineBLL.cs

@ -0,0 +1,205 @@
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 PutMachineBLL : BaseBLL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public DataResult<PutMachine> Get(PutMachine model)
{
DataResult<PutMachine> result = new DataResult<PutMachine>();
try
{
result.Result = new PutMachineDAL().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(PutMachine condition, DataPage page)
{
DataResult<DataPage> result = new DataResult<DataPage>();
try
{
DataPage dataPage = new PutMachineDAL().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<PutMachine> GetAllList()
{
try
{
//获取信息列表
return new PutMachineDAL().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(PutMachine info)
{
DataResult<int> result = new DataResult<int>();
try
{
//基本信息
info.PID = Guid.NewGuid().ToString();
PutMachineDAL cmdDAL = new PutMachineDAL();
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(PutMachine model)
{
DataResult result = new DataResult();
result.IsSuccess = true;
try
{
PutMachine info = new PutMachineDAL().Get(model);
//基本信息
info.MachineCode = model.MachineCode;
info.Name = model.Name;
info.MachinePID = model.MachinePID;
info.Limit = model.Limit;
info.Floor = model.Floor;
info.SerialNumber = model.SerialNumber;
int temp = new PutMachineDAL().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 PutMachineDAL().Delete(model);
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

206
APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineClassBLL.cs

@ -0,0 +1,206 @@
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 PutMachineClassBLL : BaseBLL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public DataResult<PutMachineClass> Get(PutMachineClass model)
{
DataResult<PutMachineClass> result = new DataResult<PutMachineClass>();
try
{
result.Result = new PutMachineClassDAL().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(PutMachineClass condition, DataPage page)
{
DataResult<DataPage> result = new DataResult<DataPage>();
try
{
DataPage dataPage = new PutMachineClassDAL().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<PutMachineClass> GetAllList()
{
try
{
//获取信息列表
return new PutMachineClassDAL().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(PutMachineClass info)
{
DataResult<int> result = new DataResult<int>();
try
{
//基本信息
info.PID = Guid.NewGuid().ToString();
PutMachineClassDAL cmdDAL = new PutMachineClassDAL();
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(PutMachineClass model)
{
DataResult result = new DataResult();
result.IsSuccess = true;
try
{
PutMachineClass info = new PutMachineClassDAL().Get(model);
//基本信息
info.MachineCode = model.MachineCode;
info.Name = model.Name;
info.Content = model.Content;
info.Position = model.Position;
info.Methond = model.Methond;
info.Type = model.Type;
info.SerialNumber = model.SerialNumber;
int temp = new PutMachineClassDAL().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 PutMachineClassDAL().Delete(model);
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

201
APPQ5/QMAPP.FJC.BLL/Dianjian/PutMachineValueBLL.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 PutMachineValueBLL : BaseBLL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public DataResult<PutMachineValue> Get(PutMachineValue model)
{
DataResult<PutMachineValue> result = new DataResult<PutMachineValue>();
try
{
result.Result = new PutMachineValueDAL().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(PutMachineValue condition, DataPage page)
{
DataResult<DataPage> result = new DataResult<DataPage>();
try
{
DataPage dataPage = new PutMachineValueDAL().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<PutMachineValue> GetAllList()
{
try
{
//获取信息列表
return new PutMachineValueDAL().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(PutMachineValue info)
{
DataResult<int> result = new DataResult<int>();
try
{
//基本信息
info.PID = Guid.NewGuid().ToString();
PutMachineValueDAL cmdDAL = new PutMachineValueDAL();
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(PutMachineValue model)
{
DataResult result = new DataResult();
result.IsSuccess = true;
try
{
PutMachineValue info = new PutMachineValueDAL().Get(model);
//基本信息
info.MachineCode = model.MachineCode;
info.Name = model.Name;
int temp = new PutMachineValueDAL().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 PutMachineValueDAL().Delete(model);
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

442
APPQ5/QMAPP.FJC.BLL/FIS/PaoMoDoorPlankPlanBLL.cs

@ -34,7 +34,7 @@ namespace QMAPP.FJC.BLL.FIS
DataResult<PaoMoOrderPlan> result = new DataResult<PaoMoOrderPlan>();
try
{
result.Result = new DoorPlankPlanDAL().Get(model);
result.Result = new PaoMoDoorPlankPlanDAL().Get(model);
}
catch (Exception ex)
{
@ -61,13 +61,13 @@ namespace QMAPP.FJC.BLL.FIS
DataResult<PaoMoOrderPlan> result = new DataResult<PaoMoOrderPlan>();
try
{
var dal= new DoorPlankPlanDAL();
var position =dal.Get(model);
var dal = new PaoMoDoorPlankPlanDAL();
var position = dal.Get(model);
if (position == null)
{
throw new Exception("获取FIS插单位置信息失败!");
}
if(!string.Equals(position.PLANSOURCE,EnumGeter.WORKORDERTYPE.FIS.GetHashCode().ToString()))
if (!string.Equals(position.PLANSOURCE, EnumGeter.WORKORDERTYPE.FIS.GetHashCode().ToString()))
{
result.Msg = "只能选择FIS计划作为插单位置!";
result.IsSuccess = false;
@ -105,7 +105,7 @@ namespace QMAPP.FJC.BLL.FIS
try
{
//获取订单计划信息列表
DataPage dataPage = new DoorPlankPlanDAL().GetList(condition, page);
DataPage dataPage = new PaoMoDoorPlankPlanDAL().GetList(condition, page);
List<PaoMoOrderPlan> list = page.Result as List<PaoMoOrderPlan>;
#region 显示类型
//处理字典信息
@ -148,7 +148,7 @@ namespace QMAPP.FJC.BLL.FIS
{
try
{
return new DoorPlankPlanDAL().ExistsOrderPlan(model);
return new PaoMoDoorPlankPlanDAL().ExistsOrderPlan(model);
}
catch (Exception ex)
{
@ -170,7 +170,7 @@ namespace QMAPP.FJC.BLL.FIS
model.PID = Guid.NewGuid().ToString();
model.PLAN_STATE = "0";
model.PLANSOURCE = model.PLANSOURCE;
//int no = new DoorPlankPlanDAL().GetNum(model);
//int no = new PaoMoDoorPlankPlanDAL().GetNum(model);
//model.PLAN_SEQ = model.PLAN_DATE.ToString("yyyyMMdd") + no;
Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = model.MATERIAL_CODE });
@ -189,7 +189,7 @@ namespace QMAPP.FJC.BLL.FIS
model.CREATEDATE = DateTime.Now;
model.UPDATEUSER = model.CREATEUSER;
model.UPDATEDATE = model.CREATEDATE;
DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
PaoMoDoorPlankPlanDAL cmdDAL = new PaoMoDoorPlankPlanDAL();
try
{
//if (ExistsOrderPlan(model) >0)
@ -206,7 +206,7 @@ namespace QMAPP.FJC.BLL.FIS
FISPlan info = this.GetOrderPlanSeq(condition);
//计划单号
model.PLAN_NO = condition.PREFIX + condition.DATASTR + info.SEQSTR;
result.Result = new DoorPlankPlanDAL().Insert(model);
result.Result = new PaoMoDoorPlankPlanDAL().Insert(model);
}
catch (Exception ex)
{
@ -245,7 +245,7 @@ namespace QMAPP.FJC.BLL.FIS
var materialcode = "";
if (model.MATERIAL_CODE.Substring(model.MATERIAL_CODE.Length - 1, 1) == "L" || model.MATERIAL_CODE.Substring(model.MATERIAL_CODE.Length - 1, 1) == "R")
{
if (model.MATERIAL_CODE.Contains("018D")|| model.MATERIAL_CODE.Contains("493D"))
if (model.MATERIAL_CODE.Contains("018D") || model.MATERIAL_CODE.Contains("493D"))
{
materialcode = model.MATERIAL_CODE;
}
@ -263,7 +263,7 @@ namespace QMAPP.FJC.BLL.FIS
string workcentercode = new WorkCellDAL().GetWorkcenter(model.ORDER_TYPE);
if (model.MATERIAL_CODE.Contains("018D"))
workcentercode = workcentercode.Replace("770B","018D");
workcentercode = workcentercode.Replace("770B", "018D");
if (model.MATERIAL_CODE.Contains("493D"))
workcentercode = workcentercode.Replace("770B", "493D");
@ -277,52 +277,52 @@ namespace QMAPP.FJC.BLL.FIS
QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
//QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
var listMatral = new TJDoorPlankPlanDAL();
var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE);
if (ListMachine.Count <= 0)
{
model.ROUTE_CODE = routecode.ROUTE_CODE;
}
else
{
foreach (var MA in ListMachine)
{
if (MA.MATERIALNAME.Contains("左"))
{
if (model.MATERIAL_CODE.Contains("018"))
model.ROUTE_CODE = "DP_L_ASSEMBLY_018D";
else if (model.MATERIAL_CODE.Contains("493"))
model.ROUTE_CODE = "DP_L_ASSEMBLY_493D";
else if (model.MATERIAL_CODE.Contains("304"))
model.ROUTE_CODE = "DP_L_ASSEMBLY_304D";
else
{
if (MA.MATERIALNAME.Contains("304"))
model.ROUTE_CODE = "DP_L_ASSEMBLY_304D";
else
model.ROUTE_CODE = "DP_L_ASSEMBLY_770B";
}
//var listMatral = new TJPaoMoDoorPlankPlanDAL();
//var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE);
//if (ListMachine.Count <= 0)
//{
// model.ROUTE_CODE = routecode.ROUTE_CODE;
//}
//else
//{
// foreach (var MA in ListMachine)
// {
// if (MA.MATERIALNAME.Contains("左"))
// {
// if (model.MATERIAL_CODE.Contains("018"))
// model.ROUTE_CODE = "DP_L_ASSEMBLY_018D";
// else if (model.MATERIAL_CODE.Contains("493"))
// model.ROUTE_CODE = "DP_L_ASSEMBLY_493D";
// else if (model.MATERIAL_CODE.Contains("304"))
// model.ROUTE_CODE = "DP_L_ASSEMBLY_304D";
// else
// {
// if (MA.MATERIALNAME.Contains("304"))
// model.ROUTE_CODE = "DP_L_ASSEMBLY_304D";
// else
// model.ROUTE_CODE = "DP_L_ASSEMBLY_770B";
// }
}
else if (MA.MATERIALNAME.Contains("右"))
{
if (model.MATERIAL_CODE.Contains("018"))
model.ROUTE_CODE = "DP_R_ASSEMBLY_018D";
else if (model.MATERIAL_CODE.Contains("493"))
model.ROUTE_CODE = "DP_R_ASSEMBLY_493D";
else if (model.MATERIAL_CODE.Contains("304"))
model.ROUTE_CODE = "DP_R_ASSEMBLY_304D";
else
{
if (MA.MATERIALNAME.Contains("304"))
model.ROUTE_CODE = "DP_R_ASSEMBLY_304D";
else
model.ROUTE_CODE = "DP_R_ASSEMBLY_770B";
}
// }
// else if (MA.MATERIALNAME.Contains("右"))
// {
// if (model.MATERIAL_CODE.Contains("018"))
// model.ROUTE_CODE = "DP_R_ASSEMBLY_018D";
// else if (model.MATERIAL_CODE.Contains("493"))
// model.ROUTE_CODE = "DP_R_ASSEMBLY_493D";
// else if (model.MATERIAL_CODE.Contains("304"))
// model.ROUTE_CODE = "DP_R_ASSEMBLY_304D";
// else
// {
// if (MA.MATERIALNAME.Contains("304"))
// model.ROUTE_CODE = "DP_R_ASSEMBLY_304D";
// else
// model.ROUTE_CODE = "DP_R_ASSEMBLY_770B";
// }
}
}
}
// }
// }
//}
//model.ROUTE_CODE = "DP_ASSEMBLY_770B";
@ -330,7 +330,7 @@ namespace QMAPP.FJC.BLL.FIS
model.CREATEDATE = DateTime.Now;
model.UPDATEUSER = model.CREATEUSER;
model.UPDATEDATE = model.CREATEDATE;
DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
PaoMoDoorPlankPlanDAL cmdDAL = new PaoMoDoorPlankPlanDAL();
FISPlan condition = new FISPlan();
condition.PREFIX = "DP";
condition.DATASTR = model.PLAN_DATE.ToString("yyyyMMdd");
@ -339,11 +339,11 @@ namespace QMAPP.FJC.BLL.FIS
//计划单号
model.PLAN_SEQ = info.SEQSTR;
model.PLAN_NO = condition.PREFIX + condition.DATASTR + info.SEQSTR;
result.Result = new DoorPlankPlanDAL().Insert(model);
result.Result = new PaoMoDoorPlankPlanDAL().Insert(model);
//if (model.MATERIAL_CODE.Length <= 10)
//{
// //var listMatral = new TJDoorPlankPlanDAL();
// //var listMatral = new TJPaoMoDoorPlankPlanDAL();
// //var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE);
// foreach (var Machint in ListMachine)
// {
@ -368,7 +368,7 @@ namespace QMAPP.FJC.BLL.FIS
// model.CREATEDATE = DateTime.Now;
// model.UPDATEUSER = model.CREATEUSER;
// model.UPDATEDATE = model.CREATEDATE;
// DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
// PaoMoDoorPlankPlanDAL cmdDAL = new PaoMoDoorPlankPlanDAL();
// FISPlan condition = new FISPlan();
// condition.PREFIX = "DP";
// condition.DATASTR = model.PLAN_DATE.ToString("yyyyMMdd");
@ -377,7 +377,7 @@ namespace QMAPP.FJC.BLL.FIS
// //计划单号
// model.PLAN_SEQ = info.SEQSTR;
// model.PLAN_NO = condition.PREFIX + condition.DATASTR + info.SEQSTR;
// result.Result = new DoorPlankPlanDAL().Insert(model);
// result.Result = new PaoMoDoorPlankPlanDAL().Insert(model);
// }
//}
@ -412,12 +412,12 @@ namespace QMAPP.FJC.BLL.FIS
public FISPlan GetOrderPlanSeq(FISPlan condition)
{
FISPlan fisplan = new FISPlan();
OrderPlanDAL orderPlanDal = new OrderPlanDAL();
PaoMoOrderPlanDAL PaoMoOrderPlanDAL = new PaoMoOrderPlanDAL();
//根据表皮条码获取本体信息
try
{
fisplan = new OrderPlanDAL().GetOrderPlanSeq(condition);
fisplan = new PaoMoOrderPlanDAL().GetOrderPlanSeq(condition);
//若存在记录,流水号加1,且更新
if (fisplan != null)
{
@ -427,9 +427,9 @@ namespace QMAPP.FJC.BLL.FIS
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.OpenTs();
orderPlanDal.BaseSession = session;
PaoMoOrderPlanDAL.BaseSession = session;
orderPlanDal.UpdateFisPlan(fisplan);
PaoMoOrderPlanDAL.UpdateFisPlan(fisplan);
session.CommitTs();
}
@ -445,9 +445,9 @@ namespace QMAPP.FJC.BLL.FIS
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.OpenTs();
orderPlanDal.BaseSession = session;
PaoMoOrderPlanDAL.BaseSession = session;
orderPlanDal.InsertFisPlan(planinfo);
PaoMoOrderPlanDAL.InsertFisPlan(planinfo);
session.CommitTs();
}
@ -511,8 +511,8 @@ namespace QMAPP.FJC.BLL.FIS
#region 判断数量
OrderPlanDAL orderPlanDal = new OrderPlanDAL();
PaoMoOrderPlan initialOrderPlan = orderPlanDal.Get(new PaoMoOrderPlan { PID = model.PID });
PaoMoOrderPlanDAL PaoMoOrderPlanDAL = new PaoMoOrderPlanDAL();
PaoMoOrderPlan initialOrderPlan = PaoMoOrderPlanDAL.Get(new PaoMoOrderPlan { PID = model.PID });
string deleteWorkOrderSql = "";
List<WorkOrder> workOrderList = new List<WorkOrder>();
@ -526,7 +526,7 @@ namespace QMAPP.FJC.BLL.FIS
{
int unProduceCount = list.Count(o => o.STATE == 0);
if (list.Count>0 && unProduceCount < (initialOrderPlan.QTY - model.QTY))
if (list.Count > 0 && unProduceCount < (initialOrderPlan.QTY - model.QTY))
{
result.IsSuccess = false;
result.Msg = string.Format("该订单下已经加工的产品数量大于{0},请重新调整数量!", model.QTY);
@ -555,13 +555,13 @@ namespace QMAPP.FJC.BLL.FIS
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.OpenTs();
orderPlanDal.BaseSession = session;
PaoMoOrderPlanDAL.BaseSession = session;
workOrderDal.BaseSession = session;
Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = model.MATERIAL_CODE });
model.PBOM_CODE = pbomcode.PBOM_CODE;
orderPlanDal.Update(model);
PaoMoOrderPlanDAL.Update(model);
if (string.IsNullOrEmpty(deleteWorkOrderSql) == false)
{
session.ExecuteSql(deleteWorkOrderSql, new List<DataParameter>().ToArray());
@ -615,14 +615,14 @@ namespace QMAPP.FJC.BLL.FIS
{
WorkOrderDAL workOrderDal = new WorkOrderDAL();
OrderPlanDAL orderPlanDal = new OrderPlanDAL();
PaoMoOrderPlanDAL PaoMoOrderPlanDAL = new PaoMoOrderPlanDAL();
//校验未通过的订单
List<PaoMoOrderPlan> validOrderList = new List<PaoMoOrderPlan>();
//可以删除的订单
List<PaoMoOrderPlan> deleteOrderList = new List<PaoMoOrderPlan>();
foreach (string str in list)
{
PaoMoOrderPlan op = orderPlanDal.Get(new PaoMoOrderPlan() { PID = str });
PaoMoOrderPlan op = PaoMoOrderPlanDAL.Get(new PaoMoOrderPlan() { PID = str });
//去T_PP_WORkORDER表查询此计划下的派工单是否有不为0(初始)状态的派工信息,若有则不让删除
int Num = workOrderDal.GetAllWorkOrder(str);
//如果订单初始化或是确认生产并且生产数量为0
@ -648,13 +648,13 @@ namespace QMAPP.FJC.BLL.FIS
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.OpenTs();
orderPlanDal.BaseSession = session;
PaoMoOrderPlanDAL.BaseSession = session;
workOrderDal.BaseSession = session;
foreach (var op in deleteOrderList)
{
//删除订单
orderPlanDal.DeleteOrderPlan(op);
PaoMoOrderPlanDAL.DeleteOrderPlan(op);
//删除订单下的派工单
workOrderDal.BatchDeleteByOrderPlan(new WorkOrder() { ORDERPLANID = op.PID });
@ -683,12 +683,12 @@ namespace QMAPP.FJC.BLL.FIS
public int DeleteDoorPlankPlan(PaoMoOrderPlan model)
{
int count = 0;
int number = new DoorPlankPlanDAL().DelCheck(model);
int number = new PaoMoDoorPlankPlanDAL().DelCheck(model);
if (number > 0)
{
return count;
}
count = new DoorPlankPlanDAL().Delete(model);
count = new PaoMoDoorPlankPlanDAL().Delete(model);
return count;
}
#endregion
@ -705,14 +705,14 @@ namespace QMAPP.FJC.BLL.FIS
DataResult<int> result = new DataResult<int>();
try
{
OrderPlanDAL orderPlandal = new OrderPlanDAL();
PaoMoOrderPlanDAL PaoMoOrderPlanDAL = new PaoMoOrderPlanDAL();
List<PaoMoOrderPlan> validorderPlanList = new List<PaoMoOrderPlan>();
List<PaoMoOrderPlan> putOutPlanList = new List<PaoMoOrderPlan>();
foreach (string str in list)
{
PaoMoOrderPlan op = orderPlandal.Get(new PaoMoOrderPlan { PID = str });
PaoMoOrderPlan op = PaoMoOrderPlanDAL.Get(new PaoMoOrderPlan { PID = str });
if (op.PLAN_STATE != EnumGeter.PLANSTATE.INIT.GetHashCode().ToString())
{
@ -748,10 +748,10 @@ namespace QMAPP.FJC.BLL.FIS
}
IDbTransaction ids = dbConn.BeginTransaction();
orderPlandal.BaseSession = session;
PaoMoOrderPlanDAL.BaseSession = session;
foreach (var op in putOutPlanList)
{
orderPlandal.Update(op);
PaoMoOrderPlanDAL.Update(op);
}
session.DbHelper.BulkCopyData(totalDt, "T_PP_WORKORDER", dbConn, ids);
@ -872,14 +872,14 @@ namespace QMAPP.FJC.BLL.FIS
DataResult<int> result = new DataResult<int>();
try
{
OrderPlanDAL orderPlandal = new OrderPlanDAL();
PaoMoOrderPlanDAL PaoMoOrderPlanDAL = new PaoMoOrderPlanDAL();
List<PaoMoOrderPlan> validorderPlanList = new List<PaoMoOrderPlan>();
List<PaoMoOrderPlan> putOutPlanList = new List<PaoMoOrderPlan>();
foreach (string str in list)
{
PaoMoOrderPlan op = orderPlandal.Get(new PaoMoOrderPlan { PID = str });
PaoMoOrderPlan op = PaoMoOrderPlanDAL.Get(new PaoMoOrderPlan { PID = str });
if (op.PLAN_STATE != EnumGeter.PLANSTATE.INIT.GetHashCode().ToString())
{
@ -915,10 +915,10 @@ namespace QMAPP.FJC.BLL.FIS
}
IDbTransaction ids = dbConn.BeginTransaction();
orderPlandal.BaseSession = session;
PaoMoOrderPlanDAL.BaseSession = session;
foreach (var op in putOutPlanList)
{
orderPlandal.Update(op);
PaoMoOrderPlanDAL.Update(op);
}
session.DbHelper.BulkCopyData(totalDt, "T_PP_WORKORDER", dbConn, ids);
@ -950,7 +950,7 @@ namespace QMAPP.FJC.BLL.FIS
// return null;
//}
if (((info.MATERIAL_CODE.Substring(0, 4) == "493D" || info.MATERIAL_CODE.Substring(0,4) == "018D"|| info.MATERIAL_CODE.Substring(0, 4) == "278D") && info.MATERIAL_CODE.Length > 10)|| (info.MATERIAL_CODE.Substring(0, 3) == "770" && info.MATERIAL_CODE.Length > 7)|| info.MATERIAL_CODE.Length>=14)
if (((info.MATERIAL_CODE.Substring(0, 4) == "493D" || info.MATERIAL_CODE.Substring(0, 4) == "018D" || info.MATERIAL_CODE.Substring(0, 4) == "278D") && info.MATERIAL_CODE.Length > 10) || (info.MATERIAL_CODE.Substring(0, 3) == "770" && info.MATERIAL_CODE.Length > 7) || info.MATERIAL_CODE.Length >= 14)
{
string pbomcode = info.MATERIAL_CODE;
List<ProcessRouteWorkCellSeq> list = workCelldal.GetFirstWorkCell(pbomcode);
@ -979,7 +979,7 @@ namespace QMAPP.FJC.BLL.FIS
{
workOrder["WORKCELL_CODE"] = "DP_L_PREPARE1";
}
else if(info.ROUTE_CODE.Contains("DP_R"))
else if (info.ROUTE_CODE.Contains("DP_R"))
workOrder["WORKCELL_CODE"] = "DP_R_PREPARE1";
else
workOrder["WORKCELL_CODE"] = "PREPARE1";
@ -999,138 +999,138 @@ namespace QMAPP.FJC.BLL.FIS
{
//左侧、右侧 或 四个门一起打印
var list2 = "".Split(',');
var dal = new TJDoorPlankPlanDAL();
var MachineList = dal.GetListMachine(info.MATERIAL_CODE);
if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L")
{
list2 = "FL,RL".Split(',');
}
else if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
{
list2 = "FR,RR".Split(',');
}
else if ((info.MATERIAL_CODE.Length == 6 && info.MATERIAL_CODE.Substring(0,3) == "770")|| (info.MATERIAL_CODE.Length == 8 && info.MATERIAL_CODE.Substring(0, 4) == "018D"))
{
list2 = "FL,RL,FR,RR".Split(',');
}
for (int i = 0; i < info.QTY; i++)
{
foreach (var seq in list2)
{
DataRow workOrder = workOrderDt.NewRow();
workOrder["PID"] = Guid.NewGuid().ToString();
workOrder["ORDERPLANID"] = info.PID;
workOrder["ORDERPLAN_NO"] = (info.PLAN_NO.ToString() + (i + 1).ToString().PadLeft(4, '0'));
workOrder["ORDER_TYPE"] = info.PLANSOURCE;
workOrder["SEQ"] = (i + 1).ToString().PadLeft(6, '0');
if (info.PLANSOURCE == EnumGeter.WORKORDERTYPE.INSERT.GetHashCode().ToString())
{
workOrder["SEQ"] = info.PLAN_SEQ + (i + 1).ToString().PadLeft(3, '0');
}
//var BOMCODE = "";
//var dal = new TJPaoMoDoorPlankPlanDAL();
//var MachineList = dal.GetListMachine(info.MATERIAL_CODE);
//if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L")
//{
// list2 = "FL,RL".Split(',');
//}
//else if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
//{
// list2 = "FR,RR".Split(',');
//}
//else if ((info.MATERIAL_CODE.Length == 6 && info.MATERIAL_CODE.Substring(0, 3) == "770") || (info.MATERIAL_CODE.Length == 8 && info.MATERIAL_CODE.Substring(0, 4) == "018D"))
//{
// list2 = "FL,RL,FR,RR".Split(',');
//}
//if (info.MATERIAL_CODE.Substring(0, 4) == "018D")
//for (int i = 0; i < info.QTY; i++)
//{
// if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L" || info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
// foreach (var seq in list2)
// {
// DataRow workOrder = workOrderDt.NewRow();
// workOrder["PID"] = Guid.NewGuid().ToString();
// workOrder["ORDERPLANID"] = info.PID;
// workOrder["ORDERPLAN_NO"] = (info.PLAN_NO.ToString() + (i + 1).ToString().PadLeft(4, '0'));
// workOrder["ORDER_TYPE"] = info.PLANSOURCE;
// workOrder["SEQ"] = (i + 1).ToString().PadLeft(6, '0');
// if (info.PLANSOURCE == EnumGeter.WORKORDERTYPE.INSERT.GetHashCode().ToString())
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// BOMCODE = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// workOrder["SEQ"] = info.PLAN_SEQ + (i + 1).ToString().PadLeft(3, '0');
// }
// else
// //var BOMCODE = "";
// //if (info.MATERIAL_CODE.Substring(0, 4) == "018D")
// //{
// // if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L" || info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
// // {
// // workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// // BOMCODE = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// // }
// // else
// // {
// // workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE + "-" + seq;
// // BOMCODE = info.MATERIAL_CODE + "-" + seq;
// // }
// //}
// //else if (info.MATERIAL_CODE.Substring(0, 3) == "770")
// //{
// // if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L" || info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
// // {
// // workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// // BOMCODE = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// // }
// // else
// // {
// // workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE + seq;
// // BOMCODE = info.MATERIAL_CODE + seq;
// // }
// //}
// //else
// //{
// // workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE;
// // BOMCODE = info.MATERIAL_CODE;
// //}
// var WEIZHI = "";
// switch (seq)
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE + "-" + seq;
// BOMCODE = info.MATERIAL_CODE + "-" + seq;
// case "LF":
// WEIZHI = "左前";
// break;
// case "FL":
// WEIZHI = "左前";
// break;
// case "LR":
// WEIZHI = "左后";
// break;
// case "RL":
// WEIZHI = "左后";
// break;
// case "RF":
// WEIZHI = "右前";
// break;
// case "FR":
// WEIZHI = "右前";
// break;
// case "RR":
// WEIZHI = "右后";
// break;
// }
//}
//else if (info.MATERIAL_CODE.Substring(0, 3) == "770")
//{
// if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L" || info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
// var Machine = MachineList.Where(p => p.MATERIALNAME.Contains(WEIZHI)).ToList();
// //if (Machine != null && Machine.Count > 0)
// //{
// // workOrder["MATERIAL_CODE"] = Machine[0].MATERIALNO;
// // workOrder["PBOM_CODE"] = Machine[0].MATERIALNO;
// //}
// //else
// //{
// // workOrder["PBOM_CODE"] = "";
// // workOrder["MATERIAL_CODE"] = "";
// //}
// workOrder["QTY"] = 1;
// workOrder["COMPLETE_QTY"] = 0;
// workOrder["PLAN_DATE"] = info.PLAN_DATE;
// workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
// workOrder["WORKCENTER_CODE"] = info.WORKCENTER_CODE;
// if (WEIZHI.Contains("左"))
// {
// workOrder["WORKCELL_CODE"] = "DP_L_PREPARE1";
// }
// else if (WEIZHI.Contains("右"))
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// BOMCODE = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// workOrder["WORKCELL_CODE"] = "DP_R_PREPARE1";
// }
// else
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE + seq;
// BOMCODE = info.MATERIAL_CODE + seq;
// workOrder["WORKCELL_CODE"] = "PREPARE1";
// }
//}
//else
//{
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE;
// BOMCODE = info.MATERIAL_CODE;
//}
var WEIZHI = "";
switch (seq)
{
case "LF":
WEIZHI = "左前";
break;
case "FL":
WEIZHI = "左前";
break;
case "LR":
WEIZHI = "左后";
break;
case "RL":
WEIZHI = "左后";
break;
case "RF":
WEIZHI = "右前";
break;
case "FR":
WEIZHI = "右前";
break;
case "RR":
WEIZHI = "右后";
break;
}
var Machine = MachineList.Where(p => p.MATERIALNAME.Contains(WEIZHI)).ToList();
if (Machine != null && Machine.Count > 0)
{
workOrder["MATERIAL_CODE"] = Machine[0].MATERIALNO;
workOrder["PBOM_CODE"] = Machine[0].MATERIALNO;
}
else
{
workOrder["PBOM_CODE"] = "";
workOrder["MATERIAL_CODE"] = "";
}
workOrder["QTY"] = 1;
workOrder["COMPLETE_QTY"] = 0;
workOrder["PLAN_DATE"] = info.PLAN_DATE;
workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
workOrder["WORKCENTER_CODE"] = info.WORKCENTER_CODE;
if (WEIZHI.Contains("左"))
{
workOrder["WORKCELL_CODE"] = "DP_L_PREPARE1";
}
else if (WEIZHI.Contains("右"))
{
workOrder["WORKCELL_CODE"] = "DP_R_PREPARE1";
}
else
{
workOrder["WORKCELL_CODE"] = "PREPARE1";
}
// workOrder["WORKLOC_CODE"] = "";
// workOrder["REMARK"] = "";
// workOrder["EQPT_NAME"] = "";
// workOrder["EQPT_CODE"] = "";
// workOrder["STATE"] = EnumGeter.WORKPLANSTATE.INIT.GetHashCode().ToString();
// workOrder["PRI"] = dicPRI.GetDictValue(info.PLANSOURCE);
workOrder["WORKLOC_CODE"] = "";
workOrder["REMARK"] = "";
workOrder["EQPT_NAME"] = "";
workOrder["EQPT_CODE"] = "";
workOrder["STATE"] = EnumGeter.WORKPLANSTATE.INIT.GetHashCode().ToString();
workOrder["PRI"] = dicPRI.GetDictValue(info.PLANSOURCE);
workOrderDt.Rows.Add(workOrder);
}
// workOrderDt.Rows.Add(workOrder);
// }
}
//}
}
//注入派工单信息
@ -1192,7 +1192,7 @@ namespace QMAPP.FJC.BLL.FIS
{
try
{
DataTable dt = new DoorPlankPlanDAL().GetExportData(model);
DataTable dt = new PaoMoDoorPlankPlanDAL().GetExportData(model);
DictManageBLL dictPRODUCEREQUIRE = new DictManageBLL(DictKind.PRODUCEREQUIRE);
DictManageBLL dictPLANSOURCE = new DictManageBLL(DictKind.PLANSOURCE);
DictManageBLL dictPLANSTATE = new DictManageBLL(DictKind.PLAN_STATE);
@ -1233,7 +1233,7 @@ namespace QMAPP.FJC.BLL.FIS
public DataResult<ImportMessage> GetImportData(List<PaoMoOrderPlan> list, Material materialmodel, QMAPP.FJC.Entity.Basic.MachineInfo machine, FJC.Entity.Basic.ProduceShift produceshiftmodel, QMAPP.MD.Entity.WorkCell workcellmodel)
{
DataResult<ImportMessage> result = new DataResult<ImportMessage>();
DoorPlankPlanDAL cmDal = new DoorPlankPlanDAL();
PaoMoDoorPlankPlanDAL cmDal = new PaoMoDoorPlankPlanDAL();
List<PaoMoOrderPlan> List = new List<PaoMoOrderPlan>();
int index = 0;
int num = 0;
@ -1247,7 +1247,7 @@ namespace QMAPP.FJC.BLL.FIS
using (IDataSession session = AppDataFactory.CreateMainSession())
{
///获取物料信息
materialinfo = new QMAPP.MD.BLL.MaterialBLL().GetNewMaterialList(materialmodel,workcellmodel);
materialinfo = new QMAPP.MD.BLL.MaterialBLL().GetNewMaterialList(materialmodel, workcellmodel);
//获取班次信息
produceshiftinfo = new QMAPP.FJC.BLL.Basic.ProduceShiftBLL().GetWorkcenterShifts(workcellmodel.WORKCENTER_CODE);
//获取设备信息
@ -1334,8 +1334,8 @@ namespace QMAPP.FJC.BLL.FIS
oldInfo = new PaoMoOrderPlan();
ma.PID = Guid.NewGuid().ToString();
ma.PLAN_NO = ma.PLAN_NO;
//int no = new DoorPlankPlanDAL().GetNum(ma) + (num - 1);
ma.PLAN_SEQ = ma.PLAN_NO.Substring(ma.PLAN_NO.Length-3,3);
//int no = new PaoMoDoorPlankPlanDAL().GetNum(ma) + (num - 1);
ma.PLAN_SEQ = ma.PLAN_NO.Substring(ma.PLAN_NO.Length - 3, 3);
ma.PLAN_STATE = EnumGeter.PLANSTATE.INIT.GetHashCode().ToString();
ma.MATERIAL_CODE = ma.MATERIAL_CODE;
ma.MACHINECODDE = ma.MACHINECODDE;
@ -1453,7 +1453,7 @@ namespace QMAPP.FJC.BLL.FIS
{
List<PaoMoOrderPlan> List = new List<PaoMoOrderPlan>();
DataResult<int> result = new DataResult<int>();
DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
PaoMoDoorPlankPlanDAL cmdDAL = new PaoMoDoorPlankPlanDAL();
cmdDAL.BaseSession = AppDataFactory.CreateMainSession();
string plan_Seq = "";
foreach (Material ma in materiallist)
@ -1474,7 +1474,7 @@ namespace QMAPP.FJC.BLL.FIS
planmodel.PLANSOURCE = model.PLANSOURCE;
//顺序号
OrderPlanSerial serial = new DoorPlankPlanDAL().GetNumSerial(model);
OrderPlanSerial serial = new PaoMoDoorPlankPlanDAL().GetNumSerial(model);
if (serial != null)
{
@ -1489,7 +1489,7 @@ namespace QMAPP.FJC.BLL.FIS
plan_Seq = planmodel.PLAN_SEQ;
}
int no = new DoorPlankPlanDAL().UpdateSerial(serial);
int no = new PaoMoDoorPlankPlanDAL().UpdateSerial(serial);
}
else
{
@ -1499,7 +1499,7 @@ namespace QMAPP.FJC.BLL.FIS
serialinfo.SERIAL_NO = 1;
serialinfo.SERIAL_TYPE = model.ORDER_TYPE;
serialinfo.SERIAL_DATE = model.PLAN_DATE.ToString("yyyyMMdd");
int num = new DoorPlankPlanDAL().InsertSerial(serialinfo);
int num = new PaoMoDoorPlankPlanDAL().InsertSerial(serialinfo);
//流水号补位
planmodel.PLAN_SEQ = (serialinfo.SERIAL_NO).ToString().PadLeft(3, '0');
@ -1514,7 +1514,7 @@ namespace QMAPP.FJC.BLL.FIS
string b = matype.Substring(matype.Length - 1, 1);
string planSet = b + a;
//计划单号
planmodel.PLAN_NO = model.AsmSetCode+planSet + model.PLAN_DATE.ToString("yyMMdd") + planmodel.PLAN_SEQ + "SD";
planmodel.PLAN_NO = model.AsmSetCode + planSet + model.PLAN_DATE.ToString("yyMMdd") + planmodel.PLAN_SEQ + "SD";
Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = planmodel.MATERIAL_CODE });
planmodel.PBOM_CODE = pbomcode.PBOM_CODE;
@ -1573,11 +1573,11 @@ namespace QMAPP.FJC.BLL.FIS
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public DataResult<int> SaveFISInsert(PaoMoOrderPlan model, List<Material> materiallist,bool Publish)
public DataResult<int> SaveFISInsert(PaoMoOrderPlan model, List<Material> materiallist, bool Publish)
{
List<PaoMoOrderPlan> List = new List<PaoMoOrderPlan>();
DataResult<int> result = new DataResult<int>();
DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
PaoMoDoorPlankPlanDAL cmdDAL = new PaoMoDoorPlankPlanDAL();
cmdDAL.BaseSession = AppDataFactory.CreateMainSession();
var InsertNum = cmdDAL.GetMaxFISInsertNum(model) + 1;
foreach (Material ma in materiallist)
@ -1673,7 +1673,7 @@ namespace QMAPP.FJC.BLL.FIS
try
{
//获取信息列表
DataPage dataPage = new DoorPlankPlanDAL().GetDoorPlankPlanList(condition, page);
DataPage dataPage = new PaoMoDoorPlankPlanDAL().GetDoorPlankPlanList(condition, page);
result.Result = dataPage;
}
@ -1734,7 +1734,7 @@ namespace QMAPP.FJC.BLL.FIS
public int UpdateSeq(PaoMoOrderPlan model)
{
int count = 0;
count = new DoorPlankPlanDAL().UpdateSeq(model);
count = new PaoMoDoorPlankPlanDAL().UpdateSeq(model);
return count;
}
#endregion
@ -1750,7 +1750,7 @@ namespace QMAPP.FJC.BLL.FIS
List<FISAssembly> result = new List<FISAssembly>();
try
{
result = new DoorPlankPlanDAL().GetMaterialDoorPlanForCD(info);
result = new PaoMoDoorPlankPlanDAL().GetMaterialDoorPlanForCD(info);
//转换高低配和颜色
}
@ -1775,7 +1775,7 @@ namespace QMAPP.FJC.BLL.FIS
Fisassmble.Id = IdInfo;
try
{
List<FISAssembly> FisassmbleList = new DoorPlankPlanDAL().GetMaterialDoorPlanForCD(Fisassmble);
List<FISAssembly> FisassmbleList = new PaoMoDoorPlankPlanDAL().GetMaterialDoorPlanForCD(Fisassmble);
foreach (FISAssembly m in FisassmbleList)
{
Fisassmble.MESModulFL = m.MESModulFL;

3
APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj

@ -125,6 +125,9 @@
<Compile Include="Common\FileHelper.cs" />
<Compile Include="Common\IdentityScope.cs" />
<Compile Include="CompleteStatistics\CompleteStatisticsBLL.cs" />
<Compile Include="Dianjian\PutMachineValueBLL.cs" />
<Compile Include="Dianjian\PutMachineBLL.cs" />
<Compile Include="Dianjian\PutMachineClassBLL.cs" />
<Compile Include="EM\EmMeterReadingsBLL.cs" />
<Compile Include="EnergyManage\MeterReader.cs" />
<Compile Include="EnergyManage\MeterBLL.cs" />

299
APPQ5/QMAPP.FJC.DAL/Dianjian/PutMachineClassDAL.cs

@ -0,0 +1,299 @@
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 PutMachineClassDAL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>*信息</returns>
public PutMachineClass Get(PutMachineClass info)
{
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
info = session.Get<PutMachineClass>(info);
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>*信息</returns>
public PutMachineClass Get(string materialcode)
{
try
{
string sql = "SELECT * FROM [T_MD_PutMachineClass] 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<PutMachineClass>(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(PutMachineClass 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 = "MachineCode";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
page = session.GetDataPage<PutMachineClass>(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<PutMachineClass> GetALL()
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_MD_PutMachineClass WHERE IsCheck<> '1'";
//分页关键字段及排序
var LIST = new List<PutMachineClass>();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
LIST = session.GetList<PutMachineClass>(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(PutMachineClass condition, ref List<DataParameter> parameters)
{
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder whereBuilder = new StringBuilder();
try
{
//构成查询语句
sqlBuilder.Append("SELECT PID,MachineCode,Name,Position,Content,Methond,CASE Type WHEN '1' THEN '单选' WHEN '2' THEN '填写单边值' WHEN '3' THEN '填写双边值' ELSE Type END AS 'Type', SerialNumber ");
sqlBuilder.Append("FROM T_MD_PutMachineClass ");
if (string.IsNullOrEmpty(condition.MachineCode) == false)
{
whereBuilder.Append(" AND MachineCode = @MachineCode");
parameters.Add(new DataParameter { ParameterName = "MachineCode", DataType = DbType.String, Value = condition.MachineCode });
}
if (string.IsNullOrEmpty(condition.Name) == false)
{
whereBuilder.Append(" AND Name like @Name");
parameters.Add(new DataParameter { ParameterName = "Name", DataType = DbType.String, Value = "%"+ condition.Name+"%" });
}
//查询条件
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(PutMachineClass 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_PutMachineClass");
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(PutMachineClass info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
count = session.Insert<PutMachineClass>(info);
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
public int Update(PutMachineClass info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//更新基本信息
count = session.Update<PutMachineClass>(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_PutMachineClass ");
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
}
}

289
APPQ5/QMAPP.FJC.DAL/Dianjian/PutMachineDAL.cs

@ -0,0 +1,289 @@
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 PutMachineDAL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>*信息</returns>
public PutMachine Get(PutMachine info)
{
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
info = session.Get<PutMachine>(info);
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>*信息</returns>
public PutMachine Get(string materialcode)
{
try
{
string sql = "SELECT * FROM [T_MD_PutMachine] 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<PutMachine>(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(PutMachine 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 = "MachinePID";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
page = session.GetDataPage<PutMachine>(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<PutMachine> GetALL()
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_MD_PutMachine WHERE IsCheck<> '1'";
//分页关键字段及排序
var LIST = new List<PutMachine>();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
LIST = session.GetList<PutMachine>(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(PutMachine condition, ref List<DataParameter> parameters)
{
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder whereBuilder = new StringBuilder();
try
{
//构成查询语句
sqlBuilder.Append("SELECT PID,MachinePID,Name,Limit,Floor,SerialNumber,MachineCode ");
sqlBuilder.Append("FROM T_MD_PutMachine ");
if (string.IsNullOrEmpty(condition.MachinePID) == false)
{
whereBuilder.Append(" AND MachinePID = @MachinePID");
parameters.Add(new DataParameter { ParameterName = "MachinePID", DataType = DbType.String, Value = condition.MachinePID });
}
//查询条件
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(PutMachine 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_PutMachine");
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(PutMachine info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
count = session.Insert<PutMachine>(info);
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
public int Update(PutMachine info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//更新基本信息
count = session.Update<PutMachine>(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_PutMachine ");
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/PutMachineValueDAL.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 PutMachineValueDAL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>*信息</returns>
public PutMachineValue Get(PutMachineValue info)
{
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
info = session.Get<PutMachineValue>(info);
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>*信息</returns>
public PutMachineValue Get(string materialcode)
{
try
{
string sql = "SELECT * FROM [T_MD_PutMachineValue] 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<PutMachineValue>(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(PutMachineValue 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<PutMachineValue>(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<PutMachineValue> GetALL()
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_MD_PutMachineValue WHERE IsCheck<> '1'";
//分页关键字段及排序
var LIST = new List<PutMachineValue>();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
LIST = session.GetList<PutMachineValue>(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(PutMachineValue 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_PutMachineValue ");
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(PutMachineValue 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_PutMachineValue");
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(PutMachineValue info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
count = session.Insert<PutMachineValue>(info);
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
public int Update(PutMachineValue info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//更新基本信息
count = session.Update<PutMachineValue>(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_PutMachineValue ");
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
}
}

1068
APPQ5/QMAPP.FJC.DAL/FIS/PaoMoDoorPlankPlanDAL.cs

File diff suppressed because it is too large

1202
APPQ5/QMAPP.FJC.DAL/FIS/PaoMoOrderPlanDAL.cs

File diff suppressed because it is too large

5
APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj

@ -112,6 +112,9 @@
<Compile Include="CheckTime\ProductTimeDAL.cs" />
<Compile Include="CheckTime\CHECKTIMEDAL.cs" />
<Compile Include="CompleteStatistics\CompleteStatisticsDAL.cs" />
<Compile Include="Dianjian\PutMachineValueDAL.cs" />
<Compile Include="Dianjian\PutMachineDAL.cs" />
<Compile Include="Dianjian\PutMachineClassDAL.cs" />
<Compile Include="EM\EmMeterReadingsDAL.cs" />
<Compile Include="EnergyManage\MeterDAL.cs" />
<Compile Include="EnergyManage\MeterReadingsDAL.cs" />
@ -121,6 +124,7 @@
<Compile Include="Equipment\UsageLogDAL.cs" />
<Compile Include="FileCopy\FileCopyRecordDAL.cs" />
<Compile Include="FIS\DashBoardPlanDAL.cs" />
<Compile Include="FIS\PaoMoDoorPlankPlanDAL.cs" />
<Compile Include="FIS\DoorPlankPlanDAL.cs" />
<Compile Include="FIS\FisDAL.cs" />
<Compile Include="FIS\FISInfoDAL.cs" />
@ -128,6 +132,7 @@
<Compile Include="FIS\FISOrderSendDAL.cs" />
<Compile Include="FIS\FISOrederSendDetialDAL.cs" />
<Compile Include="FIS\FISPhraseDAL.cs" />
<Compile Include="FIS\PaoMoOrderPlanDAL.cs" />
<Compile Include="FIS\OrderPlanDAL.cs" />
<Compile Include="FrmPlace\FrmPlaceDAL.cs" />
<Compile Include="InterfaceData\LeakInspectRecordDAL.cs" />

61
APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachine.cs

@ -0,0 +1,61 @@
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_PutMachine")]
public class PutMachine : BaseEntity
{
/// <summary>
/// 主键
/// </summary>
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)]
public string PID { get; set; }
/// <summary>
/// 点检项PID
/// </summary>
[DBColumn(ColumnName = "MachinePID", DataType = DbType.String)]
public string MachinePID { get; set; }
/// <summary>
/// 上限
/// </summary>
[DBColumn(ColumnName = "Limit", DataType = DbType.String)]
public string Limit { get; set; }
/// <summary>
/// 下限
/// </summary>
[DBColumn(ColumnName = "Floor", DataType = DbType.String)]
public string Floor { get; set; }
/// <summary>
/// 名称
/// </summary>
[DBColumn(ColumnName = "Name", DataType = DbType.String)]
public string Name { get; set; }
/// <summary>
/// 序号
/// </summary>
[DBColumn(ColumnName = "SerialNumber", DataType = DbType.String)]
public string SerialNumber { get; set; }
/// <summary>
/// 设备编号
/// </summary>
[DBColumn(ColumnName = "MachineCode", DataType = DbType.String)]
public string MachineCode { get; set; }
}
}

68
APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachineClass.cs

@ -0,0 +1,68 @@
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_PutMachineClass")]
public class PutMachineClass : BaseEntity
{
/// <summary>
/// 主键
/// </summary>
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)]
public string PID { get; set; }
/// <summary>
/// 点检编号
/// </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 = "Position", DataType = DbType.String)]
public string Position { get; set; }
/// <summary>
/// 内容
/// </summary>
[DBColumn(ColumnName = "Content", DataType = DbType.String)]
public string Content { get; set; }
/// <summary>
/// 方法
/// </summary>
[DBColumn(ColumnName = "Methond", DataType = DbType.String)]
public string Methond { get; set; }
/// <summary>
/// 类型
/// </summary>
[DBColumn(ColumnName = "Type", DataType = DbType.String)]
public string Type { get; set; }
/// <summary>
/// 排序
/// </summary>
[DBColumn(ColumnName = "SerialNumber", DataType = DbType.String)]
public string SerialNumber { get; set; }
}
}

91
APPQ5/QMAPP.FJC.Entity/Dianjian/PutMachineValue.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_PutMachineValue")]
public class PutMachineValue : 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; }
}
}

3
APPQ5/QMAPP.FJC.Entity/QMAPP.FJC.Entity.csproj

@ -116,6 +116,9 @@
<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\PutMachineValue.cs" />
<Compile Include="Dianjian\PutMachine.cs" />
<Compile Include="Dianjian\PutMachineClass.cs" />
<Compile Include="DisPatch\EFailLog.cs" />
<Compile Include="DisPatch\EPasteCard.cs" />
<Compile Include="DisPatch\EPasteDetailsCard.cs" />

2
APPQ5/QMAPP.FJC.Web/Content/Xml/Dictionary.xml

@ -570,5 +570,7 @@
<Button key="Statistics" value="统计"/>
<Button key="PublishEndWorkCell" value="发布到总成工位" />
<Button key="PublishEndWorkloc" value="发布到P1工位" />
<Button key="AddPutMachine" value="查询上下限" />
</Buttons>
</Config>

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

@ -29,6 +29,33 @@ namespace QMAPP.FJC.Web.Controllers
{
public string EmptyItemTitle = " ";
#region 投入产出点检项--类型
/// <summary>
/// 获取公司下拉列表
/// </summary>
/// <returns>数据源</returns>
[HandleException]
public ActionResult GetTypeComboxSource()
{
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 = "填写双边值" });
return Content(model.ToString());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 注塑投料--物料绑定

207
APPQ5/QMAPP.FJC.Web/Controllers/PutMachineClassController.cs

@ -0,0 +1,207 @@
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 PutMachineClassController : QController
{
#region 获取信息
/// <summary>
/// 加载列表
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult List(bool? callback)
{
PutMachineClassModel seachModel = new PutMachineClassModel();
if (callback == true)
TryGetSelectBuffer<PutMachineClassModel>(out seachModel);
seachModel.rownumbers = false;
seachModel.url = "/PutMachineClass/GetList";
return View("PutMachineClassList", seachModel);
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="callBack">是否回调</param>
/// <returns>列表</returns>
[HandleException]
public ActionResult GetList(bool? callBack)
{
PutMachineClassModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
PutMachineClass condition = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
try
{
//获取查询对象
seachModel = GetModel<PutMachineClassModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<PutMachineClassModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<PutMachineClassModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<PutMachineClass, PutMachineClassModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("PutMachineClassBLL_GetList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<PutMachineClass> result = new DateGridResult<PutMachineClass>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<PutMachineClass>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 编辑
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Edit()
{
PutMachineClassModel model = new PutMachineClassModel();
string ID = Request.Params["PID"];
PutMachineClass Entity = new PutMachineClass();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<PutMachineClass> result = new DataResult<PutMachineClass>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<PutMachineClass>>("PutMachineClassBLL_Get", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("PutMachineClassEdit", model);
}
model = CopyToModel<PutMachineClassModel, PutMachineClass>(result.Result);
}
return View("PutMachineClassEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult Save(PutMachineClassModel saveModel)
{
PutMachineClass Entity = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
Entity = CopyToModel<PutMachineClass, PutMachineClassModel>(saveModel);
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineClassBLL_Insert.ToString(), Entity);
if (result.IsSuccess == false)
{
SetMessage("工厂编码已存在!");
return View("PutMachineClassEdit", saveModel);
}
}
else
{
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineClassBLL_Update.ToString(), Entity);
if (result.IsSuccess == false)
{
SetMessage("工厂编码已存在!");
return View("PutMachineClassEdit", 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(PutMachineClass model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
var result = wcfAgent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.DictService.PutMachineClassBLL_Delete.ToString(), selectKey);
if (result == 0)
{
SetMessage("信息有关联,删除失败!");
return List(true);
}
SetMessage(AppResource.DeleteMessage);
return List(true);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

207
APPQ5/QMAPP.FJC.Web/Controllers/PutMachineController.cs

@ -0,0 +1,207 @@
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 PutMachineController : QController
{
#region 获取信息
/// <summary>
/// 加载列表
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult List(bool? callback)
{
PutMachineModel seachModel = new PutMachineModel();
if (callback == true)
TryGetSelectBuffer<PutMachineModel>(out seachModel);
seachModel.rownumbers = false;
seachModel.url = "/PutMachine/GetList";
return View("PutMachineList", seachModel);
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="callBack">是否回调</param>
/// <returns>列表</returns>
[HandleException]
public ActionResult GetList(bool? callBack)
{
PutMachineModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
PutMachine condition = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
try
{
//获取查询对象
seachModel = GetModel<PutMachineModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<PutMachineModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<PutMachineModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<PutMachine, PutMachineModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("PutMachineBLL_GetList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<PutMachine> result = new DateGridResult<PutMachine>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<PutMachine>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 编辑
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Edit()
{
PutMachineModel model = new PutMachineModel();
string ID = Request.Params["PID"];
PutMachine Entity = new PutMachine();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<PutMachine> result = new DataResult<PutMachine>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<PutMachine>>("PutMachineBLL_Get", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("PutMachineEdit", model);
}
model = CopyToModel<PutMachineModel, PutMachine>(result.Result);
}
return View("PutMachineEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult Save(PutMachineModel saveModel)
{
PutMachine Entity = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
Entity = CopyToModel<PutMachine, PutMachineModel>(saveModel);
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineBLL_Insert.ToString(), Entity);
if (result.IsSuccess == false)
{
SetMessage("工厂编码已存在!");
return View("PutMachineEdit", saveModel);
}
}
else
{
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineBLL_Update.ToString(), Entity);
if (result.IsSuccess == false)
{
SetMessage("工厂编码已存在!");
return View("PutMachineEdit", 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(PutMachine model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
var result = wcfAgent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.DictService.PutMachineBLL_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/PutMachineValueController.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 PutMachineValueController : QController
{
#region 获取信息
/// <summary>
/// 加载列表
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult List(bool? callback)
{
PutMachineValueModel seachModel = new PutMachineValueModel();
if (callback == true)
TryGetSelectBuffer<PutMachineValueModel>(out seachModel);
seachModel.rownumbers = false;
seachModel.url = "/PutMachineValue/GetList";
return View("PutMachineValueList", seachModel);
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="callBack">是否回调</param>
/// <returns>列表</returns>
[HandleException]
public ActionResult GetList(bool? callBack)
{
PutMachineValueModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
PutMachineValue condition = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
try
{
//获取查询对象
seachModel = GetModel<PutMachineValueModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<PutMachineValueModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<PutMachineValueModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<PutMachineValue, PutMachineValueModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("PutMachineValueBLL_GetList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<PutMachineValue> result = new DateGridResult<PutMachineValue>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<PutMachineValue>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 编辑
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Edit()
{
PutMachineValueModel model = new PutMachineValueModel();
string ID = Request.Params["PID"];
PutMachineValue Entity = new PutMachineValue();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<PutMachineValue> result = new DataResult<PutMachineValue>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<PutMachineValue>>("PutMachineValueBLL_Get", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("PutMachineValueEdit", model);
}
model = CopyToModel<PutMachineValueModel, PutMachineValue>(result.Result);
}
return View("PutMachineValueEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult Save(PutMachineValueModel saveModel)
{
PutMachineValue Entity = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
Entity = CopyToModel<PutMachineValue, PutMachineValueModel>(saveModel);
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineValueBLL_Insert.ToString(), Entity);
if (result.IsSuccess == false)
{
SetMessage("工厂编码已存在!");
return View("PutMachineValueEdit", saveModel);
}
}
else
{
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.DictService.PutMachineValueBLL_Update.ToString(), Entity);
if (result.IsSuccess == false)
{
SetMessage("工厂编码已存在!");
return View("PutMachineValueEdit", 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(PutMachineValue model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
var result = wcfAgent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.DictService.PutMachineValueBLL_Delete.ToString(), selectKey);
if (result == 0)
{
SetMessage("信息有关联,删除失败!");
return List(true);
}
SetMessage(AppResource.DeleteMessage);
return List(true);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

91
APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineClassModel.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 PutMachineClassModel : QDGModel
{
/// <summary>
/// 主键
/// </summary>
[Description("主键")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)]
[DGColumn(Hidden = false, 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 = 100, 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 = 200, DataAlign = DataAlign.center)]
public string Position { 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 Content { 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 Methond { get; set; }
/// <summary>
/// 点检类型
/// </summary>
[Description("点检类型")]
// [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[HTMLInput(UpdateRead = false, required = true, JsonUtl = "/Dict/GetTypeComboxSource", MaxLength = 15, Width = 100)]
[InputType(inputType.combobox)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Type { 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 SerialNumber { get; set; }
}
}

82
APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineModel.cs

@ -0,0 +1,82 @@
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 PutMachineModel : QDGModel
{
/// <summary>
/// 主键
/// </summary>
[Description("主键")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)]
[DGColumn(Hidden = true, PrimaryKey = true)]
public string PID { get; set; }
/// <summary>
/// 点检项PID
/// </summary>
[Description("点检项PID")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string MachinePID { 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 MachineCode { 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 Limit { 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 Floor { 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 SerialNumber { get; set; }
}
}

101
APPQ5/QMAPP.FJC.Web/Models/Dianjian/PutMachineValueModel.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 PutMachineValueModel : 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; }
}
}

11
APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj

@ -161,6 +161,9 @@
<Compile Include="Common\ExcelOperationHelper.cs" />
<Compile Include="Controllers\AndonCallReasonController.cs" />
<Compile Include="Controllers\BarCodeReplaceController.cs" />
<Compile Include="Controllers\PutMachineValueController.cs" />
<Compile Include="Controllers\PutMachineController.cs" />
<Compile Include="Controllers\PutMachineClassController.cs" />
<Compile Include="Controllers\ProductTimeController.cs" />
<Compile Include="Controllers\BomHdrController.cs" />
<Compile Include="Controllers\BarCodeReplacementController.cs" />
@ -318,6 +321,9 @@
<Compile Include="Models\BZD\BarCodeReplaceModel.cs" />
<Compile Include="Models\CheckTime\ProductTimeModel.cs" />
<Compile Include="Models\CheckTime\CHECKTIMEModel.cs" />
<Compile Include="Models\Dianjian\PutMachineValueModel.cs" />
<Compile Include="Models\Dianjian\PutMachineModel.cs" />
<Compile Include="Models\Dianjian\PutMachineClassModel.cs" />
<Compile Include="Models\EM\EmMeterCountModel.cs" />
<Compile Include="Models\EM\EmMeterReadingsModel.cs" />
<Compile Include="Models\EnergyManage\MeterModel.cs" />
@ -935,6 +941,11 @@
<Content Include="Views\AppConfig\AppConfigList.aspx" />
<Content Include="Views\BarCodeReplace\BarCodeReplaceEdit.aspx" />
<Content Include="Views\BarCodeReplace\BarCodeReplaceList.aspx" />
<Content Include="Views\PutMachineValue\PutMachineValueList.aspx" />
<Content Include="Views\PutMachine\PutMachineEdit.aspx" />
<Content Include="Views\PutMachineClass\PutMachineClassEdit.aspx" />
<Content Include="Views\PutMachine\PutMachineList.aspx" />
<Content Include="Views\PutMachineClass\PutMachineClassList.aspx" />
<Content Include="Views\ProductTime\ProductTimeEdit.aspx" />
<Content Include="Views\ProductTime\ProductTimeList.aspx" />
<Content Include="Views\SignInfo\SignInfoEdit.aspx" />

89
APPQ5/QMAPP.FJC.Web/Views/PutMachine/PutMachineEdit.aspx

@ -0,0 +1,89 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.PutMachineModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
工厂信息编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
<%=Html.QV(p=>p.MachinePID) %>
</th>
<td>
<%=Html.QC(p => p.MachinePID)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.MachineCode) %>
</th>
<td>
<%=Html.QC(p => p.MachineCode)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Name)%>
</th>
<td>
<%=Html.QC(p => p.Name)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Limit)%>
</th>
<td>
<%=Html.QC(p => p.Limit)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Floor)%>
</th>
<td>
<%=Html.QC(p => p.Floor)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.SerialNumber)%>
</th>
<td>
<%=Html.QC(p => p.SerialNumber)%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p=>p.PID) %>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "PutMachineClass", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
function Save() {
if (isValidate() == false) {
return false;
}
submitByButton("Save");
}
</script>
</asp:Content>

88
APPQ5/QMAPP.FJC.Web/Views/PutMachine/PutMachineList.aspx

@ -0,0 +1,88 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.PutMachineModel>" %>
<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.MachinePID)%>
</th>
<td>
<%=Html.QC(p => p.MachinePID)%>
</td>
</tr>
</table>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.Dianjian.PutMachineModel>(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("PutMachineClass", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("PutMachineClass", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("PutMachineClass", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("PutMachineClass", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>

97
APPQ5/QMAPP.FJC.Web/Views/PutMachineClass/PutMachineClassEdit.aspx

@ -0,0 +1,97 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.PutMachineClassModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
工厂信息编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
<%=Html.QV(p=>p.MachineCode) %>
</th>
<td>
<%=Html.QC(p => p.MachineCode)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Name)%>
</th>
<td>
<%=Html.QC(p => p.Name)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Position)%>
</th>
<td>
<%=Html.QC(p => p.Position)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Content)%>
</th>
<td>
<%=Html.QC(p => p.Content)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Methond)%>
</th>
<td>
<%=Html.QC(p => p.Methond)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Type)%>
</th>
<td>
<%=Html.QC(p => p.Type)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.SerialNumber)%>
</th>
<td>
<%=Html.QC(p => p.SerialNumber)%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p=>p.PID) %>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "PutMachineClass", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
function Save() {
if (isValidate() == false) {
return false;
}
submitByButton("Save");
}
</script>
</asp:Content>

95
APPQ5/QMAPP.FJC.Web/Views/PutMachineClass/PutMachineClassList.aspx

@ -0,0 +1,95 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.PutMachineClassModel>" %>
<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>
<th align="right">
<%=Html.QV(p => p.Name)%>
</th>
<td>
<%=Html.QC(p => p.Name)%>
</td>
</tr>
</table>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.Dianjian.PutMachineClassModel>(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('查询上下限', 'PutList?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("PutMachineClass", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("PutMachineClass", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("PutMachineClass", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("AddPutMachine", "AddPutMachine", QMFrameWork.WebUI.IconCls.add, "AddPutMachine()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("PutMachineClass", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>

85
APPQ5/QMAPP.FJC.Web/Views/PutMachineValue/PutMachineValueList.aspx

@ -0,0 +1,85 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Dianjian.PutMachineValueModel>" %>
<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.PutMachineValueModel>(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("PutMachineValue", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>

14
APPQ5/QMAPP.FJC.Web/Web.config

@ -42,10 +42,13 @@
<!--<add name="maindb" connectionString="Data Source=119.3.213.202,13315;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=ChangkeTec@2020;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--
<add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<!--
<add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />
<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
@ -53,10 +56,6 @@
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES_20230930;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
@ -70,11 +69,10 @@
<!--<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
</connectionStrings>

4
APPQ5/QMAPP.WinForm/App.config

@ -10,12 +10,12 @@
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBC316_MP4" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
</connectionStrings>

4
APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs

@ -1895,7 +1895,7 @@ namespace QMAPP.WinForm.Forms.TianJin
{
strprodtype = "( 后 )";
}
if (strvin.Substring(0, 3) == "770")
if (strvin.Substring(0, 3) == "770"|| strvin.Substring(0, 3) == "304")
nfpastecard.MbConfig = strvin.Substring(3, 3);
else
nfpastecard.MbConfig = strvin.Substring(4, 3);
@ -2178,7 +2178,7 @@ namespace QMAPP.WinForm.Forms.TianJin
ncsdr["PRODUCTIONNAME"] = strprodtype;
ncsdr["LINENO"] = tbl.Rows[i]["LINENO"].ToString();
if (strvin.Substring(0, 3) == "770")
if (strvin.Substring(0, 3) == "770"|| strvin.Substring(0, 3) == "304")
ncsdr["MbConfig"] = strvin.Substring(3, 3);
else
ncsdr["MbConfig"] = strvin.Substring(4, 3);

8
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs

@ -764,21 +764,21 @@ namespace QMAPP.WinForm.Forms.TianJin
}
labels.Add(labeldata);
//WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始打印" + labeldata.OrderNo);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始打印" + labeldata.OrderNo);
PrintLabel(labels);
//WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始变成打印状态" + labeldata.OrderNo);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始变成打印状态" + labeldata.OrderNo);
//变更打印状态 0=>1
_agent.InvokeServiceFunction<int>("WorkOrderBLL_SetOrderPrinted", orders[0].PID);
//WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始插入记录" + labeldata.OrderNo);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始插入记录" + labeldata.OrderNo);
InsertProduct(labeldata.OrderNo, orders[0].MATERIAL_CODE, comboBox1.SelectedValue.ToString());
if (orders[0].MATERIAL_NAME.Contains("前"))
FR = "后";
else if (orders[0].MATERIAL_NAME.Contains("后"))
FR = "前";
//WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 插入结束" + labeldata.OrderNo);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 插入结束" + labeldata.OrderNo);
}
BindPlanView();

4
APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2024.01.30.01")]
[assembly: AssemblyFileVersion("2024.01.30.01")]
[assembly: AssemblyVersion("2024.05.16.01")]
[assembly: AssemblyFileVersion("2024.05.16.01")]

49
AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

@ -228,6 +228,55 @@ namespace QMAPP.ServicesAgent
[Description("基础数据方法枚举")]
public enum DictService
{
#region 天津库存系统
/// <summary>
/// 点检项插入
/// </summary>
PutMachineClassBLL_Insert,
/// <summary>
/// 点检项更新
/// </summary>
PutMachineClassBLL_Update,
/// <summary>
/// 点检项删除
/// </summary>
PutMachineClassBLL_Delete,
/// <summary>
/// 点检项上下限插入
/// </summary>
PutMachineBLL_Insert,
/// <summary>
/// 点检项上下限更新
/// </summary>
PutMachineBLL_Update,
/// <summary>
/// 点检项上下限删除
/// </summary>
PutMachineBLL_Delete,
/// <summary>
/// 泡沫点检记录
/// </summary>
PutMachineValueBLL_Insert,
/// <summary>
/// 泡沫点检记录更新
/// </summary>
PutMachineValueBLL_Update,
/// <summary>
/// 泡沫点检记录删除
/// </summary>
PutMachineValueBLL_Delete,
#endregion
#region 条码替换记录
/// <summary>

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

@ -1002,4 +1002,28 @@
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>PutMachineClassBLL</ServiceName>
<ServiceDes>点检项</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.PutMachineClassBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>PutMachineBLL</ServiceName>
<ServiceDes>点检项</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.PutMachineBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>PutMachineValueBLL</ServiceName>
<ServiceDes>泡沫点检记录</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.PutMachineValueBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
</BusinessDllList>

8
ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

@ -76,18 +76,18 @@
<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<!--
<add name="maindbYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBNCSNF;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBDY;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>-->
<!--
<!--
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>

85
WebAPI/Controllers/InventoryController.cs

@ -0,0 +1,85 @@
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 InventoryController : ApiController
{
public Response<List<OrderPlan_PaoMo>> GetPlanList()
{
var result = new Response<List<OrderPlan_PaoMo>>();
List<OrderPlan_PaoMo> List_plan = new List<OrderPlan_PaoMo>();
var sqlScript = "";
sqlScript = $"select top 10 * from T_PP_ORDERPLAN_PAOMO order by PLAN_DATE desc";
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript);
if (dataSet.Tables[0].Rows.Count > 0)
{
foreach (DataRow row in dataSet.Tables[0].Rows)
{
OrderPlan_PaoMo OrderPlan = new OrderPlan_PaoMo();
OrderPlan.PID = row["PID"].ToString();
OrderPlan.PLAN_NO = row["PLAN_NO"].ToString();
OrderPlan.PLAN_SEQ = row["PLAN_SEQ"].ToString();
OrderPlan.PLAN_STATE = row["PLAN_STATE"].ToString();
OrderPlan.MATERIAL_CODE = row["MATERIAL_CODE"].ToString();
OrderPlan.PBOM_CODE = row["PBOM_CODE"].ToString();
OrderPlan.ROUTE_CODE = row["ROUTE_CODE"].ToString();
OrderPlan.QTY = row["QTY"].ToString();
OrderPlan.COMPLETE_QTY = row["COMPLETE_QTY"].ToString();
OrderPlan.PLAN_DATE = row["PLAN_DATE"].ToString();
OrderPlan.SHIFT_CODE = row["SHIFT_CODE"].ToString();
List_plan.Add(OrderPlan);
}
result.Result = List_plan;
}
else
{
result.Code = 201;
result.Message = "用户信息不存在";
}
return result;
}
public async Task<IHttpActionResult> Insert()
{
var request = await this.Request.Content.ReadAsStringAsync();
var requeststr = request.Replace("\r", "").Replace("\n", "");
var resObj = JsonHelper.Instance.JsonToObj<Inventory>(requeststr);
//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}');";
//SqlData.InsertWare(sql);
var Response = new Response();
return Ok(Response);
}
}
}

44
WebAPI/Models/Inventory.cs

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
public class Inventory
{
public string PID { get; set; }
public string ProductCode { get; set; }
/// <summary>
/// 1:泡沫 2:注塑
/// </summary>
public string Type { get; set; }
/// <summary>
/// 1:库存 2:出库 3:隔离 4:报废
/// </summary>
public string State { get; set; }
public string CreateUser { get; set; }
public string CreateDate { get; set; }
public string UpdateUser { get; set; }
public string UpdateDate { get; set; }
/// <summary>
/// 计划ID
/// </summary>
public string PlanID { get; set; }
public string Remark1 { get; set; }
public string Remark2 { get; set; }
public string Remark3 { get; set; }
}
}

2
WebAPI/WebAPI.csproj

@ -165,12 +165,14 @@
<Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\InventoryController.cs" />
<Compile Include="Controllers\MachineController.cs" />
<Compile Include="Controllers\WareController.cs" />
<Compile Include="Controllers\WareHouseController.cs" />
<Compile Include="Controllers\PlanController.cs" />
<Compile Include="Controllers\MachineClassController.cs" />
<Compile Include="Controllers\LoginController.cs" />
<Compile Include="Models\Inventory.cs" />
<Compile Include="Models\JsonHelper.cs" />
<Compile Include="Models\OrderPlan_ZhuSu.cs" />
<Compile Include="Models\OrderPlan_PaoMo.cs" />

Loading…
Cancel
Save