生产用料清单下推领料单拣货时不考虑货主
1、二开生产用料清单的保存插件,清空货主和货主类型
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.BOS.Util;
using Kingdee.K3.Core.MFG.EntityHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.K3.MFG.App;
using Kingdee.BOS.Orm;
using Kingdee.BOS.Core.List;
using Kingdee.K3.Core.MFG.EnumConst;
namespace EK.Kingdee.K3.MFG.PRD.App.ServicePlugIn
{
[Description("生产订单保存生成用料清单,清空货主类型和货主")]
public class PPBomSave : AbstractOperationServicePlugIn
{
public override void BeginOperationTransaction(global::Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeginOperationTransactionArgs e)
{
base.BeginOperationTransaction(e);
if (e.DataEntitys.IsEmpty()) return;
foreach (var datatity in e.DataEntitys)
{
DynamicObjectCollection entryDatas = datatity.GetDynamicValue<DynamicObjectCollection>("PPBomEntry");
foreach (var item in entryDatas)
{
//清空货主类型和货主
item.SetDynamicObjectItemValue(CONST_PRD_PPBOM.CONST_FEntity.ORM_OwnerID_Id, 0);
item.SetDynamicObjectItemValue(CONST_PRD_PPBOM.CONST_FEntity.ORM_OwnerTypeId, string.Empty);
}
}
}
}
}
2、第二种解决办法:生产用料清单到生产领料单的批号拣货服务,货主类型、货主的过滤去掉
生产用料清单下推领料单拣货时不考虑货主
本文2024-09-23 03:22:45发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-158477.html