Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
my-awesome-project
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0ccc9f5f
authored
Jun 27, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
guide
parent
39be1b02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
data.txt
data.txt
0 → 100644
View file @
0ccc9f5f
```sql
CREATE TABLE `lie_shipping_intermediate_data` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`source_type` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '来源类型 1-入库明细 2-委托单',
`source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '来源id',
`kingdee_sales_order_no` varchar(64) NOT NULL DEFAULT '' COMMENT '金蝶销售单号',
`purchase_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '采购单号',
`kingdee_purchase_order_no` varchar(64) NOT NULL DEFAULT '' COMMENT '金蝶采购单号',
`goods_id` mediumint(8) unsigned NOT NULL COMMENT '商品ID',
`goods_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '商品编码',
`goods_name` varchar(128) NOT NULL DEFAULT '' COMMENT '商品型号',
`brand_id` mediumint(6) unsigned NOT NULL DEFAULT '0' COMMENT '品牌ID',
`brand_name` varchar(128) NOT NULL DEFAULT '' COMMENT '品牌',
`company_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '采购组织ID 采购组织ID 1猎芯-含税 2深茂电子-不含税',
`company_name` varchar(128) NOT NULL DEFAULT '' COMMENT '采购组织名称',
`supplier_id` mediumint(6) unsigned NOT NULL DEFAULT '0' COMMENT '供应商ID',
`supplier_name` varchar(128) NOT NULL DEFAULT '' COMMENT '供应商名称',
`warehouse_receipt_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '入仓单号',
`in_qty` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '入库数量',
`out_qty` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发货数量',
`stock_in_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0-待入库 1-部分入库 2-全部入库',
`create_name` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人',
`shipping_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '物流id',
`create_uid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '创建人UID',
`shipment_number` varchar(512) NOT NULL DEFAULT '' COMMENT '物流单号',
`shipping_name` varchar(64) NOT NULL DEFAULT '' COMMENT '物流公司',
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`purchase_uid` mediumint(5) unsigned NOT NULL DEFAULT '0' COMMENT '采购员UID',
`purchase_name` varchar(32) NOT NULL DEFAULT '' COMMENT '采购员名字',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='物流中间表数据';
```
## 数据来源
- lie_stock_in和lie_stock_in_items //入库
- 根据`stock_in_id`关联
- 只取 `stock_in_type` in (1,2) 的数据
- lie_scm_order //委托单
## 监听表新增/初始化
- lie_stock_in和lie_stock_in_items
- lie_scm_order
## 监听表变动
- lie_stock_in
- status
- shipping_name
- shipment_number
- shipping_id
- lie_stock_in_items
- out_qty
- in_qty
## 其他字段来源
- kingdee_sales_order_no->`lie_frq`表的`erp_sn`
- 关联frq的逻辑
- lie_scm_order需要先根据`purchase_item_id`关联`lie_purchase_items`表的`purchase_item_id`,获得表`lie_purchase_items`里面的`frq_id`,再根据`frq_id`关联 `lie_frq`表
- lie_stock_in_items 直接根据frq_id 关联`lie_frq`表
- purchase_sn->`lie_purchase_order`表的`purchase_sn`
- 2者都根据`purchase_id`关联`lie_purchase_order`表的`purchase_id`
- kingdee_purchase_order_no->`lie_purchase_order`表的`erp_purchase_sn`
- 2者都根据`purchase_id`关联`lie_purchase_order`表的`purchase_id`
- company_id->`lie_purchase_order`表的`company_id`
- 2者都根据`purchase_id`关联`lie_purchase_order`表的`purchase_id`
- company_name->`lie_purchase_order`表的`company_name`
- 2者都根据`purchase_id`关联`lie_purchase_order`表的`purchase_id`
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment