Subversion Repositories SmartDukaan

Rev

Rev 31380 | Rev 31860 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31380 Rev 31382
Line 46... Line 46...
46
                " i.catalogItemId, i.brand, i.modelName, i.modelNumber" +
46
                " i.catalogItemId, i.brand, i.modelName, i.modelNumber" +
47
                ") from OfferPayout op join Offer o on o.id=op.offerId join InventoryItem ii on ii.serialNumber=op.serialNumber and op.fofoId=ii.fofoId" +
47
                ") from OfferPayout op join Offer o on o.id=op.offerId join InventoryItem ii on ii.serialNumber=op.serialNumber and op.fofoId=ii.fofoId" +
48
                " join Item i on i.id=ii.itemId join ScanRecord  sr on sr.inventoryItemId=ii.id " +
48
                " join Item i on i.id=ii.itemId join ScanRecord  sr on sr.inventoryItemId=ii.id " +
49
                " and ((sr.type='PURCHASE' and o.schemeType='SELLIN') or (sr.type='SALE' and o.schemeType!='SELLIN'))" +
49
                " and ((sr.type='PURCHASE' and o.schemeType='SELLIN') or (sr.type='SALE' and o.schemeType!='SELLIN'))" +
50
                " where op.rejectTimestamp is null and ii.serialNumber in :serialNumbers" +
50
                " where op.rejectTimestamp is null and ii.serialNumber in :serialNumbers" +
51
                " group by ii.id "),
51
                " group by ii.id ")/*,
52
        @NamedQuery(name = "OfferPayout.selectMarginsByYearMonth", query = "select com.spice.profitmandi.common.model.MarginModel(" +
52
        @NamedQuery(name = "OfferPayout.selectMarginsByYearMonth", query = "select com.spice.profitmandi.common.model.MarginModel(" +
53
                " " +
53
                " " +
54
                ") from Order ord join    OfferPayout op join Offer on o.id=op.offerId join InventoryItem ii on ii.serialNumber=op.serialNumber and op.fofoId=ii.fofoId" +
54
                ") from Order ord join    OfferPayout op join Offer on o.id=op.offerId join InventoryItem ii on ii.serialNumber=op.serialNumber and op.fofoId=ii.fofoId" +
55
                " join Item i on i.id=ii.itemId join ScanRecord  sr on sr.inventoryItemId=ii.id " +
55
                " join Item i on i.id=ii.itemId join ScanRecord  sr on sr.inventoryItemId=ii.id " +
56
                " and ((sr.type='PURCHASE' and o.schemeType='SELLIN') or (sr.type='SALE' and o.schemeType!='SELLIN'))" +
56
                " and ((sr.type='PURCHASE' and o.schemeType='SELLIN') or (sr.type='SALE' and o.schemeType!='SELLIN'))" +
57
                " join  " +
57
                " join  " +
58
                " where op.rejectTimestamp is null and ii.serialNumber in :serialNumbers" +
58
                " where op.rejectTimestamp is null and ii.serialNumber in :serialNumbers" +
59
                " group by ii.id ")
59
                " group by ii.id ")*/
60
})
60
})
61
public class OfferPayout {
61
public class OfferPayout {
62
        @Id
62
        @Id
63
        @GeneratedValue(strategy = GenerationType.IDENTITY)
63
        @GeneratedValue(strategy = GenerationType.IDENTITY)
64
        private long id;
64
        private long id;