# `viw_hmwxjy3`（视图）


- **是否可更新：** NO
- **定义者：** `xlyprint@%`

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `sid` | `varchar(100)` | NO |
| 2 | `iorder` | `int` | NO |
| 3 | `sSrcNo` | `varchar(255)` | NO |
| 4 | `sCustomerName` | `varchar(255)` | NO |
| 5 | `sBillNo` | `varchar(255)` | NO |
| 6 | `sProductName` | `varchar(100)` | NO |
| 7 | `dAuxiliaryQty` | `decimal(18,6)` | NO |
| 8 | `已确认数` | `decimal(40,6)` | YES |
| 9 | `sProcessName` | `varchar(100)` | NO |
| 10 | `规格` | `varchar(255)` | NO |
| 11 | `sAuxiliaryUnit` | `varchar(255)` | NO |
| 12 | `dMaterialsPrice` | `decimal(18,6)` | NO |
| 13 | `dMaterialsMoney` | `decimal(40,6)` | YES |
| 14 | `sName` | `varchar(255)` | NO |
| 15 | `dMaterialsNoTaxPrice` | `decimal(18,6)` | YES |
| 16 | `dMaterialsNoTaxMoney` | `decimal(18,6)` | YES |
| 17 | `dMaterialsTaxMoney` | `decimal(18,6)` | YES |
| 18 | `bCopyLimit` | `bit(1)` | NO |
| 19 | `bCheck` | `bit(1)` | NO |
| 20 | `bInStoreComplete` | `bit(1)` | NO |
| 21 | `tCreateDate` | `datetime` | NO |
| 22 | `sSupplyId` | `varchar(100)` | NO |
| 23 | `sCustomerId` | `varchar(100)` | NO |
| 24 | `sProductId` | `varchar(100)` | NO |
| 25 | `sProcessId` | `varchar(100)` | NO |
| 26 | `sPurchaseManId` | `varchar(100)` | YES |
| 27 | `sGetPayId` | `varchar(100)` | YES |
| 28 | `sSrcSlaveId` | `varchar(100)` | NO |
| 29 | `sFormId` | `varchar(100)` | NO |
| 30 | `sParentId` | `varchar(100)` | NO |
| 31 | `sSrcId` | `varchar(100)` | NO |
| 32 | `sSlaveId` | `varchar(100)` | NO |
| 33 | `sTaxId` | `varchar(100)` | YES |
| 34 | `iTestType` | `int` | NO |

## 定义

