|
|
@@ -27,8 +27,15 @@ public class AgentTitem extends Controller {
|
|
|
if(StringUtils.isBlank(siteid))return getReturnObject_err("siteid为空").toString();
|
|
|
JSONObject where = content.getJSONObject("where");
|
|
|
String wherestr="1=1";
|
|
|
+
|
|
|
if(where!=null){
|
|
|
DBConnect dbConnect=new DBConnect();
|
|
|
+ /**节点关联物料查询**/
|
|
|
+ Rows rows_titem = dbConnect.runSqlQuery("select t.fitemno,t.fitemname,t.fmodel,t.fspec,t.fqty from \n" +
|
|
|
+ "workorder_titem t\n" +
|
|
|
+ "where EXISTS(select 1 from Workorder t1 where t1.fworknum='"+where.getString("fworknum")+"' and t1.Workorderid=t.fparentid)\n" +
|
|
|
+ " and t.sourcenode='"+where.getString("frownum")+"'");
|
|
|
+
|
|
|
if(where.containsKey("fitemname")&&!StringUtils.isBlank(where.getString("fitemname"))){
|
|
|
wherestr+=" and (t.fitemname like '%"+where.getString("fitemname")+"%' " +
|
|
|
"or t.fitemno like '%"+where.getString("fitemname")+"%' "+
|
|
|
@@ -45,8 +52,9 @@ public class AgentTitem extends Controller {
|
|
|
SQLFactory factory=new SQLFactory(this,"本站物料查询",pageSize,pageNumber,"t.fitemno");
|
|
|
factory.addParameter("siteid",siteid);
|
|
|
factory.addParameter("fagentnum",fagentnum);
|
|
|
+ factory.addParameter_SQL("fitemno", rows_titem.getInWhere("fitemno"));
|
|
|
factory.addParameter_SQL("where",wherestr);
|
|
|
-
|
|
|
+ System.out.println("111:"+factory.getSQL());
|
|
|
Rows rows = dbConnect.runSqlQuery(factory.getSQL());
|
|
|
SQLFactory imagefactory=new SQLFactory(this,"本站物料图片查询");
|
|
|
imagefactory.addParameter("siteid",siteid);
|