内容标题37

  • <tr id='Ce0nNH'><strong id='Ce0nNH'></strong><small id='Ce0nNH'></small><button id='Ce0nNH'></button><li id='Ce0nNH'><noscript id='Ce0nNH'><big id='Ce0nNH'></big><dt id='Ce0nNH'></dt></noscript></li></tr><ol id='Ce0nNH'><option id='Ce0nNH'><table id='Ce0nNH'><blockquote id='Ce0nNH'><tbody id='Ce0nNH'></tbody></blockquote></table></option></ol><u id='Ce0nNH'></u><kbd id='Ce0nNH'><kbd id='Ce0nNH'></kbd></kbd>

    <code id='Ce0nNH'><strong id='Ce0nNH'></strong></code>

    <fieldset id='Ce0nNH'></fieldset>
          <span id='Ce0nNH'></span>

              <ins id='Ce0nNH'></ins>
              <acronym id='Ce0nNH'><em id='Ce0nNH'></em><td id='Ce0nNH'><div id='Ce0nNH'></div></td></acronym><address id='Ce0nNH'><big id='Ce0nNH'><big id='Ce0nNH'></big><legend id='Ce0nNH'></legend></big></address>

              <i id='Ce0nNH'><div id='Ce0nNH'><ins id='Ce0nNH'></ins></div></i>
              <i id='Ce0nNH'></i>
            1. <dl id='Ce0nNH'></dl>
              1. <blockquote id='Ce0nNH'><q id='Ce0nNH'><noscript id='Ce0nNH'></noscript><dt id='Ce0nNH'></dt></q></blockquote><noframes id='Ce0nNH'><i id='Ce0nNH'></i>

                如何解决多行分录一起下推生成检验单分单情况下,部分检验单质检 …

                说明:检验单上质检员赋值顺序:(1)物料维护质检员且检验单单据类型参数为按质检员分单时,检验单质检员取物料质检员? ;(2)物料不维护质检员或者单据类型参数不为按质检员分单的情况下,检验单质检员取当前登录用户绑定的质检员;

                问题描述:检验单单据类型参数“分单依据”不为按质检员分单或物料未维护质检员的情况下∮,多行检验单上游单据分录一起下推检验单,满足单据转换规则中设置的分单依据时,下推生成的多张检验单中部分检验单质检员为空,此时想要实现质检员设置为当前用户绑定的质检员;

                解决方案:二开单据转换插件,挂在标准产品下推检验单的单据转换规则插件之后,示例代码如下:

                using?Kingdee.BOS.Core;?
                using?Kingdee.BOS.Core.Metadata.ConvertElement.PlugIn.Args;
                using?Kingdee.K3.Core.MFG.EnumConst;?
                using?Kingdee.K3.MFG.App.ConvertPlugIn;
                using?System;?
                using?System.Collections.Generic;
                using?System.Linq;?using?System.Text;?
                using?Kingdee.K3.Core.MFG.EntityHelper;?
                using?Kingdee.K3.MFG.App;?
                using?Kingdee.K3.BD.Contracts;?
                using?Kingdee.BOS.Orm.DataEntity;?
                namespace?Kingdee.K3.MFG.QM.App.BillConvertServicePlugIn.ToInspect?
                {?
                ???public?class?test?:?BaseBillConvertServicePlugIn?
                ???{?
                ?????public?override?void?AfterConvert(AfterConvertEventArgs?e)?
                ?????{?
                ???????base.AfterConvert(e);?
                ???????ExtendedDataEntity[]?billHeads?=?e.Result.FindByEntityKey(CONST_QM_InspectBill.CONST_FBillHead.ENTITY_FBillHead);?
                ???????DynamicObject[]?newDatas?=?billHeads.Select(s?=>?s.DataEntity).ToArray();?
                ???????foreach(ExtendedDataEntity?billHead?in?billHeads)?
                ???????{?
                ?????????long?inspectorId?=?billHead.DataEntity.GetDynamicValue<long>(CONST_QM_InspectBill.CONST_FBillHead.ORM_InspectorId_Id);?
                ?????????if?(inspectorId?<=?0)?
                ?????????{?
                ???????????long?inspectOrgId?=?billHead.DataEntity.GetDynamicValue<long>(CONST_QM_InspectBill.CONST_FBillHead.ORM_InspectOrgId_Id);
                ???????????inspectorId?=?AppServiceContext.GetService<IStaffService>().GetUserOperatorId(this.Context,?this.Context.UserId,?inspectOrgId,?"ZJY");
                ???????????billHead.DataEntity.SetDynamicObjectItemValue(CONST_QM_InspectBill.CONST_FBillHead.ORM_InspectorId_Id,?inspectorId);?
                ?????????}?
                ???????}
                ???????AppServiceContext.DBService.LoadReferenceObject(this.Context,?newDatas.ToArray(),?newDatas.FirstOrDefault().DynamicObjectType);
                ?????}
                ???}
                }


                admin
                admin管理员

                上一篇:【工作流二开】插件开发系列3:自定义参与人插件
                下一篇:V7.6 采购管理主要新增功能说明

                留言评论

                暂无留言
                取消
                扫码支持