Browse Source

还原

master
qian 2 months ago
parent
commit
8766897be5
  1. 396
      北京北汽/Controller/SCP_PLAN_CONTROLLER.cs
  2. 153
      北京北汽/Controller/SCP_PO_CONTROLLER.cs
  3. 2
      北京北汽/Models/CK.SCP.Models.csproj
  4. 88
      北京北汽/Models/ScpEntity/TB_ASN.cs
  5. 105
      北京北汽/Models/ScpEntity/V_TB_PO_PLAN.cs
  6. 31
      北京北汽/Models/ScpEntity/V_TB_PO_PLAN_DETAIL.cs
  7. 8
      北京北汽/SCP/SCP.csproj

396
北京北汽/Controller/SCP_PLAN_CONTROLLER.cs

@ -1581,7 +1581,7 @@ namespace CK.SCP.Controller
if (list.Count > 0) if (list.Count > 0)
{ {
var _entity = list.FirstOrDefault(); var _entity = list.FirstOrDefault();
var _priceList= db.V_TB_PRICE.Where(price => price.StartTime <= _entity.EndTime && _entity.EndTime <= price.EndTime &&price.VendId== _entity.VendId); var _priceList = db.V_TB_PRICE.Where(price => price.StartTime <= _entity.EndTime && _entity.EndTime <= price.EndTime && price.VendId == _entity.VendId);
if (_priceList != null && _priceList.Count() > 0) if (_priceList != null && _priceList.Count() > 0)
{ {
@ -1668,7 +1668,7 @@ namespace CK.SCP.Controller
} }
else else
{ {
_ret.MessageList.Add(string.Format("供应商编号{0}零件{1}计划到货时间{2}内无价格表!",_ask.VendId,_t_ASK_Detail.PartCode,_ask.EndTime)); _ret.MessageList.Add(string.Format("供应商编号{0}零件{1}计划到货时间{2}内无价格表!", _ask.VendId, _t_ASK_Detail.PartCode, _ask.EndTime));
} }
_t_ASK_Detail.GUID = Guid.NewGuid(); _t_ASK_Detail.GUID = Guid.NewGuid();
@ -1679,7 +1679,7 @@ namespace CK.SCP.Controller
} }
else else
{ {
_ret.MessageList.Add(string.Format("供应商编号{0}计划到货时间{1}范围内无价格表!",_entity.VendId,_entity.EndTime)); _ret.MessageList.Add(string.Format("供应商编号{0}计划到货时间{1}范围内无价格表!", _entity.VendId, _entity.EndTime));
} }
} }
@ -1919,396 +1919,6 @@ namespace CK.SCP.Controller
// return _ret; // return _ret;
//} //}
public static ResultObject<bool> PLAN_TO_ASK1(List<V_TB_PO_PLAN> p_order_list, User p_user)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
List<string> lineError = new List<string>();
List<string> ErrorList = new List<string>();
var _lst = p_order_list.Where(p => p.PlanQty != 0).ToList();
if (lineError.Count > 0)
{
_ret.State = ReturnStatus.Failed;
_ret.MessageList.AddRange(ErrorList);
_ret.Result = false;
}
else
{
var VenderList = _lst.Select(p => p.VendId).Distinct();
var PartCodeList = _lst.Select(p => p.PartCode).Distinct();
var OrderList = _lst.GroupBy(p => p.PoBillNum).ToList();
OrderList.ForEach((p) =>
{
var list = p.ToList();
if (list.Count > 0)
{
var _entity = list.FirstOrDefault();
TB_ASK _ask = new TB_ASK();
_ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode();
_ask.VendId = _entity.VendId;
_ask.State = (int)AskState.New;
_ask.PoBillNum = _entity.PoBillNum;
_ask.ModType = (int)BillModType.Contract;
_ask.Site = _entity.Site;
_ask.Remark = _entity.Version;
_ask.State = (int)AskState.New;
DateTime date = DateTime.Now;
string str = date.Year.ToString();
string str1 = date.Month.ToString();
string datetime = str + "-" + str1;
_ask.UpdateTime = DateTime.Parse(datetime);
_ask.Buyer = p_user.ChineseName;
_ask.BuyerPhone = p_user.CellPhone;
_ask.ErpBillNum = _entity.PoBillNum;
_ask.BeginTime = DateTime.Parse( _entity.BeginTime.ToString());
_ask.EndTime = _entity.EndTime;
_ask.CreateTime = DateTime.Now.Date;
_ask.CreateUser = p_user.Name;
_ask.VendId = _entity.VendId;
_ask.GUID = Guid.NewGuid();
_ask.ReceivedPort = string.Empty;
_ask.IsDeleted = false;
_ask.SubSite = p_user.UserdSite;
db.TB_ASK.Add(_ask);
#region 供应商新任务代办接口
TB_PENING_ITEMS _item = new TB_PENING_ITEMS();
_item.ROLE_NAME = "供应商";
_item.ITEM_NO = _ask.AskBillNum;
_item.ITEM_CONTENT = "要货看盘有信息";
_item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK;
_item.VEND_ID = _ask.VendId;
_item.ITEM_STATE = (int)PENDING_STATE.WAITING;
_item.SENDER = p_user.ChineseName;
_item.SENDING_TIME = DateTime.Now;
db.TB_PENING_ITEMS.Add(_item);
#endregion
// int _number = 1;
List<TB_ASK_DETAIL> _ls = new List<TB_ASK_DETAIL>();
list.ForEach((itm) =>
{
var _number = _ls.Count(p1 => p1.PoBillNum == _ask.PoBillNum
&& p1.PoLine == itm.PoLine && p1.PartCode == itm.PartCode);
if (_number > 0)
{
_ret.MessageList.Add(string.Format("已经存在订单为{0}行号为{1}零件编码为{2}", itm.PoBillNum, itm.PoLine.ToString(), itm.PartCode));
}
TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL();
//_t_ASK_Detail.PoLine = _number;
_t_ASK_Detail.PoLine = itm.PoLine;
_t_ASK_Detail.Currency = "CNY";
_t_ASK_Detail.AskBillNum = _ask.AskBillNum;
_t_ASK_Detail.PoBillNum = _ask.PoBillNum;
_t_ASK_Detail.PoUnit = itm.PoUnit;
_t_ASK_Detail.CreateTime = DateTime.Now;
_t_ASK_Detail.CreateUser = _ask.CreateUser;
_t_ASK_Detail.PartCode = itm.PartCode;
_t_ASK_Detail.BeginTime = _ask.BeginTime;
_t_ASK_Detail.EndTime = itm.EndTime;
_t_ASK_Detail.TempQty = itm.PlanQty;
_t_ASK_Detail.AskQty = itm.PlanQty;
_t_ASK_Detail.IsDeleted = false;
_t_ASK_Detail.LocUnit = itm.PoUnit;
_t_ASK_Detail.UnConv = 1;
_t_ASK_Detail.Remark = itm.Version;
_t_ASK_Detail.State = _ask.State;
_t_ASK_Detail.SubSite = p_user.UserdSite;
// _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.) ? 0 : decimal.Parse(itm.价格);
_t_ASK_Detail.GUID = Guid.NewGuid();
_t_ASK_Detail.Remark = _ask.Site;
db.TB_ASK_DETAIL.Add(_t_ASK_Detail);
_ls.Add(_t_ASK_Detail);
// _number++;
});
}
else
{
_ret.MessageList.Add("ERP订单编号已存在,请重新导入!");
}
if (_ret.MessageList.Count == 0)
{
int state = db.SaveChanges();
if (state != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
}
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
}
}
);
}
}
}
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
{
var sb = new StringBuilder();
foreach (var error in dbEx.EntityValidationErrors.ToList())
{
error.ValidationErrors.ToList().ForEach(i =>
{
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage);
});
}
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(dbEx);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", sb.ToString());
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
}
catch (OptimisticConcurrencyException ex)//并发冲突异常
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString());
throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
}
catch (ScpException ex)
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString());
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
{
var inner = (UpdateException)ex.InnerException;
throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
}
else
{
if (ex.InnerException != null) throw ex.InnerException;
}
}
catch (Exception e)
{
_ret.State = ReturnStatus.Failed;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
public static DataTable Get_TB_PLAN_REPORT(V_TB_PO_PLAN p_plan)
{
DataTable dt = new DataTable();
DataTable dt1 = new DataTable();
DataTable dt2 = new DataTable();
DataTable dt3 = new DataTable();
string _sqlString = "SELECT * FROM ( SELECT partcode,endtime,planqty,partdesc,pounit,domain,pobillnum,poline FROM V_TB_PO_PLAN where {0}\n " +
") A\n" +
" pivot ( sum(planQty) for a.endtime in (\n" +
" {1}\n" +
")\n" +
") as ourpivot ";
string _sql = "SELECT DISTINCT(ENDTIME) FROM V_TB_PO_PLAN where {0} ORDER BY ENDTIME";
string _askBillSql = "SELECT * FROM V_TB_ASK_DETAIL where VENDID = '{0}' AND EndTime IN ({1}) AND AskBillNum like 'E%' ";
string _asn_recive = "SELECT A.PartCode, A.PoBillNum, A.PoLine, SUM(A.Qty) AS AsnQty, SUM(ISNULL(B.Qty, 0)) AS ReciveQty,\n" +
" SUM(ISNULL(C.AskQty, 0)) AS AskQty\n" +
"FROM V_TB_ASN_DETAIL AS A LEFT OUTER JOIN\n" +
" V_TB_RECEIVE_DETAIL AS B ON A.AsnBillNum = B.AsnBillNum AND A.PartCode = B.PartCode AND\n" +
" A.PoBillNum = B.PoBillNum AND A.PoLine = B.PoLine INNER JOIN\n" +
" TB_ASK_DETAIL AS C ON A.AskBillNum = C.AskBillNum AND A.PartCode = C.PartCode AND\n" +
" A.PoBillNum = C.PoBillNum AND A.PoLine = C.PoLine\n" +
"WHERE (A.AskBillNum LIKE 'E%') AND (A.State > 0) and {0}\n" +
"GROUP BY A.PartCode, A.PoBillNum, A.PoLine";
var dbSetting = GlobalConfig.ScpDatabase;
try
{
var strConn = EntitiesFactory.GetEfConnectionString(dbSetting);
SqlConnection conn = new System.Data.SqlClient.SqlConnection();
conn.ConnectionString = strConn;
if (conn.State != ConnectionState.Open)
{
conn.Open();
}
#region 结束时间范围
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
string where1 = " 1=1 ";
if (!string.IsNullOrEmpty(p_plan.PartCode))
{
where1 += string.Format(" and partcode='{0}' ", p_plan.PartCode);
}
if (!string.IsNullOrEmpty(p_plan.VendId))
{
where1 += string.Format(" and VendId='{0}' ", p_plan.VendId);
}
if (!string.IsNullOrEmpty(p_plan.PoBillNum))
{
where1 += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum);
}
if (p_plan.EndTime_Begin != null)
{
where1 += string.Format(" and EndTime>='{0}'", p_plan.EndTime_Begin.Value.ToString("yyyy-MM-dd"));
}
else
{
where1 += string.Format(" and EndTime>='{0}'", DateTime.Now.ToString("yyyy-MM-dd"));
}
if (p_plan.EndTime_End != null)
{
where1 += string.Format(" and EndTime<='{0}'", p_plan.EndTime_End.Value.ToString("yyyy-MM-dd"));
}
else
{
where1 += string.Format(" and EndTime<='{0}'", DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd"));
}
cmd.CommandText = string.Format(_sql, where1);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(dt);
#endregion
List<string> _ls = new List<string>();
List<string> _ls1 = new List<string>();
foreach (DataRow row in dt.Rows)
{
_ls.Add(string.Format("[{0}]", row["EndTime"].ToString()));
_ls1.Add(string.Format("'{0}'", row["EndTime"].ToString()));
}
if (_ls.Count > 0)
{
#region 计划行转列
SqlCommand cmd1 = new SqlCommand();
cmd1.Connection = conn;
string where = "1=1 ";
if (!string.IsNullOrEmpty(p_plan.PartCode))
{
where += string.Format(" and partcode='{0}' ", p_plan.PartCode);
}
where += string.Format(" and VendId='{0}' ", p_plan.VendId);
if (!string.IsNullOrEmpty(p_plan.PoBillNum))
{
where += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum);
}
cmd1.CommandText = string.Format(_sqlString, where, string.Join(",", _ls.ToArray()));
var adapter1 = new SqlDataAdapter(cmd1);
adapter1.Fill(dt1);
#endregion
#region 此范围内的看板号
SqlCommand cmd2 = new SqlCommand();
cmd2.Connection = conn;
cmd2.CommandText = string.Format(_askBillSql, p_plan.VendId, string.Join(",", _ls1.ToArray()));
SqlDataAdapter adapter2 = new SqlDataAdapter(cmd2);
adapter2.Fill(dt2);
#endregion
List<string> _askList = new List<string>();
foreach (DataRow row in dt2.Rows)
{
_askList.Add(string.Format("'{0}'", row["AskBillNum"].ToString()));
}
if (_askList.Count > 0)
{
SqlCommand cmd3 = new SqlCommand();
cmd3.Connection = conn;
cmd3.CommandText = string.Format(_asn_recive, string.Format(" A.askBillNum in ({0}) ", string.Join(",", _askList.ToArray())));
SqlDataAdapter adapter3 = new SqlDataAdapter(cmd3);
adapter3.Fill(dt3);
}
var column0 = dt1.Columns.Add("要货数量");
var column1 = dt1.Columns.Add("收货数量");
var column2 = dt1.Columns.Add("发货数量");
var column3 = dt1.Columns.Add("未发数量");
var column4 = dt1.Columns.Add("未收数量");
foreach (DataRow dr in dt1.Rows)
{
foreach (DataRow row in dt3.Rows)
{
if (
dr["PartCode"].ToString() == row["PartCode"].ToString()
&& dr["PoBillNum"].ToString() == row["PoBillNum"].ToString()
&& dr["PoLine"].ToString() == row["PoLine"].ToString())
{
dr["要货数量"] = row["ReciveQty"].ToString();
dr["收货数量"] = row["ReciveQty"].ToString();
dr["发货数量"] = row["AsnQty"].ToString();
dr["未收数量"] = decimal.Parse(row["AsnQty"].ToString()) - decimal.Parse(row["ReciveQty"].ToString());
dr["未发数量"] = decimal.Parse(row["AskQty"].ToString()) - decimal.Parse(row["AsnQty"].ToString());
}
}
}
foreach (DataColumn column in dt1.Columns)
{
try
{
var _dt1 = DateTime.Parse(column.ColumnName);
var _curDate = _dt1.ToString("yyyy-MM-dd");
column.ColumnName = _curDate + "(预测)";//要货预测头
foreach (DataRow row in dt2.Rows)
{
var _cur = DateTime.Parse(row["EndTime"].ToString()).ToString("yyyy-MM-dd");//看板时间
StringBuilder _buf = new StringBuilder();
if (_curDate == _cur)
{
var _ask = row["AskBillNum"].ToString();
column.ColumnName = _cur + "(" + _ask + ")";
switch (int.Parse(row["state"].ToString()))
{
case (int)AskState.New:
column.ColumnName = _cur + "(" + _ask + ")" + "(计划)";
break;
case (int)AskState.Ship:
column.ColumnName = _cur + "(" + _ask + ")" + "(已发货)";
break;
case (int)AskState.Confirm:
column.ColumnName = _cur + "(" + _ask + ")" + "(已确认)";
break;
case (int)AskState.Release:
column.ColumnName = _cur + "(" + _ask + ")" + "(已发布)";
break;
case (int)AskState.Receive:
column.ColumnName = _cur + "(" + _ask + ")" + "(已收货)";
break;
}
}
}
}
catch
{
continue;
}
}
dt1.Columns["PartCode"].ColumnName = "零件编码";
dt1.Columns["PartDesc"].ColumnName = "零件描述";
dt1.Columns["PoUnit"].ColumnName = "单位";
dt1.Columns["PoBillNum"].ColumnName = "订单编号";
dt1.Columns["PoLine"].ColumnName = "行号";
dt1.Columns["Domain"].ColumnName = "域";
}
conn.Close();
}
catch (SqlException ex)
{
throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}");
}
return dt1;
}
} }
} }

153
北京北汽/Controller/SCP_PO_CONTROLLER.cs

@ -508,7 +508,7 @@ namespace CK.SCP.Controller
foreach (var po1 in p_list1) foreach (var po1 in p_list1)
{ {
var PoDetail = db.TB_ASK_DETAIL.SingleOrDefault(p => p.PoBillNum == po && p.PartCode == po1); var PoDetail = db.TB_ASK_DETAIL.SingleOrDefault(p => p.PoBillNum == po && p.PartCode == po1);
PoDetail.AskQty=0; PoDetail.AskQty = 0;
db.TB_ASK_DETAIL.AddOrUpdate(PoDetail); db.TB_ASK_DETAIL.AddOrUpdate(PoDetail);
} }
@ -1096,14 +1096,14 @@ namespace CK.SCP.Controller
DateTime st1 = DateTime.Parse(st7.ToShortDateString()); DateTime st1 = DateTime.Parse(st7.ToShortDateString());
DateTime st5 = DateTime.Parse(p_excel.); DateTime st5 = DateTime.Parse(p_excel.);
DateTime st3=DateTime.Parse( st5.ToShortDateString()); DateTime st3 = DateTime.Parse(st5.ToShortDateString());
Decimal st4 = Decimal.Parse(p_excel.); Decimal st4 = Decimal.Parse(p_excel.);
DateTime dd = st2.AddDays(1); DateTime dd = st2.AddDays(1);
DateTime dd1 = st1.AddYears(10); DateTime dd1 = st1.AddYears(10);
int b = int.Parse(p_excel.); int b = int.Parse(p_excel.);
var Th = db.TB_PRICE.SingleOrDefault(p => p.UID.ToString() == p_excel. && p.VendId == p_excel. && p.PartCode == p_excel. var Th = db.TB_PRICE.SingleOrDefault(p => p.UID.ToString() == p_excel. && p.VendId == p_excel. && p.PartCode == p_excel.
&& p.Amt == st4 && p.SubSite == p_excel. &&p.Curr==p_excel.&&p.Unit==p_excel. && p.Amt == st4 && p.SubSite == p_excel. && p.Curr == p_excel. && p.Unit == p_excel.
); );
if (Th == null) if (Th == null)
{ {
@ -1111,12 +1111,12 @@ namespace CK.SCP.Controller
} }
else else
{ {
if ((DateTime.Parse(Th.StartTime.ToString())).ToShortDateString()!=st3.ToShortDateString()|| (DateTime.Parse(Th.EndTime.ToString())).ToShortDateString() != st2.ToShortDateString()) if ((DateTime.Parse(Th.StartTime.ToString())).ToShortDateString() != st3.ToShortDateString() || (DateTime.Parse(Th.EndTime.ToString())).ToShortDateString() != st2.ToShortDateString())
{ {
ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel., p_excel.)); ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel., p_excel.));
} }
DateTime STA =DateTime.Parse(Th.StartTime.ToString()); DateTime STA = DateTime.Parse(Th.StartTime.ToString());
if(DateTime.Parse(STA.ToShortDateString())!= st3) if (DateTime.Parse(STA.ToShortDateString()) != st3)
{ {
ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel., p_excel.)); ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel., p_excel.));
} }
@ -1128,7 +1128,7 @@ namespace CK.SCP.Controller
{ {
ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】最新开始时间填写错误!", p_excel., p_excel.)); ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】最新开始时间填写错误!", p_excel., p_excel.));
} }
if(st1>st2&& st1 < dd) if (st1 > st2 && st1 < dd)
{ {
ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】最新开始时间填写错误!", p_excel., p_excel.)); ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】最新开始时间填写错误!", p_excel., p_excel.));
} }
@ -1144,7 +1144,7 @@ namespace CK.SCP.Controller
} }
} }
var _second1 = db.TB_PRICE.Where(p => p.PartCode == p_excel. && p.VendId == p_excel.&&p.SubSite== p_excel.&&p.State!=-1).Select(r => r.UID).Max(); var _second1 = db.TB_PRICE.Where(p => p.PartCode == p_excel. && p.VendId == p_excel. && p.SubSite == p_excel. && p.State != -1).Select(r => r.UID).Max();
int a = 0; int a = 0;
int.TryParse(p_excel., out a); int.TryParse(p_excel., out a);
if (a < _second1) if (a < _second1)
@ -1179,12 +1179,12 @@ namespace CK.SCP.Controller
} }
else else
{ {
if (p_excel. != "CNY"&& p_excel. != "EUR" && p_excel. != "USD") if (p_excel. != "CNY" && p_excel. != "EUR" && p_excel. != "USD")
{ {
ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】币种填写错误,只能是CNY或者EUR或者USD!", p_excel., p_excel.)); ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】币种填写错误,只能是CNY或者EUR或者USD!", p_excel., p_excel.));
} }
var Site = db.TB_FACTORY.Where(p=>p.ErpSite== p_excel.).FirstOrDefault(); var Site = db.TB_FACTORY.Where(p => p.ErpSite == p_excel.).FirstOrDefault();
var _first = db.TA_PART.Where(p => p.PartCode == p_excel..Trim() &&p.Site== p_excel.).FirstOrDefault(); var _first = db.TA_PART.Where(p => p.PartCode == p_excel..Trim() && p.Site == p_excel.).FirstOrDefault();
if (_first == null) if (_first == null)
{ {
ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel., p_excel.)); ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel., p_excel.));
@ -1200,7 +1200,7 @@ namespace CK.SCP.Controller
p_excel. = !string.IsNullOrEmpty(p_excel.) ? p_excel..Trim() : string.Empty; p_excel. = !string.IsNullOrEmpty(p_excel.) ? p_excel..Trim() : string.Empty;
var _count = db.TA_VENDER.Where(p => p.VendId == p_excel.&&p.Site== p_excel.).Count(); var _count = db.TA_VENDER.Where(p => p.VendId == p_excel. && p.Site == p_excel.).Count();
if (_count == 0) if (_count == 0)
{ {
ErrorList.Add(string.Format("未找到供应商编号为【{0}】无法导入!", p_excel.)); ErrorList.Add(string.Format("未找到供应商编号为【{0}】无法导入!", p_excel.));
@ -1313,7 +1313,7 @@ namespace CK.SCP.Controller
// ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号,p_excel.零件号 )); // ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号,p_excel.零件号 ));
//} //}
var _checkpart = db.TA_PART.FirstOrDefault(p => p.PartCode == p_excel..Trim()&&p.Site== site); var _checkpart = db.TA_PART.FirstOrDefault(p => p.PartCode == p_excel..Trim() && p.Site == site);
if (_checkpart != null) if (_checkpart != null)
{ {
if (_checkpart.State.ToUpper() != "SP") if (_checkpart.State.ToUpper() != "SP")
@ -1325,7 +1325,7 @@ namespace CK.SCP.Controller
ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表零件停用,无法导入!", p_excel., p_excel.)); ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表零件停用,无法导入!", p_excel., p_excel.));
} }
} }
var _checkpart1= db.TA_PART.Count(p => p.PartCode == p_excel..Trim() && p.Site == site); var _checkpart1 = db.TA_PART.Count(p => p.PartCode == p_excel..Trim() && p.Site == site);
if (_checkpart1 == 0) if (_checkpart1 == 0)
{ {
ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel., p_excel.)); ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel., p_excel.));
@ -1348,7 +1348,7 @@ namespace CK.SCP.Controller
} }
else else
{ {
if (!string.IsNullOrEmpty(p_excel.)&&p_excel..Length > 50) if (!string.IsNullOrEmpty(p_excel.) && p_excel..Length > 50)
{ {
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的备注长度必须小于50", p_excel., p_excel., p_excel.)); ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的备注长度必须小于50", p_excel., p_excel., p_excel.));
} }
@ -1437,8 +1437,8 @@ namespace CK.SCP.Controller
// 判断北汽多次导入 是否存在零件号重复现象 // 判断北汽多次导入 是否存在零件号重复现象
else else
{ {
var _partlist = db.V_TB_PO_DETAIL.Where(p => p.VendId == p_excel..Trim()&&p.SubSite == subsite && p.PartCode == p_excel..Trim() && p.PoBillNum.Substring(0,1) =="S").ToList(); var _partlist = db.V_TB_PO_DETAIL.Where(p => p.VendId == p_excel..Trim() && p.SubSite == subsite && p.PartCode == p_excel..Trim() && p.PoBillNum.Substring(0, 1) == "S").ToList();
if (_partlist.Count > 0 ) if (_partlist.Count > 0)
{ {
var pobillnum = db.V_TB_PO_DETAIL.FirstOrDefault(p => p.VendId == p_excel..Trim() && p.SubSite == subsite && p.PartCode == p_excel..Trim() && p.PoBillNum.Substring(0, 1) == "S").PoBillNum; var pobillnum = db.V_TB_PO_DETAIL.FirstOrDefault(p => p.VendId == p_excel..Trim() && p.SubSite == subsite && p.PartCode == p_excel..Trim() && p.PoBillNum.Substring(0, 1) == "S").PoBillNum;
ErrorList.Add(string.Format("订单编号【{0}】零件号【{1}】在【{2}】中存在,请更换零件号!", p_excel., p_excel., pobillnum)); ErrorList.Add(string.Format("订单编号【{0}】零件号【{1}】在【{2}】中存在,请更换零件号!", p_excel., p_excel., pobillnum));
@ -1447,7 +1447,7 @@ namespace CK.SCP.Controller
if (lcount > 0) if (lcount > 0)
{ {
var pobillnum = db.V_TB_PO_DETAIL.FirstOrDefault(p => p.VendId == p_excel..Trim() && p.SubSite == subsite && p.PoLine == _polinr && p.PartCode == p_excel..Trim() && p.PoBillNum.Substring(0, 1) == "S").PoBillNum; var pobillnum = db.V_TB_PO_DETAIL.FirstOrDefault(p => p.VendId == p_excel..Trim() && p.SubSite == subsite && p.PoLine == _polinr && p.PartCode == p_excel..Trim() && p.PoBillNum.Substring(0, 1) == "S").PoBillNum;
ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】在【{2}】订单中已经存在,请更换行号!", p_excel., p_excel.,pobillnum)); ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】在【{2}】订单中已经存在,请更换行号!", p_excel., p_excel., pobillnum));
} }
} }
@ -1612,7 +1612,7 @@ namespace CK.SCP.Controller
} }
if (!string.IsNullOrEmpty(p_excel.)) if (!string.IsNullOrEmpty(p_excel.))
{ {
DateTime year =DateTime.Parse(p_excel.); DateTime year = DateTime.Parse(p_excel.);
if (year.Year > 2049) if (year.Year > 2049)
{ {
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.)); ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.));
@ -1689,7 +1689,7 @@ namespace CK.SCP.Controller
return ErrorList; return ErrorList;
} }
//重庆订单导入验证 //重庆订单导入验证
private static List<string> CheckExcelMode_Po_CQ(ScpEntities db, SCP_PO_EXPORT_IMPORT_MODEL p_excel, BillModType p_modtype, string site , string subsite ) private static List<string> CheckExcelMode_Po_CQ(ScpEntities db, SCP_PO_EXPORT_IMPORT_MODEL p_excel, BillModType p_modtype, string site, string subsite)
{ {
List<string> ErrorList = new List<string>(); List<string> ErrorList = new List<string>();
@ -1705,7 +1705,7 @@ namespace CK.SCP.Controller
// ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号,p_excel.零件号 )); // ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号,p_excel.零件号 ));
//} //}
var _checkpart = db.TA_PART.FirstOrDefault(p => p.PartCode == p_excel..Trim()&&p.Site== site); var _checkpart = db.TA_PART.FirstOrDefault(p => p.PartCode == p_excel..Trim() && p.Site == site);
if (_checkpart != null) if (_checkpart != null)
{ {
if (_checkpart.State.ToUpper() != "SP") if (_checkpart.State.ToUpper() != "SP")
@ -1761,7 +1761,7 @@ namespace CK.SCP.Controller
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.)); ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.));
} }
} }
var pode = db.TB_PO_DETAIL.Count(p=>p.PoBillNum== p_excel.&&p.PartCode==p_excel..Trim()); var pode = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel. && p.PartCode == p_excel..Trim());
if (pode > 0) if (pode > 0)
{ {
ErrorList.Add(string.Format("订单号【{1}】零件号【{0}】已存在!", p_excel., p_excel.)); ErrorList.Add(string.Format("订单号【{1}】零件号【{0}】已存在!", p_excel., p_excel.));
@ -2874,7 +2874,7 @@ namespace CK.SCP.Controller
_price.StartTime = DateTime.Parse(starttime); _price.StartTime = DateTime.Parse(starttime);
_price.EndTime = DateTime.Parse(endtime); _price.EndTime = DateTime.Parse(endtime);
_price.Curr = p.; _price.Curr = p.;
_price.Unit = _partList.Where(q=>q.PartCode == p..Trim()) != null? _partList.First(q => q.PartCode == p..Trim()).Unit : p.; _price.Unit = _partList.Where(q => q.PartCode == p..Trim()) != null ? _partList.First(q => q.PartCode == p..Trim()).Unit : p.;
_price.Amt = decimal.Parse(p.); _price.Amt = decimal.Parse(p.);
_price.Site = p..Trim(); _price.Site = p..Trim();
_price.SubSite = p..Trim(); _price.SubSite = p..Trim();
@ -3178,7 +3178,7 @@ namespace CK.SCP.Controller
lineError.Add(string.Format("供应商编号{0}零件编号{3}数据不存在", p., p., p., p..Trim())); lineError.Add(string.Format("供应商编号{0}零件编号{3}数据不存在", p., p., p., p..Trim()));
ErrorList = lineError; ErrorList = lineError;
} }
if (DateTime.Parse(p.)< DateTime.Parse(p.) && DateTime.Parse(p.) >DateTime.Parse(p.)) if (DateTime.Parse(p.) < DateTime.Parse(p.) && DateTime.Parse(p.) > DateTime.Parse(p.))
{ {
_vender.EndTime = Convert.ToDateTime(DateTime.Parse(starttime).AddDays(-1)); _vender.EndTime = Convert.ToDateTime(DateTime.Parse(starttime).AddDays(-1));
@ -3365,7 +3365,7 @@ namespace CK.SCP.Controller
_lst.ForEach _lst.ForEach
(p => (p =>
{ {
var _ls = CheckExcelMode_Po(db, p, p_modtype,site,subsite); var _ls = CheckExcelMode_Po(db, p, p_modtype, site, subsite);
if (_ls.Count > 0) if (_ls.Count > 0)
{ {
lineError.Add(number.ToString()); lineError.Add(number.ToString());
@ -3617,11 +3617,11 @@ namespace CK.SCP.Controller
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{ {
List<string> ErrorList = new List<string>(); List<string> ErrorList = new List<string>();
foreach(var po in p_list) foreach (var po in p_list)
{ {
foreach(var po1 in p_list1) foreach (var po1 in p_list1)
{ {
var _ls = db.TB_ASK_DETAIL.Count(p =>p.PoBillNum==po&&p.PartCode==po1 && p.IsDeleted == false); var _ls = db.TB_ASK_DETAIL.Count(p => p.PoBillNum == po && p.PartCode == po1 && p.IsDeleted == false);
if (_ls > 0) if (_ls > 0)
{ {
ErrorList.Add("订单号【{0}】零件号【{1}】已生成看板,不能关闭"); ErrorList.Add("订单号【{0}】零件号【{1}】已生成看板,不能关闭");
@ -4120,7 +4120,7 @@ namespace CK.SCP.Controller
_PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.) ? 7 : int.Parse(itm.); _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.) ? 7 : int.Parse(itm.);
_PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.) ? 2 : int.Parse(itm.); _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.) ? 2 : int.Parse(itm.);
_PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.) ? 1 : int.Parse(itm.); _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.) ? 1 : int.Parse(itm.);
_PO_Detail.Supplieritem =string.IsNullOrEmpty(itm.)? itm. :itm..ToUpper(); _PO_Detail.Supplieritem = string.IsNullOrEmpty(itm.) ? itm. : itm..ToUpper();
_PO_Detail.Dliverypatterncode = itm.; _PO_Detail.Dliverypatterncode = itm.;
_PO_Detail.Deliverytimecode = itm.; _PO_Detail.Deliverytimecode = itm.;
_PO_Detail.Transportdays = string.IsNullOrEmpty(itm.) ? 0 : int.Parse(itm.); _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.) ? 0 : int.Parse(itm.);
@ -4711,7 +4711,7 @@ namespace CK.SCP.Controller
} }
public static ResultObject<bool> Save_PO_TO_ASK_CQ(V_TB_PO p_order, List<V_TB_PO_DETAIL> p_order_list, string p_buyer, string p_buyerPhone, string p_creator,string remark,string Ssite) public static ResultObject<bool> Save_PO_TO_ASK_CQ(V_TB_PO p_order, List<V_TB_PO_DETAIL> p_order_list, string p_buyer, string p_buyerPhone, string p_creator, string remark, string Ssite)
{ {
ResultObject<bool> _ret = new ResultObject<bool>(); ResultObject<bool> _ret = new ResultObject<bool>();
try try
@ -4783,8 +4783,8 @@ namespace CK.SCP.Controller
_tDetail.Site = itm.Site; _tDetail.Site = itm.Site;
if (itm.Site == "BJBMPT") if (itm.Site == "BJBMPT")
{ {
var price = db.TB_PRICE.Where(p => p.PartCode == itm.PartCode&&p.State>-1&&p.VendId== p_order.VendId).Max(p => p.UID); var price = db.TB_PRICE.Where(p => p.PartCode == itm.PartCode && p.State > -1 && p.VendId == p_order.VendId).Max(p => p.UID);
var pri = db.TB_PRICE.FirstOrDefault(t=>t.UID==price); var pri = db.TB_PRICE.FirstOrDefault(t => t.UID == price);
_tDetail.Price = pri.Amt; _tDetail.Price = pri.Amt;
} }
else else
@ -5551,7 +5551,7 @@ namespace CK.SCP.Controller
} }
public static List<string> GetPriceError(List<V_TB_PO_DETAIL> details,V_TB_PO po) public static List<string> GetPriceError(List<V_TB_PO_DETAIL> details, V_TB_PO po)
{ {
List<string> errorlist = new List<string>(); List<string> errorlist = new List<string>();
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) using (ScpEntities db = EntitiesFactory.CreateScpInstance())
@ -5569,92 +5569,5 @@ namespace CK.SCP.Controller
return errorlist; return errorlist;
} }
public static void Get_V_TB_PO_PLAN_List_BJKFT(V_TB_PO_PLAN_BJBMPT p_entity, Action<ResultObject<IQueryable<V_TB_PO_PLAN_BJBMPT>>> p_action)
{
ResultObject<IQueryable<V_TB_PO_PLAN_BJBMPT>> _ret = new ResultObject<IQueryable<V_TB_PO_PLAN_BJBMPT>>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
IQueryable<V_TB_PO_PLAN_BJBMPT> q = db.V_TB_PO_PLAN_BJBMPT;
if (!string.IsNullOrEmpty(p_entity.Domain))
{
q = q.Where(p => p.Domain.Contains(p_entity.Domain));
}
if (!string.IsNullOrEmpty(p_entity.PartCode))
{
q = q.Where(p => p.PartCode.Contains(p_entity.PartCode));
}
if (!string.IsNullOrEmpty(p_entity.PoBillNum))
{
q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum));
}
if (!string.IsNullOrEmpty(p_entity.Site))
{
q = q.Where(p => p.Site.Contains(p_entity.Site));
}
if (!string.IsNullOrEmpty(p_entity.Buyer))
{
q = q.Where(p => p.Buyer.Contains(p_entity.Buyer));
}
if (!string.IsNullOrEmpty(p_entity.ProjectId))
{
q = q.Where(p => p.ProjectId.Contains(p_entity.ProjectId));
}
if (!string.IsNullOrEmpty(p_entity.AskBillNum))
{
q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum));
}
if (!string.IsNullOrEmpty(p_entity.Version))
{
q = q.Where(p => p.Version.Contains(p_entity.Version));
}
if (!string.IsNullOrEmpty(p_entity.PartDesc))
{
q = q.Where(p => p.PartDesc.Contains(p_entity.PartDesc));
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
q = q.Where(p => p.VendId.Contains(p_entity.VendId));
}
if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0)
{
q = q.Where(p => p_entity.UserInAddress.Contains(p.Domain));
}
if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0)
{
q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId));
}
if (p_entity.EndTime_Begin != null)
{
q = q.Where(p => p.EndTime >= p_entity.EndTime_Begin.Value);
}
if (p_entity.EndTime_End != null)
{
q = q.Where(p => p.EndTime <= p_entity.EndTime_End.Value);
}
if (p_entity.EndTime_Begin1 != null)
{
q = q.Where(p => p.CreateTime >= p_entity.EndTime_Begin1.Value);
}
if (p_entity.EndTime_End1 != null)
{
q = q.Where(p => p.CreateTime <= p_entity.EndTime_End1.Value);
}
_ret.State = ReturnStatus.Succeed;
_ret.Result = q;
p_action(_ret);
}
}
catch (Exception e)
{
_ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(e);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN), "Get_V_TB_PO_PLAN_List", e.Message);
throw e;
}
}
} }
} }

