Browse Source

根据数据表更新模型

master
周红军 2 weeks ago
parent
commit
74f56193fc
  1. 358
      MESClassLibrary/BLL/ZPPlan/ZP_MK_PlanBLL.cs
  2. 1
      MESClassLibrary/EFModel/BBMPT.Context.cs
  3. 2
      MESClassLibrary/EFModel/BBMPT.Designer.cs
  4. 116
      MESClassLibrary/EFModel/BBMPT.edmx
  5. 1
      MESClassLibrary/EFModel/BBMPT.edmx.diagram
  6. 2
      MESClassLibrary/EFModel/tb_BarCode1.cs
  7. 2
      MESClassLibrary/EFModel/tb_BarCode2.cs
  8. 2
      MESClassLibrary/EFModel/tb_BarCode3.cs
  9. 2
      MESClassLibrary/EFModel/tb_BarCode4.cs
  10. 2
      MESClassLibrary/EFModel/tb_BarCode5.cs
  11. 1
      MESClassLibrary/EFModel/tb_InjectionPlan.cs
  12. 1
      MESClassLibrary/EFModel/tb_Injection_BoxRecord.cs
  13. 1
      MESClassLibrary/EFModel/tb_Operator.cs
  14. 31
      MESClassLibrary/EFModel/tb_ZP_MK_Plan.cs
  15. 20
      MESClassLibrary/Model/ZP_MK_PlanModel.cs

358
MESClassLibrary/BLL/ZPPlan/ZP_MK_PlanBLL.cs

