17,377
社区成员
发帖
与我相关
我的任务
分享
String hql = "select new fi.salesManagement.bean.PurchaseVo(f.inId as Id,f.ifoId as ifoId,i.UTime as time,f.ACurnum as count,f.inPrice as inprice) from PurchaseInStorageInfo f inner join PurchaseInStorage i with f.inId = i.inId and f.delFlag = 0 and i.delFlag = 0 and f.AId = ? and f.sId = ?";
String hql = "select new fi.salesManagement.bean.PurchaseVo(f.inId as Id,f.ifoId as ifoId,i.UTime as time,f.ACurnum as count,f.inPrice as inprice) from PurchaseInStorageInfo f, PurchaseInStorage i where f.inId = i.inId";
List<PurchaseVo> PurchaseVoList = this.createQuery(getSession(), hql, values).list();
private Long inId;
private Long ifoId;
private Date UTime;
private Long ACurnum;
private BigDecimal inPrice;
public PurchaseVo(Long inId, Long ifoId, Date uTime, Long aCurnum,
BigDecimal inPrice) {
super();
this.inId = inId;
this.ifoId = ifoId;
UTime = uTime;
ACurnum = aCurnum;
this.inPrice = inPrice;
}
String hql = "select new fi.salesManagement.bean.PurchaseVo(f.inId as Id,f.ifoId as ifoId,i.UTime as time,f.ACurnum as count,f.inPrice as inprice) from PurchaseInStorageInfo f inner join PurchaseInStorage i with f.inId = i.inId and f.delFlag = 0 and i.delFlag = 0 and f.AId = ? and f.sId = ?";
List<PurchaseVo> PurchaseVoList = this.createQuery(getSession(), hql, values).list();
select new fi.salesManagement.bean.PurchaseVo(f.ifoId as ifoId,i.UTime as time,avg(f.inPrice) as inprice) from PurchaseInStorageInfo f, PurchaseInStorage i group by f.ifoId,i.UTime