Browse Source

冲压件作废优化

SCP_CYJ
qian 7 months ago
parent
commit
3384584265
  1. 20
      Controller/SCP_MPO_CONTROLLER.cs
  2. 2
      Models/ScpEntity/TB_MATERIALORDERS_DETAIL.cs
  3. 1
      Models/ScpEntity/V_MPO_PRINT.cs
  4. 2
      Models/ScpEntity/V_TB_MPO.cs
  5. 2
      Models/ScpEntity/V_TB_MPO_DETAIL.cs
  6. 1
      SCP/Views/PlanData/SCP_MPO_DETAIL.aspx
  7. 13
      SCP/Views/PlanData/SCP_PO_MATERIAL.aspx
  8. 27
      SCP/Views/PlanData/SCP_PO_MATERIAL.aspx.cs
  9. 36
      SCP/Views/PlanData/SCP_PO_MATERIAL.aspx.designer.cs
  10. 1
      SCP/Views/SupplierData/SCP_MPO_DETAIL.aspx
  11. 9
      UniApiGroup/Controller/OdbcApiQadController.cs
  12. 2
      UniApiGroup/Controller/PoBillNumcontroller.cs

20
Controller/SCP_MPO_CONTROLLER.cs

@ -43,7 +43,7 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p.DocDate <= p_entity.DocDateEnd);
}
if (!string.IsNullOrEmpty(p_entity.PurdocNO))
if (!string.IsNullOrWhiteSpace(p_entity.PurdocNO))
{
q = q.Where(p => p.PurdocNO == p_entity.PurdocNO.Trim());
}
@ -51,6 +51,23 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendorNO));
}
if (!string.IsNullOrWhiteSpace(p_entity.VendorNO))
{
q = q.Where(p => p.VendorNO.Contains(p_entity.VendorNO));
}
if (!string.IsNullOrWhiteSpace(p_entity.VendorDesc))
{
q = q.Where(p => p.VendorDesc.Contains(p_entity.VendorDesc));
}
if (!string.IsNullOrWhiteSpace(p_entity.CreatedBy))
{
q = q.Where(p => p.CreatedBy.Contains(p_entity.CreatedBy));
}
if (!string.IsNullOrWhiteSpace(p_entity.AcceptStatusSelect))
{
var acceptStatus = int.Parse(p_entity.AcceptStatusSelect);
q = q.Where(p => p.AcceptStatus == acceptStatus);
}
_ret.State = ReturnStatus.Succeed;
_ret.Result = q;
p_action(_ret);
@ -561,6 +578,7 @@ namespace CK.SCP.Controller
_detail.ITEMDELIVERYDATE = p.ItemDeliveryDate.ToString("yyyy-MM-dd");
_detail.GLACCTNODES = p.Glaccnum;
_detail.COSTCENTERDES = p.CostCenterDes;
_detail.PURDOCITEMNO = p.PURDOCITEMNO;
_detail.CType_DESC = p.CType_DESC;
lsDetail.Add(_detail);
if (p.Ctype != "D")

2
Models/ScpEntity/TB_MATERIALORDERS_DETAIL.cs

@ -59,5 +59,7 @@ namespace CK.SCP.Models.ScpEntity
public string UpdateTime { get; set; }
[NotMapped]
public string CType_DESC { get; set; }
[DisplayName("订单行号")]
public string PURDOCITEMNO { get; set; }
}
}

1
Models/ScpEntity/V_MPO_PRINT.cs

@ -34,6 +34,7 @@
public string GLACCTNODES { get; set; }
public string COSTCENTERDES { get; set; }
public string CType_DESC { get; set; }
public string PURDOCITEMNO { get; set; }
}
}

2
Models/ScpEntity/V_TB_MPO.cs

@ -56,6 +56,8 @@ namespace CK.SCP.Models.ScpEntity
public DateTime DocDateEnd { get; set; }
[NotMapped]
public List<string> UserInVendIds { get; set; }
[NotMapped]
public string AcceptStatusSelect { get; set; }
}
}

2
Models/ScpEntity/V_TB_MPO_DETAIL.cs

@ -60,5 +60,7 @@ namespace CK.SCP.Models.ScpEntity
[NotMapped]
public List<string> purdocnolist { get; set; }
public String PURDOCITEMNO { get; set; }
}
}