@ -0,0 +1,358 @@
using MESClassLibrary.BLL.Log;
using MESClassLibrary.DAL.ZPPlan;
using MESClassLibrary.EFModel;
using MESClassLibrary.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
namespace MESClassLibrary.BLL.BasicInfo
{
public class ZP_MK_PlanBLL
{
readonly BasicBLL<tb_ZP_MK_Plan> db = new BasicBLL<tb_ZP_MK_Plan>();
/// <summary>
/// 新增信息
/// </summary>
/// <param name="md"></param>
/// <returns></returns>
public bool AddInfo(tb_ZP_MK_Plan md)
{
try
{
var now = DateTime.Now;
md.ID = Guid.NewGuid().ToString();
md.CreateTime = now;
md.OrderNo = now.ToString("yyyyMMdd");
md.State = 0;
md.ProductCount = 0;
md.BadCount = 0;
md.Item = GetItem(md.OrderNo);
var result = db.AddInfo(md);
return result;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
private int GetItem(string orderNo)
{
var lastItem = db.Search(q => q.OrderNo == orderNo, q => q.CreateTime).LastOrDefault();
return lastItem == null ? 1 : (lastItem.Item.Value + 1);
}
/// <summary>
/// 修改信息
/// </summary>
/// <param name="md"></param>
/// <returns></returns>
public bool UpdateInfo(tb_ZP_MK_Plan md, ref string msg)
{
try
{
var data = db.SearchInfoByID(md.ID);
if (data.State == 3)
{
msg = "该计划已经完成";
return false;
}
if (data.ProductCount.GetValueOrDefault(0).CompareTo(md.OrderCount) > 0)
{
msg = "计划数量不能小于完成数量";
return false;
}
if (data.ProductCount.GetValueOrDefault(0) == 0)
{
//data.StationID = md.StationID;
data.PartNo = md.PartNo;
data.OrderDate = md.OrderDate;
}
//data.IsOneMore = md.IsOneMore;
data.OrderCount = md.OrderCount;
data.OrderName = md.OrderName;
return db.UpdateInfo(data);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
msg = ex.ToString();
return false;
}
}
/// <summary>
/// 删除信息
/// </summary>
/// <param name="md"></param>
/// <param name="flag"></param>
/// <returns></returns>
public bool DeleteInfo(tb_ZP_MK_Plan md)
{
try
{
return db.DelInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
/// <summary>
/// 查询全部信息分页
/// </summary>
/// <returns></returns>
public string SearchInfoAll(int page,
int pagesize,
string startTime,
string endTime,
string partNo)
{
try
{
string jsonStr = "[]";
int total = 0;//总行数
IEnumerable<tb_ZP_MK_Plan> list = SearchDB(startTime, endTime, partNo);
if (list.Any())
{
List<ZP_MK_PlanModel> modelList = new List<ZP_MK_PlanModel>();
total = list.Count();
int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize);
list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize));
ProductBLL prodBll = new ProductBLL();
var prodList = prodBll.SearchAll();
//StationBLL stationBll = new StationBLL();
//var stationList = stationBll.SearchAll();
foreach (var item in list)
{
var prodInfo = prodList.Where(q => q.PartNo == item.PartNo).FirstOrDefault();
//var stationInfo = stationList.Where(q => q.StationID == item.StationID).FirstOrDefault();
ZP_MK_PlanModel zpm = Tool.Mapper<ZP_MK_PlanModel, tb_ZP_MK_Plan>(item);
//zpm.StationNo = stationInfo == null ? "" : stationInfo.StationNo;
zpm.ProductName = prodInfo == null ? "" : prodInfo.ProductName;
modelList.Add(zpm);
}
JsonDataModel<ZP_MK_PlanModel> md = new JsonDataModel<ZP_MK_PlanModel>
{
total = total.ToString(),
rows = modelList
};
jsonStr = md.ToSerializer();
}
return jsonStr;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public List<ZP_MK_PlanModel> SearchByCreateTime(string startTime, string endTime, string partNo)
{
IEnumerable<tb_ZP_MK_Plan> list = SearchDB(startTime, endTime, partNo);
List<ZP_MK_PlanModel> modelList = new List<ZP_MK_PlanModel>();
if (list.Any())
{
ProductBLL prodBll = new ProductBLL();
var prodList = prodBll.SearchAll();
StationBLL stationBll = new StationBLL();
var stationList = stationBll.SearchAll();
foreach (var item in list)
{
var prodInfo = prodList.Where(q => q.PartNo == item.PartNo).FirstOrDefault();
//var stationInfo = stationList.Where(q => q.StationID == item.StationID).FirstOrDefault();
ZP_MK_PlanModel zpm = Tool.Mapper<ZP_MK_PlanModel, tb_ZP_MK_Plan>(item);
//zpm.StationNo = stationInfo == null ? "" : stationInfo.StationNo;
zpm.ProductName = prodInfo == null ? "" : prodInfo.ProductName;
modelList.Add(zpm);
}
}
return modelList;
}
public IEnumerable<tb_ZP_MK_Plan> SearchDB(string startTime, string endTime, string partNo)
{
DateTime st, et;
if (!DateTime.TryParse(startTime, out st)) st = DateTime.MinValue;
if (!DateTime.TryParse(endTime, out et)) et = DateTime.MaxValue;
IEnumerable<tb_ZP_MK_Plan> list;
if (string.IsNullOrEmpty(partNo))
{
list = db.Search(
q => (q.CreateTime >= st &&
q.CreateTime <= et) &&
q.State != 3,
q => q.CreateTime);
}
else
{
list = db.Search(q => q.PartNo != null && q.PartNo.Contains(partNo) && q.State == 0, q => q.CreateTime);
}
return list;
}
/// <summary>
/// 查询全部信息
/// </summary>
/// <returns></returns>
public List<tb_ZP_MK_Plan> SearchAll()
{
try
{
var s_list = db.SearchAllInfo();
return s_list;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
/// <summary>
/// 根据ID查询信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public tb_ZP_MK_Plan SearchInfoByID(string id)
{
try
{
return db.SearchInfoByID(id);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable GetProductingPlan(string station)
{
try
{
ZPPlanDAL dal=new ZPPlanDAL();
return dal.GetProductingPlan(station);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable GetProductingPlan1(string station,string orderNo)
{
try
{
ZPPlanDAL dal = new ZPPlanDAL();
return dal.GetProductingPlan1(station,orderNo);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable GetPlan(string station, int flag, string planTime)
{
try
{
ZPPlanDAL dal = new ZPPlanDAL();
return dal.GetPlan(station, flag,planTime);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool updateQty(ZPPlanModel md)
{
try
{
ZPPlanDAL dal = new ZPPlanDAL();
return dal.updateQty(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool updateBad(ZPPlanModel md)
{
try
{
ZPPlanDAL dal = new ZPPlanDAL();
return dal.updateBad(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SearchPlanInfo(string planID)
{
try
{
ZPPlanDAL dal = new ZPPlanDAL();
return dal.SearchPlanInfo(planID);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchOrderNo(string orderno)
{
try
{
ZPPlanDAL dal = new ZPPlanDAL();
return dal.SearchOrderNo(orderno);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod());
return null;
}
}
}
}

1
MESClassLibrary/EFModel/BBMPT.Context.cs

@ -195,5 +195,6 @@ 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_ZP_MK_Plan> tb_ZP_MK_Plan { get; set; }
}
}

2
MESClassLibrary/EFModel/BBMPT.Designer.cs

@ -1,4 +1,4 @@
// 为模型“D:\Project\BBMPT1\MESClassLibrary\EFModel\BBMPT.edmx”启用了 T4 代码生成。
// 为模型“D:\job\BBMPT1\MESClassLibrary\EFModel\BBMPT.edmx”启用了 T4 代码生成。
// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值
// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时,此属性会出现在
// “属性”窗口中。

116
MESClassLibrary/EFModel/BBMPT.edmx

@ -494,6 +494,8 @@
<Property Name="Des5" Type="nvarchar" MaxLength="200" />
<Property Name="Weight" Type="decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="nvarchar" MaxLength="50" />
<Property Name="IsNew" Type="int" />
<Property Name="AddMan" Type="varchar" MaxLength="50" />
</EntityType>
<!--生成过程中发现错误:
警告 6002: 表/视图“BBMPT1.dbo.tb_BarCode2”未定义主键。已推断出该键,并将定义创建为只读的表/视图。-->
@ -524,6 +526,8 @@
<Property Name="Des5" Type="nvarchar" MaxLength="200" />
<Property Name="Weight" Type="decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="nvarchar" MaxLength="50" />
<Property Name="IsNew" Type="int" />
<Property Name="AddMan" Type="varchar" MaxLength="50" />
</EntityType>
<!--生成过程中发现错误:
警告 6002: 表/视图“BBMPT1.dbo.tb_BarCode3”未定义主键。已推断出该键,并将定义创建为只读的表/视图。-->
@ -554,6 +558,8 @@
<Property Name="Des5" Type="nvarchar" MaxLength="200" />
<Property Name="Weight" Type="decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="nvarchar" MaxLength="50" />
<Property Name="IsNew" Type="int" />
<Property Name="AddMan" Type="varchar" MaxLength="50" />
</EntityType>
<!--生成过程中发现错误:
警告 6002: 表/视图“BBMPT1.dbo.tb_BarCode4”未定义主键。已推断出该键,并将定义创建为只读的表/视图。-->
@ -584,6 +590,8 @@
<Property Name="Des5" Type="nvarchar" MaxLength="200" />
<Property Name="Weight" Type="decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="nvarchar" MaxLength="50" />
<Property Name="IsNew" Type="int" />
<Property Name="AddMan" Type="varchar" MaxLength="50" />
</EntityType>
<!--生成过程中发现错误:
警告 6002: 表/视图“BBMPT1.dbo.tb_BarCode5”未定义主键。已推断出该键,并将定义创建为只读的表/视图。-->
@ -614,6 +622,8 @@
<Property Name="Des5" Type="nvarchar" MaxLength="200" />
<Property Name="Weight" Type="decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="nvarchar" MaxLength="50" />
<Property Name="IsNew" Type="int" />
<Property Name="AddMan" Type="varchar" MaxLength="50" />
</EntityType>
<!--生成过程中发现错误:
警告 6002: 表/视图“BBMPT1.dbo.tb_BarCodeUnique”未定义主键。已推断出该键,并将定义创建为只读的表/视图。-->
@ -1038,6 +1048,7 @@
<Property Name="IsPrint" Type="int" />
<Property Name="PrintTime" Type="datetime" />
<Property Name="Remark" Type="varchar" MaxLength="128" />
<Property Name="IsHandPrint" Type="int" />
</EntityType>
<EntityType Name="tb_Injection_DownRecord">
<Key>
@ -1116,6 +1127,7 @@
<Property Name="MarketCount" Type="int" />
<Property Name="BadCount" Type="int" />
<Property Name="Qty" Type="int" />
<Property Name="ActualTime" Type="datetime" />
</EntityType>
<EntityType Name="tb_InjectionPlan_20200901">
<Key>
@ -1450,6 +1462,7 @@
<Property Name="OperatorPsw" Type="nvarchar" MaxLength="50" />
<Property Name="Des" Type="text" />
<Property Name="UserID" Type="char" MaxLength="36" />
<Property Name="Limit" Type="varchar" MaxLength="50" />
</EntityType>
<EntityType Name="tb_Paint_Bucket">
<Key>
@ -2187,6 +2200,24 @@
<Property Name="DeviceNo" Type="nvarchar" MaxLength="20" />
<Property Name="CreateTime" Type="datetime" />
</EntityType>
<EntityType Name="tb_ZP_MK_Plan">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="char" MaxLength="36" Nullable="false" />
<Property Name="OrderNo" Type="nvarchar" MaxLength="50" />
<Property Name="OrderName" Type="nvarchar" MaxLength="50" />
<Property Name="OrderDate" Type="date" />
<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="State" Type="int" />
<Property Name="BadCount" Type="int" />
<Property Name="CreateTime" Type="datetime" />
</EntityType>
<EntityType Name="tb_ZPBom">
<Key>
<PropertyRef Name="ID" />
@ -2677,6 +2708,7 @@
<EntitySet Name="tb_UserLoginLog" EntityType="Self.tb_UserLoginLog" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_Weight" EntityType="Self.tb_Weight" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_weightRecord" EntityType="Self.tb_weightRecord" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_ZP_MK_Plan" EntityType="Self.tb_ZP_MK_Plan" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_ZPBom" EntityType="Self.tb_ZPBom" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_ZPBox" EntityType="Self.tb_ZPBox" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tb_ZPPlan" EntityType="Self.tb_ZPPlan" Schema="dbo" store:Type="Tables" />
@ -2787,7 +2819,9 @@
[tb_BarCode1].[Des4] AS [Des4],
[tb_BarCode1].[Des5] AS [Des5],
[tb_BarCode1].[Weight] AS [Weight],
[tb_BarCode1].[BatchNo] AS [BatchNo]
[tb_BarCode1].[BatchNo] AS [BatchNo],
[tb_BarCode1].[IsNew] AS [IsNew],
[tb_BarCode1].[AddMan] AS [AddMan]
FROM [dbo].[tb_BarCode1] AS [tb_BarCode1]</DefiningQuery>
</EntitySet>
<EntitySet Name="tb_BarCode2" EntityType="Self.tb_BarCode2" store:Type="Tables" store:Schema="dbo">
@ -2814,7 +2848,9 @@
[tb_BarCode2].[Des4] AS [Des4],
[tb_BarCode2].[Des5] AS [Des5],
[tb_BarCode2].[Weight] AS [Weight],
[tb_BarCode2].[BatchNo] AS [BatchNo]
[tb_BarCode2].[BatchNo] AS [BatchNo],
[tb_BarCode2].[IsNew] AS [IsNew],
[tb_BarCode2].[AddMan] AS [AddMan]
FROM [dbo].[tb_BarCode2] AS [tb_BarCode2]</DefiningQuery>
</EntitySet>
<EntitySet Name="tb_BarCode3" EntityType="Self.tb_BarCode3" store:Type="Tables" store:Schema="dbo">
@ -2841,7 +2877,9 @@
[tb_BarCode3].[Des4] AS [Des4],
[tb_BarCode3].[Des5] AS [Des5],
[tb_BarCode3].[Weight] AS [Weight],
[tb_BarCode3].[BatchNo] AS [BatchNo]
[tb_BarCode3].[BatchNo] AS [BatchNo],
[tb_BarCode3].[IsNew] AS [IsNew],
[tb_BarCode3].[AddMan] AS [AddMan]
FROM [dbo].[tb_BarCode3] AS [tb_BarCode3]</DefiningQuery>
</EntitySet>
<EntitySet Name="tb_BarCode4" EntityType="Self.tb_BarCode4" store:Type="Tables" store:Schema="dbo">
@ -2868,7 +2906,9 @@
[tb_BarCode4].[Des4] AS [Des4],
[tb_BarCode4].[Des5] AS [Des5],
[tb_BarCode4].[Weight] AS [Weight],
[tb_BarCode4].[BatchNo] AS [BatchNo]
[tb_BarCode4].[BatchNo] AS [BatchNo],
[tb_BarCode4].[IsNew] AS [IsNew],
[tb_BarCode4].[AddMan] AS [AddMan]
FROM [dbo].[tb_BarCode4] AS [tb_BarCode4]</DefiningQuery>
</EntitySet>
<EntitySet Name="tb_BarCode5" EntityType="Self.tb_BarCode5" store:Type="Tables" store:Schema="dbo">
@ -2895,7 +2935,9 @@
[tb_BarCode5].[Des4] AS [Des4],
[tb_BarCode5].[Des5] AS [Des5],
[tb_BarCode5].[Weight] AS [Weight],
[tb_BarCode5].[BatchNo] AS [BatchNo]
[tb_BarCode5].[BatchNo] AS [BatchNo],
[tb_BarCode5].[IsNew] AS [IsNew],
[tb_BarCode5].[AddMan] AS [AddMan]
FROM [dbo].[tb_BarCode5] AS [tb_BarCode5]</DefiningQuery>
</EntitySet>
<EntitySet Name="tb_BarCodeUnique" EntityType="Self.tb_BarCodeUnique" store:Type="Tables" store:Schema="dbo">
@ -3532,6 +3574,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_ZP_MK_Plan" EntityType="BBMPTModel.tb_ZP_MK_Plan" />
</EntityContainer>
<EntityType Name="LogErr">
<Key>
@ -4071,6 +4114,7 @@
<Property Name="IsPrint" Type="Int32" />
<Property Name="PrintTime" Type="DateTime" Precision="3" />
<Property Name="Remark" Type="String" MaxLength="128" FixedLength="false" Unicode="false" />
<Property Name="IsHandPrint" Type="Int32" />
</EntityType>
<EntityType Name="tb_Injection_DownRecord">
<Key>
@ -4149,6 +4193,7 @@
<Property Name="MarketCount" Type="Int32" />
<Property Name="BadCount" Type="Int32" />
<Property Name="Qty" Type="Int32" />
<Property Name="ActualTime" Type="DateTime" Precision="3" />
</EntityType>
<EntityType Name="tb_InjectionPlan_20200901">
<Key>
@ -4431,6 +4476,7 @@
<Property Name="OperatorPsw" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="Des" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
<Property Name="UserID" Type="String" MaxLength="36" FixedLength="true" Unicode="false" />
<Property Name="Limit" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="tb_Paint_Bucket">
<Key>
@ -5207,6 +5253,8 @@
<Property Name="Des5" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
<Property Name="Weight" Type="Decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="IsNew" Type="Int32" />
<Property Name="AddMan" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="tb_BarCode2">
<Key>
@ -5235,6 +5283,8 @@
<Property Name="Des5" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
<Property Name="Weight" Type="Decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="IsNew" Type="Int32" />
<Property Name="AddMan" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="tb_BarCode3">
<Key>
@ -5263,6 +5313,8 @@
<Property Name="Des5" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
<Property Name="Weight" Type="Decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="IsNew" Type="Int32" />
<Property Name="AddMan" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="tb_BarCode4">
<Key>
@ -5291,6 +5343,8 @@
<Property Name="Des5" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
<Property Name="Weight" Type="Decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="IsNew" Type="Int32" />
<Property Name="AddMan" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="tb_BarCode5">
<Key>
@ -5319,6 +5373,8 @@
<Property Name="Des5" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
<Property Name="Weight" Type="Decimal" Precision="18" Scale="2" />
<Property Name="BatchNo" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="IsNew" Type="Int32" />
<Property Name="AddMan" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="tb_BarCodeUnique">
<Key>
@ -6006,6 +6062,24 @@
<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_ZP_MK_Plan">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="String" Nullable="false" MaxLength="36" FixedLength="true" Unicode="false" />
<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="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="State" Type="Int32" />
<Property Name="BadCount" Type="Int32" />
<Property Name="CreateTime" Type="DateTime" Precision="3" />
</EntityType>
</Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
@ -6579,6 +6653,7 @@
<EntitySetMapping Name="tb_Injection_BoxRecord">
<EntityTypeMapping TypeName="BBMPTModel.tb_Injection_BoxRecord">
<MappingFragment StoreEntitySet="tb_Injection_BoxRecord">
<ScalarProperty Name="IsHandPrint" ColumnName="IsHandPrint" />
<ScalarProperty Name="Remark" ColumnName="Remark" />
<ScalarProperty Name="PrintTime" ColumnName="PrintTime" />
<ScalarProperty Name="IsPrint" ColumnName="IsPrint" />
@ -6655,6 +6730,7 @@
<EntitySetMapping Name="tb_InjectionPlan">
<EntityTypeMapping TypeName="BBMPTModel.tb_InjectionPlan">
<MappingFragment StoreEntitySet="tb_InjectionPlan">
<ScalarProperty Name="ActualTime" ColumnName="ActualTime" />
<ScalarProperty Name="Qty" ColumnName="Qty" />
<ScalarProperty Name="BadCount" ColumnName="BadCount" />
<ScalarProperty Name="MarketCount" ColumnName="MarketCount" />
@ -6971,6 +7047,7 @@
<EntitySetMapping Name="tb_Operator">
<EntityTypeMapping TypeName="BBMPTModel.tb_Operator">
<MappingFragment StoreEntitySet="tb_Operator">
<ScalarProperty Name="Limit" ColumnName="Limit" />
<ScalarProperty Name="UserID" ColumnName="UserID" />
<ScalarProperty Name="Des" ColumnName="Des" />
<ScalarProperty Name="OperatorPsw" ColumnName="OperatorPsw" />
@ -7779,6 +7856,8 @@
<EntitySetMapping Name="tb_BarCode1">
<EntityTypeMapping TypeName="BBMPTModel.tb_BarCode1">
<MappingFragment StoreEntitySet="tb_BarCode1">
<ScalarProperty Name="AddMan" ColumnName="AddMan" />
<ScalarProperty Name="IsNew" ColumnName="IsNew" />
<ScalarProperty Name="BatchNo" ColumnName="BatchNo" />
<ScalarProperty Name="Weight" ColumnName="Weight" />
<ScalarProperty Name="Des5" ColumnName="Des5" />
@ -7808,6 +7887,8 @@
<EntitySetMapping Name="tb_BarCode2">
<EntityTypeMapping TypeName="BBMPTModel.tb_BarCode2">
<MappingFragment StoreEntitySet="tb_BarCode2">
<ScalarProperty Name="AddMan" ColumnName="AddMan" />
<ScalarProperty Name="IsNew" ColumnName="IsNew" />
<ScalarProperty Name="BatchNo" ColumnName="BatchNo" />
<ScalarProperty Name="Weight" ColumnName="Weight" />
<ScalarProperty Name="Des5" ColumnName="Des5" />
@ -7837,6 +7918,8 @@
<EntitySetMapping Name="tb_BarCode3">
<EntityTypeMapping TypeName="BBMPTModel.tb_BarCode3">
<MappingFragment StoreEntitySet="tb_BarCode3">
<ScalarProperty Name="AddMan" ColumnName="AddMan" />
<ScalarProperty Name="IsNew" ColumnName="IsNew" />
<ScalarProperty Name="BatchNo" ColumnName="BatchNo" />
<ScalarProperty Name="Weight" ColumnName="Weight" />
<ScalarProperty Name="Des5" ColumnName="Des5" />
@ -7866,6 +7949,8 @@
<EntitySetMapping Name="tb_BarCode4">
<EntityTypeMapping TypeName="BBMPTModel.tb_BarCode4">
<MappingFragment StoreEntitySet="tb_BarCode4">
<ScalarProperty Name="AddMan" ColumnName="AddMan" />
<ScalarProperty Name="IsNew" ColumnName="IsNew" />
<ScalarProperty Name="BatchNo" ColumnName="BatchNo" />
<ScalarProperty Name="Weight" ColumnName="Weight" />
<ScalarProperty Name="Des5" ColumnName="Des5" />
@ -7895,6 +7980,8 @@
<EntitySetMapping Name="tb_BarCode5">
<EntityTypeMapping TypeName="BBMPTModel.tb_BarCode5">
<MappingFragment StoreEntitySet="tb_BarCode5">
<ScalarProperty Name="AddMan" ColumnName="AddMan" />
<ScalarProperty Name="IsNew" ColumnName="IsNew" />
<ScalarProperty Name="BatchNo" ColumnName="BatchNo" />
<ScalarProperty Name="Weight" ColumnName="Weight" />
<ScalarProperty Name="Des5" ColumnName="Des5" />
@ -8632,6 +8719,25 @@
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="tb_ZP_MK_Plan">
<EntityTypeMapping TypeName="BBMPTModel.tb_ZP_MK_Plan">
<MappingFragment StoreEntitySet="tb_ZP_MK_Plan">
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="BadCount" ColumnName="BadCount" />
<ScalarProperty Name="State" ColumnName="State" />
<ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
<ScalarProperty Name="OrderCount" ColumnName="OrderCount" />
<ScalarProperty Name="PartNo" ColumnName="PartNo" />
<ScalarProperty Name="Line" ColumnName="Line" />
<ScalarProperty Name="Station" ColumnName="Station" />
<ScalarProperty Name="Item" ColumnName="Item" />
<ScalarProperty Name="OrderDate" ColumnName="OrderDate" />
<ScalarProperty Name="OrderName" ColumnName="OrderName" />
<ScalarProperty Name="OrderNo" ColumnName="OrderNo" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
</EntityContainerMapping>
</Mapping>
</edmx:Mappings>

1
MESClassLibrary/EFModel/BBMPT.edmx.diagram

@ -173,6 +173,7 @@
<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" />

2
MESClassLibrary/EFModel/tb_BarCode1.cs

@ -37,5 +37,7 @@ namespace MESClassLibrary.EFModel
public string Des5 { get; set; }
public Nullable<decimal> Weight { get; set; }
public string BatchNo { get; set; }
public Nullable<int> IsNew { get; set; }
public string AddMan { get; set; }
}
}

2
MESClassLibrary/EFModel/tb_BarCode2.cs

@ -37,5 +37,7 @@ namespace MESClassLibrary.EFModel
public string Des5 { get; set; }
public Nullable<decimal> Weight { get; set; }
public string BatchNo { get; set; }
public Nullable<int> IsNew { get; set; }
public string AddMan { get; set; }
}
}

2
MESClassLibrary/EFModel/tb_BarCode3.cs

@ -37,5 +37,7 @@ namespace MESClassLibrary.EFModel
public string Des5 { get; set; }
public Nullable<decimal> Weight { get; set; }
public string BatchNo { get; set; }
public Nullable<int> IsNew { get; set; }
public string AddMan { get; set; }
}
}

2
MESClassLibrary/EFModel/tb_BarCode4.cs

@ -37,5 +37,7 @@ namespace MESClassLibrary.EFModel
public string Des5 { get; set; }
public Nullable<decimal> Weight { get; set; }
public string BatchNo { get; set; }
public Nullable<int> IsNew { get; set; }
public string AddMan { get; set; }
}
}

2
MESClassLibrary/EFModel/tb_BarCode5.cs

@ -37,5 +37,7 @@ namespace MESClassLibrary.EFModel
public string Des5 { get; set; }
public Nullable<decimal> Weight { get; set; }
public string BatchNo { get; set; }
public Nullable<int> IsNew { get; set; }
public string AddMan { get; set; }
}
}

1
MESClassLibrary/EFModel/tb_InjectionPlan.cs

@ -34,5 +34,6 @@ namespace MESClassLibrary.EFModel
public Nullable<int> MarketCount { get; set; }
public Nullable<int> BadCount { get; set; }
public Nullable<int> Qty { get; set; }
public Nullable<System.DateTime> ActualTime { get; set; }
}
}

1
MESClassLibrary/EFModel/tb_Injection_BoxRecord.cs

@ -27,5 +27,6 @@ namespace MESClassLibrary.EFModel
public Nullable<int> IsPrint { get; set; }
public Nullable<System.DateTime> PrintTime { get; set; }
public string Remark { get; set; }
public Nullable<int> IsHandPrint { get; set; }
}
}

1
MESClassLibrary/EFModel/tb_Operator.cs

@ -21,5 +21,6 @@ namespace MESClassLibrary.EFModel
public string OperatorPsw { get; set; }
public string Des { get; set; }
public string UserID { get; set; }
public string Limit { get; set; }
}
}

31
MESClassLibrary/EFModel/tb_ZP_MK_Plan.cs

@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace MESClassLibrary.EFModel
{
using System;
using System.Collections.Generic;
public partial class tb_ZP_MK_Plan
{
public string ID { get; set; }
public string OrderNo { get; set; }
public string OrderName { get; set; }
public Nullable<System.DateTime> OrderDate { get; set; }
public Nullable<int> Item { get; set; }
public string Station { get; set; }
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> State { get; set; }
public Nullable<int> BadCount { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
}
}

20
MESClassLibrary/Model/ZP_MK_PlanModel.cs

@ -0,0 +1,20 @@
using MESClassLibrary.EFModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MESClassLibrary.Model
{
public class ZP_MK_PlanModel : tb_ZP_MK_Plan
{
/// <summary>
/// 工位名称
/// </summary>
public string StationNo { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string ProductName { get; set; }
}
}
Loading…
Cancel
Save