# `sgdsemigoodsmatchbillmaterials`

> 工单材料表


- **Engine:** InnoDB
- **Collation:** utf8mb3_general_ci

## Columns

| # | Name | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | `iIncrement` | `int` | NO | PRI |  | auto_increment | 自增列 |
| 2 | `sId` | `varchar(100)` | NO | MUL |  |  | 唯一ID |
| 3 | `sBrandsId` | `varchar(100)` | NO |  |  |  | 加工商ID |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |  |  |  | 子公司ID |
| 5 | `iOrder` | `int` | NO |  | 0 |  | 排序号 |
| 6 | `sParentId` | `varchar(100)` | NO |  |  |  | 父级ID |
| 7 | `sType` | `varchar(255)` | NO |  |  |  | 类型（0-部件材料、1-部件辅料、2-成品材料） |
| 8 | `sMaterialsId` | `varchar(100)` | NO |  |  |  | 材料ID |
| 9 | `sMaterialsStyle` | `varchar(255)` | NO |  |  |  | 材料规格 |
| 10 | `dAuxiliaryQty` | `decimal(18,6)` | NO |  |  |  | 数量 |
| 11 | `sAuxiliaryUnit` | `varchar(255)` | NO |  |  |  | 材料单位 |
| 12 | `dMaterialsQty` | `decimal(18,6)` | NO |  |  |  | 换算数量 |
| 13 | `iReelPaper` | `int` | NO |  | 0 |  | 卷筒按张算 |
| 14 | `dConversionQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 预留数量 |
| 15 | `dCostMaterialsPrice` | `decimal(18,6)` | NO |  | 0.000000 |  | 成本价格 |
| 16 | `dCostMaterialsMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 成本金额 |
| 17 | `dMaterialsPrice` | `decimal(18,6)` | NO |  | 0.000000 |  | 材料价格 |
| 18 | `dMaterialsMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 材料金额 |
| 19 | `dMaterialsKQty` | `decimal(18,6)` | NO |  | 1.000000 |  | 材料开数 |
| 20 | `bPurchaseApplyComplete` | `bit(1)` | NO |  | b'0' |  | 采购申请强制完工 |
| 21 | `dPurchaseApplyAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 采购申请数量 |
| 22 | `dPurchaseApplyQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 采购申请换算数量 |
| 23 | `bPurchaseComplete` | `bit(1)` | NO |  | b'0' |  | 未清采购强制完工 |
| 24 | `dPurchaseAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 采购订单反写数量 |
| 25 | `dPurchaseQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 采购订单反写换算数量 |
| 26 | `dProductionAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 生产领料反写数量 |
| 27 | `dProductionQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 生产领料反写换算数量 |
| 28 | `bProductionComplete` | `bit(1)` | NO |  | b'0' |  | 未清生产领料强制完工 |
| 29 | `bComMaterials` | `bit(1)` | NO |  | b'0' |  | 是否来料 |
| 30 | `bOutsideBandMaterials` | `bit(1)` | NO |  | b'0' |  | 是否发外带料 |
| 31 | `sProcessId` | `varchar(100)` | NO |  |  |  | 工序ID |
| 32 | `sProcessTbId` | `varchar(100)` | NO |  |  |  | 源单的工序表Id |
| 33 | `sSelectProcess` | `varchar(255)` | NO |  |  |  | 手动选择工序后赋值此字段 |
| 34 | `sSrcId` | `varchar(100)` | NO |  |  |  | 材料表复制部件时源单Id |
| 35 | `sMaterialsMemo` | `text` | YES |  |  |  | 材料信息 |
| 36 | `sAReserve1` | `varchar(255)` | YES |  |  |  | 预留字符1 |
| 37 | `sAReserve2` | `varchar(255)` | YES |  |  |  | 预留字符2 |
| 38 | `sAReserve3` | `varchar(255)` | YES |  |  |  | 预留字符3 |
| 39 | `sAReserve4` | `varchar(255)` | YES |  |  |  | 预留字符4 |
| 40 | `sAReserve5` | `varchar(255)` | YES |  |  |  | 预留字符5 |
| 41 | `sAReserve6` | `varchar(255)` | YES |  |  |  | 预留字符6 |
| 42 | `dAReserve1` | `decimal(18,6)` | YES |  |  |  | 预留数字1 |
| 43 | `dAReserve2` | `decimal(18,6)` | YES |  |  |  | 预留数字2 |
| 44 | `dAReserve3` | `decimal(18,6)` | YES |  |  |  | 预留数字3 |
| 45 | `iAReserve1` | `int` | YES |  |  |  | 预留整型1 |
| 46 | `iAReserve2` | `int` | YES |  |  |  | 预留整型2 |
| 47 | `iAReserve3` | `int` | YES |  |  |  | 预留整型3 |
| 48 | `tAReserve1` | `datetime` | YES |  |  |  | 预留日期1 |
| 49 | `tAReserve2` | `datetime` | YES |  |  |  | 预留日期2 |
| 50 | `bComComplete` | `bit(1)` | NO |  | b'0' |  | 来料强制完工 |
| 51 | `dComAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 来料反写数量 |
| 52 | `dComQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 来料换算数量 |
| 53 | `bCutComplete` | `bit(1)` | NO |  | b'0' |  | 分切强制完工 |
| 54 | `dCutAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 分切数量 |
| 55 | `dCutQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 分切换算数量 |
| 56 | `bMarginalComplete` | `bit(1)` | NO |  | b'0' |  | 边角料强制完工 |
| 57 | `dMarginalAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 边角料数量 |
| 58 | `dMarginalQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 边角料换算数量 |
| 59 | `bNotAuto` | `bit(1)` | NO |  | b'0' |  | 是否自动计算 |
| 60 | `sMakePerson` | `varchar(255)` | NO |  |  |  | 制单人 |
| 61 | `tCreateDate` | `datetime` | NO |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 制单日期 |
| 62 | `sSrcControlId` | `varchar(100)` | NO |  |  |  | 源单控制表Id |
| 63 | `sSrcMaterialsTbId` | `varchar(100)` | NO |  |  |  | 源单材料表Id |
| 64 | `bPlanMaterialCheck` | `bit(1)` | NO |  | b'0' |  | 材料检验 |
| 65 | `bPlanMaterialCheckResult` | `bit(1)` | NO |  | b'0' |  | 材料检验结果 |
| 66 | `dCheckQty` | `decimal(18,6)` | YES |  |  |  | 材料稽查数量 |
| 67 | `dMaterialsWorkAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 材料加工单反写数量 |
| 68 | `dMaterialsWorkQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 材料加工单反写换算数量 |

## Indexes

| Name | Unique | Type | Columns |
|---|---|---|---|
| `IndexN_mftworkordermaterials` |  | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId`, `sParentId` |
| `IndexU_mftworkordermaterials` | ✓ | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId` |
| `PRIMARY` | ✓ | BTREE | `iIncrement` |

## Narrative

_No human-written narrative yet — when this table is exercised by a [vertical slice](../../slices/index.md), link from there back to this page._