2
北京北汽/Models/CK.SCP.Models.csproj

@ -448,9 +448,7 @@
<Compile Include="ScpEntity\V_TB_PO.cs" /> <Compile Include="ScpEntity\V_TB_PO.cs" />
<Compile Include="ScpEntity\V_TB_PO_DETAIL.cs" /> <Compile Include="ScpEntity\V_TB_PO_DETAIL.cs" />
<Compile Include="ScpEntity\V_TB_PO_DETAIL_CQ.cs" /> <Compile Include="ScpEntity\V_TB_PO_DETAIL_CQ.cs" />
<Compile Include="ScpEntity\V_TB_PO_PLAN.cs" />
<Compile Include="ScpEntity\V_TB_PO_PLAN_BJBMPT.cs" /> <Compile Include="ScpEntity\V_TB_PO_PLAN_BJBMPT.cs" />
<Compile Include="ScpEntity\V_TB_PO_PLAN_DETAIL.cs" />
<Compile Include="ScpEntity\V_TB_PRICE_DETAIL.cs" /> <Compile Include="ScpEntity\V_TB_PRICE_DETAIL.cs" />
<Compile Include="ScpEntity\V_TB_PRICE.cs" /> <Compile Include="ScpEntity\V_TB_PRICE.cs" />
<Compile Include="ScpEntity\V_TB_PRICE_TemporaryPrice.cs" /> <Compile Include="ScpEntity\V_TB_PRICE_TemporaryPrice.cs" />

