解决采购入库列表显示不全的问题
This commit is contained in:
@@ -11,6 +11,7 @@ import java.util.Map;
|
|||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
|
|
||||||
import com.jsh.base.BaseAction;
|
import com.jsh.base.BaseAction;
|
||||||
@@ -389,8 +390,16 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
|
|||||||
pageUtil.setCurPage(0);
|
pageUtil.setCurPage(0);
|
||||||
depotHeadService.getHeaderIdByMaterial(pageUtil, materialParam);
|
depotHeadService.getHeaderIdByMaterial(pageUtil, materialParam);
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
String allReturn = pageUtil.getPageList().toString();
|
String allReturn = "";
|
||||||
allReturn = allReturn.substring(1,allReturn.length()-1);
|
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")){
|
if(allReturn.equals("null")){
|
||||||
allReturn = "";
|
allReturn = "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException {
|
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException {
|
||||||
StringBuffer queryString = new StringBuffer();
|
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 + "%'");
|
" like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%'");
|
||||||
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||||
pageUtil.setPageList(query.list());
|
pageUtil.setPageList(query.list());
|
||||||
|
|||||||
Reference in New Issue
Block a user