找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 221|回复: 0

材料出库单补料选生产加工单选不到产品

[复制链接]
发表于 2023-5-29 20:37:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
T+-生产管理

               
                    材料出库单补料选生产加工单选不到产品
问题现象:
材料出库单业务类型为生产补料,选择生产加工单时,产品明细选不到某个产品,过滤条件中也勾选了包含已执行完领料。
见下图,生产加工单产品明细有22行,材料出库单选择生产加工单时产品明细只有21行,
经过查看缺少的产品明细是00020013

                               
登录/注册后可看大图



                               
登录/注册后可看大图

问题分析:
1、用事件探查跟踪器跟踪完后复制下面跟踪过后的脚本到数据库中执行。

                               
登录/注册后可看大图

select  TOP 10000 [ManufactureOrderDetail].isManualFinish, [ManufactureOrderDetail.ManufactureOrder].code AS
ManufactureOrderDetail_ManufactureOrder_Code,[ManufactureOrderDetail.Inventory].code AS
ManufactureOrderDetail_Inventory_Code,[ManufactureOrderDetail.Inventory].name AS ManufactureOrderDetail_Inventory_Name,[ManufactureOrderDetail].freeItem0 AS ManufactureOrderDetail_freeItem0,[ManufactureOrderDetail].freeItem1 AS ManufactureOrderDetail_freeItem1,[ManufactureOrderDetail].freeItem2 AS ManufactureOrderDetail_freeItem2,[Inventory].code AS Inventory_Code,[Inventory].name AS Inventory_Name,[Inventory].specification AS Inventory_Specification,[SubstituteMainInventory].code AS SubstituteMainInventory_Code,[SubstituteMainInventory].name AS SubstituteMainInventory_Name,[ManufactureOrderMaterialDetailDTO].freeItem0 AS freeItem0,[ManufactureOrderMaterialDetailDTO].freeItem1 AS freeItem1,[ManufactureOrderMaterialDetailDTO].freeItem2 AS freeItem2,[Process].name AS Process_Name,[Unit].name AS Unit_Name,[ManufactureOrderMaterialDetailDTO].quantity AS Quantity,[ManufactureOrderMaterialDetailDTO].totalRequisitionedQuantity AS TotalRequisitionedQuantity,[ManufactureOrderMaterialDetailDTO].totalAdditionalMaterialQuantity AS TotalAdditionalMaterialQuantity,case when [ManufactureOrderMaterialDetailDTO].quantity-IsNull([ManufactureOrderMaterialDetailDTO].totalRequisitionedQuantity,0)
IdmanufactureOrderDetailDTO,[ManufactureOrderMaterialDetailDTO].voucherId AS VoucherId,[ManufactureOrderDetail].code AS ManufactureOrderDetail_Code,[ManufactureOrderMaterialDetailDTO].code AS Code,[Inventory].id as Inventory_id,[Unit].id as Unit_id,[ManufactureOrderDetail].id as ManufactureOrderDetail_id,[ManufactureOrderDetail.Inventory].id as ManufactureOrderDetail_Inventory_id,[ManufactureOrderDetail.ManufactureOrder].id as ManufactureOrderDetail_ManufactureOrder_id,[Process].id as Process_id,[SubstituteMainInventory].id as SubstituteMainInventory_id
from [MP_ManufactureOrder_Material] [ManufactureOrderMaterialDetailDTO]
  LEFT OUTER JOIN [V_AA_Inventory] [Inventory] on [ManufactureOrderMaterialDetailDTO].idinventory=[Inventory].id
LEFT OUTER JOIN [AA_Unit] [Unit] on [ManufactureOrderMaterialDetailDTO].idunit=[Unit].id
LEFT OUTER JOIN [MP_ManufactureOrder_b] [ManufactureOrderDetail] on [ManufactureOrderMaterialDetailDTO].idManufactureOrderDetailDTO=[ManufactureOrderDetail].id
LEFT OUTER JOIN [V_AA_Inventory] [ManufactureOrderDetail.Inventory] on [ManufactureOrderDetail].idinventory=[ManufactureOrderDetail.Inventory].id
LEFT OUTER JOIN [MP_ManufactureOrder] [ManufactureOrderDetail.ManufactureOrder] on [ManufactureOrderDetail].idManufactureOrderDTO=[ManufactureOrderDetail.ManufactureOrder].id
LEFT OUTER JOIN [AA_Department] [ManufactureOrderDetail.ManufactureOrder.Department] on [ManufactureOrderDetail.ManufactureOrder].iddepartment=[ManufactureOrderDetail.ManufactureOrder.Department].id
LEFT OUTER JOIN [AA_Process] [Process] on [ManufactureOrderMaterialDetailDTO].idProcess=[Process].id
LEFT OUTER JOIN [V_AA_Inventory] [SubstituteMainInventory] on [ManufactureOrderMaterialDetailDTO].idSubstituteMainInventory=[SubstituteMainInventory].id
where  1=1 And (([ManufactureOrderDetail.Inventory].Code>= N'00020013' AND [ManufactureOrderDetail.Inventory].Code
And ([ManufactureOrderDetail.ManufactureOrder].Code>= N'MO-2022-09-0002' AND [ManufactureOrderDetail.ManufactureOrder].Code
AND [ManufactureOrderDetail.ManufactureOrder.Department].Disabled = 0 AND [ManufactureOrderDetail.Inventory].Disabled = 0
AND isnull([ManufactureOrderDetail].isManualFinish,0)  1
AND [Inventory].Disabled = 0
AND isnull(ManufactureOrderMaterialDetailDTO.TotalDispatchingCount,0)
AND ISNULL(ManufactureOrderMaterialDetailDTO.SubstituteGroupID, N'') =  N'' AND IsNull(ManufactureOrderMaterialDetailDTO.IsInvertedMaterial,0) = 0
AND 1=1 order by [ManufactureOrderDetail.ManufactureOrder].Code,[ManufactureOrderDetail].Code,ManufactureOrderMaterialDetailDTO.Code
2、执行发现是语句isnull([ManufactureOrderDetail].isManualFinish,0)  1 引起的问题。
3、执行下面语句查询该字段在软件中代表的字段意思,可以发现该字段表示的是【是否手动完工】
select*from eap_DTOProperty where Name='isManualFinish'

                               
登录/注册后可看大图


[ol]
  • 在软件中生产加工但单产品明细勾选显示手动完工字段,可以看到产品00020013已手动完工,所以在生产补料时选不到。[/ol]

                                   
    登录/注册后可看大图

    解决方案:
    1、取消生产加工单上该产品手工完工的勾选
  • 您需要登录后才可以回帖 登录 | 注册账号

    本版积分规则

    QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

    GMT+8, 2024-12-22 12:09 , Processed in 0.052659 second(s), 9 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表