|
|
@@ -91,8 +91,10 @@ public class rpt : IHttpHandler, IReadOnlySessionState
|
|
|
INNER JOIN tp_mst_goodstype gt
|
|
|
ON gt.goodstypeid = g.goodstypeid
|
|
|
WHERE
|
|
|
- ((pd.procedureid <> 104 and pd.valueflag = '1')
|
|
|
- or (pd.procedureid = 104 and pd.isrefire = '0' and pd.checkflag = '1'))
|
|
|
+ ((pd.procedureid not in (11,104) and pd.valueflag = '1')
|
|
|
+ or (pd.procedureid = 11 and pd.isrefire = '0' and pd.islengbu = '0' and (pd.checkflag = '1' or pd.checkflag is null))
|
|
|
+ or (pd.procedureid = 104 and pd.isrefire = '0' and pd.islengbu = '0' and pd.checkflag = '1')
|
|
|
+ )
|
|
|
AND pt2.type_id IN (103, 104)
|
|
|
AND pd.createtime >= @dateBegin@
|
|
|
AND pd.createtime < @dateEnd@
|
|
|
@@ -366,8 +368,11 @@ public class rpt : IHttpHandler, IReadOnlySessionState
|
|
|
ON g.goodsid = pd.goodsid
|
|
|
INNER JOIN tp_mst_goodstype gt
|
|
|
ON gt.goodstypeid = g.goodstypeid
|
|
|
- WHERE ((pd.procedureid <> 104 and pd.valueflag = '1')
|
|
|
- or (pd.procedureid = 104 and pd.isrefire = '0' and pd.checkflag = '1'))
|
|
|
+ WHERE
|
|
|
+ ((pd.procedureid not in (11,104) and pd.valueflag = '1')
|
|
|
+ or (pd.procedureid = 11 and pd.isrefire = '0' and pd.islengbu = '0' and (pd.checkflag = '1' or pd.checkflag is null))
|
|
|
+ or (pd.procedureid = 104 and pd.isrefire = '0' and pd.islengbu = '0' and pd.checkflag = '1')
|
|
|
+ )
|
|
|
AND pt2.type_id IN (103, 104)
|
|
|
AND pd.createtime >= @dateBegin@
|
|
|
AND pd.createtime < @dateEnd@
|
|
|
@@ -436,8 +441,11 @@ public class rpt : IHttpHandler, IReadOnlySessionState
|
|
|
ON g.goodsid = pd.goodsid
|
|
|
INNER JOIN tp_mst_goodstype gt
|
|
|
ON gt.goodstypeid = g.goodstypeid
|
|
|
- WHERE ((pd.procedureid <> 104 and pd.valueflag = '1')
|
|
|
- or (pd.procedureid = 104 and pd.isrefire = '0' and pd.checkflag = '1'))
|
|
|
+ WHERE
|
|
|
+ ((pd.procedureid not in (11,104) and pd.valueflag = '1')
|
|
|
+ or (pd.procedureid = 11 and pd.isrefire = '0' and pd.islengbu = '0' and (pd.checkflag = '1' or pd.checkflag is null))
|
|
|
+ or (pd.procedureid = 104 and pd.isrefire = '0' and pd.islengbu = '0' and pd.checkflag = '1')
|
|
|
+ )
|
|
|
AND pt2.type_id IN (103, 104)
|
|
|
AND pd.createtime >= @dateBegin@
|
|
|
AND pd.createtime < @dateEnd@
|
|
|
@@ -505,8 +513,11 @@ public class rpt : IHttpHandler, IReadOnlySessionState
|
|
|
ON g.goodsid = pd.goodsid
|
|
|
INNER JOIN tp_mst_goodstype gt
|
|
|
ON gt.goodstypeid = g.goodstypeid
|
|
|
- WHERE ((pd.procedureid <> 104 and pd.valueflag = '1')
|
|
|
- or (pd.procedureid = 104 and pd.isrefire = '0' and pd.checkflag = '1'))
|
|
|
+ WHERE
|
|
|
+ ((pd.procedureid not in (11,104) and pd.valueflag = '1')
|
|
|
+ or (pd.procedureid = 11 and pd.isrefire = '0' and pd.islengbu = '0' and (pd.checkflag = '1' or pd.checkflag is null))
|
|
|
+ or (pd.procedureid = 104 and pd.isrefire = '0' and pd.islengbu = '0' and pd.checkflag = '1')
|
|
|
+ )
|
|
|
AND pt2.type_id IN (103, 104)
|
|
|
AND pd.createtime >= @dateBegin@
|
|
|
AND pd.createtime < @dateEnd@
|