chenxy 3 лет назад
Родитель
Сommit
4359d66f49
1 измененных файлов с 19 добавлено и 8 удалено
  1. 19 8
      wwwroot/mes/rpt/rpt363/rpt.ashx

+ 19 - 8
wwwroot/mes/rpt/rpt363/rpt.ashx

@@ -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@