生产订单下推调拨申请单二开配置内码不存在,选单条件: FID IN (100020)

客户需求生产任务单下推调拨申请单,将仓库物料先调拨到车间仓前走申请,在bos配置了生产用料清单和生产订单下推调拨申请单转换规则

但是在实际下推时,使用生产用料清单下推可以正常下推调拨申请单,用生产订单下推调拨申请单会报错提示选单条件: FID IN (100020)

在论坛找了下是需要第三方下推,如何理解:
如生产用料清单可以直接下推调拨申请单,现在要使用生产订单下推调拨申请单,其实就是下推关系的替换,通过生产订单找到生产用料清单的内码,做到生产用料清单下推调拨申请单,这样的下推称为第三方,官方文档说明生产订单第三方下推 (kingdee.com)
按照文档自己写了下列表和表单的下推插件
表单里面下推:ProductionOrderPushProduction.dll

using System.Collections.Generic;
using System.Linq;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.List;
using Kingdee.BOS.Core.List.PlugIn.Args;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.K3.MFG.SUB.Business.PlugIn;
using Kingdee.K3.MFG.ServiceHelper.PRD;
using System.ComponentModel;
using Kingdee.K3.Core.MFG.EntityHelper;
using Kingdee.BOS.Util;
namespace ProductionOrderPushProductionBaseControlList
{
[Description("生产订单列表下推调拨申请单")]
[HotUpdate]
public class Class1 : BaseControlEdit
/*
*
* BaseControlEdit 表单
* BaseControlList列表
*/
{
/// <summary>
/// 采用第三方下推,需要把源单内码调整为PPBom的内码
/// </summary>
/// <param name="e"></param>
public override void OnTargetBillChanged(TargetBillChangedEventArgs e)
{
base.OnTargetBillChanged(e);
if (e.ConvertOperation == FormOperationEnum.Push
&& (e.TargetFormId==("STK_TRANSFERAPPLY")))
/*&& (e.TargetFormId.EqualsIgnoreCase("STK_TRANSFERAPPLY"))) */
/*STK_TRANSFERAPPLY是调拨申请单的formid*/
{
List<long> moEntryIds = null;
bool isEnityKey = GetSelectRowsKeyList(e.SelectedRows, out moEntryIds);
List<long> ppBomEntrykeys = PPBOMServiceHelper.GetPPBOMEntryIdesByMOEntryID(this.Context, moEntryIds, isEnityKey);
if (ppBomEntrykeys.Count <= 0) return;
DynamicObjectCollection ppBomDatas = PPBOMServiceHelper.GetPPBomEntityForSort(this.Context, ppBomEntrykeys);
var sortDatas = ppBomDatas.OrderBy(o => o.GetDynamicValue<string>("FMOID")).ThenBy(o => o.GetDynamicValue<string>("FMOENTRYID")).ThenBy(o => o.GetDynamicValue<int>("FSEQ")).ToList();
List<ListSelectedRow> PPBomRows = new List<ListSelectedRow>();
foreach (DynamicObject ppBomDat in sortDatas)
{
PPBomRows.Add(new ListSelectedRow(ppBomDat.GetDynamicValue<string>("FID"), ppBomDat.GetDynamicValue<string>("FENTRYID"), 0, "PRD_PPBOM") { EntryEntityKey = "FEntity" });
}
// 把源单内码替换为PPBom的内码
e.SelectedRows = PPBomRows.ToArray();
}
}
}
}列表下推:ProductionOrderPushProductionBaseControlList.dll

using System.Collections.Generic;
using System.Linq;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.List;
using Kingdee.BOS.Core.List.PlugIn.Args;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.K3.MFG.SUB.Business.PlugIn;
using Kingdee.K3.MFG.ServiceHelper.PRD;
using System.ComponentModel;
using Kingdee.K3.Core.MFG.EntityHelper;
using Kingdee.BOS.Util;
namespace ProductionOrderPushProductionBaseControlList
{
[Description("生产订单列表下推调拨申请单")]
[HotUpdate]
public class Class1 : 生产订单下推调拨申请单二开配置内码不存在,选单条件: FID IN (100020)
客户需求生产任务单下推调拨申请单,将仓库物料先调拨到车间仓前走申请,在bos配置了生产用料清单和生产订单下推调拨申请单转换规则但是在...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



