|
@@ -1,23 +1,11 @@
|
|
|
package com.uas.platform.b2b.model;
|
|
package com.uas.platform.b2b.model;
|
|
|
|
|
|
|
|
|
|
+import org.hibernate.annotations.Where;
|
|
|
|
|
+
|
|
|
|
|
+import javax.persistence.*;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
-import javax.persistence.CascadeType;
|
|
|
|
|
-import javax.persistence.Column;
|
|
|
|
|
-import javax.persistence.Entity;
|
|
|
|
|
-import javax.persistence.FetchType;
|
|
|
|
|
-import javax.persistence.Id;
|
|
|
|
|
-import javax.persistence.Index;
|
|
|
|
|
-import javax.persistence.JoinColumn;
|
|
|
|
|
-import javax.persistence.OneToMany;
|
|
|
|
|
-import javax.persistence.OneToOne;
|
|
|
|
|
-import javax.persistence.OrderBy;
|
|
|
|
|
-import javax.persistence.Table;
|
|
|
|
|
-import javax.persistence.Transient;
|
|
|
|
|
-
|
|
|
|
|
-import org.hibernate.annotations.Where;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author yujia
|
|
* @author yujia
|
|
|
* @version 创建时间:2015年12月29日 上午11:25:19
|
|
* @version 创建时间:2015年12月29日 上午11:25:19
|
|
@@ -26,7 +14,7 @@ import org.hibernate.annotations.Where;
|
|
|
|
|
|
|
|
@Table(name = "purc$orders", indexes = { @Index(name = "purc$orders_date", columnList = "pu_date") })
|
|
@Table(name = "purc$orders", indexes = { @Index(name = "purc$orders_date", columnList = "pu_date") })
|
|
|
@Entity
|
|
@Entity
|
|
|
-@Where(clause = "(pu_end=0 or pu_end is null) and pu_id in (select i.pd_puid from purc$orderitems i where nvl(i.pd_acceptqty,0)<nvl(i.pd_qty,0)+nvl(i.pd_returnqty,0))")
|
|
|
|
|
|
|
+@Where(clause = "(pu_end=0 or pu_end is null) and pu_id in (select i.pd_puid from purc$orderitems i where ifnull(i.pd_acceptqty,0)<ifnull(i.pd_qty,0)+ifnull(i.pd_returnqty,0))")
|
|
|
public class PurchaseOrderWaiting {
|
|
public class PurchaseOrderWaiting {
|
|
|
|
|
|
|
|
@Id
|
|
@Id
|
|
@@ -154,7 +142,7 @@ public class PurchaseOrderWaiting {
|
|
|
*/
|
|
*/
|
|
|
@OneToMany(mappedBy = "order", cascade = { CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE }, fetch = FetchType.EAGER)
|
|
@OneToMany(mappedBy = "order", cascade = { CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE }, fetch = FetchType.EAGER)
|
|
|
@OrderBy("number")
|
|
@OrderBy("number")
|
|
|
- @Where(clause = "(nvl(pd_acceptqty,0)<nvl(pd_qty,0)+nvl(pd_returnqty,0)) and (pd_end = 0 or pd_end is null)")
|
|
|
|
|
|
|
+ @Where(clause = "(ifnull(pd_acceptqty,0)<ifnull(pd_qty,0)+ifnull(pd_returnqty,0)) and (pd_end = 0 or pd_end is null)")
|
|
|
private Set<PurchaseOrderWaitingItem> orderItems;
|
|
private Set<PurchaseOrderWaitingItem> orderItems;
|
|
|
|
|
|
|
|
/**
|
|
/**
|