diff --git a/Controller/CK.SCP.Controller.csproj b/Controller/CK.SCP.Controller.csproj
index 64d5a9a..344b706 100644
--- a/Controller/CK.SCP.Controller.csproj
+++ b/Controller/CK.SCP.Controller.csproj
@@ -58,7 +58,6 @@
-
diff --git a/Controller/SCP_FORECAST_CONTROLLER.cs b/Controller/SCP_FORECAST_CONTROLLER.cs
deleted file mode 100644
index 27476b1..0000000
--- a/Controller/SCP_FORECAST_CONTROLLER.cs
+++ /dev/null
@@ -1,425 +0,0 @@
-using CK.SCP.Models;
-using CK.SCP.Models.Enums;
-using CK.SCP.Models.ScpEntity;
-using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
-using CK.SCP.Utils;
-using System;
-using System.Collections.Generic;
-using System.Data.Entity.Core;
-using System.Data.Entity.Migrations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CK.SCP.Controller
-{
- public class SCP_FORECAST_CONTROLLER
- {
- ///
- /// 获取数据
- ///
- ///
- ///
- public static void Get_V_TB_FORECAST_List(V_TB_FORECAST p_entity, Action>> p_action)
- {
- ResultObject> _ret = new ResultObject>();
- try
- {
- using (Models.ScpEntities db = EntitiesFactory.CreateScpInstance())
- {
- IQueryable q = db.V_TB_FORECAST;
-
- if (!string.IsNullOrEmpty(p_entity.PartCode))
- {
- q = q.Where(p => p.PartCode.Contains(p_entity.PartCode));
- }
- if (!string.IsNullOrEmpty(p_entity.VendId))
- {
- q = q.Where(p => p.VendId == p_entity.VendId);
- }
- if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0)
- {
- q = q.Where(p => p_entity.BillStateList.Contains((int)p.State));
- }
- if (!string.IsNullOrEmpty(p_entity.State_DESC))
- {
- q = q.Where(p => p.State_DESC.Contains(p_entity.State_DESC));
- }
- if (!string.IsNullOrEmpty(p_entity.Month))
- {
- q = q.Where(p => p.Month == p_entity.Month);
- }
- q = q.Where(p => p.IsDeleted == p_entity.IsDeleted);
- if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0)
- {
- q = q.Where(p => p_entity.UserInAddress.Contains(p.Site));
- }
- if (!string.IsNullOrEmpty(p_entity.CreateUser))
- {
- q = q.Where(p => p.CreateUser == p_entity.CreateUser);
- }
- if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0)
- {
- q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId));
- }
- _ret.State = ReturnStatus.Succeed;
- _ret.Result = q;
- p_action(_ret);
- }
- }
- 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.ErrorList.Add(dbEx);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", sb.ToString());
- throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
- }
- catch (OptimisticConcurrencyException ex)//并发冲突异常
- {
-
- _ret.State = ReturnStatus.Failed;
- _ret.ErrorList.Add(ex);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", ex.ToString());
- throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
- }
- catch (ScpException ex)
- {
- _ret.State = ReturnStatus.Failed;
- _ret.ErrorList.Add(ex);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", 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;
- _ret.ErrorList.Add(e);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", e.Message);
- throw e;
- }
- }
- ///
- /// EXCEL导入
- ///
- ///
- ///
- ///
- public static ResultObject EXCEL_FORECAST_MOD(List p_order_list, string p_creator, string site)
- {
- ResultObject _ret = new ResultObject();
- try
- {
- using (ScpEntities db = EntitiesFactory.CreateScpInstance())
- {
- int number = 1;
- List lineError = new List();
- List ErrorList = new List();
- var _lst = p_order_list;
- _lst.ForEach
- (p =>
- {
- var _ls = CheckExcelMode_Forecast(db, p);
- if (_ls.Count > 0)
- {
- lineError.Add(number.ToString());
- ErrorList.Add(string.Join("
", _ls.ToArray()));
- }
- number++;
- });
- if (lineError.Count > 0)
- {
- _ret.State = ReturnStatus.Failed;
- _ret.MessageList.AddRange(ErrorList);
- _ret.Result = false;
- }
- else
- {
- _lst.ForEach(p =>
- {
- var _item = db.TB_FORECAST.SingleOrDefault(t => t.PartCode == p.零件编号.ToUpper() && t.VendId == p.供应商编码 && t.Month == p.月份) ??
- new TB_FORECAST { PartCode = p.零件编号.ToUpper(), VendId = p.供应商编码, Month = p.月份, GUID = System.Guid.NewGuid() };
- _item.MonthQty1 = decimal.Parse(p.预测1);
- _item.MonthQty2 = decimal.Parse(p.预测2);
- _item.MonthQty3 = decimal.Parse(p.预测3);
- _item.IsDeleted = false;
- _item.CreateUser = p_creator;
- _item.CreateTime = DateTime.Now;
- _item.State = (int)ForecastState.New;
- _item.UpdateInfo = "";
- _item.Site = site;
- db.TB_FORECAST.AddOrUpdate(_item);
- });
- 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_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", 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_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", 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_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", 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_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", e.Message);
- _ret.Result = false;
- _ret.ErrorList.Add(e);
- throw e;
- }
- return _ret;
- }
- ///
- /// 导入验证
- ///
- ///
- ///
- ///
- private static List CheckExcelMode_Forecast(ScpEntities db, SCP_FORECAST_EXPORT p_excel)
- {
- List ErrorList = new List();
- if (
- string.IsNullOrEmpty(p_excel.零件编号) ||
- string.IsNullOrEmpty(p_excel.供应商编码) ||
- string.IsNullOrEmpty((p_excel.月份).ToString()) ||
- string.IsNullOrEmpty(p_excel.预测1) ||
- string.IsNullOrEmpty(p_excel.预测2) ||
- string.IsNullOrEmpty(p_excel.预测3))
- {
- ErrorList.Add(string.Format("零件编号【{0}】有填写为空!", p_excel.零件编号));
- }
- return ErrorList;
- }
-
- public static ResultObject Save_TB_FORECAST_STATE(List p_list, string p_user, ForecastState State)
- {
- ResultObject _ret = new ResultObject();
- try
- {
- using (ScpEntities db = EntitiesFactory.CreateScpInstance())
- {
- if (State == ForecastState.Confirm)
- {
- var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList();
- int count = _ls.Count(p => p.State == (int)ForecastState.New);
- if (count == _ls.Count && _ls.Count > 0)
- {
- _ls.ForEach(p =>
- {
- p.State = (int)ForecastState.Confirm;
- p.UpdateTime = DateTime.Now;
- p.UpdateUser = p_user;
- p.UpdateInfo = "供应商确认";
- }
- );
- db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray());
- }
- else
- {
- _ret.State = ReturnStatus.Failed;
- _ret.Result = false;
- _ret.Message = "选择的记录,有已经确认的数据!";
- }
- }
- if (State == ForecastState.Reject)
- {
- var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList();
- int count = _ls.Count(p => p.State == (int)ForecastState.New);
- if (count == _ls.Count && _ls.Count > 0)
- {
- _ls.ForEach(p =>
- {
- p.State = (int)ForecastState.Reject;
- p.UpdateTime = DateTime.Now;
- p.UpdateUser = p_user;
- p.UpdateInfo = "作废";
- p.IsDeleted = true ;
- }
- );
- db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray());
- }
- else
- {
- _ret.State = ReturnStatus.Failed;
- _ret.Result = false;
- _ret.Message = "选择的记录,有已经确认的数据!";
- }
- }
- if (State == ForecastState.New)
- {
- var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList();
- int count = _ls.Count(p => p.State == (int)ForecastState.Confirm);
- if (count == _ls.Count && _ls.Count > 0)
- {
- _ls.ForEach(p =>
- {
- p.State = (int)ForecastState.New;
- p.UpdateTime = DateTime.Now;
- p.UpdateUser = p_user;
- p.UpdateInfo = "取消确认";
- }
- );
- db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray());
- }
- else
- {
- _ret.State = ReturnStatus.Failed;
- _ret.Result = false;
- _ret.Message = "选择的记录,有不是确认的数据!";
- }
- }
- if (string.IsNullOrEmpty(_ret.Message))
- {
- if (db.SaveChanges() != -1)
- {
- _ret.State = ReturnStatus.Succeed;
- _ret.Result = true;
- }
- else
- {
- _ret.State = ReturnStatus.Failed;
- _ret.Result = false;
- _ret.Message = "数据更新失败!";
- }
- }
- }
- }
- 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_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", 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_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", 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_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", 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_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", e.Message);
- _ret.Result = false;
- _ret.ErrorList.Add(e);
- throw e;
- }
-
- return _ret;
- }
- }
-}
diff --git a/Controller/SCP_REPORT_CONTROLLER.cs b/Controller/SCP_REPORT_CONTROLLER.cs
index 76dc1f7..19e643f 100644
--- a/Controller/SCP_REPORT_CONTROLLER.cs
+++ b/Controller/SCP_REPORT_CONTROLLER.cs
@@ -761,27 +761,27 @@ namespace CK.SCP.Controller
_builder.Append(" on s1.AskBillNum=s2.AskBillNum and s1.PartCode=s2.PartCode and s1.PoLine=s2.PoLine");
return _builder.ToString();
}
- public static string Get_V_SCP_FORECAST_REPORT_SQL(V_FORECAST_REPORT p_entity)
- {
- StringBuilder _builder = new StringBuilder();
- _builder.Append(" select B.PartCode,B.VendId,B.AskQty,B.Month, ISNULL(c.MonthQty1,0) as MonthQty1 ,ISNULL(c.MonthQty2,0) as MonthQty2 ,ISNULL(c.MonthQty3,0) as MonthQty3 from ( ");
- _builder.Append(" (selecT PartCode,VendId ,MONTH(BeginTime) as Month,sum(AskQty) as AskQty from V_TB_ASK_DETAIL A ");
- _builder.Append(" where A.IsDeleted=0 group by A.PartCode,A.VendId ,MONTH(A.BeginTime)) B LEFT OUTER JOIN ");
- _builder.Append(" TB_FORECAST c on B.PartCode=c.PartCode and B.VendId=c.VendId and b.Month=c.Month and c.IsDeleted=0 and c.State=1 ) where 1=1 ");
- if (!string.IsNullOrEmpty(p_entity.PartCode))
- {
- _builder.AppendFormat(" And B.PartCode='{0}'", p_entity.PartCode);
- }
- if (!string.IsNullOrEmpty(p_entity.VendId))
- {
- _builder.AppendFormat(" And B.VendId='{0}'", p_entity.VendId);
- }
- if (p_entity.Month!=0)
- {
- _builder.AppendFormat(" And B.Month='{0}'", p_entity.Month);
- }
- return _builder.ToString();
- }
+ //public static string Get_V_SCP_FORECAST_REPORT_SQL(V_FORECAST_REPORT p_entity)
+ //{
+ // StringBuilder _builder = new StringBuilder();
+ // _builder.Append(" select B.PartCode,B.VendId,B.AskQty,B.Month, ISNULL(c.MonthQty1,0) as MonthQty1 ,ISNULL(c.MonthQty2,0) as MonthQty2 ,ISNULL(c.MonthQty3,0) as MonthQty3 from ( ");
+ // _builder.Append(" (selecT PartCode,VendId ,MONTH(BeginTime) as Month,sum(AskQty) as AskQty from V_TB_ASK_DETAIL A ");
+ // _builder.Append(" where A.IsDeleted=0 group by A.PartCode,A.VendId ,MONTH(A.BeginTime)) B LEFT OUTER JOIN ");
+ // _builder.Append(" TB_FORECAST c on B.PartCode=c.PartCode and B.VendId=c.VendId and b.Month=c.Month and c.IsDeleted=0 and c.State=1 ) where 1=1 ");
+ // if (!string.IsNullOrEmpty(p_entity.PartCode))
+ // {
+ // _builder.AppendFormat(" And B.PartCode='{0}'", p_entity.PartCode);
+ // }
+ // if (!string.IsNullOrEmpty(p_entity.VendId))
+ // {
+ // _builder.AppendFormat(" And B.VendId='{0}'", p_entity.VendId);
+ // }
+ // if (p_entity.Month!=0)
+ // {
+ // _builder.AppendFormat(" And B.Month='{0}'", p_entity.Month);
+ // }
+ // return _builder.ToString();
+ //}
///
/// 按零件编号获取及时率语句(沈阳)
///
@@ -839,68 +839,68 @@ namespace CK.SCP.Controller
return _builder.ToString();
}
- public static void Get_V_SCP_FORECAST_REPORT_List(V_FORECAST_REPORT p_entity, Action>> p_action)
- {
- ResultObject> _ret = new ResultObject>();
- try
- {
- using (ScpEntities db = EntitiesFactory.CreateScpInstance())
- {
- string _sql = Get_V_SCP_FORECAST_REPORT_SQL(p_entity);
+ //public static void Get_V_SCP_FORECAST_REPORT_List(V_FORECAST_REPORT p_entity, Action>> p_action)
+ //{
+ // ResultObject> _ret = new ResultObject>();
+ // try
+ // {
+ // using (ScpEntities db = EntitiesFactory.CreateScpInstance())
+ // {
+ // string _sql = Get_V_SCP_FORECAST_REPORT_SQL(p_entity);
- IQueryable q = db.Database.SqlQuery(_sql).AsQueryable();
- _ret.State = ReturnStatus.Succeed;
- _ret.Result = q;
- p_action(_ret);
- }
- }
- 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.ErrorList.Add(dbEx);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", sb.ToString());
- throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
- }
- catch (OptimisticConcurrencyException ex)//并发冲突异常
- {
+ // IQueryable q = db.Database.SqlQuery(_sql).AsQueryable();
+ // _ret.State = ReturnStatus.Succeed;
+ // _ret.Result = q;
+ // p_action(_ret);
+ // }
+ // }
+ // 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.ErrorList.Add(dbEx);
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", sb.ToString());
+ // throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
+ // }
+ // catch (OptimisticConcurrencyException ex)//并发冲突异常
+ // {
- _ret.State = ReturnStatus.Failed;
- _ret.ErrorList.Add(ex);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", ex.ToString());
- throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
- }
- catch (ScpException ex)
- {
- _ret.State = ReturnStatus.Failed;
- _ret.ErrorList.Add(ex);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", ex.ToString());
+ // _ret.State = ReturnStatus.Failed;
+ // _ret.ErrorList.Add(ex);
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", ex.ToString());
+ // throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
+ // }
+ // catch (ScpException ex)
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // _ret.ErrorList.Add(ex);
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", 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;
- _ret.ErrorList.Add(e);
- LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", e.Message);
- throw e;
- }
- }
+ // 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;
+ // _ret.ErrorList.Add(e);
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", e.Message);
+ // throw e;
+ // }
+ //}
///
/// 获取及时率数据
///
diff --git a/Controller/UniApiController.cs b/Controller/UniApiController.cs
index 1d2eecf..7ffcabc 100644
--- a/Controller/UniApiController.cs
+++ b/Controller/UniApiController.cs
@@ -187,9 +187,9 @@ namespace CK.SCP.Controller
apiData.BuyerPhone = bill.BuyerPhone;
apiData.Domain = bill.Site;
apiData.Site = bill.SubSite;
-
- Extend1 = Utils.JsonHelper.GetJson(bill),
- Extend2 = Utils.JsonHelper.GetJson(detail)
+
+ apiData.Extend1 = Utils.JsonHelper.GetJson(bill);
+ apiData.Extend2 = Utils.JsonHelper.GetJson(detail);
return apiData;
diff --git a/Models/ScpEntities.cs b/Models/ScpEntities.cs
index f9fb8ba..2c95f99 100644
--- a/Models/ScpEntities.cs
+++ b/Models/ScpEntities.cs
@@ -118,7 +118,7 @@ namespace CK.SCP.Models
public virtual DbSet V_TA_VEND_PART { get; set; }
public virtual DbSet TB_PRICE { get; set; }
public virtual DbSet TB_FORECAST { get; set; }
- public virtual DbSet V_TB_FORECAST { get; set; }
+
public virtual DbSet TB_RECEIVE_DETAIL_QAD { get; set; }
public virtual DbSet TB_RECEIVE_QAD { get; set; }
diff --git a/Models/ScpEntity/TB_PO_DETAIL.cs b/Models/ScpEntity/TB_PO_DETAIL.cs
index 62f54b0..a549dfc 100644
--- a/Models/ScpEntity/TB_PO_DETAIL.cs
+++ b/Models/ScpEntity/TB_PO_DETAIL.cs
@@ -76,7 +76,7 @@ namespace CK.SCP.Models.ScpEntity
public string Extend3 { get; set; }
public string SubSite { get; set; }
-
+ public string Site { get; set; }
}
}
diff --git a/SCP/SCP.csproj b/SCP/SCP.csproj
index 1fec8bc..230d03e 100644
--- a/SCP/SCP.csproj
+++ b/SCP/SCP.csproj
@@ -2923,7 +2923,6 @@
-
@@ -2956,7 +2955,6 @@
-
@@ -4532,7 +4530,6 @@
-
@@ -5179,13 +5176,6 @@
SCP_PLAN_DETAIL.aspx
-
- SCP_FORECAST.aspx
- ASPXCodeBehind
-
-
- SCP_FORECAST.aspx
-
SCP_INCOMPLETE_ASK.aspx
ASPXCodeBehind
@@ -5408,13 +5398,6 @@
SCP_CLAIM_EDIT.aspx
-
- SCP_FORECAST.aspx
- ASPXCodeBehind
-
-
- SCP_FORECAST.aspx
-
SCP_INFO.aspx
ASPXCodeBehind
@@ -5793,13 +5776,6 @@
SCP_ASN_LIST.aspx
-
- SCP_FORECAST_REPORT.aspx
- ASPXCodeBehind
-
-
- SCP_FORECAST_REPORT.aspx
-
SCP_INCOMPLETE_ASK.aspx
ASPXCodeBehind
diff --git a/SCP/Views/PlanData/SCP_FORECAST.aspx b/SCP/Views/PlanData/SCP_FORECAST.aspx
deleted file mode 100644
index 7d3ef94..0000000
--- a/SCP/Views/PlanData/SCP_FORECAST.aspx
+++ /dev/null
@@ -1,101 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_FORECAST.aspx.cs" Inherits="SCP.Views.PlanData.SCP_FORECAST" %>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SCP/Views/PlanData/SCP_FORECAST.aspx.cs b/SCP/Views/PlanData/SCP_FORECAST.aspx.cs
deleted file mode 100644
index 261ba04..0000000
--- a/SCP/Views/PlanData/SCP_FORECAST.aspx.cs
+++ /dev/null
@@ -1,239 +0,0 @@
-using CK.SCP.Controller;
-using CK.SCP.Models.ScpEntity;
-using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
-using CK.SCP.Utils;
-using FineUI;
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.IO;
-using System.Linq;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using CK.SCP.Models.Enums;
-
-namespace SCP.Views.PlanData
-{
- public partial class SCP_FORECAST : PageBase
- {
- ///
- /// 页面加载
- ///
- ///
- ///
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- LoadData();
- }
- }
- ///
- /// 加载数据
- ///
- public void LoadData()
- {
- BindData();
- }
- ///
- /// 数据绑定
- ///
- public void BindData()
- {
- SearchV_TB_FORECAST_Data((result) =>
- {
- Grid_V_TB_FORECAST.RecordCount = result.Count();
- var list = SortAndPage(result, Grid_V_TB_FORECAST);
- Grid_V_TB_FORECAST.DataSource = list;
- Grid_V_TB_FORECAST.DataBind();
- });
- }
- ///
- /// 获取数据
- ///
- ///
- public void SearchV_TB_FORECAST_Data(Action> p_action)
- {
- V_TB_FORECAST _entity = new V_TB_FORECAST();
- _entity.IsDeleted = false;
- if (!string.IsNullOrEmpty(TextPartCode.Text))
- {
- _entity.PartCode = TextPartCode.Text;
- }
- if (!string.IsNullOrEmpty(TextVendId.Text))
- {
- _entity.VendId = TextVendId.Text;
- }
- if (ddl_Day.SelectedValue != "0")
- {
- _entity.Month = ddl_Day.SelectedValue;
- }
- _entity.UserInAddress = CurrentUser.FactoryList;
- _entity.UserInVendIds = CurrentUser.VenderList;
- if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
- {
- _entity.BillStateList = new List() { int.Parse(DDL_State.SelectedValue) };
- }
- SCP_FORECAST_CONTROLLER.Get_V_TB_FORECAST_List(_entity, (_ret) =>
- {
- if (_ret.State == ReturnStatus.Succeed)
- {
- p_action(_ret.Result);
- }
- });
- }
- ///
- /// 查询
- ///
- ///
- ///
- protected void btnSearch_Click(object sender, EventArgs e)
- {
- BindData();
- }
- protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
- {
- Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
- BindData();
- }
- protected void Grid_V_TB_FORECAST_PageIndexChange(object sender, GridPageEventArgs e)
- {
- Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
- BindData();
- }
- ///
- /// 导入
- ///
- ///
- ///
- protected void btnInput_Click(object sender, EventArgs e)
- {
- try
- {
- string _fileName = FileUp.FileName;
- if (string.IsNullOrEmpty(_fileName))
- {
- Alert.Show("选择文件为空!");
- return;
- }
- string _lx = _fileName.Split('.')[1];
- Stream _stream = FileUp.PostedFile.InputStream;
- DataTable _dt = new DataTable();
- if (_lx == "xls")
- {
- _dt = ExcelHelper.GetDataTable(_stream);
- }
- else
- {
- _dt = ExcelHelper.GetDataTableOfXlsx(_stream);
- }
- var list = ConvertHelper.ToList(ExcelHelper.RemoveEmpty(_dt)).ToList();
- var ret = SCP_FORECAST_CONTROLLER.EXCEL_FORECAST_MOD(list, CurrentUser.Name, CurrentUser.FactoryList[0]);
- if (ret.State == ReturnStatus.Succeed && ret.Result == true)
- {
- BindData();
- }
- else
- {
- Alert.Show(string.Join("
", ret.MessageList));
- }
- }
- catch (Exception ex)
- {
- Alert.Show(ex.Message);
- }
-
- }
- ///
- /// 确认数据
- ///
- ///
- ///
- protected void btnSave_Click(object sender, EventArgs e)
- {
- int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray;
- List _UidList = new List();
- for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++)
- {
- if (_selections.Contains(i))
- {
- object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i];
- if (!string.IsNullOrEmpty(rowDataKeys[0].ToString()))
- {
- _UidList.Add(long.Parse(rowDataKeys[0].ToString()));
- }
- }
- }
- var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Confirm);
- if (ret.State == ReturnStatus.Succeed)
- {
- BindData();
- }
- else
- {
- Alert.Show(ret.Message);
- }
- }
- ///
- /// 删除数据
- ///
- ///
- ///
- protected void btnDelete_Click(object sender, EventArgs e)
- {
- int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray;
- List _UidList = new List();
- for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++)
- {
- if (_selections.Contains(i))
- {
- object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i];
- if (!string.IsNullOrEmpty(rowDataKeys[0].ToString()))
- {
- _UidList.Add(long.Parse(rowDataKeys[0].ToString()));
- }
- }
- }
- var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Reject);
- if (ret.State == ReturnStatus.Succeed)
- {
- BindData();
- }
- else
- {
- Alert.Show(ret.Message);
- }
- }
- ///
- /// 取消确认
- ///
- ///
- ///
- protected void BtnCancleSave_Click(object sender, EventArgs e)
- {
- int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray;
- List _UidList = new List();
- for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++)
- {
- if (_selections.Contains(i))
- {
- object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i];
- if (!string.IsNullOrEmpty(rowDataKeys[0].ToString()))
- {
- _UidList.Add(long.Parse(rowDataKeys[0].ToString()));
- }
- }
- }
- var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.New);
- if (ret.State == ReturnStatus.Succeed)
- {
- BindData();
- }
- else
- {
- Alert.Show(ret.Message);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/SCP/Views/PlanData/SCP_FORECAST.aspx.designer.cs b/SCP/Views/PlanData/SCP_FORECAST.aspx.designer.cs
deleted file mode 100644
index f5918d9..0000000
--- a/SCP/Views/PlanData/SCP_FORECAST.aspx.designer.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-//------------------------------------------------------------------------------
-// <自动生成>
-// 此代码由工具生成。
-//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
-// 自动生成>
-//------------------------------------------------------------------------------
-
-namespace SCP.Views.PlanData {
-
-
- public partial class SCP_FORECAST {
-
- ///
- /// form1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
- ///
- /// Panel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Panel Panel1;
-
- ///
- /// Toolbar1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Toolbar Toolbar1;
-
- ///
- /// ToolbarSeparator1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
-
- ///
- /// btnRefresh 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnRefresh;
-
- ///
- /// btnSave 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnSave;
-
- ///
- /// btnCancleSave 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnCancleSave;
-
- ///
- /// btnDelete 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnDelete;
-
- ///
- /// FileUp 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.FileUpload FileUp;
-
- ///
- /// btnInput 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnInput;
-
- ///
- /// extForm1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Form extForm1;
-
- ///
- /// FormRow_2 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.FormRow FormRow_2;
-
- ///
- /// TextPartCode 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.TextBox TextPartCode;
-
- ///
- /// TextVendId 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.TextBox TextVendId;
-
- ///
- /// ddl_Day 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList ddl_Day;
-
- ///
- /// DDL_State 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList DDL_State;
-
- ///
- /// Button1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button Button1;
-
- ///
- /// Grid_V_TB_FORECAST 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Grid Grid_V_TB_FORECAST;
-
- ///
- /// ToolbarSeparator2 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarSeparator ToolbarSeparator2;
-
- ///
- /// ToolbarText1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarText ToolbarText1;
-
- ///
- /// ddlGridPageSize 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList ddlGridPageSize;
- }
-}
diff --git a/SCP/Views/SupplierData/SCP_FORECAST.aspx b/SCP/Views/SupplierData/SCP_FORECAST.aspx
deleted file mode 100644
index bd9fdd6..0000000
--- a/SCP/Views/SupplierData/SCP_FORECAST.aspx
+++ /dev/null
@@ -1,101 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_FORECAST.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_FORECAST" %>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SCP/Views/SupplierData/SCP_FORECAST.aspx.cs b/SCP/Views/SupplierData/SCP_FORECAST.aspx.cs
deleted file mode 100644
index 99b206e..0000000
--- a/SCP/Views/SupplierData/SCP_FORECAST.aspx.cs
+++ /dev/null
@@ -1,240 +0,0 @@
-using CK.SCP.Controller;
-using CK.SCP.Models.ScpEntity;
-using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
-using CK.SCP.Utils;
-using FineUI;
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.IO;
-using System.Linq;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using CK.SCP.Models.Enums;
-
-
-namespace SCP.Views.SupplierData
-{
- public partial class SCP_FORECAST : PageBase
- {
- ///
- /// 页面加载
- ///
- ///
- ///
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- LoadData();
- }
- }
- ///
- /// 加载数据
- ///
- public void LoadData()
- {
- BindData();
- }
- ///
- /// 数据绑定
- ///
- public void BindData()
- {
- SearchV_TB_FORECAST_Data((result) =>
- {
- Grid_V_TB_FORECAST.RecordCount = result.Count();
- var list = SortAndPage(result, Grid_V_TB_FORECAST);
- Grid_V_TB_FORECAST.DataSource = list;
- Grid_V_TB_FORECAST.DataBind();
- });
- }
- ///
- /// 获取数据
- ///
- ///
- public void SearchV_TB_FORECAST_Data(Action> p_action)
- {
- V_TB_FORECAST _entity = new V_TB_FORECAST();
- _entity.IsDeleted = false;
- if (!string.IsNullOrEmpty(TextPartCode.Text))
- {
- _entity.PartCode = TextPartCode.Text;
- }
- if (!string.IsNullOrEmpty(TextVendId.Text))
- {
- _entity.VendId = TextVendId.Text;
- }
- if (ddl_Day.SelectedValue != "0")
- {
- _entity.Month = ddl_Day.SelectedValue;
- }
- _entity.UserInAddress = CurrentUser.FactoryList;
- _entity.UserInVendIds = CurrentUser.VenderList;
- if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
- {
- _entity.BillStateList = new List() { int.Parse(DDL_State.SelectedValue) };
- }
- SCP_FORECAST_CONTROLLER.Get_V_TB_FORECAST_List(_entity, (_ret) =>
- {
- if (_ret.State == ReturnStatus.Succeed)
- {
- p_action(_ret.Result);
- }
- });
- }
- ///
- /// 查询
- ///
- ///
- ///
- protected void btnSearch_Click(object sender, EventArgs e)
- {
- BindData();
- }
- protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
- {
- Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
- BindData();
- }
- protected void Grid_V_TB_FORECAST_PageIndexChange(object sender, GridPageEventArgs e)
- {
- Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
- BindData();
- }
- ///
- /// 导入
- ///
- ///
- ///
- protected void btnInput_Click(object sender, EventArgs e)
- {
- try
- {
- string _fileName = FileUp.FileName;
- if (string.IsNullOrEmpty(_fileName))
- {
- Alert.Show("选择文件为空!");
- return;
- }
- string _lx = _fileName.Split('.')[1];
- Stream _stream = FileUp.PostedFile.InputStream;
- DataTable _dt = new DataTable();
- if (_lx == "xls")
- {
- _dt = ExcelHelper.GetDataTable(_stream);
- }
- else
- {
- _dt = ExcelHelper.GetDataTableOfXlsx(_stream);
- }
- var list = ConvertHelper.ToList(ExcelHelper.RemoveEmpty(_dt)).ToList();
- var ret = SCP_FORECAST_CONTROLLER.EXCEL_FORECAST_MOD(list, CurrentUser.Name, CurrentUser.FactoryList[0]);
- if (ret.State == ReturnStatus.Succeed && ret.Result == true)
- {
- BindData();
- }
- else
- {
- Alert.Show(string.Join("
", ret.MessageList));
- }
- }
- catch (Exception ex)
- {
- Alert.Show(ex.Message);
- }
-
- }
- ///
- /// 确认数据
- ///
- ///
- ///
- protected void btnSave_Click(object sender, EventArgs e)
- {
- int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray;
- List _UidList = new List();
- for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++)
- {
- if (_selections.Contains(i))
- {
- object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i];
- if (!string.IsNullOrEmpty(rowDataKeys[0].ToString()))
- {
- _UidList.Add(long.Parse(rowDataKeys[0].ToString()));
- }
- }
- }
- var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Confirm);
- if (ret.State == ReturnStatus.Succeed)
- {
- BindData();
- }
- else
- {
- Alert.Show(ret.Message);
- }
- }
- ///
- /// 删除数据
- ///
- ///
- ///
- protected void btnDelete_Click(object sender, EventArgs e)
- {
- int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray;
- List _UidList = new List();
- for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++)
- {
- if (_selections.Contains(i))
- {
- object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i];
- if (!string.IsNullOrEmpty(rowDataKeys[0].ToString()))
- {
- _UidList.Add(long.Parse(rowDataKeys[0].ToString()));
- }
- }
- }
- var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Reject);
- if (ret.State == ReturnStatus.Succeed)
- {
- BindData();
- }
- else
- {
- Alert.Show(ret.Message);
- }
- }
- ///
- /// 取消确认
- ///
- ///
- ///
- protected void BtnCancleSave_Click(object sender, EventArgs e)
- {
- int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray;
- List _UidList = new List();
- for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++)
- {
- if (_selections.Contains(i))
- {
- object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i];
- if (!string.IsNullOrEmpty(rowDataKeys[0].ToString()))
- {
- _UidList.Add(long.Parse(rowDataKeys[0].ToString()));
- }
- }
- }
- var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.New);
- if (ret.State == ReturnStatus.Succeed)
- {
- BindData();
- }
- else
- {
- Alert.Show(ret.Message);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/SCP/Views/SupplierData/SCP_FORECAST.aspx.designer.cs b/SCP/Views/SupplierData/SCP_FORECAST.aspx.designer.cs
deleted file mode 100644
index f2e0932..0000000
--- a/SCP/Views/SupplierData/SCP_FORECAST.aspx.designer.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-//------------------------------------------------------------------------------
-// <自动生成>
-// 此代码由工具生成。
-//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
-// 自动生成>
-//------------------------------------------------------------------------------
-
-namespace SCP.Views.SupplierData {
-
-
- public partial class SCP_FORECAST {
-
- ///
- /// form1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
- ///
- /// Panel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Panel Panel1;
-
- ///
- /// Toolbar1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Toolbar Toolbar1;
-
- ///
- /// ToolbarSeparator1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
-
- ///
- /// btnRefresh 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnRefresh;
-
- ///
- /// btnSave 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnSave;
-
- ///
- /// btnCancleSave 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnCancleSave;
-
- ///
- /// btnDelete 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnDelete;
-
- ///
- /// FileUp 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.FileUpload FileUp;
-
- ///
- /// btnInput 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnInput;
-
- ///
- /// extForm1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Form extForm1;
-
- ///
- /// FormRow_2 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.FormRow FormRow_2;
-
- ///
- /// TextPartCode 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.TextBox TextPartCode;
-
- ///
- /// TextVendId 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.TextBox TextVendId;
-
- ///
- /// ddl_Day 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList ddl_Day;
-
- ///
- /// DDL_State 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList DDL_State;
-
- ///
- /// Button1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button Button1;
-
- ///
- /// Grid_V_TB_FORECAST 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Grid Grid_V_TB_FORECAST;
-
- ///
- /// ToolbarSeparator2 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarSeparator ToolbarSeparator2;
-
- ///
- /// ToolbarText1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarText ToolbarText1;
-
- ///
- /// ddlGridPageSize 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList ddlGridPageSize;
- }
-}
diff --git a/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx b/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx
deleted file mode 100644
index 708e771..0000000
--- a/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx
+++ /dev/null
@@ -1,87 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_FORECAST_REPORT.aspx.cs" Inherits="SCP.Views.沈阳金杯.Report.SCP_FORECAST_REPORT" %>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx.cs b/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx.cs
deleted file mode 100644
index a5c1f70..0000000
--- a/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-using CK.SCP.Controller;
-using CK.SCP.Models.ScpEntity;
-using FineUI;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-
-namespace SCP.Views.沈阳金杯.Report
-{
- public partial class SCP_FORECAST_REPORT : PageBase
- {
- ///
- /// 加载
- ///
- ///
- ///
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- TextM.SelectedValue = DateTime.Now.Month.ToString();
- LoadData();
- }
- }
- ///
- /// 加载数据
- ///
- public void LoadData()
- {
- BindData();
- }
- ///
- /// 数据绑定
- ///
- public void BindData()
- {
- SearchV_FORECAST_REPORT_Data((result) =>
- {
- Grid1.RecordCount = result.Count();
- var list = SortAndPage(result, Grid1);
- Grid1.DataSource = list;
- Grid1.DataBind();
- });
- }
- ///
- /// 查询数据
- ///
- ///
- public void SearchV_FORECAST_REPORT_Data(Action> p_action)
- {
- V_FORECAST_REPORT _entity = new V_FORECAST_REPORT();
- if (!string.IsNullOrEmpty(TextPartCode.Text))
- {
- _entity.PartCode = TextPartCode.Text;
- }
- if (!string.IsNullOrEmpty(TextPartCode.Text))
- {
- _entity.VendId = TextVendId.Text;
- }
- if (!string.IsNullOrEmpty(TextM.SelectedValue))
- {
- _entity.Month = int.Parse(TextM.SelectedValue);
- }
- SCP_REPORT_CONTROLLER.Get_V_SCP_FORECAST_REPORT_List( _entity, (_ret) =>
- {
- if (_ret.State == ReturnStatus.Succeed)
- {
- p_action(_ret.Result);
- }
- });
- }
- ///
- /// 查询事件
- ///
- ///
- ///
- protected void btnSearch_Click(object sender, EventArgs e)
- {
- BindData();
- }
- ///
- /// 分页条数change事件
- ///
- ///
- ///
- protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
- {
- Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
- BindData();
- }
- ///
- /// 页面索引change事件
- ///
- ///
- ///
- protected void Grid_PageIndexChange(object sender, GridPageEventArgs e)
- {
- Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
- BindData();
- }
- }
-}
\ No newline at end of file
diff --git a/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx.designer.cs b/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx.designer.cs
deleted file mode 100644
index aa93089..0000000
--- a/SCP/Views/沈阳金杯/Report/SCP_FORECAST_REPORT.aspx.designer.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-//------------------------------------------------------------------------------
-// <自动生成>
-// 此代码由工具生成。
-//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
-// 自动生成>
-//------------------------------------------------------------------------------
-
-namespace SCP.Views.沈阳金杯.Report {
-
-
- public partial class SCP_FORECAST_REPORT {
-
- ///
- /// form1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
- ///
- /// Panel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Panel Panel1;
-
- ///
- /// Toolbar1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Toolbar Toolbar1;
-
- ///
- /// ToolbarSeparator1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
-
- ///
- /// btnRefresh 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnRefresh;
-
- ///
- /// extForm1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Form extForm1;
-
- ///
- /// FormRow_1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.FormRow FormRow_1;
-
- ///
- /// TextPartCode 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.TextBox TextPartCode;
-
- ///
- /// TextVendId 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.TextBox TextVendId;
-
- ///
- /// TextM 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList TextM;
-
- ///
- /// btnQuery 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Button btnQuery;
-
- ///
- /// Grid1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.Grid Grid1;
-
- ///
- /// ToolbarSeparator2 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarSeparator ToolbarSeparator2;
-
- ///
- /// ToolbarText1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.ToolbarText ToolbarText1;
-
- ///
- /// ddlGridPageSize 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUI.DropDownList ddlGridPageSize;
- }
-}
diff --git a/UniApiGroup/Controller/OdbcApiQadController.cs b/UniApiGroup/Controller/OdbcApiQadController.cs
index 5a6355b..febc7b0 100644
--- a/UniApiGroup/Controller/OdbcApiQadController.cs
+++ b/UniApiGroup/Controller/OdbcApiQadController.cs
@@ -919,6 +919,7 @@ namespace CK.SCP.GrupUniApi.Controller
ModType = Int32.TryParse(firstqadData.xxqad_pod_modtype, out temp) ? temp : (int?)null, //(1:ճ̵,2:ɢ)
Contacter = firstqadData.xxqad_pod_attn,//ϵ
Site = firstqadData.xxqad_pod_domain,//ص
+ SubSite=firstqadData.xxqad_pod_site,
State = (int)FormState.,//״̬
CreateTime = firstqadData.xxqad_pod_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxqad_pod_createdt,//
CreateUser = firstqadData.xxqad_pod_createur,//û
@@ -944,7 +945,7 @@ namespace CK.SCP.GrupUniApi.Controller
var lineNum = Convert.ToInt32(qadData.xxqad_pod_line);
var wmsPoDetail =
wdb.TB_PO_DETAIL.SingleOrDefault(
- p => p.PoBillNum == qadData.xxqad_pod_nbr && p.PoLine == lineNum && p.Remark == qadData.xxqad_pod_domain);
+ p => p.PoBillNum == qadData.xxqad_pod_nbr && p.PoLine == lineNum && p.Site== qadData.xxqad_pod_domain);
if (wmsPoDetail == null)
{
wmsPoDetail = new TB_PO_DETAIL
@@ -971,7 +972,9 @@ namespace CK.SCP.GrupUniApi.Controller
wmsPoDetail.UnConv = qadData.xxqad_pod_um_conv;//ת
wmsPoDetail.DockCode = qadData.xxqad_pod_loc;
wmsPoDetail.State = Convert.ToInt32(qadData.xxqad_pod_status);//״̬
- wmsPoDetail.Remark = qadData.xxqad_pod_domain;//ע
+ wmsPoDetail.Site = qadData.xxqad_pod_domain;//ע
+ wmsPoDetail.SubSite = qadData.xxqad_pod_site;
+
wmsPoDetail.CreateTime = firstqadData.xxqad_pod_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxqad_pod_createdt;//
wmsPoDetail.CreateUser = firstqadData.xxqad_pod_buyer;//û
wmsPoDetail.UpdateTime = firstqadData.xxqad_pod_updatedt;//