解决采购入库列表显示不全的问题
This commit is contained in:
parent
5309a677e4
commit
26295a52d1
@ -11,6 +11,7 @@ import java.util.Map;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
import com.jsh.base.BaseAction;
|
||||
@ -389,8 +390,16 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
|
||||
pageUtil.setCurPage(0);
|
||||
depotHeadService.getHeaderIdByMaterial(pageUtil, materialParam);
|
||||
JSONObject outer = new JSONObject();
|
||||
String allReturn = pageUtil.getPageList().toString();
|
||||
allReturn = allReturn.substring(1,allReturn.length()-1);
|
||||
String allReturn = "";
|
||||
List dataList = pageUtil.getPageList();
|
||||
if(dataList!=null) {
|
||||
System.out.println("dataList:"+ dataList.size());
|
||||
for (Integer i = 0; i < dataList.size(); i++) {
|
||||
Object dl = dataList.get(i); //获取对象
|
||||
allReturn = allReturn + dl.toString() + ",";
|
||||
}
|
||||
}
|
||||
allReturn = allReturn.substring(0,allReturn.length()-1);
|
||||
if(allReturn.equals("null")){
|
||||
allReturn = "";
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
||||
@SuppressWarnings("unchecked")
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException {
|
||||
StringBuffer queryString = new StringBuffer();
|
||||
queryString.append("select group_concat(CAST(dt.HeaderId AS CHAR)) as ids from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where m.`Name` "+
|
||||
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 + "%'");
|
||||
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||
pageUtil.setPageList(query.list());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user