Browse Source

Merge branch 'master' of https://gitee.com/zxyabc/COMONE

master
lvzb 4 years ago
parent
commit
d9e53f0aeb
  1. 36
      Controller/SCP_ASK_CONTROLLER.cs
  2. 3
      Models/DataCenterTables/TT_LOCATION.cs
  3. 2
      SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs
  4. 6
      SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs

36
Controller/SCP_ASK_CONTROLLER.cs

@ -1490,8 +1490,6 @@ namespace CK.SCP.Controller
}
catch (Exception e)
{
_ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(e);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", e.Message);
@ -1766,8 +1764,6 @@ namespace CK.SCP.Controller
}
);
db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray());
}
);
@ -1962,6 +1958,33 @@ namespace CK.SCP.Controller
{
if (db.SaveChanges() != -1)
{
if (p_state == AskState.CompleteForce) {
using (ScpEntities db1 = EntitiesFactory.CreateScpInstance())
{
if (p_list.Count > 0)
{
var _entityList = db.V_TB_ASK_DETAIL.Where(p => p_list.Contains(p.AskBillNum)).ToList();
var _item = _entityList.FirstOrDefault();
if (_item.AskBillNum.Contains("U"))
{
var _planList = db1.TB_PO_PLAN_EXTEND.Where(p => p.Domain == _item.Site && p.EndTime == _item.EndTime && p.PoBillNum == _item.PoBillNum).ToList();
_planList.ForEach(p =>
{
var _first = _entityList.Where(itm => itm.PoBillNum == p.PoBillNum && itm.PartCode == p.PartCode && itm.EndTime == p.EndTime).FirstOrDefault();
if (_first != null)
{
p.PlanQty = _first.AskQty;
}
});
}
db1.SaveChanges();
}
}
}
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
}
@ -1971,8 +1994,7 @@ namespace CK.SCP.Controller
_ret.Result = false;
_ret.Message = "数据更新失败!";
}
}
}
}
}
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
@ -2173,8 +2195,6 @@ namespace CK.SCP.Controller
_ls.ForEach(p => {
p.UpdateUser = p_user.ChineseName;
p.UpdateTime = DateTime.Now;
p.State = (int)AskState.Confirm;
var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList();
_list.ForEach(itm => itm.State = (int)AskState.Confirm);

3
Models/DataCenterTables/TT_LOCATION.cs

@ -7,7 +7,8 @@ using CK.SCP.Models.Base;
using CK.SCP.Models.Enums;
using CK.SCP.Models.ExchangeCenterTables;
using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
namespace CK.SCP.Models.DataCenterTables
{
[Description("¿âλ±ä¸ü±í")]
public class TT_LOCATION : TED_BASE,ITaskTable

2
SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs

@ -224,7 +224,7 @@ namespace SCP.PlanData
protected void btnCompleteForce_Click(object sender, EventArgs e)
{
SET_PO_STATE("强制归档成功!", AskState.CompleteForce);
SET_PO_STATE("完结看板成功!", AskState.CompleteForce);
}
protected void btnReject_Click(object sender, EventArgs e)

6
SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs

@ -50,7 +50,6 @@ namespace SCP.PlanData
}
public void SearchV_TB_PO(Action<IQueryable<V_TB_PO>> p_action)
{
var ls=SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList();
DropDownList1.DataSource = ls;
DropDownList1.DataBind();
@ -74,15 +73,13 @@ namespace SCP.PlanData
if (!string.IsNullOrEmpty(rblist.SelectedValue))
{
_entity.ModType =ConvertHelper.To<int> (rblist.SelectedValue);
}
_entity.ErpBillNum = TXT_ProjectId.Text;
_entity.SubSite = DropDownList1.SelectedValue;
_entity.Extend1 = TxT_Extend1.Text;
_entity.Extend2 = TxT_Extend2.Text;
_entity.Extend3 = TxT_Extend3.Text;
_entity.IsDeleted = false;
_entity.IsDeleted = false;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
SCP_PO_CONTROLLER.Get_V_TB_PO_List(_entity, (_ret) => {
@ -160,7 +157,6 @@ namespace SCP.PlanData
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_PO.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindOrder();
}

Loading…
Cancel
Save