Преглед на файлове

质量报表增加数据源

姜永辉 преди 6 дни
родител
ревизия
3d104b76df

+ 14 - 3
DK.Client/ReportModule/R04/M01/F_RPT_040105.Designer.cs

@@ -69,6 +69,7 @@
             this.ProductionLineId = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.subGoodstypecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ProductionLineName = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dtsource = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Kilncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.goodstypecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.OutKilnCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -386,6 +387,7 @@
             this.ProductionLineId,
             this.subGoodstypecode,
             this.ProductionLineName,
+            this.dtsource,
             this.Kilncode,
             this.goodstypecode,
             this.OutKilnCount,
@@ -462,6 +464,14 @@
             this.ProductionLineName.ReadOnly = true;
             this.ProductionLineName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             // 
+            // dtsource
+            // 
+            this.dtsource.DataPropertyName = "dtsource";
+            this.dtsource.HeaderText = "数据源";
+            this.dtsource.Name = "dtsource";
+            this.dtsource.ReadOnly = true;
+            this.dtsource.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
             // Kilncode
             // 
             this.Kilncode.DataPropertyName = "Kilncode";
@@ -678,9 +688,13 @@
         private Basics.BaseControls.C_Button btnSearch;
         private Basics.BaseControls.C_DataGridView dgvRptProcedure;
         private Basics.BaseControls.C_CheckBox chkAll;
+        private Basics.BaseControls.C_StatusCheckBox chkTestMouldFlag;
+        private Controls.SearchBox.ScbGoodsType scbGoodsType;
+        private Basics.BaseControls.C_Label lblGoodsType;
         private System.Windows.Forms.DataGridViewTextBoxColumn ProductionLineId;
         private System.Windows.Forms.DataGridViewTextBoxColumn subGoodstypecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ProductionLineName;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dtsource;
         private System.Windows.Forms.DataGridViewTextBoxColumn Kilncode;
         private System.Windows.Forms.DataGridViewTextBoxColumn goodstypecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn OutKilnCount;
@@ -697,8 +711,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn SubstandardPercent;
         private System.Windows.Forms.DataGridViewTextBoxColumn ReFireCount;
         private System.Windows.Forms.DataGridViewTextBoxColumn ReFirePercent;
-        private Basics.BaseControls.C_StatusCheckBox chkTestMouldFlag;
-        private Controls.SearchBox.ScbGoodsType scbGoodsType;
-        private Basics.BaseControls.C_Label lblGoodsType;
     }
 }

+ 3 - 0
DK.Client/ReportModule/R04/M01/F_RPT_040105.resx

@@ -260,6 +260,9 @@
   <metadata name="ProductionLineName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="dtsource.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="goodstypecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 13 - 3
DK.Service/ReportModuleLogic/ReportModuleLogic.cs

@@ -4601,6 +4601,7 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
 
             string sqlString = "select qdgroup.gid\n" +
             "      ,decode(qdgroup.gid, 3, '总计', qdgroup.productionlinename) productionlinename\n" +
+            "       ,qdgroup.dtsource " + 
             "      ,decode(qdgroup.gid\n" +
             "             ,1\n" +
             "             ,'合计[' || qdgroup.kilncode || ']'\n" +
@@ -4648,7 +4649,8 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
             "              ,pcpl.productionlinename\n" +
             "              ,mstkiln.kilncode\n" +
             "              ,mstgoodstype2.goodstypename goodstypename2\n" +
-            "              ,mstgoodstype2.goodstypecode goodstypecode2\n" 
+            "              ,mstgoodstype2.goodstypecode goodstypecode2\n" + 
+            "              ,ppcc.dtsource " 
             //"              ,nvl(sum(decode(ppcc.goodsleveltypeid, 0, 1, 0)), 0) OutKilnCount\n" +
             //"              ,nvl(sum(decode(ppcc.goodsleveltypeid, 5, 1,16,1, 0)), 0) BadCount\n" +
             //"              ,nvl(sum(decode(ppcc.goodsleveltypeid, 6, 1, 0)), 0) ReFireCount\n" +
@@ -4745,7 +4747,15 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
                                ,pd.goodsid
                                ,pd.kilnid
                                ,pd.kilncarbatchno
-                               ,1 cc 
+                               ,1 cc  
+                                 ,CASE
+                                    WHEN pd.procedureid IN (55, 13) THEN
+                                     '本烧'
+                                    WHEN pd.procedureid IN (24) THEN
+                                     '重烧'
+                                    ELSE
+                                     '冷修'
+                                END dtsource
                   FROM(SELECT *
                           FROM(SELECT pd28.productionlineid
                                       , pd28.goodsid
@@ -4869,7 +4879,7 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
                 selSql.Append("    AND mstgoodstype.GOODSTYPECode LIKE '%' \n");
             }
             sqlString =
-            "         group by grouping sets((pcpl.productionlinename, mstkiln.kilncode, mstgoodstype2.goodstypename,mstgoodstype2.goodstypecode),(pcpl.productionlinename, mstgoodstype2.goodstypename,mstgoodstype2.goodstypecode),(pcpl.productionlinename, mstkiln.kilncode),(pcpl.productionlinename))\n" +
+            "         group by grouping sets((pcpl.productionlinename, mstkiln.kilncode, mstgoodstype2.goodstypename,mstgoodstype2.goodstypecode, ppcc.dtsource),(pcpl.productionlinename, mstgoodstype2.goodstypename,mstgoodstype2.goodstypecode),(pcpl.productionlinename, mstkiln.kilncode),(pcpl.productionlinename))\n" +
             "         order by pcpl.productionlinename\n" +
             "                 ,mstkiln.kilncode\n" +
             "                 ,mstgoodstype2.goodstypecode\n" +