时间: 2024-01-19 10:00:07,386 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##42be6cfc78944505809290e23a689b36] ORDER BY Goods_no 时间: 2024-01-19 10:00:07,763 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##078ed83e749c4619bf21c6baa43457cd] ORDER BY Goods_no 时间: 2024-01-19 10:00:09,360 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##c4ffab5e6779407683ad3c0da17a863e] ORDER BY Goods_no 时间: 2024-01-19 10:00:19,861 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##1b2e2f576eba4bf68705d2fc297c2025] ORDER BY Goods_no 时间: 2024-01-19 10:00:22,772 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##3c80c8ecb30b487493e1628dbd393712] ORDER BY Goods_no 时间: 2024-01-19 10:00:24,651 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##f03945dba4094722aa73e7fc6fa66f9b] ORDER BY Goods_no 时间: 2024-01-19 10:00:26,509 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##f4137996a0964dc0bb9f69b1e8c957b5] ORDER BY Goods_no 时间: 2024-01-19 10:00:28,418 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##289ca5aa7a94460d870e10b7f19f89f6] ORDER BY Goods_no 时间: 2024-01-19 10:00:30,467 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##840428683fc64e7fb3d42ca3fe480500] ORDER BY Goods_no 时间: 2024-01-19 10:00:32,353 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##71c5f62da87448b2807a9c604f4b1200] ORDER BY Goods_no 时间: 2024-01-19 10:00:34,300 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[5bed8d98-1da6-4c9c-b010-ad9adcee1210] FROM [##fe7bae58cbb5470799fe517479e8a43d] ORDER BY Goods_no 时间: 2024-01-19 10:25:10,237 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PrintStatus = 1 FROM [##66cd27e658d1477ba7c7a0f04cde7be4] A WHERE EXISTS( SELECT 1 FROM BillPrint WHERE BillType = 'Wout' AND A.DeliveryID = BillNo ) 时间: 2024-01-19 10:25:10,244 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##66cd27e658d1477ba7c7a0f04cde7be4] SET IsInStock = CASE WHEN ISNULL(B.Posted,0) = 1 THEN 1 ELSE 0 END FROM [##66cd27e658d1477ba7c7a0f04cde7be4] A INNER JOIN ShopTin B ON A.DeliveryID = B.DeliveryID WHERE 1 = 1 时间: 2024-01-19 10:25:10,251 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 0 FROM [##66cd27e658d1477ba7c7a0f04cde7be4] A WHERE NOT EXISTS(SELECT * FROM ShopTin WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 10:25:10,255 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 1 FROM [##66cd27e658d1477ba7c7a0f04cde7be4] A WHERE EXISTS(SELECT * FROM PuReceipt WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 10:25:10,261 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET SortingQuantity = ISNULL(B.Quantity,0) FROM ##66cd27e658d1477ba7c7a0f04cde7be4 A INNER JOIN ( SELECT A.SortingID, SUM(ISNULL(Quantity,0)) As Quantity FROM SortingGoods A WHERE EXISTS( SELECT 1 FROM ##66cd27e658d1477ba7c7a0f04cde7be4 WHERE A.SortingID = SortingID ) GROUP BY A.SortingID ) B ON A.SortingID = B.SortingID 时间: 2024-01-19 10:25:10,278 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OrderQuantity = ISNULL(B.Quantity,0) FROM ##66cd27e658d1477ba7c7a0f04cde7be4 A INNER JOIN ( SELECT A.OrderID, SUM(ISNULL(Quantity,0)) As Quantity FROM OrderGoods A WHERE EXISTS( SELECT 1 FROM ##66cd27e658d1477ba7c7a0f04cde7be4 WHERE A.OrderID = OrderID ) GROUP BY A.OrderID ) B ON A.OrderID = B.OrderID 时间: 2024-01-19 10:25:10,292 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), Amount = ISNULL(B.Amount,0), DpAmount = ISNULL(B.DpAmount,0) FROM ##66cd27e658d1477ba7c7a0f04cde7be4 A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(A.Quantity,0)) As Quantity, SUM(ISNULL(A.Quantity,0) * ISNULL(A.UnitPrice,0)) As Amount , SUM(ISNULL(A.Quantity,0) * ISNULL(vdp.DpPriceByBatch,0)) As DpAmount FROM DeliveryGoods A LEFT JOIN Delivery B ON A.DeliveryID=B.DeliveryID LEFT JOIN vGoodsDpPrice vdp ON vdp.Goods_No = a.Goods_No AND vdp.Customer_ID = b.Customer_ID LEFT JOIN Goods G ON A.Goods_No=G.Goods_No WHERE EXISTS( SELECT 1 FROM ##66cd27e658d1477ba7c7a0f04cde7be4 WHERE A.DeliveryID = DeliveryID ) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 10:25:10,338 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET ReceiveQuantity = ISNULL(B.Quantity,0) FROM ##66cd27e658d1477ba7c7a0f04cde7be4 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM ShopTinSSGoods A INNER JOIN ShopTin B ON A.ShopTinID = B.ShopTinID WHERE B.DeliveryID IS NOT NULL AND EXISTS( SELECT 1 FROM ##66cd27e658d1477ba7c7a0f04cde7be4 WHERE B.DeliveryID = DeliveryID ) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 10:25:10,454 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReceiptQuantity = ISNULL(B.Quantity,0) FROM ##66cd27e658d1477ba7c7a0f04cde7be4 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM ##66cd27e658d1477ba7c7a0f04cde7be4 C WHERE B.DeliveryID = C.DeliveryID ) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 10:25:10,539 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##66cd27e658d1477ba7c7a0f04cde7be4 SET ChangeQuantity = ISNULL(Quantity,0) - ISNULL(ReceiveQuantity,0) , ChangeWarehouse = ISNULL(Quantity,0) - ISNULL(PuReceiptQuantity,0) 时间: 2024-01-19 10:25:10,540 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET BoxCount = ISNULL(B.BoxCount,0) FROM [##66cd27e658d1477ba7c7a0f04cde7be4] A INNER JOIN ( SELECT A.AccBillNo As DeliveryID, COUNT(DISTINCT A.BoxNo) AS BoxCount FROM BoxBill A INNER JOIN Boxes B ON A.BoxNo = B.BoxNo WHERE A.AccBillType = 'WareDelivery' AND EXISTS( SELECT 1 FROM [##66cd27e658d1477ba7c7a0f04cde7be4] WHERE A.AccBillNo = DeliveryID ) GROUP BY A.AccBillNo ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 10:25:10,582 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, DeliveryID AS [单号], Manual_ID AS [手工单号] , Delivery_Date AS [日期], Mode AS [出货方式], OrderID AS [订货单号], SortingID AS [配货单号] , CartonID AS [装箱单号], RetailOrderID AS [零售订单号], rtrim(Warehouse_No) AS [仓库编号] , Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], FreightCorp AS [货运公司], YunBillID AS [物流单号], Quantity AS [数量] , DpAmount AS [吊牌额] , Amount AS [结算额] , OrderQuantity AS [业务状态#订货数], PuReceiptQuantity AS [业务状态#厂家来货数] , SortingQuantity AS [业务状态#配货数], BoxCount [业务状态#箱数], ReceiveQuantity AS [业务状态#渠道收货数] , ChangeQuantity AS [业务状态#渠道收货差异],ChangeWarehouse AS [业务状态#仓库收货差异], IsInStock AS [业务状态#入库] , JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期] , Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称], Input_Date AS [单据状态#录入日期] , Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称],PostedDate AS [单据状态#审核日期] , PrintStatus AS [单据状态#打印], Flag AS [单据状态#完成], Remark AS [备注] INTO tempdb.dbo.[7eb7f2d4-cb93-4a33-94e2-bea4d64b73ba] FROM [##66cd27e658d1477ba7c7a0f04cde7be4] ORDER BY Delivery_Date DESC, DeliveryID ASC 时间: 2024-01-19 11:03:17,301 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PrintStatus = 1 FROM [##4b2e1d853bbe4ce6ad6a53fe6abde62f] A WHERE EXISTS( SELECT 1 FROM BillPrint WHERE BillType = 'Wout' AND A.DeliveryID = BillNo ) 时间: 2024-01-19 11:03:17,308 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##4b2e1d853bbe4ce6ad6a53fe6abde62f] SET IsInStock = CASE WHEN ISNULL(B.Posted,0) = 1 THEN 1 ELSE 0 END FROM [##4b2e1d853bbe4ce6ad6a53fe6abde62f] A INNER JOIN ShopTin B ON A.DeliveryID = B.DeliveryID WHERE 1 = 1 时间: 2024-01-19 11:03:17,316 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 0 FROM [##4b2e1d853bbe4ce6ad6a53fe6abde62f] A WHERE NOT EXISTS(SELECT * FROM ShopTin WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:03:17,324 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 1 FROM [##4b2e1d853bbe4ce6ad6a53fe6abde62f] A WHERE EXISTS(SELECT * FROM PuReceipt WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:03:17,335 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET SortingQuantity = ISNULL(B.Quantity,0) FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f A INNER JOIN ( SELECT A.SortingID, SUM(ISNULL(Quantity,0)) As Quantity FROM SortingGoods A WHERE EXISTS( SELECT 1 FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f WHERE A.SortingID = SortingID ) AND EXISTS (SELECT 1 FROM [##003c7d9808f743a8926a77e1640e1e57] WHERE Goods_No = A.Goods_No) GROUP BY A.SortingID ) B ON A.SortingID = B.SortingID 时间: 2024-01-19 11:03:17,481 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OrderQuantity = ISNULL(B.Quantity,0) FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f A INNER JOIN ( SELECT A.OrderID, SUM(ISNULL(Quantity,0)) As Quantity FROM OrderGoods A WHERE EXISTS( SELECT 1 FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f WHERE A.OrderID = OrderID ) AND EXISTS (SELECT 1 FROM [##003c7d9808f743a8926a77e1640e1e57] WHERE Goods_No = A.Goods_No) GROUP BY A.OrderID ) B ON A.OrderID = B.OrderID 时间: 2024-01-19 11:03:17,607 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), Amount = ISNULL(B.Amount,0), DpAmount = ISNULL(B.DpAmount,0) FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(A.Quantity,0)) As Quantity, SUM(ISNULL(A.Quantity,0) * ISNULL(A.UnitPrice,0)) As Amount , SUM(ISNULL(A.Quantity,0) * ISNULL(vdp.DpPriceByBatch,0)) As DpAmount FROM DeliveryGoods A LEFT JOIN Delivery B ON A.DeliveryID=B.DeliveryID LEFT JOIN vGoodsDpPrice vdp ON vdp.Goods_No = a.Goods_No AND vdp.Customer_ID = b.Customer_ID LEFT JOIN Goods G ON A.Goods_No=G.Goods_No WHERE EXISTS( SELECT 1 FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##003c7d9808f743a8926a77e1640e1e57] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:17,759 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET ReceiveQuantity = ISNULL(B.Quantity,0) FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM ShopTinSSGoods A INNER JOIN ShopTin B ON A.ShopTinID = B.ShopTinID WHERE B.DeliveryID IS NOT NULL AND EXISTS( SELECT 1 FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f WHERE B.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##003c7d9808f743a8926a77e1640e1e57] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:18,119 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReceiptQuantity = ISNULL(B.Quantity,0) FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM ##4b2e1d853bbe4ce6ad6a53fe6abde62f C WHERE B.DeliveryID = C.DeliveryID ) AND EXISTS (SELECT 1 FROM [##003c7d9808f743a8926a77e1640e1e57] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:18,407 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##4b2e1d853bbe4ce6ad6a53fe6abde62f SET ChangeQuantity = ISNULL(Quantity,0) - ISNULL(ReceiveQuantity,0) , ChangeWarehouse = ISNULL(Quantity,0) - ISNULL(PuReceiptQuantity,0) 时间: 2024-01-19 11:03:18,409 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET BoxCount = ISNULL(B.BoxCount,0) FROM [##4b2e1d853bbe4ce6ad6a53fe6abde62f] A INNER JOIN ( SELECT A.AccBillNo As DeliveryID, COUNT(DISTINCT A.BoxNo) AS BoxCount FROM BoxBill A INNER JOIN Boxes B ON A.BoxNo = B.BoxNo WHERE A.AccBillType = 'WareDelivery' AND EXISTS( SELECT 1 FROM [##4b2e1d853bbe4ce6ad6a53fe6abde62f] WHERE A.AccBillNo = DeliveryID ) GROUP BY A.AccBillNo ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:18,462 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, DeliveryID AS [单号], Manual_ID AS [手工单号] , Delivery_Date AS [日期], Mode AS [出货方式], OrderID AS [订货单号], SortingID AS [配货单号] , CartonID AS [装箱单号], RetailOrderID AS [零售订单号], rtrim(Warehouse_No) AS [仓库编号] , Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], FreightCorp AS [货运公司], YunBillID AS [物流单号], Quantity AS [数量] , DpAmount AS [吊牌额] , Amount AS [结算额] , OrderQuantity AS [业务状态#订货数], PuReceiptQuantity AS [业务状态#厂家来货数] , SortingQuantity AS [业务状态#配货数], BoxCount [业务状态#箱数], ReceiveQuantity AS [业务状态#渠道收货数] , ChangeQuantity AS [业务状态#渠道收货差异],ChangeWarehouse AS [业务状态#仓库收货差异], IsInStock AS [业务状态#入库] , JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期] , Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称], Input_Date AS [单据状态#录入日期] , Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称],PostedDate AS [单据状态#审核日期] , PrintStatus AS [单据状态#打印], Flag AS [单据状态#完成], Remark AS [备注] INTO tempdb.dbo.[7eb7f2d4-cb93-4a33-94e2-bea4d64b73ba] FROM [##4b2e1d853bbe4ce6ad6a53fe6abde62f] ORDER BY Delivery_Date DESC, DeliveryID ASC 时间: 2024-01-19 11:03:19,627 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PrintStatus = 1 FROM [##5528d68a30f94eaebb10ef43d69e17be] A WHERE EXISTS( SELECT 1 FROM BillPrint WHERE BillType = 'Wout' AND A.DeliveryID = BillNo ) 时间: 2024-01-19 11:03:19,634 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##5528d68a30f94eaebb10ef43d69e17be] SET IsInStock = CASE WHEN ISNULL(B.Posted,0) = 1 THEN 1 ELSE 0 END FROM [##5528d68a30f94eaebb10ef43d69e17be] A INNER JOIN ShopTin B ON A.DeliveryID = B.DeliveryID WHERE 1 = 1 时间: 2024-01-19 11:03:19,642 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 0 FROM [##5528d68a30f94eaebb10ef43d69e17be] A WHERE NOT EXISTS(SELECT * FROM ShopTin WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:03:19,651 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 1 FROM [##5528d68a30f94eaebb10ef43d69e17be] A WHERE EXISTS(SELECT * FROM PuReceipt WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:03:19,661 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET SortingQuantity = ISNULL(B.Quantity,0) FROM ##5528d68a30f94eaebb10ef43d69e17be A INNER JOIN ( SELECT A.SortingID, SUM(ISNULL(Quantity,0)) As Quantity FROM SortingGoods A WHERE EXISTS( SELECT 1 FROM ##5528d68a30f94eaebb10ef43d69e17be WHERE A.SortingID = SortingID ) AND EXISTS (SELECT 1 FROM [##a3a339546ad7498ebe847e19f2e9a059] WHERE Goods_No = A.Goods_No) GROUP BY A.SortingID ) B ON A.SortingID = B.SortingID 时间: 2024-01-19 11:03:19,796 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OrderQuantity = ISNULL(B.Quantity,0) FROM ##5528d68a30f94eaebb10ef43d69e17be A INNER JOIN ( SELECT A.OrderID, SUM(ISNULL(Quantity,0)) As Quantity FROM OrderGoods A WHERE EXISTS( SELECT 1 FROM ##5528d68a30f94eaebb10ef43d69e17be WHERE A.OrderID = OrderID ) AND EXISTS (SELECT 1 FROM [##a3a339546ad7498ebe847e19f2e9a059] WHERE Goods_No = A.Goods_No) GROUP BY A.OrderID ) B ON A.OrderID = B.OrderID 时间: 2024-01-19 11:03:19,911 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), Amount = ISNULL(B.Amount,0), DpAmount = ISNULL(B.DpAmount,0) FROM ##5528d68a30f94eaebb10ef43d69e17be A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(A.Quantity,0)) As Quantity, SUM(ISNULL(A.Quantity,0) * ISNULL(A.UnitPrice,0)) As Amount , SUM(ISNULL(A.Quantity,0) * ISNULL(vdp.DpPriceByBatch,0)) As DpAmount FROM DeliveryGoods A LEFT JOIN Delivery B ON A.DeliveryID=B.DeliveryID LEFT JOIN vGoodsDpPrice vdp ON vdp.Goods_No = a.Goods_No AND vdp.Customer_ID = b.Customer_ID LEFT JOIN Goods G ON A.Goods_No=G.Goods_No WHERE EXISTS( SELECT 1 FROM ##5528d68a30f94eaebb10ef43d69e17be WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##a3a339546ad7498ebe847e19f2e9a059] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:20,069 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET ReceiveQuantity = ISNULL(B.Quantity,0) FROM ##5528d68a30f94eaebb10ef43d69e17be A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM ShopTinSSGoods A INNER JOIN ShopTin B ON A.ShopTinID = B.ShopTinID WHERE B.DeliveryID IS NOT NULL AND EXISTS( SELECT 1 FROM ##5528d68a30f94eaebb10ef43d69e17be WHERE B.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##a3a339546ad7498ebe847e19f2e9a059] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:20,405 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReceiptQuantity = ISNULL(B.Quantity,0) FROM ##5528d68a30f94eaebb10ef43d69e17be A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM ##5528d68a30f94eaebb10ef43d69e17be C WHERE B.DeliveryID = C.DeliveryID ) AND EXISTS (SELECT 1 FROM [##a3a339546ad7498ebe847e19f2e9a059] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:20,685 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##5528d68a30f94eaebb10ef43d69e17be SET ChangeQuantity = ISNULL(Quantity,0) - ISNULL(ReceiveQuantity,0) , ChangeWarehouse = ISNULL(Quantity,0) - ISNULL(PuReceiptQuantity,0) 时间: 2024-01-19 11:03:20,687 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET BoxCount = ISNULL(B.BoxCount,0) FROM [##5528d68a30f94eaebb10ef43d69e17be] A INNER JOIN ( SELECT A.AccBillNo As DeliveryID, COUNT(DISTINCT A.BoxNo) AS BoxCount FROM BoxBill A INNER JOIN Boxes B ON A.BoxNo = B.BoxNo WHERE A.AccBillType = 'WareDelivery' AND EXISTS( SELECT 1 FROM [##5528d68a30f94eaebb10ef43d69e17be] WHERE A.AccBillNo = DeliveryID ) GROUP BY A.AccBillNo ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:03:20,725 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, DeliveryID AS [单号], Manual_ID AS [手工单号] , Delivery_Date AS [日期], Mode AS [出货方式], OrderID AS [订货单号], SortingID AS [配货单号] , CartonID AS [装箱单号], RetailOrderID AS [零售订单号], rtrim(Warehouse_No) AS [仓库编号] , Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], FreightCorp AS [货运公司], YunBillID AS [物流单号], Quantity AS [数量] , DpAmount AS [吊牌额] , Amount AS [结算额] , OrderQuantity AS [业务状态#订货数], PuReceiptQuantity AS [业务状态#厂家来货数] , SortingQuantity AS [业务状态#配货数], BoxCount [业务状态#箱数], ReceiveQuantity AS [业务状态#渠道收货数] , ChangeQuantity AS [业务状态#渠道收货差异],ChangeWarehouse AS [业务状态#仓库收货差异], IsInStock AS [业务状态#入库] , JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期] , Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称], Input_Date AS [单据状态#录入日期] , Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称],PostedDate AS [单据状态#审核日期] , PrintStatus AS [单据状态#打印], Flag AS [单据状态#完成], Remark AS [备注] INTO tempdb.dbo.[7eb7f2d4-cb93-4a33-94e2-bea4d64b73ba] FROM [##5528d68a30f94eaebb10ef43d69e17be] ORDER BY Delivery_Date DESC, DeliveryID ASC 时间: 2024-01-19 11:05:26,533 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PrintStatus = 1 FROM [##7e0bddc7d7bf4eec868434389ea042f1] A WHERE EXISTS( SELECT 1 FROM BillPrint WHERE BillType = 'Wout' AND A.DeliveryID = BillNo ) 时间: 2024-01-19 11:05:26,538 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##7e0bddc7d7bf4eec868434389ea042f1] SET IsInStock = CASE WHEN ISNULL(B.Posted,0) = 1 THEN 1 ELSE 0 END FROM [##7e0bddc7d7bf4eec868434389ea042f1] A INNER JOIN ShopTin B ON A.DeliveryID = B.DeliveryID WHERE 1 = 1 时间: 2024-01-19 11:05:26,543 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 0 FROM [##7e0bddc7d7bf4eec868434389ea042f1] A WHERE NOT EXISTS(SELECT * FROM ShopTin WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:05:26,549 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 1 FROM [##7e0bddc7d7bf4eec868434389ea042f1] A WHERE EXISTS(SELECT * FROM PuReceipt WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:05:26,555 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET SortingQuantity = ISNULL(B.Quantity,0) FROM ##7e0bddc7d7bf4eec868434389ea042f1 A INNER JOIN ( SELECT A.SortingID, SUM(ISNULL(Quantity,0)) As Quantity FROM SortingGoods A WHERE EXISTS( SELECT 1 FROM ##7e0bddc7d7bf4eec868434389ea042f1 WHERE A.SortingID = SortingID ) AND EXISTS (SELECT 1 FROM [##543fbe1da1584d7ba9abe1074814e6fa] WHERE Goods_No = A.Goods_No) GROUP BY A.SortingID ) B ON A.SortingID = B.SortingID 时间: 2024-01-19 11:05:26,628 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OrderQuantity = ISNULL(B.Quantity,0) FROM ##7e0bddc7d7bf4eec868434389ea042f1 A INNER JOIN ( SELECT A.OrderID, SUM(ISNULL(Quantity,0)) As Quantity FROM OrderGoods A WHERE EXISTS( SELECT 1 FROM ##7e0bddc7d7bf4eec868434389ea042f1 WHERE A.OrderID = OrderID ) AND EXISTS (SELECT 1 FROM [##543fbe1da1584d7ba9abe1074814e6fa] WHERE Goods_No = A.Goods_No) GROUP BY A.OrderID ) B ON A.OrderID = B.OrderID 时间: 2024-01-19 11:05:26,693 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), Amount = ISNULL(B.Amount,0), DpAmount = ISNULL(B.DpAmount,0) FROM ##7e0bddc7d7bf4eec868434389ea042f1 A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(A.Quantity,0)) As Quantity, SUM(ISNULL(A.Quantity,0) * ISNULL(A.UnitPrice,0)) As Amount , SUM(ISNULL(A.Quantity,0) * ISNULL(vdp.DpPriceByBatch,0)) As DpAmount FROM DeliveryGoods A LEFT JOIN Delivery B ON A.DeliveryID=B.DeliveryID LEFT JOIN vGoodsDpPrice vdp ON vdp.Goods_No = a.Goods_No AND vdp.Customer_ID = b.Customer_ID LEFT JOIN Goods G ON A.Goods_No=G.Goods_No WHERE EXISTS( SELECT 1 FROM ##7e0bddc7d7bf4eec868434389ea042f1 WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##543fbe1da1584d7ba9abe1074814e6fa] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:26,815 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET ReceiveQuantity = ISNULL(B.Quantity,0) FROM ##7e0bddc7d7bf4eec868434389ea042f1 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM ShopTinSSGoods A INNER JOIN ShopTin B ON A.ShopTinID = B.ShopTinID WHERE B.DeliveryID IS NOT NULL AND EXISTS( SELECT 1 FROM ##7e0bddc7d7bf4eec868434389ea042f1 WHERE B.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##543fbe1da1584d7ba9abe1074814e6fa] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:27,423 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReceiptQuantity = ISNULL(B.Quantity,0) FROM ##7e0bddc7d7bf4eec868434389ea042f1 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM ##7e0bddc7d7bf4eec868434389ea042f1 C WHERE B.DeliveryID = C.DeliveryID ) AND EXISTS (SELECT 1 FROM [##543fbe1da1584d7ba9abe1074814e6fa] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:27,887 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##7e0bddc7d7bf4eec868434389ea042f1 SET ChangeQuantity = ISNULL(Quantity,0) - ISNULL(ReceiveQuantity,0) , ChangeWarehouse = ISNULL(Quantity,0) - ISNULL(PuReceiptQuantity,0) 时间: 2024-01-19 11:05:27,889 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET BoxCount = ISNULL(B.BoxCount,0) FROM [##7e0bddc7d7bf4eec868434389ea042f1] A INNER JOIN ( SELECT A.AccBillNo As DeliveryID, COUNT(DISTINCT A.BoxNo) AS BoxCount FROM BoxBill A INNER JOIN Boxes B ON A.BoxNo = B.BoxNo WHERE A.AccBillType = 'WareDelivery' AND EXISTS( SELECT 1 FROM [##7e0bddc7d7bf4eec868434389ea042f1] WHERE A.AccBillNo = DeliveryID ) GROUP BY A.AccBillNo ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:27,929 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, DeliveryID AS [单号], Manual_ID AS [手工单号] , Delivery_Date AS [日期], Mode AS [出货方式], OrderID AS [订货单号], SortingID AS [配货单号] , CartonID AS [装箱单号], RetailOrderID AS [零售订单号], rtrim(Warehouse_No) AS [仓库编号] , Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], FreightCorp AS [货运公司], YunBillID AS [物流单号], Quantity AS [数量] , DpAmount AS [吊牌额] , Amount AS [结算额] , OrderQuantity AS [业务状态#订货数], PuReceiptQuantity AS [业务状态#厂家来货数] , SortingQuantity AS [业务状态#配货数], BoxCount [业务状态#箱数], ReceiveQuantity AS [业务状态#渠道收货数] , ChangeQuantity AS [业务状态#渠道收货差异],ChangeWarehouse AS [业务状态#仓库收货差异], IsInStock AS [业务状态#入库] , JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期] , Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称], Input_Date AS [单据状态#录入日期] , Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称],PostedDate AS [单据状态#审核日期] , PrintStatus AS [单据状态#打印], Flag AS [单据状态#完成], Remark AS [备注] INTO tempdb.dbo.[7eb7f2d4-cb93-4a33-94e2-bea4d64b73ba] FROM [##7e0bddc7d7bf4eec868434389ea042f1] ORDER BY Delivery_Date DESC, DeliveryID ASC 时间: 2024-01-19 11:05:33,305 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PrintStatus = 1 FROM [##d750ba4a090646209e0d19ddb558ef4a] A WHERE EXISTS( SELECT 1 FROM BillPrint WHERE BillType = 'Wout' AND A.DeliveryID = BillNo ) 时间: 2024-01-19 11:05:33,312 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##d750ba4a090646209e0d19ddb558ef4a] SET IsInStock = CASE WHEN ISNULL(B.Posted,0) = 1 THEN 1 ELSE 0 END FROM [##d750ba4a090646209e0d19ddb558ef4a] A INNER JOIN ShopTin B ON A.DeliveryID = B.DeliveryID WHERE 1 = 1 时间: 2024-01-19 11:05:33,318 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 0 FROM [##d750ba4a090646209e0d19ddb558ef4a] A WHERE NOT EXISTS(SELECT * FROM ShopTin WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:05:33,326 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 1 FROM [##d750ba4a090646209e0d19ddb558ef4a] A WHERE EXISTS(SELECT * FROM PuReceipt WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:05:33,337 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET SortingQuantity = ISNULL(B.Quantity,0) FROM ##d750ba4a090646209e0d19ddb558ef4a A INNER JOIN ( SELECT A.SortingID, SUM(ISNULL(Quantity,0)) As Quantity FROM SortingGoods A WHERE EXISTS( SELECT 1 FROM ##d750ba4a090646209e0d19ddb558ef4a WHERE A.SortingID = SortingID ) AND EXISTS (SELECT 1 FROM [##8de1ee60892a41db869e8d5f02d53c5f] WHERE Goods_No = A.Goods_No) GROUP BY A.SortingID ) B ON A.SortingID = B.SortingID 时间: 2024-01-19 11:05:33,473 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OrderQuantity = ISNULL(B.Quantity,0) FROM ##d750ba4a090646209e0d19ddb558ef4a A INNER JOIN ( SELECT A.OrderID, SUM(ISNULL(Quantity,0)) As Quantity FROM OrderGoods A WHERE EXISTS( SELECT 1 FROM ##d750ba4a090646209e0d19ddb558ef4a WHERE A.OrderID = OrderID ) AND EXISTS (SELECT 1 FROM [##8de1ee60892a41db869e8d5f02d53c5f] WHERE Goods_No = A.Goods_No) GROUP BY A.OrderID ) B ON A.OrderID = B.OrderID 时间: 2024-01-19 11:05:33,597 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), Amount = ISNULL(B.Amount,0), DpAmount = ISNULL(B.DpAmount,0) FROM ##d750ba4a090646209e0d19ddb558ef4a A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(A.Quantity,0)) As Quantity, SUM(ISNULL(A.Quantity,0) * ISNULL(A.UnitPrice,0)) As Amount , SUM(ISNULL(A.Quantity,0) * ISNULL(vdp.DpPriceByBatch,0)) As DpAmount FROM DeliveryGoods A LEFT JOIN Delivery B ON A.DeliveryID=B.DeliveryID LEFT JOIN vGoodsDpPrice vdp ON vdp.Goods_No = a.Goods_No AND vdp.Customer_ID = b.Customer_ID LEFT JOIN Goods G ON A.Goods_No=G.Goods_No WHERE EXISTS( SELECT 1 FROM ##d750ba4a090646209e0d19ddb558ef4a WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##8de1ee60892a41db869e8d5f02d53c5f] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:33,811 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET ReceiveQuantity = ISNULL(B.Quantity,0) FROM ##d750ba4a090646209e0d19ddb558ef4a A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM ShopTinSSGoods A INNER JOIN ShopTin B ON A.ShopTinID = B.ShopTinID WHERE B.DeliveryID IS NOT NULL AND EXISTS( SELECT 1 FROM ##d750ba4a090646209e0d19ddb558ef4a WHERE B.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##8de1ee60892a41db869e8d5f02d53c5f] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:34,142 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReceiptQuantity = ISNULL(B.Quantity,0) FROM ##d750ba4a090646209e0d19ddb558ef4a A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM ##d750ba4a090646209e0d19ddb558ef4a C WHERE B.DeliveryID = C.DeliveryID ) AND EXISTS (SELECT 1 FROM [##8de1ee60892a41db869e8d5f02d53c5f] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:34,435 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##d750ba4a090646209e0d19ddb558ef4a SET ChangeQuantity = ISNULL(Quantity,0) - ISNULL(ReceiveQuantity,0) , ChangeWarehouse = ISNULL(Quantity,0) - ISNULL(PuReceiptQuantity,0) 时间: 2024-01-19 11:05:34,436 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET BoxCount = ISNULL(B.BoxCount,0) FROM [##d750ba4a090646209e0d19ddb558ef4a] A INNER JOIN ( SELECT A.AccBillNo As DeliveryID, COUNT(DISTINCT A.BoxNo) AS BoxCount FROM BoxBill A INNER JOIN Boxes B ON A.BoxNo = B.BoxNo WHERE A.AccBillType = 'WareDelivery' AND EXISTS( SELECT 1 FROM [##d750ba4a090646209e0d19ddb558ef4a] WHERE A.AccBillNo = DeliveryID ) GROUP BY A.AccBillNo ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:05:34,475 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, DeliveryID AS [单号], Manual_ID AS [手工单号] , Delivery_Date AS [日期], Mode AS [出货方式], OrderID AS [订货单号], SortingID AS [配货单号] , CartonID AS [装箱单号], RetailOrderID AS [零售订单号], rtrim(Warehouse_No) AS [仓库编号] , Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], FreightCorp AS [货运公司], YunBillID AS [物流单号], Quantity AS [数量] , DpAmount AS [吊牌额] , Amount AS [结算额] , OrderQuantity AS [业务状态#订货数], PuReceiptQuantity AS [业务状态#厂家来货数] , SortingQuantity AS [业务状态#配货数], BoxCount [业务状态#箱数], ReceiveQuantity AS [业务状态#渠道收货数] , ChangeQuantity AS [业务状态#渠道收货差异],ChangeWarehouse AS [业务状态#仓库收货差异], IsInStock AS [业务状态#入库] , JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期] , Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称], Input_Date AS [单据状态#录入日期] , Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称],PostedDate AS [单据状态#审核日期] , PrintStatus AS [单据状态#打印], Flag AS [单据状态#完成], Remark AS [备注] INTO tempdb.dbo.[7eb7f2d4-cb93-4a33-94e2-bea4d64b73ba] FROM [##d750ba4a090646209e0d19ddb558ef4a] ORDER BY Delivery_Date DESC, DeliveryID ASC 时间: 2024-01-19 11:06:28,209 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PrintStatus = 1 FROM [##27bf560360f04fbab3c6b396bdf663d6] A WHERE EXISTS( SELECT 1 FROM BillPrint WHERE BillType = 'Wout' AND A.DeliveryID = BillNo ) 时间: 2024-01-19 11:06:28,215 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##27bf560360f04fbab3c6b396bdf663d6] SET IsInStock = CASE WHEN ISNULL(B.Posted,0) = 1 THEN 1 ELSE 0 END FROM [##27bf560360f04fbab3c6b396bdf663d6] A INNER JOIN ShopTin B ON A.DeliveryID = B.DeliveryID WHERE 1 = 1 时间: 2024-01-19 11:06:28,222 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 0 FROM [##27bf560360f04fbab3c6b396bdf663d6] A WHERE NOT EXISTS(SELECT * FROM ShopTin WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:06:28,232 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 1 FROM [##27bf560360f04fbab3c6b396bdf663d6] A WHERE EXISTS(SELECT * FROM PuReceipt WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 11:06:28,243 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET SortingQuantity = ISNULL(B.Quantity,0) FROM ##27bf560360f04fbab3c6b396bdf663d6 A INNER JOIN ( SELECT A.SortingID, SUM(ISNULL(Quantity,0)) As Quantity FROM SortingGoods A WHERE EXISTS( SELECT 1 FROM ##27bf560360f04fbab3c6b396bdf663d6 WHERE A.SortingID = SortingID ) AND EXISTS (SELECT 1 FROM [##8a90e2d7d08e4f77b2226c2ef16891b4] WHERE Goods_No = A.Goods_No) GROUP BY A.SortingID ) B ON A.SortingID = B.SortingID 时间: 2024-01-19 11:06:28,387 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OrderQuantity = ISNULL(B.Quantity,0) FROM ##27bf560360f04fbab3c6b396bdf663d6 A INNER JOIN ( SELECT A.OrderID, SUM(ISNULL(Quantity,0)) As Quantity FROM OrderGoods A WHERE EXISTS( SELECT 1 FROM ##27bf560360f04fbab3c6b396bdf663d6 WHERE A.OrderID = OrderID ) AND EXISTS (SELECT 1 FROM [##8a90e2d7d08e4f77b2226c2ef16891b4] WHERE Goods_No = A.Goods_No) GROUP BY A.OrderID ) B ON A.OrderID = B.OrderID 时间: 2024-01-19 11:06:28,535 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), Amount = ISNULL(B.Amount,0), DpAmount = ISNULL(B.DpAmount,0) FROM ##27bf560360f04fbab3c6b396bdf663d6 A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(A.Quantity,0)) As Quantity, SUM(ISNULL(A.Quantity,0) * ISNULL(A.UnitPrice,0)) As Amount , SUM(ISNULL(A.Quantity,0) * ISNULL(vdp.DpPriceByBatch,0)) As DpAmount FROM DeliveryGoods A LEFT JOIN Delivery B ON A.DeliveryID=B.DeliveryID LEFT JOIN vGoodsDpPrice vdp ON vdp.Goods_No = a.Goods_No AND vdp.Customer_ID = b.Customer_ID LEFT JOIN Goods G ON A.Goods_No=G.Goods_No WHERE EXISTS( SELECT 1 FROM ##27bf560360f04fbab3c6b396bdf663d6 WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##8a90e2d7d08e4f77b2226c2ef16891b4] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:06:28,691 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET ReceiveQuantity = ISNULL(B.Quantity,0) FROM ##27bf560360f04fbab3c6b396bdf663d6 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM ShopTinSSGoods A INNER JOIN ShopTin B ON A.ShopTinID = B.ShopTinID WHERE B.DeliveryID IS NOT NULL AND EXISTS( SELECT 1 FROM ##27bf560360f04fbab3c6b396bdf663d6 WHERE B.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##8a90e2d7d08e4f77b2226c2ef16891b4] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:06:29,149 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReceiptQuantity = ISNULL(B.Quantity,0) FROM ##27bf560360f04fbab3c6b396bdf663d6 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM ##27bf560360f04fbab3c6b396bdf663d6 C WHERE B.DeliveryID = C.DeliveryID ) AND EXISTS (SELECT 1 FROM [##8a90e2d7d08e4f77b2226c2ef16891b4] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:06:29,441 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##27bf560360f04fbab3c6b396bdf663d6 SET ChangeQuantity = ISNULL(Quantity,0) - ISNULL(ReceiveQuantity,0) , ChangeWarehouse = ISNULL(Quantity,0) - ISNULL(PuReceiptQuantity,0) 时间: 2024-01-19 11:06:29,444 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET BoxCount = ISNULL(B.BoxCount,0) FROM [##27bf560360f04fbab3c6b396bdf663d6] A INNER JOIN ( SELECT A.AccBillNo As DeliveryID, COUNT(DISTINCT A.BoxNo) AS BoxCount FROM BoxBill A INNER JOIN Boxes B ON A.BoxNo = B.BoxNo WHERE A.AccBillType = 'WareDelivery' AND EXISTS( SELECT 1 FROM [##27bf560360f04fbab3c6b396bdf663d6] WHERE A.AccBillNo = DeliveryID ) GROUP BY A.AccBillNo ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 11:06:29,496 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, DeliveryID AS [单号], Manual_ID AS [手工单号] , Delivery_Date AS [日期], Mode AS [出货方式], OrderID AS [订货单号], SortingID AS [配货单号] , CartonID AS [装箱单号], RetailOrderID AS [零售订单号], rtrim(Warehouse_No) AS [仓库编号] , Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], FreightCorp AS [货运公司], YunBillID AS [物流单号], Quantity AS [数量] , DpAmount AS [吊牌额] , Amount AS [结算额] , OrderQuantity AS [业务状态#订货数], PuReceiptQuantity AS [业务状态#厂家来货数] , SortingQuantity AS [业务状态#配货数], BoxCount [业务状态#箱数], ReceiveQuantity AS [业务状态#渠道收货数] , ChangeQuantity AS [业务状态#渠道收货差异],ChangeWarehouse AS [业务状态#仓库收货差异], IsInStock AS [业务状态#入库] , JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期] , Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称], Input_Date AS [单据状态#录入日期] , Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称],PostedDate AS [单据状态#审核日期] , PrintStatus AS [单据状态#打印], Flag AS [单据状态#完成], Remark AS [备注] INTO tempdb.dbo.[0a6dd624-d227-4960-96eb-5af3eac29d6f] FROM [##27bf560360f04fbab3c6b396bdf663d6] ORDER BY Delivery_Date DESC, DeliveryID ASC 时间: 2024-01-19 14:05:11,089 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##a79783365d0d4bf59687222b5481ea74] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 14:05:11,614 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##7a9e85cf928e43f7b27c3aadbc12d97a] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 14:05:11,617 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##a79783365d0d4bf59687222b5481ea74] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##7a9e85cf928e43f7b27c3aadbc12d97a] 时间: 2024-01-19 14:05:11,690 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##ea563caf4a4b4dd1ab66b3cfc8d214b5 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 14:05:11,699 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##ea563caf4a4b4dd1ab66b3cfc8d214b5 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 14:05:11,701 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##ea563caf4a4b4dd1ab66b3cfc8d214b5 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 14:05:11,733 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##ea563caf4a4b4dd1ab66b3cfc8d214b5 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 14:05:11,735 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##ea563caf4a4b4dd1ab66b3cfc8d214b5 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 14:05:11,739 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##a79783365d0d4bf59687222b5481ea74] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##0c021c33db0d4581ab91ef1cb7980a49] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 14:05:11,756 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售], SUM([渠道库存#数量]) AS [渠道库存] INTO tempdb.dbo.[71f24e9c-ccd7-42d7-90be-aa38f7fe1e47] FROM ##a79783365d0d4bf59687222b5481ea74 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name 时间: 2024-01-19 14:17:40,360 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##fa3a1f21c8044899b48601f6610d13e3] ORDER BY Goods_no 时间: 2024-01-19 14:17:58,025 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##874a650241f9465193c50e9c3a2cd4fe] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##874a650241f9465193c50e9c3a2cd4fe] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##d307f0242955463da7f3c45367ad413d] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##874a650241f9465193c50e9c3a2cd4fe] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##874a650241f9465193c50e9c3a2cd4fe] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##d307f0242955463da7f3c45367ad413d] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##874a650241f9465193c50e9c3a2cd4fe] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##874a650241f9465193c50e9c3a2cd4fe] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##d307f0242955463da7f3c45367ad413d] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##874a650241f9465193c50e9c3a2cd4fe] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##d307f0242955463da7f3c45367ad413d] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##874a650241f9465193c50e9c3a2cd4fe] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##874a650241f9465193c50e9c3a2cd4fe] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##d307f0242955463da7f3c45367ad413d] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 14:17:58,530 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[74bde33b-45eb-42d6-adf8-b6acbbb6d959] FROM [##874a650241f9465193c50e9c3a2cd4fe] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 14:20:43,300 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##2d205257de3c49d5922546a2a899893e] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##2d205257de3c49d5922546a2a899893e] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##c3c1ddebe20247bf9a4f65bbefa9d70d] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##2d205257de3c49d5922546a2a899893e] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##2d205257de3c49d5922546a2a899893e] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##c3c1ddebe20247bf9a4f65bbefa9d70d] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##2d205257de3c49d5922546a2a899893e] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##2d205257de3c49d5922546a2a899893e] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##c3c1ddebe20247bf9a4f65bbefa9d70d] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##2d205257de3c49d5922546a2a899893e] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##c3c1ddebe20247bf9a4f65bbefa9d70d] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##2d205257de3c49d5922546a2a899893e] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##2d205257de3c49d5922546a2a899893e] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##c3c1ddebe20247bf9a4f65bbefa9d70d] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 14:20:43,855 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[74bde33b-45eb-42d6-adf8-b6acbbb6d959] FROM [##2d205257de3c49d5922546a2a899893e] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 14:31:20,007 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##35c8abebfcc442c0a9c429425de8e331] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 14:31:20,420 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##fc1035a455da4a48bc9b716e1321faa5] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 14:31:20,422 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##35c8abebfcc442c0a9c429425de8e331] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##fc1035a455da4a48bc9b716e1321faa5] 时间: 2024-01-19 14:31:20,479 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##99f14afeb85c4605ae802066fd6940ed a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 14:31:20,482 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##99f14afeb85c4605ae802066fd6940ed SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 14:31:20,485 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##99f14afeb85c4605ae802066fd6940ed a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 14:31:20,520 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##99f14afeb85c4605ae802066fd6940ed SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 14:31:20,521 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##99f14afeb85c4605ae802066fd6940ed SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 14:31:20,525 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##35c8abebfcc442c0a9c429425de8e331] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##44368832375048a38bd2255396f435a5] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 14:31:20,532 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售], SUM([渠道库存#数量]) AS [渠道库存] INTO tempdb.dbo.[3086bd0e-b513-42ac-b4fb-dd497bf2b1b9] FROM ##35c8abebfcc442c0a9c429425de8e331 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name 时间: 2024-01-19 14:41:46,019 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##dbea63b8d7b241a8a174eb921324f16b] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 14:41:46,442 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##bcc2a88eaae44caa9d06fe104d7d71ee] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 14:41:46,444 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##dbea63b8d7b241a8a174eb921324f16b] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##bcc2a88eaae44caa9d06fe104d7d71ee] 时间: 2024-01-19 14:41:46,502 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##b9b7f90bb9824fc9a9d73f997af46bf4 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 14:41:46,504 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##b9b7f90bb9824fc9a9d73f997af46bf4 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 14:41:46,507 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##b9b7f90bb9824fc9a9d73f997af46bf4 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 14:41:46,539 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##b9b7f90bb9824fc9a9d73f997af46bf4 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 14:41:46,540 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##b9b7f90bb9824fc9a9d73f997af46bf4 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 14:41:46,544 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##dbea63b8d7b241a8a174eb921324f16b] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##bb5bead8326b49abacf7df37c705c3ad] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 14:41:46,548 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.Range AS [系列], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售], SUM([渠道库存#数量]) AS [渠道库存], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称] INTO tempdb.dbo.[30457255-bb9a-40d8-bb2b-ac955789d877] FROM ##dbea63b8d7b241a8a174eb921324f16b A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY A.Goods_No, GS.Goods_Name, GS.Range, GS.UnitPrice, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END ORDER BY A.Goods_No, GS.Goods_Name, GS.Range, GS.UnitPrice, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END 时间: 2024-01-19 14:41:47,102 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##69d1864f07c54686bbe73c38a65a6f47] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 14:41:47,608 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##39a04bdfc19f4433ad53f9a67db80578] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 14:41:47,610 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##69d1864f07c54686bbe73c38a65a6f47] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##39a04bdfc19f4433ad53f9a67db80578] 时间: 2024-01-19 14:41:47,666 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##774fa0f8d28c48a78cd1b4f929633500 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 14:41:47,668 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##774fa0f8d28c48a78cd1b4f929633500 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 14:41:47,670 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##774fa0f8d28c48a78cd1b4f929633500 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 14:41:47,701 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##774fa0f8d28c48a78cd1b4f929633500 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 14:41:47,703 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##774fa0f8d28c48a78cd1b4f929633500 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 14:41:47,708 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##69d1864f07c54686bbe73c38a65a6f47] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##60a9ad140de043e8bfd6195b073f8936] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 14:41:47,714 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.Range AS [系列], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售], SUM([渠道库存#数量]) AS [渠道库存], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称] INTO tempdb.dbo.[30457255-bb9a-40d8-bb2b-ac955789d877] FROM ##69d1864f07c54686bbe73c38a65a6f47 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY A.Goods_No, GS.Goods_Name, GS.Range, GS.UnitPrice, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END ORDER BY A.Goods_No, GS.Goods_Name, GS.Range, GS.UnitPrice, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END 时间: 2024-01-19 14:42:51,940 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##3f7b2c60f46b49d693290ed0386e2ac9] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 14:42:52,383 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##0c2bb371946f4cd3bb3ed152851f59a7] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 14:42:52,384 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##3f7b2c60f46b49d693290ed0386e2ac9] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##0c2bb371946f4cd3bb3ed152851f59a7] 时间: 2024-01-19 14:42:52,445 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##1cc7e846f7a544fabe4a7bba5087462d a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 14:42:52,448 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##1cc7e846f7a544fabe4a7bba5087462d SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 14:42:52,450 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##1cc7e846f7a544fabe4a7bba5087462d a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 14:42:52,483 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##1cc7e846f7a544fabe4a7bba5087462d SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 14:42:52,484 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##1cc7e846f7a544fabe4a7bba5087462d SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 14:42:52,489 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##3f7b2c60f46b49d693290ed0386e2ac9] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##2936d41ba0284a2f867e7b0e909d55f2] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 14:42:52,493 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量] INTO tempdb.dbo.[45376952-3953-40c3-a5a4-dd5ea88e6563] FROM ##3f7b2c60f46b49d693290ed0386e2ac9 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name 时间: 2024-01-19 15:02:47,482 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##3ec39e85dc4a4f96b1afe33eae0d91e2] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 15:02:47,877 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##685ebc06e3804df5b940575f581ec0e4] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 15:02:47,879 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##3ec39e85dc4a4f96b1afe33eae0d91e2] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##685ebc06e3804df5b940575f581ec0e4] 时间: 2024-01-19 15:02:47,935 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##47da00bc862c43ca93d2f6dcbb198d10 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 15:02:47,938 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##47da00bc862c43ca93d2f6dcbb198d10 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 15:02:47,942 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##47da00bc862c43ca93d2f6dcbb198d10 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 15:02:47,974 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##47da00bc862c43ca93d2f6dcbb198d10 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 15:02:47,976 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##47da00bc862c43ca93d2f6dcbb198d10 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 15:02:47,980 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##3ec39e85dc4a4f96b1afe33eae0d91e2] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##9aab747f1fad4e9e97ebe1421c7adfc7] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 15:02:47,986 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量] INTO tempdb.dbo.[913f52a6-0c98-4768-8103-45edd51ea579] FROM ##3ec39e85dc4a4f96b1afe33eae0d91e2 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name 时间: 2024-01-19 15:03:32,665 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##557d060f213e49a1be74ddcf1eb6a90b] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##557d060f213e49a1be74ddcf1eb6a90b] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##557d060f213e49a1be74ddcf1eb6a90b] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##557d060f213e49a1be74ddcf1eb6a90b] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##557d060f213e49a1be74ddcf1eb6a90b] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:03:33,236 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[74bde33b-45eb-42d6-adf8-b6acbbb6d959] FROM [##503fd5a72f5a48dc9d5fea9de913e9dd] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:03:47,453 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##b76f149745e0463e9c88b553fb6d7687] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 15:03:47,874 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##9362ac7b0aee43c48b169b9abb8224e5] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 15:03:47,876 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##b76f149745e0463e9c88b553fb6d7687] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##9362ac7b0aee43c48b169b9abb8224e5] 时间: 2024-01-19 15:03:47,934 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##48dbf95a185b46b5805a8d921f02caba a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 15:03:47,936 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##48dbf95a185b46b5805a8d921f02caba SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 15:03:47,938 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##48dbf95a185b46b5805a8d921f02caba a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 15:03:47,968 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##48dbf95a185b46b5805a8d921f02caba SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 15:03:47,970 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##48dbf95a185b46b5805a8d921f02caba SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 15:03:47,973 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##b76f149745e0463e9c88b553fb6d7687] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##51cfd18772614a4c92235b88f4476fb1] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 15:03:47,978 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量] INTO tempdb.dbo.[913f52a6-0c98-4768-8103-45edd51ea579] FROM ##b76f149745e0463e9c88b553fb6d7687 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name 时间: 2024-01-19 15:06:24,288 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##d4f32db4ad3c49caa3966875169d21ac] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 15:06:24,754 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##07a087c0376e4955b114ed61a4107c46] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 15:06:24,756 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##d4f32db4ad3c49caa3966875169d21ac] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##07a087c0376e4955b114ed61a4107c46] 时间: 2024-01-19 15:06:24,824 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##dfcb71d998f04c5fae1a186a3d67221b a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 15:06:24,826 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##dfcb71d998f04c5fae1a186a3d67221b SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 15:06:24,828 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##dfcb71d998f04c5fae1a186a3d67221b a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 15:06:24,860 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##dfcb71d998f04c5fae1a186a3d67221b SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 15:06:24,863 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##dfcb71d998f04c5fae1a186a3d67221b SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 15:06:24,867 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##d4f32db4ad3c49caa3966875169d21ac] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##e79766d0fd0c48109c8a481bca49145a] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 15:06:24,871 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量] INTO tempdb.dbo.[913f52a6-0c98-4768-8103-45edd51ea579] FROM ##d4f32db4ad3c49caa3966875169d21ac A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name 时间: 2024-01-19 15:07:08,976 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##5b9b11b795ef4c86a9e64a13ee07d060] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##5b9b11b795ef4c86a9e64a13ee07d060] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##d0ea0a481a75409c8e279f36dd1af485] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##5b9b11b795ef4c86a9e64a13ee07d060] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##5b9b11b795ef4c86a9e64a13ee07d060] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##d0ea0a481a75409c8e279f36dd1af485] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##5b9b11b795ef4c86a9e64a13ee07d060] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##5b9b11b795ef4c86a9e64a13ee07d060] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##d0ea0a481a75409c8e279f36dd1af485] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##5b9b11b795ef4c86a9e64a13ee07d060] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##d0ea0a481a75409c8e279f36dd1af485] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##5b9b11b795ef4c86a9e64a13ee07d060] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##5b9b11b795ef4c86a9e64a13ee07d060] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##d0ea0a481a75409c8e279f36dd1af485] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:07:09,515 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[74bde33b-45eb-42d6-adf8-b6acbbb6d959] FROM [##5b9b11b795ef4c86a9e64a13ee07d060] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:08:00,085 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##58863b4703de434c994217fae5455993] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##58863b4703de434c994217fae5455993] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a1ad2b87fc83436b9efb826cf943e40e] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##58863b4703de434c994217fae5455993] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##58863b4703de434c994217fae5455993] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##a1ad2b87fc83436b9efb826cf943e40e] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##58863b4703de434c994217fae5455993] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##58863b4703de434c994217fae5455993] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##a1ad2b87fc83436b9efb826cf943e40e] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##58863b4703de434c994217fae5455993] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##a1ad2b87fc83436b9efb826cf943e40e] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##58863b4703de434c994217fae5455993] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##58863b4703de434c994217fae5455993] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a1ad2b87fc83436b9efb826cf943e40e] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:08:00,621 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[24adc5ef-981e-444a-a66d-07f0320e7437] FROM [##58863b4703de434c994217fae5455993] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:08:11,428 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##5313c77ac8d64caaaec8074c8b41d159] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##5313c77ac8d64caaaec8074c8b41d159] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##38b0d3b3070e418da2bb15effc578a73] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##5313c77ac8d64caaaec8074c8b41d159] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##5313c77ac8d64caaaec8074c8b41d159] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##38b0d3b3070e418da2bb15effc578a73] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##5313c77ac8d64caaaec8074c8b41d159] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##5313c77ac8d64caaaec8074c8b41d159] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##38b0d3b3070e418da2bb15effc578a73] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##5313c77ac8d64caaaec8074c8b41d159] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##38b0d3b3070e418da2bb15effc578a73] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##5313c77ac8d64caaaec8074c8b41d159] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##5313c77ac8d64caaaec8074c8b41d159] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##38b0d3b3070e418da2bb15effc578a73] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:08:12,043 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[24adc5ef-981e-444a-a66d-07f0320e7437] FROM [##5313c77ac8d64caaaec8074c8b41d159] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:09:43,606 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##ac636f8eb7a74ddfa7c177e07836c55e] ORDER BY Goods_no 时间: 2024-01-19 15:09:53,795 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##628ba2b484e64dfcaf2aa1385e960445] ORDER BY Goods_no 时间: 2024-01-19 15:10:18,543 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##c7a9eb2cce5346cdb60efda0b58f0fcd] ORDER BY Goods_no 时间: 2024-01-19 15:11:14,250 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##0c8ecc4108a64f3898797b2d23393e7a] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##0c8ecc4108a64f3898797b2d23393e7a] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##261623aff77f4168afd4f9cf15fa9f5a] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##0c8ecc4108a64f3898797b2d23393e7a] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##0c8ecc4108a64f3898797b2d23393e7a] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##261623aff77f4168afd4f9cf15fa9f5a] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##0c8ecc4108a64f3898797b2d23393e7a] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##0c8ecc4108a64f3898797b2d23393e7a] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##261623aff77f4168afd4f9cf15fa9f5a] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##0c8ecc4108a64f3898797b2d23393e7a] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##261623aff77f4168afd4f9cf15fa9f5a] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##0c8ecc4108a64f3898797b2d23393e7a] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##0c8ecc4108a64f3898797b2d23393e7a] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##261623aff77f4168afd4f9cf15fa9f5a] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:11:14,910 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##0c8ecc4108a64f3898797b2d23393e7a] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:13:29,980 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##b7ff171a95e34949a58788f48e131ac0] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##b7ff171a95e34949a58788f48e131ac0] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##206f4ac1ecbe4e4494ba43b5daae9cb4] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##b7ff171a95e34949a58788f48e131ac0] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##b7ff171a95e34949a58788f48e131ac0] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##206f4ac1ecbe4e4494ba43b5daae9cb4] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##b7ff171a95e34949a58788f48e131ac0] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##b7ff171a95e34949a58788f48e131ac0] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##206f4ac1ecbe4e4494ba43b5daae9cb4] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##b7ff171a95e34949a58788f48e131ac0] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##206f4ac1ecbe4e4494ba43b5daae9cb4] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##b7ff171a95e34949a58788f48e131ac0] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##b7ff171a95e34949a58788f48e131ac0] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##206f4ac1ecbe4e4494ba43b5daae9cb4] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:13:30,668 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##b7ff171a95e34949a58788f48e131ac0] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:15:00,388 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##2feb8ee8757140c9a4b3c03beb86218e] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##2feb8ee8757140c9a4b3c03beb86218e] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##dd3712dde2a64ca8b546bfc25b9dd3bb] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##2feb8ee8757140c9a4b3c03beb86218e] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##2feb8ee8757140c9a4b3c03beb86218e] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##dd3712dde2a64ca8b546bfc25b9dd3bb] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##2feb8ee8757140c9a4b3c03beb86218e] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##2feb8ee8757140c9a4b3c03beb86218e] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##dd3712dde2a64ca8b546bfc25b9dd3bb] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##2feb8ee8757140c9a4b3c03beb86218e] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##dd3712dde2a64ca8b546bfc25b9dd3bb] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##2feb8ee8757140c9a4b3c03beb86218e] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##2feb8ee8757140c9a4b3c03beb86218e] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##dd3712dde2a64ca8b546bfc25b9dd3bb] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:15:00,958 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##2feb8ee8757140c9a4b3c03beb86218e] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:15:10,070 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##8344d78556914fea9461f76d0c49ac93] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##8344d78556914fea9461f76d0c49ac93] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##3aca44d8af174060ad161c0b40979fa6] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##8344d78556914fea9461f76d0c49ac93] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##8344d78556914fea9461f76d0c49ac93] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##3aca44d8af174060ad161c0b40979fa6] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##8344d78556914fea9461f76d0c49ac93] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##8344d78556914fea9461f76d0c49ac93] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##3aca44d8af174060ad161c0b40979fa6] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##8344d78556914fea9461f76d0c49ac93] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##3aca44d8af174060ad161c0b40979fa6] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##8344d78556914fea9461f76d0c49ac93] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##8344d78556914fea9461f76d0c49ac93] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##3aca44d8af174060ad161c0b40979fa6] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:15:10,632 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##8344d78556914fea9461f76d0c49ac93] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:15:57,611 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##0bc2058e9bea4878a8899537ee936187] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 15:15:58,088 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##9ef3a8ed5ec34f33886243186e4a2e93] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 15:15:58,090 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##0bc2058e9bea4878a8899537ee936187] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##9ef3a8ed5ec34f33886243186e4a2e93] 时间: 2024-01-19 15:15:58,151 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##483adc6a95b34f00a5c4b788dec3f50e a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 15:15:58,155 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##483adc6a95b34f00a5c4b788dec3f50e SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 15:15:58,159 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##483adc6a95b34f00a5c4b788dec3f50e a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 15:15:58,194 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##483adc6a95b34f00a5c4b788dec3f50e SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 15:15:58,196 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##483adc6a95b34f00a5c4b788dec3f50e SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 15:15:58,200 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##0bc2058e9bea4878a8899537ee936187] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##35769b13cf16459a89479964f9efaa88] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 15:15:58,207 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[f47fe86d-c7d1-4acf-aa88-071e7348c64d] FROM ##0bc2058e9bea4878a8899537ee936187 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 15:16:21,204 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##dc8027c25c944c0f8c1d0878800269f3] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 15:16:21,616 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##c95b7e131d4f43b8930b694cd556adf3] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 15:16:21,618 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##dc8027c25c944c0f8c1d0878800269f3] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##c95b7e131d4f43b8930b694cd556adf3] 时间: 2024-01-19 15:16:21,701 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##dbdabc097f0e4779a301f4991d2637ec a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 15:16:21,704 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##dbdabc097f0e4779a301f4991d2637ec SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 15:16:21,708 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##dbdabc097f0e4779a301f4991d2637ec a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 15:16:21,739 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##dbdabc097f0e4779a301f4991d2637ec SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 15:16:21,741 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##dbdabc097f0e4779a301f4991d2637ec SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 15:16:21,744 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##dc8027c25c944c0f8c1d0878800269f3] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##42b1571fe57049a6a998d5cb1f0fd70a] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 15:16:21,751 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[f47fe86d-c7d1-4acf-aa88-071e7348c64d] FROM ##dc8027c25c944c0f8c1d0878800269f3 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 15:16:49,866 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##76a91db02b0c41fba15682406927c28c] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##76a91db02b0c41fba15682406927c28c] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##c8e0a186b6f0471cb481dec2df210d9c] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##76a91db02b0c41fba15682406927c28c] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##76a91db02b0c41fba15682406927c28c] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##c8e0a186b6f0471cb481dec2df210d9c] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##76a91db02b0c41fba15682406927c28c] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##76a91db02b0c41fba15682406927c28c] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##c8e0a186b6f0471cb481dec2df210d9c] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##76a91db02b0c41fba15682406927c28c] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##c8e0a186b6f0471cb481dec2df210d9c] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##76a91db02b0c41fba15682406927c28c] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##76a91db02b0c41fba15682406927c28c] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##c8e0a186b6f0471cb481dec2df210d9c] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:16:50,428 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##76a91db02b0c41fba15682406927c28c] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:17:47,255 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PrintStatus = 1 FROM [##dbc676fd96ed4eb88d9d2edb1da050f2] A WHERE EXISTS( SELECT 1 FROM BillPrint WHERE BillType = 'Wout' AND A.DeliveryID = BillNo ) 时间: 2024-01-19 15:17:47,259 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##dbc676fd96ed4eb88d9d2edb1da050f2] SET IsInStock = CASE WHEN ISNULL(B.Posted,0) = 1 THEN 1 ELSE 0 END FROM [##dbc676fd96ed4eb88d9d2edb1da050f2] A INNER JOIN ShopTin B ON A.DeliveryID = B.DeliveryID WHERE 1 = 1 时间: 2024-01-19 15:17:47,265 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 0 FROM [##dbc676fd96ed4eb88d9d2edb1da050f2] A WHERE NOT EXISTS(SELECT * FROM ShopTin WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 15:17:47,270 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET IsInStock = 1 FROM [##dbc676fd96ed4eb88d9d2edb1da050f2] A WHERE EXISTS(SELECT * FROM PuReceipt WHERE DeliveryID = A.DeliveryID) 时间: 2024-01-19 15:17:47,276 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET SortingQuantity = ISNULL(B.Quantity,0) FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 A INNER JOIN ( SELECT A.SortingID, SUM(ISNULL(Quantity,0)) As Quantity FROM SortingGoods A WHERE EXISTS( SELECT 1 FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 WHERE A.SortingID = SortingID ) AND EXISTS (SELECT 1 FROM [##31ec4cc55fa540e897a63daaf8dade40] WHERE Goods_No = A.Goods_No) GROUP BY A.SortingID ) B ON A.SortingID = B.SortingID 时间: 2024-01-19 15:17:47,326 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OrderQuantity = ISNULL(B.Quantity,0) FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 A INNER JOIN ( SELECT A.OrderID, SUM(ISNULL(Quantity,0)) As Quantity FROM OrderGoods A WHERE EXISTS( SELECT 1 FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 WHERE A.OrderID = OrderID ) AND EXISTS (SELECT 1 FROM [##31ec4cc55fa540e897a63daaf8dade40] WHERE Goods_No = A.Goods_No) GROUP BY A.OrderID ) B ON A.OrderID = B.OrderID 时间: 2024-01-19 15:17:47,381 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), Amount = ISNULL(B.Amount,0), DpAmount = ISNULL(B.DpAmount,0) FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(A.Quantity,0)) As Quantity, SUM(ISNULL(A.Quantity,0) * ISNULL(A.UnitPrice,0)) As Amount , SUM(ISNULL(A.Quantity,0) * ISNULL(vdp.DpPriceByBatch,0)) As DpAmount FROM DeliveryGoods A LEFT JOIN Delivery B ON A.DeliveryID=B.DeliveryID LEFT JOIN vGoodsDpPrice vdp ON vdp.Goods_No = a.Goods_No AND vdp.Customer_ID = b.Customer_ID LEFT JOIN Goods G ON A.Goods_No=G.Goods_No WHERE EXISTS( SELECT 1 FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##31ec4cc55fa540e897a63daaf8dade40] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 15:17:47,489 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET ReceiveQuantity = ISNULL(B.Quantity,0) FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM ShopTinSSGoods A INNER JOIN ShopTin B ON A.ShopTinID = B.ShopTinID WHERE B.DeliveryID IS NOT NULL AND EXISTS( SELECT 1 FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 WHERE B.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##31ec4cc55fa540e897a63daaf8dade40] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 15:17:47,729 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReceiptQuantity = ISNULL(B.Quantity,0) FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 A INNER JOIN ( SELECT B.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM ##dbc676fd96ed4eb88d9d2edb1da050f2 C WHERE B.DeliveryID = C.DeliveryID ) AND EXISTS (SELECT 1 FROM [##31ec4cc55fa540e897a63daaf8dade40] WHERE Goods_No = A.Goods_No) GROUP BY B.DeliveryID ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 15:17:47,928 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##dbc676fd96ed4eb88d9d2edb1da050f2 SET ChangeQuantity = ISNULL(Quantity,0) - ISNULL(ReceiveQuantity,0) , ChangeWarehouse = ISNULL(Quantity,0) - ISNULL(PuReceiptQuantity,0) 时间: 2024-01-19 15:17:47,930 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET BoxCount = ISNULL(B.BoxCount,0) FROM [##dbc676fd96ed4eb88d9d2edb1da050f2] A INNER JOIN ( SELECT A.AccBillNo As DeliveryID, COUNT(DISTINCT A.BoxNo) AS BoxCount FROM BoxBill A INNER JOIN Boxes B ON A.BoxNo = B.BoxNo WHERE A.AccBillType = 'WareDelivery' AND EXISTS( SELECT 1 FROM [##dbc676fd96ed4eb88d9d2edb1da050f2] WHERE A.AccBillNo = DeliveryID ) GROUP BY A.AccBillNo ) B ON A.DeliveryID = B.DeliveryID 时间: 2024-01-19 15:17:47,970 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, DeliveryID AS [单号], Manual_ID AS [手工单号] , Delivery_Date AS [日期], Mode AS [出货方式], OrderID AS [订货单号], SortingID AS [配货单号] , CartonID AS [装箱单号], RetailOrderID AS [零售订单号], rtrim(Warehouse_No) AS [仓库编号] , Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], FreightCorp AS [货运公司], YunBillID AS [物流单号], Quantity AS [数量] , DpAmount AS [吊牌额] , Amount AS [结算额] , OrderQuantity AS [业务状态#订货数], PuReceiptQuantity AS [业务状态#厂家来货数] , SortingQuantity AS [业务状态#配货数], BoxCount [业务状态#箱数], ReceiveQuantity AS [业务状态#渠道收货数] , ChangeQuantity AS [业务状态#渠道收货差异],ChangeWarehouse AS [业务状态#仓库收货差异], IsInStock AS [业务状态#入库] , JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期] , Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称], Input_Date AS [单据状态#录入日期] , Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称],PostedDate AS [单据状态#审核日期] , PrintStatus AS [单据状态#打印], Flag AS [单据状态#完成], Remark AS [备注] INTO tempdb.dbo.[082cd5d2-2671-4712-a2ea-f19f0f8d8b20] FROM [##dbc676fd96ed4eb88d9d2edb1da050f2] ORDER BY Delivery_Date DESC, DeliveryID ASC 时间: 2024-01-19 15:27:15,068 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##62f9b072dbd94866815ace913359c0a2] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##62f9b072dbd94866815ace913359c0a2] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b3b2df0166ad42b89a5415f5cd625dfb] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##62f9b072dbd94866815ace913359c0a2] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##62f9b072dbd94866815ace913359c0a2] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##b3b2df0166ad42b89a5415f5cd625dfb] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##62f9b072dbd94866815ace913359c0a2] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##62f9b072dbd94866815ace913359c0a2] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##b3b2df0166ad42b89a5415f5cd625dfb] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##62f9b072dbd94866815ace913359c0a2] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##b3b2df0166ad42b89a5415f5cd625dfb] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##62f9b072dbd94866815ace913359c0a2] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##62f9b072dbd94866815ace913359c0a2] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b3b2df0166ad42b89a5415f5cd625dfb] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:27:15,658 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##62f9b072dbd94866815ace913359c0a2] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:34:37,797 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(W.Company_ID AS VARCHAR(50)) AS Company_ID, A.Warehouse_No, B.Goods_No, C.ColorID, C.Long , CAST(C.[S1] AS INT) AS [库存#S1], CAST(NULL AS INT) AS 库存#数量 , CAST(C.[S1] AS INT) AS [在途库存#S1], CAST(NULL AS INT) AS 在途库存#数量 , CAST(C.[S1] AS INT) AS [库存合计#S1], CAST(NULL AS INT) AS 库存合计#数量 , CAST(C.[S1] AS INT) AS [可用库存#S1], CAST(NULL AS INT) AS 可用库存#数量 , CAST(C.[S1] AS INT) AS [占用数#S1], CAST(NULL AS INT) AS 占用数#数量 INTO [##86fdb78e20864fa3804ef3561f2e1ee6] FROM Delivery A, Barcode B, DeliveryDetail C, Warehouse W 时间: 2024-01-19 15:34:38,109 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##86fdb78e20864fa3804ef3561f2e1ee6] (Company_ID, Warehouse_No, Goods_No, ColorID, Long, [库存#S1], 库存#数量) SELECT W.Company_ID, A.Warehouse_No, A.Goods_No, A.ColorID, A.Long, [S1], (ISNULL([S1], 0)) FROM [##0fcb363113fa4cc8a7ac7ca857b183f3] A INNER JOIN Warehouse W ON W.Warehouse_No = A.Warehouse_No 时间: 2024-01-19 15:34:38,567 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##86fdb78e20864fa3804ef3561f2e1ee6] (Company_ID, Warehouse_No, Goods_No, ColorID, Long, [在途库存#S1], 在途库存#数量) SELECT W.Company_ID, A.Warehouse_No, A.Goods_No, A.ColorID, A.Long, [S1], (ISNULL([S1], 0)) FROM [##e892666c7d6e43719ea5fd0222ed9608] A INNER JOIN Warehouse W ON W.Warehouse_No = A.Warehouse_No 时间: 2024-01-19 15:34:39,323 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##86fdb78e20864fa3804ef3561f2e1ee6] (Company_ID, Warehouse_No, Goods_No, ColorID, Long, [可用库存#S1], 可用库存#数量) SELECT W.Company_ID, A.Warehouse_No, A.Goods_No, A.ColorID, A.Long, [S1], (ISNULL([S1], 0)) FROM [##c1d54d709fbc452dbdebb47ca3055143] A INNER JOIN Warehouse W ON W.Warehouse_No = A.Warehouse_No 时间: 2024-01-19 15:34:39,332 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE [##86fdb78e20864fa3804ef3561f2e1ee6] SET 库存合计#数量 = ISNULL(库存#数量,0) + ISNULL(在途库存#数量,0), [库存合计#S1] = ISNULL([库存#S1], 0) + ISNULL([在途库存#S1], 0) 时间: 2024-01-19 15:34:39,334 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##86fdb78e20864fa3804ef3561f2e1ee6 SET 占用数#数量 = ISNULL(库存#数量,0) - ISNULL(可用库存#数量, 0), [占用数#S1] = ISNULL([库存#S1], 0) - ISNULL([可用库存#S1], 0) 时间: 2024-01-19 15:35:46,593 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##95dc77c8027a4ee388b174458a54b661] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##95dc77c8027a4ee388b174458a54b661] WHERE A.PuReceiptID = PuReceiptID ) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##95dc77c8027a4ee388b174458a54b661] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##95dc77c8027a4ee388b174458a54b661] WHERE A.DeliveryID = DeliveryID ) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##95dc77c8027a4ee388b174458a54b661] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##95dc77c8027a4ee388b174458a54b661] WHERE A.Purchase_ID = Purchase_ID ) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##95dc77c8027a4ee388b174458a54b661] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##95dc77c8027a4ee388b174458a54b661] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##95dc77c8027a4ee388b174458a54b661] WHERE A.PuReceiptID = PuReceiptID ) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:35:46,722 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##95dc77c8027a4ee388b174458a54b661] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:35:57,748 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##36a68426d7f34ee0bc1a2546aa053585] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##36a68426d7f34ee0bc1a2546aa053585] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##2f4b48e8801544ceb1d2c8f89ca0b532] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##36a68426d7f34ee0bc1a2546aa053585] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##36a68426d7f34ee0bc1a2546aa053585] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##2f4b48e8801544ceb1d2c8f89ca0b532] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##36a68426d7f34ee0bc1a2546aa053585] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##36a68426d7f34ee0bc1a2546aa053585] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##2f4b48e8801544ceb1d2c8f89ca0b532] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##36a68426d7f34ee0bc1a2546aa053585] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##2f4b48e8801544ceb1d2c8f89ca0b532] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##36a68426d7f34ee0bc1a2546aa053585] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##36a68426d7f34ee0bc1a2546aa053585] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##2f4b48e8801544ceb1d2c8f89ca0b532] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:35:58,614 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##36a68426d7f34ee0bc1a2546aa053585] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:37:37,855 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##582cb67bedb24df3ac7807bb3ab887b2] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##582cb67bedb24df3ac7807bb3ab887b2] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##1ba6dda27d0e43e3a28b3a6a2d91b561] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##582cb67bedb24df3ac7807bb3ab887b2] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##582cb67bedb24df3ac7807bb3ab887b2] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##1ba6dda27d0e43e3a28b3a6a2d91b561] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##582cb67bedb24df3ac7807bb3ab887b2] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##582cb67bedb24df3ac7807bb3ab887b2] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##1ba6dda27d0e43e3a28b3a6a2d91b561] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##582cb67bedb24df3ac7807bb3ab887b2] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##1ba6dda27d0e43e3a28b3a6a2d91b561] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##582cb67bedb24df3ac7807bb3ab887b2] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##582cb67bedb24df3ac7807bb3ab887b2] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##1ba6dda27d0e43e3a28b3a6a2d91b561] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:37:38,493 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##582cb67bedb24df3ac7807bb3ab887b2] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:39:10,867 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##78a928bc870146239e774a42f09c604b] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##78a928bc870146239e774a42f09c604b] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##17777c2a50ab47359fbf683fdec58744] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##78a928bc870146239e774a42f09c604b] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##78a928bc870146239e774a42f09c604b] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##17777c2a50ab47359fbf683fdec58744] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##78a928bc870146239e774a42f09c604b] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##78a928bc870146239e774a42f09c604b] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##17777c2a50ab47359fbf683fdec58744] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##78a928bc870146239e774a42f09c604b] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##17777c2a50ab47359fbf683fdec58744] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##78a928bc870146239e774a42f09c604b] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##78a928bc870146239e774a42f09c604b] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##17777c2a50ab47359fbf683fdec58744] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:39:11,455 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##78a928bc870146239e774a42f09c604b] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:40:37,972 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##8b8f7301ae044968a9c98db56c51739f] ORDER BY Goods_no 时间: 2024-01-19 15:40:54,223 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b9085f88aedc413191be73c9d0a78d22] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##b9085f88aedc413191be73c9d0a78d22] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##b9085f88aedc413191be73c9d0a78d22] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##b9085f88aedc413191be73c9d0a78d22] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b9085f88aedc413191be73c9d0a78d22] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:40:54,820 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##21b47e7dcc7b4166999bf1dc4fc3b755] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:41:12,473 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##6b6147460da94498bca1f0ceba6328f2] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##6b6147460da94498bca1f0ceba6328f2] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a8e9fbe17e4141389d60c5e53a92cc1b] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##6b6147460da94498bca1f0ceba6328f2] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##6b6147460da94498bca1f0ceba6328f2] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##a8e9fbe17e4141389d60c5e53a92cc1b] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##6b6147460da94498bca1f0ceba6328f2] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##6b6147460da94498bca1f0ceba6328f2] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##a8e9fbe17e4141389d60c5e53a92cc1b] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##6b6147460da94498bca1f0ceba6328f2] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##a8e9fbe17e4141389d60c5e53a92cc1b] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##6b6147460da94498bca1f0ceba6328f2] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##6b6147460da94498bca1f0ceba6328f2] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a8e9fbe17e4141389d60c5e53a92cc1b] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:41:13,036 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##6b6147460da94498bca1f0ceba6328f2] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:43:24,073 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##02d8a012e43e46708836e527181faa42] ORDER BY Goods_no 时间: 2024-01-19 15:43:40,245 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##195abd02ad8f4585be7407872234311f] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##195abd02ad8f4585be7407872234311f] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##16be9c2b11e64ab1a2e031c27d21eb82] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##195abd02ad8f4585be7407872234311f] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##195abd02ad8f4585be7407872234311f] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##16be9c2b11e64ab1a2e031c27d21eb82] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##195abd02ad8f4585be7407872234311f] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##195abd02ad8f4585be7407872234311f] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##16be9c2b11e64ab1a2e031c27d21eb82] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##195abd02ad8f4585be7407872234311f] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##16be9c2b11e64ab1a2e031c27d21eb82] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##195abd02ad8f4585be7407872234311f] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##195abd02ad8f4585be7407872234311f] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##16be9c2b11e64ab1a2e031c27d21eb82] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:43:40,814 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##195abd02ad8f4585be7407872234311f] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:45:28,766 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##e591cdd442344436840e9b5fa0c00e3a] ORDER BY Goods_no 时间: 2024-01-19 15:46:42,002 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##a0ac68a5c8cc40fe931087f3abf2a733] ORDER BY Goods_no 时间: 2024-01-19 15:47:05,922 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##c7072e4430354c85845b13ad46bb1a3a] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##c7072e4430354c85845b13ad46bb1a3a] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##0372b89360ec46bcbbfdc082c3961137] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##c7072e4430354c85845b13ad46bb1a3a] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##c7072e4430354c85845b13ad46bb1a3a] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##0372b89360ec46bcbbfdc082c3961137] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##c7072e4430354c85845b13ad46bb1a3a] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##c7072e4430354c85845b13ad46bb1a3a] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##0372b89360ec46bcbbfdc082c3961137] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##c7072e4430354c85845b13ad46bb1a3a] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##0372b89360ec46bcbbfdc082c3961137] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##c7072e4430354c85845b13ad46bb1a3a] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##c7072e4430354c85845b13ad46bb1a3a] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##0372b89360ec46bcbbfdc082c3961137] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:47:06,509 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[24adc5ef-981e-444a-a66d-07f0320e7437] FROM [##c7072e4430354c85845b13ad46bb1a3a] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:50:19,891 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##175b18105c8f4270845c965ef994cdeb] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##175b18105c8f4270845c965ef994cdeb] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##9381405bee3a4e06b571ab9fe86ffb7b] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##175b18105c8f4270845c965ef994cdeb] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##175b18105c8f4270845c965ef994cdeb] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##9381405bee3a4e06b571ab9fe86ffb7b] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##175b18105c8f4270845c965ef994cdeb] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##175b18105c8f4270845c965ef994cdeb] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##9381405bee3a4e06b571ab9fe86ffb7b] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##175b18105c8f4270845c965ef994cdeb] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##9381405bee3a4e06b571ab9fe86ffb7b] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##175b18105c8f4270845c965ef994cdeb] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##175b18105c8f4270845c965ef994cdeb] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##9381405bee3a4e06b571ab9fe86ffb7b] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:50:20,511 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##175b18105c8f4270845c965ef994cdeb] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:51:23,732 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##cfce4a1c5ac54739bec2931dc29404b8] ORDER BY Goods_no 时间: 2024-01-19 15:51:49,883 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##dfe157eaf835427a89f440058adc4f03] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##dfe157eaf835427a89f440058adc4f03] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b85f0e8e7456495291857f05f8e82b12] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##dfe157eaf835427a89f440058adc4f03] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##dfe157eaf835427a89f440058adc4f03] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##b85f0e8e7456495291857f05f8e82b12] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##dfe157eaf835427a89f440058adc4f03] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##dfe157eaf835427a89f440058adc4f03] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##b85f0e8e7456495291857f05f8e82b12] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##dfe157eaf835427a89f440058adc4f03] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##b85f0e8e7456495291857f05f8e82b12] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##dfe157eaf835427a89f440058adc4f03] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##dfe157eaf835427a89f440058adc4f03] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b85f0e8e7456495291857f05f8e82b12] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:51:50,471 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[24adc5ef-981e-444a-a66d-07f0320e7437] FROM [##dfe157eaf835427a89f440058adc4f03] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:54:08,709 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##046976547e1943c3aff38c2791fffc23] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##046976547e1943c3aff38c2791fffc23] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##82d65a869dab4096bf7fe15cadf47756] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##046976547e1943c3aff38c2791fffc23] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##046976547e1943c3aff38c2791fffc23] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##82d65a869dab4096bf7fe15cadf47756] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##046976547e1943c3aff38c2791fffc23] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##046976547e1943c3aff38c2791fffc23] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##82d65a869dab4096bf7fe15cadf47756] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##046976547e1943c3aff38c2791fffc23] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##82d65a869dab4096bf7fe15cadf47756] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##046976547e1943c3aff38c2791fffc23] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##046976547e1943c3aff38c2791fffc23] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##82d65a869dab4096bf7fe15cadf47756] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:54:09,271 线程ID: 8 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[24adc5ef-981e-444a-a66d-07f0320e7437] FROM [##046976547e1943c3aff38c2791fffc23] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:54:11,845 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##f3f1ccd9cc014ef0bf501188126eda1c] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##f3f1ccd9cc014ef0bf501188126eda1c] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##ae0dbc3d11ef4e01ad83ff08010f6eb4] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##f3f1ccd9cc014ef0bf501188126eda1c] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##f3f1ccd9cc014ef0bf501188126eda1c] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##ae0dbc3d11ef4e01ad83ff08010f6eb4] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##f3f1ccd9cc014ef0bf501188126eda1c] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##f3f1ccd9cc014ef0bf501188126eda1c] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##ae0dbc3d11ef4e01ad83ff08010f6eb4] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##f3f1ccd9cc014ef0bf501188126eda1c] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##ae0dbc3d11ef4e01ad83ff08010f6eb4] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##f3f1ccd9cc014ef0bf501188126eda1c] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##f3f1ccd9cc014ef0bf501188126eda1c] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##ae0dbc3d11ef4e01ad83ff08010f6eb4] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:54:12,445 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[24adc5ef-981e-444a-a66d-07f0320e7437] FROM [##f3f1ccd9cc014ef0bf501188126eda1c] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 15:55:33,039 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, Goods_no AS [货号], Goods_name AS [货品名称], Brand AS [品牌] ,Category AS [一级类别], Category2 AS [二级类别] ,Range [系列], Pattern [款型], Item AS [项目], Authorisation [授权] ,Season [季节], [Year] [年份], ManuFacturer 厂家编号, Sex AS [性别], UnitPrice [吊牌价] ,GoodsDate [货期],Modi_Operator [修改人],Modi_OperatorTime [修改日期], [GoodsRemark] [备注], ShutOut [停用] INTO tempdb.dbo.[353d5e5e-8f7d-4281-bc62-6cce1442d726] FROM [##9c4440bdee9c4b3fa9d333243d95dbe0] ORDER BY Goods_no 时间: 2024-01-19 15:56:29,028 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##05ece312de914be7b934fec2296bc9bd] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##05ece312de914be7b934fec2296bc9bd] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##8e2f1ab678b84f489972cc976e634008] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##05ece312de914be7b934fec2296bc9bd] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##05ece312de914be7b934fec2296bc9bd] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##8e2f1ab678b84f489972cc976e634008] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##05ece312de914be7b934fec2296bc9bd] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##05ece312de914be7b934fec2296bc9bd] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##8e2f1ab678b84f489972cc976e634008] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##05ece312de914be7b934fec2296bc9bd] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##8e2f1ab678b84f489972cc976e634008] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##05ece312de914be7b934fec2296bc9bd] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##05ece312de914be7b934fec2296bc9bd] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##8e2f1ab678b84f489972cc976e634008] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 15:56:29,683 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##05ece312de914be7b934fec2296bc9bd] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:02:27,990 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##312a447fccdd4d818870f363eee9b68c] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##312a447fccdd4d818870f363eee9b68c] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##4cdfbcf45c8443f4b28af4f90d99caf2] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##312a447fccdd4d818870f363eee9b68c] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##312a447fccdd4d818870f363eee9b68c] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##4cdfbcf45c8443f4b28af4f90d99caf2] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##312a447fccdd4d818870f363eee9b68c] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##312a447fccdd4d818870f363eee9b68c] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##4cdfbcf45c8443f4b28af4f90d99caf2] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##312a447fccdd4d818870f363eee9b68c] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##4cdfbcf45c8443f4b28af4f90d99caf2] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##312a447fccdd4d818870f363eee9b68c] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##312a447fccdd4d818870f363eee9b68c] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##4cdfbcf45c8443f4b28af4f90d99caf2] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:02:28,552 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##312a447fccdd4d818870f363eee9b68c] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:02:33,009 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##1afe5f2f4dc44287a58c386c305717cb] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##1afe5f2f4dc44287a58c386c305717cb] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##de8d6aec2d494d0cb1197d9334002589] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##1afe5f2f4dc44287a58c386c305717cb] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##1afe5f2f4dc44287a58c386c305717cb] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##de8d6aec2d494d0cb1197d9334002589] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##1afe5f2f4dc44287a58c386c305717cb] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##1afe5f2f4dc44287a58c386c305717cb] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##de8d6aec2d494d0cb1197d9334002589] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##1afe5f2f4dc44287a58c386c305717cb] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##de8d6aec2d494d0cb1197d9334002589] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##1afe5f2f4dc44287a58c386c305717cb] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##1afe5f2f4dc44287a58c386c305717cb] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##de8d6aec2d494d0cb1197d9334002589] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:02:33,548 线程ID: 18 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##1afe5f2f4dc44287a58c386c305717cb] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:02:39,425 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##195a540a71664cbf93fa99b678a413d3] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##195a540a71664cbf93fa99b678a413d3] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##c72a1856efaf4edeb835f319af8763c0] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##195a540a71664cbf93fa99b678a413d3] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##195a540a71664cbf93fa99b678a413d3] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##c72a1856efaf4edeb835f319af8763c0] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##195a540a71664cbf93fa99b678a413d3] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##195a540a71664cbf93fa99b678a413d3] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##c72a1856efaf4edeb835f319af8763c0] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##195a540a71664cbf93fa99b678a413d3] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##c72a1856efaf4edeb835f319af8763c0] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##195a540a71664cbf93fa99b678a413d3] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##195a540a71664cbf93fa99b678a413d3] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##c72a1856efaf4edeb835f319af8763c0] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:02:40,004 线程ID: 22 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##195a540a71664cbf93fa99b678a413d3] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:02:43,259 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##a37593f6147141128dd7322f821b0c06] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##a37593f6147141128dd7322f821b0c06] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##0666d27182154cdf9141f9e487652fd0] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##a37593f6147141128dd7322f821b0c06] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##a37593f6147141128dd7322f821b0c06] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##0666d27182154cdf9141f9e487652fd0] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##a37593f6147141128dd7322f821b0c06] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##a37593f6147141128dd7322f821b0c06] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##0666d27182154cdf9141f9e487652fd0] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##a37593f6147141128dd7322f821b0c06] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##0666d27182154cdf9141f9e487652fd0] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##a37593f6147141128dd7322f821b0c06] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##a37593f6147141128dd7322f821b0c06] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##0666d27182154cdf9141f9e487652fd0] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:02:43,876 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##a37593f6147141128dd7322f821b0c06] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:03:07,892 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##8b4fd3b12f6e4ac586afb033ba2fa25b] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 16:03:08,333 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##92e20f6ad09d48d8831c1c72706e6806] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 16:03:08,335 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##8b4fd3b12f6e4ac586afb033ba2fa25b] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##92e20f6ad09d48d8831c1c72706e6806] 时间: 2024-01-19 16:03:08,394 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##133d8e0173e842c1a1d7adabe9cce7c9 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 16:03:08,398 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##133d8e0173e842c1a1d7adabe9cce7c9 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 16:03:08,399 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##133d8e0173e842c1a1d7adabe9cce7c9 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 16:03:08,427 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##133d8e0173e842c1a1d7adabe9cce7c9 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 16:03:08,429 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##133d8e0173e842c1a1d7adabe9cce7c9 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 16:03:08,433 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##8b4fd3b12f6e4ac586afb033ba2fa25b] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##fec714d9ae4a423083d10ef10a6d6e2f] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 16:03:08,438 线程ID: 19 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[44049c72-7869-4ab4-85fd-55161efe040b] FROM ##8b4fd3b12f6e4ac586afb033ba2fa25b A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 16:03:12,235 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##cef280c9b4e940b98b83a27a21e529f3] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 16:03:12,593 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##56697163f48f4a439c23c2ce6d4d64f7] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 16:03:12,594 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##cef280c9b4e940b98b83a27a21e529f3] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##56697163f48f4a439c23c2ce6d4d64f7] 时间: 2024-01-19 16:03:12,648 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##3332b0de0fd14ef8b83ded0d7a39cbc7 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 16:03:12,650 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##3332b0de0fd14ef8b83ded0d7a39cbc7 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 16:03:12,652 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##3332b0de0fd14ef8b83ded0d7a39cbc7 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 16:03:12,678 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##3332b0de0fd14ef8b83ded0d7a39cbc7 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 16:03:12,680 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##3332b0de0fd14ef8b83ded0d7a39cbc7 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 16:03:12,685 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##cef280c9b4e940b98b83a27a21e529f3] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##b6dfe28e53824db084518aaf6578b665] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 16:03:12,689 线程ID: 43 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[44049c72-7869-4ab4-85fd-55161efe040b] FROM ##cef280c9b4e940b98b83a27a21e529f3 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 16:03:30,556 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##76845c4c92d34569a21d7d24d65fb167] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 16:03:30,977 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##76845c4c92d34569a21d7d24d65fb167] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##265c04f1064447aa87d2136e55791655] 时间: 2024-01-19 16:03:31,036 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##ac15e4d8236e402abfec22f9a4a1f8fb a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 16:03:31,039 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##ac15e4d8236e402abfec22f9a4a1f8fb SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 16:03:31,041 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##ac15e4d8236e402abfec22f9a4a1f8fb a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 16:03:31,070 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##ac15e4d8236e402abfec22f9a4a1f8fb SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 16:03:31,072 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##ac15e4d8236e402abfec22f9a4a1f8fb SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 16:03:31,076 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##76845c4c92d34569a21d7d24d65fb167] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##9e0241e3624e4f3e8dec76b3c188a020] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 16:03:31,079 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##76845c4c92d34569a21d7d24d65fb167] (Customer_ID, Goods_No, ColorID, Long) SELECT C.Customer_ID, A.Goods_No, GC.ColorID, GL.Long FROM ##e6eb87ec015e42ca9a744d43a5dd5f84 C, ##65e1951a538c412f805f849d7fb2a824 A INNER JOIN GoodsColor GC ON GC.Goods_No = A.Goods_No INNER JOIN GoodsLong GL ON GL.Goods_No = A.Goods_No WHERE NOT Exists(SELECT 1 FROM [##76845c4c92d34569a21d7d24d65fb167] D WHERE ISNULL(D.ItemType,0) = 0 AND D.Customer_ID = C.Customer_ID AND D.Goods_No = A.Goods_No AND D.ColorID = GC.ColorID AND D.Long = GL.Long) 时间: 2024-01-19 16:03:31,104 线程ID: 26 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[44049c72-7869-4ab4-85fd-55161efe040b] FROM ##76845c4c92d34569a21d7d24d65fb167 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 16:03:57,001 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##cff0281a476a4505ade35a206e9436ac] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##cff0281a476a4505ade35a206e9436ac] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b0ff27866cd04217a7b2910aa86f7ff4] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##cff0281a476a4505ade35a206e9436ac] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##cff0281a476a4505ade35a206e9436ac] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##b0ff27866cd04217a7b2910aa86f7ff4] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##cff0281a476a4505ade35a206e9436ac] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##cff0281a476a4505ade35a206e9436ac] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##b0ff27866cd04217a7b2910aa86f7ff4] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##cff0281a476a4505ade35a206e9436ac] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##b0ff27866cd04217a7b2910aa86f7ff4] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##cff0281a476a4505ade35a206e9436ac] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##cff0281a476a4505ade35a206e9436ac] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##b0ff27866cd04217a7b2910aa86f7ff4] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:03:57,603 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##cff0281a476a4505ade35a206e9436ac] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:05:16,005 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##f918622ba1604e1bbee490e74c86d96e] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##f918622ba1604e1bbee490e74c86d96e] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##ff6684afe72f4650848e53c1b34a0d75] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##f918622ba1604e1bbee490e74c86d96e] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##f918622ba1604e1bbee490e74c86d96e] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##ff6684afe72f4650848e53c1b34a0d75] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##f918622ba1604e1bbee490e74c86d96e] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##f918622ba1604e1bbee490e74c86d96e] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##ff6684afe72f4650848e53c1b34a0d75] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##f918622ba1604e1bbee490e74c86d96e] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##ff6684afe72f4650848e53c1b34a0d75] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##f918622ba1604e1bbee490e74c86d96e] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##f918622ba1604e1bbee490e74c86d96e] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##ff6684afe72f4650848e53c1b34a0d75] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:05:16,666 线程ID: 23 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[29b6e1c9-76a2-428a-b736-9b336c0e5c3b] FROM [##f918622ba1604e1bbee490e74c86d96e] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:12:37,328 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0) FROM [##6f131a25c0b9450d9995718646d4f1d9] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(Quantity,0)) As Quantity FROM PuReceiptGoods A WHERE EXISTS( SELECT 1 FROM [##6f131a25c0b9450d9995718646d4f1d9] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a4e98cb4acae448dbde2ec50f27446ae] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID UPDATE A SET DeliveryQuantity = ISNULL(B.Quantity,0) FROM [##6f131a25c0b9450d9995718646d4f1d9] A INNER JOIN ( SELECT A.DeliveryID, SUM(ISNULL(Quantity,0)) As Quantity FROM DeliveryGoods A WHERE EXISTS( SELECT 1 FROM [##6f131a25c0b9450d9995718646d4f1d9] WHERE A.DeliveryID = DeliveryID ) AND EXISTS (SELECT 1 FROM [##a4e98cb4acae448dbde2ec50f27446ae] WHERE Goods_No = A.Goods_No) GROUP BY A.DeliveryID ) B ON A.DeliveryID = B.DeliveryID UPDATE A SET PurchaseQuantity = ISNULL(B.Quantity,0) FROM [##6f131a25c0b9450d9995718646d4f1d9] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(Quantity,0)) As Quantity FROM PurchaseGoods A WHERE EXISTS( SELECT 1 FROM [##6f131a25c0b9450d9995718646d4f1d9] WHERE A.Purchase_ID = Purchase_ID ) AND EXISTS (SELECT 1 FROM [##a4e98cb4acae448dbde2ec50f27446ae] WHERE Goods_No = A.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET PurchaseDiffQuantity = ISNULL(A.PurchaseQuantity,0) - ISNULL(B.Quantity,0) FROM [##6f131a25c0b9450d9995718646d4f1d9] A INNER JOIN ( SELECT A.Purchase_ID, SUM(ISNULL(R.Quantity,0)) As Quantity FROM PuReceipt A INNER JOIN PuReceiptGoods R ON A.PuReceiptID = R.PuReceiptID INNER JOIN Purchase P ON A.Purchase_ID = P.Purchase_ID WHERE 1 = 1 AND A.[Type] = 1 AND EXISTS (SELECT 1 FROM [##a4e98cb4acae448dbde2ec50f27446ae] WHERE Goods_No = R.Goods_No) GROUP BY A.Purchase_ID ) B ON A.Purchase_ID = B.Purchase_ID UPDATE A SET DpAmount = ISNULL(B.DpAmount,0),BillAmount = ISNULL(B.BillAmount,0) FROM [##6f131a25c0b9450d9995718646d4f1d9] A INNER JOIN ( SELECT A.PuReceiptID, SUM(A.Quantity * A.UnitPrice) As BillAmount,SUM(A.Quantity * B.UnitPrice) As DpAmount FROM PuReceiptGoods A LEFT JOIN Goods B ON A.Goods_No=B.Goods_No WHERE EXISTS( SELECT 1 FROM [##6f131a25c0b9450d9995718646d4f1d9] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a4e98cb4acae448dbde2ec50f27446ae] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:12:37,873 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], Purchase_ID AS [采购单号], ArrivalID AS [到货通知单号], DeliveryID AS [出货单号], ReceiptMode AS [收货方式], rtrim(Supply_No) AS [供应商编号], Supply_Abv AS [供应商简称], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], Quantity AS [数量], DpAmount AS [吊牌额], BillAmount AS [采购额], PurchaseQuantity AS [业务状态#采购数], PurchaseDiffQuantity AS [业务状态#采购差异], DeliveryQuantity AS [业务状态#出货数], DifferencesQuantity AS [业务状态#出货差异], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核人名称], PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[2e5e12b4-98ac-407a-9d48-5867f056155e] FROM [##6f131a25c0b9450d9995718646d4f1d9] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:12:44,884 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##492c0d54fdf4458b8036ec4eb1f88b2c] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 16:12:45,320 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##492c0d54fdf4458b8036ec4eb1f88b2c] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##7ba2fca04b0e48e6a219264c58fda49b] 时间: 2024-01-19 16:12:45,378 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##a115ced1f47948a4a788ba0859aacbcb a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 16:12:45,380 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##a115ced1f47948a4a788ba0859aacbcb SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 16:12:45,382 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##a115ced1f47948a4a788ba0859aacbcb a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 16:12:45,412 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##a115ced1f47948a4a788ba0859aacbcb SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 16:12:45,414 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##a115ced1f47948a4a788ba0859aacbcb SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 16:12:45,416 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##492c0d54fdf4458b8036ec4eb1f88b2c] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##69f67c240ce44df483c4d28f29179fa1] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 16:12:45,419 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##492c0d54fdf4458b8036ec4eb1f88b2c] (Customer_ID, Goods_No, ColorID, Long) SELECT C.Customer_ID, A.Goods_No, GC.ColorID, GL.Long FROM ##0118f15cfc984ebc8650cc7c72275726 C, ##82e2661c3b1d44df83f690e72cbe869f A INNER JOIN GoodsColor GC ON GC.Goods_No = A.Goods_No INNER JOIN GoodsLong GL ON GL.Goods_No = A.Goods_No WHERE NOT Exists(SELECT 1 FROM [##492c0d54fdf4458b8036ec4eb1f88b2c] D WHERE ISNULL(D.ItemType,0) = 0 AND D.Customer_ID = C.Customer_ID AND D.Goods_No = A.Goods_No AND D.ColorID = GC.ColorID AND D.Long = GL.Long) 时间: 2024-01-19 16:12:45,451 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[44049c72-7869-4ab4-85fd-55161efe040b] FROM ##492c0d54fdf4458b8036ec4eb1f88b2c A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 16:12:53,370 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##86fd535d05944a849a8cef55e138828b] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 16:12:53,832 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##c9c3c2b31fb2401aafaebfa042649124] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 16:12:53,834 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##86fd535d05944a849a8cef55e138828b] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##c9c3c2b31fb2401aafaebfa042649124] 时间: 2024-01-19 16:12:53,894 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##52c56498178f47d5be196305bca2ac41 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 16:12:53,896 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##52c56498178f47d5be196305bca2ac41 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 16:12:53,899 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##52c56498178f47d5be196305bca2ac41 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 16:12:53,932 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##52c56498178f47d5be196305bca2ac41 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 16:12:53,934 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##52c56498178f47d5be196305bca2ac41 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 16:12:53,938 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##86fd535d05944a849a8cef55e138828b] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##103434550ea440ed9f079b61373e4428] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 16:12:53,943 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[44049c72-7869-4ab4-85fd-55161efe040b] FROM ##86fd535d05944a849a8cef55e138828b A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 16:13:05,463 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##415f88d8aac949d88a38b32d7a2a1103] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 16:13:05,910 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##6091c14c72a3435a9a540816f989c7ee] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 16:13:05,912 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##415f88d8aac949d88a38b32d7a2a1103] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##6091c14c72a3435a9a540816f989c7ee] 时间: 2024-01-19 16:13:06,000 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##85a9d9c12ec54ac8aa156befa194c24f a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 16:13:06,003 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##85a9d9c12ec54ac8aa156befa194c24f SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 16:13:06,007 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##85a9d9c12ec54ac8aa156befa194c24f a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 16:13:06,045 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##85a9d9c12ec54ac8aa156befa194c24f SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 16:13:06,047 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##85a9d9c12ec54ac8aa156befa194c24f SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 16:13:06,050 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##415f88d8aac949d88a38b32d7a2a1103] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##438565710fb9451f8317125694f75d8b] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 16:13:06,058 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], GS.UnitPrice AS [吊牌价], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量], CAST(NULL AS IMAGE) AS [图片] INTO tempdb.dbo.[44049c72-7869-4ab4-85fd-55161efe040b] FROM ##415f88d8aac949d88a38b32d7a2a1103 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice ORDER BY CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name, GS.UnitPrice 时间: 2024-01-19 16:13:32,757 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), BalanceAmount = ISNULL(B.BalanceAmount,0), DpAmount = ISNULL(B.DpAmount,0) FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(GDP.DpPriceByBatch,0) * ISNULL(A.Quantity,0)) As DpAmount, SUM(ISNULL(A.BalancePrice,0) * ISNULL(A.Quantity,0)) As BalanceAmount, SUM(ISNULL(A.Quantity,0)) As Quantity FROM PuReceiptSSGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID LEFT JOIN vGoodsDpPrice GDP ON B.Customer_ID = GDP.Customer_ID AND A.Goods_No = GDP.Goods_No WHERE EXISTS( SELECT 1 FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##9422bfe2033845ffa9530598a220f058] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:13:32,957 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OldQuantity = ISNULL(B.Quantity,0) FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##9422bfe2033845ffa9530598a220f058] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:13:33,119 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET DealeReturnQuantity = ISNULL(B.Quantity,0) FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] A INNER JOIN ( SELECT A.DealereturnID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM DealeReturnGoods A INNER JOIN Dealereturn B ON A.DealereturnID = B.DealereturnID WHERE EXISTS( SELECT 1 FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] WHERE A.DealereturnID = DealereturnID ) AND EXISTS (SELECT 1 FROM [##9422bfe2033845ffa9530598a220f058] WHERE Goods_No = A.Goods_No) GROUP BY A.DealereturnID ) B ON A.DealereturnID = B.DealereturnID 时间: 2024-01-19 16:13:33,284 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET RenoticeQuantity = ISNULL(B.Quantity,0) FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] A INNER JOIN ( SELECT A.RenoticeID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM RenoticeGoods A INNER JOIN Renotice B ON A.RenoticeID = B.RenoticeID WHERE EXISTS( SELECT 1 FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] WHERE A.RenoticeID = RenoticeID ) AND EXISTS (SELECT 1 FROM [##9422bfe2033845ffa9530598a220f058] WHERE Goods_No = A.Goods_No) GROUP BY A.RenoticeID ) B ON A.RenoticeID = B.RenoticeID 时间: 2024-01-19 16:13:33,416 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReturnQuantity = ISNULL(B.Quantity,0) FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] A INNER JOIN ( SELECT A.PuReturnID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM PuReturnGoods A INNER JOIN PuReturn B ON A.PuReturnID = B.PuReturnID WHERE EXISTS( SELECT 1 FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] WHERE A.PuReturnID = PuReturnID ) AND EXISTS (SELECT 1 FROM [##9422bfe2033845ffa9530598a220f058] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReturnID ) B ON A.PuReturnID = B.PuReturnID 时间: 2024-01-19 16:13:33,545 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET A.CompareQuantity = ISNULL(A.OldQuantity,0)-ISNULL(A.Quantity,0) FROM ##c5c7acb7cd6d41c891c7efc7f8afb29b A 时间: 2024-01-19 16:13:33,549 线程ID: 74 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], RenoticeID AS [退货通知单], DealereturnID AS [渠道退货单], PuReturnID AS [采购退货单], EOrderID AS [线上订单号], BuyerNo AS [买家昵称], RetailOrderID AS [零售订单号], PlatformName AS [平台类型], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], PriceType [价格类型], Quantity AS [数量], DpAmount AS [吊牌额], BalanceAmount AS [结算额], PuReturnQuantity AS [业务状态#采购退货数], DealeReturnQuantity AS [业务状态#退货数], RenoticeQuantity AS [业务状态#退货通知数], OldQuantity AS [业务状态#原单数], CompareQuantity AS [业务状态#差异数], RefundStatus AS [业务状态#退货状态], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核名称],PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[73cecc56-d02d-4ebc-b6df-205f3028765f] FROM [##c5c7acb7cd6d41c891c7efc7f8afb29b] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 16:13:46,324 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET Quantity = ISNULL(B.Quantity,0), BalanceAmount = ISNULL(B.BalanceAmount,0), DpAmount = ISNULL(B.DpAmount,0) FROM [##25dd56bf81384514a2c3bb0c5133d079] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(GDP.DpPriceByBatch,0) * ISNULL(A.Quantity,0)) As DpAmount, SUM(ISNULL(A.BalancePrice,0) * ISNULL(A.Quantity,0)) As BalanceAmount, SUM(ISNULL(A.Quantity,0)) As Quantity FROM PuReceiptSSGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID LEFT JOIN vGoodsDpPrice GDP ON B.Customer_ID = GDP.Customer_ID AND A.Goods_No = GDP.Goods_No WHERE EXISTS( SELECT 1 FROM [##25dd56bf81384514a2c3bb0c5133d079] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a875ad8c3bac437aa52821a9fc4db7fa] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:13:46,534 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET OldQuantity = ISNULL(B.Quantity,0) FROM [##25dd56bf81384514a2c3bb0c5133d079] A INNER JOIN ( SELECT A.PuReceiptID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM PuReceiptGoods A INNER JOIN PuReceipt B ON A.PuReceiptID = B.PuReceiptID WHERE EXISTS( SELECT 1 FROM [##25dd56bf81384514a2c3bb0c5133d079] WHERE A.PuReceiptID = PuReceiptID ) AND EXISTS (SELECT 1 FROM [##a875ad8c3bac437aa52821a9fc4db7fa] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReceiptID ) B ON A.PuReceiptID = B.PuReceiptID 时间: 2024-01-19 16:13:46,692 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET DealeReturnQuantity = ISNULL(B.Quantity,0) FROM [##25dd56bf81384514a2c3bb0c5133d079] A INNER JOIN ( SELECT A.DealereturnID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM DealeReturnGoods A INNER JOIN Dealereturn B ON A.DealereturnID = B.DealereturnID WHERE EXISTS( SELECT 1 FROM [##25dd56bf81384514a2c3bb0c5133d079] WHERE A.DealereturnID = DealereturnID ) AND EXISTS (SELECT 1 FROM [##a875ad8c3bac437aa52821a9fc4db7fa] WHERE Goods_No = A.Goods_No) GROUP BY A.DealereturnID ) B ON A.DealereturnID = B.DealereturnID 时间: 2024-01-19 16:13:46,839 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET RenoticeQuantity = ISNULL(B.Quantity,0) FROM [##25dd56bf81384514a2c3bb0c5133d079] A INNER JOIN ( SELECT A.RenoticeID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM RenoticeGoods A INNER JOIN Renotice B ON A.RenoticeID = B.RenoticeID WHERE EXISTS( SELECT 1 FROM [##25dd56bf81384514a2c3bb0c5133d079] WHERE A.RenoticeID = RenoticeID ) AND EXISTS (SELECT 1 FROM [##a875ad8c3bac437aa52821a9fc4db7fa] WHERE Goods_No = A.Goods_No) GROUP BY A.RenoticeID ) B ON A.RenoticeID = B.RenoticeID 时间: 2024-01-19 16:13:46,973 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET PuReturnQuantity = ISNULL(B.Quantity,0) FROM [##25dd56bf81384514a2c3bb0c5133d079] A INNER JOIN ( SELECT A.PuReturnID, SUM(ISNULL(A.Quantity,0)) As Quantity FROM PuReturnGoods A INNER JOIN PuReturn B ON A.PuReturnID = B.PuReturnID WHERE EXISTS( SELECT 1 FROM [##25dd56bf81384514a2c3bb0c5133d079] WHERE A.PuReturnID = PuReturnID ) AND EXISTS (SELECT 1 FROM [##a875ad8c3bac437aa52821a9fc4db7fa] WHERE Goods_No = A.Goods_No) GROUP BY A.PuReturnID ) B ON A.PuReturnID = B.PuReturnID 时间: 2024-01-19 16:13:47,110 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE A SET A.CompareQuantity = ISNULL(A.OldQuantity,0)-ISNULL(A.Quantity,0) FROM ##25dd56bf81384514a2c3bb0c5133d079 A 时间: 2024-01-19 16:13:47,115 线程ID: 25 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, PureceiptID AS [单号], Manual_ID AS [手工单号], Receipt_Date AS [日期], RenoticeID AS [退货通知单], DealereturnID AS [渠道退货单], PuReturnID AS [采购退货单], EOrderID AS [线上订单号], BuyerNo AS [买家昵称], RetailOrderID AS [零售订单号], PlatformName AS [平台类型], rtrim(Warehouse_No) AS [仓库编号], Warehouse_Na AS [仓库名称], rtrim(Customer_ID) AS [渠道编号], Abbrev AS [渠道简称], SaleMan [业务员], PriceType [价格类型], Quantity AS [数量], DpAmount AS [吊牌额], BalanceAmount AS [结算额], PuReturnQuantity AS [业务状态#采购退货数], DealeReturnQuantity AS [业务状态#退货数], RenoticeQuantity AS [业务状态#退货通知数], OldQuantity AS [业务状态#原单数], CompareQuantity AS [业务状态#差异数], RefundStatus AS [业务状态#退货状态], JiZhang AS [记账状态#记账], JiZhangOperator AS [记账状态#记账人], JiZhangDate AS [记账状态#记账日期], Operator AS [单据状态#操作员], OperatorName AS [单据状态#操作员名称],Input_Date AS [单据状态#录入日期], Posted AS [单据状态#审核], PostUser AS [单据状态#审核人], PostUserName AS [单据状态#审核名称],PostedDate AS [单据状态#审核日期], PrintFlag AS [单据状态#打印], Remark AS [备注] INTO tempdb.dbo.[73cecc56-d02d-4ebc-b6df-205f3028765f] FROM [##25dd56bf81384514a2c3bb0c5133d079] ORDER BY Receipt_Date DESC, PureceiptID ASC 时间: 2024-01-19 19:20:27,271 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##c656d90741894903bc4abfdeb57ccd4c] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 19:20:27,764 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##ac6c5890cb064660bafb1c1c00d61a09] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 19:20:27,767 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##c656d90741894903bc4abfdeb57ccd4c] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##ac6c5890cb064660bafb1c1c00d61a09] 时间: 2024-01-19 19:20:27,828 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##b175e7b4217044ceb123e8bdff8a0678 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 19:20:27,831 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##b175e7b4217044ceb123e8bdff8a0678 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 19:20:27,834 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##b175e7b4217044ceb123e8bdff8a0678 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 19:20:27,862 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##b175e7b4217044ceb123e8bdff8a0678 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 19:20:27,864 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##b175e7b4217044ceb123e8bdff8a0678 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 19:20:27,867 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##c656d90741894903bc4abfdeb57ccd4c] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##bbad9063ac104b699d9ce97172b5a710] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 19:20:27,871 线程ID: 20 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量] INTO tempdb.dbo.[6e0ac4a1-1955-4341-97c7-63bef0c31496] FROM ##c656d90741894903bc4abfdeb57ccd4c A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name 时间: 2024-01-19 19:28:37,481 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT TOP 0 CAST(NULL AS SMALLINT) AS ItemType, CAST(NULL AS VARCHAR(50) ) AS Customer_ID, B.Goods_No, C.ColorID, C.Long , CAST(NULL AS INT) AS [渠道库存#数量], CAST(C.[S1] AS INT) AS [渠道库存#S1] , CAST(NULL AS INT) AS [仓库库存#数量], CAST(C.[S1] AS INT) AS [仓库库存#S1] , CAST(NULL AS INT) AS [仓库可用库存#数量],CAST(C.[S1] AS INT) AS [仓库可用库存#S1] , CAST(NULL AS INT) AS [批发在途#数量] , CAST(NULL AS INT) AS [调拨在途#数量] , CAST(NULL AS INT) AS [7DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [7DayCheckAmount] , CAST(NULL AS INT) AS [15DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [15DayCheckAmount] , CAST(NULL AS INT) AS [30DayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [30DayCheckAmount] , CAST(NULL AS INT) AS [AllDayCheckQuantity] , CAST(NULL AS NUMERIC(15, 2)) AS [AllDayCheckAmount] , CAST(NULL AS INT) AS [销售#数量], CAST(NULL AS NUMERIC(15, 2)) AS [销售#金额], CAST(C.[S1] AS INT) AS [销售#S1] , CAST(NULL AS INT) AS [渠道在途#数量],CAST(C.[S1] AS INT) AS [渠道在途#S1] , CAST(NULL AS INT) AS [仓库在途#数量],CAST(C.[S1] AS INT) AS [仓库在途#S1] , CAST(NULL AS INT) AS [总库存#数量],CAST(C.[S1] AS INT) AS [总库存#S1] , CAST(NULL AS INT) AS [渠道库存(含在途)#数量], CAST(C.[S1] AS INT) AS [渠道库存(含在途)#S1] , CAST(NULL AS INT) AS [仓库库存(含在途)#数量], CAST(C.[S1] AS INT) AS [仓库库存(含在途)#S1] INTO [##0c0c5d96e3004169825fb53304b99d51] FROM Customer A, Barcode B, DeliveryDetail C 时间: 2024-01-19 19:28:37,864 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: delete [##50a465e18d2c4ab0b7d8b5dea24ec88d] where 2=2 and ISNULL(S1,0)=0 时间: 2024-01-19 19:28:37,867 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##0c0c5d96e3004169825fb53304b99d51] (Customer_ID, Goods_No, ColorID, Long, [渠道库存#S1], 渠道库存#数量) SELECT Customer_ID, Goods_No, ColorID, Long, [S1], (ISNULL([S1], 0)) FROM [##50a465e18d2c4ab0b7d8b5dea24ec88d] 时间: 2024-01-19 19:28:37,917 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##3c5183c6a7524b918192caa17cb9f944 a INNER JOIN DictSaleType b ON a.SaleTypeID=b.ID 时间: 2024-01-19 19:28:37,921 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##3c5183c6a7524b918192caa17cb9f944 SET CheckSaleType='线上发货' WHERE ( CheckSaleType = '正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 ) AND LEN(ISNULL(RetailOrderID, '')) > 0 AND Status <> '退货' 时间: 2024-01-19 19:28:37,924 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE a SET a.CheckSaleType = b.SaleType FROM ##3c5183c6a7524b918192caa17cb9f944 a INNER JOIN vn_Check SC ON a.PaymentWay1 = SC.CheckID INNER JOIN vn_CheckGoods SCG ON SC.CheckID = SCG.CheckID AND a.Goods_No = SCG.Goods_No AND A.PreSaleID = SCG.RetailOrderID AND a.DiscountPrice = SCG.DiscountPrice INNER JOIN KS2_RetailOrder KSR ON SCG.RetailOrderID = KSR.RetailOrderID INNER JOIN DictSaleType b ON KSR.SaleTypeID=b.ID WHERE a.Status = '退货' 时间: 2024-01-19 19:28:37,955 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##3c5183c6a7524b918192caa17cb9f944 SET CheckSaleType='线上发货' WHERE LEN(ISNULL(RetailOrderID, '')) > 0 AND LEN(ISNULL(PreSaleID, '')) = 0 AND Status = '退货' 时间: 2024-01-19 19:28:37,957 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: UPDATE ##3c5183c6a7524b918192caa17cb9f944 SET CheckSaleType='正常销售' WHERE CheckSaleType='正常' OR LEN(ISNULL(CheckSaleType, '')) = 0 时间: 2024-01-19 19:28:37,961 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: INSERT INTO [##0c0c5d96e3004169825fb53304b99d51] (Customer_ID,Goods_No, ColorID, Long, [销售#S1], 销售#数量, 销售#金额) SELECT Customer_ID, Goods_No, ColorID, Long, SUM([S1]) AS [S1], SUM(ISNULL([S1], 0)),SUM((ISNULL([S1], 0)) * DiscountPrice) as Amount FROM [##b109c02f61044ca3a92966205d52fe8b] GROUP BY Customer_ID, Goods_NO, ColorID, Long 时间: 2024-01-19 19:28:37,964 线程ID: 24 日志级别: DEBUG 对象名称: Regentsoft.Core.LoggingService 日志信息: SELECT IDENTITY(INT, 1, 1) AS RowNumber, CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END AS [项目类型], A.Customer_ID AS [项目编号], CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END AS [项目名称], A.Goods_No AS [货号], GS.Goods_Name AS [货品名称], SUM([销售#数量]) AS [销售#数量], SUM([销售#金额]) AS [销售#生意额], SUM([渠道库存#数量]) AS [渠道库存#数量] INTO tempdb.dbo.[6e0ac4a1-1955-4341-97c7-63bef0c31496] FROM ##0c0c5d96e3004169825fb53304b99d51 A LEFT JOIN Goods GS ON GS.Goods_No = A.Goods_No LEFT JOIN Customer CT ON CT.Customer_ID = A.Customer_ID AND ISNULL(A.ItemType,0) = 0 LEFT JOIN Warehouse W ON W.Warehouse_no = A.Customer_ID AND A.ItemType = 1 LEFT JOIN vPlan VP ON A.Goods_No = VP.Goods_No GROUP BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name ORDER BY CASE WHEN A.ItemType = 1 THEN '仓库' ELSE '渠道' END, A.Customer_ID, CASE WHEN A.ItemType = 1 THEN W.Warehouse_Na ELSE CT.Abbrev END, A.Goods_No, GS.Goods_Name