88
北京北汽/Models/ScpEntity/TB_ASN.cs

@ -14,61 +14,61 @@ namespace CK.SCP.Models.ScpEntity
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
//public partial class V_TB_PO_PLAN_EXTEND public partial class V_TB_PO_PLAN_EXTEND
//{ {
// [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
// [Key] [Key]
// public long UID { get; set; } public long UID { get; set; }
// public string Domain { get; set; } public string Domain { get; set; }
// public string PartCode { get; set; } public string PartCode { get; set; }
// public Nullable<System.DateTime> EndTime { get; set; } public Nullable<System.DateTime> EndTime { get; set; }
// public string PoBillNum { get; set; } public string PoBillNum { get; set; }
// public string Site { get; set; } public string Site { get; set; }
// public string AskBillNum { get; set; } public string AskBillNum { get; set; }
// public string Version { get; set; } public string Version { get; set; }
// public string PartDesc { get; set; } public string PartDesc { get; set; }
// public decimal PlanQty { get; set; } public decimal PlanQty { get; set; }
// public string PoUnit { get; set; } public string PoUnit { get; set; }
// public int PoLine { get; set; } public int PoLine { get; set; }
// public string VendId { get; set; } public string VendId { get; set; }
// public string ProjectId { get; set; } public string ProjectId { get; set; }
// public string IsPlan { get; set; } public string IsPlan { get; set; }
// [NotMapped] [NotMapped]
// public List<string> UserInAddress { set; get; } public List<string> UserInAddress { set; get; }
// [NotMapped] [NotMapped]
// public List<string> UserInVendIds { set; get; } public List<string> UserInVendIds { set; get; }
// [NotMapped] [NotMapped]
// public List<int> BillStateList { set; get; } public List<int> BillStateList { set; get; }
// [NotMapped] [NotMapped]
// public DateTime? EndTime_Begin { set; get; } public DateTime? EndTime_Begin { set; get; }
// [NotMapped] [NotMapped]
// public DateTime? EndTime_End { set; get; } public DateTime? EndTime_End { set; get; }
//} }
//public partial class V_TB_PO_PLAN_DETAIL public partial class V_TB_PO_PLAN_DETAIL
//{ {
// [Key] [Key]
// public long UID { get; set; } public long UID { get; set; }
// public string PoBillNum { get; set; } public string PoBillNum { get; set; }
// public string VendId { get; set; } public string VendId { get; set; }
// public Nullable<System.DateTime> EndTime { get; set; } public Nullable<System.DateTime> EndTime { get; set; }
// public string PartCode { get; set; } public string PartCode { get; set; }
// public string AskBillNum { get; set; } public string AskBillNum { get; set; }
// public string Version { get; set; } public string Version { get; set; }
// public string Domain { get; set; } public string Domain { get; set; }
// public decimal PlanQty { get; set; } public decimal PlanQty { get; set; }
// public string PoUnit { get; set; } public string PoUnit { get; set; }
//} }
public partial class TB_ASN:RecordEntity public partial class TB_ASN:RecordEntity
{ {
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] [DatabaseGenerated(DatabaseGeneratedOption.Identity)]

105
北京北汽/Models/ScpEntity/V_TB_PO_PLAN.cs

@ -1,105 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace CK.SCP.Models.ScpEntity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
public partial class V_TB_PO_PLAN
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public long UID { get; set; }
public string Domain { get; set; }
public string PartCode { get; set; }
public Nullable<System.DateTime> EndTime { get; set; }
//public Nullable<System.DateTime> CreateTime { get; set; }
public string PoBillNum { get; set; }
public string Site { get; set; }
public string AskBillNum { get; set; }
public string Version { get; set; }
public string PartDesc { get; set; }
public decimal PlanQty { get; set; }
public string PoUnit { get; set; }
public int PoLine { get; set; }
public string VendId { get; set; }
public string ProjectId { get; set; }
public string IsPlan { get; set; }
//public string Buyer { get; set; }
[NotMapped]
public List<string> UserInAddress { set; get; }
[NotMapped]
public List<string> UserInVendIds { set; get; }
[NotMapped]
public List<int> BillStateList { set; get; }
[NotMapped]
public DateTime? EndTime_Begin { set; get; }
[NotMapped]
public DateTime? EndTime_End { set; get; }
public DateTime? BeginTime { get; set; }
//[NotMapped]
//public DateTime? EndTime_Begin1 { set; get; }
//[NotMapped]
//public DateTime? EndTime_End1 { set; get; }
}
public partial class V_TB_PO_PLAN_EXTEND
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public long UID { get; set; }
public string Domain { get; set; }
public string PartCode { get; set; }
public Nullable<System.DateTime> EndTime { get; set; }
public string PoBillNum { get; set; }
public string Site { get; set; }
public string AskBillNum { get; set; }
public string Version { get; set; }
public string PartDesc { get; set; }
public decimal PlanQty { get; set; }
public string PoUnit { get; set; }
public int PoLine { get; set; }
public string VendId { get; set; }
public string ProjectId { get; set; }
public string IsPlan { get; set; }
[NotMapped]
public List<string> UserInAddress { set; get; }
[NotMapped]
public List<string> UserInVendIds { set; get; }
[NotMapped]
public List<int> BillStateList { set; get; }
[NotMapped]
public DateTime? EndTime_Begin { set; get; }
[NotMapped]
public DateTime? EndTime_End { set; get; }
}
}

