限制用户只显示自己拥有仓库的单据
This commit is contained in:
@@ -159,10 +159,13 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException {
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam,String depotIds) throws JshException {
|
||||
StringBuffer queryString = new StringBuffer();
|
||||
queryString.append("select dt.HeaderId from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where m.`Name` "+
|
||||
" like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%'");
|
||||
queryString.append("select dt.HeaderId from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where ( m.`Name` "+
|
||||
" like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%') ");
|
||||
if(!depotIds.equals("")){
|
||||
queryString.append(" and dt.DepotId in (" + depotIds + ") ");
|
||||
}
|
||||
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||
pageUtil.setPageList(query.list());
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@ public interface DepotHeadIDAO extends BaseIDAO<DepotHead>
|
||||
|
||||
public void findStatementAccount(PageUtil pageUtil,String beginTime,String endTime,Long organId, String supType) throws JshException;
|
||||
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException;
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam,String depotIds) throws JshException;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user