限制用户只显示自己拥有仓库的单据
This commit is contained in:
parent
03abe02c47
commit
70556cd35e
@ -385,10 +385,11 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
|
||||
public void getHeaderIdByMaterial(){
|
||||
try {
|
||||
String materialParam = model.getMaterialParam(); //商品参数
|
||||
String depotIds = model.getDepotIds(); //拥有的仓库信息
|
||||
PageUtil pageUtil = new PageUtil();
|
||||
pageUtil.setPageSize(0);
|
||||
pageUtil.setCurPage(0);
|
||||
depotHeadService.getHeaderIdByMaterial(pageUtil, materialParam);
|
||||
depotHeadService.getHeaderIdByMaterial(pageUtil, materialParam, depotIds);
|
||||
JSONObject outer = new JSONObject();
|
||||
String allReturn = "";
|
||||
List dataList = pageUtil.getPageList();
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -25,5 +25,5 @@ public interface DepotHeadIService extends BaseIService<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;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ public class DepotHeadService extends BaseService<DepotHead> implements DepotHea
|
||||
depotHeadDao.findStatementAccount(pageUtil, beginTime, endTime, organId, supType);
|
||||
}
|
||||
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException {
|
||||
depotHeadDao.getHeaderIdByMaterial(pageUtil, materialParam);
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam,String depotIds) throws JshException {
|
||||
depotHeadDao.getHeaderIdByMaterial(pageUtil, materialParam, depotIds);
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
var payTypeTitle = "";//付款 收款
|
||||
var organUrl = ""; //组织数据接口地址
|
||||
var amountNum = ""; //单据编号开头字符
|
||||
var depotString = ""; //店铺列表
|
||||
var depotString = ""; //店铺id列表
|
||||
var orgDefaultId = 0; //单位默认编号
|
||||
var orgDefaultList; //存储查询出来的会员列表
|
||||
var accountList; //账户列表
|
||||
@ -2583,7 +2583,8 @@
|
||||
url: path + "/depotHead/getHeaderIdByMaterial.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
MaterialParam: materialParam
|
||||
MaterialParam: materialParam,
|
||||
DepotIds: depotString
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user