Browse Source

2021-11-16 11:24 bgj

sjw 4 years ago
parent
commit
d4872a2e50

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

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