ViniciusConsultor / ecustomsgs1

Automatically exported from code.google.com/p/ecustomsgs1
0 stars 0 forks source link

Lỗi thống kê in sổ theo dõi phương tiện cho hằng NK #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
chao vuong!
gs1 bi loi phan thong ke in so theo doi phuong tien cho hang nk , no tu nhan 
doi so xe len..mot xe la chua co to khai..mot xe co so to khai.
a muon chinh dung la xe nao duoc xac nhan nc co hang thi moi thong ke vao day.

Original issue reported on code.google.com by vuongfat on 10 Jan 2012 at 4:13

GoogleCodeExporter commented 8 years ago

Original comment by vuongfat on 11 Jan 2012 at 2:54

GoogleCodeExporter commented 8 years ago
v

Original comment by vuongfat on 11 Jan 2012 at 4:32

GoogleCodeExporter commented 8 years ago

Original comment by vuongfat on 15 Jan 2012 at 1:18

GoogleCodeExporter commented 8 years ago

Original comment by vuongfat on 22 Feb 2012 at 10:16

GoogleCodeExporter commented 8 years ago

Original comment by tungdt....@gmail.com on 22 Feb 2012 at 2:25

GoogleCodeExporter commented 8 years ago
dung cau query sau de hien thi, neu 1 xe cho hang cho nhieu to khai thi hien 
thi to khai cuoi cung

select table1.[VehicleID]
      ,table1.[PlateNumber]
      ,table1.[NumberOfContainer]
      ,table1.[DriverName]
      ,table1.[ImportDate]
      ,table1.[IsImport]
      ,table1.[ExportDate]
      ,table1.[IsExport]
      ,table1.[Note]
      ,table1.[Status]
      ,table1.[IsCompleted]
      ,table1.[IsGoodsImported]
      ,table1.[ImportStatus]
      ,table1.[ImportedLocalTime]
      ,table1.[HasGoodsImported]
      ,table1.[ConfirmImportBy]
      ,table1.[ConfirmExportBy]
      ,table1.[ConfirmLocalImportBy]
      ,table1.DeclarationID
      ,table1.[Number]
      ,table1.[ProductName]
      ,table1.[CompanyName]
      ,table1.[ProductAmount]
      ,table1.[Unit]
      ,table1.[CreatedByID]
      ,table1.[ModifiedByID]
      ,table1.[ModifiedDate]
      ,table1.[CreatedDate]
      ,table1.[HasDeclaration]
      ,table1.[Type]
      ,table1.[CompanyCode]
      ,table1.[RegisterDate]
      ,table1.[DeclarationType]
      ,table1.[ConfirmExportByName]
      ,table1.[ConfirmImportByName]
      ,table1.[ConfirmLocalImportByName]
      ,table1.[ConfirmStatus]
      ,table1.[ConfirmDate]
      ,table1.[Parking]
      ,table1.[ParkingDate]
      ,table1.[Money]
      ,table1.[DateHandover]
      ,table1.[Seal]
      ,table1.[NumberTemp]
      ,table1.[GateExport]
      ,table1.[DateReturn]
      ,table1.[NumberHandover]
      ,table1.[RegisterPlace]
      ,table1.[TypeOption]
       from ViewAllVehicleHasGood as table1 
inner join
(select VehicleID as VehicleID,max(tblDeclarationVehicle.DeclarationID) as 
maxDeclarationID from tblDeclarationVehicle 
where 1=1
group by tblDeclarationVehicle.VehicleID) as table2

on table1.VehicleID = table2.VehicleID and table1.DeclarationID = 
table2.maxDeclarationID 
and
 (table1.DeclarationID > 0 OR table1.DeclarationID = 1) 
 AND table1.HasGoodsImported = 1 
 AND table1.DeclarationType = 1  
 AND table1.IsImport = 1  
 AND  table1.ImportDate >= '2011-02-22 00:00' AND table1.ImportDate < = '2012-02-23 23:59'

Original comment by tungdt....@gmail.com on 23 Feb 2012 at 5:14

GoogleCodeExporter commented 8 years ago

Original comment by tungdt....@gmail.com on 25 Feb 2012 at 10:53

GoogleCodeExporter commented 8 years ago
fixed

Original comment by tungdt....@gmail.com on 25 Feb 2012 at 10:54

GoogleCodeExporter commented 8 years ago
Cai nay van co van de, êm lai nhe, như trong email cua Mr Chung

Original comment by vuongfat on 6 Mar 2012 at 6:20

GoogleCodeExporter commented 8 years ago
Cái chức năng này cũng chưa được đâu Tùng nhé, em nhớ check 
lại.

Original comment by vuongfat on 10 Mar 2012 at 5:28

GoogleCodeExporter commented 8 years ago

Original comment by tungdt....@gmail.com on 10 Mar 2012 at 12:57

