Просмотр исходного кода

重烧卸窑明细表增加回收下拉框 新增光瓷重量接口

ztl 2 лет назад
Родитель
Сommit
e979af6957

+ 53 - 0
wwwroot/api/PorcelainWeight.ashx

@@ -0,0 +1,53 @@
+<%@ WebHandler Language="C#" Class="mesPackingIndex" %>
+
+using System;
+using System.Web;
+using System.Data;
+using Curtain.DataAccess;
+using DK.XuWei.WebMes;
+
+/// <summary>
+/// 当日经过3#卸窑的光瓷重量
+/// xuwei 2020-08-20
+/// </summary>
+public class mesPackingIndex : IHttpHandler
+{
+
+    public void ProcessRequest(HttpContext context)
+    {
+        context.Response.ContentType = "text/plain";
+
+        using (IDataAccess conn = DataAccess.Create())
+        {
+            DataTable dt = new DataTable();
+                dt = conn.ExecuteDatatable(@"
+SELECT
+SUM(T.LUSTERWAREWEIGHT * T.count) LUSTERWAREWEIGHT
+FROM(
+SELECT
+	TPPD.GOODSCODE,
+	TMG.LUSTERWAREWEIGHT,
+	COUNT(*) count
+FROM
+	TP_PM_PRODUCTIONDATA TPPD
+	LEFT JOIN TP_MST_GOODS TMG ON TPPD.GOODSID = TMG.GOODSID
+WHERE
+	TPPD.PROCEDUREID IN ( 103 ) 
+	AND TPPD.CREATETIME >= trunc( SYSDATE ) GROUP BY TPPD.GOODSCODE,TMG.LUSTERWAREWEIGHT) T
+				"
+            );
+            var LUSTERWAREWEIGHT =  dt.Rows[0]["LUSTERWAREWEIGHT"].ToString();
+            context.Response.Write(LUSTERWAREWEIGHT);
+        }
+    }
+
+
+    public bool IsReusable
+    {
+        get
+        {
+            return false;
+        }
+    }
+
+}

+ 15 - 0
wwwroot/mes/rpt/rpt362/rpt.ashx

@@ -65,6 +65,21 @@ public class rpt : IHttpHandler, IReadOnlySessionState
                                 and t.proceduretime<=@datebeginMasterEnd@
                                  and (t.KILNID IN ({K}) OR '0,0' = '{K}')  ";
                     }
+                    else if (procedure == "80")
+                    {
+                        sqlStr = @"
+                        SELECT 
+                            row_number() over( order by t.barcode ) as 序号,
+                            t.barcode as 产品条码
+                            FROM tp_pm_inproduction t
+                            LEFT JOIN tp_mst_goods g
+                                ON t.goodsid = g.goodsid
+                            LEFT JOIN tp_mst_goodstype gt
+                                ON g.goodstypeid = gt.goodstypeid
+                            where  t.procedureid = 80
+                                and t.proceduretime >=@datebeginMasterStar@ 
+                                and t.proceduretime<=@datebeginMasterEnd@";
+                    }
                      
                 }
 

+ 1 - 1
wwwroot/mes/rpt/rpt362/rpt_index.html

@@ -26,7 +26,7 @@
                                data:[{'text': 'TK1', 'value': '1'}, {'text': 'TK2', 'value': '2'}, {'text': 'TK3', 'value': '5'}, {'text': 'SK1', 'value': '3'}, {'text': 'SK2', 'value': '4'}, {'text': 'SK3', 'value': '6'}]" style=" width: 120px; height: 32px;">
                         工序:
                         <input class="easyui-combobox" id="procedure" name="procedure" data-options="required:false,valueField:'value',textField:'text',editable:true,multiple:false,
-                               data:[{'text': '重烧卸窑', 'value': '16'}, {'text': '冷补', 'value': '135'}],onSelect:lengbuChange" style=" width: 120px; height: 32px;" >
+                               data:[{'text': '重烧卸窑', 'value': '16'}, {'text': '冷补', 'value': '135'}, {'text': '次品回收', 'value': '80'}],onSelect:lengbuChange" style=" width: 120px; height: 32px;" >
                         重烧卸窑时间/冷补时间:
                         <input class="easyui-datetimebox" id="datebeginMasterStar" name="datebeginMasterStar" data-options="required:true,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
                         - <input class="easyui-datetimebox" id="datebeginMasterEnd" name="datebeginMasterEnd" data-options="required:true,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">