Browse Source

门槛bom和装配计划实体模型和dal处理更新

master
周红军 3 days ago
parent
commit
a6109f15bc
  1. 281
      MESClassLibrary/BLL/BasicInfo/Bom_MKBLL.cs
  2. 16
      MESClassLibrary/BLL/ZPPlan/ZP_MK_PlanBLL.cs
  3. 150
      MESClassLibrary/DAL/BasicInfo/Bom_MKDAL.cs
  4. 1
      MESClassLibrary/EFModel/BBMPT.Context.cs
  5. 65
      MESClassLibrary/EFModel/BBMPT.edmx
  6. 125
      MESClassLibrary/EFModel/BBMPT.edmx.diagram
  7. 1
      MESClassLibrary/EFModel/tb_Bom.cs
  8. 26
      MESClassLibrary/EFModel/tb_Bom_MK.cs
  9. 6
      MESClassLibrary/EFModel/tb_ZP_MK_Plan.cs
  10. 16
      MESClassLibrary/Model/Bom_MKModel.cs

281
MESClassLibrary/BLL/BasicInfo/Bom_MKBLL.cs

@ -0,0 +1,281 @@
using MESClassLibrary.BLL.Log;
using MESClassLibrary.EFModel;
using MESClassLibrary.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using MESClassLibrary.DAL.BasicInfo;
namespace MESClassLibrary.BLL.BasicInfo
{
public class Bom_MKBLL
{
BasicBLL<tb_Bom_MK> db = new BasicBLL<tb_Bom_MK>();
/// <summary>
/// 新增信息
/// </summary>
/// <param name="md"></param>
/// <returns></returns>
public bool AddInfo(tb_Bom_MK md)
{
try
{
var list = db.SearchInfoByKey("PartNo1", md.PartNo1);//判断是否有重复数据
if (list != null)
{
//if (list.Where(p => p.BomID != md.BomID).Count() > 0)
//{
// return false;
//}
}
return db.AddInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
/// <summary>
/// 修改信息
/// </summary>
/// <param name="md"></param>
/// <returns></returns>
public bool UpdateInfo(tb_Bom_MK md)
{
try
{
var list = db.SearchAllInfo().Where(p => p.PartNo1 == md.PartNo1 && p.BomID != md.BomID).ToList();//判断是否有重复数据
//if (list.Count > 0)
//{
// return false;
//}
//初始化要更新的字段
string[] proNames = new string[2];
proNames[0] = "PartNo1";
proNames[1] = "PartNo2";
//必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化
//如果没有初始化必填字段,更新会报错
return db.UpdateInfo(md, proNames);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
/// <summary>
/// 删除信息
/// </summary>
/// <param name="md"></param>
/// <param name="flag"></param>
/// <returns></returns>
public bool DeleteInfo(tb_Bom_MK md)
{
try
{
return db.DelInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
/// <summary>
/// 查询全部信息分页
/// </summary>
/// <returns></returns>
public string SearchInfoAll(string page, string pagesize, string partNo1, string partNo2, string placeName)
{
try
{
string jsonStr = "[]";
int total = 0;//总行数
List<tb_Bom_MK> list = db.SearchAllInfo();
if (!String.IsNullOrEmpty(partNo1))
{
list = list.Where(p => p.PartNo1 != null && p.PartNo1.Contains(partNo1)).ToList();
}
if (!String.IsNullOrEmpty(partNo2))
{
list = list.Where(p => p.PartNo2 != null && p.PartNo2.Contains(partNo2) ).ToList();
}
if (!String.IsNullOrEmpty(placeName))
{
list = list.Where(p => p.PlaceName != null && p.PlaceName.Contains(placeName)).ToList();
}
if (list.Count > 0)
{
total = list.Count;
int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize);
list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList();
List<Bom_MKModel> modelList = new List<Bom_MKModel>();
BasicBLL<tb_Product> s_db = new BasicBLL<tb_Product>();
var s_list = s_db.SearchAllInfo();
foreach (var item in list)
{
Bom_MKModel dm = Tool.Mapper<Bom_MKModel, tb_Bom_MK>(item);
var info = s_list.FirstOrDefault(p => p.PartNo == item.PartNo1);
if (info != null)
{
dm.ProductName1 = info.ProductName;
}
var info2 = s_list.FirstOrDefault(p => p.PartNo == item.PartNo2);
if (info2 != null)
{
dm.ProductName2 = info2.ProductName;
}
modelList.Add(dm);
}
JsonDataModel<Bom_MKModel> md = new JsonDataModel<Bom_MKModel>();
md.total = total.ToString();
md.rows = modelList;
jsonStr = JSONTools.ScriptSerialize<JsonDataModel<Bom_MKModel>>(md);
}
return jsonStr;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
/// <summary>
/// 查询全部信息
/// </summary>
/// <returns></returns>
public List<tb_Bom_MK> SearchAll()
{
try
{
var s_list = db.SearchAllInfo().ToList();
return s_list;
}
catch (Exception)
{
return null;
}
}
/// <summary>
/// 根据ID查询信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public tb_Bom_MK SearchInfoByID(string id)
{
try
{
return db.SearchInfoByID(id);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchBom(string PartNo)
{
BomDAL dal = new BomDAL();
try
{
return dal.SearchBom(PartNo);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable Search(string partNo1, string partNo2)
{
BomDAL dal = new BomDAL();
try
{
return dal.Search(partNo1, partNo2);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool AddInfo(Bom_MKModel md)
{
Bom_MKDAL dal = new Bom_MKDAL();
try
{
return dal.AddInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool updateInfo(Bom_MKModel md)
{
Bom_MKDAL dal = new Bom_MKDAL();
try
{
return dal.updateInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool DelInfo(Bom_MKModel md)
{
Bom_MKDAL dal = new Bom_MKDAL();
try
{
return dal.DelInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
}
}

16
MESClassLibrary/BLL/ZPPlan/ZP_MK_PlanBLL.cs

@ -25,11 +25,11 @@ namespace MESClassLibrary.BLL.BasicInfo
try
{
var now = DateTime.Now;
md.ID = Guid.NewGuid().ToString();
//md.ID = Guid.NewGuid().ToString();
md.CreateTime = now;
md.OrderNo = now.ToString("yyyyMMdd");
md.State = 0;
md.ProductCount = 0;
md.OKCount = 0;
md.BadCount = 0;
md.Item = GetItem(md.OrderNo);
var result = db.AddInfo(md);
@ -57,18 +57,18 @@ namespace MESClassLibrary.BLL.BasicInfo
{
try
{
var data = db.SearchInfoByID(md.ID);
var data = db.SearchInfoByID(md.ID.ToString());
if (data.State == 3)
{
msg = "该计划已经完成";
return false;
}
if (data.ProductCount.GetValueOrDefault(0).CompareTo(md.OrderCount) > 0)
if (data.OKCount.GetValueOrDefault(0).CompareTo(md.OrderCount) > 0)
{
msg = "计划数量不能小于完成数量";
return false;
}
if (data.ProductCount.GetValueOrDefault(0) == 0)
if (data.OKCount.GetValueOrDefault(0) == 0)
{
//data.StationID = md.StationID;
data.PartNo = md.PartNo;
@ -201,10 +201,10 @@ namespace MESClassLibrary.BLL.BasicInfo
if (string.IsNullOrEmpty(partNo))
{
list = db.Search(
q => (q.CreateTime >= st &&
q.CreateTime <= et) &&
q => (q.OrderDate >= st &&
q.OrderDate <= et) &&
q.State != 3,
q => q.CreateTime);
q => q.OrderDate);
}
else
{

150
MESClassLibrary/DAL/BasicInfo/Bom_MKDAL.cs

@ -0,0 +1,150 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using MESClassLibrary.BLL.Log;
using MESClassLibrary.Model;
namespace MESClassLibrary.DAL.BasicInfo
{
public class Bom_MKDAL
{
public DataTable SearchBom(string PartNo)
{
try
{
string sql = @"SELECT dbo.tb_Product.ProductName, dbo.tb_ProductType.ProductTypeName, dbo.tb_ProductType.ProductTypeNo,
dbo.tb_Product.PartNo, dbo.tb_Bom.PartNo2, dbo.tb_Product.StockNo
FROM dbo.tb_Bom RIGHT OUTER JOIN
dbo.tb_Product ON dbo.tb_Bom.PartNo1 = dbo.tb_Product.PartNo LEFT OUTER JOIN
dbo.tb_ProductType ON dbo.tb_Product.ProductTypeID = dbo.tb_ProductType.ProductTypeID
WHERE PartNo=@PartNo";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar);
param[0].Value = PartNo;
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable Search(string partNo1, string partNo2)
{
try
{
string sql = "select * from tb_Bom where PartNo1=@partNo1,PartNo2=@partNo2";
SqlParameter[] param = new SqlParameter[2];
param[0] = new SqlParameter("@@partNo1", SqlDbType.VarChar);
param[0].Value = partNo1;
param[1] = new SqlParameter("@@partNo2", SqlDbType.VarChar);
param[1].Value = partNo2;
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool AddInfo(Bom_MKModel md)
{
string sql = "";
SqlParameter[] param = null;
try
{
sql = "insert into tb_Bom(ID,,PartNo1,PartNo2) values(@ID,@partNo1,@partNo2)";
param = new SqlParameter[3];
param[0] = new SqlParameter("@ID", SqlDbType.VarChar);
param[0].Value = md.BomID;
param[1] = new SqlParameter("@partNo1", SqlDbType.VarChar);
param[1].Value = md.PartNo1;
param[2] = new SqlParameter("@partNo2", SqlDbType.VarChar);
param[2].Value = md.PartNo2;
SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool updateInfo(Bom_MKModel md)
{
string sql = "";
SqlParameter[] param = null;
try
{
sql = "update tb_Bom set PartNo2=@partNo2 where PartNo1=@partNo1";
param = new SqlParameter[2];
param[0] = new SqlParameter("@partNo1", SqlDbType.VarChar);
param[0].Value = md.PartNo1;
param[1] = new SqlParameter("@partNo2", SqlDbType.VarChar);
param[1].Value = md.PartNo2;
SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool DelInfo(Bom_MKModel md)
{
string sql = "";
SqlParameter[] param = null;
try
{
sql = "delete from tb_Bom where PartNo1=@partNo1 and PartNo2=@partNo2 ";
param = new SqlParameter[2];
param[0] = new SqlParameter("@partNo1", SqlDbType.VarChar);
param[0].Value = md.PartNo1;
param[1] = new SqlParameter("@partNo2", SqlDbType.VarChar);
param[1].Value = md.PartNo2;
SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
}
}

1
MESClassLibrary/EFModel/BBMPT.Context.cs

@ -195,6 +195,7 @@ namespace MESClassLibrary.EFModel
public virtual DbSet<t_XD_ProductType> t_XD_ProductType { get; set; }
public virtual DbSet<W_XD_Product_del> W_XD_Product_del { get; set; }
public virtual DbSet<t_XD_StockArea> t_XD_StockArea { get; set; }
public virtual DbSet<tb_Bom_MK> tb_Bom_MK { get; set; }
public virtual DbSet<tb_ZP_MK_Plan> tb_ZP_MK_Plan { get; set; }
}
}

65
MESClassLibrary/EFModel/BBMPT.edmx

@ -651,6 +651,20 @@
<Property Name="PartNo1" Type="nvarchar" MaxLength="50" />
<Property Name="PartNo2" Type="nvarchar" MaxLength="50" />
<Property Name="UserID" Type="char" MaxLength="36" />
<Property Name="IsChecked" Type="bit" />
</EntityType>
<EntityType Name="tb_Bom_MK">
<Key>
<PropertyRef Name="BomID" />
</Key>
<Property Name="BomID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="PartNo1" Type="nvarchar" MaxLength="50" />
<Property Name="PartNo2" Type="nvarchar" MaxLength="50" />
<Property Name="UserID" Type="char" MaxLength="36" />
<Property Name="IsChecked" Type="bit" />
<Property Name="PlaceName" Type="nvarchar" MaxLength="100" />
<Property Name="IsPartAssemble" Type="int" />
<Property Name="StationNo" Type="varchar" MaxLength="50" />
</EntityType>
<EntityType Name="tb_Box_247">
<Key>
@ -2204,19 +2218,21 @@
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="char" MaxLength="36" Nullable="false" />
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="OrderNo" Type="nvarchar" MaxLength="50" />
<Property Name="OrderName" Type="nvarchar" MaxLength="50" />
<Property Name="OrderDate" Type="date" />
<Property Name="OrderDate" Type="datetime" />
<Property Name="Item" Type="int" />
<Property Name="Station" Type="nvarchar" MaxLength="50" />
<Property Name="Line" Type="nvarchar" MaxLength="50" />
<Property Name="PartNo" Type="nvarchar" MaxLength="50" />
<Property Name="OrderCount" Type="int" />
<Property Name="ProductCount" Type="int" />
<Property Name="OKCount" Type="int" />
<Property Name="State" Type="int" />
<Property Name="BadCount" Type="int" />
<Property Name="CreateTime" Type="datetime" />
<Property Name="FinishTime" Type="datetime" />
<Property Name="RepairCount" Type="int" />
</EntityType>
<EntityType Name="tb_ZPBom">
<Key>
@ -2619,6 +2635,7 @@
<EntitySet Name="tb_BarCode_BMW" EntityType="Self.tb_BarCode_BMW" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_BillNo" EntityType="Self.tb_BillNo" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_Bom" EntityType="Self.tb_Bom" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_Bom_MK" EntityType="Self.tb_Bom_MK" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_Box_247" EntityType="Self.tb_Box_247" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_Box_tx" EntityType="Self.tb_Box_tx" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_BucketInfo" EntityType="Self.tb_BucketInfo" Schema="dbo" store:Type="Tables" />
@ -3574,6 +3591,7 @@
<EntitySet Name="t_XD_ProductType" EntityType="BBMPTModel.t_XD_ProductType" />
<EntitySet Name="W_XD_Product_del" EntityType="BBMPTModel.W_XD_Product_del" />
<EntitySet Name="t_XD_StockArea" EntityType="BBMPTModel.t_XD_StockArea" />
<EntitySet Name="tb_Bom_MK" EntityType="BBMPTModel.tb_Bom_MK" />
<EntitySet Name="tb_ZP_MK_Plan" EntityType="BBMPTModel.tb_ZP_MK_Plan" />
</EntityContainer>
<EntityType Name="LogErr">
@ -3822,6 +3840,7 @@
<Property Name="PartNo1" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="PartNo2" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="UserID" Type="String" MaxLength="36" FixedLength="true" Unicode="false" />
<Property Name="IsChecked" Type="Boolean" />
</EntityType>
<EntityType Name="tb_Box_247">
<Key>
@ -6062,23 +6081,38 @@
<Property Name="Name" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
<Property Name="U8Code" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
</EntityType>
<EntityType Name="tb_Bom_MK">
<Key>
<PropertyRef Name="BomID" />
</Key>
<Property Name="BomID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="PartNo1" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="PartNo2" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="UserID" Type="String" MaxLength="36" FixedLength="true" Unicode="false" />
<Property Name="IsChecked" Type="Boolean" />
<Property Name="PlaceName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
<Property Name="IsPartAssemble" Type="Int32" />
<Property Name="StationNo" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="tb_ZP_MK_Plan">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="String" Nullable="false" MaxLength="36" FixedLength="true" Unicode="false" />
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="OrderNo" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="OrderName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="OrderDate" Type="DateTime" Precision="0" />
<Property Name="OrderDate" Type="DateTime" Precision="3" />
<Property Name="Item" Type="Int32" />
<Property Name="Station" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="Line" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="PartNo" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="OrderCount" Type="Int32" />
<Property Name="ProductCount" Type="Int32" />
<Property Name="OKCount" Type="Int32" />
<Property Name="State" Type="Int32" />
<Property Name="BadCount" Type="Int32" />
<Property Name="CreateTime" Type="DateTime" Precision="3" />
<Property Name="FinishTime" Type="DateTime" Precision="3" />
<Property Name="RepairCount" Type="Int32" />
</EntityType>
</Schema>
</edmx:ConceptualModels>
@ -6346,6 +6380,7 @@
<EntitySetMapping Name="tb_Bom">
<EntityTypeMapping TypeName="BBMPTModel.tb_Bom">
<MappingFragment StoreEntitySet="tb_Bom">
<ScalarProperty Name="IsChecked" ColumnName="IsChecked" />
<ScalarProperty Name="UserID" ColumnName="UserID" />
<ScalarProperty Name="PartNo2" ColumnName="PartNo2" />
<ScalarProperty Name="PartNo1" ColumnName="PartNo1" />
@ -8719,13 +8754,29 @@
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="tb_Bom_MK">
<EntityTypeMapping TypeName="BBMPTModel.tb_Bom_MK">
<MappingFragment StoreEntitySet="tb_Bom_MK">
<ScalarProperty Name="StationNo" ColumnName="StationNo" />
<ScalarProperty Name="IsPartAssemble" ColumnName="IsPartAssemble" />
<ScalarProperty Name="PlaceName" ColumnName="PlaceName" />
<ScalarProperty Name="IsChecked" ColumnName="IsChecked" />
<ScalarProperty Name="UserID" ColumnName="UserID" />
<ScalarProperty Name="PartNo2" ColumnName="PartNo2" />
<ScalarProperty Name="PartNo1" ColumnName="PartNo1" />
<ScalarProperty Name="BomID" ColumnName="BomID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="tb_ZP_MK_Plan">
<EntityTypeMapping TypeName="BBMPTModel.tb_ZP_MK_Plan">
<MappingFragment StoreEntitySet="tb_ZP_MK_Plan">
<ScalarProperty Name="RepairCount" ColumnName="RepairCount" />
<ScalarProperty Name="FinishTime" ColumnName="FinishTime" />
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="BadCount" ColumnName="BadCount" />
<ScalarProperty Name="State" ColumnName="State" />
<ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
<ScalarProperty Name="OKCount" ColumnName="OKCount" />
<ScalarProperty Name="OrderCount" ColumnName="OrderCount" />
<ScalarProperty Name="PartNo" ColumnName="PartNo" />
<ScalarProperty Name="Line" ColumnName="Line" />

125
MESClassLibrary/EFModel/BBMPT.edmx.diagram

@ -173,7 +173,10 @@
<EntityTypeShape EntityType="BBMPTModel.View_1" Width="1.5" PointX="0.5" PointY="18.625" IsExpanded="false" />
<AssociationConnector Association="BBMPTModel.FK_T_SYS_RO_REFERENCE_T_SYS_PO" />
<EntityTypeShape EntityType="BBMPTModel.tb_ForeignColorMap" Width="1.5" PointX="0.5" PointY="3.75" IsExpanded="false" />
<EntityTypeShape EntityType="BBMPTModel.tb_ZP_MK_Plan" Width="1.5" PointX="9.4989690061188163" PointY="12.916272690946363" />
<EntityTypeShape EntityType="BBMPTModel.tb_Bom_MK" Width="1.5" PointX="7.5884246675243716" PointY="25.518843707404493" />
<EntityTypeShape EntityType="BBMPTModel.tb_ZP_MK_Plan" Width="1.5" PointX="8.6183643250811688" PointY="11.701445868099782" />
@ -6476,6 +6479,126 @@
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r85
</Diagram>
<Diagram DiagramId="56fb9509dfdb4dde96dce5edc0ce3e94" Name="Diagram2" >
</Diagram>

1
MESClassLibrary/EFModel/tb_Bom.cs

@ -18,5 +18,6 @@ namespace MESClassLibrary.EFModel
public string PartNo1 { get; set; }
public string PartNo2 { get; set; }
public string UserID { get; set; }
public Nullable<bool> IsChecked { get; set; }
}
}

26
MESClassLibrary/EFModel/tb_Bom_MK.cs

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace MESClassLibrary.EFModel
{
using System;
using System.Collections.Generic;
public partial class tb_Bom_MK
{
public int BomID { get; set; }
public string PartNo1 { get; set; }
public string PartNo2 { get; set; }
public string UserID { get; set; }
public Nullable<bool> IsChecked { get; set; }
public string PlaceName { get; set; }
public Nullable<int> IsPartAssemble { get; set; }
public string StationNo { get; set; }
}
}

6
MESClassLibrary/EFModel/tb_ZP_MK_Plan.cs

@ -14,7 +14,7 @@ namespace MESClassLibrary.EFModel
public partial class tb_ZP_MK_Plan
{
public string ID { get; set; }
public int ID { get; set; }
public string OrderNo { get; set; }
public string OrderName { get; set; }
public Nullable<System.DateTime> OrderDate { get; set; }
@ -23,9 +23,11 @@ namespace MESClassLibrary.EFModel
public string Line { get; set; }
public string PartNo { get; set; }
public Nullable<int> OrderCount { get; set; }
public Nullable<int> ProductCount { get; set; }
public Nullable<int> OKCount { get; set; }
public Nullable<int> State { get; set; }
public Nullable<int> BadCount { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public Nullable<System.DateTime> FinishTime { get; set; }
public Nullable<int> RepairCount { get; set; }
}
}

16
MESClassLibrary/Model/Bom_MKModel.cs

@ -0,0 +1,16 @@
using MESClassLibrary.EFModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MESClassLibrary.Model
{
public class Bom_MKModel : tb_Bom_MK
{
public string ProductName1 { get; set; }
public string ProductName2 { get; set; }
}
}
Loading…
Cancel
Save