1
SCP/Views/PlanData/SCP_MPO_DETAIL.aspx

@ -45,6 +45,7 @@
<Columns>
<f:BoundField Width="70px" DataField="CType_DESC" DataFormatString="{0}" HeaderText="是否作废" />
<f:BoundField Width="100px" DataField="PurdocNO" HeaderText="订单号" DataFormatString="{0}"/>
<f:BoundField Width="100px" DataField="PURDOCITEMNO" HeaderText="行号" DataFormatString="{0}"/>
<f:BoundField Width="100px" DataField="PurchaseReqNO" HeaderText="申请单号" DataFormatString="{0}"/>
<f:BoundField Width="100px" DataField="State_DESC" HeaderText="状态" DataFormatString="{0}"/>
<f:BoundField Width="80px" DataField="ProposerDesc" HeaderText="申请人" DataFormatString="{0}"/>

13
SCP/Views/PlanData/SCP_PO_MATERIAL.aspx

@ -51,6 +51,19 @@
<f:TextBox runat="server" Label="订单号" EmptyText="" ID="TXT_PurdocNO" />
<f:DatePicker runat="server" Required="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_StartDate" />
<f:DatePicker runat="server" Required="true" DateFormatString="yyyy-MM-dd" Label="至" EmptyText="请选择日期" ID="DP_EndDate" />
<f:DropDownList runat="server" ID="DDL_State" Label="状态">
<f:ListItem Text="请选择状态" Value="" />
<f:ListItem Text="待确认" Value="0" />
<f:ListItem Text="供应商已确认" Value="1" />
<f:ListItem Text="作废" Value="-1" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<Items>
<f:TextBox runat="server" Label="创建人" EmptyText="" ID="TXT_CreatedByDesc" />
<f:TextBox runat="server" Label="供应商编码" EmptyText="" ID="TXT_VendorNO" />
<f:TextBox runat="server" Label="供应商描述" EmptyText="" ID="TXT_VendorDesc" />
</Items>
</f:FormRow>
<f:FormRow runat="server">

27
SCP/Views/PlanData/SCP_PO_MATERIAL.aspx.cs

