소스 검색

2021-11-16 9:06 bgj

sjw 4 년 전
부모
커밋
ed004c5a31

+ 2 - 0
src/rest/openapi/restcontroller/housekeeper/titem/HeadTitem.java

@@ -37,10 +37,12 @@ public class HeadTitem extends Controller {
             }
             SQLFactory factory=new SQLFactory(this,"×ܲ¿ÎïÁϲéѯ",pageSize,pageNumber,"t.fitemno");
             factory.addParameter("siteid",siteid);
+            factory.addParameter("fagentnum",fagentnum);
             factory.addParameter_SQL("where",wherestr);
             Rows rows = dbConnect.runSqlQuery(factory.getSQL());
             SQLFactory imagefactory=new SQLFactory(this,"×ܲ¿ÎïÁÏͼƬ²éѯ");
             imagefactory.addParameter("siteid",siteid);
+
             imagefactory.addParameter_SQL("fitemno",rows.getInWhere("fitemno"));
             Rows image_rows = dbConnect.runSqlQuery(imagefactory.getSQL());
             RowsMap fitemno = image_rows.toRowsMap("fitemno");

+ 4 - 2
src/rest/openapi/restcontroller/housekeeper/titem/SQL/总部物料查询.sql

@@ -1,2 +1,4 @@
-select t.fitemno,t.fitemname,t.fmodel,t.fspec,t.fisused,t.fieldname,t.fbrand from titem t
-where t.siteid=$siteid$ and t.FISSERVICE=1 and $where$
+select t.fitemno,t.fitemname,t.fmodel,t.fspec,t.fisused,t.fieldname,t.fbrand,
+       case when EXISTS(select 1 from TAGENTS_titem t1 where FAGENTNUM=$fagentnum$ and t1.FITEMNO=t.FITEMNO) then 1 else 0 end fisinsert
+       from titem t
+where t.siteid=$siteid$ and t.FISSERVICE=1 and t.FISONSALE=1 and $where$