From c9577e18d12153e6d9314190b5c52add502f0938 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 17 六月 2024 13:43:07 +0800
Subject: [PATCH] 1.点检项目 增加 分类 树形 2.不良采集需要增加不良数量录入功能。 3.停工单进行下拉选择,必填项
---
WebAPI/Models/ClsSc_MESStopWorkBillMain.cs | 2
WebAPI/Controllers/基础资料/基础资料/Gy_DotCheckBillController.cs | 80 ++++++++++++++++++++++++++
WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user | 36 ++++++------
WebAPI/DLL/ClsSc_MESStopWorkBill.cs | 5 +
WebAPI/Models/Sc_ICMOBillQualityStatus_Tmp.cs | 1
WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs | 5 +
6 files changed, 107 insertions(+), 22 deletions(-)
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
index 2a4ac0d..375b838 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
@@ -320,5 +320,85 @@
}
}
#endregion
+
+ #region 鐐规椤圭洰鍒楄〃 鏍戠姸鍥� 鐐瑰嚮鍒嗙被鏌ヨ
+ public class TreeModel
+ {
+ public string id { get; set; }
+ public string title { get; set; }
+ public List<TreeModel> children = new List<TreeModel>();
+ }
+ [Route("Gy_DotCheckBill/TreeGetList")]
+ [HttpGet]
+ public object TreeGetList(string sWhere, string user)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select b.HItemID,b.HNumber,b.HName from Gy_DotCheck a left join gy_DotCheckItemClass b on a.HDotCheckItemClassID=b.HItemID", "Gy_DotCheck");
+
+ List<TreeModel> treeModels = new List<TreeModel>();
+ TreeModel first = new TreeModel();
+ first.id = "0";
+ first.title = "鐐规椤圭洰鍒嗙被璁剧疆";
+ treeModels.Add(first);
+
+ foreach (DataRow row in ds.Tables[0].Rows)
+ {
+ var strLen = row["hitemid"].ToString().Split('.');
+ if (strLen.Length == 1)
+ {
+ TreeModel tree = new TreeModel();
+ tree.id = row["HItemID"].ToString();
+ tree.title = row["HName"].ToString();
+ treeModels[0].children.Add(tree);
+ }
+ }
+ digui(ds.Tables[0], treeModels[0].children, 2);
+
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = Newtonsoft.Json.JsonConvert.SerializeObject(treeModels);
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ /// <summary>
+ /// 閫掑綊鍑芥暟
+ /// </summary>
+ public void digui(DataTable dt, List<TreeModel> tree, int num)
+ {
+ for (int m = 0; m < tree.Count; m++)
+ {
+ tree[m].children = new List<TreeModel>();
+ for (int i = 0; i < dt.Rows.Count; i++)//绗竴娆″惊鐜紝寰楀埌鎵�鏈夋牴鑺傜偣鐨勫瓙闆�
+ {
+ var strLen = dt.Rows[i]["HNumber"].ToString().Split('.');
+ if (strLen.Length == num && dt.Rows[i]["HNumber"].ToString().Contains(tree[m].id + "."))
+ {
+ TreeModel tbjson = new TreeModel();
+ tbjson.id = dt.Rows[i]["HItemID"].ToString();
+ tbjson.title = dt.Rows[i]["HName"].ToString();
+ tree[m].children.Add(tbjson);
+ }
+ }
+ var strLens = tree[m].id.Split('.');
+ for (int i = 0; i < tree[m].children.Count; i++)
+ {
+ digui(dt, tree[m].children, strLens.Length + 2);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦
+ }
+ }
+
+ }
+ #endregion
}
}
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
index 0f33c84..b0c0e75 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
@@ -240,6 +240,7 @@
BillNew.HSourceBillNo = mainList[0].HICMOBillNo;
BillNew.HSourceInterID = mainList[0].HICMOInterID;
BillNew.HSourceBillType = mainList[0].HSourceBillType;
+ BillNew.HBadReasonHQty = mainList[0].HBadReasonHQty;
oCN.BeginTran();
//涓存椂琛�
oCN.RunProc("Insert Into Sc_ICMOBillQualityStatus_Tmp " +
@@ -247,13 +248,13 @@
",HProcExchBillNo,HProcExchInterID,HProcExchEntryID,HProcID,HMaterID" +
",HSourceID,HGroupID,HCheckManID,HBadReasonID,HBarCode" +
",HMaker,HMakeDate,HBillType,HReportType,HSourceBillNo" +
- ",HSourceInterID,HSourceBillType,HICMOEntryID,HSourceEntryID" +
+ ",HSourceInterID,HSourceBillType,HICMOEntryID,HSourceEntryID,HBadReasonHQty" +
") " +
" values(" + BillNew.HInterID + ",'" + BillNew.HBillNo + "','" + BillNew.HDate + "','" + BillNew.HICMOBillNo + "'," + BillNew.HICMOInterID +
",'" + BillNew.HProcExchBillNo + "'," + BillNew.HProcExchInterID + "," + BillNew.HProcExchEntryID + "," + BillNew.HProcID + "," + BillNew.HMaterID +
"," + BillNew.HSourceID + "," + BillNew.HGroupID + "," + BillNew.HCheckManID + "," + BillNew.HBadReasonID + ",'" + BillNew.HBarCode + "'" +
",'" + BillNew.HMaker + "','" + BillNew.HMakeDate + "','" + BillNew.HBillType + "','" + +BillNew.HReportType + "','" +BillNew.HSourceBillNo + "'" +
- "," + BillNew.HSourceInterID + ",'" + BillNew.HSourceBillType + "'," + BillNew.HICMOEntryID + "," + BillNew.HICMOEntryID +
+ "," + BillNew.HSourceInterID + ",'" + BillNew.HSourceBillType + "'," + BillNew.HICMOEntryID + "," + BillNew.HICMOEntryID + "," + BillNew.HBadReasonHQty +
") ");
sReturn = "鎵爜鎴愬姛锛�";
oCN.Commit();
diff --git a/WebAPI/DLL/ClsSc_MESStopWorkBill.cs b/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
index 86b4628..49e3695 100644
--- a/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
+++ b/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
@@ -83,6 +83,7 @@
",HDeptID=" + omodel.HDeptID.ToString() +
",HEmpID=" + omodel.HEmpID.ToString() +
",HStopReason='" + omodel.HStopReason + "'" +
+ ",HStopType='" + omodel.HStopType + "'" +
",HReportType='" + omodel.HReportType + "'" +
",HBarCode='" + omodel.HBarCode + "'" +
",HAddr='" + omodel.HAddr + "'" +
@@ -176,7 +177,7 @@
",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStopBeginWorkTime,HStopEndWorkTime,HSourceID" +
",HGroupID,HDeptID,HEmpID,HStopReason,HReportType,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" +
",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" +
- ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HStopType" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
@@ -184,7 +185,7 @@
",'" + omodel.HProcExchBillNo + "'," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HICMOQty.ToString() + "," + omodel.HPlanQty.ToString() + ",getdate(),'" + omodel.HStopEndWorkTime.ToShortDateString() + "'," + omodel.HSourceID.ToString() +
"," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HStopReason + "','" + omodel.HReportType + "','" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate()" +
"," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType + "'" +
- "," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType + "'" +
+ "," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType + "','"+ omodel.HStopType + "'" +
") ");
//鍐嶆楠岃瘉 淇濆瓨鏄惁 鍚堢悊
diff --git a/WebAPI/Models/ClsSc_MESStopWorkBillMain.cs b/WebAPI/Models/ClsSc_MESStopWorkBillMain.cs
index fa99a17..81d3f5f 100644
--- a/WebAPI/Models/ClsSc_MESStopWorkBillMain.cs
+++ b/WebAPI/Models/ClsSc_MESStopWorkBillMain.cs
@@ -37,5 +37,7 @@
public int HSourceEntryID_Main;
public string HSourceBillNo_Main;
public string HSourceBillType_Main;
+
+ public string HStopType; //斯莫尔 停工原因新增字段
}
}
diff --git a/WebAPI/Models/Sc_ICMOBillQualityStatus_Tmp.cs b/WebAPI/Models/Sc_ICMOBillQualityStatus_Tmp.cs
index c5a1b34..cc2ede2 100644
--- a/WebAPI/Models/Sc_ICMOBillQualityStatus_Tmp.cs
+++ b/WebAPI/Models/Sc_ICMOBillQualityStatus_Tmp.cs
@@ -49,6 +49,7 @@
public long HRelationEntryID { get; set; }//鍏宠仈鍗曞瓙鍐呯爜
public string HRelationBillNo { get; set; }//鍏宠仈鍗曞彿
public long HReportEntryID { get; set; }//姹囨姤鍗曞瓙鍐呯爜
+ public long HBadReasonHQty { get; set; }//涓嶈壇鏁伴噺 鏂帿灏�
}
}
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
index 17e0886..c4bdfa9 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
@@ -4,7 +4,7 @@
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <History>False|2024-06-13T02:45:10.1375417Z;False|2024-06-13T10:43:52.8804222+08:00;</History>
+ <History>True|2024-06-17T05:22:25.8401219Z;True|2024-06-17T11:27:09.9223091+08:00;True|2024-06-17T11:23:37.5133763+08:00;True|2024-06-17T10:58:43.2727797+08:00;True|2024-06-14T13:32:57.5800980+08:00;False|2024-06-13T10:45:10.1375417+08:00;False|2024-06-13T10:43:52.8804222+08:00;</History>
<_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl>
</PropertyGroup>
<ItemGroup>
@@ -18,28 +18,28 @@
<publishTime>02/22/2013 16:43:40</publishTime>
</File>
<File Include="bin/BLL.dll">
- <publishTime>06/13/2024 10:54:10</publishTime>
+ <publishTime>06/17/2024 13:22:14</publishTime>
</File>
<File Include="bin/BLL.pdb">
- <publishTime>06/13/2024 10:54:10</publishTime>
+ <publishTime>06/17/2024 13:22:14</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime>
</File>
<File Include="bin/DAL.dll">
- <publishTime>06/13/2024 10:54:09</publishTime>
+ <publishTime>06/17/2024 13:22:13</publishTime>
</File>
<File Include="bin/DAL.pdb">
- <publishTime>06/13/2024 10:54:09</publishTime>
+ <publishTime>06/17/2024 13:22:13</publishTime>
</File>
<File Include="bin/Dapper.dll">
<publishTime>07/22/2016 22:52:40</publishTime>
</File>
<File Include="bin/DBUtility.dll">
- <publishTime>06/13/2024 10:54:06</publishTime>
+ <publishTime>06/17/2024 13:22:10</publishTime>
</File>
<File Include="bin/DBUtility.pdb">
- <publishTime>06/13/2024 10:54:06</publishTime>
+ <publishTime>06/17/2024 13:22:10</publishTime>
</File>
<File Include="bin/Grpc.Core.Api.dll">
<publishTime>03/22/2022 13:17:26</publishTime>
@@ -84,10 +84,10 @@
<publishTime>07/25/2012 19:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
- <publishTime>06/13/2024 10:54:06</publishTime>
+ <publishTime>06/17/2024 13:22:11</publishTime>
</File>
<File Include="bin/Model.pdb">
- <publishTime>06/13/2024 10:54:06</publishTime>
+ <publishTime>06/17/2024 13:22:11</publishTime>
</File>
<File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
<publishTime>05/25/2024 09:46:41</publishTime>
@@ -120,25 +120,25 @@
<publishTime>10/23/2021 17:07:54</publishTime>
</File>
<File Include="bin/Pub_Class.dll">
- <publishTime>06/13/2024 10:54:04</publishTime>
+ <publishTime>06/17/2024 13:22:09</publishTime>
</File>
<File Include="bin/Pub_Class.pdb">
- <publishTime>06/13/2024 10:54:04</publishTime>
+ <publishTime>06/17/2024 13:22:09</publishTime>
</File>
<File Include="bin/Pub_Control.dll">
- <publishTime>06/13/2024 10:54:05</publishTime>
+ <publishTime>06/17/2024 13:22:10</publishTime>
</File>
<File Include="bin/Pub_Control.pdb">
- <publishTime>06/13/2024 10:54:05</publishTime>
+ <publishTime>06/17/2024 13:22:10</publishTime>
</File>
<File Include="bin/RestSharp.dll">
<publishTime>08/31/2012 06:22:50</publishTime>
</File>
<File Include="bin/SQLHelper.dll">
- <publishTime>06/13/2024 10:54:05</publishTime>
+ <publishTime>06/17/2024 13:22:10</publishTime>
</File>
<File Include="bin/SQLHelper.pdb">
- <publishTime>06/13/2024 10:54:05</publishTime>
+ <publishTime>06/17/2024 13:22:10</publishTime>
</File>
<File Include="bin/Swashbuckle.Core.dll">
<publishTime>02/16/2015 01:57:08</publishTime>
@@ -246,10 +246,10 @@
<publishTime>11/24/2014 19:18:48</publishTime>
</File>
<File Include="bin/WebAPI.dll">
- <publishTime>06/13/2024 10:54:14</publishTime>
+ <publishTime>06/17/2024 13:22:18</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
- <publishTime>06/13/2024 10:54:14</publishTime>
+ <publishTime>06/17/2024 13:22:18</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>07/18/2013 01:03:52</publishTime>
@@ -444,7 +444,7 @@
<publishTime>05/25/2024 09:46:41</publishTime>
</File>
<File Include="Web.config">
- <publishTime>06/13/2024 10:54:20</publishTime>
+ <publishTime>06/17/2024 13:22:24</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
--
Gitblit v1.9.1