GoogleCodeExporter commented 8 years ago
Em test chức năng in danh sách xe nhập khẩu có hàng kĩ rồi. Không 
bị lỗi trùng lặp xe.
Mỗi xe (tính theo vehicleId) chỉ có một tờ khai duy nhất là tờ 
khai nhập mới nhất mà chứa xe đó.
test_case_1:
* tao xe khong co bien so 20A123456, cho xuat khau va nhap khau co hang.  
* in danh sach xe nhap khau co hang 
=> Output: danh sach chi hien thi 1 xe duy nhat co so to khai = "";
* Tao to khai nhap co so to khai "123123", them xe 20A123456 tu danh sach xe 
xuat vao.
* In danh sach xe nhap khau co hang
=> Output: danh sach chi hien thi 1 xe duy nhat co bien so 20A123456 va co so 
to khai = "123123";

Tao to khai nhap co so to khai "111111", them xe 20A123456 tu danh sach xe xuat 
vao.
* In danh sach xe nhap khau co hang
=> Output: danh sach chi hien thi 1 xe duy nhat co bien so 20A123456 va co so 
to khai = "111111";

Original comment by tungdt....@gmail.com on 11 Mar 2012 at 8:40

GoogleCodeExporter commented 8 years ago

Original comment by tungdt....@gmail.com on 11 Mar 2012 at 8:44

GoogleCodeExporter commented 8 years ago
Co the view cua moi nguoi co su sai lenh
view cua em nhu sau:
CREATE VIEW [dbo].[ViewAllVehicleHasGood]
AS
SELECT     dbo.tblVehicle.VehicleID, dbo.tblVehicle.PlateNumber, 
dbo.tblVehicle.NumberOfContainer, dbo.tblVehicle.DriverName, 
dbo.tblVehicle.ImportDate, 
                      dbo.tblVehicle.IsImport, dbo.tblVehicle.ExportDate, dbo.tblVehicle.IsExport, dbo.tblVehicle.Note, dbo.tblVehicle.Status, dbo.tblVehicle.IsCompleted, 
                      dbo.tblVehicle.IsGoodsImported, dbo.tblVehicle.ImportStatus, dbo.tblVehicle.ImportedLocalTime, dbo.tblVehicle.HasGoodsImported, dbo.tblVehicle.ConfirmImportBy, 
                      dbo.tblVehicle.ConfirmExportBy, dbo.tblVehicle.ConfirmLocalImportBy, dbo.tblDeclaration.DeclarationID, dbo.tblDeclaration.Number, dbo.tblDeclaration.ProductName, 
                      dbo.tblDeclaration.CompanyName, dbo.tblDeclaration.ProductAmount, dbo.tblDeclaration.Unit, dbo.tblDeclaration.CreatedByID, dbo.tblDeclaration.ModifiedByID, 
                      dbo.tblDeclaration.ModifiedDate, dbo.tblDeclaration.CreatedDate, dbo.tblDeclaration.HasDeclaration, dbo.tblDeclaration.Type, dbo.tblDeclaration.CompanyCode, 
                      dbo.tblDeclaration.RegisterDate, dbo.tblDeclaration.DeclarationType, dbo.fn_GetNameById(dbo.tblVehicle.ConfirmExportBy) AS ConfirmExportByName, 
                      dbo.fn_GetNameById(dbo.tblVehicle.ConfirmImportBy) AS ConfirmImportByName, dbo.fn_GetNameById(dbo.tblVehicle.ConfirmLocalImportBy) 
                      AS ConfirmLocalImportByName, dbo.tblDeclaration.ConfirmStatus, dbo.tblDeclaration.ConfirmDate, dbo.tblVehicle.Parking, dbo.tblVehicle.ParkingDate, 
                      dbo.tblDeclaration.Money, dbo.tblDeclaration.DateHandover, dbo.tblDeclaration.Seal, dbo.tblDeclaration.GateExport, dbo.tblDeclaration.DateReturn, 
                      dbo.tblDeclaration.NumberHandover, dbo.tblDeclaration.RegisterPlace, dbo.tblDeclaration.TypeOption, dbo.tblDeclaration.NumberTemp
FROM         dbo.tblVehicle INNER JOIN
                      dbo.tblDeclarationVehicle ON dbo.tblVehicle.VehicleID = dbo.tblDeclarationVehicle.VehicleID INNER JOIN
                      dbo.tblDeclaration ON dbo.tblDeclarationVehicle.DeclarationID = dbo.tblDeclaration.DeclarationID
WHERE     (dbo.tblVehicle.VehicleID IN
                          (SELECT     VehicleID
                            FROM          dbo.tblDeclarationVehicle AS tblDeclarationVehicle_1))

Original comment by tungdt....@gmail.com on 11 Mar 2012 at 8:49

GoogleCodeExporter commented 8 years ago

Original comment by vuongfat on 11 Mar 2012 at 3:52