更新供应商和客户的累计应收应付的算法
This commit is contained in:
@@ -22,11 +22,26 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void find(PageUtil<DepotHead> pageUtil,String maxid) throws JshException
|
||||
public void find(PageUtil<DepotHead> pageUtil,String maxid) throws JshException
|
||||
{
|
||||
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select max(Id) as Id from DepotHead depotHead where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||
pageUtil.setTotalCount(query.list().size());
|
||||
pageUtil.setPageList(query.list());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void findAllMoney(PageUtil<DepotHead> pageUtil, Integer supplierId, String type, String subType, String mode) throws JshException
|
||||
{
|
||||
Query query;
|
||||
String modeName = "";
|
||||
if(mode.equals("实际")){
|
||||
modeName = "ChangeAmount";
|
||||
}
|
||||
else if(mode.equals("合计")){
|
||||
modeName = "TotalPrice";
|
||||
}
|
||||
query= this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select sum(" + modeName + ") as allMoney from DepotHead depotHead where Type='" + type + "' and SubType = '" + subType + "' and OrganId =" + supplierId + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||
pageUtil.setTotalCount(query.list().size());
|
||||
pageUtil.setPageList(query.list());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user