仓位及仓位值集-学习笔记
学习路径
一、实际的业务需求
二、产品功能的设计和实现方式
三、结合实际业务场景使用系统功能
四、二次开发案例
一、实际的业务需求
仓位值集业务使用场景:【如何设置仓库、仓位值集?】
二、产品功能的设计和实现方式
仓位是维度关联字段类型,即弹性域:仓位的维度支持动态扩展
从仓位值集相关表的结构和关联关系
参考文章:
常用的一些查询和多语言:
值集列表
SELECT T1.FNUMBER AS 仓位值集编码, T2.FNAME AS 仓位值集名称, T1.FFLEXNUMBER AS 维度Key FROM T_BAS_FLEXVALUES T1
JOIN T_BAS_FLEXVALUES_L T2 ON T1.FID = T2.FID
ORDER BY T1.FNUMBER
其中FFLEXNUMBER:维度Key 对应为BOS中的"值集资料维度数据",FormId: BD_FLEXVALUESDETAIL_EXTEND, 查找,
仓位值列表
SELECT T3.FID, T3.FNUMBER AS 仓位值集编码, T4.FNAME AS 仓位值集名称, T1.FENTRYID, T1.FNUMBER AS 仓位值编码, T2.FNAME AS 仓位值名称 FROM T_BAS_FLEXVALUESENTRY T1 JOIN T_BAS_FLEXVALUESENTRY_L T2 ON T1.FENTRYID = T2.FENTRYID JOIN T_BAS_FLEXVALUES T3 ON T1.FID = T3.FID JOIN T_BAS_FLEXVALUES_L T4 ON T4.FID = T3.FID ORDER BY T1.FNUMBER
启用仓位管理的仓库列表
SELECT T1.FNUMBER, T2.FNAME, T1.FISOPENLOCATION FROM T_BD_STOCK T1 JOIN T_BD_STOCK_L T2 ON T1.FSTOCKID = T2.FSTOCKID WHERE FISOPENLOCATION = 1 ORDER BY T1.FNUMBER
仓库启用仓位的值集维度
SELECT T2.FSTOCKID, T2.FNUMBER, T3.FNAME, T1.FFLEXID 仓位值集内码, T1.* FROM T_BD_STOCKFLEXITEM T1 JOIN T_BD_STOCK T2 ON T1.FSTOCKID = T2.FSTOCKID JOIN T_BD_STOCK_L T3 ON T2.FSTOCKID = T3.FSTOCKID WHERE T2.FSTOCKID = 140734 ORDER BY T2.FSTOCKID
仓库启用仓位的值维度
SELECT T2.FSTOCKID, T2.FNUMBER, T3.FNAME, T4.FFLEXENTRYID AS 仓位值内码, T41.FNUMBER 仓位值编码, T41L.FNAME 仓位值名称, T1.FFLEXID 仓位值集维度内码,T31.FNUMBER 仓位值集编码,T31L.FNAME 仓位值集名称 FROM T_BD_STOCKFLEXITEM T1 JOIN T_BD_STOCKFLEXDETAIL T4 ON T1.FENTRYID = T4.FENTRYID JOIN T_BAS_FLEXVALUES T31 ON T1.FFLEXID = T31.FID JOIN T_BAS_FLEXVALUES_L T31L ON T31L.FID = T31.FID JOIN T_BAS_FLEXVALUESENTRY T41 ON T4.FFLEXENTRYID = T41.FENTRYID JOIN T_BAS_FLEXVALUESENTRY_L T41L ON T41L.FENTRYID = T41.FENTRYID JOIN T_BD_STOCK T2 ON T1.FSTOCKID = T2.FSTOCKID JOIN T_BD_STOCK_L T3 ON T2.FSTOCKID = T3.FSTOCKID WHERE T2.FSTOCKID = 140734 ORDER BY T2.FSTOCKID
获取仓库可以选用的仓位内码(值集组合)(该内码可以在直接填写到业务单据的仓位字段)
SELECT S1.FSTOCKID, S1.FNUMBER,S2.FNAME,S3.FSTOCKLOCID FROM T_BD_STOCK AS S1 INNER JOIN T_BD_STOCK_L AS S2 ON S2.FSTOCKID = S1.FSTOCKID AND S2.FLOCALEID = 2052 INNER JOIN T_BD_FLEXVALUESCOM S3 ON S3.FSTOCKID =S1.FSTOCKID ORDER BY S1.FSTOCKID
三、结合实际业务场景使用系统功能
示例仓库: 名称: 仓位组合, 启用仓位管理
仓位值集 仓位值
编码 名称 编码-名称
10 区 (10-A、20-B)
20 位 (2-2、4-4、5-5)
"仓位组合"这个仓库的仓位值包括:区(A、B、C),位(2、4、5),仓位为:A区.2位、A区.4位、A区.5位、B区.2位、B区.4位、B区.5位,共 2 * 3 = 6 个仓位值
当仓库选择多个仓位值集,并且每个仓位值集都设置了仓位值,那么保存时,会自动生成仓位值组合(表:T_BD_STOCKFLEXITEM、T_BAS_FLEXVALUESDETAIL),值组合总数(笛卡尔乘积)等于仓位集1的仓位值数 * 仓位值集2的仓位值数
仓位值不录入,即仓位值不采用组合方式,则在单据录入每个仓位值集的具体数据
组合方式、非组合方式
仓位的选择有两种模式:固定列和弹出框
【如何修改仓位组合的显示格式】显示格式:编码,名称,编码+名称
四、二次开发案例
-- 待更新完善
仓位及仓位值集-学习笔记
本文2024-09-16 17:17:33发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-14765.html