31
北京北汽/Models/ScpEntity/V_TB_PO_PLAN_DETAIL.cs

@ -1,31 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace CK.SCP.Models.ScpEntity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public partial class V_TB_PO_PLAN_DETAIL
{
[Key]
public long UID { get; set; }
public string PoBillNum { get; set; }
public string VendId { get; set; }
public Nullable<System.DateTime> EndTime { get; set; }
public string PartCode { get; set; }
public string AskBillNum { get; set; }
public string Version { get; set; }
public string Domain { get; set; }
public decimal PlanQty { get; set; }
public string PoUnit { get; set; }
}
}

8
北京北汽/SCP/SCP.csproj

@ -2930,7 +2930,6 @@
<Content Include="grf\SmallBarCode.grf" /> <Content Include="grf\SmallBarCode.grf" />
<Content Include="grf\InvRecBill.grf" /> <Content Include="grf\InvRecBill.grf" />
<Content Include="Handlers\MakeVerifyCode.ashx" /> <Content Include="Handlers\MakeVerifyCode.ashx" />
<Content Include="Views\PlanData\SCP_PO_BJPLAN.aspx" />
<Content Include="Views\PlanData\SCP_PO_PLAN_DETAIL.aspx" /> <Content Include="Views\PlanData\SCP_PO_PLAN_DETAIL.aspx" />
<Content Include="Views\PlanData\SCP_TB_ASK_DETAIL_PO.aspx" /> <Content Include="Views\PlanData\SCP_TB_ASK_DETAIL_PO.aspx" />
<Content Include="Views\PlanData\SCP_PO_CQ.aspx" /> <Content Include="Views\PlanData\SCP_PO_CQ.aspx" />
@ -5484,13 +5483,6 @@
<Compile Include="Views\PlanData\SCP_ASK.aspx.designer.cs"> <Compile Include="Views\PlanData\SCP_ASK.aspx.designer.cs">
<DependentUpon>SCP_ASK.aspx</DependentUpon> <DependentUpon>SCP_ASK.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Views\PlanData\SCP_PO_BJPLAN.aspx.cs">
<DependentUpon>SCP_PO_BJPLAN.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\PlanData\SCP_PO_BJPLAN.aspx.designer.cs">
<DependentUpon>SCP_PO_BJPLAN.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\SCP_PO_PLAN_DETAIL.aspx.cs"> <Compile Include="Views\PlanData\SCP_PO_PLAN_DETAIL.aspx.cs">
<DependentUpon>SCP_PO_PLAN_DETAIL.aspx</DependentUpon> <DependentUpon>SCP_PO_PLAN_DETAIL.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

Loading…
Cancel
Save