| | |
| | | { |
| | | string stockUseSql = $@"select a.Id,a.WareHouseNo,a.WareHouseName,b.num as stockNum,c.num as useNum |
| | | from SysWareHouse a |
| | | left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' group by WareHouseNo) b on b.WareHouseNo=a.WareHouseNo |
| | | left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Status='1' group by WareHouseNo) c on c.WareHouseNo=a.WareHouseNo |
| | | left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Make=1 group by WareHouseNo) b on b.WareHouseNo=a.WareHouseNo |
| | | left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Make=1 and Status='1' group by WareHouseNo) c on c.WareHouseNo=a.WareHouseNo |
| | | where a.IsDel='0' |
| | | order by a.WareHouseNo"; |
| | | DataTable stockUseDt = Db.Ado.GetDataTable(stockUseSql); |