From 3652ccd21dffadf73d58ab241938c49c1929ff5b Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期一, 04 八月 2025 10:30:59 +0800
Subject: [PATCH] 页面过滤条件:开始时间和结束时间(根据检验信息中的创建时间进行过滤)、站台(检验信息中的检验工序)、料号(PNL布局信息名称)、批次(lot号) 2.柱状图:x轴lot号,y轴良品率。根据开始时间和结束时间、站台、料号 过滤检验信息并去重(一个PNL里的PCS不能有重复记录),然后根据料号、批次分组合计得到该料号每个批次的不良PCS的数量合计。然后获取该料号每个批次中PNL条码的数量(PNL条码不能重复)并乘PNL布局信息中子表的记录数(该料号中的PCS数量)得到每个批次的PCS总数。对每个批次进行((PCS总数-不良PCS数量)/PCS总数 *100)得到每个批次的良品率。 3.饼状图:根据开始时间和结束时间、站台、料号 过滤检验信息并去重(一个PNL里的PCS不能有重复记录),然后根据检验信息中的不良原因分组统计各个原因的数量。在饼状图显示 4.表格:根据开始时间和结束时间、站台、料号 过滤检验信息,表头包含(站台、料号、PNL条码、PCS号、正反面、不良原因),并针对表头字段进行去重

---
 WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
index 1922813..ae1c5fc 100644
--- a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
@@ -8,6 +8,7 @@
 using WebAPI.Models;
 using Model;
 using Newtonsoft.Json.Linq;
+using Newtonsoft.Json;
 
 namespace WebAPI.Controllers.SCGL
 {
@@ -75,6 +76,7 @@
         {
             try
             {
+                List<object> columnNameList = new List<object>();  //瀹氫箟澹版槑鍙橀噺 锛屾妸閫氳繃 new List<object>()鍒涘缓鐨� 瀹炰緥锛岃祴鍊肩粰鍙橀噺
                 //鍒ゆ柇鏄惁鏈夋煡璇㈢殑鏉冮檺
                 if (!DBUtility.ClsPub.Security_Log("Kf_ProductionReturnBill_Query", 1, false, user))
                 {
@@ -94,6 +96,12 @@
                     string sql = "select * from h_v_IF_ProductionReturnList where 1 = 1 " + sWhere + " order by hmainid desc";
                     ds = oCN.RunProcReturn(sql, "h_v_IF_ProductionReturnList");
                 }
+                foreach (DataColumn col in ds.Tables[0].Columns)//閬嶅巻ds涓涓�涓〃锛圱ables[0]锛夌殑鎵�鏈夊垪锛圕olumns锛夋瘡娆″惊鐜腑锛宑ol鍙橀噺浼氭寔鏈夊綋鍓嶅垪鐨勫紩鐢�
+                {
+                    Type dataType = col.DataType; //鑾峰彇褰撳墠鏁版嵁绫诲瀷浼犲叆 鑷畾涔夊彉閲廳atadataType
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; //瀛楃涓叉嫾鎺�         // 灏嗗垪鍚嶅拰鏁版嵁绫诲瀷淇℃伅鎷兼帴鎴愪竴涓狫SON鏍煎紡鐨勫瓧绗︿覆
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
 
                 //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                 //{
@@ -101,6 +109,7 @@
                 objJsonResult.count = 1;
                 objJsonResult.Message = "Sucess锛�";
                 objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
                 return objJsonResult;
                 //}
                 //else

--
Gitblit v1.9.1