```sql
select `wx`.`sid` AS `sid`,`wx`.`iorder` AS `iorder`,`wx`.`sSrcNo` AS `sSrcNo`,`wx`.`sCustomerName` AS `sCustomerName`,`wx`.`sBillNo` AS `sBillNo`,`wx`.`sProductName` AS `sProductName`,`wx`.`dAuxiliaryQty` AS `dAuxiliaryQty`,sum(`wx`.`已确认数`) AS `已确认数`,`wx`.`sProcessName` AS `sProcessName`,`wx`.`规格` AS `规格`,`wx`.`sAuxiliaryUnit` AS `sAuxiliaryUnit`,`wx`.`dMaterialsPrice` AS `dMaterialsPrice`,sum(`wx`.`dMaterialsMoney`) AS `dMaterialsMoney`,`wx`.`sName` AS `sName`,`wx`.`dMaterialsNoTaxPrice` AS `dMaterialsNoTaxPrice`,`wx`.`dMaterialsNoTaxMoney` AS `dMaterialsNoTaxMoney`,`wx`.`dMaterialsTaxMoney` AS `dMaterialsTaxMoney`,`wx`.`bCopyLimit` AS `bCopyLimit`,`wx`.`bCheck` AS `bCheck`,`wx`.`bInStoreComplete` AS `bInStoreComplete`,`wx`.`tCreateDate` AS `tCreateDate`,`wx`.`sSupplyId` AS `sSupplyId`,`wx`.`sCustomerId` AS `sCustomerId`,`wx`.`sProductId` AS `sProductId`,`wx`.`sProcessId` AS `sProcessId`,`wx`.`sPurchaseManId` AS `sPurchaseManId`,`wx`.`sGetPayId` AS `sGetPayId`,`wx`.`sSrcSlaveId` AS `sSrcSlaveId`,`wx`.`sFormId` AS `sFormId`,`wx`.`sParentId` AS `sParentId`,`wx`.`sSrcId` AS `sSrcId`,`wx`.`sSlaveId` AS `sSlaveId`,`wx`.`sTaxId` AS `sTaxId`,`wx`.`iTestType` AS `iTestType` from (select distinct `xlyweberp_saas_ai`.`a`.`sId` AS `sid`,`xlyweberp_saas_ai`.`a`.`iOrder` AS `iorder`,`xlyweberp_saas_ai`.`a`.`工单号` AS `sSrcNo`,`xlyweberp_saas_ai`.`a`.`客户名称` AS `sCustomerName`,`xlyweberp_saas_ai`.`a`.`外协单号` AS `sBillNo`,`xlyweberp_saas_ai`.`a`.`产品名称` AS `sProductName`,`xlyweberp_saas_ai`.`a`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`xlyweberp_saas_ai`.`a`.`已确认数` AS `已确认数`,`xlyweberp_saas_ai`.`a`.`发外工序` AS `sProcessName`,`xlyweberp_saas_ai`.`a`.`规格` AS `规格`,`xlyweberp_saas_ai`.`a`.`采购单位` AS `sAuxiliaryUnit`,`xlyweberp_saas_ai`.`a`.`单价` AS `dMaterialsPrice`,`xlyweberp_saas_ai`.`a`.`金额` AS `dMaterialsMoney`,`xlyweberp_saas_ai`.`a`.`税码` AS `sName`,`xlyweberp_saas_ai`.`a`.`不含税单价` AS `dMaterialsNoTaxPrice`,`xlyweberp_saas_ai`.`a`.`不含税金额` AS `dMaterialsNoTaxMoney`,`xlyweberp_saas_ai`.`a`.`税额` AS `dMaterialsTaxMoney`,`xlyweberp_saas_ai`.`a`.`bCopyLimit` AS `bCopyLimit`,`xlyweberp_saas_ai`.`a`.`bCheck` AS `bCheck`,`xlyweberp_saas_ai`.`a`.`bInStoreComplete` AS `bInStoreComplete`,`xlyweberp_saas_ai`.`a`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`a`.`sSupplyId` AS `sSupplyId`,`xlyweberp_saas_ai`.`a`.`sCustomerId` AS `sCustomerId`,`xlyweberp_saas_ai`.`a`.`sProductId` AS `sProductId`,`xlyweberp_saas_ai`.`a`.`sProcessId` AS `sProcessId`,`xlyweberp_saas_ai`.`a`.`sPurchaseManId` AS `sPurchaseManId`,`xlyweberp_saas_ai`.`a`.`sGetPayId` AS `sGetPayId`,`xlyweberp_saas_ai`.`a`.`sSrcSlaveId` AS `sSrcSlaveId`,`xlyweberp_saas_ai`.`a`.`sFormId` AS `sFormId`,`xlyweberp_saas_ai`.`a`.`sParentId` AS `sParentId`,`xlyweberp_saas_ai`.`a`.`sSrcId` AS `sSrcId`,`xlyweberp_saas_ai`.`a`.`sSlaveId` AS `sSlaveId`,`xlyweberp_saas_ai`.`a`.`sTaxId` AS `sTaxId`,`xlyweberp_saas_ai`.`a`.`iTestType` AS `iTestType` from `xlyweberp_saas_ai`.`viw_hmwxjy` `a` union select distinct `xlyweberp_saas_ai`.`b`.`sId` AS `sid`,`xlyweberp_saas_ai`.`b`.`iOrder` AS `iorder`,`xlyweberp_saas_ai`.`b`.`工单号` AS `sSrcNo`,`xlyweberp_saas_ai`.`b`.`客户名称` AS `sCustomerName`,`xlyweberp_saas_ai`.`b`.`外协单号` AS `sBillNo`,`xlyweberp_saas_ai`.`b`.`产品名称` AS `sProductName`,`xlyweberp_saas_ai`.`b`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`xlyweberp_saas_ai`.`b`.`已确认数` AS `已确认数`,`xlyweberp_saas_ai`.`b`.`发外工序` AS `sProcessName`,`xlyweberp_saas_ai`.`b`.`规格` AS `规格`,`xlyweberp_saas_ai`.`b`.`采购单位` AS `sAuxiliaryUnit`,`xlyweberp_saas_ai`.`b`.`单价` AS `dMaterialsPrice`,`xlyweberp_saas_ai`.`b`.`金额` AS `dMaterialsMoney`,`xlyweberp_saas_ai`.`b`.`税码` AS `sName`,`xlyweberp_saas_ai`.`b`.`不含税单价` AS `dMaterialsNoTaxPrice`,`xlyweberp_saas_ai`.`b`.`不含税金额` AS `dMaterialsNoTaxMoney`,`xlyweberp_saas_ai`.`b`.`税额` AS `dMaterialsTaxMoney`,`xlyweberp_saas_ai`.`b`.`bCopyLimit` AS `bCopyLimit`,`xlyweberp_saas_ai`.`b`.`bCheck` AS `bCheck`,`xlyweberp_saas_ai`.`b`.`bInStoreComplete` AS `bInStoreComplete`,`xlyweberp_saas_ai`.`b`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`b`.`sSupplyId` AS `sSupplyId`,`xlyweberp_saas_ai`.`b`.`sCustomerId` AS `sCustomerId`,`xlyweberp_saas_ai`.`b`.`sProductId` AS `sProductId`,`xlyweberp_saas_ai`.`b`.`sProcessId` AS `sProcessId`,`xlyweberp_saas_ai`.`b`.`sPurchaseManId` AS `sPurchaseManId`,`xlyweberp_saas_ai`.`b`.`sGetPayId` AS `sGetPayId`,`xlyweberp_saas_ai`.`b`.`sSrcSlaveId` AS `sSrcSlaveId`,`xlyweberp_saas_ai`.`b`.`sFormId` AS `sFormId`,`xlyweberp_saas_ai`.`b`.`sParentId` AS `sParentId`,`xlyweberp_saas_ai`.`b`.`sSrcId` AS `sSrcId`,`xlyweberp_saas_ai`.`b`.`sSlaveId` AS `sSlaveId`,`xlyweberp_saas_ai`.`b`.`sTaxId` AS `sTaxId`,`xlyweberp_saas_ai`.`b`.`iTestType` AS `iTestType` from `xlyweberp_saas_ai`.`viw_hmwxjy2` `b`) `wx` group by `wx`.`sSrcNo`,`wx`.`sBillNo`,`wx`.`sProcessId`,`wx`.`tCreateDate`,`wx`.`sSupplyId`
```

## 说明

_暂无人工说明。_