@ -7,6 +7,7 @@ using CK.SCP.Controller;
using FineUI;
using System.Text;
using CK.SCP.Models.Enums;
using Microsoft.Ajax.Utilities;
namespace SCP.Views.PlanData
{
@ -54,7 +55,30 @@ namespace SCP.Views.PlanData
{
_entity.DocDateEnd = Convert.ToDateTime(DP_EndDate.SelectedDate);
}
_entity.PurdocNO = TXT_PurdocNO.Text;
if (!string.IsNullOrWhiteSpace(TXT_CreatedByDesc.Text))
{
_entity.CreatedBy = TXT_CreatedByDesc.Text.Trim();
}
if (!string.IsNullOrWhiteSpace(TXT_VendorNO.Text))
{
_entity.VendorNO = TXT_VendorNO.Text.Trim();
}
if (!string.IsNullOrWhiteSpace(TXT_VendorNO.Text))
{
_entity.VendorNO = TXT_VendorNO.Text.Trim();
}
if (!string.IsNullOrWhiteSpace(TXT_VendorDesc.Text))
{
_entity.VendorDesc = TXT_VendorDesc.Text.Trim();
}
if (!string.IsNullOrWhiteSpace(TXT_PurdocNO.Text))
{
_entity.PurdocNO = TXT_PurdocNO.Text.Trim();
}
if (!string.IsNullOrEmpty( DDL_State.SelectedValue))
{
_entity.AcceptStatusSelect = DDL_State.SelectedValue;
}
_entity.UserInVendIds = CurrentUser.VenderList;
SCP_MPO_CONTROLLER.Get_V_TB_MPO_List(_entity, (_ret) =>
{
@ -125,6 +149,7 @@ namespace SCP.Views.PlanData
Dictionary<string, string> cellheader = new Dictionary<string, string>
{
{ "PurdocNO", "订单号" },
{"PURDOCITEMNO","行号" },
{ "PurchaseReqNO", "申请单号" },
{ "ProposerDesc", "申请人" },
{ "OASTATUS", "OA审批状态" },

36
SCP/Views/PlanData/SCP_PO_MATERIAL.aspx.designer.cs

@ -113,6 +113,42 @@ namespace SCP.Views.PlanData
/// </remarks>
protected global::FineUI.DatePicker DP_EndDate;
/// <summary>
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// TXT_CreatedByDesc 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_CreatedByDesc;
/// <summary>
/// TXT_VendorNO 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendorNO;
/// <summary>
/// TXT_VendorDesc 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendorDesc;
/// <summary>
/// BtnClose 控件。
/// </summary>

1
SCP/Views/SupplierData/SCP_MPO_DETAIL.aspx

@ -49,6 +49,7 @@
<Columns>
<f:BoundField Width="70px" DataField="CType_DESC" DataFormatString="{0}" HeaderText="是否作废" />
<f:BoundField Width="100px" DataField="PurdocNO" HeaderText="订单号" DataFormatString="{0}"/>
<f:BoundField Width="100px" DataField="PURDOCITEMNO" HeaderText="行号" DataFormatString="{0}"/>
<f:BoundField Width="100px" DataField="PurchaseReqNO" HeaderText="申请单号" DataFormatString="{0}"/>
<f:BoundField Width="100px" DataField="State_DESC" HeaderText="状态" DataFormatString="{0}"/>
<f:BoundField Width="80px" DataField="ProposerDesc" HeaderText="申请人" DataFormatString="{0}"/>

9
UniApiGroup/Controller/OdbcApiQadController.cs

@ -1668,7 +1668,7 @@ namespace CK.SCP.GrupUniApi.Controller
//});
foreach (var Ditem in _list)
{
var MATERIALORDERDETAILList = sdb.TB_MATERIALORDERS_DETAIL.Where(q => q.PurdocNO == Ditem.PURDOCNO && q.PurchaseReqNO == Ditem.PURCHASEREQNO).ToList();
var MATERIALORDERDETAILList = sdb.TB_MATERIALORDERS_DETAIL.Where(q => q.PurdocNO == Ditem.PURDOCNO && q.PURDOCITEMNO == Ditem.PURDOCITEMNO).ToList();
MATERIALORDERDETAILList.ForEach(p =>
{
p.Ctype = "D";
@ -1764,6 +1764,7 @@ namespace CK.SCP.GrupUniApi.Controller
orderdetail.Ctype = "N";
orderdetail.CostCenterDes = initem.COSTCENTERDES;
orderdetail.StoreLocation = initem.STORELOCATION;
orderdetail.PURDOCITEMNO = initem.PURDOCITEMNO;
InPoDetailList.Add(orderdetail);
}
#endregion
@ -1805,9 +1806,9 @@ namespace CK.SCP.GrupUniApi.Controller
item.Remark = ((int)UniApiState.).ToString();
item.MaxdibatchNO = item.MaxdibatchNO + list.Count;
idb.xxDiMaxes_Po.AddOrUpdate(xxMaxbath.ToArray());
// 按照uid进行更新
sdb.TB_MATERIALORDERS.AddOrUpdate(q=> q.UID, PoList.ToArray());
sdb.TB_MATERIALORDERS_DETAIL.AddOrUpdate(q => q.UID,PoDetailList.ToArray());
// ¸üÐÂ
sdb.TB_MATERIALORDERS.BulkUpdate(PoList);
sdb.TB_MATERIALORDERS_DETAIL.BulkUpdate(PoDetailList);
Console.WriteLine($"更新 一般材料订单 数据:{list.Count}");
}
catch (Exception ex)

2
UniApiGroup/Controller/PoBillNumcontroller.cs

@ -154,7 +154,7 @@ namespace CK.SCP.UniApi.Controller
public string ESTIMATEDPRICEINDIC { get; set; }
public string PROPOSERID { get; set; }
public int? PURDOCHEADERID { get; set; }
public int? PURDOCITEMID { get; set; }
public int PURDOCITEMID { get; set; }
public string DISPLANTLOCATION { get; set; }
public DateTime? PRICONFIDATE { get; set; }
public string ACTDELIVLOCA { get; set; }

Loading…
Cancel
Save