From 2d633ee3d3a68b65b5c1adb3d545fe7f50483304 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 16 八月 2023 14:48:14 +0800 Subject: [PATCH] 产线工位,检验单,用户列表添加查看权限 --- DAL/质检管理/ClsQC_FirstPieceCheckBill.cs | 4 Model/质检管理/ClsQC_FirstPieceCheckBillMain.cs | 1 Model/质检管理/ClsQC_ProcessCheckBillSub_ValueGrid.cs | 2 WebAPI/Controllers/BLL/Xt_UserController.cs | 10 + Model/质检管理/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs | 2 Model/Model.csproj | 1 Model/生产管理/ClsGy_SourceWorkStationSet.cs | 19 +++ WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs | 175 +++++++++++++++++++++++++++++ DAL/生产管理/ClsGy_SourceWorkStationSet.cs | 68 +++++++++++ DAL/质检管理/ClsQC_ProcessCheckBill.cs | 4 DAL/DAL.csproj | 1 WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs | 15 ++ WebAPI/WebAPI.csproj | 2 Model/质检管理/ClsQC_ProcessCheckBillMain.cs | 3 WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs | 48 +++++++ 15 files changed, 344 insertions(+), 11 deletions(-) diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj index 99a7f4d..92a994e 100644 --- a/DAL/DAL.csproj +++ b/DAL/DAL.csproj @@ -576,6 +576,7 @@ <Compile Include="婧愬崟\閲戣澏婧愬崟\Cls_S_Sc_ICMOBillList_K3.cs" /> <Compile Include="婧愬崟\閲戣澏婧愬崟\Cls_S_K3_EntrustInBillList.cs" /> <Compile Include="婧愬崟\閲戣澏婧愬崟\Cls_S_KF_ChangeBoxBillList.cs" /> + <Compile Include="鐢熶骇绠$悊\ClsGy_SourceWorkStationSet.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_ChangeNoteBill.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_WIPStockChangeBill.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_WIPStockCheckBill.cs" /> diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" new file mode 100644 index 0000000..1aa7181 --- /dev/null +++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" @@ -0,0 +1,68 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Data; + +namespace DAL +{ + public class ClsGy_SourceWorkStationSet : DBUtility.ClsGy_Base_Ctl + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + public Model.ClsGy_SourceWorkStationSet oModel = new Model.ClsGy_SourceWorkStationSet(); + //鏋勯�犲嚱鏁� + public ClsGy_SourceWorkStationSet() + { + MvarItemKey = "Gy_SourceWorkStationSet"; + MvarReportTitle = "浜х嚎宸ヤ綅"; + oModel = new Model.ClsGy_SourceWorkStationSet(); + } + + //鏂板 + public override bool AddNew() + { + try + { + string ssql = "Insert into " + MvarItemKey + " " + + "(HMacAddr,HSourceID,HProdOrgID,HWorkStationID,HProcID," + + " HType,HVideo,HRemark,HCreateDate,HCreator)" + + " Values('" + oModel.HMacAddr + "'," + oModel.HSourceID + "," + oModel.HProdOrgID + "," + oModel.HWorkStationID + "," + + oModel.HProcID + ",'" + oModel.HType + "'," + oModel.HVideo + ",'" + oModel.HRemark + "','" + + oModel.HCreateDate + "','" + oModel.HCreator + "')"; + oCn.BeginTran(); + oCn.RunProc(ssql, ref DBUtility.ClsPub.sExeReturnInfo); + oCn.Commit(); + return true; + } + catch (Exception e) + { + oCn.RollBack(); + throw (e); + } + } + + //淇敼 + public override bool ModifyByID(Int64 sItemID) + { + try + { + string ssql = "Update " + MvarItemKey + " set " + + "HMacAddr='" + oModel.HMacAddr + "'" + + ",HSourceID='" + oModel.HSourceID + "'" + + ",HProdOrgID='" + oModel.HProdOrgID + "'" + + ",HWorkStationID= '" + oModel.HWorkStationID + "'" + + ",HProcID='" + oModel.HProcID + "'" + + ",HType='" + oModel.HType + "'" + + ",HVideo='" + oModel.HVideo +"' Where HItemID = " + sItemID; + oCn.BeginTran(); + oCn.RunProc(ssql, ref DBUtility.ClsPub.sExeReturnInfo); + oCn.Commit(); + return true; + } + catch (Exception e) + { + oCn.RollBack(); + throw (e); + } + } + } +} diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" index 71f04a6..e35c4d6 100644 --- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" +++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" @@ -152,13 +152,13 @@ ",HYear,HPeriod,HRemark" + ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" + ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" + - ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID" + + ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" + "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ", " + DBUtility.ClsPub.BoolToString(omodel.HLastResult) + - "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + + "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in DetailColl) diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" index bb2a05f..f5418a2 100644 --- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" +++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" @@ -156,7 +156,7 @@ ",HBarCode,HLBatchNo,HCusID,HSortBillNo,HContrctBatchNo" + ",HProdAreaID,HProdTypeID,HProdStoveNo,HRecipeID,HDiameter1" + ",HDiameter2,HRoutingInterID,HDrawingDireID,HPackTypeID" + - ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID" + + ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ @@ -166,7 +166,7 @@ ",'" + omodel.HBarCode + "','" + omodel.HLBatchNo + "'," + omodel.HCusID.ToString() + ",'" + omodel.HSortBillNo + "','" + omodel.HContrctBatchNo + "'" + "," + omodel.HProdAreaID.ToString() + "," + omodel.HProdTypeID.ToString() + ",'" + omodel.HProdStoveNo + "'," + omodel.HRecipeID.ToString() + "," + omodel.HDiameter1.ToString() + "," + omodel.HDiameter2.ToString() + "," + omodel.HRoutingInterID.ToString() + ",'" + omodel.HDrawingDireID + "'," + omodel.HPackTypeID.ToString() + - "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + + "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsQC_ProcessCheckBillSub oSub in DetailColl) diff --git a/Model/Model.csproj b/Model/Model.csproj index b38bf6d..db8e158 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -449,6 +449,7 @@ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TechnologyParameter_Model.cs" /> <Compile Include="鎴愭湰绠$悊\ClsKf_ICBal.cs" /> <Compile Include="鎴愭湰绠$悊\ClsKf_WIPBal.cs" /> + <Compile Include="鐢熶骇绠$悊\ClsGy_SourceWorkStationSet.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_ChangeNoteBillMain.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_ChangeNoteBillSub.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_MateWasterRequestBillMain.cs" /> diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" new file mode 100644 index 0000000..fa19ed9 --- /dev/null +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" @@ -0,0 +1,19 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsGy_SourceWorkStationSet : DBUtility.ClsGy_Base_Model + { + public string HMacAddr; //MAC鍙� + public Int64 HSourceID; //鐢熶骇璧勬簮(Gy_Source) + public Int64 HProdOrgID; //鐢熶骇缁勭粐() + public Int64 HWorkStationID; //宸ヤ綅锛圙y_WorkStation锛� + public Int64 HProcID; //宸ュ簭(Gy_Process) + public string HType; //鍖归厤绫诲瀷锛堟寜宸ヤ綅鍖归厤锛屾寜宸ュ簭鍖归厤锛屾寜宸ヤ綅+宸ュ簭鍖归厤锛� + public Int64 HVideo; //鏄惁榛樿鎾斁瑙嗛 + public DateTime HCreateDate; //鍒涘缓鏃ユ湡 + public string HCreator; //鍒涘缓浜猴紙鍜孒UserName 涓�鑷达級 + } +} diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" index 1f17686..ed85bf3 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" @@ -20,6 +20,7 @@ public String HBackRemark; public Int64 HPrintQty; public Int64 HICMOEntryID; + public Int64 HQCSchemeID; } } diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" index 91d64f3..803c818 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" @@ -9,7 +9,7 @@ public Int64 HItemID; public Int64 HSEQ; public String HInSpectResult; - public decimal HInSpectValue; + public double HInSpectValue; public Int64 HInSpectValueB; public String HInSpectValueT; } diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" index 3c97d59..4d7bbe4 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" @@ -38,6 +38,7 @@ public String HDrawingDireID; public Int64 HPackTypeID; public Int64 HICMOEntryID; - + public Int64 HQCSchemeID; + } } diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub_ValueGrid.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub_ValueGrid.cs" index 2b0a530..e09a626 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub_ValueGrid.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub_ValueGrid.cs" @@ -9,7 +9,7 @@ public Int64 HItemID; public Int64 HSEQ; public String HInSpectResult; - public decimal HInSpectValue; + public double HInSpectValue; public Int64 HInSpectValueB; public String HInSpectValueT; } diff --git a/WebAPI/Controllers/BLL/Xt_UserController.cs b/WebAPI/Controllers/BLL/Xt_UserController.cs index 8b674ab..853a083 100644 --- a/WebAPI/Controllers/BLL/Xt_UserController.cs +++ b/WebAPI/Controllers/BLL/Xt_UserController.cs @@ -22,10 +22,18 @@ #region[鐢ㄦ埛鍒楄〃鏌ヨ] [Route("Xt_User/list")] [HttpGet] - public object list(string sWhere) + public object list(string sWhere,string user) { try { + if (!DBUtility.ClsPub.Security_Log_second("Xt_User_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_UserList " + sWhere, "h_v_IF_UserList"); diff --git a/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs b/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs new file mode 100644 index 0000000..3374d00 --- /dev/null +++ b/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs @@ -0,0 +1,175 @@ +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Pub_Class; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers +{ + public class Gy_SourceWorkStationSetController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus; + + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + /// <summary> + /// 杩斿洖鐢熶骇宸ヤ綅鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_SourceWorkStationSet/list")] + [HttpGet] + public object list(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_SourceWorkStationSet_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + string sql1 = string.Format(@"select * from h_v_Gy_SourceWorkStationSetList where 1 = 1"); + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_SourceWorkStationSetList"); + } + else + { + string sql = sql1 + sWhere + " order by HItemID "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_SourceWorkStationSetList"); + } + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region 浜х嚎宸ヤ綅淇濆瓨 + [Route("Gy_SourceWorkStationSet/Save")] + [HttpPost] + public object set_SaveBill([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + //淇濆瓨鍗曟嵁 + return objJsonResult = AddBillMain(msg1); + } + + public json AddBillMain(string msg1) + { + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string user = sArray[1].ToString(); //鐢ㄦ埛 + bool bResult; + try + { + //鍒ゆ柇鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_SourceWorkStationSet_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄�"; + objJsonResult.data = null; + return objJsonResult; + } + + msg2 = "[" + msg2.ToString() + "]"; + List<Model.ClsGy_SourceWorkStationSet> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_SourceWorkStationSet>>(msg2); + DAL.ClsGy_SourceWorkStationSet BillNew = new DAL.ClsGy_SourceWorkStationSet(); + //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞� + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = mainList[0].HCreateDate;//鏃ユ湡 + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = s; + objJsonResult.data = null; + return objJsonResult; + } + //鍥哄畾璧嬪��================================= + BillNew.oModel.HMacAddr = mainList[0].HMacAddr; + BillNew.oModel.HSourceID = mainList[0].HSourceID; + BillNew.oModel.HProdOrgID = mainList[0].HProdOrgID; + BillNew.oModel.HWorkStationID = mainList[0].HWorkStationID; + BillNew.oModel.HProcID = mainList[0].HProcID; + BillNew.oModel.HType = ClsPub.isStrNull(mainList[0].HType); + BillNew.oModel.HVideo = ClsPub.isLong(mainList[0].HVideo); + BillNew.oModel.HCreateDate = ClsPub.isDate(mainList[0].HCreateDate); + BillNew.oModel.HCreator = ClsPub.isStrNull(mainList[0].HCreator); + + //淇濆瓨瀹屾瘯鍚庡鐞� + if (mainList[0].HItemID == 0) + { + bResult = BillNew.AddNew(); + } + else + { + bResult = BillNew.ModifyByID(mainList[0].HItemID); + } + //鎻愮ず + if (bResult == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + //objJsonResult.Message = "鍗曟嵁瀛樼洏瀹屾瘯!鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim(); + objJsonResult.Message = "淇濆瓨鎴愬姛!" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + } +} \ No newline at end of file diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" index bc1cae8..992044e 100644 --- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" @@ -96,6 +96,7 @@ BillNew.omodel.HMainSourceEntryID = ClsPub.isLong(mainList[0].HMainSourceEntryID); BillNew.omodel.HMainSourceBillNo = ClsPub.isStrNull(mainList[0].HMainSourceBillNo); BillNew.omodel.HMainSourceBillType = ClsPub.isStrNull(mainList[0].HMainSourceBillType); + BillNew.omodel.HQCSchemeID = ClsPub.isLong(mainList[0].HQCSchemeID); BillNew.omodel.HBillStatus = 1; BillNew.omodel.HProcID = ClsPub.isLong(mainList[0].HProcID); List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg3); @@ -224,7 +225,7 @@ oSub_Value.HEntryID = HEntryID; oSub_Value.HSEQ = i + 1; oSub_Value.HInSpectResult = ClsPub.isStrNull(valueList[i].HInSpectResult); - oSub_Value.HInSpectValue = ClsPub.isLong(valueList[i].HInSpectValue); + oSub_Value.HInSpectValue = ClsPub.isDoule(valueList[i].HInSpectValue); oSub_Value.HInSpectValueB = ClsPub.isLong(valueList[i].HInSpectValueB); oSub_Value.HInSpectValueT = ClsPub.isStrNull(valueList[i].HInSpectValueT); @@ -620,5 +621,50 @@ } } #endregion + + /// <summary> + ///杩斿洖妫�楠屽�煎垪琛� + /// </summary> + /// <param name="sWhere"></param> + /// <returns></returns> + [Route("QC_ValueTable_ProcessCheck/getValueList")] + [HttpGet] + public object getValueList(Int64 HInterID, Int64 HEntryID, string user) + { + DataSet ds; + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + ds = oCN.RunProcReturn("select * from QC_ProcessCheckBillSub_ValueGrid where HInterID=" + HInterID + " and HEntryID=" + HEntryID, "QC_ProcessCheckBillSub_ValueGrid"); + + if (ds.Tables[0].Rows.Count > 0) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹紒"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } } } \ No newline at end of file diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" index a39c8e1..4c7b4ce 100644 --- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" @@ -93,6 +93,7 @@ BillNew.omodel.HMainSourceEntryID = ClsPub.isLong(mainList[0].HMainSourceEntryID); BillNew.omodel.HMainSourceBillNo = ClsPub.isStrNull(mainList[0].HMainSourceBillNo); BillNew.omodel.HMainSourceBillType = ClsPub.isStrNull(mainList[0].HMainSourceBillType); + BillNew.omodel.HQCSchemeID = ClsPub.isLong(mainList[0].HQCSchemeID); BillNew.omodel.HBillStatus = 1; List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3); BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>(); @@ -274,7 +275,7 @@ oSub_Value.HEntryID = HEntryID; oSub_Value.HSEQ = i + 1; oSub_Value.HInSpectResult = ClsPub.isStrNull(valueList[i].HInSpectResult); - oSub_Value.HInSpectValue = ClsPub.isLong(valueList[i].HInSpectValue); + oSub_Value.HInSpectValue = ClsPub.isDoule(valueList[i].HInSpectValue); oSub_Value.HInSpectValueB = ClsPub.isLong(valueList[i].HInSpectValueB); oSub_Value.HInSpectValueT = ClsPub.isStrNull(valueList[i].HInSpectValueT); @@ -333,8 +334,17 @@ try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + List<object> columnNameList = new List<object>(); ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub_ValueGrid where HInterID="+ HInterID + " and HEntryID="+ HEntryID, "h_v_QC_FirstPieceCheckBillList"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } if (ds.Tables[0].Rows.Count > 0) { @@ -342,13 +352,14 @@ objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹紒"; + objJsonResult.Message = "鏃犳娴嬪�兼暟鎹紒"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 9fad71c..ea516fb 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -420,6 +420,7 @@ <Compile Include="Controllers\SBGL\SBTC\Sb_EquipWorkBeforeCheckBillController.cs" /> <Compile Include="Controllers\SBGL\Sb_EquipWorkBeforeCheckSBillController.cs" /> <Compile Include="Controllers\SBGL\Sb_EquipStockInCheckBillSController.cs" /> + <Compile Include="Controllers\SCGL\Gy_SourceWorkStationSetController.cs" /> <Compile Include="Controllers\SCGL\Sc_ComplementGoodBill_ZXBZController.cs" /> <Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱DataHelper.cs" /> <Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱JIT_Cg_PODemandPlanBillController.cs" /> @@ -966,6 +967,7 @@ <Folder Include="Views\Gy_RoutingGroup\" /> <Folder Include="Views\Gy_SettleStyle\" /> <Folder Include="Views\Gy_SOPBill\" /> + <Folder Include="Views\Gy_SourceWorkStationSet\" /> <Folder Include="Views\Gy_SplitBarCode\" /> <Folder Include="Views\Gy_Staff\" /> <Folder Include="Views\Gy_StdMinPickQty\" /> -- Gitblit v1.9.1